[gradle-1.12] 16/211: upstream import 0.9.2

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Wed Jul 1 14:17:50 UTC 2015


This is an automated email from the git hooks/post-receive script.

seamlik-guest pushed a commit to branch master
in repository gradle-1.12.

commit c3997f23542d83ccdd4066e352c5dbb6e9eecd7c
Author: Miguel Landaeta <miguel at miguel.cc>
Date:   Tue Mar 22 19:55:28 2011 -0430

    upstream import 0.9.2
---
 build.gradle                                       |  171 ++-
 buildSrc/build.gradle                              |    4 +-
 .../main/groovy/org/gradle/build/Version.groovy    |    8 +
 .../gradle/build/docs/dsl/model/ClassMetaData.java |    2 +-
 .../build/startscripts/unixStartScriptHead.txt     |   44 +-
 .../build/startscripts/unixStartScriptTail.txt     |   28 +-
 .../build/startscripts/windowsStartScriptHead.txt  |   64 +-
 .../build/startscripts/windowsStartScriptTail.txt  |    8 +-
 .../docs/dsl/ExtractDslMetaDataTaskTest.groovy     |  657 +++++----
 .../build/docs/dsl/docbook/ClassDocTest.groovy     |   30 +-
 config/checkstyle/checkstyle.xml                   |   20 +
 config/checkstyle/suppressions.xml                 |    8 +-
 config/codenarc.xml                                |    2 +-
 gradle.properties                                  |    4 +-
 gradle/compile.gradle                              |    8 +
 gradle/publish.gradle                              |   62 +
 gradle/wrapper/gradle-wrapper.properties           |    6 +
 gradlew                                            |   13 +-
 gradlew.bat                                        |    8 +-
 settings.gradle                                    |    4 +-
 src/toplevel/LICENSE                               |   50 -
 src/toplevel/changelog.txt                         |    4 +-
 .../{gradle-announce => announce}/announce.gradle  |    0
 .../api/plugins/announce/AnnouncePlugin.groovy     |    0
 .../org/gradle/api/plugins/announce/Announcer.java |    0
 .../announce/internal/AnnouncerFactory.java        |    0
 .../internal/DefaultAnnouncerFactory.groovy        |    0
 .../api/plugins/announce/internal/Growl.groovy     |    0
 .../plugins/announce/internal/NotifySend.groovy    |    0
 .../api/plugins/announce/internal/Snarl.groovy     |    0
 .../api/plugins/announce/internal/Twitter.groovy   |    0
 .../gradle/api/plugins/announce/package-info.java  |    0
 .../META-INF/gradle-plugins/announce.properties    |    0
 .../announce/AnnouncePluginConventionTest.groovy   |    0
 .../api/plugins/announce/AnnouncePluginTest.groovy |    0
 .../internal/DefaultAnnouncerFactoryTest.groovy    |    0
 .../announce/internal/NotifySendTest.groovy        |    0
 .../api/plugins/announce/internal/SnarlTest.groovy |    0
 subprojects/{gradle-antlr => antlr}/antlr.gradle   |    0
 .../org/gradle/api/plugins/antlr/AntlrPlugin.java  |  105 ++
 .../plugins/antlr/AntlrSourceVirtualDirectory.java |    0
 .../org/gradle/api/plugins/antlr/AntlrTask.java    |    0
 .../internal/AntlrSourceVirtualDirectoryImpl.java  |    0
 .../api/plugins/antlr/internal/GenerationPlan.java |    0
 .../antlr/internal/GenerationPlanBuilder.java      |    0
 .../plugins/antlr/internal/GrammarDelegate.java    |  150 ++
 .../antlr/internal/GrammarFileMetadata.java        |    0
 .../plugins/antlr/internal/GrammarMetadata.java    |    0
 .../plugins/antlr/internal/MetadataExtracter.java  |    0
 .../gradle/api/plugins/antlr/internal/XRef.java    |   97 ++
 .../org/gradle/api/plugins/antlr/package-info.java |    0
 .../META-INF/gradle-plugins/antlr.properties       |    0
 .../api/plugins/antlr/AntlrPluginTest.groovy       |   67 +
 subprojects/code-quality/code-quality.gradle       |   37 +
 .../api/plugins/quality/AntCheckstyle.groovy       |    0
 .../gradle/api/plugins/quality/AntCodeNarc.groovy  |    0
 .../org/gradle/api/plugins/quality/Checkstyle.java |    0
 .../org/gradle/api/plugins/quality/CodeNarc.java   |    0
 .../api/plugins/quality/CodeQualityPlugin.groovy   |  102 ++
 .../GroovyCodeQualityPluginConvention.groovy       |    0
 .../quality/JavaCodeQualityPluginConvention.groovy |    0
 .../gradle/api/plugins/quality/package-info.java   |    0
 .../gradle-plugins/code-quality.properties         |    0
 .../plugins/quality/CodeQualityPluginTest.groovy   |    0
 subprojects/core/core.gradle                       |  135 ++
 .../integtests/AbstractIdeIntegrationTest.groovy   |   54 +
 .../gradle/integtests/AbstractIntegrationTest.java |   77 +
 .../integtests/AntProjectIntegrationTest.groovy    |    0
 .../gradle/integtests/AntlrIntegrationTest.java    |    0
 .../integtests/ArchiveIntegrationTest.groovy       |    0
 .../ArtifactDependenciesIntegrationTest.groovy     |    0
 .../BuildAggregationIntegrationTest.groovy         |   96 ++
 .../BuildScriptClasspathIntegrationTest.java       |    0
 .../BuildScriptErrorIntegrationTest.java           |  182 +++
 .../BuildScriptExecutionIntegrationTest.groovy     |    0
 .../integtests/CacheProjectIntegrationTest.groovy  |  123 ++
 ...ntModuleDependenciesResolveIntegrationTest.java |   41 +
 .../integtests/CodeQualityIntegrationTest.groovy   |    0
 .../integtests/CommandLineIntegrationTest.groovy   |  130 ++
 .../integtests/CopyErrorIntegrationTest.groovy     |    0
 .../integtests/CopyTaskIntegrationTest.groovy      |    0
 ...CrossVersionCompatibilityIntegrationTest.groovy |   82 ++
 .../DependenciesResolveIntegrationTest.java        |   42 +
 .../integtests/DistributionIntegrationTest.groovy  |  127 ++
 .../integtests/DynamicObjectIntegrationTest.groovy |  192 +++
 .../integtests/EclipseIntegrationTest.groovy       |  126 ++
 .../gradle/integtests/ExecIntegrationTest.groovy   |    0
 .../ExternalPluginIntegrationTest.groovy           |    0
 .../ExternalScriptErrorIntegrationTest.groovy      |    0
 .../ExternalScriptExecutionIntegrationTest.groovy  |    0
 .../integtests/FileTreeCopyIntegrationTest.groovy  |    0
 .../integtests/GroovyProjectIntegrationTest.java   |    0
 .../gradle/integtests/IdeaIntegrationTest.groovy   |  144 ++
 .../IncrementalBuildIntegrationTest.groovy         |  378 +++++
 .../IncrementalGroovyCompileIntegrationTest.groovy |    0
 ...ementalGroovyProjectBuildIntegrationTest.groovy |    0
 .../IncrementalJavaCompileIntegrationTest.groovy   |    0
 ...crementalJavaProjectBuildIntegrationTest.groovy |    0
 .../IncrementalScalaCompileIntegrationTest.groovy  |    0
 .../IncrementalTestIntegrationTest.groovy          |    0
 .../integtests/InitScriptErrorIntegrationTest.java |    0
 .../InitScriptExecutionIntegrationTest.groovy      |    0
 .../integtests/IvyPublishIntegrationTest.java      |   43 +
 .../gradle/integtests/JUnitIntegrationTest.groovy  |  377 +++++
 .../integtests/JUnitTestExecutionResult.groovy     |    0
 .../integtests/JavaProjectIntegrationTest.java     |    0
 .../integtests/LoggingIntegrationTest.groovy       |  343 +++++
 .../integtests/MultiprojectIntegrationTest.groovy  |    0
 .../OsgiProjectSampleIntegrationTest.groovy        |   59 +
 .../integtests/ProjectLayoutIntegrationTest.groovy |  173 +++
 .../integtests/ProjectLoadingIntegrationTest.java  |    0
 .../integtests/SamplesAntlrIntegrationTest.groovy  |   41 +
 .../SamplesCodeQualityIntegrationTest.groovy       |   44 +
 ...amplesCustomBuildLanguageIntegrationTest.groovy |   59 +
 .../SamplesCustomPluginIntegrationTest.groovy      |   52 +
 ...lesExcludesAndClassifiersIntegrationTest.groovy |   51 +
 ...lesGroovyCustomizedLayoutIntegrationTest.groovy |   48 +
 ...SamplesGroovyMultiProjectIntegrationTest.groovy |   79 ++
 .../SamplesGroovyOldVersionsIntegrationTest.groovy |   55 +
 .../SamplesGroovyQuickstartIntegrationTest.groovy  |   52 +
 .../SamplesJavaBaseIntegrationTest.groovy          |   57 +
 ...mplesJavaCustomizedLayoutIntegrationTest.groovy |   57 +
 .../SamplesJavaMultiProjectIntegrationTest.groovy  |  219 +++
 .../SamplesJavaOnlyIfIntegrationTest.groovy        |   92 ++
 ...esJavaProjectWithIntTestsIntegrationTest.groovy |   45 +
 .../SamplesJavaQuickstartIntegrationTest.groovy    |   70 +
 ...SamplesMixedJavaAndGroovyIntegrationTest.groovy |   71 +
 .../SamplesMixedJavaAndScalaIntegrationTest.groovy |   74 +
 .../SamplesRepositoriesIntegrationTest.groovy      |   43 +
 ...plesScalaCustomizedLayoutIntegrationTest.groovy |   51 +
 .../SamplesScalaQuickstartIntegrationTest.groovy   |   66 +
 .../SamplesWebProjectIntegrationTest.groovy        |   71 +
 .../SamplesWebQuickstartIntegrationTest.groovy     |   65 +
 .../integtests/ScalaProjectIntegrationTest.java    |    0
 .../SettingsScriptErrorIntegrationTest.java        |    0
 .../SettingsScriptExecutionIntegrationTest.groovy  |    0
 .../integtests/SyncTaskIntegrationTest.groovy      |    0
 .../TaskAutoDependencyIntegrationTest.groovy       |    0
 .../integtests/TaskDefinitionIntegrationTest.java  |  135 ++
 .../integtests/TaskExecutionIntegrationTest.java   |  153 ++
 .../UserGuideSamplesIntegrationTest.groovy         |    0
 .../integtests/UserGuideSamplesRunner.groovy       |    0
 .../integtests/WaterProjectIntegrationTest.groovy  |   77 +
 .../integtests/WebProjectIntegrationTest.java      |    0
 .../integtests/WorkerProcessIntegrationTest.java   |  372 +++++
 .../WrapperProjectIntegrationTest.groovy           |   45 +
 .../fixtures/AbstractExecutionResult.java          |    0
 .../fixtures/AbstractGradleExecuter.java           |  262 ++++
 .../integtests/fixtures/ArtifactBuilder.java       |    0
 .../fixtures/BasicGradleDistribution.java          |    0
 .../integtests/fixtures/DaemonGradleExecuter.java  |    0
 .../integtests/fixtures/ExecutionFailure.java      |    0
 .../integtests/fixtures/ExecutionResult.java       |   41 +
 .../integtests/fixtures/ForkingGradleExecuter.java |  270 ++++
 .../fixtures/GradleBackedArtifactBuilder.java      |    0
 .../integtests/fixtures/GradleDistribution.java    |  179 +++
 .../fixtures/GradleDistributionExecuter.java       |  156 ++
 .../gradle/integtests/fixtures/GradleExecuter.java |  105 ++
 .../gradle/integtests/fixtures/HttpServer.groovy   |    0
 .../fixtures/InProcessGradleExecuter.java          |  353 +++++
 .../fixtures/PreviousGradleVersionExecuter.groovy  |   94 ++
 .../org/gradle/integtests/fixtures/RuleHelper.java |    0
 .../org/gradle/integtests/fixtures/Sample.java     |    0
 .../fixtures/TestClassExecutionResult.java         |    0
 .../integtests/fixtures/TestExecutionResult.java   |    0
 .../gradle/integtests/fixtures/TestResources.java  |    0
 .../org/gradle/integtests/fixtures/UsesSample.java |    0
 .../maven/MavenProjectIntegrationTest.groovy       |   63 +
 .../maven/MavenRepoIntegrationTest.groovy          |   43 +
 .../gradle/integtests/maven/MavenRepository.groovy |    0
 .../maven/MavenSnapshotIntegrationTest.groovy      |    0
 ...SamplesMavenPomGenerationIntegrationTest.groovy |  152 ++
 .../SamplesMavenQuickstartIntegrationTest.groovy   |   96 ++
 .../testng/SampleTestNGIntegrationTest.groovy      |   71 +
 .../integtests/testng/TestNGExecutionResult.groovy |    0
 .../testng/TestNGIntegrationProject.groovy         |    0
 .../integtests/testng/TestNGIntegrationTest.groovy |  112 ++
 .../SamplesToolingApiIntegrationTest.groovy        |   45 +
 .../ToolingApiEclipseIntegrationTest.groovy        |   80 ++
 .../tooling/ToolingApiIntegrationTest.groovy       |   79 ++
 .../tooling/ToolingApiSpecification.groovy         |   31 +
 .../projectA-1.2-ivy.xml                           |    0
 .../projectB-1.5-ivy.xml                           |    0
 .../projectWithConfigurationHierarchy.gradle       |    0
 .../projectA-1.2-ivy.xml                           |    0
 .../projectB-1.5-ivy.xml                           |    0
 .../projectWithCyclesInDependencyGraph.gradle      |    0
 .../canHaveCycleInProjectDependencies/build.gradle |    0
 .../settings.gradle                                |    0
 .../canNestModules/projectWithNestedModules.gradle |    0
 .../canUseDynamicVersions/projectA-1.2-ivy.xml     |    0
 .../canUseDynamicVersions/projectB-1.5-ivy.xml     |    0
 .../projectWithDynamicVersions.gradle              |    0
 .../projectA-1.2-ivy.xml                           |    0
 .../projectA-2.0-ivy.xml                           |    0
 .../projectB-1.5-ivy.xml                           |    0
 .../projectB-2.1.5-ivy.xml                         |    0
 .../projectWithConflicts.gradle                    |    0
 .../dependencyReportWithConflicts/settings.gradle  |    0
 .../projectWithUnknownDependency.gradle            |    0
 .../CommandLineIntegrationTest/shared/build.gradle |   16 +
 .../shared/settings.gradle                         |    1 +
 .../canBuildJavaProject/build.gradle               |    0
 .../src/main/groovy/org/gradle/CustomTask.groovy   |    0
 .../src/main/java/org/gradle/Person.java           |    0
 .../shared/build.gradle                            |    0
 .../canCreateAndDeleteMetaData/api/build.gradle    |    0
 .../src/integTest/java/org/gradle/SomeClass.java   |    0
 .../src/main/java/org/gradle/api/PersonList.java   |    0
 .../api/src/main/resources/someprops.properties    |    0
 .../test/java/org/gradle/shared/PersonTest.java    |    0
 .../api/src/test/resources/someprops.properties    |    0
 .../expectedFiles/apiClasspath.xml                 |   12 +
 .../expectedFiles/apiJdt.properties                |    0
 .../expectedFiles/apiProject.xml                   |   15 +
 .../expectedFiles/groovyprojectClasspath.xml       |   12 +
 .../expectedFiles/groovyprojectJdt.properties      |    0
 .../expectedFiles/groovyprojectProject.xml         |   16 +
 .../expectedFiles/javabaseprojectClasspath.xml     |    4 +
 .../expectedFiles/javabaseprojectJdt.properties    |    0
 .../expectedFiles/javabaseprojectProject.xml       |   15 +
 .../expectedFiles/masterProject.xml                |    8 +
 .../expectedFiles/webAppJava6Classpath.xml         |    5 +
 .../expectedFiles/webAppJava6Jdt.properties        |    0
 .../expectedFiles/webAppJava6Project.xml           |   25 +
 .../expectedFiles/webAppJava6WtpComponent.xml      |    8 +
 .../expectedFiles/webAppJava6WtpFacet.xml          |    6 +
 .../expectedFiles/webAppWithVarsClasspath.xml      |   12 +
 .../expectedFiles/webAppWithVarsJdt.properties     |    0
 .../expectedFiles/webAppWithVarsProject.xml        |   25 +
 .../expectedFiles/webAppWithVarsWtpComponent.xml   |   11 +
 .../expectedFiles/webAppWithVarsWtpFacet.xml       |    6 +
 .../expectedFiles/webserviceClasspath.xml          |   19 +
 .../expectedFiles/webserviceJdt.properties         |    0
 .../expectedFiles/webserviceProject.xml            |   25 +
 .../expectedFiles/webserviceWtpComponent.xml       |   14 +
 .../expectedFiles/webserviceWtpFacet.xml           |    6 +
 .../groovyproject/build.gradle                     |    0
 .../groovyproject/src/main/groovy/script.groovy    |    0
 .../src/main/java/org/gradle/api/PersonList.java   |    0
 .../src/main/resources/someprops.properties        |    0
 .../test/java/org/gradle/shared/PersonTest.java    |    0
 .../src/test/resources/someprops.properties        |    0
 .../javabaseproject/build.gradle                   |    0
 .../canCreateAndDeleteMetaData/master/build.gradle |    0
 .../master/settings.gradle                         |    0
 .../webAppJava6/build.gradle                       |    0
 .../src/main/java/org/gradle/Person.java           |    0
 .../webAppJava6/src/main/webapp/index.html         |    0
 .../webAppWithVars/build.gradle                    |    0
 .../src/main/java/org/gradle/Person.java           |    0
 .../webservice/build.gradle                        |    0
 .../main/java/org/gradle/webservice/TestTest.java  |    0
 .../canExecuteCommands/canExecuteCommands.gradle   |   27 +
 .../canExecuteJava/canExecuteJava.gradle           |   27 +
 .../shared/src/main/java/org/gradle/TestMain.java  |   16 +
 .../canCreateAndDeleteMetaData/api/build.gradle    |    0
 .../src/main/java/org/gradle/api/PersonList.java   |    0
 .../test/java/org/gradle/shared/PersonTest.java    |    0
 .../canCreateAndDeleteMetaData/build.gradle        |    0
 .../expectedFiles/api/api.iml.xml                  |   40 +
 .../expectedFiles/root.iml.xml                     |    0
 .../expectedFiles/root.ipr.xml                     |  102 ++
 .../expectedFiles/root.iws.xml                     |  206 +++
 .../expectedFiles/webservice/webservice.iml.xml    |   76 +
 .../canCreateAndDeleteMetaData/settings.gradle     |    0
 .../webservice/build.gradle                        |    0
 .../main/java/org/gradle/webservice/TestTest.java  |    0
 .../overwritesExistingDependencies}/build.gradle   |    0
 .../expectedFiles/root.iml.xml                     |   39 +
 .../overwritesExistingDependencies}/root.iml       |    0
 .../settings.gradle                                |    0
 .../build.gradle                                   |    0
 .../expectedFiles/root.ipr.xml                     |  101 ++
 .../settings.gradle                                |    0
 .../worksWithAnEmptyProject/build.gradle           |    0
 .../expectedFiles/root.iml.xml                     |    0
 .../expectedFiles/root.ipr.xml                     |  100 ++
 .../worksWithAnEmptyProject/settings.gradle        |    0
 .../expectedFiles/root/root.iml.xml                |   18 +
 .../expectedFiles/root/root.ipr.xml                |  102 ++
 .../expectedFiles/top-level.iml.xml                |   18 +
 .../worksWithNonStandardLayout/root/build.gradle   |    0
 .../worksWithNonStandardLayout/settings.gradle     |    0
 .../buildSrc/src/main/java/DirTransformerTask.java |   58 +
 .../buildSrc/src/main/java}/GeneratorTask.java     |    0
 .../buildSrc/src/main/java/TransformerTask.java    |   66 +
 .../recompilesDependentClasses/NewIPerson.groovy   |    0
 .../recompilesDependentClasses/build.gradle        |    0
 .../src/main/groovy/IPerson.groovy                 |    0
 .../src/main/groovy/Person.groovy                  |    0
 .../build.gradle                                   |    0
 .../src/main/groovy/Person.java                    |    0
 .../src/main/groovy/PersonImpl.Groovy              |    0
 .../recompilesDependentClasses/NewIPerson.java     |    0
 .../recompilesDependentClasses/build.gradle        |    0
 .../src/main/java/IPerson.java                     |    0
 .../src/main/java/Person.java                      |    0
 .../NewIPerson.java                                |    0
 .../app/src/main/java/Person.java                  |    0
 .../build.gradle                                   |    0
 .../lib/src/main/java/IPerson.java                 |    0
 .../settings.gradle                                |    0
 .../build.gradle                                   |    0
 .../src/main/java/Test.java                        |    0
 .../recompilesDependentClasses/NewIPerson.scala    |    0
 .../recompilesDependentClasses/build.gradle        |    0
 .../src/main/scala/IPerson.scala                   |    0
 .../src/main/scala/Person.scala                    |    0
 .../build.gradle                                   |    0
 .../src/main/scala/Person.java                     |    0
 .../src/main/scala/PersonImpl.scala                |    0
 .../doesNotRunStaleTests/src/test/java/Broken.java |    0
 .../build.gradle                                   |    0
 .../src/test/java/JUnitExtra.java                  |    0
 .../src/test/java/JUnitTest.java                   |    0
 .../src/test/java/TestNGTest.java                  |    0
 .../NewMainClass.java                              |    0
 .../executesTestsWhenSourceChanges/NewOk.java      |    0
 .../src/main/java/MainClass.java                   |    0
 .../shared/build.gradle                            |    0
 .../shared/src/test/java/Ok.java                   |    0
 .../canHaveMultipleTestTaskInstances/build.gradle  |    0
 .../src/test/java/org/gradle/Test1.java            |    0
 .../src/test/java/org/gradle/Test2.java            |    0
 .../canRunJunit3Tests/build.gradle                 |    0
 .../src/test/java/org/gradle/Test1.java            |    0
 .../canRunSingleTests/build.gradle                 |    0
 .../canRunSingleTests/src/test/java/NotATest.java  |    0
 .../canRunSingleTests/src/test/java/Ok.java        |    0
 .../canRunSingleTests/src/test/java/Ok2.java       |    0
 .../detectsTestClasses/build.gradle                |    0
 .../test/java/org/gradle/AbstractHasRunWith.java   |    0
 .../src/test/java/org/gradle/CustomRunner.java     |    0
 .../test/java/org/gradle/EmptyRunWithSubclass.java |    0
 .../src/test/java/org/gradle/TestsOnInner.java     |    0
 .../executesTestsInCorrectEnvironment/build.gradle |    0
 .../src/test/java/org/gradle/OkTest.java           |    0
 .../src/test/java/org/gradle/OtherTest.java        |    0
 .../build.gradle                                   |    0
 .../src/test/java/org/gradle/BrokenAfter.java      |    0
 .../src/test/java/org/gradle/BrokenAfterClass.java |    0
 .../src/test/java/org/gradle/BrokenBefore.java     |    0
 .../test/java/org/gradle/BrokenBeforeAndAfter.java |    0
 .../test/java/org/gradle/BrokenBeforeClass.java    |    0
 .../test/java/org/gradle/BrokenConstructor.java    |    0
 .../src/test/java/org/gradle/BrokenException.java  |    0
 .../src/test/java/org/gradle/BrokenTest.java       |    0
 .../src/test/java/org/gradle/Unloadable.java       |    0
 .../LoggingIntegrationTest/logging/build.gradle    |    0
 .../logging/buildSrc/build.gradle                  |    0
 .../LoggingIntegrationTest/logging/external.gradle |    0
 .../LoggingIntegrationTest/logging/init.gradle     |    0
 .../logging/nestedBuild/build.gradle               |    0
 .../logging/nestedBuild/buildSrc/build.gradle      |    0
 .../logging/project1/build.gradle                  |    0
 .../logging/project2/build.gradle                  |    0
 .../LoggingIntegrationTest/logging/settings.gradle |    0
 .../multiThreaded/build.gradle                     |    0
 .../canUseANonStandardBuildDir/build.gradle        |    0
 .../src/main/java/Person.java                      |    0
 .../src/test/java/PersonTest.java                  |    0
 .../copyTestResources/src/one/ignore/bad.file      |    0
 .../integtests/copyTestResources/src/one/one.a     |    0
 .../integtests/copyTestResources/src/one/one.b     |    0
 .../copyTestResources/src/one/sub/ignore/bad.file  |    0
 .../copyTestResources/src/one/sub/onesub.a         |    0
 .../copyTestResources/src/one/sub/onesub.b         |    0
 .../gradle/integtests/copyTestResources/src/root.a |    0
 .../gradle/integtests/copyTestResources/src/root.b |    0
 .../copyTestResources/src/two/ignore/bad.file      |    0
 .../integtests/copyTestResources/src/two/two.a     |    0
 .../integtests/copyTestResources/src/two/two.b     |    0
 .../copyTestResources/src2/three/three.a           |    0
 .../copyTestResources/src2/three/three.b           |    0
 .../groovy/expectedClasspathFile.txt               |    0
 .../eclipseproject/groovy/expectedProjectFile.txt  |    0
 .../java/expectedApiClasspathFile.txt              |    0
 .../eclipseproject/java/expectedApiProjectFile.txt |    0
 .../java/expectedWebserviceClasspathFile.txt       |    0
 .../java/expectedWebserviceProjectFile.txt         |    0
 .../java/expectedWebserviceWtpFile.txt             |    0
 .../eclipseproject/scala/expectedClasspathFile.txt |    0
 .../eclipseproject/scala/expectedProjectFile.txt   |    0
 .../build.gradle                                   |    0
 .../settings.gradle                                |    0
 .../build.gradle                                   |    0
 .../settings.gradle                                |    0
 .../build.gradle                                   |    0
 .../settings.gradle                                |    0
 .../shared/producer.gradle                         |    0
 .../shared/projectWithMavenSnapshots.gradle        |    0
 .../shared/src/main/java/org/gradle/Test.java      |    0
 .../maven/pomGeneration/expectedNewPom.txt         |    0
 .../integtests/maven/pomGeneration/expectedPom.txt |    0
 .../maven/pomGeneration/expectedQuickstartPom.txt  |    0
 .../canListenForTestResults/build.gradle           |    0
 .../src/test/java/AppException.java                |    0
 .../src/test/java/SomeTest.java                    |    0
 .../executesTestsInCorrectEnvironment/build.gradle |    0
 .../src/test/java/org/gradle/OkTest.java           |    0
 .../groovyJdk15Failing/build.gradle                |    0
 .../src/main/groovy/org/gradle/Ok.groovy           |    0
 .../src/test/groovy/org/gradle/BadTest.groovy      |    0
 .../groovyJdk15Passing/build.gradle                |    0
 .../src/main/groovy/org/gradle/Ok.groovy           |    0
 .../src/test/groovy/org/gradle/OkTest.groovy       |    0
 .../javaJdk14Failing/build.gradle                  |    0
 .../src/main/java/org/gradle/Ok.java               |    0
 .../src/test/java/org/gradle/BadTest.java          |    0
 .../javaJdk15Failing/build.gradle                  |    0
 .../src/main/java/org/gradle/Ok.java               |    0
 .../src/test/java/org/gradle/BadTest.java          |    0
 .../src/test/java/org/gradle/BrokenAfterSuite.java |    0
 .../org/gradle/TestWithBrokenMethodDependency.java |    0
 .../test/java/org/gradle/TestWithBrokenSetup.java  |    0
 .../src/main/groovy/org/gradle/BuildAdapter.java   |   41 +
 .../groovy/org/gradle/BuildExceptionReporter.java  |  264 ++++
 .../src/main/groovy/org/gradle/BuildListener.java  |    0
 .../src/main/groovy/org/gradle/BuildLogger.java    |    0
 .../src/main/groovy/org/gradle/BuildResult.java    |    0
 .../main/groovy/org/gradle/BuildResultLogger.java  |    0
 .../src/main/groovy/org/gradle/CacheUsage.java     |    0
 .../org/gradle/CommandLineArgumentException.java   |    0
 .../src/main/groovy/org/gradle/GradleLauncher.java |  148 ++
 .../src/main/groovy/org/gradle/StartParameter.java |  551 ++++++++
 .../groovy/org/gradle/TaskExecutionLogger.java     |    0
 .../src/main/groovy/org/gradle/api/Action.java     |    0
 .../src/main/groovy/org/gradle/api/AntBuilder.java |    0
 .../src/main/groovy/org/gradle/api/Buildable.java  |    0
 .../org/gradle/api/CircularReferenceException.java |    0
 .../main/groovy/org/gradle/api/DefaultTask.java    |    0
 .../org/gradle/api/DomainObjectCollection.java     |  158 +++
 .../groovy/org/gradle/api/GradleException.java     |    0
 .../org/gradle/api/GradleScriptException.java      |    0
 .../org/gradle/api/IllegalDependencyNotation.java  |    0
 .../IllegalOperationAtExecutionTimeException.java  |    0
 .../org/gradle/api/InvalidUserDataException.java   |    0
 .../main/groovy/org/gradle/api/JavaVersion.java    |    0
 .../org/gradle/api/LocationAwareException.java     |    0
 .../gradle/api/NamedDomainObjectCollection.java    |    0
 .../org/gradle/api/NamedDomainObjectContainer.java |    0
 .../org/gradle/api/NamedDomainObjectFactory.java   |   31 +
 .../main/groovy/org/gradle/api/PathValidation.java |    0
 .../src/main/groovy/org/gradle/api/Plugin.java     |    0
 .../src/main/groovy/org/gradle/api/Project.java    | 1483 ++++++++++++++++++++
 .../org/gradle/api/ProjectEvaluationListener.java  |    0
 .../main/groovy/org/gradle/api/ProjectState.java   |    0
 .../src/main/groovy/org/gradle/api/Rule.java       |    0
 .../src/main/groovy/org/gradle/api/Script.java     |    0
 .../org/gradle/api/ScriptCompilationException.java |    0
 .../src/main/groovy/org/gradle/api/Task.java       |    0
 .../main/groovy/org/gradle/api/Transformer.java    |    0
 .../org/gradle/api/UncheckedIOException.java       |    0
 .../gradle/api/UnknownDomainObjectException.java   |    0
 .../org/gradle/api/UnknownProjectException.java    |    0
 .../org/gradle/api/UnknownTaskException.java       |    0
 .../org/gradle/api/artifacts/ClientModule.java     |    0
 .../org/gradle/api/artifacts/Configuration.java    |  409 ++++++
 .../api/artifacts/ConfigurationContainer.java      |    0
 .../org/gradle/api/artifacts/Dependency.java       |    0
 .../gradle/api/artifacts/DependencyArtifact.java   |    0
 .../org/gradle/api/artifacts/ExcludeRule.java      |    0
 .../gradle/api/artifacts/ExcludeRuleContainer.java |    0
 .../gradle/api/artifacts/ExternalDependency.java   |    0
 .../api/artifacts/ExternalModuleDependency.java    |    0
 .../api/artifacts/FileCollectionDependency.java    |    0
 .../groovy/org/gradle/api/artifacts/Module.java    |    0
 .../org/gradle/api/artifacts/ModuleDependency.java |    0
 .../gradle/api/artifacts/ProjectDependency.java    |    0
 .../org/gradle/api/artifacts/PublishArtifact.java  |    0
 .../gradle/api/artifacts/PublishInstruction.java   |    0
 .../org/gradle/api/artifacts/ResolveException.java |    0
 .../org/gradle/api/artifacts/ResolvedArtifact.java |    0
 .../api/artifacts/ResolvedConfiguration.java       |    0
 .../gradle/api/artifacts/ResolvedDependency.java   |    0
 .../gradle/api/artifacts/ResolverContainer.java    |    0
 .../api/artifacts/SelfResolvingDependency.java     |    0
 .../artifacts/UnknownConfigurationException.java   |    0
 .../api/artifacts/UnknownRepositoryException.java  |    0
 .../gradle/api/artifacts/dsl/ArtifactHandler.java  |    0
 .../api/artifacts/dsl/DependencyHandler.java       |    0
 .../api/artifacts/dsl/RepositoryHandler.java       |  261 ++++
 .../org/gradle/api/artifacts/dsl/package-info.java |    0
 .../api/artifacts/maven/Conf2ScopeMapping.java     |    0
 .../maven/Conf2ScopeMappingContainer.java          |    0
 .../api/artifacts/maven/GroovyMavenDeployer.java   |    0
 .../gradle/api/artifacts/maven/MavenDeployer.java  |    0
 .../api/artifacts/maven/MavenDeployment.java       |    0
 .../org/gradle/api/artifacts/maven/MavenPom.java   |  226 +++
 .../gradle/api/artifacts/maven/MavenResolver.java  |    0
 .../api/artifacts/maven/PomFilterContainer.java    |    0
 .../gradle/api/artifacts/maven/PublishFilter.java  |    0
 .../gradle/api/artifacts/maven/XmlProvider.java    |    0
 .../gradle/api/artifacts/maven/package-info.java   |    0
 .../org/gradle/api/artifacts/package-info.java     |    0
 .../api/artifacts/repositories/WebdavResolver.java |    0
 .../api/artifacts/repositories/package-info.java   |    0
 .../api/artifacts/specs/DependencySpecs.java       |    0
 .../org/gradle/api/artifacts/specs/Type.java       |   39 +
 .../gradle/api/artifacts/specs/package-info.java   |    0
 .../gradle/api/execution/TaskActionListener.java   |    0
 .../gradle/api/execution/TaskExecutionGraph.java   |    0
 .../api/execution/TaskExecutionGraphListener.java  |    0
 .../api/execution/TaskExecutionListener.java       |    0
 .../org/gradle/api/execution/package-info.java     |    0
 .../api/file/ConfigurableFileCollection.java       |    0
 .../org/gradle/api/file/ConfigurableFileTree.java  |    0
 .../org/gradle/api/file/ContentFilterable.java     |    0
 .../org/gradle/api/file/CopyProcessingSpec.java    |    0
 .../groovy/org/gradle/api/file/CopySourceSpec.java |    0
 .../main/groovy/org/gradle/api/file/CopySpec.java  |    0
 .../groovy/org/gradle/api/file/DeleteAction.java   |    0
 .../org/gradle/api/file/EmptyFileVisitor.java      |    0
 .../groovy/org/gradle/api/file/FileCollection.java |    0
 .../org/gradle/api/file/FileCopyDetails.java       |    0
 .../main/groovy/org/gradle/api/file/FileTree.java  |    0
 .../org/gradle/api/file/FileTreeElement.java       |    0
 .../org/gradle/api/file/FileVisitDetails.java      |    0
 .../groovy/org/gradle/api/file/FileVisitor.java    |    0
 .../groovy/org/gradle/api/file/RelativePath.java   |    0
 .../org/gradle/api/file/SourceDirectorySet.java    |    0
 .../groovy/org/gradle/api/file/package-info.java   |    0
 .../api/initialization/ProjectDescriptor.java      |    0
 .../org/gradle/api/initialization/Settings.java    |    0
 .../api/initialization/dsl/ScriptHandler.java      |    0
 .../api/initialization/dsl/package-info.java       |    0
 .../gradle/api/initialization/package-info.java    |    0
 .../api/internal/AbstractClassGenerator.java       |    0
 .../api/internal/AbstractClassPathProvider.java    |    0
 .../internal/AbstractDomainObjectCollection.java   |  163 +++
 .../gradle/api/internal/AbstractDynamicObject.java |    0
 .../org/gradle/api/internal/AbstractTask.java      |  456 ++++++
 .../api/internal/AsmBackedClassGenerator.java      |    0
 .../internal/AutoCreateDomainObjectContainer.java  |    0
 .../AutoCreateDomainObjectContainerDelegate.groovy |    0
 .../org/gradle/api/internal/BeanDynamicObject.java |    0
 .../api/internal/CachingDirectedGraphWalker.java   |    0
 .../gradle/api/internal/ChainingTransformer.java   |    0
 .../org/gradle/api/internal/ClassGenerator.java    |    0
 .../org/gradle/api/internal/ClassPathProvider.java |    0
 .../org/gradle/api/internal/ClassPathRegistry.java |    0
 .../api/internal/CompositeDynamicObject.java       |    0
 .../groovy/org/gradle/api/internal/Contextual.java |    0
 .../gradle/api/internal/ConventionAwareHelper.java |    0
 .../org/gradle/api/internal/ConventionMapping.java |    0
 .../org/gradle/api/internal/ConventionTask.java    |    0
 .../DefaultAutoCreateDomainObjectContainer.java    |   68 +
 .../api/internal/DefaultClassPathProvider.java     |    0
 .../api/internal/DefaultClassPathRegistry.java     |    0
 .../api/internal/DefaultDomainObjectContainer.java |    0
 .../DefaultNamedDomainObjectContainer.java         |    0
 .../org/gradle/api/internal/DirectedGraph.java     |    0
 .../api/internal/DirectedGraphWithEdgeValues.java  |    0
 .../gradle/api/internal/DomainObjectContext.java   |    0
 .../org/gradle/api/internal/DynamicObject.java     |    0
 .../gradle/api/internal/DynamicObjectAware.java    |    0
 .../gradle/api/internal/DynamicObjectHelper.java   |    0
 .../org/gradle/api/internal/ExceptionAnalyser.java |    0
 .../groovy/org/gradle/api/internal/Factory.java    |    0
 .../api/internal/GradleDistributionLocator.java    |    0
 .../org/gradle/api/internal/GradleInternal.java    |    0
 .../org/gradle/api/internal/GraphAggregator.java   |   90 ++
 ...GroovySourceGenerationBackedClassGenerator.java |    0
 .../org/gradle/api/internal/IConventionAware.java  |    0
 .../api/internal/MapBackedDynamicObject.java       |    0
 .../gradle/api/internal/NoConventionMapping.java   |    0
 .../org/gradle/api/internal/NoDynamicObject.java   |    0
 .../org/gradle/api/internal/SettingsInternal.java  |    0
 .../gradle/api/internal/TaskExecutionHistory.java  |    0
 .../org/gradle/api/internal/TaskInternal.java      |    0
 .../gradle/api/internal/TaskOutputsInternal.java   |    0
 .../org/gradle/api/internal/XmlTransformer.java    |  274 ++++
 .../api/internal/artifacts/ArtifactContainer.java  |    0
 .../artifacts/CachingDependencyResolveContext.java |   70 +
 .../artifacts/ConfigurationContainerFactory.java   |    0
 .../DefaultConfigurationContainerFactory.java      |    0
 .../api/internal/artifacts/DefaultExcludeRule.java |    0
 .../artifacts/DefaultExcludeRuleContainer.java     |    0
 .../api/internal/artifacts/DefaultModule.java      |    0
 .../artifacts/DefaultResolvedArtifact.java         |    0
 .../artifacts/DefaultResolvedDependency.java       |    0
 .../artifacts/DefaultResolverContainer.java        |    0
 .../api/internal/artifacts/DependencyInternal.java |    0
 .../artifacts/DependencyResolveContext.java        |    0
 .../gradle/api/internal/artifacts/IvyService.java  |    0
 .../ProjectDependenciesBuildInstruction.java       |   50 +
 .../artifacts/ResolvedConfigurationIdentifier.java |    0
 .../artifacts/configurations/Configurations.java   |    0
 .../configurations/ConfigurationsProvider.java     |    0
 .../configurations/DefaultConfiguration.java       |  535 +++++++
 .../DefaultConfigurationContainer.java             |    0
 .../configurations/DependencyMetaDataProvider.java |    0
 .../DetachedConfigurationsProvider.java            |    0
 .../artifacts/configurations/ResolverProvider.java |    0
 .../artifacts/dependencies/AbstractDependency.java |    0
 .../dependencies/AbstractExternalDependency.java   |    0
 .../dependencies/AbstractModuleDependency.java     |    0
 .../dependencies/DefaultClientModule.java          |    0
 .../dependencies/DefaultDependencyArtifact.java    |    0
 .../DefaultExternalModuleDependency.java           |    0
 .../dependencies/DefaultProjectDependency.java     |  165 +++
 .../DefaultSelfResolvingDependency.java            |    0
 .../artifacts/dsl/AbstractScriptTransformer.java   |    0
 .../dsl/BuildScriptClasspathScriptTransformer.java |    0
 .../artifacts/dsl/BuildScriptTransformer.java      |    0
 .../artifacts/dsl/ClasspathScriptTransformer.java  |    0
 .../artifacts/dsl/DefaultArtifactHandler.groovy    |    0
 .../dsl/DefaultPublishArtifactFactory.java         |    0
 .../artifacts/dsl/DefaultRepositoryHandler.java    |    0
 .../dsl/DefaultRepositoryHandlerFactory.java       |    0
 .../artifacts/dsl/FixMainScriptTransformer.java    |    0
 .../artifacts/dsl/PublishArtifactFactory.java      |    0
 .../SharedConventionRepositoryHandlerFactory.java  |    0
 .../dsl/TaskDefinitionScriptTransformer.java       |  194 +++
 .../dependencies/ClassPathDependencyFactory.java   |    0
 .../dependencies/DefaultClientModuleFactory.java   |    0
 .../dsl/dependencies/DefaultDependencyFactory.java |   83 ++
 .../dependencies/DefaultDependencyHandler.groovy   |    0
 .../DefaultProjectDependencyFactory.java           |    0
 .../dsl/dependencies/DependencyFactory.java        |    0
 .../IDependencyImplementationFactory.java          |    0
 .../dsl/dependencies/MapModuleNotationParser.java  |    0
 .../dsl/dependencies/ModuleDependencyFactory.java  |    0
 .../dependencies/ModuleDescriptorDelegate.groovy   |    0
 .../dsl/dependencies/ModuleFactoryHelper.java      |    0
 .../dependencies/ParsedModuleStringNotation.java   |    0
 .../dsl/dependencies/ProjectDependencyFactory.java |    0
 .../artifacts/dsl/dependencies/ProjectFinder.java  |    0
 .../SelfResolvingDependencyFactory.java            |    0
 .../artifacts/ivyservice/ClientModuleResolver.java |    0
 .../ivyservice/DefaultIvyConversionResult.java     |    0
 .../ivyservice/DefaultIvyDependencyPublisher.java  |    0
 .../ivyservice/DefaultIvyDependencyResolver.java   |    0
 .../artifacts/ivyservice/DefaultIvyFactory.java    |    0
 .../ivyservice/DefaultIvyReportConverter.java      |    0
 .../artifacts/ivyservice/DefaultIvyService.java    |    0
 .../ivyservice/DefaultPublishOptionsFactory.java   |    0
 .../ivyservice/DefaultResolverFactory.java         |    0
 .../ivyservice/DefaultSettingsConverter.java       |    0
 .../ivyservice/ErrorHandlingIvyService.java        |    0
 .../ivyservice/GradleIBiblioResolver.java          |    0
 .../artifacts/ivyservice/IvyConversionResult.java  |    0
 .../ivyservice/IvyDependencyPublisher.java         |    0
 .../ivyservice/IvyDependencyResolver.java          |    0
 .../internal/artifacts/ivyservice/IvyFactory.java  |    0
 .../artifacts/ivyservice/IvyLoggingAdaper.java     |    0
 .../artifacts/ivyservice/IvyReportConverter.java   |    0
 .../api/internal/artifacts/ivyservice/IvyUtil.java |    0
 .../ivyservice/LocalMavenCacheLocator.java         |    0
 .../ivyservice/ModuleDescriptorConverter.java      |    0
 .../ivyservice/PublishOptionsFactory.java          |    0
 .../artifacts/ivyservice/ResolverFactory.java      |    0
 .../SelfResolvingDependencyResolver.java           |    0
 .../artifacts/ivyservice/SettingsConverter.java    |    0
 .../ShortcircuitEmptyConfigsIvyService.java        |    0
 .../ivyservice/SnapshotVersionMatcher.java         |    0
 .../AbstractModuleDescriptorConverter.java         |    0
 .../ArtifactsExtraAttributesStrategy.java          |    0
 .../ArtifactsToModuleDescriptorConverter.java      |    0
 .../ConfigurationsToModuleDescriptorConverter.java |    0
 ...efaultArtifactsToModuleDescriptorConverter.java |    0
 ...tConfigurationsToModuleDescriptorConverter.java |    0
 .../DefaultExcludeRuleConverter.java               |    0
 .../DefaultModuleDescriptorFactory.java            |    0
 .../moduleconverter/ExcludeRuleConverter.java      |    0
 .../moduleconverter/ModuleDescriptorFactory.java   |    0
 .../PublishModuleDescriptorConverter.java          |    0
 .../ResolveModuleDescriptorConverter.java          |    0
 ...bstractDependencyDescriptorFactoryInternal.java |    0
 .../ClientModuleDependencyDescriptorFactory.java   |    0
 ...ultDependenciesToModuleDescriptorConverter.java |    0
 ...aultModuleDescriptorFactoryForClientModule.java |    0
 .../DependenciesToModuleDescriptorConverter.java   |    0
 .../dependencies/DependencyDescriptorFactory.java  |    0
 .../DependencyDescriptorFactoryDelegate.java       |    0
 .../DependencyDescriptorFactoryInternal.java       |    0
 .../ExternalModuleDependencyDescriptorFactory.java |    0
 .../ModuleDescriptorFactoryForClientModule.java    |    0
 .../ProjectDependencyDescriptorFactory.java        |    0
 .../ProjectDependencyDescriptorStrategy.java       |    0
 .../artifacts/publish/AbstractPublishArtifact.java |    0
 .../artifacts/publish/ArchivePublishArtifact.java  |    0
 .../publish/DefaultArtifactContainer.java          |    0
 .../artifacts/publish/DefaultPublishArtifact.java  |    0
 .../publish/maven/DefaultArtifactPomFactory.java   |    0
 .../artifacts/publish/maven/DefaultMavenPom.java   |  251 ++++
 .../publish/maven/DefaultMavenPomFactory.java      |    0
 .../publish/maven/MavenPomMetaInfoProvider.java    |    0
 .../DefaultConf2ScopeMappingContainer.java         |    0
 .../dependencies/DefaultExcludeRuleConverter.java  |    0
 .../DefaultPomDependenciesConverter.java           |    0
 .../maven/dependencies/ExcludeRuleConverter.java   |    0
 .../dependencies/PomDependenciesConverter.java     |    0
 .../maven/dependencies/PomDependenciesWriter.java  |    0
 .../maven/deploy/AbstractMavenResolver.java        |    0
 .../publish/maven/deploy/ArtifactPom.java          |    0
 .../publish/maven/deploy/ArtifactPomContainer.java |    0
 .../publish/maven/deploy/ArtifactPomFactory.java   |    0
 .../publish/maven/deploy/BaseMavenDeployer.java    |    0
 .../publish/maven/deploy/BaseMavenInstaller.java   |    0
 .../maven/deploy/BasePomFilterContainer.java       |    0
 .../publish/maven/deploy/ClassifierArtifact.java   |    0
 .../publish/maven/deploy/CustomDeployTask.java     |    0
 .../deploy/CustomInstallDeployTaskSupport.java     |    0
 .../publish/maven/deploy/CustomInstallTask.java    |    0
 .../publish/maven/deploy/DefaultArtifactPom.java   |  212 +++
 .../maven/deploy/DefaultArtifactPomContainer.java  |    0
 .../maven/deploy/DefaultDeployTaskFactory.java     |    0
 .../maven/deploy/DefaultInstallTaskFactory.java    |    0
 .../maven/deploy/DefaultMavenDeployment.java       |    0
 .../publish/maven/deploy/DefaultPomFilter.java     |    0
 .../publish/maven/deploy/LoggingHelper.java        |    0
 .../artifacts/publish/maven/deploy/PomFilter.java  |    0
 .../groovy/DefaultGroovyMavenDeployer.groovy       |    0
 .../maven/deploy/groovy/RepositoryBuilder.java     |    0
 .../maven/deploy/groovy/RepositoryFactory.java     |    0
 .../maven/pombuilder/CustomModelBuilder.java       |    0
 .../publish/maven/pombuilder/ModelFactory.java     |    0
 .../maven/pombuilder/PlexusLoggerAdapter.java      |    0
 .../repositories/DefaultInternalRepository.java    |    0
 .../artifacts/repositories/InternalRepository.java |    0
 .../artifacts/repositories/WebdavRepository.java   |    0
 .../internal/changedetection/CachingHasher.java    |    0
 .../changedetection/DefaultFileSnapshotter.java    |    0
 .../internal/changedetection/DefaultHasher.java    |    0
 .../DefaultTaskArtifactStateRepository.java        |    0
 .../changedetection/FileCollectionSnapshot.java    |    0
 .../internal/changedetection/FileSnapshotter.java  |    0
 .../api/internal/changedetection/Hasher.java       |    0
 .../changedetection/MapMergeChangeListener.java    |    0
 .../changedetection/OutputFilesSnapshotter.java    |    0
 .../ShortCircuitTaskArtifactStateRepository.java   |    0
 .../changedetection/TaskArtifactState.java         |    0
 .../TaskArtifactStateRepository.java               |    0
 .../api/internal/file/AbstractFileCollection.java  |  225 +++
 .../api/internal/file/AbstractFileResolver.java    |    0
 .../gradle/api/internal/file/AbstractFileTree.java |    0
 .../api/internal/file/AbstractFileTreeElement.java |    0
 .../internal/file/AntFileCollectionBuilder.groovy  |    0
 .../AntFileCollectionMatchingTaskBuilder.groovy    |    0
 .../api/internal/file/AntFileTreeBuilder.groovy    |    0
 .../gradle/api/internal/file/BaseDirConverter.java |    0
 .../api/internal/file/CompositeFileCollection.java |    0
 .../api/internal/file/CompositeFileTree.java       |    0
 .../internal/file/DefaultConfigurableFileTree.java |    0
 .../api/internal/file/DefaultDirectoryWalker.java  |    0
 .../api/internal/file/DefaultFileOperations.java   |    0
 .../api/internal/file/DefaultFileTreeElement.java  |    0
 .../internal/file/DefaultSourceDirectorySet.java   |    0
 .../file/DefaultTemporaryFileProvider.java         |    0
 .../gradle/api/internal/file/DirectoryWalker.java  |    0
 .../gradle/api/internal/file/FileOperations.java   |    0
 .../org/gradle/api/internal/file/FileResolver.java |    0
 .../gradle/api/internal/file/FileSetHelper.groovy  |    0
 .../org/gradle/api/internal/file/FileSource.java   |    0
 .../api/internal/file/IdentityFileResolver.java    |    0
 .../org/gradle/api/internal/file/MapFileTree.java  |    0
 .../internal/file/PathResolvingFileCollection.java |    0
 .../gradle/api/internal/file/RelativePathSpec.java |    0
 .../api/internal/file/SimpleFileCollection.java    |    0
 .../api/internal/file/SingletonFileCollection.java |    0
 .../api/internal/file/SingletonFileTree.java       |   70 +
 .../api/internal/file/TemporaryFileProvider.java   |    0
 .../api/internal/file/UnionFileCollection.java     |    0
 .../gradle/api/internal/file/UnionFileTree.java    |    0
 .../api/internal/file/ant/AntFileResource.java     |    0
 .../api/internal/file/ant/BaseDirSelector.java     |    0
 .../api/internal/file/archive/TarCopyAction.java   |    0
 .../internal/file/archive/TarCopySpecVisitor.java  |    0
 .../api/internal/file/archive/TarFileTree.java     |    0
 .../internal/file/archive/ZipCopySpecVisitor.java  |    0
 .../api/internal/file/archive/ZipFileTree.java     |    0
 .../api/internal/file/copy/ArchiveCopyAction.java  |    0
 .../gradle/api/internal/file/copy/CopyAction.java  |    0
 .../api/internal/file/copy/CopyActionImpl.java     |    0
 .../api/internal/file/copy/CopySpecImpl.java       |    0
 .../api/internal/file/copy/CopySpecSource.java     |    0
 .../api/internal/file/copy/CopySpecVisitor.java    |    0
 .../file/copy/DelegatingCopySpecVisitor.java       |    0
 .../api/internal/file/copy/DeleteActionImpl.java   |    0
 .../internal/file/copy/EmptyCopySpecVisitor.java   |    0
 .../api/internal/file/copy/FileCopyAction.java     |    0
 .../api/internal/file/copy/FileCopyActionImpl.java |    0
 .../internal/file/copy/FileCopySpecVisitor.java    |    0
 .../gradle/api/internal/file/copy/FilterChain.java |    0
 .../gradle/api/internal/file/copy/LineFilter.java  |  109 ++
 .../internal/file/copy/MappingCopySpecVisitor.java |  186 +++
 .../file/copy/NormalizingCopySpecVisitor.java      |    0
 .../api/internal/file/copy/ReadableCopySpec.java   |    0
 .../api/internal/file/copy/RegExpNameMapper.java   |    0
 .../api/internal/file/copy/RenamingCopyAction.java |    0
 .../internal/file/copy/SyncCopySpecVisitor.java    |    0
 .../file/pattern/DefaultPatternMatcher.java        |    0
 .../internal/file/pattern/GreedyPatternStep.java   |    0
 .../file/pattern/NameOnlyPatternMatcher.java       |    0
 .../file/pattern/PatternMatcherFactory.java        |   49 +
 .../api/internal/file/pattern/PatternStep.java     |    0
 .../internal/file/pattern/PatternStepFactory.java  |    0
 .../internal/file/pattern/RegExpPatternStep.java   |    0
 .../initialization/AbstractScriptHandler.java      |    0
 .../initialization/DefaultScriptHandler.java       |    0
 .../DefaultScriptHandlerFactory.java               |    0
 .../NoClassLoaderUpdateScriptHandler.java          |    0
 .../initialization/ScriptClassLoaderProvider.java  |    0
 .../initialization/ScriptHandlerFactory.java       |    0
 .../initialization/ScriptHandlerInternal.java      |    0
 .../api/internal/plugins/AbstractConvention.java   |    0
 .../api/internal/plugins/DefaultConvention.groovy  |    0
 .../plugins/DefaultObjectConfigurationAction.java  |    0
 .../internal/plugins/DefaultPluginCollection.java  |   67 +
 .../internal/plugins/DefaultPluginRegistry.java    |    0
 .../plugins/DefaultProjectsPluginContainer.java    |    0
 .../internal/plugins/EmbeddableJavaProject.java    |    0
 .../org/gradle/api/internal/plugins/IdePlugin.java |    0
 .../api/internal/plugins/PluginRegistry.java       |    0
 .../api/internal/project/AbstractProject.java      |  976 +++++++++++++
 .../api/internal/project/DefaultAntBuilder.groovy  |    0
 .../internal/project/DefaultAntBuilderFactory.java |    0
 .../project/DefaultIsolatedAntBuilder.groovy       |    0
 .../api/internal/project/DefaultProject.java       |    0
 .../internal/project/DefaultProjectRegistry.java   |    0
 .../internal/project/DefaultServiceRegistry.java   |    0
 .../internal/project/GlobalServicesRegistry.java   |    0
 .../project/GradleInternalServiceRegistry.java     |    0
 .../api/internal/project/IProjectFactory.java      |    0
 .../api/internal/project/IProjectRegistry.java     |    0
 .../api/internal/project/IsolatedAntBuilder.java   |    0
 .../api/internal/project/ProjectFactory.java       |    0
 .../api/internal/project/ProjectIdentifier.java    |    0
 .../api/internal/project/ProjectInternal.java      |    0
 .../project/ProjectInternalServiceRegistry.java    |    0
 .../api/internal/project/ProjectScript.groovy      |    0
 .../api/internal/project/ProjectStateInternal.java |    0
 .../api/internal/project/ServiceRegistry.java      |    0
 .../internal/project/ServiceRegistryFactory.java   |    0
 .../project/TaskInternalServiceRegistry.java       |    0
 .../project/TopLevelBuildServiceRegistry.java      |    0
 .../internal/project/ant/AntLoggingAdapter.java    |    0
 .../api/internal/project/ant/BasicAntBuilder.java  |    0
 .../AnnotationProcessingTaskFactory.java           |    0
 .../taskfactory/DependencyAutoWireTaskFactory.java |    0
 .../ExecutionShortCircuitTaskExecuter.java         |    0
 .../internal/project/taskfactory/ITaskFactory.java |    0
 .../InputDirectoryPropertyAnnotationHandler.java   |    0
 .../InputFilePropertyAnnotationHandler.java        |    0
 .../InputFilesPropertyAnnotationHandler.java       |    0
 .../InputPropertyAnnotationHandler.java            |    0
 .../NestedBeanPropertyAnnotationHandler.java       |    0
 .../OutputDirectoryPropertyAnnotationHandler.java  |    0
 .../OutputFilePropertyAnnotationHandler.java       |    0
 .../PostExecutionAnalysisTaskExecuter.java         |   48 +
 .../project/taskfactory/PropertyActionContext.java |    0
 .../taskfactory/PropertyAnnotationHandler.java     |    0
 .../internal/project/taskfactory/TaskFactory.java  |    0
 .../internal/project/taskfactory/UpdateAction.java |    0
 .../project/taskfactory/ValidationAction.java      |    0
 .../api/internal/resource/CachingResource.java     |    0
 .../api/internal/resource/DelegatingResource.java  |    0
 .../org/gradle/api/internal/resource/Resource.java |    0
 .../api/internal/resource/ResourceException.java   |    0
 .../resource/ResourceNotFoundException.java        |    0
 .../api/internal/resource/StringResource.java      |    0
 .../gradle/api/internal/resource/UriResource.java  |   89 ++
 .../api/internal/tasks/AbstractTaskDependency.java |    0
 .../tasks/CachingTaskDependencyResolveContext.java |    0
 .../api/internal/tasks/CommandLineOption.java      |    0
 .../api/internal/tasks/DefaultTaskCollection.java  |   83 ++
 .../api/internal/tasks/DefaultTaskContainer.java   |    0
 .../tasks/DefaultTaskContainerFactory.java         |    0
 .../api/internal/tasks/DefaultTaskDependency.java  |    0
 .../api/internal/tasks/DefaultTaskExecuter.java    |    0
 .../api/internal/tasks/DefaultTaskInputs.java      |    0
 .../api/internal/tasks/DefaultTaskOutputs.java     |    0
 .../tasks/ExecuteAtMostOnceTaskExecuter.java       |    0
 .../api/internal/tasks/SkipTaskExecuter.java       |    0
 .../api/internal/tasks/TaskContainerInternal.java  |    0
 .../api/internal/tasks/TaskDependencyInternal.java |    0
 .../tasks/TaskDependencyResolveContext.java        |    0
 .../gradle/api/internal/tasks/TaskExecuter.java    |    0
 .../gradle/api/internal/tasks/TaskResolver.java    |    0
 .../api/internal/tasks/TaskStateInternal.java      |    0
 .../AbstractPersistableConfigurationObject.java    |    0
 .../api/internal/tasks/generator/Generator.java    |    0
 .../generator/PersistableConfigurationObject.java  |    0
 .../PersistableConfigurationObjectGenerator.java   |    0
 .../PropertiesPersistableConfigurationObject.java  |    0
 .../XmlPersistableConfigurationObject.java         |   60 +
 .../groovy/org/gradle/api/invocation/Gradle.java   |  218 +++
 .../org/gradle/api/invocation/package-info.java    |    0
 .../groovy/org/gradle/api/logging/LogLevel.java    |    0
 .../main/groovy/org/gradle/api/logging/Logger.java |    0
 .../groovy/org/gradle/api/logging/Logging.java     |    0
 .../org/gradle/api/logging/LoggingManager.java     |    0
 .../org/gradle/api/logging/LoggingOutput.java      |    0
 .../gradle/api/logging/StandardOutputListener.java |    0
 .../org/gradle/api/logging/package-info.java       |    0
 .../main/groovy/org/gradle/api/package-info.java   |    0
 .../groovy/org/gradle/api/plugins/Convention.java  |    0
 .../api/plugins/ObjectConfigurationAction.java     |    0
 .../org/gradle/api/plugins/PluginCollection.java   |   82 ++
 .../org/gradle/api/plugins/PluginContainer.java    |    0
 .../api/plugins/PluginInstantiationException.java  |    0
 .../gradle/api/plugins/UnknownPluginException.java |    0
 .../org/gradle/api/plugins/package-info.java       |    0
 .../main/groovy/org/gradle/api/specs/AndSpec.java  |    0
 .../groovy/org/gradle/api/specs/CompositeSpec.java |    0
 .../main/groovy/org/gradle/api/specs/NotSpec.java  |    0
 .../main/groovy/org/gradle/api/specs/OrSpec.java   |    0
 .../src/main/groovy/org/gradle/api/specs/Spec.java |    0
 .../main/groovy/org/gradle/api/specs/Specs.java    |    0
 .../groovy/org/gradle/api/specs/package-info.java  |    0
 .../org/gradle/api/tasks/AbstractCopyTask.java     |    0
 .../org/gradle/api/tasks/AntBuilderAware.groovy    |    0
 .../org/gradle/api/tasks/ConventionValue.java      |    0
 .../src/main/groovy/org/gradle/api/tasks/Copy.java |    0
 .../main/groovy/org/gradle/api/tasks/Delete.java   |    0
 .../groovy/org/gradle/api/tasks/Directory.groovy   |    0
 .../src/main/groovy/org/gradle/api/tasks/Exec.java |    0
 .../groovy/org/gradle/api/tasks/GeneratorTask.java |    0
 .../groovy/org/gradle/api/tasks/GradleBuild.java   |    0
 .../main/groovy/org/gradle/api/tasks/Input.java    |    0
 .../org/gradle/api/tasks/InputDirectory.java       |    0
 .../groovy/org/gradle/api/tasks/InputFile.java     |    0
 .../groovy/org/gradle/api/tasks/InputFiles.java    |    0
 .../main/groovy/org/gradle/api/tasks/JavaExec.java |    0
 .../main/groovy/org/gradle/api/tasks/Nested.java   |    0
 .../main/groovy/org/gradle/api/tasks/Optional.java |    0
 .../org/gradle/api/tasks/OutputDirectory.java      |    0
 .../groovy/org/gradle/api/tasks/OutputFile.java    |    0
 .../groovy/org/gradle/api/tasks/SkipWhenEmpty.java |    0
 .../groovy/org/gradle/api/tasks/SourceTask.java    |    0
 .../org/gradle/api/tasks/StopActionException.java  |    0
 .../gradle/api/tasks/StopExecutionException.java   |    0
 .../src/main/groovy/org/gradle/api/tasks/Sync.java |    0
 .../groovy/org/gradle/api/tasks/TaskAction.java    |    0
 .../org/gradle/api/tasks/TaskCollection.java       |   94 ++
 .../groovy/org/gradle/api/tasks/TaskContainer.java |    0
 .../org/gradle/api/tasks/TaskDependency.java       |    0
 .../gradle/api/tasks/TaskExecutionException.java   |    0
 .../groovy/org/gradle/api/tasks/TaskInputs.java    |    0
 .../api/tasks/TaskInstantiationException.java      |    0
 .../groovy/org/gradle/api/tasks/TaskOutputs.java   |    0
 .../groovy/org/gradle/api/tasks/TaskState.java     |    0
 .../main/groovy/org/gradle/api/tasks/Upload.java   |    0
 .../org/gradle/api/tasks/VerificationTask.java     |    0
 .../groovy/org/gradle/api/tasks/WorkResult.java    |    0
 .../org/gradle/api/tasks/XmlGeneratorTask.java     |    0
 .../groovy/org/gradle/api/tasks/ant/AntTarget.java |    0
 .../org/gradle/api/tasks/ant/package-info.java     |    0
 .../api/tasks/bundling/AbstractArchiveTask.java    |    0
 .../org/gradle/api/tasks/bundling/Compression.java |    0
 .../groovy/org/gradle/api/tasks/bundling/Tar.java  |    0
 .../groovy/org/gradle/api/tasks/bundling/Zip.java  |    0
 .../gradle/api/tasks/bundling/package-info.java    |    0
 .../api/tasks/diagnostics/AbstractReportTask.java  |    0
 .../tasks/diagnostics/DependencyReportTask.java    |    0
 .../api/tasks/diagnostics/ProjectReportTask.java   |    0
 .../api/tasks/diagnostics/PropertyReportTask.java  |    0
 .../api/tasks/diagnostics/TaskReportTask.java      |    0
 .../AggregateMultiProjectTaskReportModel.java      |    0
 .../diagnostics/internal/AsciiReportRenderer.java  |    0
 .../internal/DefaultGroupTaskReportModel.java      |    0
 .../internal/DependencyReportRenderer.java         |    0
 .../tasks/diagnostics/internal/GraphRenderer.java  |    0
 .../internal/GraphvizReportRenderer.java           |    0
 .../internal/PropertyReportRenderer.java           |    0
 .../tasks/diagnostics/internal/ReportRenderer.java |    0
 .../internal/SingleProjectTaskReportModel.java     |    0
 .../tasks/diagnostics/internal/TaskDetails.java    |    0
 .../diagnostics/internal/TaskDetailsFactory.java   |    0
 .../diagnostics/internal/TaskReportModel.java      |    0
 .../diagnostics/internal/TaskReportRenderer.java   |    0
 .../diagnostics/internal/TextReportRenderer.java   |    0
 .../gradle/api/tasks/diagnostics/package-info.java |    0
 .../groovy/org/gradle/api/tasks/package-info.java  |    0
 .../gradle/api/tasks/util/PatternFilterable.java   |    0
 .../org/gradle/api/tasks/util/PatternSet.groovy    |    0
 .../org/gradle/api/tasks/util/package-info.java    |    0
 .../org/gradle/cache/AutoCloseCacheFactory.java    |   91 ++
 .../main/groovy/org/gradle/cache/CacheBuilder.java |    0
 .../main/groovy/org/gradle/cache/CacheFactory.java |    0
 .../groovy/org/gradle/cache/CacheRepository.java   |    0
 .../org/gradle/cache/DefaultCacheFactory.java      |    0
 .../org/gradle/cache/DefaultCacheRepository.java   |    0
 .../cache/DefaultPersistentDirectoryCache.java     |  117 ++
 .../groovy/org/gradle/cache/DefaultSerializer.java |    0
 .../groovy/org/gradle/cache/PersistentCache.java   |    0
 .../org/gradle/cache/PersistentIndexedCache.java   |    0
 .../org/gradle/cache/PersistentStateCache.java     |    0
 .../main/groovy/org/gradle/cache/Serializer.java   |    0
 .../groovy/org/gradle/cache/SimpleStateCache.java  |    0
 .../cache/btree/BTreePersistentIndexedCache.java   |    0
 .../main/groovy/org/gradle/cache/btree/Block.java  |    0
 .../org/gradle/cache/btree/BlockPayload.java       |    0
 .../org/gradle/cache/btree/BlockPointer.java       |    0
 .../groovy/org/gradle/cache/btree/BlockStore.java  |    0
 .../org/gradle/cache/btree/CachingBlockStore.java  |    0
 .../cache/btree/CorruptedCacheException.java       |    0
 .../gradle/cache/btree/FileBackedBlockStore.java   |    0
 .../org/gradle/cache/btree/FreeListBlockStore.java |    0
 .../gradle/cache/btree/StateCheckBlockStore.java   |    0
 .../org/gradle/configuration/BuildConfigurer.java  |    0
 .../gradle/configuration/BuildScriptProcessor.java |    0
 .../configuration/DefaultBuildConfigurer.java      |    0
 .../configuration/DefaultInitScriptProcessor.java  |    0
 .../configuration/DefaultProjectEvaluator.java     |    0
 .../configuration/DefaultScriptPluginFactory.java  |    0
 .../configuration/GradleLauncherMetaData.java      |    0
 .../main/groovy/org/gradle/configuration/Help.java |    0
 .../configuration/ImplicitTasksConfigurer.java     |    0
 .../org/gradle/configuration/ImportsReader.groovy  |    0
 .../gradle/configuration/ImportsScriptSource.java  |    0
 .../gradle/configuration/InitScriptProcessor.java  |    0
 .../ProjectDependencies2TaskResolver.java          |    0
 .../configuration/ProjectEvaluationConfigurer.java |    0
 .../org/gradle/configuration/ProjectEvaluator.java |    0
 .../org/gradle/configuration/ScriptPlugin.java     |    0
 .../gradle/configuration/ScriptPluginFactory.java  |    0
 .../groovy/org/gradle/execution/BuildExecuter.java |    0
 .../org/gradle/execution/DefaultBuildExecuter.java |    0
 .../gradle/execution/DefaultTaskGraphExecuter.java |    0
 .../gradle/execution/DelegatingBuildExecuter.java  |    0
 .../org/gradle/execution/DryRunBuildExecuter.java  |    0
 .../execution/ProjectDefaultsBuildExecuter.java    |    0
 .../org/gradle/execution/TaskGraphExecuter.java    |    0
 .../org/gradle/execution/TaskNameResolver.java     |    0
 .../execution/TaskNameResolvingBuildExecuter.java  |    0
 .../gradle/execution/TaskSelectionException.java   |    0
 .../groovy/org/gradle/execution/TaskSelector.java  |  117 ++
 .../scripts/AsmBackedEmptyScriptGenerator.java     |    0
 .../org/gradle/groovy/scripts/BasicScript.groovy   |    0
 .../scripts/CachingScriptCompilationHandler.java   |    0
 .../gradle/groovy/scripts/CachingScriptSource.java |    0
 .../org/gradle/groovy/scripts/DefaultScript.groovy |    0
 .../scripts/DefaultScriptCompilationHandler.java   |    0
 .../scripts/DefaultScriptCompilerFactory.java      |    0
 .../groovy/scripts/DefaultScriptRunnerFactory.java |    0
 .../groovy/scripts/DelegatingScriptSource.java     |    0
 .../groovy/org/gradle/groovy/scripts/Script.java   |    0
 .../org/gradle/groovy/scripts/ScriptAware.java     |    0
 .../groovy/scripts/ScriptCompilationHandler.java   |    0
 .../org/gradle/groovy/scripts/ScriptCompiler.java  |    0
 .../groovy/scripts/ScriptCompilerFactory.java      |    0
 .../groovy/scripts/ScriptExecutionListener.java    |    0
 .../org/gradle/groovy/scripts/ScriptMetaData.java  |    0
 .../org/gradle/groovy/scripts/ScriptRunner.java    |    0
 .../gradle/groovy/scripts/ScriptRunnerFactory.java |    0
 .../org/gradle/groovy/scripts/ScriptSource.java    |    0
 .../gradle/groovy/scripts/StringScriptSource.java  |    0
 .../org/gradle/groovy/scripts/Transformer.java     |    0
 .../org/gradle/groovy/scripts/UriScriptSource.java |    0
 .../AbstractCommandLineConverter.java              |    0
 .../gradle/initialization/AbstractProjectSpec.java |    0
 ...AbstractSettingsFileSearchStrategyTemplate.java |    0
 .../org/gradle/initialization/BaseSettings.java    |    0
 .../gradle/initialization/BuildClientMetaData.java |    0
 .../initialization/BuildFileProjectSpec.java       |    0
 .../org/gradle/initialization/BuildLoader.java     |    0
 .../gradle/initialization/BuildProgressLogger.java |    0
 .../initialization/BuildRequestMetaData.java       |    0
 .../gradle/initialization/BuildSourceBuilder.java  |  139 ++
 .../gradle/initialization/ClassLoaderFactory.java  |    0
 .../initialization/CommandLineConverter.java       |    0
 .../gradle/initialization/CommandLineOption.java   |    0
 .../gradle/initialization/CommandLineParser.java   |    0
 .../DefaultBuildRequestMetaData.java               |    0
 .../initialization/DefaultClassLoaderFactory.java  |    0
 .../DefaultCommandLineConverter.java               |  238 ++++
 .../initialization/DefaultExceptionAnalyser.java   |    0
 .../initialization/DefaultGradleLauncher.java      |    0
 .../DefaultGradleLauncherFactory.java              |  166 +++
 .../DefaultGradlePropertiesLoader.java             |  120 ++
 .../initialization/DefaultInitScriptFinder.java    |   40 +
 .../initialization/DefaultProjectDescriptor.java   |    0
 .../DefaultProjectDescriptorRegistry.java          |    0
 .../gradle/initialization/DefaultProjectSpec.java  |    0
 .../gradle/initialization/DefaultSettings.groovy   |    0
 .../initialization/DefaultSettingsFinder.java      |    0
 .../EmbeddedScriptSettingsFinder.java              |    0
 .../ExceptionDecoratingClassGenerator.java         |    0
 .../initialization/GradleLauncherFactory.java      |    0
 .../initialization/IGradlePropertiesLoader.java    |    0
 .../initialization/IProjectDescriptorRegistry.java |    0
 .../ISettingsFileSearchStrategy.java               |    0
 .../org/gradle/initialization/ISettingsFinder.java |    0
 .../org/gradle/initialization/InitScript.groovy    |    0
 .../gradle/initialization/InitScriptFinder.java    |   28 +
 .../gradle/initialization/InitScriptHandler.java   |   43 +
 .../MasterDirSettingsFinderStrategy.java           |    0
 .../gradle/initialization/NestedBuildTracker.java  |    0
 .../ParentDirSettingsFinderStrategy.java           |    0
 .../gradle/initialization/ParsedCommandLine.java   |    0
 .../initialization/ParsedCommandLineOption.java    |    0
 .../ProjectDirectoryProjectSpec.java               |    0
 .../org/gradle/initialization/ProjectSpec.java     |    0
 .../PropertiesLoadingSettingsProcessor.java        |    0
 .../SameLevelDirSettingsFinderStrategy.java        |    0
 .../ScriptEvaluatingSettingsProcessor.java         |    0
 .../org/gradle/initialization/SettingsFactory.java |    0
 .../org/gradle/initialization/SettingsHandler.java |    0
 .../gradle/initialization/SettingsLocation.java    |   39 +
 .../gradle/initialization/SettingsProcessor.java   |    0
 .../gradle/initialization/SettingsScript.groovy    |    0
 .../initialization/UserHomeInitScriptFinder.java   |   46 +
 .../org/gradle/invocation/DefaultGradle.java       |  184 +++
 .../org/gradle/listener/ActionBroadcast.java       |    0
 .../gradle/listener/AsyncListenerBroadcast.java    |    0
 .../gradle/listener/ContextClassLoaderProxy.java   |    0
 .../gradle/listener/DefaultListenerManager.java    |    0
 .../org/gradle/listener/ListenerBroadcast.java     |    0
 .../org/gradle/listener/ListenerManager.java       |    0
 .../listener/ListenerNotificationException.java    |    0
 .../org/gradle/logging/LoggingConfiguration.java   |    0
 .../org/gradle/logging/LoggingManagerInternal.java |    0
 .../org/gradle/logging/LoggingServiceRegistry.java |    0
 .../groovy/org/gradle/logging/ProgressLogger.java  |    0
 .../org/gradle/logging/ProgressLoggerFactory.java  |    0
 .../org/gradle/logging/StandardOutputCapture.java  |    0
 .../gradle/logging/StandardOutputRedirector.java   |    0
 .../org/gradle/logging/StyledTextOutput.java       |    0
 .../gradle/logging/StyledTextOutputFactory.java    |    0
 .../logging/internal/AbstractStyledTextOutput.java |    0
 .../internal/AbstractStyledTextOutputFactory.java  |    0
 .../org/gradle/logging/internal/AnsiConsole.java   |    0
 .../logging/internal/CategorisedOutputEvent.java   |    0
 .../org/gradle/logging/internal/ColorMap.java      |    0
 .../org/gradle/logging/internal/Console.java       |    0
 .../internal/ConsoleBackedProgressRenderer.java    |    0
 .../gradle/logging/internal/DefaultColorMap.java   |    0
 .../logging/internal/DefaultLoggingConfigurer.java |    0
 .../logging/internal/DefaultLoggingManager.java    |    0
 .../internal/DefaultLoggingManagerFactory.java     |    0
 .../internal/DefaultProgressLoggerFactory.java     |    0
 .../internal/DefaultStandardOutputRedirector.java  |    0
 .../internal/DefaultStyledTextOutputFactory.java   |    0
 .../internal/JavaUtilLoggingConfigurer.java        |    0
 .../groovy/org/gradle/logging/internal/Label.java  |    0
 .../org/gradle/logging/internal/LogEvent.java      |    0
 .../logging/internal/LogLevelChangeEvent.java      |    0
 .../internal/LoggingBackedStyledTextOutput.java    |    0
 .../internal/LoggingCommandLineConverter.java      |    0
 .../gradle/logging/internal/LoggingConfigurer.java |    0
 .../logging/internal/LoggingOutputInternal.java    |    0
 .../org/gradle/logging/internal/LoggingSystem.java |    0
 .../logging/internal/LoggingSystemAdapter.java     |    0
 .../org/gradle/logging/internal/MarkerFilter.java  |    0
 .../org/gradle/logging/internal/OutputEvent.java   |    0
 .../logging/internal/OutputEventListener.java      |    0
 .../logging/internal/OutputEventRenderer.java      |    0
 .../logging/internal/PrintStreamLoggingSystem.java |    0
 .../logging/internal/ProgressCompleteEvent.java    |    0
 .../org/gradle/logging/internal/ProgressEvent.java |    0
 .../gradle/logging/internal/ProgressListener.java  |    0
 .../internal/ProgressLogEventGenerator.java        |    0
 .../logging/internal/ProgressLoggingBridge.java    |    0
 .../logging/internal/ProgressStartEvent.java       |    0
 .../logging/internal/RenderableOutputEvent.java    |    0
 .../logging/internal/Slf4jLoggingConfigurer.java   |    0
 .../logging/internal/StdErrLoggingSystem.java      |    0
 .../logging/internal/StdOutLoggingSystem.java      |    0
 .../internal/StreamingStyledTextOutput.java        |    0
 .../internal/StreamingStyledTextOutputFactory.java |    0
 .../internal/StyledTextOutputBackedRenderer.java   |    0
 .../logging/internal/StyledTextOutputEvent.java    |    0
 .../gradle/logging/internal/TerminalDetector.java  |    0
 .../org/gradle/logging/internal/TextArea.java      |    0
 .../internal/TextStreamOutputEventListener.java    |    0
 .../groovy/org/gradle/messaging/actor/Actor.java   |    0
 .../org/gradle/messaging/actor/ActorFactory.java   |    0
 .../actor/internal/DefaultActorFactory.java        |    0
 .../messaging/concurrent/AsyncStoppable.java       |    0
 .../messaging/concurrent/CompositeStoppable.java   |    0
 .../concurrent/DefaultExecutorFactory.java         |    0
 .../messaging/concurrent/ExecutorFactory.java      |   27 +
 .../org/gradle/messaging/concurrent/Stoppable.java |    0
 .../messaging/concurrent/StoppableExecutor.java    |    0
 .../org/gradle/messaging/dispatch/Addressable.java |    0
 .../gradle/messaging/dispatch/AsyncDispatch.java   |  187 +++
 .../gradle/messaging/dispatch/AsyncReceive.java    |    0
 .../messaging/dispatch/BroadcastDispatch.java      |    0
 .../dispatch/ContextClassLoaderDispatch.java       |   37 +
 .../dispatch/DiscardOnFailureDispatch.java         |    0
 .../org/gradle/messaging/dispatch/Dispatch.java    |    0
 .../messaging/dispatch/DispatchException.java      |    0
 .../dispatch/ExceptionTrackingDispatch.java        |    0
 .../dispatch/ExceptionTrackingListener.java        |    0
 .../messaging/dispatch/MethodInvocation.java       |    0
 .../messaging/dispatch/ProxyDispatchAdapter.java   |    0
 .../org/gradle/messaging/dispatch/Receive.java     |    0
 .../messaging/dispatch/ReflectionDispatch.java     |   42 +
 .../messaging/dispatch/StoppableDispatch.java      |    0
 .../messaging/dispatch/ThreadSafeDispatch.java     |    0
 .../org/gradle/messaging/remote/ConnectEvent.java  |    0
 .../gradle/messaging/remote/MessagingClient.java   |    0
 .../gradle/messaging/remote/MessagingServer.java   |    0
 .../gradle/messaging/remote/ObjectConnection.java  |    0
 .../messaging/remote/internal/ChannelMessage.java  |    0
 .../ChannelMessageMarshallingDispatch.java         |    0
 .../ChannelMessageUnmarshallingDispatch.java       |    0
 .../messaging/remote/internal/ChannelMetaInfo.java |    0
 .../remote/internal/ConnectException.java          |    0
 .../messaging/remote/internal/ConnectRequest.java  |    0
 .../messaging/remote/internal/Connection.java      |    0
 .../remote/internal/DefaultMessagingClient.java    |    0
 .../remote/internal/DefaultMessagingServer.java    |    0
 .../internal/DefaultMultiChannelConnection.java    |    0
 .../internal/DefaultMultiChannelConnector.java     |    0
 .../remote/internal/DefaultObjectConnection.java   |    0
 .../remote/internal/EndOfStreamDispatch.java       |    0
 .../remote/internal/EndOfStreamEvent.java          |    0
 .../remote/internal/EndOfStreamFilter.java         |    0
 .../remote/internal/EndOfStreamReceive.java        |    0
 .../internal/HandshakeIncomingConnector.java       |    0
 .../internal/HandshakeOutgoingConnector.java       |    0
 .../remote/internal/IncomingConnector.java         |    0
 .../internal/IncomingMethodInvocationHandler.java  |    0
 .../gradle/messaging/remote/internal/Message.java  |    0
 .../MethodInvocationMarshallingDispatch.java       |    0
 .../MethodInvocationUnmarshallingDispatch.java     |    0
 .../messaging/remote/internal/MethodMetaInfo.java  |    0
 .../remote/internal/MultiChannelConnection.java    |    0
 .../remote/internal/MultiChannelConnector.java     |    0
 .../remote/internal/OutgoingConnector.java         |    0
 .../internal/OutgoingMethodInvocationHandler.java  |    0
 .../remote/internal/PlaceholderException.java      |    0
 .../remote/internal/RemoteMethodInvocation.java    |    0
 .../remote/internal/SocketConnection.java          |    0
 .../remote/internal/TcpIncomingConnector.java      |    0
 .../remote/internal/TcpMessagingClient.java        |    0
 .../remote/internal/TcpMessagingServer.java        |    0
 .../remote/internal/TcpOutgoingConnector.java      |    0
 .../src/main/groovy/org/gradle/package-info.java   |    0
 .../groovy/org/gradle/process/BaseExecSpec.java    |    0
 .../main/groovy/org/gradle/process/ExecResult.java |    0
 .../main/groovy/org/gradle/process/ExecSpec.java   |    0
 .../groovy/org/gradle/process/JavaExecSpec.java    |    0
 .../groovy/org/gradle/process/JavaForkOptions.java |    0
 .../org/gradle/process/ProcessForkOptions.java     |    0
 .../internal/AbstractExecHandleBuilder.java        |    0
 .../process/internal/BadExitCodeException.java     |    0
 .../gradle/process/internal/DefaultExecAction.java |    0
 .../gradle/process/internal/DefaultExecHandle.java |    0
 .../process/internal/DefaultJavaExecAction.java    |    0
 .../process/internal/DefaultJavaForkOptions.java   |  228 +++
 .../internal/DefaultProcessForkOptions.java        |  101 ++
 .../process/internal/DefaultWorkerProcess.java     |    0
 .../internal/DefaultWorkerProcessFactory.java      |    0
 .../org/gradle/process/internal/ExecAction.java    |    0
 .../org/gradle/process/internal/ExecException.java |    0
 .../org/gradle/process/internal/ExecHandle.java    |    0
 .../gradle/process/internal/ExecHandleBuilder.java |    0
 .../process/internal/ExecHandleListener.java       |    0
 .../gradle/process/internal/ExecHandleRunner.java  |    0
 .../internal/ExecHandleShutdownHookAction.java     |   46 +
 .../gradle/process/internal/ExecHandleState.java   |    0
 .../process/internal/ExecOutputHandleRunner.java   |    0
 .../gradle/process/internal/JavaExecAction.java    |    0
 .../process/internal/JavaExecHandleBuilder.java    |    0
 .../process/internal/ProcessBuilderFactory.java    |    0
 .../org/gradle/process/internal/WorkerProcess.java |    0
 .../process/internal/WorkerProcessBuilder.java     |    0
 .../process/internal/WorkerProcessContext.java     |    0
 .../internal/child/ActionExecutionWorker.java      |    0
 ...nClassesInIsolatedClassLoaderWorkerFactory.java |    0
 ...ionClassesInSystemClassLoaderWorkerFactory.java |    0
 .../child/ImplementationClassLoaderWorker.java     |    0
 .../IsolatedApplicationClassLoaderWorker.java      |    0
 .../child/SystemApplicationClassLoaderWorker.java  |    0
 .../process/internal/child/WorkerContext.java      |    0
 .../process/internal/child/WorkerFactory.java      |    0
 .../child/WorkerProcessClassPathProvider.java      |    0
 .../launcher/BootstrapClassLoaderWorker.java       |    0
 .../internal/launcher/GradleWorkerMain.java        |    0
 .../org/gradle/process/internal/package.html       |    0
 .../shutdown/ShutdownHookActionRegister.java       |    0
 .../groovy/org/gradle/process/package-info.java    |    0
 .../groovy/org/gradle/profile/BuildProfile.java    |    0
 .../org/gradle/profile/ElapsedTimeFormatter.java   |    0
 .../org/gradle/profile/HTMLProfileReport.groovy    |    0
 .../groovy/org/gradle/profile/ProfileListener.java |   99 ++
 .../groovy/org/gradle/profile/ProjectProfile.java  |    0
 .../groovy/org/gradle/profile/TaskProfile.java     |    0
 .../org/gradle/testfixtures/ProjectBuilder.java    |    0
 .../org/gradle/testfixtures/package-info.java      |    0
 .../src/main/groovy/org/gradle/util/AntUtil.java   |    0
 .../org/gradle/util/BulkReadInputStream.java       |    0
 .../groovy/org/gradle/util/ChangeListener.java     |    0
 .../gradle/util/ClassLoaderObjectInputStream.java  |    0
 .../main/groovy/org/gradle/util/ClasspathUtil.java |   53 +
 .../src/main/groovy/org/gradle/util/Clock.java     |    0
 .../org/gradle/util/CompositeIdGenerator.java      |    0
 .../main/groovy/org/gradle/util/Configurable.java  |    0
 .../main/groovy/org/gradle/util/ConfigureUtil.java |    0
 .../main/groovy/org/gradle/util/DeleteOnExit.java  |    0
 .../groovy/org/gradle/util/DeprecationLogger.java  |    0
 .../src/main/groovy/org/gradle/util/DiffUtil.java  |    0
 .../org/gradle/util/DisconnectableInputStream.java |    0
 .../org/gradle/util/FilteringClassLoader.java      |    0
 .../main/groovy/org/gradle/util/GFileUtils.java    |  539 +++++++
 .../src/main/groovy/org/gradle/util/GUtil.java     |    0
 .../main/groovy/org/gradle/util/GradleVersion.java |  220 +++
 .../src/main/groovy/org/gradle/util/HashUtil.java  |    0
 .../main/groovy/org/gradle/util/IdGenerator.java   |    0
 .../src/main/groovy/org/gradle/util/JarUtil.java   |    0
 .../main/groovy/org/gradle/util/JavaMethod.java    |    0
 .../core/src/main/groovy/org/gradle/util/Jvm.java  |  114 ++
 .../org/gradle/util/LineBufferingOutputStream.java |    0
 .../util/LinePerThreadBufferingOutputStream.java   |    0
 .../groovy/org/gradle/util/LongIdGenerator.java    |    0
 .../org/gradle/util/MultiParentClassLoader.java    |    0
 .../main/groovy/org/gradle/util/NameMatcher.java   |  144 ++
 .../groovy/org/gradle/util/NoOpChangeListener.java |    0
 .../org/gradle/util/ObservableUrlClassLoader.java  |    0
 .../groovy/org/gradle/util/OperatingSystem.java    |    0
 .../src/main/groovy/org/gradle/util/Path.java      |    0
 .../src/main/groovy/org/gradle/util/PosixUtil.java |    0
 .../org/gradle/util/RandomLongIdGenerator.java     |    0
 .../groovy/org/gradle/util/ReflectionUtil.groovy   |    0
 .../src/main/groovy/org/gradle/util/TextUtil.java  |   32 +
 .../main/groovy/org/gradle/util/TimeProvider.java  |    0
 .../groovy/org/gradle/util/TrueTimeProvider.java   |    0
 .../groovy/org/gradle/util/UncheckedException.java |    0
 .../src/main/groovy/org/gradle/util/WrapUtil.java  |  120 ++
 .../org/gradle/configuration/default-imports.txt   |    0
 .../initialization/defaultBuildSourceScript.txt    |    0
 .../org/gradle/profile/ProfileTemplate.html        |    0
 .../org/gradle/BuildExceptionReporterTest.groovy   |    0
 .../groovy/org/gradle/BuildResultLoggerTest.java   |    0
 .../test/groovy/org/gradle/BuildResultTest.java    |    0
 .../groovy/org/gradle/StartParameterTest.groovy    |  254 ++++
 .../groovy/org/gradle/TaskExecutionLoggerTest.java |    0
 .../org/gradle/api/AllGradleExceptionsTest.groovy  |    0
 .../groovy/org/gradle/api/GeneratorTaskTest.groovy |    0
 .../groovy/org/gradle/api/JavaVersionTest.java     |    0
 .../api/artifacts/PublishInstructionTest.java      |    0
 .../api/artifacts/maven/Conf2ScopeMappingTest.java |    0
 .../api/artifacts/specs/DependencySpecsTest.java   |    0
 .../org/gradle/api/file/FileVisitorUtil.groovy     |    0
 .../api/internal/AbstractClassGeneratorTest.java   |    0
 .../api/internal/AbstractDynamicObjectTest.java    |    0
 .../api/internal/AsmBackedClassGeneratorTest.java  |    0
 .../AutoCreateDomainObjectContainerTest.groovy     |    0
 .../internal/CachingDirectedGraphWalkerTest.groovy |    0
 .../api/internal/ChainingTransformerTest.java      |    0
 .../api/internal/ConventionAwareHelperTest.java    |    0
 ...faultAutoCreateDomainObjectContainerSpec.groovy |   59 +
 .../internal/DefaultDomainObjectContainerTest.java |  370 +++++
 .../DefaultNamedDomainObjectContainerTest.java     |  664 +++++++++
 .../org/gradle/api/internal/DefaultTaskTest.groovy |    0
 .../api/internal/DynamicObjectHelperTest.java      |    0
 .../internal/DynamicObjectHelperTestHelper.groovy  |    0
 .../gradle/api/internal/GraphAggregatorTest.groovy |    0
 ...vySourceGenerationBackedClassGeneratorTest.java |    0
 .../api/internal/MapBackedDynamicObjectTest.java   |    0
 .../org/gradle/api/internal/TestContainer.java     |    0
 .../api/internal/TestDecoratedGroovyBean.groovy    |    0
 .../gradle/api/internal/XmlTransformerTest.groovy  |  207 +++
 .../CachingDependencyResolveContextTest.groovy     |    0
 .../DefaultConfigurationContainerFactoryTest.java  |    0
 .../artifacts/DefaultResolvedArtifactTest.java     |    0
 .../artifacts/DefaultResolvedDependencyTest.java   |    0
 .../artifacts/DefaultResolverContainerTest.groovy  |    0
 .../ProjectDependenciesBuildInstructionTest.java   |   58 +
 .../ResolvedConfigurationIdentifierTest.groovy     |    0
 .../configurations/ConfigurationsTest.java         |    0
 .../DefaultConfigurationContainerTest.java         |    0
 .../configurations/DefaultConfigurationTest.java   |    0
 .../dependencies/AbstractModuleDependencyTest.java |  116 ++
 .../dependencies/DefaultClientModuleTest.java      |    0
 .../DefaultDependencyArtifactTest.java             |    0
 .../DefaultExcludeRuleContainerTest.java           |    0
 .../DefaultExternalModuleDependencyTest.java       |    0
 .../dependencies/DefaultProjectDependencyTest.java |  285 ++++
 .../DefaultSelfResolvingDependencyTest.java        |    0
 .../dsl/DefaultArtifactHandlerTest.groovy          |    0
 .../dsl/DefaultConfigurationHandlerTest.groovy     |    0
 .../dsl/DefaultPublishArtifactFactoryTest.groovy   |    0
 .../dsl/DefaultRepositoryHandlerFactoryTest.java   |    0
 .../dsl/DefaultRepositoryHandlerTest.groovy        |    0
 .../dependencies/AbstractModuleFactoryTest.java    |    0
 .../ClassPathDependencyFactoryTest.groovy          |    0
 .../DefaultClientModuleFactoryTest.java            |    0
 .../dependencies/DefaultDependencyFactoryTest.java |  168 +++
 .../DefaultDependencyHandlerTest.groovy            |    0
 .../DefaultProjectDependencyFactoryTest.java       |   75 +
 .../dependencies/ModuleDependencyFactoryTest.java  |    0
 .../dependencies/ModuleFactoryDelegateTest.java    |    0
 .../SelfResolvingDependencyFactoryTest.java        |    0
 .../ivyservice/ClientModuleResolverTest.groovy     |    0
 .../DefaultIvyDependencyPublisherTest.java         |    0
 .../DefaultIvyDependencyResolverTest.java          |    0
 .../ivyservice/DefaultIvyFactoryTest.java          |    0
 .../ivyservice/DefaultIvyServicePublishTest.java   |    0
 .../ivyservice/DefaultIvyServiceResolveTest.java   |    0
 .../ivyservice/DefaultIvyServiceTest.java          |    0
 .../DefaultPublishOptionsFactoryTest.java          |    0
 .../ivyservice/DefaultResolverFactoryTest.groovy   |    0
 .../ivyservice/DefaultSettingsConverterTest.groovy |    0
 .../ivyservice/ErrorHandlingIvyServiceTest.groovy  |    0
 .../ivyservice/GradleIBiblioResolverTest.groovy    |    0
 .../artifacts/ivyservice/IvyUtilTest.groovy        |    0
 .../ivyservice/LocalMavenCacheLocatorTest.groovy   |    0
 .../ivyservice/Report2ClasspathTest.groovy         |    0
 .../SelfResolvingDependencyResolverTest.java       |    0
 .../ShortcircuitEmptyConfigsIvyServiceTest.java    |    0
 ...ltArtifactsToModuleDescriptorConverterTest.java |  124 ++
 ...figurationsToModuleDescriptorConverterTest.java |    0
 .../DefaultExcludeRuleConverterTest.java           |    0
 .../DefaultModuleDescriptorFactoryTest.java        |    0
 .../moduleconverter/IvyConverterTestUtil.java      |    0
 .../PublishModuleDescriptorConverterTest.java      |    0
 .../ResolveModuleDescriptorConverterTest.java      |    0
 ...actDependencyDescriptorFactoryInternalTest.java |    0
 ...lientModuleDependencyDescriptorFactoryTest.java |    0
 ...ependenciesToModuleDescriptorConverterTest.java |    0
 ...ModuleDescriptorFactoryForClientModuleTest.java |    0
 .../DependencyDescriptorFactoryDelegateTest.java   |    0
 ...ernalModuleDependencyDescriptorFactoryTest.java |    0
 .../ProjectDependencyDescriptorFactoryTest.java    |  127 ++
 .../publish/AbstractPublishArtifactTest.java       |    0
 .../publish/ArchivePublishArtifactTest.java        |    0
 .../publish/DefaultArtifactContainerTest.java      |    0
 .../publish/DefaultPublishArtifactTest.java        |    0
 .../maven/DefaultMavenPomFactoryTest.groovy        |    0
 .../publish/maven/DefaultMavenPomTest.groovy       |  191 +++
 .../publish/maven/DeployTaskFactoryTest.java       |    0
 .../DefaultConf2ScopeMappingContainerTest.java     |    0
 .../DefaultExcludeRuleConverterTest.java           |    0
 .../DefaultPomDependenciesConverterTest.java       |    0
 .../maven/deploy/AbstractMavenResolverTest.java    |    0
 .../maven/deploy/BaseMavenDeployerTest.java        |    0
 .../maven/deploy/BaseMavenInstallerTest.java       |    0
 .../maven/deploy/BasePomFilterContainerTest.java   |    0
 .../deploy/DefaultArtifactPomContainerTest.groovy  |    0
 .../maven/deploy/DefaultArtifactPomTest.java       |  272 ++++
 .../publish/maven/deploy/DefaultPomFilterTest.java |    0
 .../groovy/DefaultGroovyMavenDeployerTest.groovy   |    0
 .../groovy/DefaultGroovyMavenUploaderTest.groovy   |    0
 .../changedetection/CachingHasherTest.java         |    0
 .../DefaultFileSnapshotterTest.groovy              |    0
 .../DefaultTaskArtifactStateRepositoryTest.java    |    0
 ...hortCircuitTaskArtifactStateRepositoryTest.java |    0
 .../internal/file/AbstractFileCollectionTest.java  |  337 +++++
 .../internal/file/AbstractFileTreeElementTest.java |    0
 .../api/internal/file/AbstractFileTreeTest.groovy  |    0
 .../api/internal/file/BaseDirConverterTest.groovy  |  334 +++++
 .../internal/file/CompositeFileCollectionTest.java |    0
 .../api/internal/file/CompositeFileTreeTest.java   |    0
 .../internal/file/DefaultDirectoryWalkerTest.java  |    0
 .../internal/file/DefaultFileOperationsTest.groovy |  327 +++++
 .../file/DefaultSourceDirectorySetTest.groovy      |    0
 .../file/DefaultTemporaryFileProviderTest.groovy   |    0
 .../gradle/api/internal/file/FileSetTest.groovy    |    0
 .../gradle/api/internal/file/MapFileTreeTest.java  |    0
 .../file/PathResolvingFileCollectionTest.java      |    0
 .../gradle/api/internal/file/RelativePathTest.java |    0
 .../internal/file/SimpleFileCollectionTest.groovy  |    0
 .../file/SingletonFileCollectionTest.groovy        |    0
 .../api/internal/file/SingletonFileTreeTest.groovy |    0
 .../api/internal/file/UnionFileCollectionTest.java |    0
 .../api/internal/file/UnionFileTreeTest.java       |    0
 .../file/archive/TarCopySpecVisitorTest.java       |    0
 .../api/internal/file/archive/TarFileTreeTest.java |    0
 .../file/archive/ZipCopySpecVisitorTest.java       |    0
 .../api/internal/file/archive/ZipFileTreeTest.java |    0
 .../internal/file/copy/CopyActionImplTest.groovy   |    0
 .../api/internal/file/copy/CopySpecImplTest.groovy |    0
 .../internal/file/copy/DeleteActionImplTest.groovy |    0
 .../internal/file/copy/FileCopyActionImplTest.java |    0
 .../file/copy/FileCopySpecVisitorTest.java         |    0
 .../api/internal/file/copy/FilterChainTest.java    |    0
 .../api/internal/file/copy/LineFilterTest.groovy   |    0
 .../file/copy/MappingCopySpecVisitorTest.java      |    0
 .../file/copy/NormalizingCopySpecVisitorTest.java  |    0
 .../internal/file/copy/RegExpNameMapperTest.java   |   36 +
 .../internal/file/copy/RenamingCopyActionTest.java |    0
 .../file/copy/SyncCopySpecVisitorTest.java         |    0
 .../file/pattern/DefaultPatternMatcherTest.java    |  218 +++
 .../file/pattern/NameOnlyPatternMatcherTest.java   |    0
 .../file/pattern/PatternMatcherFactoryTest.java    |    0
 .../file/pattern/PatternStepFactoryTest.java       |    0
 .../file/pattern/RegExpPatternStepTest.java        |    0
 .../DefaultScriptHandlerFactoryTest.groovy         |    0
 .../initialization/DefaultScriptHandlerTest.groovy |    0
 .../internal/plugins/DefaultConventionTest.groovy  |    0
 .../DefaultObjectConfigurationActionTest.groovy    |    0
 .../plugins/DefaultPluginRegistryTest.java         |    0
 .../DefaultProjectsPluginContainerTest.java        |    0
 .../api/internal/plugins/IdePluginTest.groovy      |    0
 .../project/DefaultAntBuilderFactoryTest.groovy    |    0
 .../internal/project/DefaultAntBuilderTest.groovy  |    0
 .../project/DefaultIsolatedAntBuilderTest.groovy   |    0
 .../project/DefaultProjectRegistryTest.java        |    0
 .../api/internal/project/DefaultProjectTest.groovy | 1087 ++++++++++++++
 .../project/DefaultServiceRegistryTest.java        |    0
 .../project/GlobalServicesRegistryTest.java        |    0
 .../project/GradleInternalServiceRegistryTest.java |    0
 .../api/internal/project/ProjectFactoryTest.java   |    0
 .../ProjectInternalServiceRegistryTest.java        |    0
 .../project/TaskInternalServiceRegistryTest.java   |    0
 .../gradle/api/internal/project/TestPlugin1.groovy |    0
 .../gradle/api/internal/project/TestPlugin2.groovy |    0
 .../project/TopLevelBuildServiceRegistryTest.java  |    0
 .../AnnotationProcessingTaskFactoryTest.java       |    0
 .../DependencyAutoWireTaskFactoryTest.java         |    0
 .../ExecutionShortCircuitTaskExecuterTest.java     |    0
 .../project/taskfactory/InputFileTask.groovy       |    0
 .../PostExecutionAnalysisTaskExecuterTest.groovy   |    0
 .../project/taskfactory/TaskFactoryTest.java       |    0
 .../internal/resource/CachingResourceTest.groovy   |    0
 .../internal/resource/StringResourceTest.groovy    |    0
 .../api/internal/resource/UriResourceTest.groovy   |    0
 .../CachingTaskDependencyResolveContextTest.groovy |    0
 .../internal/tasks/DefaultTaskContainerTest.java   |    0
 .../tasks/DefaultTaskDependencyTest.groovy         |    0
 .../internal/tasks/DefaultTaskExecuterTest.java    |    0
 .../internal/tasks/DefaultTaskInputsTest.groovy    |    0
 .../internal/tasks/DefaultTaskOutputsTest.groovy   |    0
 .../tasks/ExecuteAtMostOnceTaskExecuterTest.groovy |    0
 .../api/internal/tasks/SkipTaskExecuterTest.java   |    0
 .../internal/tasks/TaskStateInternalTest.groovy    |    0
 ...sistableConfigurationObjectGeneratorTest.groovy |    0
 ...ertiesPersistableConfigurationObjectTest.groovy |    0
 .../XmlPersistableConfigurationObjectTest.groovy   |   71 +
 .../internal/tasks/generator/defaultResource.xml   |    0
 .../tasks/util/DefaultJavaForkOptionsTest.groovy   |  266 ++++
 .../util/DefaultProcessForkOptionsTest.groovy      |  111 ++
 .../org/gradle/api/logging/LogLevelTest.groovy     |    0
 .../groovy/org/gradle/api/logging/LoggingTest.java |    0
 .../api/plugins/TestPluginConvention1.groovy       |    0
 .../api/plugins/TestPluginConvention2.groovy       |    0
 .../api/specs/AbstractCompositeSpecTest.java       |    0
 .../groovy/org/gradle/api/specs/AndSpecTest.java   |    0
 .../groovy/org/gradle/api/specs/NotSpecTest.java   |    0
 .../groovy/org/gradle/api/specs/OrSpecTest.java    |    0
 .../groovy/org/gradle/api/specs/SpecsTest.groovy   |    0
 .../api/tasks/AbstractConventionTaskTest.java      |    0
 .../org/gradle/api/tasks/AbstractCopyTaskTest.java |    0
 .../gradle/api/tasks/AbstractSpockTaskTest.groovy  |    0
 .../org/gradle/api/tasks/AbstractTaskTest.java     |    0
 .../gradle/api/tasks/AntBuilderAwareUtil.groovy    |    0
 .../groovy/org/gradle/api/tasks/CopyTest.groovy    |    0
 .../groovy/org/gradle/api/tasks/DeleteTest.java    |    0
 .../org/gradle/api/tasks/DirectoryTest.groovy      |    0
 .../groovy/org/gradle/api/tasks/ExecTest.groovy    |    0
 .../org/gradle/api/tasks/GradleBuildTest.groovy    |    0
 .../gradle/api/tasks/GroovyTaskTestHelper.groovy   |    0
 .../org/gradle/api/tasks/SourceTaskTest.groovy     |    0
 .../groovy/org/gradle/api/tasks/UploadTest.java    |    0
 .../org/gradle/api/tasks/ant/AntTargetTest.java    |    0
 .../tasks/bundling/AbstractArchiveTaskTest.groovy  |    0
 .../org/gradle/api/tasks/bundling/TarTest.groovy   |    0
 .../org/gradle/api/tasks/bundling/ZipTest.groovy   |    0
 .../tasks/diagnostics/AbstractReportTaskTest.java  |    0
 .../diagnostics/DependencyReportTaskTest.java      |    0
 .../tasks/diagnostics/ProjectReportTaskTest.groovy |    0
 .../tasks/diagnostics/PropertyReportTaskTest.java  |    0
 .../api/tasks/diagnostics/TaskReportTaskTest.java  |    0
 ...AggregateMultiProjectTaskReportModelTest.groovy |    0
 .../internal/AsciiReportRendererTest.groovy        |    0
 .../DefaultGroupTaskReportModelTest.groovy         |    0
 .../internal/PropertyReportRendererTest.java       |    0
 .../SingleProjectTaskReportModelTest.groovy        |    0
 .../internal/TaskDetailsFactoryTest.groovy         |    0
 .../internal/TaskModelSpecification.groovy         |    0
 .../internal/TaskReportRendererTest.groovy         |    0
 .../internal/TextReportRendererTest.java           |    0
 .../tasks/util/AbstractTestForPatternSet.groovy    |    0
 .../gradle/api/tasks/util/PatternSetTest.groovy    |    0
 .../gradle/cache/AutoCloseCacheFactoryTest.groovy  |    0
 .../gradle/cache/DefaultCacheFactoryTest.groovy    |    0
 .../gradle/cache/DefaultCacheRepositoryTest.java   |    0
 .../cache/DefaultPersistentDirectoryCacheTest.java |    0
 .../org/gradle/cache/DefaultSerializerTest.groovy  |    0
 .../org/gradle/cache/SimpleStateCacheTest.groovy   |    0
 .../btree/BTreePersistentIndexedCacheTest.java     |    0
 .../configuration/BuildScriptProcessorTest.java    |    0
 .../DefaultBuildConfigurerTest.groovy              |    0
 .../DefaultInitScriptProcessorTest.java            |    0
 .../configuration/DefaultProjectEvaluatorTest.java |    0
 .../DefaultScriptPluginFactoryTest.java            |    0
 .../GradleLauncherMetaDataTest.groovy              |    0
 .../ImplicitTasksConfigurerTest.groovy             |    0
 .../gradle/configuration/ImportsReaderTest.groovy  |    0
 .../configuration/ImportsScriptSourceTest.java     |    0
 .../ProjectDependencies2TaskResolverTest.groovy    |    0
 .../gradle/execution/DefaultBuildExecuterTest.java |    0
 .../execution/DefaultTaskGraphExecuterTest.java    |    0
 .../gradle/execution/DryRunBuildExecuterTest.java  |    0
 .../ProjectDefaultsBuildExecuterTest.java          |    0
 .../gradle/execution/TaskNameResolverTest.groovy   |    0
 .../TaskNameResolvingBuildExecuterTest.java        |    0
 .../AsmBackedEmptyScriptGeneratorTest.groovy       |    0
 .../CachingScriptCompilationHandlerTest.groovy     |    0
 .../groovy/scripts/CachingScriptSourceTest.java    |    0
 .../DefaultScriptCompilationHandlerTest.java       |    0
 .../scripts/DefaultScriptCompilerFactoryTest.java  |    0
 .../scripts/DefaultScriptRunnerFactoryTest.java    |    0
 .../gradle/groovy/scripts/DefaultScriptTest.groovy |    0
 .../org/gradle/groovy/scripts/EmptyScript.java     |    0
 .../groovy/scripts/StringScriptSourceTest.java     |    0
 .../gradle/groovy/scripts/UriScriptSourceTest.java |    0
 .../AbstractSettingsFinderStrategyTest.java        |    0
 .../initialization/BuildFileProjectSpecTest.java   |    0
 .../gradle/initialization/BuildLoaderTest.groovy   |    0
 .../initialization/BuildProgressLoggerTest.groovy  |    0
 .../initialization/BuildSourceBuilderTest.groovy   |    0
 .../initialization/CommandLineParserTest.groovy    |    0
 .../DefaultCommandLineConverterTest.java           |  360 +++++
 .../DefaultExceptionAnalyserTest.java              |    0
 .../DefaultGradleLauncherFactoryTest.groovy        |    0
 .../initialization/DefaultGradleLauncherTest.java  |    0
 .../DefaultGradlePropertiesLoaderTest.java         |    0
 .../DefaultInitScriptFinderTest.java               |   67 +
 .../DefaultProjectDescriptorRegistryTest.java      |    0
 .../DefaultProjectDescriptorTest.java              |    0
 .../initialization/DefaultSettingsFinderTest.java  |    0
 .../initialization/DefaultSettingsTest.groovy      |    0
 .../EmbeddedScriptSettingsFinderTest.java          |    0
 .../ExceptionDecoratingClassGeneratorTest.groovy   |    0
 .../initialization/InitScriptHandlerTest.java      |    0
 .../MasterDirSettingsFinderStrategyTest.java       |    0
 .../initialization/NestedBuildTrackerTest.groovy   |    0
 .../ParentDirSettingsFinderStrategyTest.java       |    0
 .../ProjectDirectoryProjectSpecTest.java           |    0
 .../PropertiesLoadingSettingsProcessorTest.java    |    0
 .../SameLevelDirSettingsFinderStrategyTest.java    |    0
 .../ScriptEvaluatingSettingsProcessorTest.groovy   |    0
 .../gradle/initialization/SettingsFactoryTest.java |    0
 .../gradle/initialization/SettingsHandlerTest.java |    0
 .../UserHomeInitScriptFinderTest.java              |    0
 .../org/gradle/invocation/DefaultGradleTest.java   |    0
 .../org/gradle/listener/ActionBroadcastTest.groovy |    0
 .../listener/AsyncListenerBroadcastTest.groovy     |    0
 .../listener/DefaultListenerManagerTest.java       |    0
 .../org/gradle/listener/ListenerBroadcastTest.java |  334 +++++
 .../logging/LoggingServiceRegistryTest.groovy      |    0
 .../org/gradle/logging/LoggingTestHelper.groovy    |    0
 .../internal/AbstractStyledTextOutputTest.groovy   |    0
 .../gradle/logging/internal/AnsiConsoleTest.groovy |    0
 .../ConsoleBackedProgressRendererTest.groovy       |    0
 .../org/gradle/logging/internal/ConsoleStub.java   |    0
 .../logging/internal/DefaultColorMapTest.groovy    |    0
 .../internal/DefaultLoggingManagerTest.java        |    0
 .../DefaultProgressLoggerFactoryTest.groovy        |    0
 .../DefaultStandardOutputRedirectorTest.groovy     |    0
 .../internal/JavaUtilLoggingConfigurerTest.groovy  |    0
 .../gradle/logging/internal/LogEventTest.groovy    |    0
 .../LoggingBackedStyledTextOutputTest.groovy       |    0
 .../LoggingCommandLineConverterTest.groovy         |    0
 .../internal/LoggingSystemAdapterTest.groovy       |    0
 .../internal/OutputEventRendererTest.groovy        |    0
 .../logging/internal/OutputSpecification.groovy    |    0
 .../internal/PrintStreamLoggingSystemTest.groovy   |    0
 .../internal/ProgressLogEventGeneratorTest.groovy  |    0
 .../internal/Slf4jLoggingConfigurerTest.groovy     |    0
 .../internal/StreamingStyledTextOutputTest.groovy  |    0
 .../StyledTextOutputBackedRendererTest.groovy      |    0
 .../internal/StyledTextOutputEventTest.groovy      |    0
 .../TextStreamOutputEventListenerTest.groovy       |    0
 .../actor/internal/DefaultActorFactoryTest.groovy  |    0
 .../concurrent/CompositeStoppableTest.groovy       |    0
 .../concurrent/DefaultExecutorFactoryTest.groovy   |    0
 .../messaging/dispatch/AsyncDispatchTest.groovy    |    0
 .../messaging/dispatch/AsyncReceiveTest.groovy     |    0
 .../dispatch/ContextClassLoaderDispatchTest.groovy |    0
 .../dispatch/ExceptionTrackingDispatchTest.groovy  |    0
 .../dispatch/ExceptionTrackingListenerTest.groovy  |    0
 .../messaging/dispatch/MethodInvocationTest.java   |    0
 .../dispatch/ProxyDispatchAdapterTest.groovy       |    0
 .../ChannelMessageMarshallingDispatchTest.java     |    0
 .../ChannelMessageUnmarshallingDispatchTest.java   |    0
 .../internal/DefaultMessagingClientTest.java       |    0
 .../internal/DefaultMessagingServerTest.groovy     |    0
 .../DefaultMultiChannelConnectionTest.groovy       |    0
 .../internal/DefaultObjectConnectionTest.java      |    0
 .../remote/internal/EndOfStreamDispatchTest.groovy |    0
 .../remote/internal/EndOfStreamFilterTest.groovy   |    0
 .../remote/internal/EndOfStreamReceiveTest.groovy  |    0
 .../internal/HandshakeIncomingConnectorTest.groovy |    0
 .../internal/HandshakeOutgoingConnectorTest.groovy |    0
 .../messaging/remote/internal/MessageTest.groovy   |    0
 .../MethodInvocationMarshallingDispatchTest.java   |    0
 .../MethodInvocationUnmarshallingDispatchTest.java |    0
 .../internal/RemoteMethodInvocationTest.java       |    0
 .../remote/internal/TcpConnectorTest.groovy        |    0
 .../process/internal/DefaultExecHandleTest.java    |    0
 .../internal/DefaultWorkerProcessFactoryTest.java  |    0
 .../internal/DefaultWorkerProcessTest.groovy       |    0
 .../process/internal/ExecHandleBuilderTest.groovy  |    0
 .../internal/JavaExecHandleBuilderTest.groovy      |    0
 .../internal/child/ActionExecutionWorkerTest.java  |    0
 .../child/ImplementationClassLoaderWorkerTest.java |    0
 .../internal/child/SerializableMockHelper.groovy   |    0
 .../WorkerProcessClassPathProviderTest.groovy      |    0
 .../gradle/testfixtures/ProjectBuilderTest.groovy  |    0
 .../src/test/groovy/org/gradle/util/ClockTest.java |    0
 .../gradle/util/CompositeIdGeneratorTest.groovy    |    0
 .../org/gradle/util/ConcurrentSpecification.groovy |  477 +++++++
 .../gradle/util/ConcurrentSpecificationTest.groovy |  211 +++
 .../org/gradle/util/ConfigureUtilTest.groovy       |    0
 .../groovy/org/gradle/util/DiffUtilTest.groovy     |    0
 .../util/DisconnectableInputStreamTest.groovy      |    0
 .../gradle/util/FilteringClassLoaderTest.groovy    |    0
 .../src/test/groovy/org/gradle/util/GUtilTest.java |    0
 .../org/gradle/util/GradleVersionTest.groovy       |  140 ++
 .../test/groovy/org/gradle/util/HelperUtil.groovy  |    0
 .../org/gradle/util/JUnit4GroovyMockery.java       |    0
 .../groovy/org/gradle/util/JavaMethodTest.java     |    0
 .../src/test/groovy/org/gradle/util/JvmTest.groovy |  114 ++
 .../gradle/util/LineBufferingOutputStreamTest.java |    0
 .../LinePerThreadBufferingOutputStreamTest.groovy  |    0
 .../org/gradle/util/LongIdGeneratorTest.groovy     |    0
 .../src/test/groovy/org/gradle/util/Matchers.java  |    0
 .../gradle/util/MultiParentClassLoaderTest.groovy  |    0
 .../org/gradle/util/MultithreadedTestCase.java     |    0
 .../groovy/org/gradle/util/NameMatcherTest.java    |    0
 .../gradle/util/ObservableUrlClassLoaderTest.java  |    0
 .../test/groovy/org/gradle/util/PathTest.groovy    |    0
 .../org/gradle/util/RedirectStdOutAndErr.java      |    0
 .../org/gradle/util/ReflectionEqualsMatcher.java   |    0
 .../src/test/groovy/org/gradle/util/Resources.java |    0
 .../org/gradle/util/SetSystemProperties.java       |    0
 .../groovy/org/gradle/util/TemporaryFolder.java    |    0
 .../groovy/org/gradle/util/TestDirHelper.groovy    |    0
 .../src/test/groovy/org/gradle/util/TestFile.java  |  446 ++++++
 .../groovy/org/gradle/util/TestFileContext.java    |    0
 .../groovy/org/gradle/util/TestFileHelper.groovy   |    0
 .../test/groovy/org/gradle/util/TestTask.groovy    |    0
 .../groovy/org/gradle/util/TextUtilTest.groovy     |   32 +
 .../tasks/generator/defaultResource.properties     |    0
 .../internal/tasks/generator/defaultResource.xml   |    0
 .../tasks/ide/eclipse/expectedClasspathFile.txt    |    0
 .../tasks/ide/eclipse/expectedEmptyProjectFile.txt |    0
 .../expectedProjectFileWithCustomBuilder.txt       |    0
 .../expectedProjectFileWithCustomNature.txt        |    0
 .../api/tasks/ide/eclipse/expectedWtpFile.txt      |    0
 .../gradle/testfixtures/ProjectBuilderTest.gradle  |    0
 .../resources/org/gradle/util/ClassLoaderTest.txt  |    0
 subprojects/docs/docs.gradle                       |  490 +++++++
 .../{gradle-docs => docs}/src/docs/css/base.css    |    0
 .../{gradle-docs => docs}/src/docs/css/dsl.css     |    0
 .../{gradle-docs => docs}/src/docs/css/print.css   |    0
 .../{gradle-docs => docs}/src/docs/css/style.css   |    0
 .../src/docs/css/userguide.css                     |    0
 .../{gradle-docs => docs}/src/docs/dsl/dsl.xml     |    0
 .../src/docs/dsl/org.gradle.api.DefaultTask.xml    |    0
 .../docs/src/docs/dsl/org.gradle.api.Project.xml   |  238 ++++
 .../src/docs/dsl/org.gradle.api.Script.xml         |    0
 .../src/docs/dsl/org.gradle.api.Task.xml           |    0
 .../dsl/org.gradle.api.artifacts.Configuration.xml |    0
 .../dsl/org.gradle.api.initialization.Settings.xml |    0
 .../dsl/org.gradle.api.internal.AbstractTask.xml   |    0
 .../dsl/org.gradle.api.internal.ConventionTask.xml |    0
 .../docs/dsl/org.gradle.api.invocation.Gradle.xml  |    0
 ...org.gradle.api.plugins.BasePluginConvention.xml |    0
 ...org.gradle.api.plugins.JavaPluginConvention.xml |    0
 ...rg.gradle.api.plugins.MavenPluginConvention.xml |    0
 ....api.plugins.ProjectReportsPluginConvention.xml |    0
 ...e.api.plugins.ReportingBasePluginConvention.xml |    0
 .../org.gradle.api.plugins.WarPluginConvention.xml |    0
 ...i.plugins.announce.AnnouncePluginConvention.xml |    0
 ...i.plugins.antlr.AntlrSourceVirtualDirectory.xml |    0
 .../dsl/org.gradle.api.plugins.antlr.AntlrTask.xml |    0
 ...adle.api.plugins.jetty.AbstractJettyRunTask.xml |    0
 ...dle.api.plugins.jetty.JettyPluginConvention.xml |    0
 .../dsl/org.gradle.api.plugins.jetty.JettyRun.xml  |    0
 .../org.gradle.api.plugins.jetty.JettyRunWar.xml   |    0
 .../dsl/org.gradle.api.plugins.jetty.JettyStop.xml |    0
 ...radle.api.plugins.osgi.OsgiPluginConvention.xml |    0
 .../org.gradle.api.plugins.quality.Checkstyle.xml  |    0
 .../org.gradle.api.plugins.quality.CodeNarc.xml    |    0
 ...s.quality.GroovyCodeQualityPluginConvention.xml |    0
 ...ins.quality.JavaCodeQualityPluginConvention.xml |    0
 .../dsl/org.gradle.api.tasks.AbstractCopyTask.xml  |    0
 .../src/docs/dsl/org.gradle.api.tasks.Copy.xml     |    0
 .../src/docs/dsl/org.gradle.api.tasks.Delete.xml   |    0
 .../docs/dsl/org.gradle.api.tasks.Directory.xml    |    0
 .../src/docs/dsl/org.gradle.api.tasks.Exec.xml     |    0
 .../dsl/org.gradle.api.tasks.GeneratorTask.xml     |    0
 .../docs/dsl/org.gradle.api.tasks.GradleBuild.xml  |    0
 .../dsl/org.gradle.api.tasks.GroovySourceSet.xml   |    0
 .../src/docs/dsl/org.gradle.api.tasks.JavaExec.xml |    0
 .../dsl/org.gradle.api.tasks.ScalaSourceSet.xml    |    0
 .../docs/dsl/org.gradle.api.tasks.SourceSet.xml    |    0
 .../docs/dsl/org.gradle.api.tasks.SourceTask.xml   |    0
 .../src/docs/dsl/org.gradle.api.tasks.Sync.xml     |    0
 .../src/docs/dsl/org.gradle.api.tasks.Upload.xml   |    0
 .../dsl/org.gradle.api.tasks.XmlGeneratorTask.xml  |    0
 ...adle.api.tasks.bundling.AbstractArchiveTask.xml |    0
 .../docs/dsl/org.gradle.api.tasks.bundling.Jar.xml |    0
 .../docs/dsl/org.gradle.api.tasks.bundling.Tar.xml |    0
 .../docs/dsl/org.gradle.api.tasks.bundling.War.xml |    0
 .../docs/dsl/org.gradle.api.tasks.bundling.Zip.xml |    0
 ...rg.gradle.api.tasks.compile.AbstractCompile.xml |    0
 .../dsl/org.gradle.api.tasks.compile.Compile.xml   |    0
 .../org.gradle.api.tasks.compile.GroovyCompile.xml |    0
 ...le.api.tasks.diagnostics.AbstractReportTask.xml |    0
 ....api.tasks.diagnostics.DependencyReportTask.xml |    0
 ...dle.api.tasks.diagnostics.ProjectReportTask.xml |    0
 ...le.api.tasks.diagnostics.PropertyReportTask.xml |    0
 ...gradle.api.tasks.diagnostics.TaskReportTask.xml |    0
 .../dsl/org.gradle.api.tasks.javadoc.Groovydoc.xml |    0
 .../dsl/org.gradle.api.tasks.javadoc.Javadoc.xml   |    0
 .../org.gradle.api.tasks.scala.ScalaCompile.xml    |    0
 .../dsl/org.gradle.api.tasks.scala.ScalaDoc.xml    |    0
 .../docs/dsl/org.gradle.api.tasks.testing.Test.xml |    0
 .../dsl/org.gradle.api.tasks.wrapper.Wrapper.xml   |    0
 ...org.gradle.plugins.eclipse.EclipseClasspath.xml |    0
 .../dsl/org.gradle.plugins.eclipse.EclipseJdt.xml  |    0
 .../org.gradle.plugins.eclipse.EclipseProject.xml  |    0
 .../dsl/org.gradle.plugins.eclipse.EclipseWtp.xml  |    0
 .../dsl/org.gradle.plugins.idea.IdeaModule.xml     |    0
 .../dsl/org.gradle.plugins.idea.IdeaProject.xml    |    0
 .../dsl/org.gradle.plugins.idea.IdeaWorkspace.xml  |    0
 .../{gradle-docs => docs}/src/docs/dsl/plugins.xml |    0
 .../bin/start.sh => docs/src/docs/dsl/sidebar.js}  |    0
 .../src/docs/stylesheets/dslHtml.xsl               |    0
 .../src/docs/stylesheets/standaloneHtml.xsl        |    0
 .../src/docs/stylesheets/userGuideHtml.xsl         |    0
 .../src/docs/stylesheets/userGuideHtmlCommon.xsl   |    0
 .../src/docs/stylesheets/userGuidePdf.xsl          |    0
 .../src/docs/stylesheets/userGuideSingleHtml.xsl   |    0
 .../src/docs/stylesheets/websiteHtml.xsl           |    0
 .../src/docs/userguide/announcePlugin.xml          |    0
 .../src/docs/userguide/ant.xml                     |    0
 .../src/docs/userguide/antlrPlugin.xml             |    0
 .../userguide/artifactDependenciesTutorial.xml     |    0
 .../src/docs/userguide/artifactMngmt.xml           |    0
 .../src/docs/userguide/buildLifecycle.xml          |    0
 .../src/docs/userguide/buildScriptsTutorial.xml    |    0
 .../src/docs/userguide/codeQualityPlugin.xml       |    0
 .../docs/src/docs/userguide/commandLine.xml        |  232 +++
 .../src/docs/userguide/commandLineTutorial.xml     |    0
 .../docs/src/docs/userguide/customPlugins.xml      |  184 +++
 .../docs/src/docs/userguide/customTasks.xml        |  159 +++
 .../src/docs/userguide/depMngmt.xml                |    0
 .../src/docs/userguide/eclipsePlugin.xml           |    0
 .../src/docs/userguide/embedding.xml               |    0
 .../src/docs/userguide/glossary.xml                |    0
 .../src/docs/userguide/gradleWrapper.xml           |    0
 .../src/docs/userguide/groovyPlugin.xml            |    0
 .../src/docs/userguide/groovyTutorial.xml          |    0
 .../src/docs/userguide/guiTutorial.xml             |    0
 subprojects/docs/src/docs/userguide/ideSupport.xml |   58 +
 .../src/docs/userguide/ideaPlugin.xml              |    0
 .../userguide/img/codeQualityPluginTasks.graphml   |    0
 .../docs/userguide/img/codeQualityPluginTasks.png  |  Bin
 .../userguide/img/commandLineTutorialTasks.graphml |    0
 .../userguide/img/commandLineTutorialTasks.png     |  Bin
 .../docs/userguide/img/groovyPluginTasks.graphml   |    0
 .../src/docs/userguide/img/groovyPluginTasks.png   |  Bin
 .../src/docs/userguide/img/guiSetup.png            |  Bin
 .../src/docs/userguide/img/guiTaskTree.png         |  Bin
 .../userguide/img/javaPluginConfigurations.graphml |    0
 .../userguide/img/javaPluginConfigurations.png     |  Bin
 .../src/docs/userguide/img/javaPluginTasks.graphml |    0
 .../src/docs/userguide/img/javaPluginTasks.png     |  Bin
 .../docs/userguide/img/jettyPluginTasks.graphml    |    0
 .../src/docs/userguide/img/jettyPluginTasks.png    |  Bin
 .../src/docs/userguide/img/profile.png             |  Bin
 .../docs/userguide/img/scalaPluginTasks.graphml    |    0
 .../src/docs/userguide/img/scalaPluginTasks.png    |  Bin
 .../src/docs/userguide/img/warPluginTasks.graphml  |    0
 .../src/docs/userguide/img/warPluginTasks.png      |  Bin
 .../src/docs/userguide/initscripts.xml             |    0
 .../docs/src/docs/userguide/installation.xml       |  122 ++
 .../src/docs/userguide/introduction.xml            |    0
 .../src/docs/userguide/javaPlugin.xml              |    0
 .../docs/userguide/javaProjectGenericLayout.xml    |    0
 .../src/docs/userguide/javaProjectMainLayout.xml   |    0
 .../src/docs/userguide/javaProjectTestLayout.xml   |    0
 .../src/docs/userguide/javaTutorial.xml            |    0
 .../src/docs/userguide/jettyPlugin.xml             |    0
 .../src/docs/userguide/logging.xml                 |    0
 .../src/docs/userguide/mavenPlugin.xml             |    0
 .../src/docs/userguide/multiproject.xml            |    0
 .../src/docs/userguide/organizeBuildLogic.xml      |    0
 .../src/docs/userguide/osgi.xml                    |    0
 .../src/docs/userguide/overview.xml                |    0
 .../src/docs/userguide/plugins.xml                 |    0
 .../src/docs/userguide/potentialTraps.xml          |    0
 .../src/docs/userguide/projectReports.xml          |    0
 .../userguide/reportingBasePluginProperties.xml    |    0
 .../src/docs/userguide/scalaPlugin.xml             |    0
 .../src/docs/userguide/standardPlugins.xml         |    0
 .../src/docs/userguide/tasks.xml                   |    0
 .../src/docs/userguide/thisAndThat.xml             |    0
 .../src/docs/userguide/tutorials.xml               |    0
 .../src/docs/userguide/userguide.xml               |    0
 .../src/docs/userguide/warPlugin.xml               |    0
 .../src/docs/userguide/webTutorial.xml             |    0
 .../src/docs/userguide/workingWithFiles.xml        |    0
 .../src/docs/userguide/writingBuildScripts.xml     |    0
 .../src/samples/announce/build.gradle              |    0
 .../src/samples/announce/readme.xml                |    0
 .../src/samples/antlr/build.gradle                 |    0
 .../antlr/src/main/antlr/org/gradle/Calculator.g   |    0
 .../src/test/java/org/gradle/GrammarTest.java      |    0
 .../clientModuleDependencies/api/build.gradle      |    0
 .../samples/clientModuleDependencies/build.gradle  |    0
 .../clientModuleDependencies/settings.gradle       |    0
 .../clientModuleDependencies/shared/build.gradle   |    0
 .../shared/src/main/java/SomeClass.java            |    0
 .../src/samples/codeQuality/build.gradle           |    0
 .../codeQuality/config/checkstyle/checkstyle.xml   |    0
 .../codeQuality/config/codenarc/codenarc.xml       |    0
 .../src/samples/codeQuality/readme.xml             |    0
 .../groovy/org/gradle/sample/GroovyPerson.groovy   |    0
 .../src/main/java/org/gradle/sample/Person.java    |    0
 .../groovy/org/gradle/sample/PersonTest.groovy     |    0
 .../customBuildLanguage/basicEdition/build.gradle  |    9 +
 .../src/dist/end-user-license-agreement.txt        |    0
 .../customBuildLanguage/billing/build.gradle       |    0
 .../src/samples/customBuildLanguage/build.gradle   |    0
 .../org/gradle/samples/ProductDefinition.groovy    |    0
 .../org/gradle/samples/ProductModulePlugin.groovy  |    0
 .../groovy/org/gradle/samples/ProductPlugin.groovy |    0
 .../gradle/samples/ProductPluginConvention.groovy  |    0
 .../META-INF/gradle-plugins/product.properties     |    1 +
 .../enterpriseEdition/build.gradle                 |   10 +
 .../src/dist/end-user-license-agreement.txt        |    0
 .../identityManagement/build.gradle                |    0
 .../src/samples/customBuildLanguage/readme.xml     |    0
 .../customBuildLanguage/reporting/build.gradle     |    0
 .../samples/customBuildLanguage/settings.gradle    |    0
 .../customBuildLanguage/src/dist/bin/start.sh      |    0
 .../customBuildLanguage/src/dist/readme.txt        |    0
 .../docs/src/samples/customPlugin/build.gradle     |   29 +
 .../src/samples/customPlugin/readme.xml            |    0
 .../main/groovy/org/gradle/GreetingPlugin.groovy   |   10 +
 .../src/main/groovy/org/gradle/GreetingTask.groovy |   13 +
 .../META-INF/gradle-plugins/greeting.properties    |    0
 .../groovy/org/gradle/GreetingPluginTest.groovy    |   18 +
 .../test/groovy/org/gradle/GreetingTaskTest.groovy |    0
 .../samples/customPlugin/usesCustomPlugin.gradle   |   12 +
 .../src/samples/customPlugin/usesCustomTask.gradle |   14 +
 .../src/samples/dependencies/build.gradle          |    0
 .../repo/sea.fish/ivy-billfish-1.0.xml             |    0
 .../dependencies/repo/sea.fish/ivy-shark-1.0.xml   |    0
 .../dependencies/repo/sea.fish/ivy-tuna-1.0.xml    |    0
 .../dependencies/repo/sea.mammals/ivy-orca-1.0.xml |    0
 .../src/samples/dependencies/settings.gradle       |    0
 .../src/samples/eclipse/build.gradle               |    0
 .../samples/groovy/customizedLayout/build.gradle   |    0
 .../src/samples/groovy/customizedLayout/readme.xml |    0
 .../src/groovy/org/gradle/Person.groovy            |    0
 .../test/groovy/org/gradle/PersonTest.groovy       |    0
 .../src/samples/groovy/groovy-1.5.6/build.gradle   |    0
 .../src/samples/groovy/groovy-1.5.6/readme.xml     |    0
 .../src/main/groovy/org/gradle/Person.groovy       |    0
 .../src/test/groovy/org/gradle/PersonTest.groovy   |    0
 .../src/samples/groovy/groovy-1.6.7/build.gradle   |    0
 .../src/samples/groovy/groovy-1.6.7/readme.xml     |    0
 .../src/main/groovy/org/gradle/Person.groovy       |    0
 .../src/test/groovy/org/gradle/PersonTest.groovy   |    0
 .../samples/groovy/mixedJavaAndGroovy/build.gradle |    0
 .../samples/groovy/mixedJavaAndGroovy/readme.xml   |    0
 .../src/main/groovy/org/gradle/GroovyPerson.groovy |    0
 .../src/main/groovy/org/gradle/JavaPerson.java     |    0
 .../src/main/groovy/org/gradle/PersonList.groovy   |    0
 .../src/main/java/org/gradle/Person.java           |    0
 .../src/test/groovy/org/gradle/PersonTest.groovy   |    0
 .../src/samples/groovy/multiproject/build.gradle   |    0
 .../groovy/org/gradle/buildsrc/BuildSrcClass.java  |    0
 .../multiproject/groovycDetector/build.gradle      |    0
 .../java/org/gradle/test/DetectorTransform.java    |    0
 ...org.codehaus.groovy.transform.ASTTransformation |    0
 .../src/samples/groovy/multiproject/readme.xml     |    0
 .../samples/groovy/multiproject/settings.gradle    |    0
 .../groovy/multiproject/testproject/build.gradle   |    0
 .../main/groovy/org/gradle/ExcludeGroovy.groovy    |    0
 .../main/groovy/org/gradle/ExcludeGroovyJava.java  |    0
 .../main/groovy/org/gradle/GroovyJavaPerson.java   |    0
 .../src/main/groovy/org/gradle/GroovyPerson.groovy |    0
 .../src/main/java/org/gradle/ExcludeJava.java      |    0
 .../src/main/java/org/gradle/JavaPerson.java       |    0
 .../src/main/resources/org/gradle/main.properties  |    0
 .../testproject/src/metaInfFiles/myfile            |    0
 .../groovy/org/gradle/GroovyJavaPersonTest.java    |    0
 .../test/groovy/org/gradle/GroovyPersonTest.groovy |    0
 .../src/test/groovy/org/gradle/VersionTest.groovy  |    0
 .../src/test/java/org/gradle/JavaPersonTest.java   |    0
 .../src/test/resources/org/gradle/test.properties  |    0
 .../src/samples/groovy/quickstart/build.gradle     |    0
 .../src/samples/groovy/quickstart/readme.xml       |    0
 .../src/main/groovy/org/gradle/Person.groovy       |    0
 .../quickstart/src/main/resources/resource.txt     |    0
 .../quickstart/src/main/resources/script.groovy    |    0
 .../src/test/groovy/org/gradle/PersonTest.groovy   |    0
 .../quickstart/src/test/resources/testResource.txt |    0
 .../src/test/resources/testScript.groovy           |    0
 .../src/samples/idea/build.gradle                  |    0
 .../src/samples/ivypublish/build.gradle            |    0
 .../src/samples/ivypublish/build.xml               |    0
 .../src/samples/ivypublish/ivy.xml                 |    0
 .../src/samples/ivypublish/ivysettings.xml         |    0
 .../src/samples/ivypublish/settings.gradle         |    0
 .../src/main/java/org/gradle/SomeClass.java        |    0
 .../src/main/java/org/gradle/shared/Person.java    |    0
 .../src/samples/java/base/build.gradle             |    0
 .../src/samples/java/base/prod/build.gradle        |    0
 .../java/base/prod/java/org/gradle/Person.java     |    0
 .../src/samples/java/base/readme.xml               |    0
 .../src/samples/java/base/settings.gradle          |    0
 .../src/samples/java/base/test/build.gradle        |    0
 .../java/base/test/java/org/gradle/PersonTest.java |    0
 .../src/samples/java/customizedLayout/build.gradle |    0
 .../src/samples/java/customizedLayout/readme.xml   |    0
 .../src/java/org/gradle/Person.java                |    0
 .../test/java/org/gradle/PersonTest.java           |    0
 .../src/samples/java/multiproject/api/build.gradle |    0
 .../java/multiproject/api/src/dist/README.txt      |    0
 .../src/main/java/org/gradle/api/PersonList.java   |    0
 .../api/src/main/java/org/gradle/api/package.html  |    0
 .../api/src/main/java/org/gradle/apiImpl/Impl.java |    0
 .../src/samples/java/multiproject/build.gradle     |    0
 .../java/multiproject/buildSrc/build.gradle        |    0
 .../java/org/gradle/buildsrc/BuildSrcClass.java    |    0
 .../org/gradle/buildsrc/BuildSrcClassTest.java     |    0
 .../src/samples/java/multiproject/readme.xml       |    0
 .../java/multiproject/services/shared/build.gradle |    0
 .../java/org/gradle/services/shared/TestTest.java  |    0
 .../multiproject/services/webservice/build.gradle  |    0
 .../main/java/org/gradle/webservice/TestTest.java  |    0
 .../java/org/gradle/webservice/TestTestTest.java   |    0
 .../src/samples/java/multiproject/settings.gradle  |    0
 .../src/main/java/org/gradle/shared/Person.java    |    0
 .../main/java/org/gradle/shared/package-info.java  |    0
 .../resources/org/gradle/shared/main.properties    |    0
 .../test/java/org/gradle/shared/PersonTest.java    |    0
 .../resources/org/gradle/shared/test.properties    |    0
 .../src/samples/java/onlyif/build.gradle           |    0
 .../onlyif/src/main/java/org/gradle/Person.java    |    0
 .../src/test/java/org/gradle/PersonTest.java       |    0
 .../src/samples/java/quickstart/build.gradle       |    0
 .../src/samples/java/quickstart/readme.xml         |    0
 .../src/main/java/org/gradle/Person.java           |    0
 .../src/test/java/org/gradle/PersonTest.java       |    0
 .../src/samples/java/testListener/build.gradle     |    0
 .../src/test/java/org/gradle/DoNothingTest.java    |    0
 .../samples/java/withIntegrationTests/build.gradle |    0
 .../samples/java/withIntegrationTests/readme.xml   |    0
 .../java/org/gradle/PersonIntegrationTest.java     |    0
 .../resources/org/gradle/inttest.properties        |    0
 .../src/main/java/org/gradle/Person.java           |    0
 .../test/java/org/gradle/PersonTestFixture.java    |    0
 .../src/samples/maven/pomGeneration/build.gradle   |  109 ++
 .../src/samples/maven/pomGeneration/readme.xml     |    0
 .../pomGeneration/src/main/java/org/MyClass.java   |    0
 .../pomGeneration/src/main/webapp/WEB-INF/web.xml  |    0
 .../docs/src/samples/maven/quickstart/build.gradle |   30 +
 .../src/samples/maven/quickstart/readme.xml        |    0
 .../quickstart/src/main/java/org/MyClass.java      |    0
 .../src/samples/mavenRepo/build.gradle             |    0
 .../src/samples/osgi/build.gradle                  |    0
 .../src/samples/osgi/readme.xml                    |    0
 .../main/groovy/org/gradle/GradleActivator.groovy  |    0
 .../samples/scala/customizedLayout/build.gradle    |    0
 .../src/samples/scala/customizedLayout/readme.xml  |    0
 .../src/scala/org/gradle/sample/api/Person.scala   |    0
 .../scala/org/gradle/sample/impl/PersonImpl.scala  |    0
 .../org/gradle/sample/impl/PersonImplTest.scala    |    0
 .../samples/scala/mixedJavaAndScala/build.gradle   |    0
 .../src/samples/scala/mixedJavaAndScala/readme.xml |    0
 .../src/main/java/org/gradle/sample/Person.java    |    0
 .../scala/org/gradle/sample/impl/JavaPerson.java   |    0
 .../scala/org/gradle/sample/impl/PersonImpl.scala  |    0
 .../scala/org/gradle/sample/impl/PersonList.scala  |    0
 .../test/scala/org/gradle/sample/PersonTest.scala  |    0
 .../src/samples/scala/quickstart/build.gradle      |    0
 .../src/samples/scala/quickstart/readme.xml        |    0
 .../main/scala/org/gradle/sample/api/Person.scala  |    0
 .../scala/org/gradle/sample/impl/PersonImpl.scala  |    0
 .../org/gradle/sample/impl/PersonImplTest.scala    |    0
 .../samples/testng/java-jdk14-passing/build.gradle |    0
 .../src/main/java/org/gradle/Ok.java               |    0
 .../src/test/java/org/gradle/OkTest.java           |    0
 .../samples/testng/java-jdk15-passing/build.gradle |    0
 .../src/main/java/org/gradle/Ok.java               |    0
 .../src/test/java/org/gradle/AbstractTest.java     |    0
 .../src/test/java/org/gradle/ConcreteTest.java     |    0
 .../src/test/java/org/gradle/OkTest.java           |    0
 .../src/test/java/org/gradle/SuiteCleanup.java     |    0
 .../src/test/java/org/gradle/SuiteSetup.java       |    0
 .../src/test/java/org/gradle/TestCleanup.java      |    0
 .../src/test/java/org/gradle/TestSetup.java        |    0
 .../samples/testng/suitexmlbuilder/build.gradle    |    0
 .../src/main/java/org/gradle/testng/User.java      |    0
 .../src/main/java/org/gradle/testng/UserImpl.java  |    0
 .../test/java/org/gradle/testng/UserImplTest.java  |    0
 .../docs/src/samples/toolingApi/build.gradle       |   26 +
 .../src/main/java/org/gradle/sample/Main.java      |   32 +
 .../ant/addBehaviourToAntTarget/build.gradle       |    0
 .../ant/addBehaviourToAntTarget/build.xml          |    0
 .../userguide/ant/dependsOnAntTarget/build.gradle  |    0
 .../userguide/ant/dependsOnAntTarget/build.xml     |    0
 .../userguide/ant/dependsOnTask/build.gradle       |    0
 .../samples/userguide/ant/dependsOnTask/build.xml  |    0
 .../src/samples/userguide/ant/hello/build.gradle   |    0
 .../src/samples/userguide/ant/hello/build.xml      |    0
 .../samples/userguide/ant/properties/build.gradle  |    0
 .../src/samples/userguide/ant/properties/build.xml |    0
 .../ant/taskWithNestedElements/build.gradle        |    0
 .../ant/taskWithNestedElements/src/test.xml        |    0
 .../userguide/ant/taskWithNestedText/build.gradle  |    0
 .../samples/userguide/ant/useAntTask/build.gradle  |    0
 .../samples/userguide/ant/useAntType/build.gradle  |    0
 .../userguide/ant/useExternalAntTask/build.gradle  |    0
 .../ant/useExternalAntTaskWithConfig/build.gradle  |    0
 .../ant/useExternalAntTaskWithConfig/pmd-rules.xml |    0
 .../useExternalAntTaskWithConfig/src/Source.java   |    0
 .../artifacts/configurationHandling/build.gradle   |    0
 .../repo/sea.fish/ivy-shark-1.0.xml                |    0
 .../repo/sea.fish/ivy-tuna-1.0.xml                 |    0
 .../repo/sea.mammals/ivy-orca-1.0.xml              |    0
 .../artifacts/defineConfiguration/build.gradle     |    0
 .../artifacts/defineRepository/build.gradle        |    0
 .../artifacts/excludesAndClassifiers/build.gradle  |    0
 .../repo/org.gradle.test.excludes/api-ivy-1.0.xml  |    0
 .../org.gradle.test.excludes/other-api-ivy-1.0.xml |    0
 .../artifacts/externalDependencies/build.gradle    |    0
 .../generatedFileDependencies/build.gradle         |    0
 .../samples/userguide/artifacts/maven/build.gradle |    0
 .../userguide/artifacts/uploading/build.gradle     |    0
 .../userguide/buildlifecycle/basic/build.gradle    |    0
 .../userguide/buildlifecycle/basic/settings.gradle |    0
 .../buildProjectEvaluateEvents/build.gradle        |    0
 .../buildProjectEvaluateEvents/projectB.gradle     |    0
 .../buildProjectEvaluateEvents/settings.gradle     |    0
 .../projectEvaluateEvents/build.gradle             |    0
 .../projectEvaluateEvents/projectA.gradle          |    0
 .../projectEvaluateEvents/settings.gradle          |    0
 .../buildlifecycle/taskCreationEvents/build.gradle |    0
 .../taskExecutionEvents/build.gradle               |    0
 .../userguide/files/archiveNaming/build.gradle     |    0
 .../userguide/files/archiveNaming/settings.gradle  |    0
 .../userguide/files/archiveNaming/somedir/file.txt |    0
 .../samples/userguide/files/archives/build.gradle  |    0
 .../src/samples/userguide/files/copy/build.gradle  |    0
 .../src/samples/userguide/files/file/build.gradle  |    0
 .../userguide/files/fileCollections/build.gradle   |    0
 .../samples/userguide/files/fileTrees/build.gradle |    0
 .../userguide/files/inputFiles/build.gradle        |    0
 .../src/samples/userguide/files/sync/build.gradle  |    0
 .../initScripts/customLogger/build.gradle          |    0
 .../userguide/initScripts/customLogger/init.gradle |    0
 .../initScripts/externalDependency/build.gradle    |    0
 .../initScripts/externalDependency/init.gradle     |    0
 .../samples/userguide/java/sourceSets/build.gradle |    0
 .../addKrill/water/bluewhale/.gitignore            |    0
 .../multiproject/addKrill/water/build.gradle       |    0
 .../multiproject/addKrill/water/krill/.gitignore   |    0
 .../multiproject/addKrill/water/settings.gradle    |    0
 .../addSpecifics/water/bluewhale/.gitignore        |    0
 .../multiproject/addSpecifics/water/build.gradle   |    0
 .../addSpecifics/water/krill/.gitignore            |    0
 .../addSpecifics/water/settings.gradle             |    0
 .../addTropical/water/bluewhale/build.gradle       |    0
 .../multiproject/addTropical/water/build.gradle    |    0
 .../addTropical/water/krill/build.gradle           |    0
 .../multiproject/addTropical/water/settings.gradle |    0
 .../addTropical/water/tropicalFish/.gitignore      |    0
 .../multiproject/customLayout/settings.gradle      |    0
 .../firstMessages/messages/consumer/build.gradle   |    0
 .../firstMessages/messages/producer/build.gradle   |    0
 .../firstMessages/messages/settings.gradle         |    0
 .../main/java/org/gradle/sample/api/Person.java    |    0
 .../java/org/gradle/sample/apiImpl/PersonImpl.java |    0
 .../multiproject/dependencies/java/build.gradle    |    0
 .../org/gradle/sample/services/PersonService.java  |    0
 .../gradle/sample/services/PersonServiceTest.java  |    0
 .../multiproject/dependencies/java/settings.gradle |    0
 .../main/java/org/gradle/sample/shared/Helper.java |    0
 .../main/java/org/gradle/sample/api/Person.java    |    0
 .../java/org/gradle/sample/apiImpl/PersonImpl.java |    0
 .../dependencies/javaWithCustomConf/build.gradle   |    0
 .../org/gradle/sample/services/PersonService.java  |    0
 .../gradle/sample/services/PersonServiceTest.java  |    0
 .../javaWithCustomConf/settings.gradle             |    0
 .../main/java/org/gradle/sample/shared/Helper.java |    0
 .../messages/consumer/build.gradle                 |    0
 .../messages/producer/build.gradle                 |    0
 .../messages/settings.gradle                       |    0
 .../messages/consumer/build.gradle                 |    0
 .../messages/producer/build.gradle                 |    0
 .../messages/settings.gradle                       |    0
 .../messages/consumer/build.gradle                 |    0
 .../messages/producer/build.gradle                 |    0
 .../messages/settings.gradle                       |    0
 .../messages/consumer/build.gradle                 |    0
 .../messages/producer/build.gradle                 |    0
 .../messages/settings.gradle                       |    0
 .../messagesHack/messages/aProducer/build.gradle   |    0
 .../messagesHack/messages/consumer/build.gradle    |    0
 .../messagesHack/messages/settings.gradle          |    0
 .../messages/consumer/build.gradle                 |    0
 .../messages/producer/build.gradle                 |    0
 .../messages/settings.gradle                       |    0
 .../messages/consumer/build.gradle                 |    0
 .../messages/producer/build.gradle                 |    0
 .../messages/settings.gradle                       |    0
 .../multiproject/dependencies/webDist/build.gradle |    0
 .../main/java/org/gradle/sample/DateServlet.java   |    0
 .../webDist/date/src/main/webapp/web.xml           |    0
 .../main/java/org/gradle/sample/HelloServlet.java  |    0
 .../webDist/hello/src/main/webapp/web.xml          |    0
 .../dependencies/webDist/settings.gradle           |    0
 .../firstExample/water/bluewhale/.gitignore        |    0
 .../multiproject/firstExample/water/build.gradle   |    0
 .../firstExample/water/settings.gradle             |    0
 .../userguide/multiproject/flat/dolphin/.gitignore |    0
 .../multiproject/flat/master/build.gradle          |    0
 .../multiproject/flat/master/settings.gradle       |    0
 .../userguide/multiproject/flat/shark/.gitignore   |    0
 .../flatWithNoDefaultMaster/dolphin/.gitignore     |    0
 .../flatWithNoDefaultMaster/shark/.gitignore       |    0
 .../flatWithNoDefaultMaster/water/build.gradle     |    0
 .../flatWithNoDefaultMaster/water/settings.gradle  |    0
 .../partialTasks/water/bluewhale/build.gradle      |    0
 .../multiproject/partialTasks/water/build.gradle   |    0
 .../partialTasks/water/krill/build.gradle          |    0
 .../partialTasks/water/settings.gradle             |    0
 .../partialTasks/water/tropicalFish/build.gradle   |    0
 .../spreadSpecifics/water/bluewhale/build.gradle   |    0
 .../spreadSpecifics/water/build.gradle             |    0
 .../spreadSpecifics/water/krill/build.gradle       |    0
 .../spreadSpecifics/water/settings.gradle          |    0
 .../multiproject/standardLayouts/settings.gradle   |    0
 .../water/bluewhale/.gitignore                     |    0
 .../subprojectsAddFromTop/water/build.gradle       |    0
 .../subprojectsAddFromTop/water/krill/.gitignore   |    0
 .../subprojectsAddFromTop/water/settings.gradle    |    0
 .../water/bluewhale/build.gradle                   |    0
 .../tropicalWithProperties/water/build.gradle      |    0
 .../water/krill/build.gradle                       |    0
 .../tropicalWithProperties/water/settings.gradle   |    0
 .../water/tropicalFish/build.gradle                |    0
 .../useSubprojects/water/bluewhale/.gitignore      |    0
 .../multiproject/useSubprojects/water/build.gradle |    0
 .../useSubprojects/water/krill/.gitignore          |    0
 .../useSubprojects/water/settings.gradle           |    0
 .../userguide/organizeBuildLogic/build.gradle      |    0
 .../organizeBuildLogic/customPlugin/build.gradle   |    0
 .../build.gradle                                   |    0
 .../customPluginWithConvention/build.gradle        |    0
 .../build.gradle                                   |   50 +
 .../externalDependency/build.gradle                |    0
 .../organizeBuildLogic/inherited/build.gradle      |    0
 .../inherited/child/build.gradle                   |    0
 .../organizeBuildLogic/inherited/settings.gradle   |    0
 .../organizeBuildLogic/injected/build.gradle       |    0
 .../injected/child1/build.gradle                   |    0
 .../injected/child2/build.gradle                   |    0
 .../organizeBuildLogic/injected/settings.gradle    |    0
 .../organizeBuildLogic/nestedBuild/build.gradle    |    0
 .../organizeBuildLogic/nestedBuild/other.gradle    |    0
 .../userguide/tasks/accessAsProperty/build.gradle  |    0
 .../tasks/accessFromTaskContainer/build.gradle     |    0
 .../userguide/tasks/accessUsingPath/build.gradle   |    0
 .../tasks/accessUsingPath/settings.gradle          |    0
 .../tasks/addDependencyUsingClosure/build.gradle   |    0
 .../tasks/addDependencyUsingPath/build.gradle      |    0
 .../tasks/addDependencyUsingPath/settings.gradle   |    0
 .../tasks/addDependencyUsingTask/build.gradle      |    0
 .../samples/userguide/tasks/addRules/build.gradle  |    0
 .../tasks/addToTaskContainer/build.gradle          |    0
 .../tasks/configureUsingClosure/build.gradle       |    0
 .../tasks/configureUsingConfigure/build.gradle     |    0
 .../tasks/configureUsingLiterateStyle/build.gradle |    0
 .../userguide/tasks/configureUsingVar/build.gradle |    0
 .../userguide/tasks/customTask/build.gradle        |    0
 .../tasks/customTaskWithProperty/build.gradle      |    0
 .../tasks/defineAndConfigure/build.gradle          |    0
 .../tasks/defineAsExpression/build.gradle          |    0
 .../tasks/defineUsingStringTaskNames/build.gradle  |    0
 .../incrementalBuild/inputsAndOutputs/build.gradle |    0
 .../inputsAndOutputs/mountains.xml                 |    0
 .../noInputsAndOutputs/build.gradle                |    0
 .../noInputsAndOutputs/mountains.xml               |    0
 .../userguide/tutorial/announce/build.gradle       |    0
 .../userguide/tutorial/antChecksum/build.gradle    |    0
 .../tutorial/antChecksumFiles/agile_manifesto.html |    0
 .../antChecksumFiles/agile_principles.html         |    0
 .../tutorial/antChecksumFiles/dylan_thomas.txt     |    0
 .../tutorial/antChecksumWithMethod/build.gradle    |    0
 .../userguide/tutorial/archiveContent/build.gradle |    0
 .../userguide/tutorial/configByDag/build.gradle    |    0
 .../tutorial/configureObject/build.gradle          |    0
 .../configureObjectUsingScript/build.gradle        |    0
 .../configureObjectUsingScript/other.gradle        |    0
 .../configureProjectUsingScript/build.gradle       |    0
 .../configureProjectUsingScript/other.gradle       |    0
 .../samples/userguide/tutorial/count/build.gradle  |    0
 .../userguide/tutorial/defaultTasks/build.gradle   |    0
 .../userguide/tutorial/directoryTask/build.gradle  |    0
 .../userguide/tutorial/disableTask/build.gradle    |    0
 .../userguide/tutorial/dynamic/build.gradle        |    0
 .../userguide/tutorial/dynamicDepends/build.gradle |    0
 .../tutorial/dynamicProperties/build.gradle        |    0
 .../userguide/tutorial/excludeTasks/build.gradle   |    0
 .../samples/userguide/tutorial/groovy/build.gradle |    0
 .../tutorial/groovyWithFlatDir/build.gradle        |    0
 .../samples/userguide/tutorial/hello/build.gradle  |    0
 .../userguide/tutorial/helloEnhanced/build.gradle  |    0
 .../userguide/tutorial/helloShortcut/build.gradle  |    0
 .../tutorial/helloWithShortCut/build.gradle        |    0
 .../samples/userguide/tutorial/intro/build.gradle  |    0
 .../userguide/tutorial/lazyDependsOn/build.gradle  |    0
 .../userguide/tutorial/logging/build.gradle        |    0
 .../userguide/tutorial/makeDirectory/build.gradle  |    0
 .../userguide/tutorial/manifest/build.gradle       |    0
 .../userguide/tutorial/mkdirTrap/build.gradle      |    0
 .../samples/userguide/tutorial/osgi/build.gradle   |    0
 .../tutorial/pluginAccessConvention/build.gradle   |    0
 .../userguide/tutorial/pluginConfig/build.gradle   |    0
 .../tutorial/pluginConvention/build.gradle         |    0
 .../userguide/tutorial/pluginIntro/build.gradle    |    0
 .../userguide/tutorial/projectApi/build.gradle     |    0
 .../userguide/tutorial/projectReports/build.gradle |    0
 .../tutorial/projectReports/settings.gradle        |    0
 .../userguide/tutorial/properties/build.gradle     |    0
 .../tutorial/properties/gradle.properties          |    0
 .../userguide/tutorial/replaceTask/build.gradle    |    0
 .../src/samples/userguide/tutorial/scope.groovy    |    0
 .../tutorial/selectProject/subdir/build.gradle     |    0
 .../tutorial/selectProject/subdir/myproject.gradle |    0
 .../tutorial/stopExecutionException/build.gradle   |    0
 .../userguide/tutorial/taskOnlyIf/build.gradle     |    0
 .../samples/userguide/tutorial/upper/build.gradle  |    0
 .../tutorial/zipWithArguments/build.gradle         |    0
 .../tutorial/zipWithArguments/somedir/file.txt     |    0
 .../tutorial/zipWithCustomName/build.gradle        |    0
 .../tutorial/zipWithCustomName/somedir/file.txt    |    0
 .../userguide/wrapper/customized/build.gradle      |    0
 .../samples/userguide/wrapper/simple/build.gradle  |    0
 .../abbreviateCamelCaseTaskName.out                |    0
 .../samples/userguideOutput/abbreviateTaskName.out |    0
 .../samples/userguideOutput/accessUsingPath.out    |    0
 .../userguideOutput/addBehaviourToAntTarget.out    |    0
 .../userguideOutput/addDependencyUsingClosure.out  |    0
 .../userguideOutput/addDependencyUsingPath.out     |    0
 .../userguideOutput/addDependencyUsingTask.out     |    0
 .../src/samples/userguideOutput/antChecksum.out    |    0
 .../userguideOutput/antChecksumWithMethod.out      |    0
 .../src/samples/userguideOutput/antHello.out       |    0
 .../src/samples/userguideOutput/archiveNaming.out  |    0
 .../userguideOutput/buildProjectEvaluateEvents.out |    0
 .../src/samples/userguideOutput/buildlifecycle.out |    0
 .../src/samples/userguideOutput/configByDag.out    |    0
 .../userguideOutput/configByDagNoRelease.out       |    0
 .../configurationHandlingAllFiles.out              |    0
 .../userguideOutput/configurationHandlingCopy.out  |    0
 .../configurationHandlingCopyVsFiles.out           |    0
 .../configurationHandlingDependencies.out          |    0
 .../userguideOutput/configurationHandlingFiles.out |    0
 .../samples/userguideOutput/configureObject.out    |    0
 .../userguideOutput/configureObjectUsingScript.out |    0
 .../configureProjectUsingScript.out                |    0
 .../src/samples/userguideOutput/count.out          |    0
 .../src/samples/userguideOutput/customPlugin.out   |    0
 .../customPluginWithAdvancedConvention.out         |    0
 .../userguideOutput/customPluginWithConvention.out |    0
 .../userguideOutput/customTaskWithAction.out       |    0
 .../userguideOutput/customTaskWithProperty.out     |    0
 .../samples/userguideOutput/custom_logging_ui.out  |    0
 .../src/samples/userguideOutput/defaultTasks.out   |    0
 .../userguideOutput/dependencyListReport.out       |    0
 .../samples/userguideOutput/dependsOnAntTarget.out |    0
 .../src/samples/userguideOutput/dependsOnTask.out  |    0
 .../src/samples/userguideOutput/directoryTask.out  |    0
 .../src/samples/userguideOutput/disableTask.out    |    0
 .../userguideOutput/domainObjectContainer.out      |    3 +
 .../src/samples/userguideOutput/dynamic.out        |    0
 .../src/samples/userguideOutput/dynamicDepends.out |    0
 .../samples/userguideOutput/dynamicProperties.out  |    0
 .../src/samples/userguideOutput/excludeTask.out    |    0
 .../userguideOutput/externalBuildDependency.out    |    0
 .../userguideOutput/externalDependencies.out       |    0
 .../userguideOutput/externalInitDependency.out     |    0
 .../samples/userguideOutput/fileCollections.out    |    0
 .../userguideOutput/generatedFileDependencies.out  |    0
 .../src/samples/userguideOutput/generatorTask.out  |    0
 .../src/samples/userguideOutput/hello.out          |    0
 .../src/samples/userguideOutput/helloEnhanced.out  |    0
 .../samples/userguideOutput/helloWithShortCut.out  |    0
 .../samples/userguideOutput/incrementalTask.out    |    0
 .../userguideOutput/inheritedBuildLogic.out        |    0
 .../samples/userguideOutput/injectedBuildLogic.out |    0
 .../src/samples/userguideOutput/intro.out          |    0
 .../src/samples/userguideOutput/javaQuickstart.out |    0
 .../src/samples/userguideOutput/lazyDependsOn.out  |    0
 .../src/samples/userguideOutput/makeDirectory.out  |    0
 .../src/samples/userguideOutput/mkdirTrap.out      |    0
 .../multipleTasksFromCommandLine.out               |    0
 .../multiprojectAbsoluteTaskPaths.out              |    0
 .../userguideOutput/multiprojectAddKrill.out       |    0
 .../userguideOutput/multiprojectAddTropical.out    |    0
 .../userguideOutput/multiprojectFirstExample.out   |    0
 .../userguideOutput/multiprojectFirstMessages.out  |    0
 .../samples/userguideOutput/multiprojectFlat.out   |    0
 .../userguideOutput/multiprojectFlatPartial.out    |    0
 .../multiprojectFlatPartialWithNoDefaultMaster.out |    0
 .../multiprojectMessagesConfigDependencies.out     |    0
 ...rojectMessagesConfigDependenciesAltSolution.out |    0
 ...ultiprojectMessagesConfigDependenciesBroken.out |    0
 .../multiprojectMessagesDependencies.out           |    0
 .../multiprojectMessagesDependenciesSubBuild.out   |    0
 .../multiprojectMessagesDifferentTaskNames.out     |    0
 .../userguideOutput/multiprojectMessagesHack.out   |    0
 .../multiprojectMessagesHackBroken.out             |    0
 .../multiprojectMessagesTaskDependencies.out       |    0
 .../userguideOutput/multiprojectPartialTasks.out   |    0
 .../multiprojectPartialTasksNotQuiet.out           |    0
 .../multiprojectSpreadSpecifics.out                |    0
 .../userguideOutput/multiprojectSubBuild.out       |    0
 .../multiprojectSubprojectsAddFromTop.out          |    0
 .../multiprojectTropicalWithProperties.out         |    0
 .../userguideOutput/multiprojectUseSubprojects.out |    0
 .../samples/userguideOutput/multitestingBuild.out  |    0
 .../userguideOutput/multitestingBuildDashA.out     |    0
 .../multitestingBuildDependents.out                |    0
 .../userguideOutput/multitestingBuildNeeded.out    |    0
 .../src/samples/userguideOutput/nestedBuild.out    |    0
 .../userguideOutput/pluginAccessConvention.out     |    0
 .../src/samples/userguideOutput/pluginConfig.out   |    0
 .../samples/userguideOutput/pluginConvention.out   |    0
 .../src/samples/userguideOutput/pluginIntro.out    |    0
 .../src/samples/userguideOutput/projectApi.out     |    0
 .../userguideOutput/projectEvaluateEvents.out      |    0
 .../samples/userguideOutput/projectListReport.out  |    0
 .../src/samples/userguideOutput/properties.out     |    0
 .../samples/userguideOutput/propertyListReport.out |    0
 .../src/samples/userguideOutput/replaceTask.out    |    0
 .../src/samples/userguideOutput/scope.out          |    0
 .../selectProjectUsingBuildFile.out                |    0
 .../selectProjectUsingProjectDir.out               |    0
 .../userguideOutput/stopExecutionException.out     |    0
 .../samples/userguideOutput/taskCreationEvents.out |    0
 .../userguideOutput/taskExecutionEvents.out        |    0
 .../samples/userguideOutput/taskListAllReport.out  |    0
 .../src/samples/userguideOutput/taskListReport.out |    0
 .../src/samples/userguideOutput/taskOnlyIf.out     |    0
 .../src/samples/userguideOutput/taskRule.out       |    0
 .../samples/userguideOutput/taskRuleDependsOn.out  |    0
 .../samples/userguideOutput/taskWithNestedText.out |    0
 .../src/samples/userguideOutput/upper.out          |    0
 .../src/samples/userguideOutput/useAntTask.out     |    0
 .../samples/userguideOutput/zipWithArguments.out   |    0
 .../samples/userguideOutput/zipWithCustomName.out  |    0
 .../src/samples/water/bluewhale/build.gradle       |    0
 .../src/samples/water/build.gradle                 |    0
 .../src/samples/water/krill/build.gradle           |    0
 .../src/samples/water/phytoplankton/build.gradle   |    0
 .../src/samples/water/settings.gradle              |    0
 .../samples/webApplication/customised/build.gradle |    0
 .../samples/webApplication/customised/readme.xml   |    0
 .../customised/src/additionalWebInf/additional.xml |    0
 .../src/main/java/org/gradle/HelloServlet.java     |    0
 .../src/main/java/org/gradle/MyClass.java          |    0
 .../customised/src/main/webapp/WEB-INF/webapp.xml  |    0
 .../customised/src/main/webapp/webapp.html         |    0
 .../customised/src/rootContent/root.txt            |    0
 .../webApplication/customised/src/someWeb.xml      |    0
 .../customised/src/test/java/org/MyClassTest.java  |    0
 .../samples/webApplication/quickstart/build.gradle |    0
 .../samples/webApplication/quickstart/readme.xml   |    0
 .../src/main/java/org/gradle/sample/Greeter.java   |    0
 .../quickstart/src/main/resources/greeting.txt     |    0
 .../quickstart/src/main/webapp/index.jsp           |    0
 .../{gradle-eclipse => eclipse}/eclipse.gradle     |    0
 .../gradle/plugins/eclipse/EclipseClasspath.groovy |  104 ++
 .../org/gradle/plugins/eclipse/EclipseJdt.groovy   |    0
 .../gradle/plugins/eclipse/EclipsePlugin.groovy    |  159 +++
 .../gradle/plugins/eclipse/EclipseProject.groovy   |  129 ++
 .../org/gradle/plugins/eclipse/EclipseWtp.groovy   |  187 +++
 .../eclipse/model/AbstractClasspathEntry.groovy    |    0
 .../plugins/eclipse/model/AbstractLibrary.groovy   |    0
 .../gradle/plugins/eclipse/model/AccessRule.groovy |    0
 .../plugins/eclipse/model/BuildCommand.groovy      |    0
 .../gradle/plugins/eclipse/model/Classpath.groovy  |  100 ++
 .../plugins/eclipse/model/ClasspathEntry.java      |    0
 .../gradle/plugins/eclipse/model/Container.groovy  |    0
 .../org/gradle/plugins/eclipse/model/Facet.groovy  |    0
 .../org/gradle/plugins/eclipse/model/Jdt.java      |    0
 .../gradle/plugins/eclipse/model/Library.groovy    |    0
 .../org/gradle/plugins/eclipse/model/Link.groovy   |    0
 .../org/gradle/plugins/eclipse/model/Output.groovy |    0
 .../gradle/plugins/eclipse/model/Project.groovy    |    0
 .../plugins/eclipse/model/ProjectDependency.groovy |    0
 .../plugins/eclipse/model/SourceFolder.groovy      |    0
 .../gradle/plugins/eclipse/model/Variable.groovy   |    0
 .../plugins/eclipse/model/WbDependentModule.groovy |    0
 .../gradle/plugins/eclipse/model/WbProperty.groovy |    0
 .../gradle/plugins/eclipse/model/WbResource.groovy |    0
 .../org/gradle/plugins/eclipse/model/Wtp.groovy    |  184 +++
 .../eclipse/model/internal/ClasspathFactory.groovy |  207 +++
 .../plugins/eclipse/model/internal/PathUtil.groovy |    0
 .../eclipse/model/internal/WtpFactory.groovy       |    0
 .../gradle/plugins/eclipse/model/package-info.java |    0
 .../org/gradle/plugins/eclipse/package-info.java   |    0
 .../META-INF/gradle-plugins/eclipse.properties     |    0
 .../plugins/eclipse/model/defaultClasspath.xml     |    0
 .../eclipse/model/defaultJdtPrefs.properties       |    0
 .../plugins/eclipse/model/defaultProject.xml       |    0
 .../plugins/eclipse/EclipseClasspathTest.groovy    |   54 +
 .../plugins/eclipse/EclipsePluginTest.groovy       |  180 +++
 .../plugins/eclipse/EclipseProjectTest.groovy      |   53 +
 .../gradle/plugins/eclipse/EclipseWtpTest.groovy   |    0
 .../plugins/eclipse/model/ClasspathTest.groovy     |  100 ++
 .../plugins/eclipse/model/ContainerTest.groovy     |    0
 .../gradle/plugins/eclipse/model/FacetTest.groovy  |    0
 .../gradle/plugins/eclipse/model/JdtTest.groovy    |    0
 .../plugins/eclipse/model/LibraryTest.groovy       |    0
 .../gradle/plugins/eclipse/model/OutputTest.groovy |    0
 .../eclipse/model/ProjectDependencyTest.groovy     |    0
 .../plugins/eclipse/model/ProjectTest.groovy       |    0
 .../plugins/eclipse/model/SourceFolderTest.groovy  |    0
 .../plugins/eclipse/model/VariableTest.groovy      |    0
 .../eclipse/model/WbDependentModuleTest.groovy     |    0
 .../plugins/eclipse/model/WbPropertyTest.groovy    |    0
 .../plugins/eclipse/model/WbResourceTest.groovy    |    0
 .../gradle/plugins/eclipse/model/WtpTest.groovy    |    0
 .../plugins/eclipse/model/customClasspath.xml      |    0
 .../model/customOrgEclipseWstCommonComponent.xml   |    0
 ...ustomOrgEclipseWstCommonProjectFacetCoreXml.xml |    0
 .../gradle/plugins/eclipse/model/customProject.xml |    0
 .../org/gradle/api/plugins/antlr/AntlrPlugin.java  |  105 --
 .../plugins/antlr/internal/GrammarDelegate.java    |  155 --
 .../gradle/api/plugins/antlr/internal/XRef.java    |   97 --
 .../api/plugins/antlr/AntlrPluginTest.groovy       |   67 -
 .../gradle-code-quality/code-quality.gradle        |   37 -
 .../api/plugins/quality/CodeQualityPlugin.groovy   |  102 --
 subprojects/gradle-core/core.gradle                |  132 --
 .../gradle/integtests/AbstractIntegrationTest.java |   78 -
 .../groovy/org/gradle/integtests/BrokenTask.java   |   31 -
 .../BuildAggregationIntegrationTest.groovy         |   98 --
 .../BuildScriptErrorIntegrationTest.java           |  165 ---
 .../integtests/CacheProjectIntegrationTest.groovy  |  125 --
 ...ntModuleDependenciesResolveIntegrationTest.java |   43 -
 .../integtests/CommandLineIntegrationTest.groovy   |   50 -
 ...CrossVersionCompatibilityIntegrationTest.groovy |   83 --
 .../DependenciesResolveIntegrationTest.java        |   44 -
 .../org/gradle/integtests/DirTransformerTask.java  |   58 -
 .../integtests/DistributionIntegrationTest.groovy  |  128 --
 .../DistributionIntegrationTestRunner.java         |   40 -
 .../integtests/DynamicObjectIntegrationTest.groovy |  194 ---
 .../integtests/EclipseIntegrationTest.groovy       |   33 -
 .../GradleUserHomeEnvVariableIntegrationTest.java  |   66 -
 .../gradle/integtests/IdeaIntegrationTest.groovy   |  101 --
 .../IncrementalBuildIntegrationTest.groovy         |  374 -----
 .../integtests/IvyPublishIntegrationTest.java      |   45 -
 .../gradle/integtests/JUnitIntegrationTest.groovy  |  378 -----
 .../integtests/LoggingIntegrationTest.groovy       |  345 -----
 .../OsgiProjectSampleIntegrationTest.groovy        |   61 -
 .../integtests/ProjectLayoutIntegrationTest.groovy |  175 ---
 .../integtests/SamplesAntlrIntegrationTest.groovy  |   43 -
 .../SamplesCodeQualityIntegrationTest.groovy       |   46 -
 ...amplesCustomBuildLanguageIntegrationTest.groovy |   61 -
 .../SamplesCustomPluginIntegrationTest.groovy      |   41 -
 ...lesExcludesAndClassifiersIntegrationTest.groovy |   53 -
 ...lesGroovyCustomizedLayoutIntegrationTest.groovy |   50 -
 ...SamplesGroovyMultiProjectIntegrationTest.groovy |   81 --
 .../SamplesGroovyOldVersionsIntegrationTest.groovy |   57 -
 .../SamplesGroovyQuickstartIntegrationTest.groovy  |   54 -
 .../SamplesJavaBaseIntegrationTest.groovy          |   59 -
 ...mplesJavaCustomizedLayoutIntegrationTest.groovy |   59 -
 .../SamplesJavaMultiProjectIntegrationTest.groovy  |  228 ---
 .../SamplesJavaOnlyIfIntegrationTest.groovy        |   94 --
 ...esJavaProjectWithIntTestsIntegrationTest.groovy |   47 -
 .../SamplesJavaQuickstartIntegrationTest.groovy    |   72 -
 ...SamplesMixedJavaAndGroovyIntegrationTest.groovy |   73 -
 .../SamplesMixedJavaAndScalaIntegrationTest.groovy |   76 -
 .../SamplesRepositoriesIntegrationTest.groovy      |   45 -
 ...plesScalaCustomizedLayoutIntegrationTest.groovy |   53 -
 .../SamplesScalaQuickstartIntegrationTest.groovy   |   68 -
 .../SamplesWebProjectIntegrationTest.groovy        |   73 -
 .../SamplesWebQuickstartIntegrationTest.groovy     |   67 -
 .../integtests/TaskDefinitionIntegrationTest.java  |  135 --
 .../integtests/TaskExecutionIntegrationTest.java   |  161 ---
 .../groovy/org/gradle/integtests/TestTask.java     |   30 -
 .../org/gradle/integtests/TransformerTask.java     |   66 -
 .../integtests/WaterProjectIntegrationTest.groovy  |   79 --
 .../integtests/WorkerProcessIntegrationTest.java   |  372 -----
 .../WrapperProjectIntegrationTest.groovy           |   47 -
 .../fixtures/AbstractGradleExecuter.java           |  215 ---
 .../integtests/fixtures/ExecutionResult.java       |   41 -
 .../integtests/fixtures/ForkingGradleExecuter.java |  243 ----
 .../integtests/fixtures/GradleDistribution.java    |  173 ---
 .../fixtures/GradleDistributionExecuter.java       |  146 --
 .../gradle/integtests/fixtures/GradleExecuter.java |  101 --
 .../fixtures/InProcessGradleExecuter.java          |  331 -----
 .../fixtures/PreviousGradleVersionExecuter.groovy  |   95 --
 .../maven/MavenProjectIntegrationTest.groovy       |   66 -
 .../maven/MavenRepoIntegrationTest.groovy          |   46 -
 ...SamplesMavenPomGenerationIntegrationTest.groovy |  155 --
 .../SamplesMavenQuickstartIntegrationTest.groovy   |  100 --
 .../testng/SampleTestNGIntegrationTest.groovy      |   74 -
 .../integtests/testng/TestNGIntegrationTest.groovy |  115 --
 .../expectedFiles/apiClasspath.xml                 |   11 -
 .../expectedFiles/apiProject.xml                   |   21 -
 .../expectedFiles/groovyprojectClasspath.xml       |   11 -
 .../expectedFiles/groovyprojectProject.xml         |   24 -
 .../expectedFiles/javabaseprojectClasspath.xml     |    4 -
 .../expectedFiles/javabaseprojectProject.xml       |   21 -
 .../expectedFiles/masterProject.xml                |   10 -
 .../expectedFiles/webAppJava6Classpath.xml         |    5 -
 .../expectedFiles/webAppJava6Project.xml           |   39 -
 .../expectedFiles/webAppJava6WtpComponent.xml      |    8 -
 .../expectedFiles/webAppJava6WtpFacet.xml          |    6 -
 .../expectedFiles/webAppWithVarsClasspath.xml      |   11 -
 .../expectedFiles/webAppWithVarsProject.xml        |   39 -
 .../expectedFiles/webAppWithVarsWtpComponent.xml   |   13 -
 .../expectedFiles/webAppWithVarsWtpFacet.xml       |    6 -
 .../expectedFiles/webserviceClasspath.xml          |   18 -
 .../expectedFiles/webserviceProject.xml            |   39 -
 .../expectedFiles/webserviceWtpComponent.xml       |   18 -
 .../expectedFiles/webserviceWtpFacet.xml           |    6 -
 .../canExecuteCommands/canExecuteCommands.gradle   |   33 -
 .../src/main/java/org/gradle/TestMain.java         |    9 -
 .../canExecuteJava/canExecuteJava.gradle           |   27 -
 .../src/main/java/org/gradle/TestMain.java         |    9 -
 .../expectedFiles/api/api.iml.xml                  |   40 -
 .../expectedFiles/root.ipr.xml                     |  104 --
 .../expectedFiles/root.iws.xml                     |  212 ---
 .../expectedFiles/webservice/webservice.iml.xml    |   76 -
 .../expectedFiles/root.iml.xml                     |   39 -
 .../expectedFiles/root.ipr.xml                     |  103 --
 .../expectedFiles/root.ipr.xml                     |  102 --
 .../expectedFiles/root/root.iml.xml                |   18 -
 .../expectedFiles/root/root.ipr.xml                |  104 --
 .../expectedFiles/top-level.iml.xml                |   18 -
 .../src/main/groovy/org/gradle/BuildAdapter.java   |   42 -
 .../groovy/org/gradle/BuildExceptionReporter.java  |  265 ----
 .../src/main/groovy/org/gradle/GradleLauncher.java |  148 --
 .../src/main/groovy/org/gradle/StartParameter.java |  552 --------
 .../org/gradle/api/DomainObjectCollection.java     |  118 --
 .../src/main/groovy/org/gradle/api/Project.java    | 1453 -------------------
 .../org/gradle/api/artifacts/Configuration.java    |  409 ------
 .../api/artifacts/dsl/RepositoryHandler.java       |  259 ----
 .../org/gradle/api/artifacts/maven/MavenPom.java   |  225 ---
 .../org/gradle/api/artifacts/specs/Type.java       |   31 -
 .../internal/AbstractDomainObjectCollection.java   |  136 --
 .../org/gradle/api/internal/AbstractTask.java      |  457 ------
 .../org/gradle/api/internal/GraphAggregator.java   |   90 --
 .../org/gradle/api/internal/XmlTransformer.java    |  156 --
 .../artifacts/CachingDependencyResolveContext.java |   73 -
 .../ProjectDependenciesBuildInstruction.java       |   64 -
 .../configurations/DefaultConfiguration.java       |  535 -------
 .../dependencies/DefaultProjectDependency.java     |  168 ---
 .../dsl/TaskDefinitionScriptTransformer.java       |  204 ---
 .../dsl/dependencies/DefaultDependencyFactory.java |   85 --
 .../artifacts/publish/maven/DefaultMavenPom.java   |  238 ----
 .../publish/maven/deploy/DefaultArtifactPom.java   |  227 ---
 .../api/internal/file/AbstractFileCollection.java  |  232 ---
 .../api/internal/file/SingletonFileTree.java       |   71 -
 .../gradle/api/internal/file/copy/LineFilter.java  |  112 --
 .../internal/file/copy/MappingCopySpecVisitor.java |  187 ---
 .../file/pattern/PatternMatcherFactory.java        |   50 -
 .../internal/plugins/DefaultPluginCollection.java  |   64 -
 .../api/internal/project/AbstractProject.java      |  962 -------------
 .../PostExecutionAnalysisTaskExecuter.java         |   49 -
 .../gradle/api/internal/resource/UriResource.java  |   90 --
 .../api/internal/tasks/DefaultTaskCollection.java  |   80 --
 .../XmlPersistableConfigurationObject.java         |   62 -
 .../groovy/org/gradle/api/invocation/Gradle.java   |  219 ---
 .../org/gradle/api/plugins/PluginCollection.java   |   78 -
 .../org/gradle/api/tasks/TaskCollection.java       |   90 --
 .../org/gradle/cache/AutoCloseCacheFactory.java    |   93 --
 .../cache/DefaultPersistentDirectoryCache.java     |  117 --
 .../groovy/org/gradle/execution/TaskSelector.java  |  118 --
 .../gradle/initialization/BuildSourceBuilder.java  |  146 --
 .../DefaultCommandLineConverter.java               |  253 ----
 .../DefaultGradleLauncherFactory.java              |  158 ---
 .../DefaultGradlePropertiesLoader.java             |  128 --
 .../initialization/DefaultInitScriptFinder.java    |   42 -
 .../gradle/initialization/InitScriptFinder.java    |   29 -
 .../gradle/initialization/InitScriptHandler.java   |   44 -
 .../gradle/initialization/SettingsLocation.java    |   35 -
 .../initialization/UserHomeInitScriptFinder.java   |   47 -
 .../org/gradle/invocation/DefaultGradle.java       |  186 ---
 .../messaging/concurrent/ExecutorFactory.java      |   27 -
 .../gradle/messaging/dispatch/AsyncDispatch.java   |  189 ---
 .../dispatch/ContextClassLoaderDispatch.java       |   38 -
 .../messaging/dispatch/ReflectionDispatch.java     |   39 -
 .../process/internal/DefaultJavaForkOptions.java   |  229 ---
 .../internal/DefaultProcessForkOptions.java        |  100 --
 .../internal/ExecHandleShutdownHookAction.java     |   47 -
 .../groovy/org/gradle/profile/ProfileListener.java |  101 --
 .../main/groovy/org/gradle/util/ClasspathUtil.java |   54 -
 .../main/groovy/org/gradle/util/GFileUtils.java    |  534 -------
 .../main/groovy/org/gradle/util/GradleVersion.java |  220 ---
 .../src/main/groovy/org/gradle/util/Jvm.java       |   68 -
 .../main/groovy/org/gradle/util/NameMatcher.java   |  145 --
 .../src/main/groovy/org/gradle/util/WrapUtil.java  |  120 --
 .../groovy/org/gradle/StartParameterTest.groovy    |  254 ----
 .../internal/DefaultDomainObjectContainerTest.java |  326 -----
 .../DefaultNamedDomainObjectContainerTest.java     |  628 ---------
 .../gradle/api/internal/XmlTransformerTest.groovy  |  180 ---
 .../ProjectDependenciesBuildInstructionTest.java   |   80 --
 .../dependencies/AbstractModuleDependencyTest.java |  110 --
 .../dependencies/DefaultProjectDependencyTest.java |  297 ----
 .../dependencies/DefaultDependencyFactoryTest.java |  168 ---
 .../DefaultProjectDependencyFactoryTest.java       |   75 -
 ...ltArtifactsToModuleDescriptorConverterTest.java |  124 --
 .../ProjectDependencyDescriptorFactoryTest.java    |  128 --
 .../publish/maven/DefaultMavenPomTest.groovy       |  190 ---
 .../maven/deploy/DefaultArtifactPomTest.java       |  274 ----
 .../internal/file/AbstractFileCollectionTest.java  |  340 -----
 .../api/internal/file/BaseDirConverterTest.groovy  |  333 -----
 .../internal/file/DefaultFileOperationsTest.groovy |  326 -----
 .../internal/file/copy/RegExpNameMapperTest.java   |   34 -
 .../file/pattern/DefaultPatternMatcherTest.java    |  218 ---
 .../api/internal/project/DefaultProjectTest.groovy | 1076 --------------
 .../XmlPersistableConfigurationObjectTest.groovy   |   70 -
 .../tasks/util/DefaultJavaForkOptionsTest.groovy   |  266 ----
 .../util/DefaultProcessForkOptionsTest.groovy      |  111 --
 .../DefaultCommandLineConverterTest.java           |  366 -----
 .../DefaultInitScriptFinderTest.java               |   67 -
 .../org/gradle/listener/ListenerBroadcastTest.java |  334 -----
 .../org/gradle/util/GradleVersionTest.groovy       |  138 --
 .../src/test/groovy/org/gradle/util/JvmTest.groovy |   44 -
 .../src/test/groovy/org/gradle/util/TestFile.java  |  439 ------
 subprojects/gradle-docs/docs.gradle                |  489 -------
 .../src/docs/dsl/org.gradle.api.Project.xml        |  235 ----
 .../gradle-docs/src/docs/userguide/commandLine.xml |  236 ----
 .../src/docs/userguide/customPlugins.xml           |  104 --
 .../gradle-docs/src/docs/userguide/customTasks.xml |  144 --
 .../gradle-docs/src/docs/userguide/ideSupport.xml  |   58 -
 .../src/docs/userguide/installation.xml            |  123 --
 .../customBuildLanguage/basicEdition/build.gradle  |    9 -
 .../enterpriseEdition/build.gradle                 |   10 -
 .../src/samples/customPlugin/build.gradle          |   15 -
 .../main/groovy/org/gradle/GreetingPlugin.groovy   |   11 -
 .../src/main/groovy/org/gradle/GreetingTask.groovy |   11 -
 .../groovy/org/gradle/GreetingPluginTest.groovy    |   16 -
 .../src/samples/gradleUserHome/build.gradle        |   13 -
 .../src/samples/maven/pomGeneration/build.gradle   |  109 --
 .../src/samples/maven/quickstart/build.gradle      |   30 -
 .../projectCoreProperties/subProject/build.gradle  |    0
 .../gradle/plugins/eclipse/EclipseClasspath.groovy |  100 --
 .../gradle/plugins/eclipse/EclipsePlugin.groovy    |  160 ---
 .../gradle/plugins/eclipse/EclipseProject.groovy   |  125 --
 .../org/gradle/plugins/eclipse/EclipseWtp.groovy   |  187 ---
 .../gradle/plugins/eclipse/model/Classpath.groovy  |   96 --
 .../org/gradle/plugins/eclipse/model/Wtp.groovy    |  181 ---
 .../eclipse/model/internal/ClasspathFactory.groovy |  186 ---
 .../plugins/eclipse/EclipseClasspathTest.groovy    |   54 -
 .../plugins/eclipse/EclipsePluginTest.groovy       |  186 ---
 .../plugins/eclipse/EclipseProjectTest.groovy      |   53 -
 .../plugins/eclipse/model/ClasspathTest.groovy     |   97 --
 .../org/gradle/plugins/idea/IdeaModule.groovy      |  279 ----
 .../org/gradle/plugins/idea/IdeaPlugin.groovy      |  113 --
 .../org/gradle/plugins/idea/model/Module.groovy    |  317 -----
 .../org/gradle/plugins/idea/IdeaPluginTest.groovy  |  134 --
 .../gradle/plugins/idea/model/ModuleTest.groovy    |  118 --
 .../plugins/idea/model/PathFactoryTest.groovy      |  170 ---
 .../org/gradle/api/plugins/jetty/JettyPlugin.java  |  166 ---
 .../org/gradle/api/plugins/jetty/JettyRunWar.java  |  131 --
 .../api/plugins/jetty/ScanTargetPattern.java       |   62 -
 .../groovy/org/gradle/api/plugins/MavenPlugin.java |  127 --
 .../api/plugins/MavenPluginConventionTest.groovy   |   61 -
 ...CrossVersionCompatibilityIntegrationTest.groovy |   80 --
 .../integtests/openapi/GradleRunnerTest.groovy     |  262 ----
 .../gradle/integtests/openapi/OpenApiUiTest.groovy |  986 -------------
 .../integtests/openapi/OutputUILordTest.groovy     |  130 --
 .../openapi/TestSettingsNodeVersion1.java          |  247 ----
 .../org/gradle/foundation/BootstrapLoader.java     |  193 ---
 .../gradle/foundation/ParentLastClassLoader.java   |   88 --
 .../gradle/openapi/external/ExternalUtility.java   |  194 ---
 .../foundation/GradleInterfaceVersion1.java        |   99 --
 .../foundation/GradleInterfaceVersion2.java        |   95 --
 .../external/foundation/ProjectVersion1.java       |   89 --
 .../foundation/RequestObserverVersion1.java        |   58 -
 .../foundation/favorites/FavoriteTaskVersion1.java |   49 -
 .../favorites/FavoritesEditorVersion1.java         |  101 --
 .../external/runner/GradleRunnerFactory.java       |  156 --
 .../runner/GradleRunnerInteractionVersion1.java    |   99 --
 .../external/runner/GradleRunnerVersion1.java      |   39 -
 .../ui/AlternateUIInteractionVersion1.java         |   69 -
 .../openapi/external/ui/BasicGradleUIVersion1.java |  222 ---
 ...ommandLineArgumentAlteringListenerVersion1.java |   36 -
 .../openapi/external/ui/DualPaneUIVersion1.java    |   57 -
 .../openapi/external/ui/GradleTabVersion1.java     |   52 -
 .../external/ui/GradleUIInteractionVersion1.java   |   43 -
 .../external/ui/OutputObserverVersion1.java        |   68 -
 .../openapi/external/ui/OutputUILordVersion1.java  |   72 -
 .../openapi/external/ui/SettingsNodeVersion1.java  |   63 -
 .../openapi/external/ui/SinglePaneUIVersion1.java  |   40 -
 .../org/gradle/openapi/external/ui/UIFactory.java  |  283 ----
 .../org/gradle/api/plugins/osgi/OsgiPlugin.groovy  |   46 -
 .../plugins/osgi/DefaultAnalyzerFactoryTest.java   |   29 -
 .../plugins/osgi/OsgiPluginConventionTest.groovy   |   59 -
 .../tasks/testing/junit/JUnitTestFramework.java    |  105 --
 .../results/AttachParentTestResultProcessor.java   |   54 -
 .../tasks/testing/testng/TestNGTestFramework.java  |   98 --
 .../org/gradle/api/plugins/BasePlugin.groovy       |  171 ---
 .../org/gradle/api/plugins/GroovyBasePlugin.java   |  131 --
 .../org/gradle/api/plugins/JavaBasePlugin.java     |  293 ----
 .../groovy/org/gradle/api/plugins/JavaPlugin.java  |  213 ---
 .../groovy/org/gradle/api/plugins/WarPlugin.java   |  112 --
 .../external/javadoc/CoreJavadocOptions.java       |  566 --------
 .../AbstractListJavadocOptionFileOption.java       |   62 -
 .../internal/BooleanJavadocOptionFileOption.java   |   40 -
 .../internal/EnumJavadocOptionFileOption.java      |   55 -
 .../internal/FileJavadocOptionFileOption.java      |   41 -
 .../internal/GroupsJavadocOptionFileOption.java    |   61 -
 .../internal/JavadocOptionFileWriterContext.java   |  112 --
 .../LinksOfflineJavadocOptionFileOption.java       |   40 -
 .../MultilineStringsJavadocOptionFileOption.java   |   44 -
 .../OptionLessStringsJavadocOptionFileOption.java  |   60 -
 .../testing/junit/JUnitTestFrameworkTest.java      |  114 --
 .../testing/testng/TestNGTestFrameworkTest.java    |   89 --
 .../gradle/api/plugins/JavaBasePluginTest.groovy   |  156 --
 .../testing/AbstractTestFrameworkOptionsTest.java  |   37 -
 .../javadoc/StandardJavadocDocletOptionsTest.java  |  514 -------
 .../api/plugins/scala/ScalaBasePlugin.groovy       |   76 -
 .../gradle/api/plugins/scala/ScalaPlugin.groovy    |   45 -
 .../org/gradle/api/tasks/ScalaSourceSet.java       |   51 -
 .../integtests/FavoritesIntegrationTest.java       |  396 ------
 .../integtests/LiveOutputIntegrationTest.groovy    |  212 ---
 ...projectProjectAndTaskListIntegrationTest.groovy |  251 ----
 .../gradle/foundation/CommandLineAssistant.java    |  191 ---
 .../org/gradle/foundation/PathParserPortion.java   |   60 -
 .../org/gradle/foundation/ProjectConverter.java    |  144 --
 .../java/org/gradle/foundation/ProjectView.java    |  250 ----
 .../main/java/org/gradle/foundation/TaskView.java  |   98 --
 .../gradle/foundation/common/ListReorderer.java    |  354 -----
 .../org/gradle/foundation/common/ObserverLord.java |  174 ---
 .../gradle/foundation/common/ReorderableList.java  |  566 --------
 .../gradle/foundation/ipc/basic/ClientProcess.java |  164 ---
 .../gradle/foundation/ipc/basic/MessageObject.java |   70 -
 .../foundation/ipc/basic/ObjectSocketWrapper.java  |  124 --
 .../ipc/basic/ProcessLauncherServer.java           |  162 ---
 .../org/gradle/foundation/ipc/basic/Server.java    |  308 ----
 .../ipc/gradle/AbstractGradleServerProtocol.java   |  480 -------
 .../gradle/ExecuteGradleCommandClientProtocol.java |  240 ----
 .../gradle/ExecuteGradleCommandServerProtocol.java |  152 --
 .../gradle/foundation/ipc/gradle/GradleClient.java |   96 --
 .../gradle/foundation/ipc/gradle/IPCUtilities.java |   88 --
 .../ipc/gradle/KillGradleClientProtocol.java       |   47 -
 .../ipc/gradle/KillGradleServerProtocol.java       |   58 -
 .../ipc/gradle/TaskListClientProtocol.java         |  154 --
 .../ipc/gradle/TaskListServerProtocol.java         |  140 --
 .../org/gradle/foundation/output/FileLink.java     |  114 --
 .../foundation/output/FileLinkDefinitionLord.java  |  215 ---
 .../gradle/foundation/output/LiveOutputParser.java |  122 --
 .../org/gradle/foundation/output/OutputParser.java |  111 --
 .../definitions/ExtensionFileLinkDefinition.java   |  140 --
 .../output/definitions/FileLinkDefinition.java     |   52 -
 .../OptionalLineNumberFileLinkDefinition.java      |   39 -
 .../definitions/PrefixedFileLinkDefinition.java    |  241 ----
 .../definitions/TestReportFileLinkDefinition.java  |   94 --
 .../gradle/foundation/queue/ExecutionQueue.java    |  131 --
 .../visitors/AllProjectsAndTasksVisitor.java       |  142 --
 .../visitors/TaskTreePopulationVisitor.java        |  165 ---
 .../visitors/UniqueNameProjectAndTaskVisitor.java  |   91 --
 .../CommandLineArgumentAlteringListener.java       |   33 -
 .../gradleplugin/foundation/DOM4JSerializer.java   |  274 ----
 .../gradleplugin/foundation/Dom4JUtility.java      |  116 --
 .../foundation/ExtensionFileFilter.java            |   56 -
 .../gradleplugin/foundation/GradlePluginLord.java  |  745 ----------
 .../foundation/favorites/FavoriteTask.java         |   66 -
 .../foundation/favorites/FavoritesEditor.java      |  504 -------
 .../favorites/FavoritesSerializable.java           |  123 --
 .../foundation/filters/BasicFilterEditor.java      |  274 ----
 .../filters/BasicProjectAndTaskFilter.java         |  196 ---
 .../foundation/request/AbstractRequest.java        |  140 --
 .../foundation/request/ExecutionRequest.java       |   69 -
 .../foundation/request/RefreshTaskListRequest.java |  114 --
 .../gradleplugin/foundation/request/Request.java   |   75 -
 .../foundation/runner/GradleRunner.java            |   77 -
 .../foundation/settings/SettingsNode.java          |  189 ---
 .../foundation/settings/SettingsSerializable.java  |   39 -
 .../userinterface/AlternateUIInteraction.java      |   57 -
 .../swing/common/BorderlessImageButton.java        |  117 --
 .../swing/common/BorderlessImageToggleButton.java  |  132 --
 .../swing/common/BorderlessUtility.java            |   35 -
 .../swing/common/PreferencesAssistant.java         |  175 ---
 .../swing/generic/AbstractGradleUIInstance.java    |  232 ---
 .../userinterface/swing/generic/BasicGradleUI.java |  164 ---
 .../swing/generic/DualPaneUIInstance.java          |   62 -
 .../swing/generic/MainGradlePanel.java             |  250 ----
 .../userinterface/swing/generic/OutputPanel.java   |  501 -------
 .../swing/generic/OutputPanelLord.java             |  474 -------
 .../userinterface/swing/generic/OutputTab.java     |  163 ---
 .../swing/generic/OutputTextPane.java              |  340 -----
 .../userinterface/swing/generic/OutputUILord.java  |   95 --
 .../swing/generic/SinglePaneUIInstance.java        |  113 --
 .../SwingAddMultipleFavoritesInteraction.java      |  219 ---
 .../generic/SwingEditFavoriteInteraction.java      |  203 ---
 .../swing/generic/SwingExportInteraction.java      |   77 -
 .../swing/generic/SwingImportInteraction.java      |   63 -
 .../swing/generic/TaskTreeComponent.java           |  708 ----------
 .../userinterface/swing/generic/Utility.java       |  210 ---
 .../generic/filter/AbstractFilterEditorPanel.java  |  246 ----
 .../generic/filter/ProjectAndTaskFilterDialog.java |  288 ----
 .../swing/generic/tabs/CommandLineTab.java         |  153 --
 .../swing/generic/tabs/FavoriteTasksTab.java       |  423 ------
 .../swing/generic/tabs/GradleTab.java              |   43 -
 .../userinterface/swing/generic/tabs/SetupTab.java |  627 ---------
 .../swing/generic/tabs/TaskTreeTab.java            |  598 --------
 .../swing/standalone/Application.java              |  396 ------
 .../swing/standalone/BlockingApplication.java      |  106 --
 .../openapi/wrappers/RunnerWrapperFactory.java     |   68 -
 .../gradle/openapi/wrappers/UIWrapperFactory.java  |   68 -
 .../foundation/GradleInterfaceWrapperVersion1.java |  152 --
 .../foundation/GradleInterfaceWrapperVersion2.java |   89 --
 .../wrappers/foundation/ProjectWrapper.java        |  156 --
 .../foundation/RequestObserverWrapper.java         |   77 -
 .../wrappers/foundation/RequestWrapper.java        |   98 --
 .../openapi/wrappers/foundation/TaskWrapper.java   |   94 --
 .../foundation/favorites/FavoriteTaskWrapper.java  |   66 -
 .../favorites/FavoritesEditorWrapper.java          |  128 --
 .../runner/GradleRunnerInteractionWrapper.java     |  129 --
 .../wrappers/runner/GradleRunnerWrapper.java       |   57 -
 .../wrappers/ui/AbstractOpenAPIUIWrapper.java      |  349 -----
 .../ui/AlternateUIInteractionVersionWrapper.java   |   65 -
 ...CommandLineArgumentAlteringListenerWrapper.java |   43 -
 .../openapi/wrappers/ui/DualPaneUIWrapper.java     |   70 -
 .../wrappers/ui/GradleTabVersionWrapper.java       |   51 -
 .../openapi/wrappers/ui/OutputObserverWrapper.java |   98 --
 .../openapi/wrappers/ui/OutputUILordWrapper.java   |   85 --
 .../openapi/wrappers/ui/SinglePaneUIWrapper.java   |   52 -
 .../org/gradle/foundation/FileLinkTests.java       |  238 ----
 .../gradle/foundation/LiveOutputParserTests.java   |  261 ----
 .../groovy/org/gradle/foundation/TestUtility.java  |  432 ------
 .../wrapper/internal/WrapperScriptGenerator.java   |   96 --
 .../org/gradle/wrapper/BootstrapMainStarter.java   |   48 -
 .../src/main/java/org/gradle/wrapper/Download.java |   73 -
 .../java/org/gradle/wrapper/GradleWrapperMain.java |   69 -
 .../src/main/java/org/gradle/wrapper/Install.java  |  159 ---
 .../java/org/gradle/wrapper/PathAssembler.java     |   75 -
 .../src/main/java/org/gradle/wrapper/Wrapper.java  |   74 -
 .../wrapper/internal/unixWrapperScriptHead.txt     |   63 -
 .../wrapper/internal/unixWrapperScriptTail.txt     |   78 -
 .../wrapper/internal/windowsWrapperScriptHead.txt  |  101 --
 .../wrapper/internal/windowsWrapperScriptTail.txt  |   21 -
 .../groovy/org/gradle/wrapper/InstallTest.groovy   |  154 --
 .../org/gradle/wrapper/PathAssemblerTest.java      |  101 --
 .../groovy/org/gradle/wrapper/WrapperTest.java     |   77 -
 subprojects/gradle-wrapper/wrapper.gradle          |   43 -
 subprojects/{gradle-idea => idea}/idea.gradle      |    0
 .../org/gradle/plugins/idea/IdeaModule.groovy      |  278 ++++
 .../org/gradle/plugins/idea/IdeaPlugin.groovy      |  113 ++
 .../org/gradle/plugins/idea/IdeaProject.groovy     |    0
 .../org/gradle/plugins/idea/IdeaWorkspace.groovy   |    0
 .../org/gradle/plugins/idea/model/Dependency.java  |    0
 .../gradle/plugins/idea/model/JarDirectory.groovy  |    0
 .../org/gradle/plugins/idea/model/Jdk.groovy       |    0
 .../org/gradle/plugins/idea/model/Module.groovy    |  317 +++++
 .../plugins/idea/model/ModuleDependency.groovy     |    0
 .../gradle/plugins/idea/model/ModuleLibrary.groovy |    0
 .../gradle/plugins/idea/model/ModulePath.groovy    |    0
 .../org/gradle/plugins/idea/model/Path.groovy      |    0
 .../gradle/plugins/idea/model/PathFactory.groovy   |    0
 .../org/gradle/plugins/idea/model/Project.groovy   |    0
 .../org/gradle/plugins/idea/model/Workspace.groovy |    0
 .../gradle/plugins/idea/model/package-info.java    |    0
 .../META-INF/gradle-plugins/idea.properties        |    0
 .../gradle/plugins/idea/model/defaultModule.xml    |    0
 .../gradle/plugins/idea/model/defaultProject.xml   |    0
 .../gradle/plugins/idea/model/defaultWorkspace.xml |    0
 .../org/gradle/plugins/idea/package-info.java      |    0
 .../org/gradle/plugins/idea/IdeaPluginTest.groovy  |  134 ++
 .../plugins/idea/model/ModuleDependencyTest.groovy |    0
 .../plugins/idea/model/ModuleLibraryTest.groovy    |    0
 .../plugins/idea/model/ModulePathTest.groovy       |    0
 .../gradle/plugins/idea/model/ModuleTest.groovy    |  118 ++
 .../plugins/idea/model/PathFactoryTest.groovy      |  170 +++
 .../org/gradle/plugins/idea/model/PathTest.groovy  |    0
 .../gradle/plugins/idea/model/ProjectTest.groovy   |    0
 .../org/gradle/plugins/idea/model/customModule.xml |    0
 .../gradle/plugins/idea/model/customProject.xml    |    0
 .../gradle/plugins/idea/model/customWorkspace.xml  |    0
 subprojects/{gradle-jetty => jetty}/jetty.gradle   |    0
 .../api/plugins/jetty/AbstractJettyRunTask.java    |    0
 .../org/gradle/api/plugins/jetty/JettyPlugin.java  |  169 +++
 .../api/plugins/jetty/JettyPluginConvention.java   |    0
 .../org/gradle/api/plugins/jetty/JettyRun.java     |    0
 .../org/gradle/api/plugins/jetty/JettyRunWar.java  |  127 ++
 .../org/gradle/api/plugins/jetty/JettyStop.java    |    0
 .../api/plugins/jetty/ScanTargetPattern.java       |   54 +
 .../api/plugins/jetty/internal/ConsoleScanner.java |    0
 .../plugins/jetty/internal/Jetty6PluginServer.java |    0
 .../plugins/jetty/internal/JettyConfiguration.java |    0
 .../plugins/jetty/internal/JettyPluginServer.java  |    0
 .../jetty/internal/JettyPluginWebAppContext.java   |    0
 .../gradle/api/plugins/jetty/internal/Monitor.java |    0
 .../gradle/api/plugins/jetty/internal/Proxy.java   |    0
 .../org/gradle/api/plugins/jetty/package-info.java |    0
 .../META-INF/gradle-plugins/jetty.properties       |    0
 .../api/plugins/jetty/JettyPluginTest.groovy       |    0
 .../{gradle-launcher => launcher}/launcher.gradle  |    0
 .../gradle/launcher/CommandLineActionFactory.java  |    0
 .../org/gradle/launcher/DaemonBuildAction.java     |    0
 .../org/gradle/launcher/DaemonClientAction.java    |    0
 .../java/org/gradle/launcher/DaemonConnector.java  |    0
 .../main/java/org/gradle/launcher/DaemonMain.java  |    0
 .../org/gradle/launcher/ExecutionListener.java     |    0
 .../java/org/gradle/launcher/GradleDaemon.java     |    0
 .../main/java/org/gradle/launcher/GradleMain.java  |    0
 .../gradle/launcher/IncomingConnectionHandler.java |    0
 .../src/main/java/org/gradle/launcher/Main.java    |    0
 .../java/org/gradle/launcher/ProcessBootstrap.java |    0
 .../java/org/gradle/launcher/RunBuildAction.java   |    0
 .../java/org/gradle/launcher/StopDaemonAction.java |    0
 .../java/org/gradle/launcher/protocol/Build.java   |    0
 .../java/org/gradle/launcher/protocol/Command.java |    0
 .../gradle/launcher/protocol/CommandComplete.java  |    0
 .../java/org/gradle/launcher/protocol/Stop.java    |    0
 .../launcher/CommandLineActionFactoryTest.groovy   |    0
 .../gradle/launcher/DaemonBuildActionTest.groovy   |    0
 .../groovy/org/gradle/launcher/MainTest.groovy     |    0
 .../org/gradle/launcher/RunBuildActionTest.groovy  |    0
 .../gradle/launcher/StopDaemonActionTest.groovy    |    0
 subprojects/{gradle-maven => maven}/maven.gradle   |    0
 .../groovy/org/gradle/api/plugins/MavenPlugin.java |  127 ++
 .../gradle/api/plugins/MavenPluginConvention.java  |    0
 .../META-INF/gradle-plugins/maven.properties       |    0
 .../api/plugins/MavenPluginConventionTest.groovy   |   61 +
 .../org/gradle/api/plugins/MavenPluginTest.java    |    0
 .../{gradle-open-api => open-api}/open-api.gradle  |    0
 .../openapi/BlockingRequestObserver.java           |    0
 .../integtests/openapi/CrossVersionBuilder.java    |    0
 ...CrossVersionCompatibilityIntegrationTest.groovy |   78 +
 .../integtests/openapi/GradleRunnerTest.groovy     |  259 ++++
 .../gradle/integtests/openapi/OpenApiFixture.java  |    0
 .../gradle/integtests/openapi/OpenApiUiTest.groovy |  983 +++++++++++++
 .../integtests/openapi/OutputUILordTest.groovy     |  127 ++
 .../TestAlternateUIInteractionVersion1.java        |    0
 .../openapi/TestSettingsNodeVersion1.java          |  247 ++++
 .../TestSingleDualPaneUIInteractionVersion1.java   |    0
 .../shared/build.gradle                            |    0
 .../shared/settings.gradle                         |    0
 .../integtests/openapi/testproject/build.gradle    |    0
 .../integtests/openapi/testproject/settings.gradle |    0
 .../org/gradle/foundation/BootstrapLoader.java     |  189 +++
 .../gradle/foundation/ParentLastClassLoader.java   |   73 +
 .../gradle/openapi/external/ExternalUtility.java   |  168 +++
 .../foundation/GradleInterfaceVersion1.java        |   89 ++
 .../foundation/GradleInterfaceVersion2.java        |   89 ++
 .../external/foundation/ProjectVersion1.java       |   83 ++
 .../foundation/RequestObserverVersion1.java        |   52 +
 .../external/foundation/RequestVersion1.java       |    0
 .../openapi/external/foundation/TaskVersion1.java  |    0
 .../foundation/favorites/FavoriteTaskVersion1.java |   48 +
 .../favorites/FavoritesEditorVersion1.java         |  105 ++
 .../external/runner/GradleRunnerFactory.java       |  132 ++
 .../runner/GradleRunnerInteractionVersion1.java    |   83 ++
 .../external/runner/GradleRunnerVersion1.java      |   35 +
 .../ui/AlternateUIInteractionVersion1.java         |   59 +
 .../openapi/external/ui/BasicGradleUIVersion1.java |  199 +++
 ...ommandLineArgumentAlteringListenerVersion1.java |   32 +
 .../external/ui/DualPaneUIInteractionVersion1.java |    0
 .../openapi/external/ui/DualPaneUIVersion1.java    |   56 +
 .../openapi/external/ui/GradleTabVersion1.java     |   51 +
 .../external/ui/GradleUIInteractionVersion1.java   |   42 +
 .../external/ui/OutputObserverVersion1.java        |   56 +
 .../openapi/external/ui/OutputUILordVersion1.java  |   70 +
 .../openapi/external/ui/SettingsNodeVersion1.java  |   67 +
 .../ui/SinglePaneUIInteractionVersion1.java        |    0
 .../openapi/external/ui/SinglePaneUIVersion1.java  |   39 +
 .../org/gradle/openapi/external/ui/UIFactory.java  |  233 +++
 .../openapi/external/ExternalUtilityTest.groovy    |    0
 subprojects/{gradle-osgi => osgi}/osgi.gradle      |    0
 .../plugins/osgi/ContainedVersionAnalyzer.java     |    0
 .../plugins/osgi/DefaultAnalyzerFactory.java       |    0
 .../internal/plugins/osgi/DefaultOsgiManifest.java |    0
 .../api/internal/plugins/osgi/OsgiHelper.java      |    0
 .../org/gradle/api/plugins/osgi/OsgiManifest.java  |    0
 .../org/gradle/api/plugins/osgi/OsgiPlugin.groovy  |   46 +
 .../api/plugins/osgi/OsgiPluginConvention.java     |    0
 .../org/gradle/api/plugins/osgi/package-info.java  |    0
 .../META-INF/gradle-plugins/osgi.properties        |    0
 .../plugins/osgi/DefaultAnalyzerFactoryTest.java   |   30 +
 .../plugins/osgi/DefaultOsgiManifestTest.java      |    0
 .../plugins/osgi/OsgiPluginConventionTest.groovy   |   59 +
 .../gradle/api/plugins/osgi/OsgiPluginTest.groovy  |    0
 .../{gradle-plugins => plugins}/plugins.gradle     |    0
 .../api/internal/plugins/ProcessResources.java     |    0
 .../api/internal/tasks/DefaultGroovySourceSet.java |    0
 .../api/internal/tasks/DefaultSourceSet.java       |    0
 .../internal/tasks/DefaultSourceSetContainer.java  |    0
 .../api/internal/tasks/compile/AntDepend.java      |    0
 .../compile/AntDependsStaleClassCleaner.groovy     |    0
 .../tasks/compile/AntGroovyCompiler.groovy         |    0
 .../internal/tasks/compile/AntJavaCompiler.groovy  |    0
 .../api/internal/tasks/compile/Compiler.java       |    0
 .../api/internal/tasks/compile/GroovyCompiler.java |    0
 .../tasks/compile/GroovyJavaJointCompiler.java     |    0
 .../tasks/compile/IncrementalGroovyCompiler.java   |    0
 .../tasks/compile/IncrementalJavaCompiler.java     |    0
 .../compile/IncrementalJavaSourceCompiler.java     |    0
 .../api/internal/tasks/compile/JavaCompiler.java   |    0
 .../internal/tasks/compile/JavaSourceCompiler.java |    0
 .../tasks/compile/SimpleStaleClassCleaner.java     |    0
 .../internal/tasks/compile/StaleClassCleaner.java  |    0
 .../tasks/testing/AbstractTestDescriptor.java      |    0
 .../tasks/testing/DecoratingTestDescriptor.java    |    0
 .../tasks/testing/DefaultTestClassDescriptor.java  |    0
 .../tasks/testing/DefaultTestClassRunInfo.java     |    0
 .../tasks/testing/DefaultTestDescriptor.java       |    0
 .../tasks/testing/DefaultTestMethodDescriptor.java |    0
 .../tasks/testing/DefaultTestSuiteDescriptor.java  |    0
 .../tasks/testing/SuiteTestClassProcessor.java     |    0
 .../internal/tasks/testing/TestClassProcessor.java |    0
 .../internal/tasks/testing/TestClassRunInfo.java   |    0
 .../internal/tasks/testing/TestCompleteEvent.java  |    0
 .../tasks/testing/TestDescriptorInternal.java      |    0
 .../api/internal/tasks/testing/TestFramework.java  |    0
 .../internal/tasks/testing/TestOutputEvent.java    |    0
 .../tasks/testing/TestResultProcessor.java         |    0
 .../api/internal/tasks/testing/TestStartEvent.java |    0
 .../tasks/testing/TestSuiteExecutionException.java |    0
 .../testing/WorkerTestClassProcessorFactory.java   |    0
 .../detection/AbstractTestFrameworkDetector.java   |    0
 .../detection/ClassFileExtractionManager.java      |    0
 .../testing/detection/DefaultTestClassScanner.java |    0
 .../testing/detection/DefaultTestExecuter.java     |    0
 .../testing/detection/JarFilePackageListener.java  |    0
 .../testing/detection/JarFilePackageLister.java    |    0
 .../tasks/testing/detection/TestClassVisitor.java  |    0
 .../tasks/testing/detection/TestExecuter.java      |    0
 .../testing/detection/TestFrameworkDetector.java   |    0
 .../tasks/testing/junit/AntJUnitReport.groovy      |    0
 .../tasks/testing/junit/JULRedirector.java         |    0
 .../junit/JUnit4TestResultProcessorAdapter.java    |    0
 .../tasks/testing/junit/JUnitDetector.java         |    0
 .../testing/junit/JUnitTestClassDetecter.java      |    0
 .../testing/junit/JUnitTestClassExecuter.java      |    0
 .../testing/junit/JUnitTestClassProcessor.java     |    0
 .../tasks/testing/junit/JUnitTestFramework.java    |  101 ++
 .../testing/junit/JUnitTestMethodDetecter.java     |    0
 .../junit/JUnitTestResultProcessorAdapter.java     |    0
 .../testing/junit/JUnitXmlReportGenerator.java     |    0
 .../CaptureTestOutputTestResultProcessor.java      |    0
 .../processors/MaxNParallelTestClassProcessor.java |    0
 .../RestartEveryNTestClassProcessor.java           |    0
 .../tasks/testing/processors/TestMainAction.java   |    0
 .../results/AttachParentTestResultProcessor.java   |   53 +
 .../tasks/testing/results/DefaultTestResult.java   |    0
 .../testing/results/LoggingResultProcessor.java    |    0
 .../results/StateTrackingTestResultProcessor.java  |    0
 .../tasks/testing/results/TestListenerAdapter.java |    0
 .../internal/tasks/testing/results/TestLogger.java |    0
 .../tasks/testing/results/TestSummaryListener.java |    0
 .../tasks/testing/testng/TestNGDetector.java       |    0
 .../testing/testng/TestNGTestClassDetecter.java    |    0
 .../testing/testng/TestNGTestClassProcessor.java   |    0
 .../tasks/testing/testng/TestNGTestFramework.java  |   97 ++
 .../testing/testng/TestNGTestMethodDetecter.java   |    0
 .../testng/TestNGTestResultProcessorAdapter.java   |    0
 .../testing/worker/ForkingTestClassProcessor.java  |    0
 .../testing/worker/RemoteTestClassProcessor.java   |    0
 .../internal/tasks/testing/worker/TestWorker.java  |    0
 .../testing/worker/WorkerTestClassProcessor.java   |    0
 .../org/gradle/api/java/archives/Attributes.java   |    0
 .../org/gradle/api/java/archives/Manifest.java     |    0
 .../api/java/archives/ManifestException.java       |    0
 .../api/java/archives/ManifestMergeDetails.java    |    0
 .../api/java/archives/ManifestMergeSpec.java       |    0
 .../java/archives/internal/DefaultAttributes.java  |    0
 .../java/archives/internal/DefaultManifest.java    |    0
 .../internal/DefaultManifestMergeDetails.java      |    0
 .../internal/DefaultManifestMergeSpec.java         |    0
 .../org/gradle/api/java/archives/package-info.java |    0
 .../org/gradle/api/plugins/BasePlugin.groovy       |  171 +++
 .../gradle/api/plugins/BasePluginConvention.groovy |    0
 .../org/gradle/api/plugins/GroovyBasePlugin.java   |  131 ++
 .../org/gradle/api/plugins/GroovyPlugin.java       |    0
 .../org/gradle/api/plugins/JavaBasePlugin.java     |  293 ++++
 .../groovy/org/gradle/api/plugins/JavaPlugin.java  |  213 +++
 .../gradle/api/plugins/JavaPluginConvention.groovy |    0
 .../gradle/api/plugins/ProjectReportsPlugin.java   |    0
 .../plugins/ProjectReportsPluginConvention.groovy  |    0
 .../gradle/api/plugins/ReportingBasePlugin.java    |    0
 .../api/plugins/ReportingBasePluginConvention.java |    0
 .../groovy/org/gradle/api/plugins/WarPlugin.java   |  112 ++
 .../gradle/api/plugins/WarPluginConvention.groovy  |    0
 .../org/gradle/api/tasks/GroovySourceSet.java      |    0
 .../groovy/org/gradle/api/tasks/SourceSet.java     |    0
 .../org/gradle/api/tasks/SourceSetContainer.java   |    0
 .../org/gradle/api/tasks/bundling/Jar.groovy       |    0
 .../org/gradle/api/tasks/bundling/War.groovy       |    0
 .../gradle/api/tasks/compile/AbstractCompile.java  |    0
 .../api/tasks/compile/AbstractOptions.groovy       |    0
 .../org/gradle/api/tasks/compile/Compile.java      |    0
 .../gradle/api/tasks/compile/CompileOptions.groovy |    0
 .../gradle/api/tasks/compile/DebugOptions.groovy   |    0
 .../gradle/api/tasks/compile/DependOptions.groovy  |    0
 .../gradle/api/tasks/compile/ForkOptions.groovy    |    0
 .../gradle/api/tasks/compile/GroovyCompile.java    |    0
 .../api/tasks/compile/GroovyCompileOptions.groovy  |    0
 .../api/tasks/compile/GroovyForkOptions.groovy     |    0
 .../org/gradle/api/tasks/compile/package-info.java |    0
 .../gradle/api/tasks/javadoc/AntGroovydoc.groovy   |    0
 .../org/gradle/api/tasks/javadoc/AntJavadoc.groovy |    0
 .../org/gradle/api/tasks/javadoc/Groovydoc.java    |    0
 .../org/gradle/api/tasks/javadoc/Javadoc.java      |    0
 .../org/gradle/api/tasks/javadoc/package-info.java |    0
 .../groovy/org/gradle/api/tasks/testing/Test.java  |    0
 .../gradle/api/tasks/testing/TestDescriptor.java   |    0
 .../api/tasks/testing/TestFrameworkOptions.java    |    0
 .../org/gradle/api/tasks/testing/TestListener.java |    0
 .../org/gradle/api/tasks/testing/TestResult.java   |    0
 .../api/tasks/testing/junit/JUnitOptions.java      |    0
 .../api/tasks/testing/junit/package-info.java      |    0
 .../org/gradle/api/tasks/testing/package-info.java |    0
 .../api/tasks/testing/testng/TestNGOptions.groovy  |    0
 .../api/tasks/testing/testng/package-info.java     |    0
 .../external/javadoc/CoreJavadocOptions.java       |  565 ++++++++
 .../external/javadoc/JavadocMemberLevel.java       |    0
 .../external/javadoc/JavadocOfflineLink.java       |    0
 .../external/javadoc/JavadocOptionFileOption.java  |    0
 .../external/javadoc/JavadocOutputLevel.java       |    0
 .../external/javadoc/MinimalJavadocOptions.java    |    0
 .../javadoc/OptionLessJavadocOptionFileOption.java |    0
 .../javadoc/StandardJavadocDocletOptions.java      |    0
 .../internal/AbstractJavadocOptionFileOption.java  |    0
 .../AbstractListJavadocOptionFileOption.java       |   60 +
 .../internal/BooleanJavadocOptionFileOption.java   |   40 +
 .../internal/EnumJavadocOptionFileOption.java      |   55 +
 .../internal/FileJavadocOptionFileOption.java      |   41 +
 .../internal/GroupsJavadocOptionFileOption.java    |   61 +
 .../javadoc/internal/JavadocExecHandleBuilder.java |    0
 .../javadoc/internal/JavadocOptionFile.java        |    0
 .../javadoc/internal/JavadocOptionFileWriter.java  |    0
 .../internal/JavadocOptionFileWriterContext.java   |  111 ++
 .../LinksOfflineJavadocOptionFileOption.java       |   40 +
 .../MultilineStringsJavadocOptionFileOption.java   |   44 +
 .../OptionLessStringsJavadocOptionFileOption.java  |   59 +
 .../internal/PathJavadocOptionFileOption.java      |    0
 .../internal/StringJavadocOptionFileOption.java    |    0
 .../internal/StringsJavadocOptionFileOption.java   |    0
 .../org/gradle/external/javadoc/package-info.java  |    0
 .../META-INF/gradle-plugins/base.properties        |    0
 .../META-INF/gradle-plugins/groovy-base.properties |    0
 .../META-INF/gradle-plugins/groovy.properties      |    0
 .../META-INF/gradle-plugins/java-base.properties   |    0
 .../META-INF/gradle-plugins/java.properties        |    0
 .../gradle-plugins/project-report.properties       |    0
 .../gradle-plugins/project-reports.properties      |    0
 .../META-INF/gradle-plugins/war.properties         |    0
 .../tasks/DefaultGroovySourceSetTest.groovy        |    0
 .../tasks/DefaultSourceSetContainerTest.java       |    0
 .../api/internal/tasks/DefaultSourceSetTest.groovy |    0
 .../IncrementalJavaSourceCompilerTest.groovy       |    0
 .../compile/SimpleStaleClassCleanerTest.groovy     |    0
 .../tasks/testing/AbstractTestFrameworkTest.java   |    0
 .../testing/DefaultTestClassDescriptorTest.groovy  |    0
 .../testing/DefaultTestSuiteDescriptorTest.groovy  |    0
 .../testing/SuiteTestClassProcessorTest.groovy     |    0
 .../tasks/testing/TestStartEventTest.groovy        |    0
 .../detection/DefaultTestClassScannerTest.groovy   |    0
 .../junit/JUnitTestClassProcessorTest.groovy       |    0
 .../testing/junit/JUnitTestFrameworkTest.java      |  114 ++
 ...CaptureTestOutputTestResultProcessorTest.groovy |    0
 .../MaxNParallelTestClassProcessorTest.groovy      |    0
 .../RestartEveryNTestClassProcessorTest.java       |    0
 .../testing/processors/TestMainActionTest.groovy   |    0
 .../AttachParentTestResultProcessorTest.groovy     |    0
 .../testing/results/TestListenerAdapterTest.groovy |    0
 .../tasks/testing/results/TestLoggerTest.groovy    |    0
 .../testing/results/TestSummaryListenerTest.groovy |    0
 .../testng/TestNGTestClassProcessorTest.groovy     |    0
 .../testing/testng/TestNGTestFrameworkTest.java    |   89 ++
 .../worker/ForkingTestClassProcessorTest.java      |    0
 .../tasks/testing/worker/TestWorkerTest.groovy     |    0
 .../archives/internal/DefaultAttributesTest.groovy |    0
 .../internal/DefaultManifestMergeSpecTest.groovy   |    0
 .../archives/internal/DefaultManifestTest.groovy   |    0
 .../api/plugins/BasePluginConventionTest.groovy    |    0
 .../org/gradle/api/plugins/BasePluginTest.groovy   |    0
 .../gradle/api/plugins/GroovyBasePluginTest.groovy |    0
 .../org/gradle/api/plugins/GroovyPluginTest.groovy |    0
 .../gradle/api/plugins/JavaBasePluginTest.groovy   |  156 ++
 .../api/plugins/JavaPluginConventionTest.groovy    |    0
 .../org/gradle/api/plugins/JavaPluginTest.groovy   |    0
 .../api/plugins/ProjectReportsPluginTest.java      |    0
 .../plugins/ReportingBasePluginConventionTest.java |    0
 .../api/plugins/ReportingBasePluginTest.java       |    0
 .../org/gradle/api/plugins/WarPluginTest.groovy    |    0
 .../org/gradle/api/tasks/bundling/JarTest.groovy   |    0
 .../org/gradle/api/tasks/bundling/WarTest.groovy   |    0
 .../api/tasks/compile/AbstractCompileTest.java     |    0
 .../api/tasks/compile/AbstractOptionsTest.groovy   |    0
 .../api/tasks/compile/CompileOptionsTest.groovy    |    0
 .../org/gradle/api/tasks/compile/CompileTest.java  |    0
 .../api/tasks/compile/DebugOptionsTest.groovy      |    0
 .../api/tasks/compile/ForkOptionsTest.groovy       |    0
 .../tasks/compile/GroovyCompileOptionsTest.groovy  |    0
 .../api/tasks/compile/GroovyCompileTest.java       |    0
 .../api/tasks/compile/GroovyForkOptionsTest.groovy |    0
 .../gradle/api/tasks/javadoc/GroovydocTest.java    |    0
 .../org/gradle/api/tasks/javadoc/JavadocTest.java  |    0
 .../testing/AbstractTestFrameworkOptionsTest.java  |   36 +
 .../org/gradle/api/tasks/testing/TestTest.java     |    0
 .../tasks/testing/testng/TestNGOptionsTest.groovy  |    0
 .../javadoc/StandardJavadocDocletOptionsTest.java  |  514 +++++++
 .../BooleanJavadocOptionFileOptionTest.java        |    0
 .../internal/EnumJavadocOptionFileOptionTest.java  |    0
 .../internal/FileJavadocOptionFileOptionTest.java  |    0
 .../GroupsJavadocOptionFileOptionTest.java         |    0
 .../internal/JavadocExecHandleBuilderTest.groovy   |    0
 .../javadoc/internal/JavadocOptionFileTest.java    |    0
 .../JavadocOptionFileWriterContextTest.java        |    0
 .../LinksOfflineJavadocOptionFileOptionTest.java   |    0
 ...ultilineStringsJavadocOptionFileOptionTest.java |    0
 ...tionLessStringsJavadocOptionFileOptionTest.java |    0
 .../internal/PathJavadocOptionFileOptionTest.java  |    0
 .../StringJavadocOptionFileOptionTest.java         |    0
 .../StringsJavadocOptionFileOptionTest.java        |    0
 subprojects/{gradle-scala => scala}/scala.gradle   |    0
 .../api/internal/tasks/DefaultScalaSourceSet.java  |    0
 .../internal/tasks/scala/AntScalaCompiler.groovy   |    0
 .../tasks/scala/DefaultScalaJavaJointCompiler.java |    0
 .../tasks/scala/IncrementalScalaCompiler.java      |    0
 .../api/internal/tasks/scala/ScalaCompiler.java    |    0
 .../tasks/scala/ScalaJavaJointCompiler.java        |    0
 .../api/plugins/scala/ScalaBasePlugin.groovy       |   76 +
 .../gradle/api/plugins/scala/ScalaPlugin.groovy    |   45 +
 .../org/gradle/api/tasks/ScalaSourceSet.java       |   51 +
 .../org/gradle/api/tasks/scala/AntScalaDoc.groovy  |    0
 .../org/gradle/api/tasks/scala/ScalaCompile.java   |    0
 .../api/tasks/scala/ScalaCompileOptions.groovy     |    0
 .../org/gradle/api/tasks/scala/ScalaDoc.java       |    0
 .../gradle/api/tasks/scala/ScalaDocOptions.groovy  |    0
 .../org/gradle/api/tasks/scala/package-info.java   |    0
 .../META-INF/gradle-plugins/scala-base.properties  |    0
 .../META-INF/gradle-plugins/scala.properties       |    0
 .../tasks/DefaultScalaSourceSetTest.groovy         |    0
 .../scala/DefaultScalaJavaJointCompilerTest.groovy |    0
 .../api/plugins/scala/ScalaBasePluginTest.groovy   |    0
 .../api/plugins/scala/ScalaPluginTest.groovy       |    0
 .../api/tasks/scala/ScalaCompileOptionsTest.groovy |    0
 .../gradle/api/tasks/scala/ScalaCompileTest.java   |    0
 .../api/tasks/scala/ScalaDocOptionsTest.groovy     |    0
 .../org/gradle/api/tasks/scala/ScalaDocTest.java   |    0
 .../java/org/gradle/tooling/BuildConnection.java   |   49 +
 .../gradle/tooling/GradleConnectionException.java  |   29 +
 .../java/org/gradle/tooling/GradleConnector.java   |  133 ++
 .../java/org/gradle/tooling/ResultHandler.java     |   27 +
 .../tooling/UnsupportedVersionException.java       |   25 +
 .../CachingToolingImplementationLoader.java        |   41 +
 .../internal/consumer/ConnectionFactory.java       |   57 +
 .../internal/consumer/DefaultBuildConnection.java  |   91 ++
 .../DefaultToolingImplementationLoader.java        |   73 +
 .../tooling/internal/consumer/Distribution.java    |   23 +
 .../internal/consumer/DistributionFactory.java     |   92 ++
 .../internal/consumer/ProtocolToModelAdapter.java  |  153 ++
 .../consumer/ToolingImplementationLoader.java      |   22 +
 .../tooling/internal/protocol/BuildVersion1.java   |   23 +
 .../protocol/ConnectionFactoryVersion1.java        |   30 +
 .../internal/protocol/ConnectionVersion1.java      |   38 +
 .../internal/protocol/DependencyVersion1.java      |   22 +
 .../protocol/ExternalDependencyVersion1.java       |   22 +
 .../tooling/internal/protocol/ProjectVersion1.java |   25 +
 .../internal/protocol/ResultHandlerVersion1.java   |   22 +
 .../protocol/eclipse/EclipseBuildVersion1.java     |   25 +
 .../protocol/eclipse/EclipseProjectVersion1.java   |   28 +
 .../internal/provider/DefaultConnection.java       |  118 ++
 .../provider/DefaultConnectionFactory.java         |   40 +
 .../internal/provider/DefaultEclipseBuild.java     |   31 +
 .../internal/provider/DefaultEclipseProject.java   |   46 +
 .../main/java/org/gradle/tooling/model/Build.java  |   28 +
 .../java/org/gradle/tooling/model/Dependency.java  |   22 +
 .../org/gradle/tooling/model/DomainObjectSet.java  |   41 +
 .../gradle/tooling/model/ExternalDependency.java   |   30 +
 .../java/org/gradle/tooling/model/Project.java     |   35 +
 .../gradle/tooling/model/eclipse/EclipseBuild.java |   28 +
 .../tooling/model/eclipse/EclipseProject.java      |   37 +
 .../gradle/tooling/model/eclipse/package-info.java |   20 +
 .../model/internal/ImmutableDomainObjectSet.java   |   47 +
 .../org/gradle/tooling/model/package-info.java     |   20 +
 .../main/java/org/gradle/tooling/package-info.java |   20 +
 ...ternal.protocol.GradleConnectionFactoryVersion1 |    1 +
 .../org/gradle/tooling/GradleConnectorTest.groovy  |   96 ++
 .../CachingToolingImplementationLoaderTest.groovy  |   74 +
 .../internal/consumer/ConnectionFactoryTest.groovy |   56 +
 .../consumer/DefaultBuildConnectionTest.groovy     |  143 ++
 .../DefaultToolingImplementationLoaderTest.groovy  |   38 +
 .../consumer/ProtocolToModelAdapterTest.groovy     |  124 ++
 .../internal/ImmutableDomainObjectSetTest.groovy   |  101 ++
 subprojects/tooling-api/tooling-api.gradle         |   10 +
 .../integtests/FavoritesIntegrationTest.java       |  379 +++++
 .../integtests/LiveOutputIntegrationTest.groovy    |  210 +++
 ...projectProjectAndTaskListIntegrationTest.groovy |  249 ++++
 .../gradle/foundation/CommandLineAssistant.java    |  186 +++
 .../org/gradle/foundation/PathParserPortion.java   |   59 +
 .../org/gradle/foundation/ProjectConverter.java    |  142 ++
 .../java/org/gradle/foundation/ProjectView.java    |  239 ++++
 .../main/java/org/gradle/foundation/TaskView.java  |   96 ++
 .../gradle/foundation/common/ListReorderer.java    |  344 +++++
 .../org/gradle/foundation/common/ObserverLord.java |  168 +++
 .../gradle/foundation/common/ReorderableList.java  |  525 +++++++
 .../gradle/foundation/ipc/basic/ClientProcess.java |  156 ++
 .../gradle/foundation/ipc/basic/ExecutionInfo.java |    0
 .../gradle/foundation/ipc/basic/MessageObject.java |   70 +
 .../foundation/ipc/basic/ObjectSocketWrapper.java  |  116 ++
 .../ipc/basic/ProcessLauncherServer.java           |  159 +++
 .../org/gradle/foundation/ipc/basic/Server.java    |  276 ++++
 .../ipc/gradle/AbstractGradleServerProtocol.java   |  438 ++++++
 .../gradle/ExecuteGradleCommandClientProtocol.java |  228 +++
 .../gradle/ExecuteGradleCommandServerProtocol.java |  146 ++
 .../gradle/foundation/ipc/gradle/GradleClient.java |   94 ++
 .../gradle/foundation/ipc/gradle/IPCUtilities.java |   84 ++
 .../ipc/gradle/KillGradleClientProtocol.java       |   46 +
 .../ipc/gradle/KillGradleServerProtocol.java       |   58 +
 .../foundation/ipc/gradle/ProtocolConstants.java   |    0
 .../ipc/gradle/TaskListClientProtocol.java         |  147 ++
 .../ipc/gradle/TaskListServerProtocol.java         |  135 ++
 .../org/gradle/foundation/output/FileLink.java     |  110 ++
 .../foundation/output/FileLinkDefinitionLord.java  |  198 +++
 .../gradle/foundation/output/LiveOutputParser.java |  115 ++
 .../org/gradle/foundation/output/OutputParser.java |  101 ++
 .../definitions/ExtensionFileLinkDefinition.java   |  127 ++
 .../output/definitions/FileLinkDefinition.java     |   50 +
 .../OptionalLineNumberFileLinkDefinition.java      |   35 +
 .../definitions/PrefixedFileLinkDefinition.java    |  196 +++
 .../definitions/TestReportFileLinkDefinition.java  |   83 ++
 .../gradle/foundation/queue/ExecutionQueue.java    |  129 ++
 .../visitors/AllProjectsAndTasksVisitor.java       |  137 ++
 .../visitors/TaskTreePopulationVisitor.java        |  160 +++
 .../visitors/UniqueNameProjectAndTaskVisitor.java  |   90 ++
 .../CommandLineArgumentAlteringListener.java       |   32 +
 .../gradleplugin/foundation/DOM4JSerializer.java   |  262 ++++
 .../gradleplugin/foundation/Dom4JUtility.java      |  114 ++
 .../foundation/ExtensionFileFilter.java            |   55 +
 .../gradleplugin/foundation/GradlePluginLord.java  |  690 +++++++++
 .../foundation/favorites/FavoriteTask.java         |   65 +
 .../foundation/favorites/FavoritesEditor.java      |  485 +++++++
 .../favorites/FavoritesSerializable.java           |  122 ++
 .../filters/AllowAllProjectAndTaskFilter.java      |    0
 .../foundation/filters/BasicFilterEditor.java      |  273 ++++
 .../filters/BasicProjectAndTaskFilter.java         |  193 +++
 .../foundation/filters/ProjectAndTaskFilter.java   |    0
 .../foundation/request/AbstractRequest.java        |  126 ++
 .../foundation/request/ExecutionRequest.java       |   67 +
 .../foundation/request/RefreshTaskListRequest.java |  108 ++
 .../gradleplugin/foundation/request/Request.java   |   73 +
 .../foundation/runner/GradleRunner.java            |   75 +
 .../foundation/settings/DOM4JSettingsNode.java     |    0
 .../foundation/settings/SettingsNode.java          |  173 +++
 .../foundation/settings/SettingsSerializable.java  |   38 +
 .../userinterface/AlternateUIInteraction.java      |   54 +
 .../swing/common/BorderlessImageButton.java        |  111 ++
 .../swing/common/BorderlessImageToggleButton.java  |  124 ++
 .../swing/common/BorderlessUtility.java            |   34 +
 .../swing/common/PreferencesAssistant.java         |  164 +++
 .../swing/generic/AbstractGradleUIInstance.java    |  221 +++
 .../userinterface/swing/generic/BasicGradleUI.java |  165 +++
 .../swing/generic/DualPaneUIInstance.java          |   59 +
 .../swing/generic/MainGradlePanel.java             |  242 ++++
 .../userinterface/swing/generic/OutputPanel.java   |  462 ++++++
 .../swing/generic/OutputPanelLord.java             |  436 ++++++
 .../userinterface/swing/generic/OutputTab.java     |  155 ++
 .../swing/generic/OutputTextPane.java              |  316 +++++
 .../userinterface/swing/generic/OutputUILord.java  |   92 ++
 .../swing/generic/SinglePaneUIInstance.java        |  103 ++
 .../SwingAddMultipleFavoritesInteraction.java      |  214 +++
 .../generic/SwingEditFavoriteInteraction.java      |  200 +++
 .../swing/generic/SwingExportInteraction.java      |   73 +
 .../swing/generic/SwingImportInteraction.java      |   61 +
 .../swing/generic/TaskTreeComponent.java           |  670 +++++++++
 .../userinterface/swing/generic/Utility.java       |  186 +++
 .../generic/filter/AbstractFilterEditorPanel.java  |  230 +++
 .../generic/filter/ProjectAndTaskFilterDialog.java |  276 ++++
 .../swing/generic/tabs/CommandLineTab.java         |  142 ++
 .../swing/generic/tabs/FavoriteTasksTab.java       |  413 ++++++
 .../swing/generic/tabs/GradleTab.java              |   43 +
 .../userinterface/swing/generic/tabs/SetupTab.java |  594 ++++++++
 .../swing/generic/tabs/TaskTreeTab.java            |  566 ++++++++
 .../swing/standalone/Application.java              |  374 +++++
 .../swing/standalone/BlockingApplication.java      |  105 ++
 .../openapi/wrappers/RunnerWrapperFactory.java     |   62 +
 .../gradle/openapi/wrappers/UIWrapperFactory.java  |   59 +
 .../foundation/GradleInterfaceWrapperVersion1.java |  151 ++
 .../foundation/GradleInterfaceWrapperVersion2.java |   83 ++
 .../wrappers/foundation/ProjectWrapper.java        |  154 ++
 .../foundation/RequestObserverWrapper.java         |   76 +
 .../wrappers/foundation/RequestWrapper.java        |   96 ++
 .../openapi/wrappers/foundation/TaskWrapper.java   |   95 ++
 .../foundation/favorites/FavoriteTaskWrapper.java  |   65 +
 .../favorites/FavoritesEditorWrapper.java          |  126 ++
 .../runner/GradleRunnerInteractionWrapper.java     |  125 ++
 .../wrappers/runner/GradleRunnerWrapper.java       |   56 +
 .../wrappers/ui/AbstractOpenAPIUIWrapper.java      |  324 +++++
 .../ui/AlternateUIInteractionVersionWrapper.java   |   65 +
 ...CommandLineArgumentAlteringListenerWrapper.java |   42 +
 .../openapi/wrappers/ui/DualPaneUIWrapper.java     |   63 +
 .../wrappers/ui/GradleTabVersionWrapper.java       |   51 +
 .../openapi/wrappers/ui/OutputObserverWrapper.java |   85 ++
 .../openapi/wrappers/ui/OutputUILordWrapper.java   |   83 ++
 .../wrappers/ui/SettingsNodeVersionWrapper.java    |    0
 .../openapi/wrappers/ui/SinglePaneUIWrapper.java   |   49 +
 .../ipc/gradle/execute-command-init-script.gradle  |    0
 .../ipc/gradle/refresh-tasks-init-script.gradle    |    0
 .../swing/generic/close-highlight.png              |  Bin
 .../userinterface/swing/generic/close.png          |  Bin
 .../userinterface/swing/generic/tabs/add.png       |  Bin
 .../userinterface/swing/generic/tabs/blank.png     |  Bin
 .../swing/generic/tabs/edit-filter.png             |  Bin
 .../userinterface/swing/generic/tabs/edit.png      |  Bin
 .../userinterface/swing/generic/tabs/execute.png   |  Bin
 .../userinterface/swing/generic/tabs/export.png    |  Bin
 .../userinterface/swing/generic/tabs/filter.png    |  Bin
 .../userinterface/swing/generic/tabs/import.png    |  Bin
 .../userinterface/swing/generic/tabs/move-down.png |  Bin
 .../userinterface/swing/generic/tabs/move-up.png   |  Bin
 .../userinterface/swing/generic/tabs/refresh.png   |  Bin
 .../userinterface/swing/generic/tabs/remove.png    |  Bin
 .../org/gradle/foundation/BuildInformation.java    |    0
 .../foundation/CommandLineAssistantTest.groovy     |    0
 .../gradle/foundation/CommandLineParsingTest.java  |    0
 .../gradle/foundation/DOM4JSettingsNodeTest.java   |    0
 .../org/gradle/foundation/FavoritesTest.java       |    0
 .../org/gradle/foundation/FileLinkTests.java       |  224 +++
 .../groovy/org/gradle/foundation/FilterTest.java   |    0
 .../gradle/foundation/LiveOutputParserTests.java   |  255 ++++
 .../gradle/foundation/ProjectConverterTest.groovy  |    0
 .../groovy/org/gradle/foundation/TestUtility.java  |  434 ++++++
 subprojects/{gradle-ui => ui}/ui.gradle            |    0
 .../java/org/gradle/api/tasks/wrapper/Wrapper.java |    0
 .../wrapper/internal/DistributionLocator.java      |    0
 .../wrapper/internal/WrapperScriptGenerator.java   |   96 ++
 .../org/gradle/api/tasks/wrapper/package-info.java |    0
 .../org/gradle/wrapper/BootstrapMainStarter.java   |   44 +
 .../src/main/java/org/gradle/wrapper/Download.java |   73 +
 .../java/org/gradle/wrapper/GradleWrapperMain.java |   59 +
 .../main/java/org/gradle/wrapper/IDownload.java    |    0
 .../src/main/java/org/gradle/wrapper/Install.java  |  158 +++
 .../java/org/gradle/wrapper/PathAssembler.java     |   75 +
 .../gradle/wrapper/SystemPropertiesHandler.java    |    0
 .../src/main/java/org/gradle/wrapper/Wrapper.java  |   67 +
 .../wrapper/internal/unixWrapperScriptHead.txt     |   67 +
 .../wrapper/internal/unixWrapperScriptTail.txt     |   97 ++
 .../wrapper/internal/windowsWrapperScriptHead.txt  |   57 +
 .../wrapper/internal/windowsWrapperScriptTail.txt  |   21 +
 .../org/gradle/api/tasks/wrapper/WrapperTest.java  |    0
 .../groovy/org/gradle/wrapper/DownloadTest.groovy  |    0
 .../groovy/org/gradle/wrapper/InstallTest.groovy   |  154 ++
 .../org/gradle/wrapper/PathAssemblerTest.java      |  101 ++
 .../wrapper/SystemPropertiesHandlerTest.groovy     |    0
 .../groovy/org/gradle/wrapper/WrapperTest.java     |   77 +
 .../org/gradle/wrapper/wrapper.properties          |    0
 subprojects/wrapper/wrapper.gradle                 |   39 +
 wrapper/archetype.gradle                           |    5 -
 wrapper/gradle-wrapper.properties                  |   25 -
 3550 files changed, 64312 insertions(+), 61376 deletions(-)

diff --git a/build.gradle b/build.gradle
index 680ef6b..a93198e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -69,9 +69,21 @@ libraries = [
         xmlunit: 'xmlunit:xmlunit:1.3',
 ]
 
-libraries.spock = ['org.spockframework:spock-core:0.4-groovy-1.7 at jar', libraries.groovy, 'cglib:cglib-nodep:2.2', 'org.objenesis:objenesis:1.2']
+libraries.spock = ['org.spockframework:spock-core:0.5-groovy-1.7 at jar',
+        libraries.groovy,
+        'org.hamcrest:hamcrest-core:1.1 at jar',
+        'cglib:cglib-nodep:2.2',
+        'org.objenesis:objenesis:1.2']
+libraries.jmock = ['org.jmock:jmock:2.5.1 at jar',
+        'org.hamcrest:hamcrest-core:1.1 at jar',
+        'org.hamcrest:hamcrest-library:1.1 at jar',
+        'org.jmock:jmock-junit4:2.5.1 at jar',
+        'org.jmock:jmock-legacy:2.5.1 at jar',
+        'org.objenesis:objenesis:1.2',
+        'cglib:cglib-nodep:2.2']
 libraries.groovy_depends = [libraries.groovy, libraries.commons_cli]
-libraries.jetty_depends = ["org.mortbay.jetty:jetty:6.1.25 at jar", "org.mortbay.jetty:jetty-util:6.1.25 at jar",
+libraries.jetty_depends = ["org.mortbay.jetty:jetty:6.1.25 at jar",
+        "org.mortbay.jetty:jetty-util:6.1.25 at jar",
         "org.mortbay.jetty:servlet-api:2.5-20081211 at jar"]
 
 allprojects {
@@ -89,23 +101,17 @@ allprojects {
     version = this.version
 }
 
-def FIRST_LEVEL_JMOCK = ['org.hamcrest:hamcrest-core:1.1 at jar', 'org.hamcrest:hamcrest-library:1.1 at jar', 'org.jmock:jmock-junit4:2.5.1 at jar']
-
 configure(groovyProjects()) {
     apply plugin: 'groovy'
     apply plugin: 'eclipse'
 
     archivesBaseName = "gradle-${name.replaceAll("\\p{Upper}") { "-${it.toLowerCase()}" } }"
     dependencies {
-        testCompile libraries.junit, FIRST_LEVEL_JMOCK, libraries.spock
-        testCompile module("org.jmock:jmock:2.5.1") {
-            dependencies('org.jmock:jmock-legacy:2.5.1 at jar', 'org.objenesis:objenesis:1.0', 'cglib:cglib-nodep:2.1_3')
-            dependencies(FIRST_LEVEL_JMOCK as Object[])
-        }
-        // todo - these should not be here
-        testCompile 'org.jmock:jmock-legacy:2.5.1 at jar', 'org.objenesis:objenesis:1.0', 'cglib:cglib-nodep:2.1_3'
+        testCompile libraries.junit, libraries.jmock, libraries.spock
     }
 
+    apply from: "$rootDir/gradle/compile.gradle"
+
     test {
         maxParallelForks = guessMaxForks()
     }
@@ -118,6 +124,10 @@ configure(groovyProjects()) {
     }
 }
 
+configure(publishedProjects()) {
+    apply from: "$rootDir/gradle/publish.gradle"
+}
+
 allprojects {
     apply from: "$rootDir/gradle/codeQuality.gradle"
 }
@@ -159,6 +169,7 @@ ideaProject {
     javaVersion = '1.6'
     withXml { provider ->
 		def node = provider.asNode()
+
 		// Use git
         def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
         vcsConfig.mapping[0].'@vcs' = 'Git'
@@ -166,6 +177,111 @@ ideaProject {
         // Set gradle home
         def gradleSettings = node.appendNode('component', [name: 'GradleSettings'])
         gradleSettings.appendNode('option', [name: 'SDK_HOME', value: gradle.gradleHomeDir.absolutePath])
+
+        // Code formatting options
+        def codeFormatSettings = new XmlParser().parseText('''
+  <component name="CodeStyleSettingsManager">
+    <option name="PER_PROJECT_SETTINGS">
+      <value>
+        <option name="USE_SAME_INDENTS" value="true" />
+        <option name="RIGHT_MARGIN" value="200" />
+        <option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
+        <option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
+        <option name="JD_P_AT_EMPTY_LINES" value="false" />
+        <option name="JD_KEEP_EMPTY_PARAMETER" value="false" />
+        <option name="JD_KEEP_EMPTY_EXCEPTION" value="false" />
+        <option name="JD_KEEP_EMPTY_RETURN" value="false" />
+        <option name="WRAP_COMMENTS" value="true" />
+        <option name="IF_BRACE_FORCE" value="3" />
+        <option name="DOWHILE_BRACE_FORCE" value="3" />
+        <option name="WHILE_BRACE_FORCE" value="3" />
+        <option name="FOR_BRACE_FORCE" value="3" />
+        <ADDITIONAL_INDENT_OPTIONS fileType="groovy">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="java">
+          <option name="INDENT_SIZE" value="4" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="js">
+          <option name="INDENT_SIZE" value="4" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="jsp">
+          <option name="INDENT_SIZE" value="4" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="php">
+          <option name="INDENT_SIZE" value="4" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="scala">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="2" />
+          <option name="TAB_SIZE" value="2" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="sql">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+        <ADDITIONAL_INDENT_OPTIONS fileType="xml">
+          <option name="INDENT_SIZE" value="4" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="4" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          <option name="USE_RELATIVE_INDENTS" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+      </value>
+    </option>
+    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
+  </component>
+''')
+        node.append(codeFormatSettings)
     }
 
     whenConfigured { project ->
@@ -173,6 +289,20 @@ ideaProject {
     }
 }
 
+ideaWorkspace {
+    withXml { provider ->
+        Node node = provider.asNode()
+
+        Node runConfig = node.component.find { it.'@name' == 'RunManager' }.configuration.find { it.'@type' == 'JUnit'}
+
+        Node module = runConfig.module[0]
+        module.'@name' = 'launcher'
+
+        Node vmParameters = runConfig.option.find { it.'@name' == 'VM_PARAMETERS' }
+        vmParameters.'@value' = "\"-DintegTest.gradleHomeDir=${intTestImage.destinationDir}\" -ea -Dorg.gradle.integtest.executer=embedded"
+    }
+}
+
 // Exclude resource directories from compilation and add them back in as classpath resources
 
 ideaProject {
@@ -191,6 +321,7 @@ configure(groovyProjects()) {
     ideaModule {
         scopes.RUNTIME.plus.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files { sourceSets.main.resources.srcDirs })))
         scopes.TEST.plus.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files { sourceSets*.resources*.srcDirs })))
+        beforeConfigured { module -> module.dependencies = [] }
     }
 }
 
@@ -221,6 +352,8 @@ clean.dependsOn subprojects.collect { "$it.path:clean" }
 task check(overwrite: true, dependsOn: groovyProjects()*.check)
 check.dependsOn ':docs:checkstyleApi'
 task test(overwrite: true, dependsOn: groovyProjects()*.test)
+task uploadArchives(dependsOn: publishedProjects()*.uploadArchives)
+task publishLocalArchives(dependsOn: publishedProjects()*.publishLocalArchives)
 
 zipRootFolder = "$archivesBaseName-${-> version}"
 
@@ -308,7 +441,7 @@ task intTestImage(type: Sync) {
 
 tasks.withType(Test).allTasks { task ->
     task.configure {
-        dependsOn intTestImage, binZip, allZip, srcZip, ':docs:userguideDocbook'
+        dependsOn intTestImage, publishLocalArchives, binZip, allZip, srcZip, project(':docs').userguideDocbook
         integTestUserDir = file('intTestHomeDir')
         systemProperties['integTest.userGuideInfoDir'] = project(':docs').docbookSrc
         systemProperties['integTest.userGuideOutputDir'] = new File(project(':docs').samplesSrcDir, "userguideOutput").absolutePath
@@ -392,7 +525,7 @@ uploadDists {
     uploadDescriptor = false
     doFirst {
         org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials('Artifactory Realm', 'gradle.artifactoryonline.com', artifactoryUserName, artifactoryUserPassword)
-        it.repositories.add(new org.apache.ivy.plugins.resolver.URLResolver()) {
+        repositories.add(new org.apache.ivy.plugins.resolver.URLResolver()) {
             name = 'gradleReleases'
             addArtifactPattern("${version.distributionUrl}/[artifact]-[revision](-[classifier]).[ext]" as String)
         }
@@ -400,7 +533,7 @@ uploadDists {
 }
 
 gradle.taskGraph.whenReady {graph ->
-    if (graph.hasTask(uploadDists)) {
+    if (graph.hasTask(uploadDists) || graph.hasTask(uploadArchives)) {
         // check properties defined and fail early
         artifactoryUserName
         artifactoryUserPassword
@@ -444,19 +577,21 @@ task releaseArtifacts {
 task release {
     description = 'Builds, tests and uploads the release artifacts'
     group = 'release'
-    dependsOn releaseVersion, tag, releaseArtifacts, testedDists, uploadDists, ':docs:uploadDocs'
+    dependsOn releaseVersion, tag, releaseArtifacts, testedDists, uploadArchives, uploadDists, ':docs:uploadDocs'
 }
 
 task wrapper(type: Wrapper) {
-    doFirst {
-        gradleVersion = version
-    }
+    gradleVersion = '0.9.1'
 }
 
 def groovyProjects() {
     subprojects.findAll { project -> project.name != 'docs' }
 }
 
+def publishedProjects() {
+    return [project(':core'), project(':toolingApi'), project(':wrapper')]
+}
+
 def runtimeProjects() {
     groovyProjects() - pluginProjects()
 }
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index cb1b1b7..f7e8b24 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -17,6 +17,7 @@
 apply plugin: 'groovy'
 apply plugin: 'code-quality'
 apply plugin: 'idea'
+apply plugin: 'eclipse'
 
 repositories {
     mavenRepo(urls: 'http://gradle.artifactoryonline.com/gradle/libs')
@@ -27,7 +28,8 @@ dependencies {
     compile 'com.google.collections:google-collections:1.0 at jar'
     groovy localGroovy()
     testCompile 'junit:junit:4.8.1 at jar'
-    testCompile 'org.spockframework:spock-core:0.4-groovy-1.7 at jar', 'cglib:cglib-nodep:2.2', 'org.objenesis:objenesis:1.2'
+    testCompile 'org.spockframework:spock-core:0.5-groovy-1.7 at jar', 'cglib:cglib-nodep:2.2', 'org.objenesis:objenesis:1.2'
 }
 
+apply from: '../gradle/compile.gradle'
 apply from: '../gradle/codeQuality.gradle'
diff --git a/buildSrc/src/main/groovy/org/gradle/build/Version.groovy b/buildSrc/src/main/groovy/org/gradle/build/Version.groovy
index 4358cb1..5631deb 100644
--- a/buildSrc/src/main/groovy/org/gradle/build/Version.groovy
+++ b/buildSrc/src/main/groovy/org/gradle/build/Version.groovy
@@ -76,4 +76,12 @@ class Version {
             'https://gradle.artifactoryonline.com/gradle/distributions/gradle-snapshots'
         }
     }
+
+    String getLibsUrl() {
+        if (release) {
+            'https://gradle.artifactoryonline.com/gradle/libs-releases-local'
+        } else {
+            'https://gradle.artifactoryonline.com/gradle/libs-snapshots-local'
+        }
+    }
 }
diff --git a/buildSrc/src/main/groovy/org/gradle/build/docs/dsl/model/ClassMetaData.java b/buildSrc/src/main/groovy/org/gradle/build/docs/dsl/model/ClassMetaData.java
index 5e3c664..a6adffe 100644
--- a/buildSrc/src/main/groovy/org/gradle/build/docs/dsl/model/ClassMetaData.java
+++ b/buildSrc/src/main/groovy/org/gradle/build/docs/dsl/model/ClassMetaData.java
@@ -38,7 +38,7 @@ public class ClassMetaData implements Serializable, Attachable<ClassMetaData>, L
     private final List<String> innerClassNames = new ArrayList<String>();
     private String outerClassName;
     private transient ClassMetaDataRepository<ClassMetaData> metaDataRepository;
-    public final HashMap<String,String> constants = new HashMap<String, String>();
+    public final HashMap<String, String> constants = new HashMap<String, String>();
 
     public ClassMetaData(String className, String packageName, boolean isInterface, boolean isGroovy, String rawClassComment) {
         this.className = className;
diff --git a/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptHead.txt b/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptHead.txt
index 784ed8d..858305d 100644
--- a/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptHead.txt
+++ b/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptHead.txt
@@ -16,15 +16,16 @@ GRADLE_APP_NAME=Gradle
 MAX_FD="maximum"
 
 warn ( ) {
-    echo "${PROGNAME}: $*"
+    echo "$*"
 }
 
 die ( ) {
-    warn "$*"
+    echo
+    echo "$*"
+    echo
     exit 1
 }
 
-
 # OS specific support (must be 'true' or 'false').
 cygwin=false
 msys=false
@@ -61,27 +62,24 @@ fi
 
 # For Cygwin, ensure paths are in UNIX format before anything is touched.
 if $cygwin ; then
-    [ -n "$GRADLE_HOME" ] && GRADLE_HOME=`cygpath --unix "$GRADLE_HOME"`
     [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
     [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
 fi
 
-# Attempt to set GRADLE_HOME if it is not already set.
-if [ -z "$GRADLE_HOME" -o ! -d "$GRADLE_HOME" ] ; then
-    # Resolve links: $0 may be a link to groovy's home.
-    PRG="$0"
-    # Need this for relative symlinks.
-    while [ -h "$PRG" ] ; do
-        ls=`ls -ld "$PRG"`
-        link=`expr "$ls" : '.*-> \(.*\)$'`
-        if expr "$link" : '/.*' > /dev/null; then
-            PRG="$link"
-        else
-            PRG=`dirname "$PRG"`"/$link"
-        fi
-    done
-    SAVED="`pwd`"
-    cd "`dirname \"$PRG\"`/.."
-    GRADLE_HOME="`pwd -P`"
-    cd "$SAVED"
-fi
+# Attempt to set GRADLE_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/.."
+GRADLE_HOME="`pwd -P`"
+cd "$SAVED"
diff --git a/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptTail.txt b/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptTail.txt
index 082ebbc..738c587 100644
--- a/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptTail.txt
+++ b/buildSrc/src/main/resources/org/gradle/build/startscripts/unixStartScriptTail.txt
@@ -12,7 +12,10 @@ if [ -z "$JAVACMD" ] ; then
     fi
 fi
 if [ ! -x "$JAVACMD" ] ; then
-    die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
+    die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
 fi
 if [ -z "$JAVA_HOME" ] ; then
     warn "JAVA_HOME environment variable is not set"
@@ -34,17 +37,6 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
     fi
 fi
 
-# Setup Profiler
-useprofiler=false
-if [ "$PROFILER" != "" ] ; then
-    if [ -r "$PROFILER" ] ; then
-        . $PROFILER
-        useprofiler=true
-    else
-        die "Profiler file not found: $PROFILER"
-    fi
-fi
-
 # For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
 if $darwin; then
     JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
@@ -66,8 +58,8 @@ if $cygwin ; then
     done
     OURCYGPATTERN="(^($ROOTDIRS))"
     # Add a user-defined pattern to the cygpath arguments
-    if [ "$GROOVY_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GROOVY_CYGPATTERN)"
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
     fi
     # Now convert the arguments - kludge to limit ourselves to /bin/sh
     i=0
@@ -94,20 +86,14 @@ if $cygwin ; then
         (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
         (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
     esac
-
 fi
 
 GRADLE_APP_BASE_NAME=`basename "$0"`
 
 STARTER_MAIN_CLASS=org.gradle.launcher.GradleMain
 
-# Start the Profiler or the JVM
-if $useprofiler ; then
-    runProfiler
-else
-    exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
+exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
         -classpath "$CLASSPATH" \
         -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
         $STARTER_MAIN_CLASS \
         "$@"
-fi
diff --git a/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptHead.txt b/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptHead.txt
index 578b8b0..c53c85b 100644
--- a/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptHead.txt
+++ b/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptHead.txt
@@ -5,10 +5,6 @@
 @rem                                                                         ##
 @rem ##########################################################################
 
- at rem
- at rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
- at rem
-
 @rem Set local scope for the variables with windows NT shell
 if "%OS%"=="Windows_NT" setlocal
 
@@ -19,32 +15,16 @@ if "%OS%"=="Windows_NT" setlocal
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
 
- at rem Determine the command interpreter to execute the "CD" later
-set COMMAND_COM="cmd.exe"
-if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
-if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
-
- at rem Use explicit find.exe to prevent cygwin and others find.exe from being used
-set FIND_EXE="find.exe"
-if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
-if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
+set GRADLE_HOME=%DIRNAME%..
 
-:check_JAVA_HOME
- at rem Make sure we have a valid JAVA_HOME
-if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
+ at rem Find java.exe
+set JAVA_EXE=java.exe
+if not defined JAVA_HOME goto init
 
-echo.
-echo ERROR: Environment variable JAVA_HOME has not been set.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-echo.
-goto end
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
 
-:have_JAVA_HOME
- at rem Validate JAVA_HOME
-%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
-if not errorlevel 1 goto check_GRADLE_HOME
+if exist "%JAVA_EXE%" goto init
 
 echo.
 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
@@ -52,42 +32,14 @@ echo.
 echo Please set the JAVA_HOME variable in your environment to match the
 echo location of your Java installation.
 echo.
-goto end
-
-:check_GRADLE_HOME
- at rem Define GRADLE_HOME if not set
-if "%GRADLE_HOME%" == "" set GRADLE_HOME=%DIRNAME%..
+goto fail
 
 :init
- at rem get name of script to launch with full path
- at rem /// set GROOVY_SCRIPT_NAME=%~f1
 @rem Get command-line arguments, handling Windowz variants
 
-SET _marker=%JAVA_HOME: =%
- at rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.
-
 if not "%OS%" == "Windows_NT" goto win9xME_args
 if "%eval[2+2]" == "4" goto 4NT_args
 
-IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args
-
-set _FIXPATH=
-call :fixpath "%JAVA_HOME%"
-set JAVA_HOME=%_FIXPATH:~1%
-
-goto win9xME_args
-
-:fixpath
-if not %1.==. (
-for /f "tokens=1* delims=;" %%a in (%1) do (
-call :shortfilename "%%a" & call :fixpath "%%b"
-)
-)
-goto :EOF
-:shortfilename
-for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
-goto :EOF
-
 :win9xME_args
 @rem Slurp the command line arguments.
 set CMD_LINE_ARGS=
diff --git a/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptTail.txt b/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptTail.txt
index 09d9983..23ffb0e 100644
--- a/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptTail.txt
+++ b/buildSrc/src/main/resources/org/gradle/build/startscripts/windowsStartScriptTail.txt
@@ -1,9 +1,6 @@
 set STARTER_MAIN_CLASS=org.gradle.launcher.GradleMain
 
-set JAVA_EXE=%JAVA_HOME%\bin\java.exe
-
 set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS%
-set GRADLE_OPTS=%GRADLE_OPTS%
 
 @rem Execute Gradle
 "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
@@ -12,12 +9,13 @@ set GRADLE_OPTS=%GRADLE_OPTS%
 @rem End local scope for the variables with windows NT shell
 if "%ERRORLEVEL%"=="0" goto mainEnd
 
+:fail
 if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
 
 rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
 rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
-exit /b "%ERRORLEVEL%"
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
 
 :mainEnd
 if "%OS%"=="Windows_NT" endlocal
diff --git a/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/ExtractDslMetaDataTaskTest.groovy b/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/ExtractDslMetaDataTaskTest.groovy
index c76e513..a4c4972 100644
--- a/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/ExtractDslMetaDataTaskTest.groovy
+++ b/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/ExtractDslMetaDataTaskTest.groovy
@@ -43,18 +43,18 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClass')
-        metaData.groovy
-        !metaData.isInterface()
-        metaData.rawCommentText.contains('This is a groovy class.')
-        metaData.superClassName == 'org.gradle.test.A'
-        metaData.interfaceNames == ['org.gradle.test.GroovyInterface', 'org.gradle.test.JavaInterface']
-
-        metaData = repository.get('org.gradle.test.GroovyInterface')
-        metaData.groovy
-        metaData.isInterface()
-        metaData.superClassName == null
-        metaData.interfaceNames == ['org.gradle.test.Interface1', 'org.gradle.test.Interface2']
+        def groovyClass = repository.get('org.gradle.test.GroovyClass')
+        groovyClass.groovy
+        !groovyClass.isInterface()
+        groovyClass.rawCommentText.contains('This is a groovy class.')
+        groovyClass.superClassName == 'org.gradle.test.A'
+        groovyClass.interfaceNames == ['org.gradle.test.GroovyInterface', 'org.gradle.test.JavaInterface']
+
+        def groovyInterface = repository.get('org.gradle.test.GroovyInterface')
+        groovyInterface.groovy
+        groovyInterface.isInterface()
+        groovyInterface.superClassName == null
+        groovyInterface.interfaceNames == ['org.gradle.test.Interface1', 'org.gradle.test.Interface2']
     }
 
     def extractsClassMetaDataFromJavaSource() {
@@ -70,18 +70,19 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClass')
-        !metaData.groovy
-        !metaData.isInterface()
-        metaData.rawCommentText.contains('This is a java class.')
-        metaData.superClassName == 'org.gradle.test.A'
-        metaData.interfaceNames == ['org.gradle.test.GroovyInterface', 'org.gradle.test.JavaInterface']
-
-        metaData = repository.get('org.gradle.test.JavaInterface')
-        !metaData.groovy
-        metaData.isInterface()
-        metaData.superClassName == null
-        metaData.interfaceNames == ['org.gradle.test.Interface1', 'org.gradle.test.Interface2']
+        def javaClass = repository.get('org.gradle.test.JavaClass')
+        !javaClass.groovy
+        !javaClass.isInterface()
+        javaClass.rawCommentText.contains('This is a java class.')
+        javaClass.superClassName == 'org.gradle.test.A'
+        javaClass.interfaceNames == ['org.gradle.test.GroovyInterface', 'org.gradle.test.JavaInterface']
+
+
+        def javaInterface = repository.get('org.gradle.test.JavaInterface')
+        !javaInterface.groovy
+        javaInterface.isInterface()
+        javaInterface.superClassName == null
+        javaInterface.interfaceNames == ['org.gradle.test.Interface1', 'org.gradle.test.Interface2']
     }
 
     def extractsPropertyMetaDataFromGroovySource() {
@@ -94,50 +95,50 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClass')
-        metaData.declaredPropertyNames == ['readOnly', 'writeOnly', 'someProp', 'groovyProp', 'readOnlyGroovyProp', 'arrayProp'] as Set
-
-        def prop = metaData.findDeclaredProperty('readOnly')
-        prop.type.signature == 'java.lang.Object'
-        prop.rawCommentText.contains('A read-only property.')
-        !prop.writeable
-        prop.getter.rawCommentText.contains('A read-only property.')
-        !prop.setter
-
-        prop = metaData.findDeclaredProperty('writeOnly')
-        prop.type.signature == 'org.gradle.test.JavaInterface'
-        prop.rawCommentText.contains('A write-only property.')
-        prop.writeable
-        !prop.getter
-        prop.setter.rawCommentText.contains('A write-only property.')
-
-        prop = metaData.findDeclaredProperty('someProp')
-        prop.type.signature == 'org.gradle.test.GroovyInterface'
-        prop.rawCommentText.contains('A property.')
-        prop.writeable
-        prop.getter.rawCommentText.contains('A property.')
-        prop.setter.rawCommentText == ''
-
-        prop = metaData.findDeclaredProperty('groovyProp')
-        prop.type.signature == 'org.gradle.test.GroovyInterface'
-        prop.rawCommentText.contains('A groovy property.')
-        prop.writeable
-        prop.getter.rawCommentText == ''
-        prop.setter.rawCommentText == ''
-
-        prop = metaData.findDeclaredProperty('readOnlyGroovyProp')
-        prop.type.signature == 'java.lang.String'
-        prop.rawCommentText.contains('A read-only groovy property.')
-        !prop.writeable
-        prop.getter.rawCommentText == ''
-        !prop.setter
-
-        prop = metaData.findDeclaredProperty('arrayProp')
-        prop.type.signature == 'java.lang.String[]'
-        prop.rawCommentText.contains('An array property.')
-        prop.writeable
-        prop.getter.rawCommentText == ''
-        prop.setter.rawCommentText == ''
+        def groovyClass = repository.get('org.gradle.test.GroovyClass')
+        groovyClass.declaredPropertyNames == ['readOnly', 'writeOnly', 'someProp', 'groovyProp', 'readOnlyGroovyProp', 'arrayProp'] as Set
+
+        def readOnly = groovyClass.findDeclaredProperty('readOnly')
+        readOnly.type.signature == 'java.lang.Object'
+        readOnly.rawCommentText.contains('A read-only property.')
+        !readOnly.writeable
+        readOnly.getter.rawCommentText.contains('A read-only property.')
+        !readOnly.setter
+
+        def writeOnly = groovyClass.findDeclaredProperty('writeOnly')
+        writeOnly.type.signature == 'org.gradle.test.JavaInterface'
+        writeOnly.rawCommentText.contains('A write-only property.')
+        writeOnly.writeable
+        !writeOnly.getter
+        writeOnly.setter.rawCommentText.contains('A write-only property.')
+
+        def someProp = groovyClass.findDeclaredProperty('someProp')
+        someProp.type.signature == 'org.gradle.test.GroovyInterface'
+        someProp.rawCommentText.contains('A property.')
+        someProp.writeable
+        someProp.getter.rawCommentText.contains('A property.')
+        someProp.setter.rawCommentText == ''
+
+        def groovyProp = groovyClass.findDeclaredProperty('groovyProp')
+        groovyProp.type.signature == 'org.gradle.test.GroovyInterface'
+        groovyProp.rawCommentText.contains('A groovy property.')
+        groovyProp.writeable
+        groovyProp.getter.rawCommentText == ''
+        groovyProp.setter.rawCommentText == ''
+
+        def readOnlyGroovyProp = groovyClass.findDeclaredProperty('readOnlyGroovyProp')
+        readOnlyGroovyProp.type.signature == 'java.lang.String'
+        readOnlyGroovyProp.rawCommentText.contains('A read-only groovy property.')
+        !readOnlyGroovyProp.writeable
+        readOnlyGroovyProp.getter.rawCommentText == ''
+        !readOnlyGroovyProp.setter
+
+        def arrayProp = groovyClass.findDeclaredProperty('arrayProp')
+        arrayProp.type.signature == 'java.lang.String[]'
+        arrayProp.rawCommentText.contains('An array property.')
+        arrayProp.writeable
+        arrayProp.getter.rawCommentText == ''
+        arrayProp.setter.rawCommentText == ''
     }
 
     def extractsPropertyMetaDataFromJavaSource() {
@@ -149,43 +150,43 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClass')
-        metaData.declaredPropertyNames == ['readOnly', 'writeOnly', 'someProp', 'flag', 'arrayProp'] as Set
-
-        def prop = metaData.findDeclaredProperty('readOnly')
-        prop.type.signature == 'java.lang.String'
-        prop.rawCommentText.contains('A read-only property.')
-        !prop.writeable
-        prop.getter.rawCommentText.contains('A read-only property.')
-        !prop.setter
-
-        prop = metaData.findDeclaredProperty('writeOnly')
-        prop.type.signature == 'org.gradle.test.JavaInterface'
-        prop.rawCommentText.contains('A write-only property.')
-        prop.writeable
-        !prop.getter
-        prop.setter.rawCommentText.contains('A write-only property.')
-
-        prop = metaData.findDeclaredProperty('someProp')
-        prop.type.signature == 'org.gradle.test.JavaInterface'
-        prop.rawCommentText.contains('A property.')
-        prop.writeable
-        prop.getter.rawCommentText.contains('A property.')
-        prop.setter.rawCommentText.contains('The setter for a property.')
-
-        prop = metaData.findDeclaredProperty('flag')
-        prop.type.signature == 'boolean'
-        prop.rawCommentText.contains('A boolean property.')
-        !prop.writeable
-        prop.getter.rawCommentText.contains('A boolean property.')
-        !prop.setter
-
-        prop = metaData.findDeclaredProperty('arrayProp')
-        prop.type.signature == 'org.gradle.test.JavaInterface[][][]'
-        prop.rawCommentText.contains('An array property.')
-        !prop.writeable
-        prop.getter.rawCommentText.contains('An array property.')
-        !prop.setter
+        def javaClass = repository.get('org.gradle.test.JavaClass')
+        javaClass.declaredPropertyNames == ['readOnly', 'writeOnly', 'someProp', 'flag', 'arrayProp'] as Set
+
+        def readOnly = javaClass.findDeclaredProperty('readOnly')
+        readOnly.type.signature == 'java.lang.String'
+        readOnly.rawCommentText.contains('A read-only property.')
+        !readOnly.writeable
+        readOnly.getter.rawCommentText.contains('A read-only property.')
+        !readOnly.setter
+
+        def writeOnly = javaClass.findDeclaredProperty('writeOnly')
+        writeOnly.type.signature == 'org.gradle.test.JavaInterface'
+        writeOnly.rawCommentText.contains('A write-only property.')
+        writeOnly.writeable
+        !writeOnly.getter
+        writeOnly.setter.rawCommentText.contains('A write-only property.')
+
+        def someProp = javaClass.findDeclaredProperty('someProp')
+        someProp.type.signature == 'org.gradle.test.JavaInterface'
+        someProp.rawCommentText.contains('A property.')
+        someProp.writeable
+        someProp.getter.rawCommentText.contains('A property.')
+        someProp.setter.rawCommentText.contains('The setter for a property.')
+
+        def flag = javaClass.findDeclaredProperty('flag')
+        flag.type.signature == 'boolean'
+        flag.rawCommentText.contains('A boolean property.')
+        !flag.writeable
+        flag.getter.rawCommentText.contains('A boolean property.')
+        !flag.setter
+
+        def arrayProp = javaClass.findDeclaredProperty('arrayProp')
+        arrayProp.type.signature == 'org.gradle.test.JavaInterface[][][]'
+        arrayProp.rawCommentText.contains('An array property.')
+        !arrayProp.writeable
+        arrayProp.getter.rawCommentText.contains('An array property.')
+        !arrayProp.setter
     }
 
     def extractsMethodMetaDataFromGroovySource() {
@@ -198,75 +199,63 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClassWithMethods')
-        metaData.declaredMethods.collect { it.name } as Set == ['stringMethod', 'refTypeMethod', 'defMethod', 'voidMethod', 'arrayMethod', 'setProp', 'getProp', 'getFinalProp', 'getIntProp', 'setIntProp'] as Set
-
-        def method = metaData.declaredMethods.find { it.name == 'stringMethod' }
-        method.rawCommentText.contains('A method that returns String')
-        method.returnType.signature == 'java.lang.String'
-        method.parameters.collect { it.name } == ['stringParam']
-
-        def param = method.parameters[0]
-        param.name == 'stringParam'
-        param.type.signature == 'java.lang.String'
-
-        method = metaData.declaredMethods.find { it.name == 'refTypeMethod' }
-        method.rawCommentText.contains('A method that returns a reference type.')
-        method.returnType.signature == 'org.gradle.test.GroovyInterface'
-        method.parameters.collect { it.name } == ['someThing', 'aFlag']
-
-        param = method.parameters[0]
-        param.name == 'someThing'
-        param.type.signature == 'org.gradle.test.JavaInterface'
-
-        param = method.parameters[1]
-        param.name == 'aFlag'
-        param.type.signature == 'boolean'
-
-        method = metaData.declaredMethods.find { it.name == 'defMethod' }
-        method.rawCommentText.contains('A method that returns a default type.')
-        method.returnType.signature == 'java.lang.Object'
-        method.parameters.collect { it.name } == ['defParam']
-
-        param = method.parameters[0]
-        param.name == 'defParam'
-        param.type.signature == 'java.lang.Object'
-
-        method = metaData.declaredMethods.find { it.name == 'voidMethod' }
-        method.rawCommentText.contains('A method that returns void.')
-        method.returnType.signature == 'void'
-        method.parameters.collect { it.name } == []
-
-        method = metaData.declaredMethods.find { it.name == 'arrayMethod' }
-        method.returnType.signature == 'java.lang.String[][]'
-        method.returnType.arrayDimensions == 2
-        method.parameters.collect { it.name } == ['strings']
-
-        param = method.parameters[0]
-        param.name == 'strings'
-        param.type.signature == 'java.lang.String[]...'
-        param.type.arrayDimensions == 2
-
-        method = metaData.declaredMethods.find { it.name == 'getProp' }
-        method.rawCommentText == ''
-        method.returnType.signature == 'java.lang.String'
-        method.parameters.collect { it.name } == []
-
-        method = metaData.declaredMethods.find { it.name == 'setProp' }
-        method.rawCommentText == ''
-        method.returnType.signature == 'void'
-        method.parameters.collect { it.name } == ['prop']
-
-        param = method.parameters[0]
-        param.name == 'prop'
-        param.type.signature == 'java.lang.String'
-
-        method = metaData.declaredMethods.find { it.name == 'getFinalProp' }
-        method.rawCommentText == ''
-        method.returnType.signature == 'org.gradle.test.JavaInterface'
-        method.parameters.collect { it.name } == []
-
-        metaData.declaredPropertyNames == ['prop', 'finalProp', 'intProp'] as Set
+        def groovyClass = repository.get('org.gradle.test.GroovyClassWithMethods')
+        groovyClass.declaredMethods.collect { it.name } as Set == ['stringMethod', 'refTypeMethod', 'defMethod', 'voidMethod', 'arrayMethod', 'setProp', 'getProp', 'getFinalProp', 'getIntProp', 'setIntProp'] as Set
+
+        def stringMethod = groovyClass.declaredMethods.find { it.name == 'stringMethod' }
+        stringMethod.rawCommentText.contains('A method that returns String')
+        stringMethod.returnType.signature == 'java.lang.String'
+        stringMethod.parameters.collect { it.name } == ['stringParam']
+        stringMethod.parameters[0].name == 'stringParam'
+        stringMethod.parameters[0].type.signature == 'java.lang.String'
+
+        def refTypeMethod = groovyClass.declaredMethods.find { it.name == 'refTypeMethod' }
+        refTypeMethod.rawCommentText.contains('A method that returns a reference type.')
+        refTypeMethod.returnType.signature == 'org.gradle.test.GroovyInterface'
+        refTypeMethod.parameters.collect { it.name } == ['someThing', 'aFlag']
+        refTypeMethod.parameters[0].name == 'someThing'
+        refTypeMethod.parameters[0].type.signature == 'org.gradle.test.JavaInterface'
+        refTypeMethod.parameters[1].name == 'aFlag'
+        refTypeMethod.parameters[1].type.signature == 'boolean'
+
+        def defMethod = groovyClass.declaredMethods.find { it.name == 'defMethod' }
+        defMethod.rawCommentText.contains('A method that returns a default type.')
+        defMethod.returnType.signature == 'java.lang.Object'
+        defMethod.parameters.collect { it.name } == ['defParam']
+        defMethod.parameters[0].name == 'defParam'
+        defMethod.parameters[0].type.signature == 'java.lang.Object'
+
+        def voidMethod = groovyClass.declaredMethods.find { it.name == 'voidMethod' }
+        voidMethod.rawCommentText.contains('A method that returns void.')
+        voidMethod.returnType.signature == 'void'
+        voidMethod.parameters.collect { it.name } == []
+
+        def arrayMethod = groovyClass.declaredMethods.find { it.name == 'arrayMethod' }
+        arrayMethod.returnType.signature == 'java.lang.String[][]'
+        arrayMethod.returnType.arrayDimensions == 2
+        arrayMethod.parameters.collect { it.name } == ['strings']
+        arrayMethod.parameters[0].name == 'strings'
+        arrayMethod.parameters[0].type.signature == 'java.lang.String[]...'
+        arrayMethod.parameters[0].type.arrayDimensions == 2
+
+        def getProp = groovyClass.declaredMethods.find { it.name == 'getProp' }
+        getProp.rawCommentText == ''
+        getProp.returnType.signature == 'java.lang.String'
+        getProp.parameters.collect { it.name } == []
+
+        def setProp = groovyClass.declaredMethods.find { it.name == 'setProp' }
+        setProp.rawCommentText == ''
+        setProp.returnType.signature == 'void'
+        setProp.parameters.collect { it.name } == ['prop']
+        setProp.parameters[0].name == 'prop'
+        setProp.parameters[0].type.signature == 'java.lang.String'
+
+        def getFinalProp = groovyClass.declaredMethods.find { it.name == 'getFinalProp' }
+        getFinalProp.rawCommentText == ''
+        getFinalProp.returnType.signature == 'org.gradle.test.JavaInterface'
+        getFinalProp.parameters.collect { it.name } == []
+
+        groovyClass.declaredPropertyNames == ['prop', 'finalProp', 'intProp'] as Set
     }
 
     def extractsMethodMetaDataFromJavaSource() {
@@ -279,47 +268,39 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClassWithMethods')
-        metaData.declaredMethods.collect { it.name } as Set == ['stringMethod', 'refTypeMethod', 'voidMethod', 'arrayMethod', 'getIntProp', 'setIntProp'] as Set
-
-        def method = metaData.declaredMethods.find { it.name == 'stringMethod' }
-        method.rawCommentText.contains('A method that returns String')
-        method.returnType.signature == 'java.lang.String'
-        method.parameters.collect { it.name } == ['stringParam']
-
-        def param = method.parameters[0]
-        param.name == 'stringParam'
-        param.type.signature == 'java.lang.String'
-
-        method = metaData.declaredMethods.find { it.name == 'refTypeMethod' }
-        method.rawCommentText.contains('A method that returns a reference type.')
-        method.returnType.signature == 'org.gradle.test.GroovyInterface'
-        method.parameters.collect { it.name } == ['refParam', 'aFlag']
-
-        param = method.parameters[0]
-        param.name == 'refParam'
-        param.type.signature == 'org.gradle.test.JavaInterface'
-
-        param = method.parameters[1]
-        param.name == 'aFlag'
-        param.type.signature == 'boolean'
-
-        method = metaData.declaredMethods.find { it.name == 'voidMethod' }
-        method.rawCommentText.contains('A method that returns void.')
-        method.returnType.signature == 'void'
-        method.parameters.collect { it.name } == []
-
-        method = metaData.declaredMethods.find { it.name == 'arrayMethod' }
-        method.returnType.signature == 'java.lang.String[][]'
-        method.returnType.arrayDimensions == 2
-        method.parameters.collect { it.name } == ['strings']
-
-        param = method.parameters[0]
-        param.name == 'strings'
-        param.type.signature == 'java.lang.String[]...'
-        param.type.arrayDimensions == 2
-
-        metaData.declaredPropertyNames == ['intProp'] as Set
+        def javaClass = repository.get('org.gradle.test.JavaClassWithMethods')
+        javaClass.declaredMethods.collect { it.name } as Set == ['stringMethod', 'refTypeMethod', 'voidMethod', 'arrayMethod', 'getIntProp', 'setIntProp'] as Set
+
+        def stringMethod = javaClass.declaredMethods.find { it.name == 'stringMethod' }
+        stringMethod.rawCommentText.contains('A method that returns String')
+        stringMethod.returnType.signature == 'java.lang.String'
+        stringMethod.parameters.collect { it.name } == ['stringParam']
+        stringMethod.parameters[0].name == 'stringParam'
+        stringMethod.parameters[0].type.signature == 'java.lang.String'
+
+        def refTypeMethod = javaClass.declaredMethods.find { it.name == 'refTypeMethod' }
+        refTypeMethod.rawCommentText.contains('A method that returns a reference type.')
+        refTypeMethod.returnType.signature == 'org.gradle.test.GroovyInterface'
+        refTypeMethod.parameters.collect { it.name } == ['refParam', 'aFlag']
+        refTypeMethod.parameters[0].name == 'refParam'
+        refTypeMethod.parameters[0].type.signature == 'org.gradle.test.JavaInterface'
+        refTypeMethod.parameters[1].name == 'aFlag'
+        refTypeMethod.parameters[1].type.signature == 'boolean'
+
+        def voidMethod = javaClass.declaredMethods.find { it.name == 'voidMethod' }
+        voidMethod.rawCommentText.contains('A method that returns void.')
+        voidMethod.returnType.signature == 'void'
+        voidMethod.parameters.collect { it.name } == []
+
+        def arrayMethod = javaClass.declaredMethods.find { it.name == 'arrayMethod' }
+        arrayMethod.returnType.signature == 'java.lang.String[][]'
+        arrayMethod.returnType.arrayDimensions == 2
+        arrayMethod.parameters.collect { it.name } == ['strings']
+        arrayMethod.parameters[0].name == 'strings'
+        arrayMethod.parameters[0].type.signature == 'java.lang.String[]...'
+        arrayMethod.parameters[0].type.arrayDimensions == 2
+
+        javaClass.declaredPropertyNames == ['intProp'] as Set
     }
 
     def extractsConstantsFromGroovySource() {
@@ -330,37 +311,45 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClassWithConstants')
-        metaData.constants.keySet() == ['INT_CONST', 'STRING_CONST', 'OBJECT_CONST', 'BIG_DECIMAL_CONST'] as Set
+        def groovyClass = repository.get('org.gradle.test.GroovyClassWithConstants')
+        groovyClass.constants.keySet() == ['INT_CONST', 'STRING_CONST', 'OBJECT_CONST', 'BIG_DECIMAL_CONST'] as Set
 
-        metaData.constants['INT_CONST'] == '9'
-        metaData.constants['STRING_CONST'] == 'some-string'
-        metaData.constants['BIG_DECIMAL_CONST'] == '1.02'
-        metaData.constants['OBJECT_CONST'] == null
+        groovyClass.constants['INT_CONST'] == '9'
+        groovyClass.constants['STRING_CONST'] == 'some-string'
+        groovyClass.constants['BIG_DECIMAL_CONST'] == '1.02'
+        groovyClass.constants['OBJECT_CONST'] == null
     }
 
-    def extractsConstantsFromJavaSource() {
+    def extractsConstantsFromJavaClassSource() {
         task.source testFile('org/gradle/test/JavaClassWithConstants.java')
-        task.source testFile('org/gradle/test/JavaInterfaceWithConstants.java')
 
         when:
         task.extract()
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClassWithConstants')
-        metaData.constants.keySet() == ['INT_CONST', 'STRING_CONST', 'OBJECT_CONST', 'CHAR_CONST'] as Set
+        def javaClass = repository.get('org.gradle.test.JavaClassWithConstants')
+        javaClass.constants.keySet() == ['INT_CONST', 'STRING_CONST', 'OBJECT_CONST', 'CHAR_CONST'] as Set
+
+        javaClass.constants['INT_CONST'] == '9'
+        javaClass.constants['STRING_CONST'] == 'some-string'
+        javaClass.constants['CHAR_CONST'] == 'a'
+        javaClass.constants['OBJECT_CONST'] == null
+    }
+
+    def extractsConstantsFromJavaInterfaceSource() {
+        task.source testFile('org/gradle/test/JavaInterfaceWithConstants.java')
 
-        metaData.constants['INT_CONST'] == '9'
-        metaData.constants['STRING_CONST'] == 'some-string'
-        metaData.constants['CHAR_CONST'] == 'a'
-        metaData.constants['OBJECT_CONST'] == null
+        when:
+        task.extract()
+        repository.load(task.destFile)
 
-        metaData = repository.get('org.gradle.test.JavaInterfaceWithConstants')
-        metaData.constants.keySet() == ['INT_CONST', 'STRING_CONST'] as Set
+        then:
+        def javaInterface = repository.get('org.gradle.test.JavaInterfaceWithConstants')
+        javaInterface.constants.keySet() == ['INT_CONST', 'STRING_CONST'] as Set
 
-        metaData.constants['INT_CONST'] == '120'
-        metaData.constants['STRING_CONST'] == 'some-string'
+        javaInterface.constants['INT_CONST'] == '120'
+        javaInterface.constants['STRING_CONST'] == 'some-string'
     }
 
     def handlesFullyQualifiedNamesInGroovySource() {
@@ -373,12 +362,12 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClassWithFullyQualifiedNames')
-        metaData.superClassName == 'org.gradle.test.sub.SubGroovyClass'
-        metaData.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'java.lang.Runnable']
-        metaData.declaredPropertyNames == ['prop'] as Set
+        def groovyClass = repository.get('org.gradle.test.GroovyClassWithFullyQualifiedNames')
+        groovyClass.superClassName == 'org.gradle.test.sub.SubGroovyClass'
+        groovyClass.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'java.lang.Runnable']
+        groovyClass.declaredPropertyNames == ['prop'] as Set
 
-        def prop = metaData.findDeclaredProperty('prop')
+        def prop = groovyClass.findDeclaredProperty('prop')
         prop.type.signature == 'org.gradle.test.sub.SubJavaInterface'
     }
 
@@ -392,12 +381,12 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClassWithFullyQualifiedNames')
-        metaData.superClassName == 'org.gradle.test.sub.SubGroovyClass'
-        metaData.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'java.lang.Runnable']
-        metaData.declaredPropertyNames == ['prop'] as Set
+        def javaClass = repository.get('org.gradle.test.JavaClassWithFullyQualifiedNames')
+        javaClass.superClassName == 'org.gradle.test.sub.SubGroovyClass'
+        javaClass.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'java.lang.Runnable']
+        javaClass.declaredPropertyNames == ['prop'] as Set
 
-        def prop = metaData.findDeclaredProperty('prop')
+        def prop = javaClass.findDeclaredProperty('prop')
         prop.type.signature == 'org.gradle.test.sub.SubJavaInterface'
     }
 
@@ -412,10 +401,10 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClassWithImports')
-        metaData.superClassName == 'org.gradle.test.sub.SubGroovyClass'
-        metaData.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'org.gradle.test.sub2.GroovyInterface']
-        metaData.declaredPropertyNames == [] as Set
+        def groovyClass = repository.get('org.gradle.test.GroovyClassWithImports')
+        groovyClass.superClassName == 'org.gradle.test.sub.SubGroovyClass'
+        groovyClass.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'org.gradle.test.sub2.GroovyInterface']
+        groovyClass.declaredPropertyNames == [] as Set
     }
 
     def handlesImportedTypesInJavaSource() {
@@ -429,10 +418,10 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClassWithImports')
-        metaData.superClassName == 'org.gradle.test.sub.SubGroovyClass'
-        metaData.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'org.gradle.test.sub2.GroovyInterface', 'java.io.Closeable']
-        metaData.declaredPropertyNames == [] as Set
+        def javaClass = repository.get('org.gradle.test.JavaClassWithImports')
+        javaClass.superClassName == 'org.gradle.test.sub.SubGroovyClass'
+        javaClass.interfaceNames == ['org.gradle.test.sub.SubJavaInterface', 'org.gradle.test.sub2.GroovyInterface', 'java.io.Closeable']
+        javaClass.declaredPropertyNames == [] as Set
     }
 
     def handlesEnumTypesInGroovySource() {
@@ -443,9 +432,9 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyEnum')
-        metaData.groovy
-        !metaData.isInterface()
+        def groovyEnum = repository.get('org.gradle.test.GroovyEnum')
+        groovyEnum.groovy
+        !groovyEnum.isInterface()
     }
 
     def handlesEnumTypesInJavaSource() {
@@ -456,9 +445,9 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaEnum')
-        !metaData.groovy
-        !metaData.isInterface()
+        def javaEnum = repository.get('org.gradle.test.JavaEnum')
+        !javaEnum.groovy
+        !javaEnum.isInterface()
     }
 
     def handlesAnnotationTypesInGroovySource() {
@@ -469,9 +458,9 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyAnnotation')
-        metaData.groovy
-        !metaData.isInterface()
+        def annotation = repository.get('org.gradle.test.GroovyAnnotation')
+        annotation.groovy
+        !annotation.isInterface()
     }
 
     def handlesAnnotationTypesInJavaSource() {
@@ -482,9 +471,9 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaAnnotation')
-        !metaData.groovy
-        !metaData.isInterface()
+        def annotation = repository.get('org.gradle.test.JavaAnnotation')
+        !annotation.groovy
+        !annotation.isInterface()
     }
 
     def handlesNestedAndAnonymousTypesInGroovySource() {
@@ -496,32 +485,32 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClassWithInnerTypes')
-        metaData.interfaceNames == ['org.gradle.test.sub2.GroovyInterface']
-        metaData.declaredPropertyNames == ['someProp', 'innerClassProp'] as Set
+        def groovyClass = repository.get('org.gradle.test.GroovyClassWithInnerTypes')
+        groovyClass.interfaceNames == ['org.gradle.test.sub2.GroovyInterface']
+        groovyClass.declaredPropertyNames == ['someProp', 'innerClassProp'] as Set
 
-        def propMetaData = metaData.findDeclaredProperty('someProp')
-        propMetaData.type.signature == 'org.gradle.test.sub2.GroovyInterface'
+        def someProp = groovyClass.findDeclaredProperty('someProp')
+        someProp.type.signature == 'org.gradle.test.sub2.GroovyInterface'
 
-        propMetaData = metaData.findDeclaredProperty('innerClassProp')
-        propMetaData.type.signature == 'org.gradle.test.GroovyClassWithInnerTypes.InnerClass.AnotherInner'
+        def innerClassProp = groovyClass.findDeclaredProperty('innerClassProp')
+        innerClassProp.type.signature == 'org.gradle.test.GroovyClassWithInnerTypes.InnerClass.AnotherInner'
 
-        metaData = repository.get('org.gradle.test.GroovyClassWithInnerTypes.InnerEnum')
-        metaData.rawCommentText.contains('This is an inner enum.')
+        def innerEnum = repository.get('org.gradle.test.GroovyClassWithInnerTypes.InnerEnum')
+        innerEnum.rawCommentText.contains('This is an inner enum.')
 
-        metaData = repository.get('org.gradle.test.GroovyClassWithInnerTypes.InnerClass')
-        metaData.rawCommentText.contains('This is an inner class.')
-        metaData.declaredPropertyNames == ['enumProp'] as Set
+        def innerClass = repository.get('org.gradle.test.GroovyClassWithInnerTypes.InnerClass')
+        innerClass.rawCommentText.contains('This is an inner class.')
+        innerClass.declaredPropertyNames == ['enumProp'] as Set
 
-        propMetaData = metaData.findDeclaredProperty('enumProp')
-        propMetaData.type.signature == 'org.gradle.test.GroovyClassWithInnerTypes.InnerEnum'
+        def enumProp = innerClass.findDeclaredProperty('enumProp')
+        enumProp.type.signature == 'org.gradle.test.GroovyClassWithInnerTypes.InnerEnum'
 
-        metaData = repository.get('org.gradle.test.GroovyClassWithInnerTypes.InnerClass.AnotherInner')
-        metaData.rawCommentText.contains('This is an inner inner class.')
-        metaData.declaredPropertyNames == ['outer'] as Set
+        def anotherInner = repository.get('org.gradle.test.GroovyClassWithInnerTypes.InnerClass.AnotherInner')
+        anotherInner.rawCommentText.contains('This is an inner inner class.')
+        anotherInner.declaredPropertyNames == ['outer'] as Set
 
-        propMetaData = metaData.findDeclaredProperty('outer')
-        propMetaData.type.signature == 'org.gradle.test.GroovyClassWithInnerTypes.InnerClass'
+        def outer = anotherInner.findDeclaredProperty('outer')
+        outer.type.signature == 'org.gradle.test.GroovyClassWithInnerTypes.InnerClass'
     }
 
     def handlesNestedAndAnonymousTypesInJavaSource() {
@@ -533,32 +522,32 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClassWithInnerTypes')
-        metaData.interfaceNames == ['org.gradle.test.sub2.GroovyInterface']
-        metaData.declaredPropertyNames == ['someProp', 'innerClassProp'] as Set
+        def javaClass = repository.get('org.gradle.test.JavaClassWithInnerTypes')
+        javaClass.interfaceNames == ['org.gradle.test.sub2.GroovyInterface']
+        javaClass.declaredPropertyNames == ['someProp', 'innerClassProp'] as Set
 
-        def propMetaData = metaData.findDeclaredProperty('someProp')
-        propMetaData.type.signature == 'org.gradle.test.sub2.GroovyInterface'
+        def someProp = javaClass.findDeclaredProperty('someProp')
+        someProp.type.signature == 'org.gradle.test.sub2.GroovyInterface'
 
-        propMetaData = metaData.findDeclaredProperty('innerClassProp')
-        propMetaData.type.signature == 'org.gradle.test.JavaClassWithInnerTypes.InnerClass.AnotherInner'
+        def innerClassProp = javaClass.findDeclaredProperty('innerClassProp')
+        innerClassProp.type.signature == 'org.gradle.test.JavaClassWithInnerTypes.InnerClass.AnotherInner'
 
-        metaData = repository.get('org.gradle.test.JavaClassWithInnerTypes.InnerEnum')
-        metaData.rawCommentText.contains('This is an inner enum.')
+        def innerEnum = repository.get('org.gradle.test.JavaClassWithInnerTypes.InnerEnum')
+        innerEnum.rawCommentText.contains('This is an inner enum.')
 
-        metaData = repository.get('org.gradle.test.JavaClassWithInnerTypes.InnerClass')
-        metaData.rawCommentText.contains('This is an inner class.')
-        metaData.declaredPropertyNames == ['enumProp'] as Set
+        def innerClass = repository.get('org.gradle.test.JavaClassWithInnerTypes.InnerClass')
+        innerClass.rawCommentText.contains('This is an inner class.')
+        innerClass.declaredPropertyNames == ['enumProp'] as Set
 
-        propMetaData = metaData.findDeclaredProperty('enumProp')
-        propMetaData.type.signature == 'org.gradle.test.JavaClassWithInnerTypes.InnerEnum'
+        def enumProp = innerClass.findDeclaredProperty('enumProp')
+        enumProp.type.signature == 'org.gradle.test.JavaClassWithInnerTypes.InnerEnum'
 
-        metaData = repository.get('org.gradle.test.JavaClassWithInnerTypes.InnerClass.AnotherInner')
-        metaData.rawCommentText.contains('This is an inner inner class.')
-        metaData.declaredPropertyNames == ['outer'] as Set
+        def anotherInner = repository.get('org.gradle.test.JavaClassWithInnerTypes.InnerClass.AnotherInner')
+        anotherInner.rawCommentText.contains('This is an inner inner class.')
+        anotherInner.declaredPropertyNames == ['outer'] as Set
 
-        propMetaData = metaData.findDeclaredProperty('outer')
-        propMetaData.type.signature == 'org.gradle.test.JavaClassWithInnerTypes.InnerClass'
+        def outer = anotherInner.findDeclaredProperty('outer')
+        outer.type.signature == 'org.gradle.test.JavaClassWithInnerTypes.InnerClass'
     }
 
     def handlesParameterizedTypesInGroovySource() {
@@ -570,29 +559,29 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.GroovyClassWithParameterizedTypes')
+        def groovyClass = repository.get('org.gradle.test.GroovyClassWithParameterizedTypes')
 
-        def property = metaData.findDeclaredProperty('setProp')
-        property.type.signature == 'java.util.Set<org.gradle.test.GroovyInterface>'
+        def setProp = groovyClass.findDeclaredProperty('setProp')
+        setProp.type.signature == 'java.util.Set<org.gradle.test.GroovyInterface>'
 
-        property = metaData.findDeclaredProperty('mapProp')
-        property.type.signature == 'java.util.Map<org.gradle.test.GroovyInterface, org.gradle.test.GroovyClassWithParameterizedTypes>'
+        def mapProp = groovyClass.findDeclaredProperty('mapProp')
+        mapProp.type.signature == 'java.util.Map<org.gradle.test.GroovyInterface, org.gradle.test.GroovyClassWithParameterizedTypes>'
 
-        property = metaData.findDeclaredProperty('wildcardProp')
-        property.type.signature == 'java.util.List<?>'
+        def wilcardProp = groovyClass.findDeclaredProperty('wildcardProp')
+        wilcardProp.type.signature == 'java.util.List<?>'
 
-        property = metaData.findDeclaredProperty('upperBoundProp')
-        property.type.signature == 'java.util.List<? extends org.gradle.test.GroovyInterface>'
+        def upperBoundProp = groovyClass.findDeclaredProperty('upperBoundProp')
+        upperBoundProp.type.signature == 'java.util.List<? extends org.gradle.test.GroovyInterface>'
 
-        property = metaData.findDeclaredProperty('lowerBoundProp')
-        property.type.signature == 'java.util.List<? super org.gradle.test.GroovyInterface>'
+        def lowerBoundProp = groovyClass.findDeclaredProperty('lowerBoundProp')
+        lowerBoundProp.type.signature == 'java.util.List<? super org.gradle.test.GroovyInterface>'
 
-        property = metaData.findDeclaredProperty('nestedProp')
-        property.type.signature == 'java.util.List<? super java.util.Set<? extends java.util.Map<?, org.gradle.test.GroovyInterface[]>>>[]'
+        def nestedProp = groovyClass.findDeclaredProperty('nestedProp')
+        nestedProp.type.signature == 'java.util.List<? super java.util.Set<? extends java.util.Map<?, org.gradle.test.GroovyInterface[]>>>[]'
 
-        def method = metaData.declaredMethods.find { it.name == 'paramMethod' }
-        method.returnType.signature == 'T'
-        method.parameters[0].type.signature == 'T'
+        def paramMethod = groovyClass.declaredMethods.find { it.name == 'paramMethod' }
+        paramMethod.returnType.signature == 'T'
+        paramMethod.parameters[0].type.signature == 'T'
     }
 
     def handlesParameterizedTypesInJavaSource() {
@@ -605,31 +594,29 @@ class ExtractDslMetaDataTaskTest extends Specification {
         repository.load(task.destFile)
 
         then:
-        def metaData = repository.get('org.gradle.test.JavaClassWithParameterizedTypes')
-
-        def property = metaData.findDeclaredProperty('setProp')
-        property.type.signature == 'java.util.Set<org.gradle.test.GroovyInterface>'
+        def javaClass = repository.get('org.gradle.test.JavaClassWithParameterizedTypes')
 
-        property = metaData.findDeclaredProperty('mapProp')
-        property.type.signature == 'java.util.Map<org.gradle.test.GroovyInterface, org.gradle.test.JavaClassWithParameterizedTypes>'
+        def setProp = javaClass.findDeclaredProperty('setProp')
+        setProp.type.signature == 'java.util.Set<org.gradle.test.GroovyInterface>'
 
-        property = metaData.findDeclaredProperty('wildcardProp')
-        property.type.signature == 'java.util.List<?>'
+        def mapProp = javaClass.findDeclaredProperty('mapProp')
+        mapProp.type.signature == 'java.util.Map<org.gradle.test.GroovyInterface, org.gradle.test.JavaClassWithParameterizedTypes>'
 
-        property = metaData.findDeclaredProperty('upperBoundProp')
-        property.type.signature == 'java.util.List<? extends org.gradle.test.GroovyInterface>'
+        def wildcardProp = javaClass.findDeclaredProperty('wildcardProp')
+        wildcardProp.type.signature == 'java.util.List<?>'
 
-        property = metaData.findDeclaredProperty('lowerBoundProp')
-        property.type.signature == 'java.util.List<? super org.gradle.test.GroovyInterface>'
+        def upperBoundProp = javaClass.findDeclaredProperty('upperBoundProp')
+        upperBoundProp.type.signature == 'java.util.List<? extends org.gradle.test.GroovyInterface>'
 
-        property = metaData.findDeclaredProperty('nestedProp')
-        property.type.signature == 'java.util.List<? super java.util.Set<? extends java.util.Map<?, org.gradle.test.GroovyInterface[]>>>[]'
+        def lowerBoundProp = javaClass.findDeclaredProperty('lowerBoundProp')
+        lowerBoundProp.type.signature == 'java.util.List<? super org.gradle.test.GroovyInterface>'
 
-        def method = metaData.declaredMethods.find { it.name == 'paramMethod' }
-        method.returnType.signature == 'T'
+        def nestedProp = javaClass.findDeclaredProperty('nestedProp')
+        nestedProp.type.signature == 'java.util.List<? super java.util.Set<? extends java.util.Map<?, org.gradle.test.GroovyInterface[]>>>[]'
 
-        def param = method.parameters[0]
-        param.type.signature == 'T'
+        def paramMethod = javaClass.declaredMethods.find { it.name == 'paramMethod' }
+        paramMethod.returnType.signature == 'T'
+        paramMethod.parameters[0].type.signature == 'T'
     }
 
     def testFile(String fileName) {
diff --git a/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/docbook/ClassDocTest.groovy b/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/docbook/ClassDocTest.groovy
index 1ff39c4..6fafbdb 100644
--- a/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/docbook/ClassDocTest.groovy
+++ b/buildSrc/src/test/groovy/org/gradle/build/docs/dsl/docbook/ClassDocTest.groovy
@@ -103,21 +103,21 @@ class ClassDocTest extends XmlSpecification {
         format(prop.additionalValues[2].title) == 'added'
         format(prop.additionalValues[2].value) == 'specific2'
 
-        prop = doc.classProperties[1]
-        prop.name == 'b'
-        prop.additionalValues.size() == 2
-        format(prop.additionalValues[0].title) == 'inherited'
-        format(prop.additionalValues[0].value) == 'inherited'
-        format(prop.additionalValues[1].title) == 'overridden'
-        format(prop.additionalValues[1].value) == 'general'
-
-        prop = doc.classProperties[2]
-        prop.name == 'c'
-        prop.additionalValues.size() == 2
-        format(prop.additionalValues[0].title) == 'inherited'
-        format(prop.additionalValues[0].value) == 'inherited'
-        format(prop.additionalValues[1].title) == 'overridden'
-        format(prop.additionalValues[1].value) == 'general'
+        def prop2 = doc.classProperties[1]
+        prop2.name == 'b'
+        prop2.additionalValues.size() == 2
+        format(prop2.additionalValues[0].title) == 'inherited'
+        format(prop2.additionalValues[0].value) == 'inherited'
+        format(prop2.additionalValues[1].title) == 'overridden'
+        format(prop2.additionalValues[1].value) == 'general'
+
+        def prop3 = doc.classProperties[2]
+        prop3.name == 'c'
+        prop3.additionalValues.size() == 2
+        format(prop3.additionalValues[0].title) == 'inherited'
+        format(prop3.additionalValues[0].value) == 'inherited'
+        format(prop3.additionalValues[1].title) == 'overridden'
+        format(prop3.additionalValues[1].value) == 'general'
 
         _ * classMetaData.findProperty('b') >> propertyB
         _ * classMetaData.findProperty('a') >> propertyA
diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml
index ad6374d..d04b040 100644
--- a/config/checkstyle/checkstyle.xml
+++ b/config/checkstyle/checkstyle.xml
@@ -33,8 +33,28 @@
         <module name="AvoidNestedBlocks"/>
 
         <!-- Braces -->
+        <module name="LeftCurly"/>
+        <module name="RightCurly"/>
         <module name="NeedBraces"/>
 
+        <!-- Whitespace -->
+        <module name="GenericWhitespace"/>
+        <module name="EmptyForInitializerPad"/>
+        <module name="EmptyForIteratorPad"/>
+        <module name="MethodParamPad"/>
+        <module name="NoWhitespaceBefore"/>
+        <module name="NoWhitespaceAfter"/>
+        <module name="OperatorWrap"/>
+        <module name="ParenPad"/>
+        <module name="TypecastParenPad"/>
+        <module name="WhitespaceAfter">
+            <property name="tokens" value="COMMA, SEMI"/>
+        </module>
+        <!--<module name="WhitespaceAround">-->
+            <!-- everything except { and } -->
+            <!--<property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXT [...]
+        <!--</module>-->
+
         <!-- Coding -->
         <module name="CovariantEquals"/>
         <module name="DefaultComesLast"/>
diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml
index 5ca7629..b210d3b 100644
--- a/config/checkstyle/suppressions.xml
+++ b/config/checkstyle/suppressions.xml
@@ -7,11 +7,11 @@
 <suppressions>
     <!-- These packages are duplicated in core, don't require a package-info.java in each place -->
     <suppress checks="JavadocPackage"
-              files=".*[/\\]subprojects[/\\]gradle-maven[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]plugins[/\\][^/\\]+"/>
+              files=".*[/\\]subprojects[/\\]maven[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]plugins[/\\][^/\\]+"/>
     <suppress checks="JavadocPackage"
-              files=".*[/\\]subprojects[/\\]gradle-plugins[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]plugins[/\\][^/\\]+"/>
+              files=".*[/\\]subprojects[/\\]plugins[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]plugins[/\\][^/\\]+"/>
     <suppress checks="JavadocPackage"
-              files=".*[/\\]subprojects[/\\]gradle-plugins[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]tasks[/\\][^/\\]+"/>
+              files=".*[/\\]subprojects[/\\]plugins[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]tasks[/\\][^/\\]+"/>
     <suppress checks="JavadocPackage"
-              files=".*[/\\]subprojects[/\\]gradle-scala[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]tasks[/\\][^/\\]+"/>
+              files=".*[/\\]subprojects[/\\]scala[/\\]src[/\\]main[/\\]groovy[/\\]org[/\\]gradle[/\\]api[/\\]tasks[/\\][^/\\]+"/>
 </suppressions>
\ No newline at end of file
diff --git a/config/codenarc.xml b/config/codenarc.xml
index 1e316e8..63ba08d 100644
--- a/config/codenarc.xml
+++ b/config/codenarc.xml
@@ -32,7 +32,7 @@
             <property name='staticFinalRegex' value='^[A-Z][A-Z_0-9]*$'/>
         </rule-config>
         <rule-config name='MethodName'>
-            <property name='regex' value='^[a-z][a-zA-Z0-9_]*$'/>
+            <property name='regex' value='^[a-z].*$'/>
         </rule-config>
         <rule-config name='VariableName'>
             <property name='finalRegex' value='^[a-z][a-zA-Z0-9]*$'/>
diff --git a/gradle.properties b/gradle.properties
index 5094e6e..b2fc51f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,2 +1,2 @@
-previousVersion=0.9
-nextVersion=0.9.1
+previousVersion=0.9.1
+nextVersion=0.9.2
diff --git a/gradle/compile.gradle b/gradle/compile.gradle
new file mode 100644
index 0000000..ce4e34c
--- /dev/null
+++ b/gradle/compile.gradle
@@ -0,0 +1,8 @@
+
+tasks.withType(Compile).allObjects { task ->
+    task.options.encoding = 'utf-8'
+}
+tasks.withType(GroovyCompile).allObjects { task ->
+    task.options.encoding = 'utf-8'
+    task.groovyOptions.encoding = 'utf-8'
+}
diff --git a/gradle/publish.gradle b/gradle/publish.gradle
new file mode 100644
index 0000000..91b7bfb
--- /dev/null
+++ b/gradle/publish.gradle
@@ -0,0 +1,62 @@
+apply plugin: 'maven'
+
+configurations {
+    publishRuntime
+}
+
+task sourceJar(type: Jar) {
+    classifier = 'sources'
+    from { sourceSets.main.java.srcDirs + sourceSets.main.groovy.srcDirs }
+}
+
+task generatePom {
+    pomFile = new File(temporaryDir, 'pom.xml')
+    doLast {
+        dependencies {
+            configurations.runtime.getAllDependencies(ProjectDependency).each {
+                publishRuntime "org.gradle:gradle-${it.dependencyProject.name}:${version}"
+            }
+        }
+
+        def localDeployer = install.repositories.mavenInstaller
+
+        configure(localDeployer) {
+            pom.scopeMappings.mappings.clear()
+            pom.scopeMappings.addMapping(300, configurations.publishRuntime, Conf2ScopeMappingContainer.RUNTIME)
+            pom.groupId = project.group
+            pom.artifactId = archivesBaseName
+            pom.version = version
+            pom.writeTo(pomFile)
+        }
+
+    }
+}
+
+artifacts {
+    publishRuntime jar
+    publishRuntime sourceJar
+    publishRuntime new org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact(archivesBaseName, 'pom', 'pom', null, new Date(), generatePom.pomFile, generatePom)
+}
+
+uploadArchives {
+    configuration = configurations.publishRuntime
+    dependsOn generatePom
+    uploadDescriptor = false
+    doFirst {
+        org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials('Artifactory Realm', 'gradle.artifactoryonline.com', artifactoryUserName, artifactoryUserPassword)
+        repositories.add(new org.apache.ivy.plugins.resolver.URLResolver()) {
+            name = 'gradleReleases'
+            addArtifactPattern("${version.libsUrl}/${project.group.replaceAll('\\.', '/')}/${archivesBaseName}/[revision]/[artifact]-[revision](-[classifier]).[ext]" as String)
+        }
+    }
+}
+
+task publishLocalArchives(type: Upload) {
+    configuration = configurations.publishRuntime
+    dependsOn generatePom
+    uploadDescriptor = false
+    repositories.add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
+        name = 'gradleReleases'
+        addArtifactPattern("${rootProject.file('build/repo')}/${project.group.replaceAll('\\.', '/')}/${archivesBaseName}/[revision]/[artifact]-[revision](-[classifier]).[ext]" as String)
+    }
+}
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..b8f4a02
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Mon Jan 03 11:17:24 EST 2011
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=http\://gradle.artifactoryonline.com/gradle/distributions/gradle-0.9.1-bin.zip
diff --git a/gradlew b/gradlew
index 3e1b1cd..6e0b988 100755
--- a/gradlew
+++ b/gradlew
@@ -7,8 +7,10 @@
 ##############################################################################
 
 # Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-# GRADLE_OPTS="$GRADLE_OPTS -Xmx512"
-# JAVA_OPTS="$JAVA_OPTS -Xmx512"
+# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
+# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+
+GRADLE_APP_NAME=Gradle
 
 warn ( ) {
     echo "${PROGNAME}: $*"
@@ -61,8 +63,8 @@ if $cygwin ; then
 fi
 
 STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
-CLASSPATH=`dirname "$0"`/wrapper/gradle-wrapper.jar
-WRAPPER_PROPERTIES=`dirname "$0"`/wrapper/gradle-wrapper.properties
+CLASSPATH=`dirname "$0"`/gradle/wrapper/gradle-wrapper.jar
+WRAPPER_PROPERTIES=`dirname "$0"`/gradle/wrapper/gradle-wrapper.properties
 # Determine the Java command to use to start the JVM.
 if [ -z "$JAVACMD" ] ; then
     if [ -n "$JAVA_HOME" ] ; then
@@ -133,8 +135,11 @@ if $cygwin ; then
     esac
 fi
 
+GRADLE_APP_BASE_NAME=`basename "$0"`
+
 "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
         -classpath "$CLASSPATH" \
+        -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
         -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
         $STARTER_MAIN_CLASS \
         "$@"
diff --git a/gradlew.bat b/gradlew.bat
index 644b918..4ceea97 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -13,8 +13,8 @@
 if "%OS%"=="Windows_NT" setlocal
 
 @rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
- at rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512
- at rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512
+ at rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
+ at rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
 
 set DIRNAME=%~dp0
 if "%DIRNAME%" == "" set DIRNAME=.\
@@ -101,8 +101,8 @@ set CMD_LINE_ARGS=%$
 @rem Setup the command line
 
 set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain
-set CLASSPATH=%DIRNAME%\wrapper\gradle-wrapper.jar
-set WRAPPER_PROPERTIES=%DIRNAME%\wrapper\gradle-wrapper.properties
+set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar
+set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties
 set JAVA_EXE=%JAVA_HOME%\bin\java.exe
 
 set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
diff --git a/settings.gradle b/settings.gradle
index 881e202..ffaadfb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -28,12 +28,14 @@ include 'codeQuality'
 include 'antlr'
 include 'ui'
 include 'openApi'
+include 'toolingApi'
 include 'docs'
 
 rootProject.name = 'gradle'
 rootProject.children.each {project ->
     String fileBaseName = project.name.replaceAll("\\p{Upper}") { "-${it.toLowerCase()}" }
-    project.projectDir = new File(settingsDir, "subprojects/gradle-$fileBaseName")
+    String projectDirName = "subprojects/$fileBaseName"
+    project.projectDir = new File(settingsDir, projectDirName)
     project.buildFileName = "${fileBaseName}.gradle"
     assert project.projectDir.isDirectory()
     assert project.buildFile.isFile()
diff --git a/src/toplevel/LICENSE b/src/toplevel/LICENSE
index c9332d7..35df624 100644
--- a/src/toplevel/LICENSE
+++ b/src/toplevel/LICENSE
@@ -201,56 +201,6 @@
    See the License for the specific language governing permissions and
    limitations under the License.
 
-------------------------------------------------------------------------------
-License for svnkit package
-------------------------------------------------------------------------------
-The TMate Open Source License.
-
-This license applies to all portions of TMate SVNKit library, which
-are not externally-maintained libraries (e.g. Ganymed SSH library).
-
-All the source code and compiled classes in package org.tigris.subversion.javahl
-except SvnClient class are covered by the license in JAVAHL-LICENSE file
-
-Copyright (c) 2004-2008 TMate Software. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-
-    * Redistributions in any form must be accompanied by information on how to
-      obtain complete source code for the software that uses SVNKit and any
-      accompanying software that uses the software that uses SVNKit. The source
-      code must either be included in the distribution or be available for no
-      more than the cost of distribution plus a nominal fee, and must be freely
-      redistributable under reasonable conditions. For an executable file, complete
-      source code means the source code for all modules it contains. It does not
-      include source code for modules or files that typically accompany the major
-      components of the operating system on which the executable file runs.
-
-    * Redistribution in any form without redistributing source code for software
-      that uses SVNKit is possible only when such redistribution is explictly permitted
-      by TMate Software. Please, contact TMate Software at support at svnkit.com to
-      get such permission.
-
-THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE
-DISCLAIMED.
-
-IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ------------------------------------------------------------------------------
 License for the logback package
diff --git a/src/toplevel/changelog.txt b/src/toplevel/changelog.txt
index 41ab933..3addfe3 100644
--- a/src/toplevel/changelog.txt
+++ b/src/toplevel/changelog.txt
@@ -1,4 +1,4 @@
 
-Release Notes - Gradle - Version 0.9.1
+Release Notes - Gradle - Version 0.9.2
 
-See http://docs.codehaus.org/display/GRADLE/Gradle+0.9.1+Release+Notes
\ No newline at end of file
+See http://docs.codehaus.org/display/GRADLE/Gradle+0.9.2+Release+Notes
\ No newline at end of file
diff --git a/subprojects/gradle-announce/announce.gradle b/subprojects/announce/announce.gradle
similarity index 100%
rename from subprojects/gradle-announce/announce.gradle
rename to subprojects/announce/announce.gradle
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/AnnouncePlugin.groovy b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/AnnouncePlugin.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/AnnouncePlugin.groovy
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/AnnouncePlugin.groovy
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/Announcer.java b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/Announcer.java
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/Announcer.java
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/Announcer.java
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/AnnouncerFactory.java b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/AnnouncerFactory.java
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/AnnouncerFactory.java
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/AnnouncerFactory.java
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactory.groovy b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactory.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactory.groovy
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactory.groovy
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Growl.groovy b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Growl.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Growl.groovy
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Growl.groovy
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/NotifySend.groovy b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/NotifySend.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/NotifySend.groovy
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/NotifySend.groovy
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Snarl.groovy b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Snarl.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Snarl.groovy
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Snarl.groovy
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Twitter.groovy b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Twitter.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Twitter.groovy
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/internal/Twitter.groovy
diff --git a/subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/package-info.java b/subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/package-info.java
similarity index 100%
rename from subprojects/gradle-announce/src/main/groovy/org/gradle/api/plugins/announce/package-info.java
rename to subprojects/announce/src/main/groovy/org/gradle/api/plugins/announce/package-info.java
diff --git a/subprojects/gradle-announce/src/main/resources/META-INF/gradle-plugins/announce.properties b/subprojects/announce/src/main/resources/META-INF/gradle-plugins/announce.properties
similarity index 100%
rename from subprojects/gradle-announce/src/main/resources/META-INF/gradle-plugins/announce.properties
rename to subprojects/announce/src/main/resources/META-INF/gradle-plugins/announce.properties
diff --git a/subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginConventionTest.groovy b/subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginConventionTest.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginConventionTest.groovy
rename to subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginConventionTest.groovy
diff --git a/subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginTest.groovy b/subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginTest.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginTest.groovy
rename to subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/AnnouncePluginTest.groovy
diff --git a/subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactoryTest.groovy b/subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactoryTest.groovy
rename to subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/internal/DefaultAnnouncerFactoryTest.groovy
diff --git a/subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/internal/NotifySendTest.groovy b/subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/internal/NotifySendTest.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/internal/NotifySendTest.groovy
rename to subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/internal/NotifySendTest.groovy
diff --git a/subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/internal/SnarlTest.groovy b/subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/internal/SnarlTest.groovy
similarity index 100%
rename from subprojects/gradle-announce/src/test/groovy/org/gradle/api/plugins/announce/internal/SnarlTest.groovy
rename to subprojects/announce/src/test/groovy/org/gradle/api/plugins/announce/internal/SnarlTest.groovy
diff --git a/subprojects/gradle-antlr/antlr.gradle b/subprojects/antlr/antlr.gradle
similarity index 100%
rename from subprojects/gradle-antlr/antlr.gradle
rename to subprojects/antlr/antlr.gradle
diff --git a/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrPlugin.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrPlugin.java
new file mode 100644
index 0000000..29ffdf3
--- /dev/null
+++ b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrPlugin.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins.antlr;
+
+import java.io.File;
+
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.internal.DynamicObjectAware;
+import org.gradle.api.internal.IConventionAware;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.internal.tasks.DefaultSourceSet;
+import org.gradle.api.plugins.Convention;
+import org.gradle.api.plugins.JavaPlugin;
+
+import static org.gradle.api.plugins.JavaPlugin.COMPILE_CONFIGURATION_NAME;
+
+import org.gradle.api.plugins.JavaPluginConvention;
+import org.gradle.api.plugins.antlr.internal.AntlrSourceVirtualDirectoryImpl;
+import org.gradle.api.tasks.ConventionValue;
+import org.gradle.api.tasks.SourceSet;
+
+/**
+ * A plugin for adding Antlr support to {@link JavaPlugin java projects}.
+ *
+ * @author Steve Ebersole
+ */
+public class AntlrPlugin implements Plugin<Project> {
+    public static final String ANTLR_CONFIGURATION_NAME = "antlr";
+
+    public void apply(final Project project) {
+        project.getPlugins().apply(JavaPlugin.class);
+
+        // set up a configuration named 'antlr' for the user to specify the antlr libs to use in case
+        // they want a specific version etc.
+        Configuration antlrConfiguration = project.getConfigurations().add(ANTLR_CONFIGURATION_NAME).setVisible(false)
+                .setTransitive(false).setDescription("The Antlr libraries to be used for this project.");
+        project.getConfigurations().getByName(COMPILE_CONFIGURATION_NAME).extendsFrom(antlrConfiguration);
+
+        final ProjectInternal projectInternal = (ProjectInternal) project;
+        project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().all(
+                new Action<SourceSet>() {
+                    public void execute(SourceSet sourceSet) {
+                        // for each source set we will:
+                        // 1) Add a new 'antlr' virtual directory mapping
+                        final AntlrSourceVirtualDirectoryImpl antlrDirectoryDelegate
+                                = new AntlrSourceVirtualDirectoryImpl(((DefaultSourceSet) sourceSet).getDisplayName(),
+                                projectInternal.getFileResolver());
+                        ((DynamicObjectAware) sourceSet).getConvention().getPlugins().put(
+                                AntlrSourceVirtualDirectory.NAME, antlrDirectoryDelegate);
+                        final String srcDir = String.format("src/%s/antlr", sourceSet.getName());
+                        antlrDirectoryDelegate.getAntlr().srcDir(srcDir);
+                        sourceSet.getAllSource().add(antlrDirectoryDelegate.getAntlr());
+
+                        // 2) create an AntlrTask for this sourceSet following the gradle
+                        //    naming conventions via call to sourceSet.getTaskName()
+                        final String taskName = sourceSet.getTaskName("generate", "GrammarSource");
+                        AntlrTask antlrTask = project.getTasks().add(taskName, AntlrTask.class);
+                        antlrTask.setDescription(String.format("Processes the %s Antlr grammars.",
+                                sourceSet.getName()));
+
+                        // 3) set up convention mapping for default sources (allows user to not have to specify)
+                        antlrTask.conventionMapping("defaultSource", new ConventionValue() {
+                            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                                return antlrDirectoryDelegate.getAntlr();
+                            }
+                        });
+
+                        // 4) set up convention mapping for handling the 'antlr' dependency configuration
+                        antlrTask.getConventionMapping().map("antlrClasspath", new ConventionValue() {
+                            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                                return project.getConfigurations().getByName(ANTLR_CONFIGURATION_NAME).copy()
+                                        .setTransitive(true);
+                            }
+                        });
+
+                        // 5) Set up the Antlr output directory (adding to javac inputs!)
+                        final String outputDirectoryName = String.format("%s/generated-src/antlr/%s",
+                                project.getBuildDir(), sourceSet.getName());
+                        final File outputDirectory = new File(outputDirectoryName);
+                        antlrTask.setOutputDirectory(outputDirectory);
+                        sourceSet.getJava().srcDir(outputDirectory);
+
+                        // 6) register fact that antlr should be run before compiling
+                        project.getTasks().getByName(sourceSet.getCompileJavaTaskName()).dependsOn(taskName);
+                    }
+                });
+    }
+}
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrSourceVirtualDirectory.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrSourceVirtualDirectory.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrSourceVirtualDirectory.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrSourceVirtualDirectory.java
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrTask.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrTask.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrTask.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrTask.java
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/AntlrSourceVirtualDirectoryImpl.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/AntlrSourceVirtualDirectoryImpl.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/AntlrSourceVirtualDirectoryImpl.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/AntlrSourceVirtualDirectoryImpl.java
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlan.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlan.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlan.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlan.java
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlanBuilder.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlanBuilder.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlanBuilder.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GenerationPlanBuilder.java
diff --git a/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarDelegate.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarDelegate.java
new file mode 100644
index 0000000..255fd29
--- /dev/null
+++ b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarDelegate.java
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.antlr.internal;
+
+import java.lang.reflect.Method;
+import java.util.Enumeration;
+import java.util.ArrayList;
+import java.util.List;
+
+import antlr.collections.impl.IndexedVector;
+import antlr.preprocessor.GrammarFile;
+
+/**
+ * Antlr defines its {@link antlr.preprocessor.Grammar} class as package-protected for some unfortunate reason. So this class acts as a delegate to the Antlr {@link antlr.preprocessor.Grammar} class,
+ * hiding all the ugly necessary reflection code.
+ *
+ * @author Steve Ebersole
+ */
+public class GrammarDelegate {
+    public static List<GrammarDelegate> extractGrammarDelegates(GrammarFile antlrGrammarFile) {
+        List<GrammarDelegate> grammarDelegates = new ArrayList<GrammarDelegate>();
+        Enumeration grammarFileGramars = antlrGrammarFile.getGrammars().elements();
+        while (grammarFileGramars.hasMoreElements()) {
+            grammarDelegates.add(new GrammarDelegate(grammarFileGramars.nextElement()));
+        }
+        return grammarDelegates;
+    }
+
+    private final String className;
+    private final String importVocab;
+    private final String exportVocab;
+    private final GrammarDelegate superGrammarDelegate;
+
+    public GrammarDelegate(Object antlrGrammarMetadata) {
+        try {
+            final Method getNameMethod = ANTLR_GRAMMAR_CLASS.getDeclaredMethod("getName", NO_ARG_SIGNATURE);
+            getNameMethod.setAccessible(true);
+            this.className = (String) getNameMethod.invoke(antlrGrammarMetadata, NO_ARGS);
+
+            final Method getSuperGrammarMethod = ANTLR_GRAMMAR_CLASS.getMethod("getSuperGrammar", NO_ARG_SIGNATURE);
+            getSuperGrammarMethod.setAccessible(true);
+            final Object antlrSuperGrammarGrammarMetadata = getSuperGrammarMethod.invoke(antlrGrammarMetadata, NO_ARGS);
+            this.superGrammarDelegate = antlrSuperGrammarGrammarMetadata == null ? null : new GrammarDelegate(antlrSuperGrammarGrammarMetadata);
+
+            Method getOptionsMethod = ANTLR_GRAMMAR_CLASS.getMethod("getOptions", NO_ARG_SIGNATURE);
+            getOptionsMethod.setAccessible(true);
+            IndexedVector options = (IndexedVector) getOptionsMethod.invoke(antlrGrammarMetadata, NO_ARGS);
+
+            Method getRHSMethod = ANTLR_OPTION_CLASS.getMethod("getRHS", NO_ARG_SIGNATURE);
+            getRHSMethod.setAccessible(true);
+
+            final Object importVocabOption = options == null ? null : options.getElement("importVocab");
+            this.importVocab = importVocabOption == null ? null : vocabName((String) getRHSMethod.invoke(importVocabOption, NO_ARGS));
+
+            final Object exportVocabOption = options == null ? null : options.getElement("exportVocab");
+            this.exportVocab = exportVocabOption == null ? null : vocabName((String) getRHSMethod.invoke(exportVocabOption, NO_ARGS));
+        } catch (Throwable t) {
+            throw new IllegalStateException("Error accessing  Antlr grammar metadata", t);
+        }
+    }
+
+    /**
+     * Retrieves the unqualified name of the lexer/parser class.
+     *
+     * @return The unqualified lexer/parser class name.
+     */
+    public String getClassName() {
+        return className;
+    }
+
+    /**
+     * Retrieves the name of this vocabulary imported by this grammar.
+     *
+     * @return The gammar's imported vocabulary name.
+     */
+    public String getImportVocab() {
+        return importVocab;
+    }
+
+    /**
+     * Retrieves the name of this vocabulary exported by this grammar.
+     *
+     * @return The gammar's exported vocabulary name.
+     */
+    public String getExportVocab() {
+        return exportVocab;
+    }
+
+    /**
+     * Retrieves the grammar delegate associated with this grammars super grammar deduced during preprocessing from its extends clause.
+     *
+     * @return The super-grammar grammar delegate
+     */
+    public GrammarDelegate getSuperGrammarDelegate() {
+        return superGrammarDelegate;
+    }
+
+    private GrammarMetadata associatedGrammarMetadata;
+
+    public void associateWith(GrammarMetadata associatedGrammarMetadata) {
+        this.associatedGrammarMetadata = associatedGrammarMetadata;
+    }
+
+    public GrammarMetadata getAssociatedGrammarMetadata() {
+        return associatedGrammarMetadata;
+    }
+
+    private String vocabName(String vocabName) {
+        if (vocabName == null) {
+            return null;
+        }
+        vocabName = vocabName.trim();
+        if (vocabName.endsWith(";")) {
+            vocabName = vocabName.substring(0, vocabName.length() - 1);
+        }
+        return vocabName;
+    }
+
+    private static final Class ANTLR_GRAMMAR_CLASS;
+    private static final Class ANTLR_OPTION_CLASS;
+
+    static {
+        ANTLR_GRAMMAR_CLASS = loadAntlrClass("antlr.preprocessor.Grammar");
+        ANTLR_OPTION_CLASS = loadAntlrClass("antlr.preprocessor.Option");
+    }
+
+    public static final Class[] NO_ARG_SIGNATURE = new Class[0];
+    public static final Object[] NO_ARGS = new Object[0];
+
+    private static Class loadAntlrClass(String className) {
+        try {
+            return Class.forName(className, true, GrammarDelegate.class.getClassLoader());
+        } catch (ClassNotFoundException e) {
+            throw new IllegalStateException("Unable to locate Antlr class [" + className + "]", e);
+        }
+    }
+}
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarFileMetadata.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarFileMetadata.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarFileMetadata.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarFileMetadata.java
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarMetadata.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarMetadata.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarMetadata.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarMetadata.java
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/MetadataExtracter.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/MetadataExtracter.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/MetadataExtracter.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/MetadataExtracter.java
diff --git a/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/XRef.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/XRef.java
new file mode 100644
index 0000000..2b73ded
--- /dev/null
+++ b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/XRef.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.antlr.internal;
+
+import java.util.LinkedHashMap;
+import java.util.HashMap;
+import java.util.Iterator;
+
+import antlr.preprocessor.Hierarchy;
+
+/**
+ * Models cross-reference (x-ref) info about {@link GrammarFileMetadata grammar files} such as {@link #filesByPath},
+ * {@link #filesByExportVocab} and {@link #filesByClassName}.
+ *
+ * @author Steve Ebersole
+ */
+public class XRef {
+    private final Hierarchy antlrHierarchy;
+
+    private LinkedHashMap<String, GrammarFileMetadata> filesByPath = new LinkedHashMap<String, GrammarFileMetadata>();
+    private HashMap<String, GrammarFileMetadata> filesByExportVocab = new HashMap<String, GrammarFileMetadata>();
+    private HashMap<String, GrammarFileMetadata> filesByClassName = new HashMap<String, GrammarFileMetadata>();
+
+    public XRef(Hierarchy antlrHierarchy) {
+        this.antlrHierarchy = antlrHierarchy;
+    }
+
+    public Object getAntlrHierarchy() {
+        return antlrHierarchy;
+    }
+
+    /**
+     * Adds a grammar file to this cross-reference.
+     *
+     * @param grammarFileMetadata The grammar file to add (and to be cross referenced).
+     */
+    void addGrammarFile(GrammarFileMetadata grammarFileMetadata) {
+        filesByPath.put(grammarFileMetadata.getFilePath().getPath(), grammarFileMetadata);
+        for (GrammarMetadata grammarMetadata : grammarFileMetadata.getGrammars()) {
+            filesByClassName.put(grammarMetadata.getClassName(), grammarFileMetadata);
+            if (grammarMetadata.getExportVocab() != null) {
+                GrammarFileMetadata old = filesByExportVocab.put(grammarMetadata.getExportVocab(), grammarFileMetadata);
+                if (old != null && old != grammarFileMetadata) {
+                    System.out.println("[WARNING] : multiple grammars defined the same exportVocab : " + grammarMetadata
+                            .getExportVocab());
+                }
+            }
+        }
+    }
+
+    public Iterator<GrammarFileMetadata> iterateGrammarFiles() {
+        return filesByPath.values().iterator();
+    }
+
+    /**
+     * Locate the grammar file metadata by grammar file path.
+     *
+     * @param path The grammar file path.
+     * @return The grammar file metadata.  May be null if none found.
+     */
+    public GrammarFileMetadata getGrammarFileByPath(String path) {
+        return filesByPath.get(path);
+    }
+
+    /**
+     * Locate the grammar file metadata by the name of a class generated from one of its included grammars.
+     *
+     * @param className The generated class name.
+     * @return The grammar file metadata.  May be null if none found.
+     */
+    public GrammarFileMetadata getGrammarFileByClassName(String className) {
+        return filesByClassName.get(className);
+    }
+
+    /**
+     * Locate the grammar file metadata by the name of a vocabulary exported from one of its included grammars.
+     *
+     * @param vocabName The vocabulary name
+     * @return The grammar file metadata.  May be null if none found.
+     */
+    public GrammarFileMetadata getGrammarFileByExportVocab(String vocabName) {
+        return filesByExportVocab.get(vocabName);
+    }
+}
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/package-info.java b/subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/package-info.java
similarity index 100%
rename from subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/package-info.java
rename to subprojects/antlr/src/main/groovy/org/gradle/api/plugins/antlr/package-info.java
diff --git a/subprojects/gradle-antlr/src/main/resources/META-INF/gradle-plugins/antlr.properties b/subprojects/antlr/src/main/resources/META-INF/gradle-plugins/antlr.properties
similarity index 100%
rename from subprojects/gradle-antlr/src/main/resources/META-INF/gradle-plugins/antlr.properties
rename to subprojects/antlr/src/main/resources/META-INF/gradle-plugins/antlr.properties
diff --git a/subprojects/antlr/src/test/groovy/org/gradle/api/plugins/antlr/AntlrPluginTest.groovy b/subprojects/antlr/src/test/groovy/org/gradle/api/plugins/antlr/AntlrPluginTest.groovy
new file mode 100644
index 0000000..f3a1bd8
--- /dev/null
+++ b/subprojects/antlr/src/test/groovy/org/gradle/api/plugins/antlr/AntlrPluginTest.groovy
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins.antlr
+
+import spock.lang.Specification
+import org.gradle.api.Project
+import org.gradle.util.HelperUtil
+
+class AntlrPluginTest extends Specification {
+    private final Project project = HelperUtil.createRootProject()
+    private final AntlrPlugin plugin = new AntlrPlugin()
+
+    def addsAntlrPropertiesToEachSourceSet() {
+        when:
+        plugin.apply(project)
+
+        then:
+        def main = project.sourceSets.main
+        main.antlr.srcDirs == [project.file('src/main/antlr')] as Set
+
+        def test = project.sourceSets.test
+        test.antlr.srcDirs == [project.file('src/test/antlr')] as Set
+
+        when:
+        project.sourceSets.add('custom')
+
+        then:
+        def custom = project.sourceSets.custom
+        custom.antlr.srcDirs == [project.file('src/custom/antlr')] as Set
+    }
+    
+    def addsTaskForEachSourceSet() {
+        when:
+        plugin.apply(project)
+
+        then:
+        def main = project.tasks.generateGrammarSource
+        main instanceof AntlrTask
+        project.tasks.compileJava.taskDependencies.getDependencies(null).contains(main)
+
+        def test = project.tasks.generateTestGrammarSource
+        test instanceof AntlrTask
+        project.tasks.compileTestJava.taskDependencies.getDependencies(null).contains(test)
+
+        when:
+        project.sourceSets.add('custom')
+
+        then:
+        def custom = project.tasks.generateCustomGrammarSource
+        custom instanceof AntlrTask
+        project.tasks.compileCustomJava.taskDependencies.getDependencies(null).contains(custom)
+    }
+}
diff --git a/subprojects/code-quality/code-quality.gradle b/subprojects/code-quality/code-quality.gradle
new file mode 100644
index 0000000..b433c56
--- /dev/null
+++ b/subprojects/code-quality/code-quality.gradle
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+dependencies {
+    groovy libraries.groovy_depends
+
+    compile project(':core')
+    compile project(':plugins')
+
+    compile "org.codenarc:CodeNarc:0.12 at jar"
+    compile libraries.slf4j_api
+
+    // CodeNarc dependencies
+    runtime libraries.log4j_to_slf4j,
+            "org.gmetrics:GMetrics:0.3 at jar"
+
+    // Checkstyle dependencies
+    runtime "com.puppycrawl.tools:checkstyle:5.3 at jar",
+            libraries.google_collections,
+            libraries.antlr,
+            "commons-beanutils:commons-beanutils-core:1.8.3 at jar"
+
+    testCompile project(path: ':core', configuration: 'testFixtures')
+    testRuntime project(path: ':core', configuration: 'testFixturesRuntime')
+}
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCheckstyle.groovy b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCheckstyle.groovy
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCheckstyle.groovy
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCheckstyle.groovy
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCodeNarc.groovy b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCodeNarc.groovy
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCodeNarc.groovy
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/AntCodeNarc.groovy
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/Checkstyle.java b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/Checkstyle.java
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/Checkstyle.java
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/Checkstyle.java
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeNarc.java b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeNarc.java
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeNarc.java
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeNarc.java
diff --git a/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeQualityPlugin.groovy b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeQualityPlugin.groovy
new file mode 100644
index 0000000..7e17388
--- /dev/null
+++ b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeQualityPlugin.groovy
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.api.plugins.quality
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.api.plugins.GroovyBasePlugin
+import org.gradle.api.plugins.JavaBasePlugin
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.plugins.ReportingBasePlugin
+import org.gradle.api.tasks.GroovySourceSet
+import org.gradle.api.tasks.SourceSet
+
+/**
+ * A {@link Plugin} which measures and enforces code quality for Java and Groovy projects.
+ */
+public class CodeQualityPlugin implements Plugin<Project> {
+    public static final String CHECKSTYLE_MAIN_TASK = "checkstyleMain";
+    public static final String CHECKSTYLE_TEST_TASK = "checkstyleTest";
+    public static final String CODE_NARC_MAIN_TASK = "codenarcMain";
+    public static final String CODE_NARC_TEST_TASK = "codenarcTest";
+
+    public void apply(final Project project) {
+        project.plugins.apply(ReportingBasePlugin.class);
+
+        JavaCodeQualityPluginConvention javaPluginConvention = new JavaCodeQualityPluginConvention(project)
+        project.convention.plugins.javaCodeQuality = javaPluginConvention;
+
+        GroovyCodeQualityPluginConvention groovyPluginConvention = new GroovyCodeQualityPluginConvention(project)
+        project.convention.plugins.groovyCodeQuality = groovyPluginConvention;
+
+        configureCheckstyleDefaults(project, javaPluginConvention)
+        configureCodeNarcDefaults(project, groovyPluginConvention)
+
+        project.plugins.withType(JavaBasePlugin.class) {
+            configureForJavaPlugin(project, javaPluginConvention);
+        }
+        project.plugins.withType(GroovyBasePlugin.class) {
+            configureForGroovyPlugin(project, groovyPluginConvention);
+        }
+    }
+
+    private void configureCheckstyleDefaults(Project project, JavaCodeQualityPluginConvention pluginConvention) {
+        project.tasks.withType(Checkstyle.class) {Checkstyle checkstyle ->
+            checkstyle.conventionMapping.configFile = { pluginConvention.checkstyleConfigFile }
+            checkstyle.conventionMapping.map('properties') { pluginConvention.checkstyleProperties }
+        }
+    }
+
+    private void configureCodeNarcDefaults(Project project, GroovyCodeQualityPluginConvention pluginConvention) {
+        project.tasks.withType(CodeNarc.class) {CodeNarc codenarc ->
+            codenarc.conventionMapping.configFile = { pluginConvention.codeNarcConfigFile }
+        }
+    }
+
+    private void configureCheckTask(Project project) {
+        Task task = project.tasks[JavaBasePlugin.CHECK_TASK_NAME]
+        task.setDescription("Executes all quality checks");
+        task.dependsOn project.tasks.withType(Checkstyle.class)
+        task.dependsOn project.tasks.withType(CodeNarc.class)
+    }
+
+    private void configureForJavaPlugin(Project project, JavaCodeQualityPluginConvention pluginConvention) {
+        configureCheckTask(project);
+
+        project.convention.getPlugin(JavaPluginConvention.class).sourceSets.all {SourceSet set ->
+            Checkstyle checkstyle = project.tasks.add(set.getTaskName("checkstyle", null), Checkstyle.class);
+            checkstyle.description = "Runs Checkstyle against the $set.name Java source code."
+            checkstyle.conventionMapping.defaultSource = { set.allJava; }
+            checkstyle.conventionMapping.configFile = { pluginConvention.checkstyleConfigFile }
+            checkstyle.conventionMapping.resultFile = { new File(pluginConvention.checkstyleResultsDir, "${set.name}.xml") }
+            checkstyle.conventionMapping.classpath = { set.compileClasspath; }
+        }
+    }
+
+    private void configureForGroovyPlugin(Project project, GroovyCodeQualityPluginConvention pluginConvention) {
+        project.convention.getPlugin(JavaPluginConvention.class).sourceSets.all {SourceSet set ->
+            GroovySourceSet groovySourceSet = set.convention.getPlugin(GroovySourceSet.class)
+            CodeNarc codeNarc = project.tasks.add(set.getTaskName("codenarc", null), CodeNarc.class);
+            codeNarc.setDescription("Runs CodeNarc against the $set.name Groovy source code.");
+            codeNarc.conventionMapping.defaultSource = { groovySourceSet.allGroovy; }
+            codeNarc.conventionMapping.configFile = { pluginConvention.codeNarcConfigFile; }
+            codeNarc.conventionMapping.reportFile = { new File(pluginConvention.codeNarcReportsDir, "${set.name}.html"); }
+        }
+    }
+}
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/GroovyCodeQualityPluginConvention.groovy b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/GroovyCodeQualityPluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/GroovyCodeQualityPluginConvention.groovy
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/GroovyCodeQualityPluginConvention.groovy
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/JavaCodeQualityPluginConvention.groovy b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/JavaCodeQualityPluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/JavaCodeQualityPluginConvention.groovy
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/JavaCodeQualityPluginConvention.groovy
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/package-info.java b/subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/package-info.java
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/package-info.java
rename to subprojects/code-quality/src/main/groovy/org/gradle/api/plugins/quality/package-info.java
diff --git a/subprojects/gradle-code-quality/src/main/resources/META-INF/gradle-plugins/code-quality.properties b/subprojects/code-quality/src/main/resources/META-INF/gradle-plugins/code-quality.properties
similarity index 100%
rename from subprojects/gradle-code-quality/src/main/resources/META-INF/gradle-plugins/code-quality.properties
rename to subprojects/code-quality/src/main/resources/META-INF/gradle-plugins/code-quality.properties
diff --git a/subprojects/gradle-code-quality/src/test/groovy/org/gradle/api/plugins/quality/CodeQualityPluginTest.groovy b/subprojects/code-quality/src/test/groovy/org/gradle/api/plugins/quality/CodeQualityPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-code-quality/src/test/groovy/org/gradle/api/plugins/quality/CodeQualityPluginTest.groovy
rename to subprojects/code-quality/src/test/groovy/org/gradle/api/plugins/quality/CodeQualityPluginTest.groovy
diff --git a/subprojects/core/core.gradle b/subprojects/core/core.gradle
new file mode 100644
index 0000000..7473e3c
--- /dev/null
+++ b/subprojects/core/core.gradle
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.text.DateFormat
+import org.gradle.api.internal.artifacts.dependencies.DefaultSelfResolvingDependency
+
+apply plugin: 'groovy'
+apply from: "$rootDir/gradle/integTest.gradle"
+
+configurations {
+    testFixtures
+    testFixturesRuntime {
+        extendsFrom testFixtures, testRuntime
+    }
+    integTestFixtures {
+        extendsFrom testFixtures
+    }
+    integTestFixturesRuntime {
+        extendsFrom integTestFixtures, integTestRuntime
+    }
+}
+
+dependencies {
+    groovy libraries.groovy_depends
+
+    compile "commons-httpclient:commons-httpclient:3.0 at jar", "commons-codec:commons-codec:1.2 at jar", libraries.jcl_to_slf4j
+
+    compile libraries.ivy, "com.jcraft:jsch:0.1.42 at jar", 'com.jcraft:jzlib:1.0.7 at jar'
+
+    compile libraries.ant,
+            libraries.ant_nodeps,
+            libraries.logback_classic,
+            libraries.logback_core,
+            libraries.slf4j_api,
+            libraries.jul_to_slf4j,
+            libraries.commons_io,
+            libraries.commons_lang,
+            "commons-codec:commons-codec:1.2 at jar",
+            libraries.google_collections,
+            "commons-collections:commons-collections:3.2.1 at jar",
+            "slide:webdavlib:2.0 at jar",
+            "org.apache.maven:maven-ant-tasks:2.1.1 at jar",
+            libraries.asm_all,
+            'org.fusesource.jansi:jansi:1.2.1',
+            'org.jruby.ext.posix:jna-posix:1.0.3',
+            'org.sonatype.pmaven:pmaven-common:0.8-20100325 at jar',
+            'org.sonatype.pmaven:pmaven-groovy:0.8-20100325 at jar',
+            'org.codehaus.plexus:plexus-component-annotations:1.5.2'
+
+    runtime 'net.java.dev.jna:jna:3.2.2'
+
+    runtime libraries.log4j_to_slf4j, libraries.jcl_to_slf4j
+
+    testCompile libraries.xmlunit
+
+    compile libraries.ant_launcher
+
+    integTestCompile libraries.jetty_depends, project(':wrapper'), project(':toolingApi')
+
+    testFixtures sourceSets.test.classes, sourceSets.main.classes
+    integTestFixtures sourceSets.integTest.classes
+
+    // TODO - remove this duplication
+    publishRuntime libraries.slf4j_api
+}
+
+task versionProperties(type: WriteVersionProperties) {
+    propertiesFile = new File(sourceSets.main.classesDir, GradleVersion.FILE_NAME)
+}
+
+classes.dependsOn(versionProperties)
+
+task ideVersionProperties(type: WriteVersionProperties) {
+    propertiesFile = new File(ideDir, "resources/test/$GradleVersion.FILE_NAME")
+}
+
+ide.dependsOn ideVersionProperties
+
+ideaModule {
+    dependsOn ideVersionProperties
+    scopes.COMPILE.plus.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files(new File(ideDir, "resources/test/")))))
+}
+
+eclipseClasspath {
+    dependsOn ideVersionProperties
+    plusConfigurations.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files(new File(ideDir, "resources/test/")))))
+    plusConfigurations.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files(project.sourceSets.integTest.resources.srcDirs))))
+	whenConfigured { classpath ->
+		classpath.entries.removeAll { entry -> entry.kind == 'src' && entry.path.startsWith('src/integTest/resources')}
+	}
+}
+
+[compileGroovy, compileTestGroovy]*.groovyOptions*.fork(memoryInitialSize: '128M', memoryMaximumSize: '1G')
+
+test {
+    jvmArgs '-Xms128m', '-Xmx512m', '-XX:MaxPermSize=128m', '-XX:+HeapDumpOnOutOfMemoryError'
+}
+
+class WriteVersionProperties extends DefaultTask {
+    @Input
+    String getVersion() { return project.version.toString() }
+
+    @Input
+    Date getBuildTime() { return project.version.buildTime }
+
+    @OutputFile
+    File propertiesFile
+
+    @TaskAction
+    def void generate() {
+        logger.info('Write version properties to: {}', propertiesFile)
+        Properties versionProperties = new Properties()
+        versionProperties.putAll([
+                (GradleVersion.VERSION): version,
+                (GradleVersion.BUILD_TIME): DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(buildTime)
+        ])
+        propertiesFile.withOutputStream {
+            versionProperties.store(it, '')
+        }
+
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/AbstractIdeIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/AbstractIdeIntegrationTest.groovy
new file mode 100644
index 0000000..6c6dd3f
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/AbstractIdeIntegrationTest.groovy
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+abstract class AbstractIdeIntegrationTest extends AbstractIntegrationTest {
+    protected parseXmlFile(filename, print) {
+        def file = file(filename).assertExists()
+        if (print) { println file.text }
+        new XmlSlurper().parse(file)
+    }
+
+    protected publishArtifact(dir, group, artifact, dependency) {
+        def artifactDir = new File("$dir/$group/$artifact/1.0")
+        assert artifactDir.mkdirs()
+
+        def pomFile = new File("$artifactDir/$artifact-1.0.pom")
+        pomFile << """
+<project xmlns="http://maven.apache.org/POM/4.0.0">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>$group</groupId>
+  <artifactId>$artifact</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>$group</groupId>
+      <artifactId>$dependency</artifactId>
+      <version>1.0</version>
+    </dependency>
+  </dependencies>
+</project>
+        """
+
+        def jarFile = new File("$artifactDir/$artifact-1.0.jar")
+        jarFile << "add some content so that file size isn't zero"
+
+        jarFile
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/AbstractIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/AbstractIntegrationTest.java
new file mode 100644
index 0000000..320a921
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/AbstractIntegrationTest.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests;
+
+import org.gradle.CacheUsage;
+import org.gradle.StartParameter;
+import org.gradle.integtests.fixtures.*;
+import org.gradle.util.TestFile;
+import org.gradle.util.TestFileContext;
+import org.junit.Rule;
+
+import java.io.File;
+
+public abstract class AbstractIntegrationTest implements TestFileContext {
+    @Rule public final GradleDistribution distribution = new GradleDistribution();
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
+
+    public TestFile getTestDir() {
+        return distribution.getTestDir();
+    }
+
+    public TestFile file(Object... path) {
+        return getTestDir().file(path);
+    }
+
+    public TestFile testFile(String name) {
+        return file(name);
+    }
+
+    private StartParameter startParameter() {
+        StartParameter parameter = new StartParameter();
+        parameter.setGradleUserHomeDir(distribution.getUserHomeDir());
+
+        parameter.setSearchUpwards(false);
+        parameter.setCacheUsage(CacheUsage.ON);
+        parameter.setCurrentDir(getTestDir());
+
+        return parameter;
+    }
+
+    protected GradleExecuter inTestDirectory() {
+        return inDirectory(getTestDir());
+    }
+
+    protected GradleExecuter inDirectory(File directory) {
+        return executer.inDirectory(directory);
+    }
+
+    protected GradleExecuter usingBuildFile(File file) {
+        return executer.usingBuildScript(file);
+    }
+
+    protected GradleExecuter usingBuildScript(String script) {
+        return executer.usingBuildScript(script);
+    }
+
+    protected GradleExecuter usingProjectDir(File projectDir) {
+        return executer.usingProjectDirectory(projectDir);
+    }
+
+    protected ArtifactBuilder artifactBuilder() {
+        return new GradleBackedArtifactBuilder(new InProcessGradleExecuter(startParameter()), getTestDir().file("artifacts"));
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AntProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/AntProjectIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AntProjectIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/AntProjectIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AntlrIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/AntlrIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AntlrIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/AntlrIntegrationTest.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ArchiveIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ArchiveIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ArchiveIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ArchiveIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ArtifactDependenciesIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ArtifactDependenciesIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ArtifactDependenciesIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ArtifactDependenciesIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildAggregationIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildAggregationIntegrationTest.groovy
new file mode 100644
index 0000000..9049ad7
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildAggregationIntegrationTest.groovy
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.ExecutionFailure
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+
+class BuildAggregationIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    @Test
+    public void canExecuteAnotherBuildFromBuild() {
+        dist.testFile('build.gradle') << '''
+            assert gradle.parent == null
+            task build(type: GradleBuild) {
+                dir = 'other'
+                tasks = ['dostuff']
+                startParameter.searchUpwards = false
+            }
+'''
+
+        dist.testFile('other/build.gradle') << '''
+            assert gradle.parent != null
+            task dostuff << {
+                assert gradle.parent != null
+            }
+'''
+
+        executer.withTasks('build').run()
+    }
+
+    @Test
+    public void treatsBuildSrcProjectAsANestedBuild() {
+        dist.testFile('build.gradle') << '''
+            assert gradle.parent == null
+            task build
+'''
+
+        dist.testFile('buildSrc/build.gradle') << '''
+            apply plugin: 'java'
+            assert gradle.parent != null
+            classes << {
+                assert gradle.parent != null
+            }
+'''
+
+        executer.withTasks('build').run()
+    }
+
+    @Test
+    public void reportsNestedBuildFailure() {
+        TestFile other = dist.testFile('other.gradle') << '''
+            1/0
+'''
+
+        dist.testFile('build.gradle') << '''
+            task build(type: GradleBuild) {
+                buildFile = 'other.gradle'
+                startParameter.searchUpwards = false
+            }
+'''
+
+        ExecutionFailure failure = executer.withTasks('build').runWithFailure()
+        failure.assertHasFileName("Build file '${other}'")
+        failure.assertHasLineNumber(2)
+        failure.assertHasDescription('A problem occurred evaluating root project')
+        failure.assertThatCause(containsString('Division by zero'))
+    }
+
+    @Test
+    public void reportsBuildSrcFailure() {
+        dist.testFile('buildSrc/src/main/java/Broken.java') << 'broken!'
+        ExecutionFailure failure = executer.runWithFailure()
+        failure.assertHasFileName('Default buildSrc build script')
+        failure.assertHasDescription('Execution failed for task \':compileJava\'')
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptClasspathIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptClasspathIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptClasspathIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptClasspathIntegrationTest.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptErrorIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptErrorIntegrationTest.java
new file mode 100644
index 0000000..adb5f9a
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptErrorIntegrationTest.java
@@ -0,0 +1,182 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests;
+
+import org.gradle.integtests.fixtures.ExecutionFailure;
+import org.gradle.util.TestFile;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.io.File;
+
+public class BuildScriptErrorIntegrationTest extends AbstractIntegrationTest {
+    @Test
+    public void reportsProjectEvaluationFailsWithGroovyException() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns("", "createTakk('do-stuff')");
+        ExecutionFailure failure = usingBuildFile(buildFile).runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(2);
+        failure.assertHasDescription("A problem occurred evaluating root project 'reportsProjectEvaluationFailsWithGroovyException");
+        failure.assertHasCause("Could not find method createTakk() for arguments [do-stuff] on root project 'reportsProjectEvaluationFailsWithGroovyException");
+    }
+
+    @Test
+    public void reportsScriptCompilationException() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+            "// a comment",
+            "import org.gradle.unknown.Unknown",
+            "new Unknown()");
+        ExecutionFailure failure = inTestDirectory().runWithFailure();
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(2);
+        failure.assertHasDescription(String.format("Could not compile build file '%s'.", buildFile));
+    }
+
+    @Test
+    public void reportsNestedProjectEvaluationFailsWithRuntimeException() {
+        testFile("settings.gradle").write("include 'child'");
+
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "dependsOn 'child'",
+                "task t");
+
+        TestFile childBuildFile = testFile("child/build.gradle");
+        childBuildFile.writelns(
+                "def broken = { ->",
+                "    throw new RuntimeException('failure') }",
+                "broken()");
+        ExecutionFailure failure = inTestDirectory().withTasks("t").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", childBuildFile));
+        failure.assertHasLineNumber(2);
+        failure.assertHasDescription("A problem occurred evaluating project ':child'");
+        failure.assertHasCause("failure");
+    }
+
+    @Test
+    public void reportsTaskActionExecutionFailsWithError() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "task('do-stuff').doFirst",
+                "{",
+                "1/0",
+                "}");
+        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("do-stuff").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(3);
+        failure.assertHasDescription("Execution failed for task ':do-stuff'");
+        failure.assertHasCause("Division by zero");
+    }
+
+    @Test
+    public void reportsTaskActionExecutionFailsWithRuntimeException() {
+        File buildFile = testFile("build.gradle").writelns(
+                "task brokenClosure << {",
+                "    throw new RuntimeException('broken closure')",
+                "}");
+
+        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("brokenClosure").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(2);
+        failure.assertHasDescription("Execution failed for task ':brokenClosure'");
+        failure.assertHasCause("broken closure");
+    }
+
+    @Test
+    public void reportsTaskActionExecutionFailsFromJavaWithRuntimeException() {
+        testFile("buildSrc/src/main/java/org/gradle/BrokenTask.java").writelns(
+                "package org.gradle;",
+                "import org.gradle.api.Action;",
+                "import org.gradle.api.DefaultTask;",
+                "import org.gradle.api.Task;",
+                "public class BrokenTask extends DefaultTask {",
+                "    public BrokenTask() {",
+                "        doFirst(new Action<Task>() {",
+                "            public void execute(Task task) {",
+                "                throw new RuntimeException(\"broken action\");",
+                "            }",
+                "        });",
+                "    }",
+                "}"
+        );
+        File buildFile = testFile("build.gradle").write("task brokenJavaTask(type: org.gradle.BrokenTask)");
+
+        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("brokenJavaTask").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasDescription("Execution failed for task ':brokenJavaTask'");
+        failure.assertHasCause("broken action");
+    }
+
+    @Test
+    public void reportsTaskInjectedByOtherProjectFailsWithRuntimeException() {
+        testFile("settings.gradle").write("include 'a', 'b'");
+        TestFile buildFile = testFile("b/build.gradle");
+        buildFile.writelns(
+                "project(':a') {",
+                "    task a << {",
+                "        throw new RuntimeException('broken')",
+                "    }",
+                "}");
+
+        ExecutionFailure failure = inTestDirectory().withTasks("a").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(3);
+        failure.assertHasDescription("Execution failed for task ':a:a");
+        failure.assertHasCause("broken");
+    }
+
+    @Test
+    public void reportsTaskGraphReadyEventFailsWithRuntimeException() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "gradle.taskGraph.whenReady {",
+                "throw new RuntimeException('broken closure')",
+                "}",
+                "task a");
+
+        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("a").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(2);
+        failure.assertHasDescription("Failed to notify task execution graph listener");
+        failure.assertHasCause("broken closure");
+    }
+
+    @Test @Ignore
+    public void reportsTaskDependencyClosureFailsWithRuntimeException() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "task a",
+                "a.dependsOn {",
+                "throw new RuntimeException('broken')",
+                "}");
+
+        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("a").runWithFailure();
+
+        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
+        failure.assertHasLineNumber(3);
+        failure.assertHasDescription("??");
+        failure.assertHasCause("broken");
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptExecutionIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptExecutionIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptExecutionIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/BuildScriptExecutionIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/CacheProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CacheProjectIntegrationTest.groovy
new file mode 100644
index 0000000..a7e13a4
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CacheProjectIntegrationTest.groovy
@@ -0,0 +1,123 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.groovy.scripts.ScriptSource
+import org.gradle.groovy.scripts.UriScriptSource
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.GradleVersion
+import org.gradle.util.TestFile
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.junit.Assert.*
+
+/**
+ * @author Hans Dockter
+ */
+class CacheProjectIntegrationTest {
+    static final String TEST_FILE = "build/test.txt"
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    TestFile projectDir
+    TestFile userHomeDir
+    TestFile buildFile
+    TestFile propertiesFile
+    TestFile classFile
+    TestFile artifactsCache
+
+    @Before
+    public void setUp() {
+        String version = new GradleVersion().version
+        projectDir = dist.getTestDir().file("project")
+        projectDir.mkdirs()
+        userHomeDir = dist.getUserHomeDir()
+        buildFile = projectDir.file('build.gradle')
+        ScriptSource source = new UriScriptSource("build file", buildFile)
+        propertiesFile = userHomeDir.file("caches/$version/scripts/$source.className/cache.properties")
+        classFile = userHomeDir.file("caches/$version/scripts/$source.className/no_buildscript_ProjectScript/${source.className}.class")
+        artifactsCache = projectDir.file(".gradle/$version/taskArtifacts/cache.bin")
+    }
+
+    @Test
+    public void cachesBuildScript() {
+        createLargeBuildScript()
+        testBuild("hello1", "Hello 1")
+        TestFile.Snapshot classFileSnapshot = classFile.snapshot()
+        TestFile.Snapshot artifactsCacheSnapshot = artifactsCache.snapshot()
+
+        testBuild("hello2", "Hello 2")
+        classFile.assertHasNotChangedSince(classFileSnapshot)
+        artifactsCache.assertHasNotChangedSince(artifactsCacheSnapshot)
+
+        modifyLargeBuildScript()
+        testBuild("newTask", "I am new")
+        classFile.assertHasChangedSince(classFileSnapshot)
+        artifactsCache.assertHasNotChangedSince(artifactsCacheSnapshot)
+        classFileSnapshot = classFile.snapshot()
+        artifactsCacheSnapshot = artifactsCache.snapshot()
+
+        testBuild("newTask", "I am new", "-Crebuild")
+        classFile.assertHasChangedSince(classFileSnapshot)
+        artifactsCache.assertHasChangedSince(artifactsCacheSnapshot)
+    }
+
+    private def testBuild(String taskName, String expected, String... args) {
+        executer.inDirectory(projectDir).withTasks(taskName).withArguments(args).withQuietLogging().run()
+        assertEquals(expected, projectDir.file(TEST_FILE).text)
+        classFile.assertIsFile()
+        propertiesFile.assertIsFile()
+        artifactsCache.assertIsFile()
+    }
+
+    // We once ran into a cache problem under windows, which was not reproducible with small build scripts. Therefore we
+    // create a larger one here.
+
+    def createLargeBuildScript() {
+        File buildFile = projectDir.file('build.gradle')
+        String content = ""
+        50.times {i ->
+            content += """task 'hello$i' << {
+    File file = file('$TEST_FILE')
+    file.parentFile.mkdirs()
+    file.write('Hello $i')
+}
+
+void someMethod$i() {
+    println('Some message')
+}
+
+"""
+        }
+        buildFile.write(content)
+    }
+
+    def void modifyLargeBuildScript() {
+        File buildFile = projectDir.file('build.gradle')
+        String newContent = buildFile.text + """
+task newTask << {
+    File file = file('$TEST_FILE')
+    file.parentFile.mkdirs()
+    file.write('I am new')
+}
+"""
+        buildFile.write(newContent)
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/ClientModuleDependenciesResolveIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ClientModuleDependenciesResolveIntegrationTest.java
new file mode 100644
index 0000000..10e258b
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ClientModuleDependenciesResolveIntegrationTest.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests;
+
+import org.gradle.integtests.fixtures.GradleDistribution;
+import org.gradle.integtests.fixtures.GradleDistributionExecuter;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.File;
+
+/**
+ * @author Hans Dockter
+ */
+public class ClientModuleDependenciesResolveIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution();
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
+
+    @Test
+    public void testResolve() {
+        // the actual testing is done in the build script.
+        File projectDir = new File(dist.getSamplesDir(), "clientModuleDependencies/shared");
+        executer.inDirectory(projectDir).withTasks("testDeps").run();
+
+        projectDir = new File(dist.getSamplesDir(), "clientModuleDependencies/api");
+        executer.inDirectory(projectDir).withTasks("testDeps").run();
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CodeQualityIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CodeQualityIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CodeQualityIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/CodeQualityIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/CommandLineIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CommandLineIntegrationTest.groovy
new file mode 100644
index 0000000..ec72b50
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CommandLineIntegrationTest.groovy
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.ExecutionFailure
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.util.Jvm
+import org.gradle.util.OperatingSystem
+import org.junit.Ignore
+import org.junit.Rule
+import org.junit.Test
+
+public class CommandLineIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final TestResources resources = new TestResources()
+
+    @Test
+    public void hasNonZeroExitCodeOnBuildFailure() {
+        ExecutionFailure failure = executer.withTasks('unknown').runWithFailure()
+        failure.assertHasDescription("Task 'unknown' not found in root project 'commandLine'.")
+    }
+
+    @Test
+    public void canonicalisesWorkingDirectory() {
+        File javaprojectDir;
+        if (OperatingSystem.current().isWindows()) {
+            javaprojectDir = new File(dist.samplesDir, 'java/QUICKS~1')
+        } else if (!OperatingSystem.current().isCaseSensitiveFileSystem()) {
+            javaprojectDir = new File(dist.samplesDir, 'JAVA/QuickStart')
+        } else {
+            javaprojectDir = new File(dist.samplesDir, 'java/multiproject/../quickstart')
+        }
+        executer.inDirectory(javaprojectDir).withTasks('classes').run()
+    }
+
+    @Test
+    public void canDefineJavaHomeViaEnvironmentVariable() {
+        String javaHome = Jvm.current().javaHome
+        String expectedJavaHome = "-PexpectedJavaHome=${javaHome}"
+
+        // Handle java on the system PATH, with no JAVA_HOME specified
+        String path = String.format('%s%s%s', Jvm.current().javaExecutable.parentFile, File.pathSeparator, System.getenv('PATH'))
+        executer.withEnvironmentVars('PATH': path, 'JAVA_HOME': '')
+                .withArguments(expectedJavaHome)
+                .withTasks('checkJavaHome')
+                .run()
+
+        // Handle JAVA_HOME specified
+        executer.withEnvironmentVars('JAVA_HOME': javaHome)
+                .withArguments(expectedJavaHome)
+                .withTasks('checkJavaHome')
+                .run()
+
+        // Handle JAVA_HOME with trailing separator
+        executer.withEnvironmentVars('JAVA_HOME': javaHome + File.separator)
+                .withArguments(expectedJavaHome)
+                .withTasks('checkJavaHome')
+                .run()
+
+        if (!OperatingSystem.current().isWindows()) {
+            return
+        }
+
+        // Handle JAVA_HOME wrapped in quotes
+        executer.withEnvironmentVars('JAVA_HOME': "\"$javaHome\"")
+                .withArguments(expectedJavaHome)
+                .withTasks('checkJavaHome')
+                .run()
+
+        // Handle JAVA_HOME with slash separators. This is allowed by the JVM
+        executer.withEnvironmentVars('JAVA_HOME': javaHome.replace(File.separator, '/'))
+                .withArguments(expectedJavaHome)
+                .withTasks('checkJavaHome')
+                .run()
+    }
+
+    @Test
+    public void failsWhenJavaHomeDoetNotPointToAJavaInstallation() {
+        def failure = executer.withEnvironmentVars('JAVA_HOME': dist.testDir)
+                .withTasks('checkJavaHome')
+                .runWithFailure()
+        assert failure.output.contains('ERROR: JAVA_HOME is set to an invalid directory')
+    }
+
+    @Test
+    public void canDefineGradleUserHomeViaEnvironmentVariable() {
+        // the actual testing is done in the build script.
+        File gradleUserHomeDir = dist.testDir.file('customUserHome')
+        executer.withUserHomeDir(null)
+                .withEnvironmentVars('GRADLE_USER_HOME': gradleUserHomeDir.absolutePath)
+                .withTasks("checkGradleUserHomeViaSystemEnv")
+                .run();
+    }
+
+    @Test
+    public void checkDefaultGradleUserHome() {
+        // the actual testing is done in the build script.
+        executer.withUserHomeDir(null).
+                withTasks("checkDefaultGradleUserHome")
+                .run();
+    }
+
+    @Test @Ignore
+    public void systemPropGradleUserHomeHasPrecedenceOverEnvVariable() {
+        // the actual testing is done in the build script.
+        File gradleUserHomeDir = dist.testFile("customUserHome")
+        File systemPropGradleUserHomeDir = dist.testFile("systemPropCustomUserHome")
+        executer.withUserHomeDir(null)
+                .withArguments("-Dgradle.user.home=" + systemPropGradleUserHomeDir.absolutePath)
+                .withEnvironmentVars('GRADLE_USER_HOME': gradleUserHomeDir.absolutePath)
+                .withTasks("checkSystemPropertyGradleUserHomeHasPrecedence")
+                .run()
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CopyErrorIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CopyErrorIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CopyErrorIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/CopyErrorIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CopyTaskIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CopyTaskIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CopyTaskIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/CopyTaskIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest.groovy
new file mode 100644
index 0000000..6ddccb5
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest.groovy
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.BasicGradleDistribution
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.util.Jvm
+import org.junit.Rule
+import org.junit.Test
+
+class CrossVersionCompatibilityIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final TestResources resources = new TestResources()
+    private final BasicGradleDistribution gradle08 = dist.previousVersion('0.8')
+    private final BasicGradleDistribution gradle09rc1 = dist.previousVersion('0.9-rc-1')
+    private final BasicGradleDistribution gradle09rc2 = dist.previousVersion('0.9-rc-2')
+    private final BasicGradleDistribution gradle09rc3 = dist.previousVersion('0.9-rc-3')
+    private final BasicGradleDistribution gradle09 = dist.previousVersion('0.9')
+    private final BasicGradleDistribution gradle091 = dist.previousVersion('0.9.1')
+
+    @Test
+    public void canBuildJavaProject() {
+        dist.testFile('buildSrc/src/main/groovy').assertIsDir()
+
+        // Upgrade and downgrade from previous version to current version and back again
+        eachVersion([gradle08, gradle09rc1, gradle09rc2, gradle09rc3, gradle09, gradle091]) { version ->
+            version.executer().inDirectory(dist.testDir).withTasks('build').run()
+            dist.executer().inDirectory(dist.testDir).withTasks('build').run()
+            version.executer().inDirectory(dist.testDir).withTasks('build').run()
+        }
+    }
+
+    @Test
+    public void canUseWrapperFromPreviousVersionToRunCurrentVersion() {
+        eachVersion([gradle09rc1, gradle09rc2, gradle09rc3, gradle09, gradle091]) { version ->
+            checkWrapperWorksWith(version, dist)
+        }
+    }
+
+    @Test
+    public void canUseWrapperFromCurrentVersionToRunPreviousVersion() {
+        eachVersion([gradle09rc1, gradle09rc2, gradle09rc3, gradle09, gradle091]) { version ->
+            checkWrapperWorksWith(dist, version)
+        }
+    }
+
+    def checkWrapperWorksWith(BasicGradleDistribution wrapperGenVersion, BasicGradleDistribution executionVersion) {
+        wrapperGenVersion.executer().withTasks('wrapper').withArguments("-PdistZip=$executionVersion.binDistribution.absolutePath", "-PdistVersion=$executionVersion.version").run()
+        def result = wrapperGenVersion.executer().usingExecutable('gradlew').withTasks('hello').run()
+        assert result.output.contains("hello from $executionVersion.version")
+    }
+
+    def eachVersion(Iterable<BasicGradleDistribution> versions, Closure cl) {
+        versions.each { version ->
+            if (!version.worksWith(Jvm.current())) {
+                System.out.println("skipping $version as it does not work with ${Jvm.current()}.")
+                return
+            }
+            try {
+                System.out.println("building using $version");
+                cl.call(version)
+            } catch (Throwable t) {
+                throw new RuntimeException("Could not build test project using $version.", t)
+            }
+        }
+    }
+}
+
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/DependenciesResolveIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/DependenciesResolveIntegrationTest.java
new file mode 100644
index 0000000..fdf16a6
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/DependenciesResolveIntegrationTest.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests;
+
+import org.gradle.integtests.fixtures.GradleDistribution;
+import org.gradle.integtests.fixtures.GradleDistributionExecuter;
+import org.gradle.integtests.fixtures.Sample;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.File;
+
+/**
+ * @author Hans Dockter
+ */
+public class DependenciesResolveIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution();
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
+    @Rule public final Sample sample = new Sample("dependencies");
+
+    @Test
+    public void testResolve() {
+        dist.requireOwnUserHomeDir();
+
+        // the actual testing is done in the build script.
+        File projectDir = sample.getDir();
+        executer.inDirectory(projectDir).withTasks("test").run();
+    }   
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTest.groovy
new file mode 100644
index 0000000..46fa26d
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTest.groovy
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.apache.tools.ant.taskdefs.Expand
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.AntUtil
+import org.gradle.util.GradleVersion
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+
+class DistributionIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    private String version = new GradleVersion().version
+
+    @Test
+    public void binZipContents() {
+        TestFile binZip = dist.distributionsDir.file("gradle-$version-bin.zip")
+        binZip.usingNativeTools().unzipTo(dist.testDir)
+        TestFile contentsDir = dist.testDir.file("gradle-$version")
+
+        checkMinimalContents(contentsDir)
+
+        // Extra stuff
+        contentsDir.file('src').assertDoesNotExist()
+        contentsDir.file('samples').assertDoesNotExist()
+        contentsDir.file('docs').assertDoesNotExist()
+    }
+
+    @Test
+    public void allZipContents() {
+        TestFile binZip = dist.distributionsDir.file("gradle-$version-all.zip")
+        binZip.usingNativeTools().unzipTo(dist.testDir)
+        TestFile contentsDir = dist.testDir.file("gradle-$version")
+
+        checkMinimalContents(contentsDir)
+
+        // Source
+        contentsDir.file('src/org/gradle/api/Project.java').assertIsFile()
+        contentsDir.file('src/org/gradle/initialization/defaultBuildSourceScript.txt').assertIsFile()
+        contentsDir.file('src/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java').assertIsFile()
+        contentsDir.file('src/org/gradle/wrapper/Wrapper.java').assertIsFile()
+
+        // Samples
+        contentsDir.file('samples/java/quickstart/build.gradle').assertIsFile()
+
+        // Docs
+        contentsDir.file('docs/javadoc/index.html').assertIsFile()
+        contentsDir.file('docs/javadoc/org/gradle/api/Project.html').assertIsFile()
+        contentsDir.file('docs/groovydoc/index.html').assertIsFile()
+        contentsDir.file('docs/groovydoc/org/gradle/api/Project.html').assertIsFile()
+        contentsDir.file('docs/groovydoc/org/gradle/api/tasks/bundling/Zip.html').assertIsFile()
+        contentsDir.file('docs/userguide/userguide.html').assertIsFile()
+        contentsDir.file('docs/userguide/userguide_single.html').assertIsFile()
+//        contentsDir.file('docs/userguide/userguide.pdf').assertIsFile()
+    }
+
+    private def checkMinimalContents(TestFile contentsDir) {
+        // Check it can be executed
+        executer.inDirectory(contentsDir).usingExecutable('bin/gradle').withTaskList().run()
+
+        // Scripts
+        contentsDir.file('bin/gradle').assertIsFile()
+        contentsDir.file('bin/gradle.bat').assertIsFile()
+
+        // Top level files
+        contentsDir.file('LICENSE').assertIsFile()
+
+        // Libs
+        assertIsGradleJar(contentsDir.file("lib/gradle-core-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/gradle-ui-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/gradle-launcher-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/gradle-tooling-api-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/gradle-wrapper-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-code-quality-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-plugins-${version}.jar"))
+        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-jetty-${version}.jar"))
+
+        // Docs
+        contentsDir.file('getting-started.html').assertIsFile()
+    }
+
+    private def assertIsGradleJar(TestFile jar) {
+        jar.assertIsFile()
+        assertThat(jar.manifest.mainAttributes.getValue('Implementation-Version'), equalTo(version))
+        assertThat(jar.manifest.mainAttributes.getValue('Implementation-Title'), equalTo('Gradle'))
+    }
+
+    @Test
+    public void sourceZipContents() {
+        TestFile srcZip = dist.distributionsDir.file("gradle-$version-src.zip")
+        srcZip.usingNativeTools().unzipTo(dist.testDir)
+        TestFile contentsDir = dist.testDir.file("gradle-$version")
+
+        // Build self using wrapper in source distribution
+        executer.inDirectory(contentsDir).usingExecutable('gradlew').withTasks('binZip').run()
+
+        File binZip = contentsDir.file('build/distributions').listFiles()[0]
+        Expand unpack = new Expand()
+        unpack.src = binZip
+        unpack.dest = contentsDir.file('build/distributions/unzip')
+        AntUtil.execute(unpack)
+        TestFile unpackedRoot = new TestFile(contentsDir.file('build/distributions/unzip').listFiles()[0])
+
+        // Make sure the build distribution does something useful
+        unpackedRoot.file("bin/gradle").assertIsFile()
+        // todo run something with the gradle build by the source dist
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/DynamicObjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/DynamicObjectIntegrationTest.groovy
new file mode 100644
index 0000000..a0656ac
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/DynamicObjectIntegrationTest.groovy
@@ -0,0 +1,192 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+
+class DynamicObjectIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    @Test
+    public void canAddDynamicPropertiesToProject() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file("settings.gradle").writelns("include 'child'");
+        testDir.file("build.gradle").writelns(
+                "rootProperty = 'root'",
+                "sharedProperty = 'ignore me'",
+                "convention.plugins.test = new ConventionBean()",
+                "task rootTask",
+                "task testTask",
+                "class ConventionBean { def getConventionProperty() { 'convention' } }"
+        );
+        testDir.file("child/build.gradle").writelns(
+                "childProperty = 'child'",
+                "sharedProperty = 'shared'",
+                "task testTask << {",
+                "  new Reporter().checkProperties(project)",
+                "}",
+                // Use a separate class, to isolate Project from the script
+                "class Reporter {",
+                "  def checkProperties(object) {",
+                "    assert 'root' == object.rootProperty",
+                "    assert 'child' == object.childProperty",
+                "    assert 'shared' == object.sharedProperty",
+                "    assert 'convention' == object.conventionProperty",
+                "    assert ':child:testTask' == object.testTask.path",
+                "    try { object.rootTask; fail() } catch (MissingPropertyException e) { }",
+                "  }",
+                "}"
+        );
+
+        executer.inDirectory(testDir).withTasks("testTask").run();
+    }
+
+    @Test
+    public void canAddDynamicMethodsToProject() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file("settings.gradle").writelns("include 'child'");
+        testDir.file("build.gradle").writelns(
+                "def rootMethod(p) { 'root' + p }",
+                "def sharedMethod(p) { 'ignore me' }",
+                "convention.plugins.test = new ConventionBean()",
+                "task rootTask",
+                "task testTask",
+                "class ConventionBean { def conventionMethod(name) { 'convention' + name } }"
+        );
+        testDir.file("child/build.gradle").writelns(
+                "def childMethod(p) { 'child' + p }",
+                "def sharedMethod(p) { 'shared' + p }",
+                "task testTask << {",
+                "  new Reporter().checkMethods(project)",
+                "}",
+                // Use a separate class, to isolate Project from the script
+                "class Reporter {",
+                "  def checkMethods(object) {",
+                "    assert 'rootMethod' == object.rootMethod('Method')",
+                "    assert 'childMethod' == object.childMethod('Method')",
+                "    assert 'sharedMethod'== object.sharedMethod('Method')",
+                "    assert 'conventionMethod' == object.conventionMethod('Method')",
+                "    object.testTask { assert ':child:testTask' == delegate.path }",
+                "    try { object.rootTask { }; fail() } catch (MissingMethodException e) { }",
+                "  }",
+                "}"
+        );
+
+        executer.inDirectory(testDir).withTasks("testTask").run();
+    }
+
+    @Test
+    public void canAddDynamicPropertiesToCoreDomainObjects() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file('build.gradle') << '''
+            class Extension { def doStuff() { 'method' } }
+            class GroovyTask extends DefaultTask { }
+
+            task defaultTask {
+                custom = 'value'
+                convention.plugins.custom = new Extension()
+            }
+            task javaTask(type: Copy) {
+                custom = 'value'
+                convention.plugins.custom = new Extension()
+            }
+            task groovyTask(type: GroovyTask) {
+                custom = 'value'
+                convention.plugins.custom = new Extension()
+            }
+            configurations {
+                test {
+                    custom = 'value'
+                    convention.plugins.custom = new Extension()
+                }
+            }
+            dependencies {
+                test('::name:') {
+                    custom = 'value';
+                    convention.plugins.custom = new Extension()
+                }
+                test(module('::other')) {
+                    custom = 'value';
+                    convention.plugins.custom = new Extension()
+                }
+                test(project(':')) {
+                    custom = 'value';
+                    convention.plugins.custom = new Extension()
+                }
+                test(files('src')) {
+                    custom = 'value';
+                    convention.plugins.custom = new Extension()
+                }
+            }
+            repositories {
+                custom = 'repository'
+                convention.plugins.custom = new Extension()
+            }
+            defaultTask.custom = 'another value'
+            javaTask.custom = 'another value'
+            groovyTask.custom = 'another value'
+            assert !project.hasProperty('custom')
+            assert defaultTask.hasProperty('custom')
+            assert defaultTask.custom == 'another value'
+            assert defaultTask.doStuff() == 'method'
+            assert javaTask.doStuff() == 'method'
+            assert groovyTask.doStuff() == 'method'
+            assert configurations.test.hasProperty('custom')
+            assert configurations.test.custom == 'value'
+            assert configurations.test.doStuff() == 'method'
+            configurations.test.dependencies.each {
+                assert it.hasProperty('custom')
+                assert it.custom == 'value'
+                assert it.getProperty('custom') == 'value'
+            }
+            assert repositories.hasProperty('custom')
+            assert repositories.custom == 'repository'
+            assert repositories.doStuff() == 'method'
+            repositories {
+                assert custom == 'repository'
+                assert doStuff() == 'method'
+            }
+'''
+
+        executer.inDirectory(testDir).withTasks("defaultTask").run();
+    }
+
+    @Test
+    public void canInjectMethodsFromParentProject() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file("settings.gradle").writelns("include 'child'");
+        testDir.file("build.gradle").writelns(
+                "subprojects {",
+                "  injectedMethod = { project.name }",
+                "}"
+        );
+        testDir.file("child/build.gradle").writelns(
+                "task testTask << {",
+                "   assert injectedMethod() == 'child'",
+                "}"
+        );
+
+        executer.inDirectory(testDir).withTasks("testTask").run();
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/EclipseIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/EclipseIntegrationTest.groovy
new file mode 100644
index 0000000..501d8db
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/EclipseIntegrationTest.groovy
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.TestResources
+import org.junit.Rule
+import org.junit.Test
+
+class EclipseIntegrationTest extends AbstractIdeIntegrationTest {
+    @Rule
+    public final TestResources testResources = new TestResources()
+
+    @Test
+    void canCreateAndDeleteMetaData() {
+        File buildFile = testFile("master/build.gradle")
+        usingBuildFile(buildFile).run()
+    }
+
+    @Test
+    void sourceEntriesInClasspathFileAreSortedAsPerUsualConvention() {
+        def expectedOrder = [
+            "src/main/java",
+            "src/main/groovy",
+            "src/main/resources",
+            "src/test/java",
+            "src/test/groovy",
+            "src/test/resources",
+            "src/integTest/java",
+            "src/integTest/groovy",
+            "src/integTest/resources"
+        ]
+
+        expectedOrder.each { testFile(it).mkdirs() }
+
+        def buildFile = testFile("build.gradle")
+        buildFile << """
+apply plugin: "java"
+apply plugin: "groovy"
+apply plugin: "eclipse"
+
+sourceSets {
+    integTest {
+        resources { srcDir "src/integTest/resources" }
+        java { srcDir "src/integTest/java" }
+        groovy { srcDir "src/integTest/groovy" }
+    }
+}
+        """
+
+        usingBuildFile(buildFile).withTasks("eclipse").run()
+
+        def classpath = parseClasspathFile()
+        def sourceEntries = findEntries(classpath, "src")
+        assert sourceEntries*. at path == expectedOrder
+    }
+
+    @Test
+    void outputDirDefaultsToEclipseDefault() {
+        def buildFile = testFile("build.gradle")
+        buildFile << "apply plugin: 'java'; apply plugin: 'eclipse'"
+
+        usingBuildFile(buildFile).withTasks("eclipse").run()
+
+        def classpath = parseClasspathFile()
+
+        def outputs = findEntries(classpath, "output")
+        assert outputs*. at path == ["bin"]
+
+        def sources = findEntries(classpath, "src")
+        sources.each { assert !it.attributes().containsKey("path") }
+    }
+
+    @Test
+    void canHandleCircularModuleDependencies() {
+        def repoDir = file("repo")
+        def artifact1 = publishArtifact(repoDir, "myGroup", "myArtifact1", "myArtifact2")
+        def artifact2 = publishArtifact(repoDir, "myGroup", "myArtifact2", "myArtifact1")
+
+        def buildFile = testFile("build.gradle")
+        buildFile << """
+apply plugin: "java"
+apply plugin: "eclipse"
+
+repositories {
+    mavenRepo urls: "${repoDir.toURI()}"
+}
+
+dependencies {
+    compile "myGroup:myArtifact1:1.0"
+}
+        """
+
+        usingBuildFile(buildFile).withTasks("eclipse").run()
+
+        def classpath = parseClasspathFile()
+        def libs = findEntries(classpath, "lib")
+        assert libs.size() == 2
+        assert libs*. at path*.text().collect { new File(it).name } as Set == [artifact1.name, artifact2.name] as Set
+    }
+
+    private parseClasspathFile(print = false) {
+        parseXmlFile(".classpath", print)
+    }
+
+    private parseProjectFile(print = false) {
+        parseXmlFile(".project", print)
+    }
+
+    private findEntries(classpath, kind) {
+        classpath.classpathentry.findAll { it. at kind == kind }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExecIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ExecIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExecIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ExecIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExternalPluginIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ExternalPluginIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExternalPluginIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ExternalPluginIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExternalScriptErrorIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ExternalScriptErrorIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExternalScriptErrorIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ExternalScriptErrorIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExternalScriptExecutionIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ExternalScriptExecutionIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ExternalScriptExecutionIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ExternalScriptExecutionIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/FileTreeCopyIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/FileTreeCopyIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/FileTreeCopyIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/FileTreeCopyIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GroovyProjectIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/GroovyProjectIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GroovyProjectIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/GroovyProjectIntegrationTest.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/IdeaIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IdeaIntegrationTest.groovy
new file mode 100644
index 0000000..47a58fc
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IdeaIntegrationTest.groovy
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.custommonkey.xmlunit.Diff
+import org.custommonkey.xmlunit.ElementNameAndAttributeQualifier
+import org.custommonkey.xmlunit.XMLAssert
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import junit.framework.AssertionFailedError
+
+class IdeaIntegrationTest extends AbstractIdeIntegrationTest {
+    @Rule
+    public final TestResources testResources = new TestResources()
+
+    @Test
+    void canCreateAndDeleteMetaData() {
+        executer.withTasks('idea').run()
+
+        assertHasExpectedContents('root.ipr')
+        assertHasExpectedContents('root.iws')
+        assertHasExpectedContents('root.iml')
+        assertHasExpectedContents('api/api.iml')
+        assertHasExpectedContents('webservice/webservice.iml')
+
+        executer.withTasks('cleanIdea').run()
+    }
+
+    @Test
+    void worksWithAnEmptyProject() {
+        executer.withTasks('idea').run()
+
+        assertHasExpectedContents('root.ipr')
+        assertHasExpectedContents('root.iml')
+    }
+
+    @Test
+    void worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied() {
+        executer.withTasks('idea').run()
+
+        assertHasExpectedContents('root.ipr')
+    }
+
+    @Test
+    void worksWithNonStandardLayout() {
+        executer.inDirectory(testDir.file('root')).withTasks('idea').run()
+
+        assertHasExpectedContents('root/root.ipr')
+        assertHasExpectedContents('root/root.iml')
+        assertHasExpectedContents('top-level.iml')
+    }
+
+    @Test
+    void overwritesExistingDependencies() {
+        executer.withTasks('idea').run()
+
+        assertHasExpectedContents('root.iml')
+    }
+
+    @Test
+    void outputDirsDefaultToToIdeaDefaults() {
+        def settingsFile = file("settings.gradle")
+        settingsFile << "rootProject.name = 'root'"
+        def buildFile = file("build.gradle")
+        buildFile << "apply plugin: 'java'; apply plugin: 'idea'"
+
+        executer.usingSettingsFile(settingsFile).usingBuildScript(buildFile).withTasks("idea").run()
+
+        def module = parseImlFile("root")
+        def outputUrl = module.component.output[0]. at url
+        def testOutputUrl = module.component."output-test"[0]. at url
+
+        assert outputUrl.text() == 'file://$MODULE_DIR$/out/production/root'
+        assert testOutputUrl.text() == 'file://$MODULE_DIR$/out/test/root'
+    }
+
+    @Test
+    void canHandleCircularModuleDependencies() {
+        def repoDir = file("repo")
+        def artifact1 = publishArtifact(repoDir, "myGroup", "myArtifact1", "myArtifact2")
+        def artifact2 = publishArtifact(repoDir, "myGroup", "myArtifact2", "myArtifact1")
+
+        def settingsFile = file("settings.gradle")
+        settingsFile << "rootProject.name = 'root'"
+
+        def buildFile = file("build.gradle")
+        buildFile << """
+apply plugin: "java"
+apply plugin: "idea"
+
+repositories {
+    mavenRepo urls: "${repoDir.toURI()}"
+}
+
+dependencies {
+    compile "myGroup:myArtifact1:1.0"
+}
+        """
+
+        executer.usingSettingsFile(settingsFile).usingBuildScript(buildFile).withTasks("idea").run()
+
+        def module = parseImlFile("root", true)
+        def libs = module.component.orderEntry.library
+        assert libs.size() == 2
+        assert libs.CLASSES.root*. at url*.text().collect { new File(it).name } as Set == [artifact1.name + "!", artifact2.name + "!"] as Set
+    }
+
+    private void assertHasExpectedContents(String path) {
+        TestFile file = testDir.file(path).assertIsFile()
+        TestFile expectedFile = testDir.file("expectedFiles/${path}.xml").assertIsFile()
+
+        def cache = distribution.userHomeDir.file("cache")
+        def cachePath = cache.absolutePath.replace(File.separator, '/')
+        def expectedXml = expectedFile.text.replace('@CACHE_DIR@', cachePath)
+
+        Diff diff = new Diff(expectedXml, file.text)
+        diff.overrideElementQualifier(new ElementNameAndAttributeQualifier())
+        try {
+            XMLAssert.assertXMLEqual(diff, true)
+        } catch (AssertionFailedError e) {
+            throw new AssertionFailedError("generated file '$path' does not contain the expected contents: ${e.message}.\nExpected:\n${expectedXml}\nActual:\n${file.text}").initCause(e)
+        }
+    }
+
+    private parseImlFile(projectName, print = false) {
+        parseXmlFile("${projectName}.iml", print)
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalBuildIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalBuildIntegrationTest.groovy
new file mode 100644
index 0000000..263596f
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalBuildIntegrationTest.groovy
@@ -0,0 +1,378 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+package org.gradle.integtests
+
+import org.gradle.util.TestFile
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.TestResources
+import org.junit.Rule
+
+class IncrementalBuildIntegrationTest extends AbstractIntegrationTest {
+    @Rule public final TestResources resource = new TestResources()
+
+    @Test
+    public void skipsTaskWhenOutputFileIsUpToDate() {
+        testFile('build.gradle') << '''
+task a(type: org.gradle.integtests.TransformerTask) {
+    inputFile = file('src.txt')
+    outputFile = file('src.a.txt')
+}
+task b(type: org.gradle.integtests.TransformerTask, dependsOn: a) {
+    inputFile = a.outputFile
+    outputFile = file('src.b.txt')
+}
+'''
+        TestFile inputFile = testFile('src.txt')
+        TestFile outputFileA = testFile('src.a.txt')
+        TestFile outputFileB = testFile('src.b.txt')
+
+        inputFile.text = 'content'
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        TestFile.Snapshot aSnapshot = outputFileA.snapshot()
+        TestFile.Snapshot bSnapshot = outputFileB.snapshot()
+        assertThat(outputFileA.text, equalTo('[content]'))
+        assertThat(outputFileB.text, equalTo('[[content]]'))
+
+        // No changes
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+
+        outputFileA.assertHasNotChangedSince(aSnapshot)
+        outputFileB.assertHasNotChangedSince(bSnapshot)
+
+        // Update timestamp, no content changes
+
+        inputFile.setLastModified(inputFile.lastModified() - 10000);
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+
+        outputFileA.assertHasNotChangedSince(aSnapshot)
+        outputFileB.assertHasNotChangedSince(bSnapshot)
+
+        // Change content
+
+        inputFile.text = 'new content'
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        outputFileA.assertHasChangedSince(aSnapshot)
+        outputFileB.assertHasChangedSince(bSnapshot)
+        assertThat(outputFileA.text, equalTo('[new content]'))
+        assertThat(outputFileB.text, equalTo('[[new content]]'))
+
+        // Delete intermediate output file
+
+        outputFileA.delete()
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':b')
+
+        assertThat(outputFileA.text, equalTo('[new content]'))
+        assertThat(outputFileB.text, equalTo('[[new content]]'))
+
+        // Delete final output file
+
+        outputFileB.delete()
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
+
+        assertThat(outputFileA.text, equalTo('[new content]'))
+        assertThat(outputFileB.text, equalTo('[[new content]]'))
+
+        // Change build file in a way which does not affect the task
+
+        testFile('build.gradle').text += '''
+task c
+'''
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+
+        // Change an input property of the first task (the content format)
+
+        testFile('build.gradle').text += '''
+a.format = ' %s '
+'''
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        assertThat(outputFileA.text, equalTo(' new content '))
+        assertThat(outputFileB.text, equalTo('[ new content ]'))
+
+        // Change final output file destination
+
+        testFile('build.gradle').text += '''
+b.outputFile = file('new-output.txt')
+'''
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
+        outputFileB = testFile('new-output.txt')
+        outputFileB.assertIsFile()
+
+        // Run with --no-opt command-line options
+        inTestDirectory().withTasks('b').withArguments('--no-opt').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        // Output files already exist before using this version of Gradle
+        // delete .gradle dir to simulate this
+        testFile('.gradle').assertIsDir().deleteDir()
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        outputFileB.delete()
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+    }
+
+    @Test
+    public void skipsTaskWhenOutputDirContentsAreUpToDate() {
+        testFile('build.gradle') << '''
+task a(type: org.gradle.integtests.DirTransformerTask) {
+    inputDir = file('src')
+    outputDir = file('build/a')
+}
+task b(type: org.gradle.integtests.DirTransformerTask, dependsOn: a) {
+    inputDir = a.outputDir
+    outputDir = file('build/b')
+}
+'''
+
+        testFile('src').createDir()
+        testFile('src/file1.txt').write('content')
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        TestFile outputAFile = testFile('build/a/file1.txt')
+        TestFile outputBFile = testFile('build/b/file1.txt')
+        TestFile.Snapshot aSnapshot = outputAFile.snapshot()
+        TestFile.Snapshot bSnapshot = outputBFile.snapshot()
+
+        outputAFile.assertContents(equalTo('[content]'))
+        outputBFile.assertContents(equalTo('[[content]]'))
+
+        // No changes
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+
+        outputAFile.assertHasNotChangedSince(aSnapshot)
+        outputBFile.assertHasNotChangedSince(bSnapshot)
+
+        // Change content
+
+        testFile('src/file1.txt').write('new content')
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        outputAFile.assertHasChangedSince(aSnapshot)
+        outputBFile.assertHasChangedSince(bSnapshot)
+        outputAFile.assertContents(equalTo('[new content]'))
+        outputBFile.assertContents(equalTo('[[new content]]'))
+
+        // Add file
+
+        testFile('src/file2.txt').write('content2')
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        testFile('build/a/file2.txt').assertContents(equalTo('[content2]'))
+        testFile('build/b/file2.txt').assertContents(equalTo('[[content2]]'))
+
+        // Remove file
+
+        testFile('src/file1.txt').delete()
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':b')
+
+        // Output files already exist before using this version of Gradle
+        // delete .gradle dir to simulate this
+        testFile('.gradle').assertIsDir().deleteDir()
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        testFile('build/b').deleteDir()
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+    }
+
+    @Test
+    public void skipsTaskWhenInputPropertiesHaveNotChanged() {
+        testFile('build.gradle') << '''
+task a(type: org.gradle.integtests.GeneratorTask) {
+    text = project.text
+    outputFile = file('dest.txt')
+}
+'''
+
+        inTestDirectory().withTasks('a').withArguments('-Ptext=text').run().assertTasksExecuted(':a').assertTasksSkipped()
+
+        inTestDirectory().withTasks('a').withArguments('-Ptext=text').run().assertTasksExecuted(':a').assertTasksSkipped(':a')
+
+        inTestDirectory().withTasks('a').withArguments('-Ptext=newtext').run().assertTasksExecuted(':a').assertTasksSkipped()
+    }
+
+    @Test
+    public void multipleTasksCanGenerateIntoOverlappingOutputDirectories() {
+        testFile('build.gradle') << '''
+task a(type: org.gradle.integtests.DirTransformerTask) {
+    inputDir = file('src/a')
+    outputDir = file('build')
+}
+task b(type: org.gradle.integtests.DirTransformerTask) {
+    inputDir = file('src/b')
+    outputDir = file('build')
+}
+'''
+
+        testFile('src/a/file1.txt') << 'content'
+        testFile('src/b/file2.txt') << 'content'
+
+        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        // No changes
+
+        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+
+        // Delete an output file
+
+        testFile('build/file1.txt').delete()
+
+        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':b')
+
+        // Change an output file
+
+        testFile('build/file2.txt').write('something else')
+
+        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
+
+        // Change to new version of Gradle
+        // Simulate this by removing the .gradle dir
+        testFile('.gradle').assertIsDir().deleteDir()
+
+        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+
+        testFile('build').deleteDir()
+
+        inTestDirectory().withTasks('a').run().assertTasksExecuted(':a').assertTasksSkipped()
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':b').assertTasksSkipped()
+    }
+
+    @Test
+    public void canUseUpToDatePredicateToForceTaskToExecute() {
+        testFile('build.gradle') << '''
+task inputsAndOutputs {
+    inputs.files 'src.txt'
+    outputs.files 'src.a.txt'
+    outputs.upToDateWhen { project.hasProperty('uptodate') }
+    doFirst {
+        outputs.files.singleFile.text = "[${inputs.files.singleFile.text}]"
+    }
+}
+task noOutputs {
+    inputs.files 'src.txt'
+    outputs.upToDateWhen { project.hasProperty('uptodate') }
+    doFirst { }
+}
+task nothing {
+    outputs.upToDateWhen { project.hasProperty('uptodate') }
+    doFirst { }
+}
+'''
+        TestFile srcFile = testFile('src.txt')
+        srcFile.text = 'content'
+
+        // Task with input files, output files and a predicate
+        inTestDirectory().withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped()
+
+        // Is up to date
+        inTestDirectory().withArguments('-Puptodate').withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped(':inputsAndOutputs')
+
+        // Changed input file
+        srcFile.text = 'different'
+        inTestDirectory().withArguments('-Puptodate').withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped()
+
+        // Predicate is false
+        inTestDirectory().withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped()
+
+        // Task with input files and a predicate
+        inTestDirectory().withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped()
+
+        // Is up to date
+        inTestDirectory().withArguments('-Puptodate').withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped(':noOutputs')
+
+        // Changed input file
+        srcFile.text = 'different again'
+        inTestDirectory().withArguments('-Puptodate').withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped()
+
+        // Predicate is false
+        inTestDirectory().withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped()
+
+        // Task a predicate only
+        inTestDirectory().withTasks('nothing').run().assertTasksExecuted(':nothing').assertTasksSkipped()
+
+        // Is up to date
+        inTestDirectory().withArguments('-Puptodate').withTasks('nothing').run().assertTasksExecuted(':nothing').assertTasksSkipped(':nothing')
+
+        // Predicate is false
+        inTestDirectory().withTasks('nothing').run().assertTasksExecuted(':nothing').assertTasksSkipped()
+    }
+
+    @Test
+    public void lifecycleTaskIsUpToDateWhenAllDependenciesAreSkipped() {
+        testFile('build.gradle') << '''
+task a(type: org.gradle.integtests.TransformerTask) {
+    inputFile = file('src.txt')
+    outputFile = file('out.txt')
+}
+task b(dependsOn: a)
+'''
+
+        testFile('src.txt').text = 'content'
+
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
+        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
+    }
+
+    @Test
+    public void canShareArtifactsBetweenBuilds() {
+        def buildFile = testFile('build.gradle') << '''
+task otherBuild(type: GradleBuild) {
+    buildFile = 'build.gradle'
+    tasks = ['generate']
+    startParameter.searchUpwards = false
+}
+task transform(type: org.gradle.integtests.TransformerTask) {
+    dependsOn otherBuild
+    inputFile = file('generated.txt')
+    outputFile = file('out.txt')
+}
+task generate(type: org.gradle.integtests.TransformerTask) {
+    inputFile = file('src.txt')
+    outputFile = file('generated.txt')
+}
+'''
+        testFile('settings.gradle') << 'rootProject.name = "build"'
+        testFile('src.txt').text = 'content'
+
+        usingBuildFile(buildFile).withTasks('transform').run().assertTasksExecuted(':otherBuild', ':build:generate', ':transform').assertTasksSkipped()
+        usingBuildFile(buildFile).withTasks('transform').run().assertTasksExecuted(':otherBuild', ':build:generate', ':transform').assertTasksSkipped(':transform', ':build:generate')
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyProjectBuildIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyProjectBuildIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyProjectBuildIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalGroovyProjectBuildIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaCompileIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaCompileIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaCompileIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaCompileIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaProjectBuildIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaProjectBuildIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaProjectBuildIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalJavaProjectBuildIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalScalaCompileIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalScalaCompileIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalScalaCompileIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalScalaCompileIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalTestIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalTestIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalTestIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/IncrementalTestIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/InitScriptErrorIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/InitScriptErrorIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/InitScriptErrorIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/InitScriptErrorIntegrationTest.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/InitScriptExecutionIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/InitScriptExecutionIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/InitScriptExecutionIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/InitScriptExecutionIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/IvyPublishIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IvyPublishIntegrationTest.java
new file mode 100644
index 0000000..9591831
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/IvyPublishIntegrationTest.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests;
+
+import org.gradle.integtests.fixtures.GradleDistribution;
+import org.gradle.integtests.fixtures.GradleDistributionExecuter;
+import org.gradle.integtests.fixtures.Sample;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.File;
+
+/**
+ * @author Hans Dockter
+ */
+public class IvyPublishIntegrationTest {
+    @Rule
+    public final GradleDistribution dist = new GradleDistribution();
+    @Rule
+    public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
+    @Rule
+    public final Sample sample = new Sample("ivypublish");
+
+    @Test
+    public void testResolve() {
+        // the actual testing is done in the build script.
+        File projectDir = sample.getDir();
+        executer.inDirectory(projectDir).withTasks("clean", "uploadArchives").run();
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/JUnitIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/JUnitIntegrationTest.groovy
new file mode 100644
index 0000000..a06c5e9
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/JUnitIntegrationTest.groovy
@@ -0,0 +1,377 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.gradle.integtests.fixtures.*
+import static org.gradle.util.Matchers.*
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+
+public class JUnitIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final TestResources resources = new TestResources()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    @Test
+    public void executesTestsInCorrectEnvironment() {
+        TestFile testDir = dist.testDir;
+        executer.withTasks('build').run();
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir)
+        result.assertTestClassesExecuted('org.gradle.OkTest', 'org.gradle.OtherTest')
+        result.testClass('org.gradle.OkTest').assertTestPassed('ok')
+        result.testClass('org.gradle.OkTest').assertStdout(containsString('This is test stdout'))
+        result.testClass('org.gradle.OkTest').assertStdout(containsString('no EOL'))
+        result.testClass('org.gradle.OkTest').assertStdout(containsString('class loaded'))
+        result.testClass('org.gradle.OkTest').assertStdout(containsString('test constructed'))
+        result.testClass('org.gradle.OkTest').assertStdout(containsString('stdout from another thread'))
+        result.testClass('org.gradle.OkTest').assertStderr(containsString('This is test stderr'))
+        result.testClass('org.gradle.OkTest').assertStderr(containsString('this is a warning'))
+        result.testClass('org.gradle.OtherTest').assertTestPassed('ok')
+        result.testClass('org.gradle.OtherTest').assertStdout(containsString('This is other stdout'))
+        result.testClass('org.gradle.OtherTest').assertStdout(containsString('other class loaded'))
+        result.testClass('org.gradle.OtherTest').assertStdout(containsString('other test constructed'))
+        result.testClass('org.gradle.OtherTest').assertStderr(containsString('This is other stderr'))
+        result.testClass('org.gradle.OtherTest').assertStderr(containsString('this is another warning'))
+    }
+
+    @Test
+    public void canRunJunit3Tests() {
+        executer.withTasks('check').withArguments('-PjunitVersion=4.8.1').run()
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.Test1')
+        result.testClass('org.gradle.Test1').assertTestPassed('testRenamesItself')
+
+        executer.withTasks('clean', 'check').withArguments('-PjunitVersion=3.8').run()
+
+        result = new JUnitTestExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.Test1')
+        result.testClass('org.gradle.Test1').assertTestPassed('testRenamesItself')
+    }
+
+    @Test
+    public void reportsAndBreaksBuildWhenTestFails() {
+        TestFile testDir = dist.getTestDir();
+        TestFile buildFile = testDir.file('build.gradle');
+        ExecutionFailure failure = executer.withTasks('build').runWithFailure();
+
+        failure.assertHasFileName("Build file '${buildFile}'");
+        failure.assertHasDescription("Execution failed for task ':test'.");
+        failure.assertThatCause(startsWith('There were failing tests.'));
+
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenTest FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenBefore FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenAfter FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenBeforeAndAfter FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenBeforeClass FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenAfterClass FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenConstructor FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenException FAILED'));
+        assertThat(failure.getError(), containsLine('Test org.gradle.Unloadable FAILED'));
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir)
+        result.assertTestClassesExecuted(
+                'org.gradle.BrokenTest',
+                'org.gradle.BrokenBefore',
+                'org.gradle.BrokenAfter',
+                'org.gradle.BrokenBeforeClass',
+                'org.gradle.BrokenAfterClass',
+                'org.gradle.BrokenBeforeAndAfter',
+                'org.gradle.BrokenConstructor',
+                'org.gradle.BrokenException',
+                'org.gradle.Unloadable')
+        result.testClass('org.gradle.BrokenTest').assertTestFailed('failure', equalTo('java.lang.AssertionError: failed'))
+        result.testClass('org.gradle.BrokenTest').assertTestFailed('broken', equalTo('java.lang.IllegalStateException'))
+        result.testClass('org.gradle.BrokenBeforeClass').assertTestFailed('classMethod', equalTo('java.lang.AssertionError: failed'))
+        result.testClass('org.gradle.BrokenAfterClass').assertTestFailed('classMethod', equalTo('java.lang.AssertionError: failed'))
+        result.testClass('org.gradle.BrokenBefore').assertTestFailed('ok', equalTo('java.lang.AssertionError: failed'))
+        result.testClass('org.gradle.BrokenAfter').assertTestFailed('ok', equalTo('java.lang.AssertionError: failed'))
+        result.testClass('org.gradle.BrokenBeforeAndAfter').assertTestFailed('ok', equalTo('java.lang.AssertionError: before failed'), equalTo('java.lang.AssertionError: after failed'))
+        result.testClass('org.gradle.BrokenConstructor').assertTestFailed('ok', equalTo('java.lang.AssertionError: failed'))
+        result.testClass('org.gradle.BrokenException').assertTestFailed('broken', startsWith('Could not determine failure message for exception of type org.gradle.BrokenException$BrokenRuntimeException: '))
+        result.testClass('org.gradle.Unloadable').assertTestFailed('initializationError', equalTo('java.lang.AssertionError: failed'))
+    }
+
+    @Test
+    public void canRunSingleTests() {
+        executer.withTasks('test').withArguments('-Dtest.single=Ok2').run()
+        def result = new JUnitTestExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('Ok2')
+
+        executer.withTasks('cleanTest', 'test').withArguments('-Dtest.single=Ok').run()
+        result.assertTestClassesExecuted('Ok', 'Ok2')
+
+        def failure = executer.withTasks('test').withArguments('-Dtest.single=DoesNotMatchAClass').runWithFailure()
+        failure.assertHasCause('Could not find matching test for pattern: DoesNotMatchAClass')
+
+        failure = executer.withTasks('test').withArguments('-Dtest.single=NotATest').runWithFailure()
+        failure.assertHasCause('Could not find matching test for pattern: NotATest')
+    }
+
+    @Test
+    public void canUseTestSuperClassesFromAnotherProject() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file('settings.gradle').write("include 'a', 'b'");
+        testDir.file('b/build.gradle') << '''
+            apply plugin: 'java'
+            repositories { mavenCentral() }
+            dependencies { compile 'junit:junit:4.7' }
+        '''
+        testDir.file('b/src/main/java/org/gradle/AbstractTest.java') << '''
+            package org.gradle;
+            public abstract class AbstractTest {
+                @org.junit.Test public void ok() { }
+            }
+        '''
+        TestFile buildFile = testDir.file('a/build.gradle');
+        buildFile << '''
+            apply plugin: 'java'
+            repositories { mavenCentral() }
+            dependencies { testCompile project(':b') }
+        '''
+        testDir.file('a/src/test/java/org/gradle/SomeTest.java') << '''
+            package org.gradle;
+            public class SomeTest extends AbstractTest {
+            }
+        '''
+
+        executer.withTasks('a:test').run();
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir.file('a'))
+        result.assertTestClassesExecuted('org.gradle.SomeTest')
+        result.testClass('org.gradle.SomeTest').assertTestPassed('ok')
+    }
+
+    @Test
+    public void canExcludeSuperClassesFromExecution() {
+        TestFile testDir = dist.getTestDir();
+        TestFile buildFile = testDir.file('build.gradle');
+        buildFile << '''
+            apply plugin: 'java'
+            repositories { mavenCentral() }
+            dependencies { testCompile 'junit:junit:4.7' }
+            test { exclude '**/BaseTest.*' }
+        '''
+        testDir.file('src/test/java/org/gradle/BaseTest.java') << '''
+            package org.gradle;
+            public class BaseTest {
+                @org.junit.Test public void ok() { }
+            }
+        '''
+        testDir.file('src/test/java/org/gradle/SomeTest.java') << '''
+            package org.gradle;
+            public class SomeTest extends BaseTest {
+            }
+        '''
+
+        executer.withTasks('test').run();
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir)
+        result.assertTestClassesExecuted('org.gradle.SomeTest')
+        result.testClass('org.gradle.SomeTest').assertTestPassed('ok')
+    }
+
+    @Test
+    public void detectsTestClasses() {
+        executer.withTasks('test').run()
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.EmptyRunWithSubclass', 'org.gradle.TestsOnInner', 'org.gradle.TestsOnInner$SomeInner')
+        result.testClass('org.gradle.EmptyRunWithSubclass').assertTestsExecuted('ok')
+        result.testClass('org.gradle.EmptyRunWithSubclass').assertTestPassed('ok')
+        result.testClass('org.gradle.TestsOnInner').assertTestPassed('ok')
+        result.testClass('org.gradle.TestsOnInner$SomeInner').assertTestPassed('ok')
+    }
+
+    @Test
+    public void runsAllTestsInTheSameForkedJvm() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file('build.gradle').writelns(
+                "apply plugin: 'java'",
+                "repositories { mavenCentral() }",
+                "dependencies { compile 'junit:junit:4.7' }"
+        );
+        testDir.file('src/test/java/org/gradle/AbstractTest.java').writelns(
+                "package org.gradle;",
+                "public abstract class AbstractTest {",
+                "    @org.junit.Test public void ok() {",
+                "        long time = java.lang.management.ManagementFactory.getRuntimeMXBean().getStartTime();",
+                "        System.out.println(String.format(\"VM START TIME = %s\", time));",
+                "    }",
+                "}");
+        testDir.file('src/test/java/org/gradle/SomeTest.java').writelns(
+                "package org.gradle;",
+                "public class SomeTest extends AbstractTest {",
+                "}");
+        testDir.file('src/test/java/org/gradle/SomeTest2.java').writelns(
+                "package org.gradle;",
+                "public class SomeTest2 extends AbstractTest {",
+                "}");
+
+        executer.withTasks('test').run();
+
+        TestFile results1 = testDir.file('build/test-results/TEST-org.gradle.SomeTest.xml');
+        TestFile results2 = testDir.file('build/test-results/TEST-org.gradle.SomeTest2.xml');
+        results1.assertIsFile();
+        results2.assertIsFile();
+        assertThat(results1.linesThat(containsString('VM START TIME =')).get(0), equalTo(results2.linesThat(containsString('VM START TIME =')).get(0)));
+    }
+
+    @Test
+    public void canSpecifyMaximumNumberOfTestClassesToExecuteInAForkedJvm() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file('build.gradle').writelns(
+                "apply plugin: 'java'",
+                "repositories { mavenCentral() }",
+                "dependencies { compile 'junit:junit:4.7' }",
+                "test.forkEvery = 1"
+        );
+        testDir.file('src/test/java/org/gradle/AbstractTest.java').writelns(
+                "package org.gradle;",
+                "public abstract class AbstractTest {",
+                "    @org.junit.Test public void ok() {",
+                "        long time = java.lang.management.ManagementFactory.getRuntimeMXBean().getStartTime();",
+                "        System.out.println(String.format(\"VM START TIME = %s\", time));",
+                "    }",
+                "}");
+        testDir.file('src/test/java/org/gradle/SomeTest.java').writelns(
+                "package org.gradle;",
+                "public class SomeTest extends AbstractTest {",
+                "}");
+        testDir.file('src/test/java/org/gradle/SomeTest2.java').writelns(
+                "package org.gradle;",
+                "public class SomeTest2 extends AbstractTest {",
+                "}");
+
+        executer.withTasks('test').run();
+
+        TestFile results1 = testDir.file('build/test-results/TEST-org.gradle.SomeTest.xml');
+        TestFile results2 = testDir.file('build/test-results/TEST-org.gradle.SomeTest2.xml');
+        results1.assertIsFile();
+        results2.assertIsFile();
+        assertThat(results1.linesThat(containsString('VM START TIME =')).get(0), not(equalTo(results2.linesThat(
+                containsString('VM START TIME =')).get(0))));
+    }
+
+    @Test
+    public void canListenForTestResults() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file('src/main/java/AppException.java').writelns(
+                "public class AppException extends Exception { }"
+        );
+
+        testDir.file('src/test/java/SomeTest.java').writelns(
+                "public class SomeTest {",
+                "@org.junit.Test public void fail() { org.junit.Assert.fail(\"message\"); }",
+                "@org.junit.Test public void knownError() { throw new RuntimeException(\"message\"); }",
+                "@org.junit.Test public void unknownError() throws AppException { throw new AppException(); }",
+                "}"
+        );
+        testDir.file('src/test/java/SomeOtherTest.java').writelns(
+                "public class SomeOtherTest {",
+                "@org.junit.Test public void pass() { }",
+                "}"
+        );
+
+        testDir.file('build.gradle') << '''
+            apply plugin: 'java'
+            repositories { mavenCentral() }
+            dependencies { testCompile 'junit:junit:4.7' }
+            def listener = new TestListenerImpl()
+            test.addTestListener(listener)
+            test.ignoreFailures = true
+            class TestListenerImpl implements TestListener {
+                void beforeSuite(TestDescriptor suite) { println "START [$suite] [$suite.name]" }
+                void afterSuite(TestDescriptor suite, TestResult result) { println "FINISH [$suite] [$suite.name] [$result.resultType] [$result.testCount]" }
+                void beforeTest(TestDescriptor test) { println "START [$test] [$test.name]" }
+                void afterTest(TestDescriptor test, TestResult result) { println "FINISH [$test] [$test.name] [$result.resultType] [$result.testCount] [$result.exception]" }
+            }
+        '''
+
+        ExecutionResult result = executer.withTasks("test").run();
+        assertThat(result.getOutput(), containsLine("START [tests] []"));
+        assertThat(result.getOutput(), containsLine("FINISH [tests] [] [FAILURE] [4]"));
+
+        assertThat(result.getOutput(), containsLine("START [test process 'Gradle Worker 1'] [Gradle Worker 1]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test process 'Gradle Worker 1'] [Gradle Worker 1] [FAILURE] [4]"));
+
+        assertThat(result.getOutput(), containsLine("START [test class SomeOtherTest] [SomeOtherTest]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test class SomeOtherTest] [SomeOtherTest] [SUCCESS] [1]"));
+        assertThat(result.getOutput(), containsLine("START [test pass(SomeOtherTest)] [pass]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test pass(SomeOtherTest)] [pass] [SUCCESS] [1] [null]"));
+
+        assertThat(result.getOutput(), containsLine("START [test class SomeTest] [SomeTest]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test class SomeTest] [SomeTest] [FAILURE] [3]"));
+        assertThat(result.getOutput(), containsLine("START [test fail(SomeTest)] [fail]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test fail(SomeTest)] [fail] [FAILURE] [1] [java.lang.AssertionError: message]"));
+        assertThat(result.getOutput(), containsLine("START [test knownError(SomeTest)] [knownError]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test knownError(SomeTest)] [knownError] [FAILURE] [1] [java.lang.RuntimeException: message]"));
+        assertThat(result.getOutput(), containsLine("START [test unknownError(SomeTest)] [unknownError]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test unknownError(SomeTest)] [unknownError] [FAILURE] [1] [org.gradle.messaging.remote.internal.PlaceholderException: AppException: null]"));
+    }
+
+    @Test
+    public void canListenForTestResultsWhenJUnit3IsUsed() {
+        TestFile testDir = dist.getTestDir();
+        testDir.file('src/test/java/SomeTest.java').writelns(
+                "public class SomeTest extends junit.framework.TestCase {",
+                "public void testPass() { }",
+                "public void testFail() { junit.framework.Assert.fail(\"message\"); }",
+                "public void testError() { throw new RuntimeException(\"message\"); }",
+                "}"
+        );
+
+        testDir.file('build.gradle') << '''
+            apply plugin: 'java'
+            repositories { mavenCentral() }
+            dependencies { testCompile 'junit:junit:3.8' }
+            def listener = new TestListenerImpl()
+            test.addTestListener(listener)
+            test.ignoreFailures = true
+            class TestListenerImpl implements TestListener {
+                void beforeSuite(TestDescriptor suite) { println "START [$suite] [$suite.name]" }
+                void afterSuite(TestDescriptor suite, TestResult result) { println "FINISH [$suite] [$suite.name]" }
+                void beforeTest(TestDescriptor test) { println "START [$test] [$test.name]" }
+                void afterTest(TestDescriptor test, TestResult result) { println "FINISH [$test] [$test.name] [$result.exception]" }
+            }
+        '''
+
+        ExecutionResult result = executer.withTasks("test").run();
+        assertThat(result.getOutput(), containsLine("START [test class SomeTest] [SomeTest]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test class SomeTest] [SomeTest]"));
+        assertThat(result.getOutput(), containsLine("START [test testPass(SomeTest)] [testPass]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test testPass(SomeTest)] [testPass] [null]"));
+        assertThat(result.getOutput(), containsLine("START [test testFail(SomeTest)] [testFail]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test testFail(SomeTest)] [testFail] [junit.framework.AssertionFailedError: message]"));
+        assertThat(result.getOutput(), containsLine("START [test testError(SomeTest)] [testError]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test testError(SomeTest)] [testError] [java.lang.RuntimeException: message]"));
+    }
+
+    @Test
+    public void canHaveMultipleTestTaskInstances() {
+        executer.withTasks('check').run()
+
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.Test1', 'org.gradle.Test2')
+        result.testClass('org.gradle.Test1').assertTestPassed('ok')
+        result.testClass('org.gradle.Test2').assertTestPassed('ok')
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JUnitTestExecutionResult.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/JUnitTestExecutionResult.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JUnitTestExecutionResult.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/JUnitTestExecutionResult.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JavaProjectIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/JavaProjectIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JavaProjectIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/JavaProjectIntegrationTest.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/LoggingIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/LoggingIntegrationTest.groovy
new file mode 100644
index 0000000..68b3909
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/LoggingIntegrationTest.groovy
@@ -0,0 +1,343 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import junit.framework.AssertionFailedError
+import org.gradle.integtests.fixtures.ExecutionResult
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.integtests.fixtures.Sample
+import org.gradle.integtests.fixtures.UsesSample
+
+/**
+ * @author Hans Dockter
+ */
+class LoggingIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final TestResources resources = new TestResources()
+    @Rule public final Sample sampleResources = new Sample()
+
+    private final LogOutput logOutput = new LogOutput() {{
+        quiet(
+                'An info log message which is always logged.',
+                'A message which is logged at QUIET level',
+                'Text which is logged at QUIET level',
+                'A task message which is logged at QUIET level',
+                'quietProject2ScriptClassPathOut',
+                'quietProject2CallbackOut',
+                'settings quiet out',
+                'init QUIET out',
+                'init callback quiet out',
+                'buildSrc quiet',
+                'nestedBuild/buildSrc quiet',
+                'nestedBuild quiet',
+                'nestedBuild task quiet',
+                'external QUIET message')
+        error(
+                'An error log message.',
+                'An error message which is logged at ERROR level',
+                'external ERROR error message',
+                '[ant:echo] An error message logged from Ant',
+                'A severe log message logged using JUL',
+                'init ERROR err'
+        )
+        warning(
+                'A warning log message.',
+                'A task error message which is logged at WARN level',
+                '[ant:echo] A warn message logged from Ant',
+                'A warning log message logged using JUL'
+        )
+        lifecycle(
+                'A lifecycle info log message.',
+                'An error message which is logged at LIFECYCLE level',
+                'A task message which is logged at LIFECYCLE level',
+                'settings lifecycle log',
+                'init lifecycle log',
+                'external LIFECYCLE error message',
+                'external LIFECYCLE log message',
+                'LOGGER: evaluating :',
+                'LOGGER: evaluating :project1',
+                'LOGGER: evaluating :project2',
+                'LOGGER: executing :project1:logInfo',
+                'LOGGER: executing :project1:logLifecycle',
+                'LOGGER: executing :project1:nestedBuildLog',
+                'LOGGER: executing :project1:log',
+                ':buildSrc:classes',
+                ':nestedBuild:log'
+        )
+        info(
+                'An info log message.',
+                'A message which is logged at INFO level',
+                'Text which is logged at INFO level',
+                'A task message which is logged at INFO level',
+                '[ant:echo] An info message logged from Ant',
+                'An info log message logged using SLF4j',
+                'An info log message logged using JCL',
+                'An info log message logged using Log4j',
+                'An info log message logged using JUL',
+                'A config log message logged using JUL',
+                'infoProject2Out',
+                'infoProject2ScriptClassPathOut',
+                'settings info out',
+                'settings info log',
+                'init INFO out',
+                'init INFO err',
+                'init info log',
+                'LOGGER: build finished',
+                'LOGGER: evaluated project',
+                'LOGGER: executed task',
+                'LOGGER: task starting work',
+                'LOGGER: task completed work',
+                'buildSrc info',
+                'nestedBuild/buildSrc info',
+                'nestedBuild info',
+                'external INFO message'
+        )
+        debug(
+                'A debug log message.',
+                '[ant:echo] A debug message logged from Ant',
+                'A fine log message logged using JUL'
+        )
+        trace(
+                'A trace log message.'
+        )
+        forbidden(
+                // the default message generated by JUL
+                'INFO: An info log message logged using JUL',
+                // the custom logger should override this
+                'BUILD SUCCESSFUL'
+        )
+    }}
+
+    private final LogOutput sample = new LogOutput() {{
+        error('An error log message.')
+        quiet('An info log message which is always logged.')
+        quiet('A message which is logged at QUIET level')
+        warning('A warning log message.')
+        lifecycle('A lifecycle info log message.')
+        info('An info log message.')
+        info('A message which is logged at INFO level')
+        info('A task message which is logged at INFO level')
+        info('An info log message logged using SLF4j')
+        debug('A debug log message.')
+        forbidden('A trace log message.')
+    }}
+
+    private final LogOutput multiThreaded = new LogOutput() {{
+        (1..10).each { thread ->
+            (1..100).each { iteration ->
+                lifecycle("log message from thread $thread iteration $iteration")
+                quiet("stdout message from thread $thread iteration $iteration")
+                quiet("styled text message from thread $thread iteration $iteration")
+            }
+        }
+    }}
+
+    @Test
+    public void quietLogging() {
+        checkOutput(this.&run, logOutput.quiet)
+    }
+
+    @Test
+    public void lifecycleLogging() {
+        checkOutput(this.&run, logOutput.lifecycle)
+    }
+
+    @Test
+    public void infoLogging() {
+        checkOutput(this.&run, logOutput.info)
+    }
+
+    @Test
+    public void debugLogging() {
+        checkOutput(this.&run, logOutput.debug)
+    }
+
+    @Test @UsesSample('userguide/tutorial/logging')
+    public void sampleQuietLogging() {
+        checkOutput(this.&runSample, sample.quiet)
+    }
+
+    @Test @UsesSample('userguide/tutorial/logging')
+    public void sampleLifecycleLogging() {
+        checkOutput(this.&runSample, sample.lifecycle)
+    }
+
+    @Test @UsesSample('userguide/tutorial/logging')
+    public void sampleInfoLogging() {
+        checkOutput(this.&runSample, sample.info)
+    }
+
+    @Test @UsesSample('userguide/tutorial/logging')
+    public void sampleDebugLogging() {
+        checkOutput(this.&runSample, sample.debug)
+    }
+
+    @Test
+    public void multiThreadedQuietLogging() {
+        checkOutput(this.&runMultiThreaded, multiThreaded.quiet)
+    }
+
+    @Test
+    public void multiThreadedlifecycleLogging() {
+        checkOutput(this.&runMultiThreaded, multiThreaded.lifecycle)
+    }
+
+    @Test
+    public void multiThreadedDebugLogging() {
+        checkOutput(this.&runMultiThreaded, multiThreaded.debug)
+    }
+
+    def run(LogLevel level) {
+        resources.maybeCopy('LoggingIntegrationTest/logging')
+        TestFile loggingDir = dist.testDir
+        loggingDir.file("buildSrc/build/.gradle").deleteDir()
+        loggingDir.file("nestedBuild/buildSrc/.gradle").deleteDir()
+
+        String initScript = new File(loggingDir, 'init.gradle').absolutePath
+        String[] allArgs = level.args + ['-I', initScript]
+        return executer.inDirectory(loggingDir).withArguments(allArgs).withTasks('log').run()
+    }
+
+    def runMultiThreaded(LogLevel level) {
+        resources.maybeCopy('LoggingIntegrationTest/multiThreaded')
+        return executer.withArguments(level.args).withTasks('log').run()
+    }
+    
+    def runSample(LogLevel level) {
+        return executer.inDirectory(sampleResources.dir).withArguments(level.args).withTasks('log').run()
+    }
+
+    void checkOutput(Closure run, LogLevel level) {
+        ExecutionResult result = run.call(level)
+        level.checkOuts(result)
+    }
+}
+
+class LogLevel {
+    List args
+    List infoMessages
+    List errorMessages
+    List allMessages
+    Closure matchPartialLine = {expected, actual -> expected == actual }
+
+    def getForbiddenMessages() {
+        allMessages - (infoMessages + errorMessages)
+    }
+
+    def checkOuts(ExecutionResult result) {
+        infoMessages.each {List messages ->
+            checkOuts(true, result.output, messages, matchPartialLine)
+        }
+        errorMessages.each {List messages ->
+            checkOuts(true, result.error, messages, matchPartialLine)
+        }
+        forbiddenMessages.each {List messages ->
+            checkOuts(false, result.output, messages) {expected, actual-> actual.contains(expected)}
+            checkOuts(false, result.error, messages) {expected, actual-> actual.contains(expected)}
+        }
+    }
+
+    def checkOuts(boolean shouldContain, String result, List outs, Closure partialLine) {
+        outs.each {String expectedOut ->
+            boolean found = result.readLines().find {partialLine.call(expectedOut, it)}
+            if (!found && shouldContain) {
+                throw new AssertionFailedError("Could not find expected line '$expectedOut' in output:\n$result")
+            }
+            if (found && !shouldContain) {
+                throw new AssertionFailedError("Found unexpected line '$expectedOut' in output:\n$result")
+            }
+        }
+    }
+}
+
+class LogOutput {
+    final List quietMessages = []
+    final List errorMessages = []
+    final List warningMessages = []
+    final List lifecycleMessages = []
+    final List infoMessages = []
+    final List debugMessages = []
+    final List traceMessages = []
+    final List forbiddenMessages = []
+    final List allOuts = [
+            errorMessages,
+            quietMessages,
+            warningMessages,
+            lifecycleMessages,
+            infoMessages,
+            debugMessages,
+            traceMessages,
+            forbiddenMessages
+    ]
+
+    def quiet(String... msgs) {
+        quietMessages.addAll(msgs)
+    }
+    def error(String... msgs) {
+        errorMessages.addAll(msgs)
+    }
+    def warning(String... msgs) {
+        warningMessages.addAll(msgs)
+    }
+    def lifecycle(String... msgs) {
+        warningMessages.addAll(msgs)
+    }
+    def info(String... msgs) {
+        infoMessages.addAll(msgs)
+    }
+    def debug(String... msgs) {
+        debugMessages.addAll(msgs)
+    }
+    def trace(String... msgs) {
+        traceMessages.addAll(msgs)
+    }
+    def forbidden(String... msgs) {
+        forbiddenMessages.addAll(msgs)
+    }
+
+    final LogLevel quiet = new LogLevel(
+            args: ['-q'],
+            infoMessages: [quietMessages],
+            errorMessages: [errorMessages],
+            allMessages: allOuts
+    )
+    final LogLevel lifecycle = new LogLevel(
+            args: [],
+            infoMessages: [quietMessages, warningMessages, lifecycleMessages],
+            errorMessages: [errorMessages],
+            allMessages: allOuts
+    )
+    final LogLevel info = new LogLevel(
+            args: ['-i'],
+            infoMessages: [quietMessages, warningMessages, lifecycleMessages, infoMessages],
+            errorMessages: [errorMessages],
+            allMessages: allOuts
+    )
+    final LogLevel debug = new LogLevel(
+            args: ['-d'],
+            infoMessages: [quietMessages, warningMessages, lifecycleMessages, infoMessages, debugMessages],
+            errorMessages: [errorMessages],
+            allMessages: allOuts,
+            matchPartialLine: {expected, actual -> actual.endsWith(expected) /*&& actual =~ /\[.+?\] \[.+?\] .+/ */}
+    )
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/MultiprojectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/MultiprojectIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/MultiprojectIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/MultiprojectIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/OsgiProjectSampleIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/OsgiProjectSampleIntegrationTest.groovy
new file mode 100644
index 0000000..28de62a
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/OsgiProjectSampleIntegrationTest.groovy
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import java.util.jar.Manifest
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+import org.gradle.util.GradleVersion
+
+/**
+ * @author Hans Dockter
+ */
+class OsgiProjectSampleIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('osgi')
+
+    @Test
+    public void osgiProjectSamples() {
+        long start = System.currentTimeMillis()
+        TestFile osgiProjectDir = sample.dir
+        executer.inDirectory(osgiProjectDir).withTasks('clean', 'assemble').run()
+        TestFile tmpDir = dist.testDir
+        osgiProjectDir.file('build/libs/osgi-1.0.jar').unzipTo(tmpDir)
+        tmpDir.file('META-INF/MANIFEST.MF').withInputStream { InputStream instr ->
+            Manifest manifest = new Manifest(instr)
+            checkManifest(manifest, start)
+        }
+    }
+
+    static void checkManifest(Manifest manifest, start) {
+        assertEquals('Example Gradle Activator', manifest.mainAttributes.getValue('Bundle-Name'))
+        assertEquals('2', manifest.mainAttributes.getValue('Bundle-ManifestVersion'))
+        assertEquals('Bnd-0.0.384', manifest.mainAttributes.getValue('Tool'))
+        assertTrue(start <= Long.parseLong(manifest.mainAttributes.getValue('Bnd-LastModified')))
+        assertEquals('1.0', manifest.mainAttributes.getValue('Bundle-Version'))
+        assertEquals('gradle_tooling.osgi', manifest.mainAttributes.getValue('Bundle-SymbolicName'))
+        assertEquals( new GradleVersion().version, manifest.mainAttributes.getValue('Built-By'))
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/ProjectLayoutIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ProjectLayoutIntegrationTest.groovy
new file mode 100644
index 0000000..c327283
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ProjectLayoutIntegrationTest.groovy
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+
+class ProjectLayoutIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final TestResources resources = new TestResources()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    @Test
+    public void canHaveSomeSourceAndResourcesInSameDirectoryAndSomeInDifferentDirectories() {
+        dist.testFile('settings.gradle') << 'rootProject.name = "sharedSource"'
+        dist.testFile('build.gradle') << '''
+apply plugin: 'java'
+apply plugin: 'groovy'
+apply plugin: 'scala'
+
+repositories {
+    mavenRepo urls: 'http://scala-tools.org/repo-releases/'
+    mavenCentral()
+}
+dependencies {
+    groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.6.0'
+    scalaTools group: 'org.scala-lang', name: 'scala-compiler', version: '2.8.1'
+    scalaTools group: 'org.scala-lang', name: 'scala-library', version: '2.8.1'
+
+    compile group: 'org.scala-lang', name: 'scala-library', version: '2.8.1'
+}
+
+sourceSets.each {
+    configure(it) {
+        resources.srcDir 'src'
+        resources.srcDir 'src/resources'
+        resources.include "org/gradle/$name/**"
+        java.srcDir 'src'
+        java.srcDir 'src/java'
+        java.include "org/gradle/$name/**"
+        groovy.srcDir 'src'
+        groovy.srcDir 'src/groovy'
+        groovy.include "org/gradle/$name/**"
+        scala.srcDir 'src'
+        scala.srcDir 'src/scala'
+        scala.include "org/gradle/$name/**"
+    }
+}
+'''
+        dist.testFile('src/org/gradle/main/resource.txt') << 'some text'
+        dist.testFile('src/org/gradle/test/resource.txt') << 'some text'
+        dist.testFile('src/resources/org/gradle/main/resource2.txt') << 'some text'
+        dist.testFile('src/resources/org/gradle/test/resource2.txt') << 'some text'
+        dist.testFile('src/org/gradle/main/JavaClass.java') << 'package org.gradle; public class JavaClass { }'
+        dist.testFile('src/org/gradle/test/JavaClassTest.java') << 'package org.gradle; class JavaClassTest { JavaClass c = new JavaClass(); }'
+        dist.testFile('src/java/org/gradle/main/JavaClass2.java') << 'package org.gradle; class JavaClass2 { }'
+        dist.testFile('src/java/org/gradle/test/JavaClassTest2.java') << 'package org.gradle; class JavaClassTest2 { JavaClass c = new JavaClass(); }'
+        dist.testFile('src/org/gradle/main/GroovyClass.groovy') << 'package org.gradle; class GroovyClass { }'
+        dist.testFile('src/org/gradle/test/GroovyClassTest.groovy') << 'package org.gradle; class GroovyClassTest { GroovyClass c = new GroovyClass() }'
+        dist.testFile('src/groovy/org/gradle/main/GroovyClass2.groovy') << 'package org.gradle; class GroovyClass2 { }'
+        dist.testFile('src/groovy/org/gradle/test/GroovyClassTest2.groovy') << 'package org.gradle; class GroovyClassTest2 { GroovyClass c = new GroovyClass() }'
+        dist.testFile('src/org/gradle/main/ScalaClass.scala') << 'package org.gradle; class ScalaClass { }'
+        dist.testFile('src/org/gradle/test/ScalaClassTest.scala') << 'package org.gradle; class ScalaClassTest { val c: ScalaClass = new ScalaClass() }'
+        dist.testFile('src/scala/org/gradle/main/ScalaClass2.scala') << 'package org.gradle; class ScalaClass2 { }'
+        dist.testFile('src/scala/org/gradle/test/ScalaClassTest2.scala') << 'package org.gradle; class ScalaClassTest2 { val c: ScalaClass = new ScalaClass() }'
+
+        executer.withTasks('build').run()
+
+        File buildDir = dist.testFile('build')
+
+        buildDir.file('classes/main').assertHasDescendants(
+                'org/gradle/main/resource.txt',
+                'org/gradle/main/resource2.txt',
+                'org/gradle/JavaClass.class',
+                'org/gradle/JavaClass2.class',
+                'org/gradle/GroovyClass.class',
+                'org/gradle/GroovyClass2.class',
+                'org/gradle/ScalaClass.class',
+                'org/gradle/ScalaClass2.class'
+        )
+
+        buildDir.file('classes/test').assertHasDescendants(
+                'org/gradle/test/resource.txt',
+                'org/gradle/test/resource2.txt',
+                'org/gradle/JavaClassTest.class',
+                'org/gradle/JavaClassTest2.class',
+                'org/gradle/GroovyClassTest.class',
+                'org/gradle/GroovyClassTest2.class',
+                'org/gradle/ScalaClassTest.class',
+                'org/gradle/ScalaClassTest2.class'
+        )
+
+        TestFile tmpDir = dist.testFile('jarContents')
+        buildDir.file('libs/sharedSource.jar').unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/main/resource.txt',
+                'org/gradle/main/resource2.txt',
+                'org/gradle/JavaClass.class',
+                'org/gradle/JavaClass2.class',
+                'org/gradle/GroovyClass.class',
+                'org/gradle/GroovyClass2.class',
+                'org/gradle/ScalaClass.class',
+                'org/gradle/ScalaClass2.class'
+        )
+
+        executer.withTasks('javadoc', 'groovydoc', 'scaladoc').run()
+
+        buildDir.file('docs/javadoc/index.html').assertIsFile()
+        buildDir.file('docs/groovydoc/index.html').assertIsFile()
+        buildDir.file('docs/scaladoc/index.html').assertIsFile()
+    }
+
+    @Test
+    public void multipleProjectsCanShareTheSameSourceDirectory() {
+        dist.testFile('settings.gradle') << 'include "a", "b"'
+        dist.testFile('a/build.gradle') << '''
+apply plugin: 'java'
+sourceSets.main.java {
+    srcDirs '../src'
+    include 'org/gradle/a/**'
+}
+'''
+        dist.testFile('b/build.gradle') << '''
+apply plugin: 'java'
+dependencies { compile project(':a') }
+sourceSets.main.java {
+    srcDirs '../src'
+    include 'org/gradle/b/**'
+}
+'''
+
+        dist.testFile('src/org/gradle/a/ClassA.java') << 'package org.gradle.a; public class ClassA { }'
+        dist.testFile('src/org/gradle/b/ClassB.java') << 'package org.gradle.b; public class ClassB { private org.gradle.a.ClassA field; }'
+
+        executer.withTasks('clean', 'assemble').run()
+
+        dist.testFile('a/build/classes/main').assertHasDescendants(
+                'org/gradle/a/ClassA.class'
+        )
+        dist.testFile('b/build/classes/main').assertHasDescendants(
+                'org/gradle/b/ClassB.class'
+        )
+    }
+
+    @Test
+    public void canUseANonStandardBuildDir() {
+        executer.withTasks('build').withArguments('-i').run()
+
+        dist.testFile('build').assertDoesNotExist()
+
+        JUnitTestExecutionResult results = new JUnitTestExecutionResult(dist.testFile(), 'target')
+        results.assertTestClassesExecuted('PersonTest')
+        results.testClass('PersonTest').assertTestsExecuted('ok')
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ProjectLoadingIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ProjectLoadingIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ProjectLoadingIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ProjectLoadingIntegrationTest.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesAntlrIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesAntlrIntegrationTest.groovy
new file mode 100644
index 0000000..cfffbc4
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesAntlrIntegrationTest.groovy
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesAntlrIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('antlr')
+
+    @Test
+    public void canBuild() {
+        TestFile projectDir = sample.dir
+
+        // Build and test projects
+        executer.inDirectory(projectDir).withTasks('clean', 'build').withArguments("--no-opt").run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
+        result.assertTestClassesExecuted('org.gradle.GrammarTest')
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCodeQualityIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCodeQualityIntegrationTest.groovy
new file mode 100644
index 0000000..67a8145
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCodeQualityIntegrationTest.groovy
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesCodeQualityIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('codeQuality')
+
+    @Test
+    public void checkReportsGenerated() {
+        TestFile projectDir = sample.dir
+        TestFile buildDir = projectDir.file('build')
+
+        executer.inDirectory(projectDir).withTasks('check').run()
+
+        buildDir.file('checkstyle/main.xml').assertIsFile()
+        buildDir.file('reports/codenarc/main.html').assertIsFile()
+        buildDir.file('reports/codenarc/test.html').assertIsFile()
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCustomBuildLanguageIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCustomBuildLanguageIntegrationTest.groovy
new file mode 100644
index 0000000..78e3ca0
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCustomBuildLanguageIntegrationTest.groovy
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesCustomBuildLanguageIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('customBuildLanguage')
+
+    @Test
+    public void testBuildProductDistributions() {
+        TestFile rootDir = sample.dir
+        executer.inDirectory(rootDir).withTasks('clean', 'dist').run()
+
+        TestFile expandDir = dist.testFile('expand-basic')
+        rootDir.file('basicEdition/build/distributions/some-company-basic-edition-1.0.zip').unzipTo(expandDir)
+        expandDir.assertHasDescendants(
+                'readme.txt',
+                'end-user-license-agreement.txt',
+                'bin/start.sh',
+                'lib/some-company-identity-management-1.0.jar',
+                'lib/some-company-billing-1.0.jar',
+                'lib/commons-lang-2.4.jar'
+        )
+
+        expandDir = dist.testFile('expand-enterprise')
+        rootDir.file('enterpriseEdition/build/distributions/some-company-enterprise-edition-1.0.zip').unzipTo(expandDir)
+        expandDir.assertHasDescendants(
+                'readme.txt',
+                'end-user-license-agreement.txt',
+                'bin/start.sh',
+                'lib/some-company-identity-management-1.0.jar',
+                'lib/some-company-billing-1.0.jar',
+                'lib/some-company-reporting-1.0.jar',
+                'lib/commons-lang-2.4.jar',
+                'lib/commons-io-1.2.jar'
+        )
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCustomPluginIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCustomPluginIntegrationTest.groovy
new file mode 100644
index 0000000..7149743
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesCustomPluginIntegrationTest.groovy
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.util.TestFile
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesCustomPluginIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('customPlugin')
+
+    @Test
+    public void canTestPluginAndTaskImplementation() {
+        TestFile projectDir = sample.dir
+
+        executer.inDirectory(projectDir).withTasks('check').run()
+
+        def result = new JUnitTestExecutionResult(projectDir)
+        result.assertTestClassesExecuted('org.gradle.GreetingTaskTest', 'org.gradle.GreetingPluginTest')
+    }
+
+    @Test
+    public void canPublishAndUsePluginAndTestImplementations() {
+        TestFile projectDir = sample.dir
+
+        executer.inDirectory(projectDir).withTasks('uploadArchives').run()
+
+        def result = executer.usingBuildScript(projectDir.file('usesCustomTask.gradle')).withTasks('greeting').run()
+        assert result.output.contains('howdy!')
+
+        result = executer.usingBuildScript(projectDir.file('usesCustomPlugin.gradle')).withTasks('hello').run()
+        assert result.output.contains('hello from GreetingTask')
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesExcludesAndClassifiersIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesExcludesAndClassifiersIntegrationTest.groovy
new file mode 100644
index 0000000..4a10743
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesExcludesAndClassifiersIntegrationTest.groovy
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesExcludesAndClassifiersIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('userguide/artifacts/excludesAndClassifiers')
+
+    @Test
+    public void checkExcludeAndClassifier() {
+        File projectDir = sample.dir
+        String outputCompile = executer.inDirectory(projectDir).withTasks('clean', 'resolveCompile').run().getOutput()
+        String outputRuntime = executer.inDirectory(projectDir).withTasks('clean', 'resolveRuntime').run().getOutput()
+        assertThat(outputCompile, not(containsString("commons")))
+        assertThat(outputRuntime, not(containsString("commons")))
+        assertThat(outputCompile, not(containsString("reports")))
+        assertThat(outputRuntime, not(containsString("reports")))
+        assertThat(outputCompile, not(containsString("shared")))
+        assertThat(outputRuntime, containsString("shared"))
+
+        assertThat(outputCompile, containsString("service-1.0-jdk15"))
+        assertThat(outputCompile, containsString("service-1.0-jdk14"))
+    }
+
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyCustomizedLayoutIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyCustomizedLayoutIntegrationTest.groovy
new file mode 100644
index 0000000..b7437f7
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyCustomizedLayoutIntegrationTest.groovy
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesGroovyCustomizedLayoutIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('groovy/customizedLayout')
+
+    @Test
+    public void groovyProjectQuickstartSample() {
+        TestFile groovyProjectDir = sample.dir
+        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check contents of jar
+        TestFile tmpDir = dist.testDir.file('jarContents')
+        groovyProjectDir.file('build/libs/customizedLayout.jar').unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/Person.class'
+        )
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyMultiProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyMultiProjectIntegrationTest.groovy
new file mode 100644
index 0000000..043cae7
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyMultiProjectIntegrationTest.groovy
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesGroovyMultiProjectIntegrationTest {
+    static final String TEST_PROJECT_NAME = 'testproject'
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('groovy/multiproject')
+
+    private List mainFiles = ['JavaPerson', 'GroovyPerson', 'GroovyJavaPerson']
+    private List excludedFiles = ['ExcludeJava', 'ExcludeGroovy', 'ExcludeGroovyJava']
+    private List testFiles = ['JavaPersonTest', 'GroovyPersonTest', 'GroovyJavaPersonTest']
+
+    @Test
+    public void groovyProjectSamples() {
+        String packagePrefix = 'build/classes/main/org/gradle'
+        String testPackagePrefix = 'build/classes/test/org/gradle'
+
+
+        TestFile groovyProjectDir = sample.dir
+        TestFile testProjectDir = groovyProjectDir.file(TEST_PROJECT_NAME)
+
+        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
+
+        // Check compilation
+        mainFiles.each { testProjectDir.file(packagePrefix, it + ".class").assertIsFile() }
+        excludedFiles.each { testProjectDir.file(packagePrefix, it + ".class").assertDoesNotExist() }
+        testFiles.each { testProjectDir.file(testPackagePrefix, it + ".class").assertIsFile() }
+
+        // The test produce marker files with the name of the test class
+        testFiles.each { testProjectDir.file('build', it).assertIsFile() }
+
+        // Check contents of jar
+        TestFile tmpDir = dist.testDir.file('jarContents')
+        testProjectDir.file("build/libs/$TEST_PROJECT_NAME-1.0.jar").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'META-INF/myfile',
+                'org/gradle/main.properties',
+                'org/gradle/JavaPerson.class',
+                'org/gradle/GroovyPerson.class',
+                'org/gradle/GroovyJavaPerson.class'
+        )
+        tmpDir.file('META-INF/MANIFEST.MF').assertContents(containsString('myprop: myvalue'))
+
+        // Build docs
+        executer.inDirectory(groovyProjectDir).withTasks('clean', 'javadoc', 'groovydoc').run()
+        testProjectDir.file('build/docs/javadoc/index.html').assertIsFile()
+        testProjectDir.file('build/docs/groovydoc/index.html').assertIsFile()
+        testProjectDir.file('build/docs/groovydoc/org/gradle/GroovyPerson.html').assertIsFile()
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyOldVersionsIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyOldVersionsIntegrationTest.groovy
new file mode 100644
index 0000000..1b814ac
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyOldVersionsIntegrationTest.groovy
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+
+class SamplesGroovyOldVersionsIntegrationTest {
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    @Test
+    public void groovy156() {
+        TestFile groovyProjectDir = dist.samplesDir.file('groovy/groovy-1.5.6')
+        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check jar exists
+        groovyProjectDir.file("build/libs/groovy-1.5.6.jar").assertIsFile()
+    }
+
+    @Test
+    public void groovy167() {
+        TestFile groovyProjectDir = dist.samplesDir.file('groovy/groovy-1.6.7')
+        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check jar exists
+        groovyProjectDir.file("build/libs/groovy-1.6.7.jar").assertIsFile()
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyQuickstartIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyQuickstartIntegrationTest.groovy
new file mode 100644
index 0000000..7496fac
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyQuickstartIntegrationTest.groovy
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesGroovyQuickstartIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('groovy/quickstart')
+
+    @Test
+    public void groovyProjectQuickstartSample() {
+        TestFile groovyProjectDir = sample.dir
+        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check contents of jar
+        TestFile tmpDir = dist.testDir.file('jarContents')
+        groovyProjectDir.file('build/libs/quickstart.jar').unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/Person.class',
+                'org/gradle/Person$_closure1.class',
+                'org/gradle/Person$_closure2.class',
+                'resource.txt',
+                'script.groovy'
+        )
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaBaseIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaBaseIntegrationTest.groovy
new file mode 100644
index 0000000..fcc3988
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaBaseIntegrationTest.groovy
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+
+class SamplesJavaBaseIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/base')
+
+    @Test
+    public void canBuildAndUploadJar() {
+        TestFile javaprojectDir = sample.dir
+
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir.file('test'))
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check jar exists
+        javaprojectDir.file("prod/build/libs/prod-1.0.jar").assertIsFile()
+        
+        // Check contents of Jar
+        TestFile jarContents = dist.testDir.file('jar')
+        javaprojectDir.file('prod/build/libs/prod-1.0.jar').unzipTo(jarContents)
+        jarContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/Person.class'
+        )
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaCustomizedLayoutIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaCustomizedLayoutIntegrationTest.groovy
new file mode 100644
index 0000000..e1fd742
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaCustomizedLayoutIntegrationTest.groovy
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+
+class SamplesJavaCustomizedLayoutIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/customizedLayout')
+
+    @Test
+    public void canBuildAndUploadJar() {
+        TestFile javaprojectDir = sample.dir
+                                                      
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('clean', 'build', 'uploadArchives').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check jar exists
+        javaprojectDir.file('build/libs/customizedLayout.jar').assertIsFile()
+
+        // Check contents of Jar
+        TestFile jarContents = dist.testDir.file('jar')
+        javaprojectDir.file('build/libs/customizedLayout.jar').unzipTo(jarContents)
+        jarContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/Person.class'
+        )
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaMultiProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaMultiProjectIntegrationTest.groovy
new file mode 100644
index 0000000..04f7f5a
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaMultiProjectIntegrationTest.groovy
@@ -0,0 +1,219 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+import org.gradle.util.TestFile
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesJavaMultiProjectIntegrationTest {
+
+    static final String JAVA_PROJECT_NAME = 'java/multiproject'
+    static final String SHARED_NAME = 'shared'
+    static final String API_NAME = 'api'
+    static final String WEBAPP_NAME = 'webservice'
+    static final String SERVICES_NAME = 'services'
+    static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
+
+    private TestFile javaprojectDir
+    private List projects;
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/multiproject')
+
+    @Before
+    void setUp() {
+        javaprojectDir = sample.dir
+        projects = [SHARED_NAME, API_NAME, WEBAPP_PATH].collect {"$JAVA_PROJECT_NAME/$it"} + JAVA_PROJECT_NAME
+    }
+
+    @Test
+    public void multiProjectJavaProjectSample() {
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('build').run()
+
+        assertBuildSrcBuilt()
+        assertEverythingBuilt()
+    }
+
+    private void assertBuildSrcBuilt() {
+        TestFile buildSrcDir = javaprojectDir.file('buildSrc')
+
+        buildSrcDir.file('build/libs/buildSrc.jar').assertIsFile()
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(buildSrcDir)
+        result.assertTestClassesExecuted('org.gradle.buildsrc.BuildSrcClassTest')
+    }
+
+    private void assertEverythingBuilt() {
+        String packagePrefix = 'build/classes/main/org/gradle'
+        String testPackagePrefix = 'build/classes/test/org/gradle'
+
+        // Check classes and resources
+        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'Person.class')
+        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'main.properties')
+
+        // Check test classes and resources
+        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'PersonTest.class')
+        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'test.properties')
+        assertExists(javaprojectDir, API_NAME, packagePrefix, API_NAME, 'PersonList.class')
+        assertExists(javaprojectDir, WEBAPP_PATH, packagePrefix, WEBAPP_NAME, 'TestTest.class')
+
+        // Check test results and report
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir.file(SHARED_NAME))
+        result.assertTestClassesExecuted('org.gradle.shared.PersonTest')
+
+        result = new JUnitTestExecutionResult(javaprojectDir.file(WEBAPP_PATH))
+        result.assertTestClassesExecuted('org.gradle.webservice.TestTestTest')
+
+        // Check contents of shared jar
+        TestFile tmpDir = dist.testDir.file("$SHARED_NAME-1.0.jar")
+        javaprojectDir.file(SHARED_NAME, "build/libs/$SHARED_NAME-1.0.jar").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/shared/Person.class',
+                'org/gradle/shared/package-info.class',
+                'org/gradle/shared/main.properties'
+        )
+
+        // Check contents of API jar
+        tmpDir = dist.testDir.file("$API_NAME-1.0.jar")
+        javaprojectDir.file(API_NAME, "build/libs/$API_NAME-1.0.jar").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/api/PersonList.class',
+                'org/gradle/apiImpl/Impl.class')
+
+        // Check contents of API jar
+        tmpDir = dist.testDir.file("$API_NAME-spi-1.0.jar")
+        javaprojectDir.file(API_NAME, "build/libs/$API_NAME-spi-1.0.jar").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/api/PersonList.class')
+
+        // Check contents of War
+        tmpDir = dist.testDir.file("$WEBAPP_NAME-2.5.war")
+        javaprojectDir.file(WEBAPP_PATH, "build/libs/$WEBAPP_NAME-2.5.war").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'WEB-INF/classes/org/gradle/webservice/TestTest.class',
+                "WEB-INF/lib/$SHARED_NAME-1.0.jar".toString(),
+                "WEB-INF/lib/$API_NAME-1.0.jar".toString(),
+                "WEB-INF/lib/$API_NAME-spi-1.0.jar".toString(),
+                'WEB-INF/lib/commons-collections-3.2.jar',
+                'WEB-INF/lib/commons-io-1.2.jar',
+                'WEB-INF/lib/commons-lang-2.4.jar'
+        )
+
+        // Check contents of dist zip
+        tmpDir = dist.testDir.file("$API_NAME-1.0.zip")
+        javaprojectDir.file(API_NAME, "build/distributions/$API_NAME-1.0.zip").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'README.txt',
+                "libs/$API_NAME-spi-1.0.jar".toString(),
+                "libs/$SHARED_NAME-1.0.jar".toString(),
+                'libs/commons-io-1.2.jar',
+                'libs/commons-lang-2.4.jar'
+        )
+    }
+
+    @Test
+    public void multiProjectJavaDoc() {
+        executer.inDirectory(javaprojectDir).withTasks('clean', 'javadoc').run()
+        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/index.html').assertIsFile()
+        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/index.html').assertContents(containsString("shared 1.0 API"))
+        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/org/gradle/shared/Person.html').assertIsFile()
+        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/org/gradle/shared/package-summary.html').assertContents(containsString("These are the shared classes."))
+        javaprojectDir.file(API_NAME, 'build/docs/javadoc/index.html').assertIsFile()
+        javaprojectDir.file(API_NAME, 'build/docs/javadoc/org/gradle/api/PersonList.html').assertIsFile()
+        javaprojectDir.file(API_NAME, 'build/docs/javadoc/org/gradle/api/package-summary.html').assertContents(containsString("These are the API classes"))
+        javaprojectDir.file(WEBAPP_PATH, 'build/docs/javadoc/index.html').assertIsFile()
+    }
+
+    @Test
+    public void multiProjectPartialBuild() {
+        String packagePrefix = 'build/classes/main/org/gradle'
+        String testPackagePrefix = 'build/classes/test/org/gradle'
+
+        // Partial build using current directory
+        executer.inDirectory(javaprojectDir.file("$SERVICES_NAME/$WEBAPP_NAME")).withTasks('buildNeeded').run()
+        checkPartialWebAppBuild(packagePrefix, javaprojectDir, testPackagePrefix)
+
+        // Partial build using task path
+        executer.inDirectory(javaprojectDir).withTasks('clean', "$SHARED_NAME:classes".toString()).run()
+        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'Person.class')
+        assertDoesNotExist(javaprojectDir, false, API_NAME, packagePrefix, API_NAME, 'PersonList.class')
+    }
+
+
+    @Test
+    public void buildDependents() {
+        executer.inDirectory(javaprojectDir).withTasks('clean', "$SHARED_NAME:buildDependents".toString()).run()
+        assertEverythingBuilt()
+    }
+
+    @Test
+    public void clean() {
+        executer.inDirectory(javaprojectDir).withTasks('classes').run()
+        executer.inDirectory(javaprojectDir).withTasks('clean').run()
+        projects.each { javaprojectDir.file("$it/build").assertDoesNotExist() }
+    }
+
+    @Test
+    public void noRebuildOfProjectDependencies() {
+        TestFile apiDir = javaprojectDir.file(API_NAME)
+        executer.inDirectory(apiDir).withTasks('classes').run()
+        TestFile sharedJar = javaprojectDir.file("shared/build/libs/shared-1.0.jar")
+        TestFile.Snapshot snapshot = sharedJar.snapshot()
+        executer.inDirectory(apiDir).withTasks('clean', 'classes').withArguments("-a").run()
+        sharedJar.assertHasNotChangedSince(snapshot)
+    }
+
+    @Test
+    public void shouldNotUseCacheForProjectDependencies() {
+        TestFile apiDir = javaprojectDir.file(API_NAME)
+        executer.inDirectory(apiDir).withTasks('checkProjectDependency').run()
+    }
+           
+    private static def checkPartialWebAppBuild(String packagePrefix, TestFile javaprojectDir, String testPackagePrefix) {
+        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'Person.class')
+        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'main.properties')
+        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'PersonTest.class')
+        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'test.properties')
+        assertExists(javaprojectDir, "$SERVICES_NAME/$WEBAPP_NAME" as String, packagePrefix, WEBAPP_NAME, 'TestTest.class')
+        assertExists(javaprojectDir, "$SERVICES_NAME/$WEBAPP_NAME" as String, 'build', 'libs', 'webservice-2.5.war')
+        assertDoesNotExist(javaprojectDir, false, "$SERVICES_NAME/$WEBAPP_NAME" as String, 'build', 'libs', 'webservice-2.5.jar')
+    }
+
+    private static void assertExists(TestFile baseDir, Object... path) {
+        baseDir.file(path).assertExists()
+    }
+
+    static void assertDoesNotExist(TestFile baseDir, boolean shouldExists, Object... path) {
+        baseDir.file(path).assertDoesNotExist()
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaOnlyIfIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaOnlyIfIntegrationTest.groovy
new file mode 100644
index 0000000..44a3292
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaOnlyIfIntegrationTest.groovy
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+public class SamplesJavaOnlyIfIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/onlyif')
+
+    /**
+     * runs a build 3 times.
+     * execute clean dists
+     * check worked correctly
+     *
+     * remove test results
+     * execute dists
+     * check didn't re-run tests
+     *
+     * remove class file
+     * execute dists
+     * check that it re-ran tests 
+     */
+    @Test public void testOptimizedBuild() {
+        TestFile javaprojectDir = sample.dir
+
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        assertExists(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
+        assertExists(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
+
+        // Check jar exists
+        assertExists(javaprojectDir, "build/libs/onlyif.jar")
+
+        // remove test results
+        removeFile(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
+        removeFile(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
+
+        executer.inDirectory(javaprojectDir).withTasks('test').run()
+
+        // assert that tests did not run
+        // (since neither compile nor compileTests should have done anything)
+        assertDoesNotExist(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
+        assertDoesNotExist(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
+
+        // remove a compiled class file
+        removeFile(javaprojectDir, 'build/classes/main/org/gradle/Person.class')
+
+        executer.inDirectory(javaprojectDir).withTasks('test').run()
+
+        // Check tests have run
+        assertExists(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
+        assertExists(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
+    }
+
+    private static void assertExists(File baseDir, String path) {
+        new TestFile(baseDir).file(path).assertExists()
+    }
+
+    private static void assertDoesNotExist(File baseDir, String path) {
+        new TestFile(baseDir).file(path).assertDoesNotExist()
+    }
+
+    private static void removeFile(File baseDir, String path) {
+        TestFile file = new TestFile(baseDir).file(path)
+        file.assertExists()
+        file.delete()
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaProjectWithIntTestsIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaProjectWithIntTestsIntegrationTest.groovy
new file mode 100644
index 0000000..e607050
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaProjectWithIntTestsIntegrationTest.groovy
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesJavaProjectWithIntTestsIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/withIntegrationTests')
+
+    @Test
+    public void canRunIntegrationTests() {
+        TestFile javaprojectDir = sample.dir
+        
+        // Run int tests
+        executer.inDirectory(javaprojectDir).withTasks('clean', 'integrationTest').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonIntegrationTest')
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaQuickstartIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaQuickstartIntegrationTest.groovy
new file mode 100644
index 0000000..2740b5a
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesJavaQuickstartIntegrationTest.groovy
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import java.util.jar.Manifest
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesJavaQuickstartIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/quickstart')
+
+    @Test
+    public void canBuildAndUploadJar() {
+        TestFile javaprojectDir = sample.dir
+
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('clean', 'build', 'uploadArchives').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check jar exists
+        javaprojectDir.file("build/libs/quickstart-1.0.jar").assertIsFile()
+
+        // Check jar uploaded
+        javaprojectDir.file('repos/quickstart-1.0.jar').assertIsFile()
+
+        // Check contents of Jar
+        TestFile jarContents = dist.testDir.file('jar')
+        javaprojectDir.file('repos/quickstart-1.0.jar').unzipTo(jarContents)
+        jarContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/Person.class'
+        )
+
+        // Check contents of manifest
+        Manifest manifest = new Manifest()
+        jarContents.file('META-INF/MANIFEST.MF').withInputStream { manifest.read(it) }
+        assertThat(manifest.mainAttributes.size(), equalTo(3))
+        assertThat(manifest.mainAttributes.getValue('Manifest-Version'), equalTo('1.0'))
+        assertThat(manifest.mainAttributes.getValue('Implementation-Title'), equalTo('Gradle Quickstart'))
+        assertThat(manifest.mainAttributes.getValue('Implementation-Version'), equalTo('1.0'))
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndGroovyIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndGroovyIntegrationTest.groovy
new file mode 100644
index 0000000..9b94590
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndGroovyIntegrationTest.groovy
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesMixedJavaAndGroovyIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('groovy/mixedJavaAndGroovy')
+
+    @Test
+    public void canBuildJar() {
+        TestFile projectDir = sample.dir
+        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
+        result.assertTestClassesExecuted('org.gradle.PersonTest')
+
+        // Check contents of jar
+        TestFile tmpDir = dist.testDir.file('jarContents')
+        projectDir.file('build/libs/mixedJavaAndGroovy-1.0.jar').unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/Person.class',
+                'org/gradle/GroovyPerson.class',
+                'org/gradle/JavaPerson.class',
+                'org/gradle/PersonList.class'
+        )
+    }
+
+    @Test
+    public void canBuildDocs() {
+        TestFile projectDir = sample.dir
+        executer.inDirectory(projectDir).withTasks('clean', 'javadoc', 'groovydoc').run()
+
+        TestFile javadocsDir = projectDir.file("build/docs/javadoc")
+        javadocsDir.file("index.html").assertIsFile()
+        javadocsDir.file("index.html").assertContents(containsString('mixedJavaAndGroovy 1.0 API'))
+        javadocsDir.file("org/gradle/Person.html").assertIsFile()
+        javadocsDir.file("org/gradle/JavaPerson.html").assertIsFile()
+
+        TestFile groovydocsDir = projectDir.file("build/docs/groovydoc")
+        groovydocsDir.file("index.html").assertIsFile()
+        groovydocsDir.file("overview-summary.html").assertContents(containsString('mixedJavaAndGroovy 1.0 API'))
+        groovydocsDir.file("org/gradle/JavaPerson.html").assertIsFile()
+        groovydocsDir.file("org/gradle/GroovyPerson.html").assertIsFile()
+        groovydocsDir.file("org/gradle/PersonList.html").assertIsFile()
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndScalaIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndScalaIntegrationTest.groovy
new file mode 100644
index 0000000..a9539ff
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndScalaIntegrationTest.groovy
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesMixedJavaAndScalaIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('scala/mixedJavaAndScala')
+
+    @Test
+    public void canBuildJar() {
+        TestFile projectDir = sample.dir
+
+        // Build and test projects
+        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
+        result.assertTestClassesExecuted('org.gradle.sample.PersonTest')
+
+        // Check contents of Jar
+        TestFile jarContents = dist.testDir.file('jar')
+        projectDir.file("build/libs/mixedJavaAndScala-1.0.jar").unzipTo(jarContents)
+        jarContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/sample/Person.class',
+                'org/gradle/sample/impl/JavaPerson.class',
+                'org/gradle/sample/impl/PersonImpl.class',
+                'org/gradle/sample/impl/PersonList.class'
+        )
+    }
+
+    @Test
+    public void canBuildDocs() {
+        TestFile projectDir = sample.dir
+        executer.inDirectory(projectDir).withTasks('clean', 'javadoc', 'scaladoc').run()
+
+        TestFile javadocsDir = projectDir.file("build/docs/javadoc")
+        javadocsDir.file("index.html").assertIsFile()
+        javadocsDir.file("index.html").assertContents(containsString('mixedJavaAndScala 1.0 API'))
+        javadocsDir.file("org/gradle/sample/Person.html").assertIsFile()
+        javadocsDir.file("org/gradle/sample/impl/JavaPerson.html").assertIsFile()
+
+        TestFile scaladocsDir = projectDir.file("build/docs/scaladoc")
+        scaladocsDir.file("index.html").assertIsFile()
+        scaladocsDir.file("index.html").assertContents(containsString('mixedJavaAndScala 1.0 API'))
+        scaladocsDir.file("org/gradle/sample/impl/PersonImpl.html").assertIsFile()
+        scaladocsDir.file("org/gradle/sample/impl/JavaPerson.html").assertIsFile()
+        scaladocsDir.file("org/gradle/sample/impl/PersonList.html").assertIsFile()
+    }
+
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesRepositoriesIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesRepositoriesIntegrationTest.groovy
new file mode 100644
index 0000000..fa6f271
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesRepositoriesIntegrationTest.groovy
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesRepositoriesIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('userguide/artifacts/defineRepository')
+
+    @Test
+    public void repositoryNotations() {
+        // This test is not very strong. Its main purpose is to the for the correct syntax as we use many
+        // code snippets from this build script in the user's guide.
+        File projectDir = sample.dir
+        String output = executer.inDirectory(projectDir).withQuietLogging().withTasks('lookup').run().getOutput()
+        assertThat(output, equalTo(String.format("localRepository%nlocalRepository%n")))
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesScalaCustomizedLayoutIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesScalaCustomizedLayoutIntegrationTest.groovy
new file mode 100644
index 0000000..8244714
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesScalaCustomizedLayoutIntegrationTest.groovy
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesScalaCustomizedLayoutIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('scala/customizedLayout')
+
+    @Test
+    public void canBuildJar() {
+        TestFile projectDir = sample.dir
+
+        // Build and test projects
+        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
+        result.assertTestClassesExecuted('org.gradle.sample.impl.PersonImplTest')
+
+        // Check contents of Jar
+        TestFile jarContents = dist.testDir.file('jar')
+        projectDir.file("build/libs/customizedLayout.jar").unzipTo(jarContents)
+        jarContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/sample/api/Person.class',
+                'org/gradle/sample/impl/PersonImpl.class'
+        )
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesScalaQuickstartIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesScalaQuickstartIntegrationTest.groovy
new file mode 100644
index 0000000..cf95d16
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesScalaQuickstartIntegrationTest.groovy
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesScalaQuickstartIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('scala/quickstart')
+
+    private TestFile projectDir
+
+    @Before
+    void setUp() {
+        projectDir = sample.dir
+    }
+
+    @Test
+    public void canBuildJar() {
+        // Build and test projects
+        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
+
+        // Check tests have run
+        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
+        result.assertTestClassesExecuted('org.gradle.sample.impl.PersonImplTest')
+
+        // Check contents of Jar
+        TestFile jarContents = dist.testDir.file('jar')
+        projectDir.file("build/libs/quickstart.jar").unzipTo(jarContents)
+        jarContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'org/gradle/sample/api/Person.class',
+                'org/gradle/sample/impl/PersonImpl.class'
+        )
+    }
+
+    @Test
+    public void canBuildScalaDoc() {
+        executer.inDirectory(projectDir).withTasks('clean', 'scaladoc').run()
+
+        projectDir.file('build/docs/scaladoc/index.html').assertExists()
+        projectDir.file('build/docs/scaladoc/org/gradle/sample/api/Person.html').assertContents(containsString("Defines the interface for a person."))
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesWebProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesWebProjectIntegrationTest.groovy
new file mode 100644
index 0000000..294ab9c
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesWebProjectIntegrationTest.groovy
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Assert
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesWebProjectIntegrationTest {
+    static final String WEB_PROJECT_NAME = 'customised'
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('webApplication/customised')
+
+    @Test
+    public void webProjectSamples() {
+        TestFile webProjectDir = sample.dir
+        executer.inDirectory(webProjectDir).withTasks('clean', 'assemble').run()
+        TestFile tmpDir = dist.testDir.file('unjar')
+        webProjectDir.file("build/libs/customised-1.0.war").unzipTo(tmpDir)
+        tmpDir.assertHasDescendants(
+                'root.txt',
+                'META-INF/MANIFEST.MF',
+                'WEB-INF/classes/org/gradle/HelloServlet.class',
+                'WEB-INF/classes/org/gradle/MyClass.class',
+                'WEB-INF/lib/compile-1.0.jar',
+                'WEB-INF/lib/compile-transitive-1.0.jar',
+                'WEB-INF/lib/runtime-1.0.jar',
+                'WEB-INF/lib/additional-1.0.jar',
+                'WEB-INF/lib/otherLib-1.0.jar',
+                'WEB-INF/additional.xml',
+                'WEB-INF/webapp.xml',
+                'WEB-INF/web.xml',
+                'webapp.html')
+    }
+
+    @Test
+    public void checkJettyPlugin() {
+        TestFile webProjectDir = sample.dir
+        executer.inDirectory(webProjectDir).withTasks('clean', 'runTest').run()
+        checkServletOutput(webProjectDir)
+        executer.inDirectory(webProjectDir).withTasks('clean', 'runWarTest').run()
+        checkServletOutput(webProjectDir)
+    }
+
+    static void checkServletOutput(TestFile webProjectDir) {
+        Assert.assertEquals('Hello Gradle', webProjectDir.file("build/servlet-out.txt").text)
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesWebQuickstartIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesWebQuickstartIntegrationTest.groovy
new file mode 100644
index 0000000..b5c6da1
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SamplesWebQuickstartIntegrationTest.groovy
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.ExecutionResult
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesWebQuickstartIntegrationTest {
+    static final String WEB_PROJECT_NAME = 'web-project'
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('webApplication/quickstart')
+
+    @Test
+    public void webProjectSamples() {
+        TestFile webProjectDir = sample.dir
+        executer.inDirectory(webProjectDir).withTasks('clean', 'build').run()
+
+        // Check contents of War
+        TestFile warContents = dist.testDir.file('jar')
+        webProjectDir.file("build/libs/quickstart.war").unzipTo(warContents)
+        warContents.assertHasDescendants(
+                'META-INF/MANIFEST.MF',
+                'index.jsp',
+                'WEB-INF/classes/org/gradle/sample/Greeter.class',
+                'WEB-INF/classes/greeting.txt',
+                'WEB-INF/lib/log4j-1.2.15.jar',
+                'WEB-INF/lib/commons-io-1.4.jar',
+        )
+        
+        ExecutionResult result = executer.inDirectory(webProjectDir).withTasks('clean', 'runTest').run()
+        checkServletOutput(result)
+        result = executer.inDirectory(webProjectDir).withTasks('clean', 'runWarTest').run()
+        checkServletOutput(result)
+    }
+
+    static void checkServletOutput(ExecutionResult result) {
+        assertThat(result.output, containsString('hello Gradle'))
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ScalaProjectIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/ScalaProjectIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ScalaProjectIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/ScalaProjectIntegrationTest.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SettingsScriptErrorIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SettingsScriptErrorIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SettingsScriptErrorIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/SettingsScriptErrorIntegrationTest.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SettingsScriptExecutionIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SettingsScriptExecutionIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SettingsScriptExecutionIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/SettingsScriptExecutionIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SyncTaskIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/SyncTaskIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SyncTaskIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/SyncTaskIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskAutoDependencyIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskAutoDependencyIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskAutoDependencyIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskAutoDependencyIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskDefinitionIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskDefinitionIntegrationTest.java
new file mode 100644
index 0000000..f999825
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskDefinitionIntegrationTest.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests;
+
+import org.junit.Test;
+
+public class TaskDefinitionIntegrationTest extends AbstractIntegrationTest {
+    @Test
+    public void canDefineTasksUsingTaskKeywordAndIdentifier() {
+        testFile("build.gradle").writelns(
+                "task nothing",
+                "task withAction << { }",
+                "task emptyOptions()",
+                "task task",
+                "task withOptions(dependsOn: [nothing, withAction, emptyOptions, task])",
+                "task withOptionsAndAction(dependsOn: withOptions) << { }");
+        inTestDirectory().withTasks("withOptionsAndAction").run().assertTasksExecuted(":emptyOptions", ":nothing",
+                ":task", ":withAction", ":withOptions", ":withOptionsAndAction");
+    }
+
+    @Test
+    public void canDefineTasksUsingTaskKeywordAndGString() {
+        testFile("build.gradle").writelns(
+                "v = 'Task'",
+                "task \"nothing$v\"",
+                "task \"withAction$v\" << { }",
+                "task \"emptyOptions$v\"()",
+                "task \"withOptions$v\"(dependsOn: [nothingTask, withActionTask, emptyOptionsTask])",
+                "task \"withOptionsAndAction$v\"(dependsOn: withOptionsTask) << { }");
+        inTestDirectory().withTasks("withOptionsAndActionTask").run().assertTasksExecuted(":emptyOptionsTask",
+                ":nothingTask", ":withActionTask", ":withOptionsTask", ":withOptionsAndActionTask");
+    }
+
+    @Test
+    public void canDefineTasksUsingTaskKeywordAndString() {
+        testFile("build.gradle").writelns(
+                "task 'nothing'",
+                "task 'withAction' << { }",
+                "task 'emptyOptions'()",
+                "task 'withOptions'(dependsOn: [nothing, withAction, emptyOptions])",
+                "task 'withOptionsAndAction'(dependsOn: withOptions) << { }");
+        inTestDirectory().withTasks("withOptionsAndAction").run().assertTasksExecuted(":emptyOptions", ":nothing",
+                ":withAction", ":withOptions", ":withOptionsAndAction");
+    }
+
+    @Test
+    public void canDefineTasksInNestedBlocks() {
+        testFile("build.gradle").writelns(
+                "2.times { task \"dynamic$it\" << { } }",
+                "if (dynamic0) { task inBlock }",
+                "def task() { task inMethod }",
+                "task()", "def cl = { -> task inClosure }",
+                "cl()",
+                "task all(dependsOn: [dynamic0, dynamic1, inBlock, inMethod, inClosure])");
+        inTestDirectory().withTasks("all").run().assertTasksExecuted(":dynamic0", ":dynamic1", ":inBlock", ":inClosure",
+                ":inMethod", ":all");
+    }
+
+    @Test
+    public void canDefineTasksUsingTaskMethodExpression() {
+        testFile("build.gradle").writelns(
+                "a = 'a' == 'b' ? null: task(withAction) << { }",
+                "a = task(nothing)",
+                "a = task(emptyOptions())", "taskName = 'dynamic'",
+                "a = task(\"$taskName\") << { }",
+                "a = task('string')",
+                "a = task('stringWithAction') << { }",
+                "a = task('stringWithOptions', description: 'description')",
+                "a = task('stringWithOptionsAndAction', description: 'description') << { }",
+                "a = task(withOptions, description: 'description')",
+                "a = task(withOptionsAndAction, description: 'description') << { }",
+                "a = task(anotherWithAction).doFirst\n{}", "task all(dependsOn: tasks.all)");
+        inTestDirectory().withTasks("all").run().assertTasksExecuted(":anotherWithAction", ":dynamic", ":emptyOptions",
+                ":nothing", ":string", ":stringWithAction", ":stringWithOptions", ":stringWithOptionsAndAction",
+                ":withAction", ":withOptions", ":withOptionsAndAction", ":all");
+    }
+
+    @Test
+    public void canConfigureTasksWhenTheyAreDefined() {
+        testFile("build.gradle").writelns(
+                "task withDescription { description = 'value' }",
+                "task(asMethod)\n{ description = 'value' }",
+                "task asStatement(type: TestTask) { property = 'value' }",
+                "task \"dynamic\"(type: TestTask) { property = 'value' }",
+                "v = task(asExpression, type: TestTask) { property = 'value' }",
+                "task(postConfigure, type: TestTask).configure { property = 'value' }",
+                "[asStatement, dynamic, asExpression, postConfigure].each { ",
+                "    assert 'value' == it.property",
+                "}",
+                "[withDescription, asMethod].each {",
+                "    assert 'value' == it.description",
+                "}",
+                "task all(dependsOn: tasks.all)",
+                "class TestTask extends DefaultTask { String property }");
+        inTestDirectory().withTasks("all").run();
+    }
+
+    @Test
+    public void doesNotHideLocalMethodsAndVariables() {
+        testFile("build.gradle").writelns(
+                "String name = 'a'; task name",
+//                "taskNameVar = 'b'; task taskNameVar",
+                "def taskNameMethod(String name = 'c') { name } ",
+//                "task taskNameMethod",
+                "task taskNameMethod('d')",
+                "def addTaskMethod(String methodParam) { task methodParam }",
+                "addTaskMethod('e')",
+                "def addTaskWithClosure(String methodParam) { task(methodParam) { property = 'value' } }",
+                "addTaskWithClosure('f')",
+                "def addTaskWithMap(String methodParam) { task(methodParam, description: 'description') }",
+                "addTaskWithMap('g')",
+                "cl = { String taskNameParam -> task taskNameParam }",
+                "cl.call('h')",
+                "cl = { String taskNameParam -> task(taskNameParam) { property = 'value' } }",
+                "cl.call('i')",
+                "assert 'value' == f.property",
+                "assert 'value' == i.property",
+                "task all(dependsOn: tasks.all)");
+        inTestDirectory().withTasks("all").run().assertTasksExecuted(":a", ":d", ":e", ":f", ":g", ":h", ":i", ":all");
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskExecutionIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskExecutionIntegrationTest.java
new file mode 100644
index 0000000..4e63cd8
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/TaskExecutionIntegrationTest.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests;
+
+import org.gradle.util.TestFile;
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.*;
+
+public class TaskExecutionIntegrationTest extends AbstractIntegrationTest {
+    @Test
+    public void taskCanAccessTaskGraph() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "boolean notified = false",
+                "task a(dependsOn: 'b') << { task ->",
+                "    assert notified",
+                "    assert gradle.taskGraph.hasTask(task)",
+                "    assert gradle.taskGraph.hasTask(':a')",
+                "    assert gradle.taskGraph.hasTask(a)",
+                "    assert gradle.taskGraph.hasTask(':b')",
+                "    assert gradle.taskGraph.hasTask(b)",
+                "    assert gradle.taskGraph.allTasks.contains(task)",
+                "    assert gradle.taskGraph.allTasks.contains(tasks.getByName('b'))",
+                "}",
+                "task b",
+                "gradle.taskGraph.whenReady { graph ->",
+                "    assert graph.hasTask(':a')",
+                "    assert graph.hasTask(a)",
+                "    assert graph.hasTask(':b')",
+                "    assert graph.hasTask(b)",
+                "    assert graph.allTasks.contains(a)",
+                "    assert graph.allTasks.contains(b)",
+                "    notified = true",
+                "}");
+        usingBuildFile(buildFile).withTasks("a").run().assertTasksExecuted(":b", ":a");
+    }
+
+    @Test
+    public void executesAllTasksInASingleBuildAndEachTaskAtMostOnce() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "gradle.taskGraph.whenReady { assert !project.hasProperty('graphReady'); graphReady = true }",
+                "task a << { task -> project.executedA = task }",
+                "task b << { ",
+                "    assert a == project.executedA",
+                "    assert gradle.taskGraph.hasTask(':a')",
+                "}",
+                "task c(dependsOn: a)",
+                "task d(dependsOn: a)",
+                "task e(dependsOn: [a, d])");
+        usingBuildFile(buildFile).withTasks("a", "b").run().assertTasksExecuted(":a", ":b");
+        usingBuildFile(buildFile).withTasks("a", "a").run().assertTasksExecuted(":a");
+        usingBuildFile(buildFile).withTasks("c", "a").run().assertTasksExecuted(":a", ":c");
+        usingBuildFile(buildFile).withTasks("c", "e").run().assertTasksExecuted(":a", ":c", ":d", ":e");
+    }
+
+    @Test
+    public void executesMultiProjectsTasksInASingleBuildAndEachTaskAtMostOnce() {
+        testFile("settings.gradle").writelns("include 'child1', 'child2'");
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "task a",
+                "allprojects {",
+                "    task b",
+                "    task c(dependsOn: ['b', ':a'])",
+                "}");
+        usingBuildFile(buildFile).withTasks("a", "c").run().assertTasksExecuted(":a", ":b", ":c", ":child1:b",
+                ":child1:c", ":child2:b", ":child2:c");
+        usingBuildFile(buildFile).withTasks("b", ":child2:c").run().assertTasksExecuted(":b", ":child1:b", ":child2:b",
+                ":a", ":child2:c");
+    }
+
+    @Test
+    public void executesMultiProjectDefaultTasksInASingleBuildAndEachTaskAtMostOnce() {
+        testFile("settings.gradle").writelns("include 'child1', 'child2'");
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns("defaultTasks 'a', 'b'", "task a", "subprojects {", "    task a(dependsOn: ':a')",
+                "    task b(dependsOn: ':a')", "}");
+        usingBuildFile(buildFile).run().assertTasksExecuted(":a", ":child1:a", ":child2:a", ":child1:b", ":child2:b");
+    }
+
+    @Test
+    public void executesProjectDefaultTasksWhenNoneSpecified() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "task a",
+                "task b(dependsOn: a)",
+                "defaultTasks 'b'"
+        );
+        usingBuildFile(buildFile).withTasks().run().assertTasksExecuted(":a", ":b");
+    }
+    
+    @Test
+    public void doesNotExecuteTaskActionsWhenDryRunSpecified() {
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "task a << { fail() }",
+                "task b(dependsOn: a) << { fail() }",
+                "defaultTasks 'b'"
+        );
+
+        // project defaults
+        usingBuildFile(buildFile).withArguments("-m").run().assertTasksExecuted(":a", ":b");
+        // named tasks
+        usingBuildFile(buildFile).withArguments("-m").withTasks("b").run().assertTasksExecuted(":a", ":b");
+    }
+
+    @Test
+    public void excludesTasksWhenExcludePatternSpecified() {
+        testFile("settings.gradle").write("include 'sub'");
+        TestFile buildFile = testFile("build.gradle");
+        buildFile.writelns(
+                "task a",
+                "task b(dependsOn: a)",
+                "task c(dependsOn: [a, b])",
+                "task d(dependsOn: c)",
+                "defaultTasks 'd'"
+        );
+        testFile("sub/build.gradle").writelns(
+                "task c",
+                "task d(dependsOn: c)"
+        );
+
+        // Exclude entire branch
+        usingBuildFile(buildFile).withTasks(":d").withArguments("-x", "c").run().assertTasksExecuted(":d");
+        // Exclude direct dependency
+        usingBuildFile(buildFile).withTasks(":d").withArguments("-x", "b").run().assertTasksExecuted(":a", ":c", ":d");
+        // Exclude using paths and multi-project
+        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "c").run().assertTasksExecuted(":d", ":sub:d");
+        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "sub:c").run().assertTasksExecuted(":a", ":b", ":c", ":d", ":sub:d");
+        usingBuildFile(buildFile).withTasks("d").withArguments("-x", ":sub:c").run().assertTasksExecuted(":a", ":b", ":c", ":d", ":sub:d");
+        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "d").run().assertTasksExecuted();
+        // Project defaults
+        usingBuildFile(buildFile).withArguments("-x", "b").run().assertTasksExecuted(":a", ":c", ":d", ":sub:c", ":sub:d");
+        // Unknown task
+        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "unknown").runWithFailure().assertThatDescription(startsWith("Task 'unknown' not found in root project"));
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesIntegrationTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesRunner.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesRunner.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesRunner.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/UserGuideSamplesRunner.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/WaterProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WaterProjectIntegrationTest.groovy
new file mode 100644
index 0000000..a404780
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WaterProjectIntegrationTest.groovy
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.ExecutionResult
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.junit.Rule
+import org.junit.Test
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class WaterProjectIntegrationTest {
+    final static String NL = System.properties['line.separator']
+
+    final static String HELLO_CLAUSE = "Hello, I'm "
+    final static String CHILDREN_TEXT = 'I love water.'
+    final static String WATER_INFO = 'As you all know, I cover three quarters of this planet!'
+    final static String BLUE_WHALE_INFO = "I'm the largets animal which has ever lived on this planet!"
+    final static String KRILL_INFO = "The weight of my species in summer is twice as heavy as all human beings!"
+    final static String PHYTOPLANKTON_INFO = "I produce as much oxygen as all the other plants on earth together!"
+
+    final static String WATER_NAME = 'water'
+    final static String BLUE_WHALE_NAME = 'bluewhale'
+    final static String KRILL_NAME = 'krill'
+    final static String PHYTOPLANKTON_NAME = 'phytoplankton'
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample(WATER_NAME)
+
+    @Test
+    public void waterProject() {
+        File waterDir = sample.dir
+        ExecutionResult result = executer.inDirectory(waterDir).withTasks('hello').withQuietLogging().run()
+        assertEquals(result.output, list2text([intro(WATER_NAME), WATER_INFO,
+                intro(PHYTOPLANKTON_NAME), CHILDREN_TEXT, PHYTOPLANKTON_INFO,
+                intro(KRILL_NAME), CHILDREN_TEXT, KRILL_INFO,
+                intro(BLUE_WHALE_NAME), CHILDREN_TEXT, BLUE_WHALE_INFO]))
+
+        result = executer.inDirectory(new File(waterDir, BLUE_WHALE_NAME)).withTasks('hello').withQuietLogging().run()
+        assertEquals(result.output, list2text([intro(WATER_NAME), WATER_INFO,
+                intro(PHYTOPLANKTON_NAME), CHILDREN_TEXT, PHYTOPLANKTON_INFO,
+                intro(KRILL_NAME), CHILDREN_TEXT, KRILL_INFO,
+                intro(BLUE_WHALE_NAME), CHILDREN_TEXT, BLUE_WHALE_INFO]))
+
+        result = executer.inDirectory(new File(waterDir, PHYTOPLANKTON_NAME)).withTasks('hello').withQuietLogging().run()
+        assertEquals(result.output, list2text([intro(WATER_NAME), WATER_INFO,
+                intro(PHYTOPLANKTON_NAME), CHILDREN_TEXT, PHYTOPLANKTON_INFO]))
+    }
+
+    static String intro(String projectName) {
+        HELLO_CLAUSE + projectName
+    }
+
+    static String list2text(List list) {
+        list.join(NL) + NL
+    }
+
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WebProjectIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WebProjectIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WebProjectIntegrationTest.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/WebProjectIntegrationTest.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/WorkerProcessIntegrationTest.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WorkerProcessIntegrationTest.java
new file mode 100644
index 0000000..d6ac43a
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WorkerProcessIntegrationTest.java
@@ -0,0 +1,372 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests;
+
+import org.apache.tools.ant.Project;
+import org.gradle.CacheUsage;
+import org.gradle.api.Action;
+import org.gradle.api.internal.ClassPathRegistry;
+import org.gradle.api.internal.DefaultClassPathRegistry;
+import org.gradle.api.internal.file.BaseDirConverter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.cache.DefaultCacheFactory;
+import org.gradle.cache.DefaultCacheRepository;
+import org.gradle.listener.ListenerBroadcast;
+import org.gradle.messaging.remote.ObjectConnection;
+import org.gradle.messaging.remote.internal.TcpMessagingServer;
+import org.gradle.messaging.dispatch.Dispatch;
+import org.gradle.messaging.dispatch.MethodInvocation;
+import org.gradle.process.internal.*;
+import org.gradle.process.internal.child.WorkerProcessClassPathProvider;
+import org.gradle.util.LongIdGenerator;
+import org.gradle.util.TemporaryFolder;
+import org.jmock.Expectations;
+import org.jmock.Sequence;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.ObjectInputStream;
+import java.io.Serializable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+ at RunWith(JMock.class)
+public class WorkerProcessIntegrationTest {
+    private final JUnit4Mockery context = new JUnit4Mockery();
+    private final TestListenerInterface listenerMock = context.mock(TestListenerInterface.class);
+    private final TcpMessagingServer server = new TcpMessagingServer(getClass().getClassLoader());
+    @Rule public final TemporaryFolder tmpDir = new TemporaryFolder();
+    private final ClassPathRegistry classPathRegistry = new DefaultClassPathRegistry(new WorkerProcessClassPathProvider(new DefaultCacheRepository(tmpDir.getDir(), CacheUsage.ON, new DefaultCacheFactory())));
+    private final DefaultWorkerProcessFactory workerFactory = new DefaultWorkerProcessFactory(LogLevel.INFO, server, classPathRegistry, new BaseDirConverter(tmpDir.getTestDir()), new LongIdGenerator());
+    private final ListenerBroadcast<TestListenerInterface> broadcast = new ListenerBroadcast<TestListenerInterface>(
+            TestListenerInterface.class);
+    private final RemoteExceptionListener exceptionListener = new RemoteExceptionListener(broadcast);
+
+    @Before
+    public void setUp() {
+        broadcast.add(listenerMock);
+    }
+
+    @Test
+    public void workerProcessCanSendMessagesToThisProcess() throws Throwable {
+        context.checking(new Expectations() {{
+            Sequence sequence = context.sequence("sequence");
+            one(listenerMock).send("message 1", 1);
+            inSequence(sequence);
+            one(listenerMock).send("message 2", 2);
+            inSequence(sequence);
+        }});
+
+        execute(worker(new RemoteProcess()));
+    }
+
+    @Test
+    public void thisProcessCanSendEventsToWorkerProcess() throws Throwable {
+        execute(worker(new PingRemoteProcess()).onServer(new Action<ObjectConnection>() {
+            public void execute(ObjectConnection objectConnection) {
+                TestListenerInterface listener = objectConnection.addOutgoing(TestListenerInterface.class);
+                listener.send("1", 0);
+                listener.send("1", 1);
+                listener.send("1", 2);
+                listener.send("stop", 3);
+            }
+        }));
+    }
+
+    @Test
+    public void multipleWorkerProcessesCanSendMessagesToThisProcess() throws Throwable {
+        context.checking(new Expectations() {{
+            Sequence process1 = context.sequence("sequence1");
+            one(listenerMock).send("message 1", 1);
+            inSequence(process1);
+            one(listenerMock).send("message 2", 2);
+            inSequence(process1);
+            Sequence process2 = context.sequence("sequence2");
+            one(listenerMock).send("other 1", 1);
+            inSequence(process2);
+            one(listenerMock).send("other 2", 2);
+            inSequence(process2);
+        }});
+
+        execute(worker(new RemoteProcess()), worker(new OtherRemoteProcess()));
+    }
+
+    @Test
+    public void handlesWorkerProcessWhichCrashes() throws Throwable {
+        context.checking(new Expectations() {{
+            atMost(1).of(listenerMock).send("message 1", 1);
+            atMost(1).of(listenerMock).send("message 2", 2);
+        }});
+
+        execute(worker(new CrashingRemoteProcess()).expectStopFailure());
+    }
+
+    @Test
+    public void handlesWorkerActionWhichThrowsException() throws Throwable {
+        execute(worker(new BrokenRemoteProcess()).expectStopFailure());
+    }
+
+    @Test
+    public void handlesWorkerActionThatLeavesThreadsRunning() throws Throwable {
+        context.checking(new Expectations() {{
+            one(listenerMock).send("message 1", 1);
+            one(listenerMock).send("message 2", 2);
+        }});
+
+        execute(worker(new NoCleanUpRemoteProcess()));
+    }
+
+    @Test
+    public void handlesWorkerProcessWhichNeverConnects() throws Throwable {
+        execute(worker(new NoConnectRemoteProcess()).expectStartFailure());
+    }
+
+    @Test
+    public void handlesWorkerProcessWhenJvmFailsToStart() throws Throwable {
+        execute(mainClass("no-such-class").expectStartFailure());
+    }
+
+    private ChildProcess worker(Action<WorkerProcessContext> action) {
+        return new ChildProcess(action);
+    }
+
+    private ChildProcess mainClass(String mainClass) {
+        return new ChildProcess(new NoOpAction()).mainClass(mainClass);
+    }
+
+    void execute(ChildProcess... processes) throws Throwable {
+        for (ChildProcess process : processes) {
+            process.start();
+        }
+        for (ChildProcess process : processes) {
+            process.waitForStop();
+        }
+        server.stop();
+        exceptionListener.rethrow();
+    }
+
+    private class ChildProcess {
+        private boolean stopFails;
+        private boolean startFails;
+        private WorkerProcess proc;
+        private Action<WorkerProcessContext> action;
+        private String mainClass;
+        private Action<ObjectConnection> serverAction;
+
+        public ChildProcess(Action<WorkerProcessContext> action) {
+            this.action = action;
+        }
+
+        ChildProcess expectStopFailure() {
+            stopFails = true;
+            return this;
+        }
+
+        ChildProcess expectStartFailure() {
+            startFails = true;
+            return this;
+        }
+
+        public void start() {
+            WorkerProcessBuilder builder = workerFactory.create();
+            builder.applicationClasspath(classPathRegistry.getClassPathFiles("ANT"));
+            builder.sharedPackages("org.apache.tools.ant");
+            builder.getJavaCommand().systemProperty("test.system.property", "value");
+            builder.getJavaCommand().environment("TEST_ENV_VAR", "value");
+            builder.worker(action);
+
+            if (mainClass != null) {
+                builder.getJavaCommand().setMain(mainClass);
+            }
+
+            proc = builder.build();
+            try {
+                proc.start();
+                assertFalse(startFails);
+            } catch (ExecException e) {
+                assertTrue(startFails);
+                return;
+            }
+            proc.getConnection().addIncoming(TestListenerInterface.class, exceptionListener);
+            if (serverAction != null) {
+                serverAction.execute(proc.getConnection());
+            }
+        }
+
+        public void waitForStop() {
+            if (startFails) {
+                return;
+            }
+            try {
+                proc.waitForStop();
+                assertFalse("Expected process to fail", stopFails);
+            } catch (ExecException e) {
+                assertTrue("Unexpected failure in worker process", stopFails);
+            }
+        }
+
+        public ChildProcess mainClass(String mainClass) {
+            this.mainClass = mainClass;
+            return this;
+        }
+
+        public ChildProcess onServer(Action<ObjectConnection> action) {
+            this.serverAction = action;
+            return this;
+        }
+    }
+
+    public static class RemoteExceptionListener implements Dispatch<MethodInvocation> {
+        Throwable ex;
+        final Dispatch<MethodInvocation> dispatch;
+
+        public RemoteExceptionListener(Dispatch<MethodInvocation> dispatch) {
+            this.dispatch = dispatch;
+        }
+
+        public void dispatch(MethodInvocation message) {
+            try {
+                dispatch.dispatch(message);
+            } catch (Throwable e) {
+                ex = e;
+            }
+        }
+
+        public void rethrow() throws Throwable {
+            if (ex != null) {
+                throw ex;
+            }
+        }
+    }
+
+    public static class RemoteProcess implements Action<WorkerProcessContext>, Serializable {
+        public void execute(WorkerProcessContext workerProcessContext) {
+            // Check environment
+            assertThat(System.getProperty("test.system.property"), equalTo("value"));
+            assertThat(System.getenv().get("TEST_ENV_VAR"), equalTo("value"));
+
+            // Check ClassLoaders
+            ClassLoader antClassLoader = Project.class.getClassLoader();
+            ClassLoader thisClassLoader = getClass().getClassLoader();
+            ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
+
+            assertThat(antClassLoader, not(sameInstance(systemClassLoader)));
+            assertThat(thisClassLoader, not(sameInstance(systemClassLoader)));
+            assertThat(antClassLoader.getParent(), equalTo(systemClassLoader.getParent()));
+            assertThat(thisClassLoader.getParent().getParent().getParent(), sameInstance(antClassLoader));
+
+            // Send some messages
+            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(
+                    TestListenerInterface.class);
+            sender.send("message 1", 1);
+            sender.send("message 2", 2);
+        }
+    }
+
+    public static class OtherRemoteProcess implements Action<WorkerProcessContext>, Serializable {
+        public void execute(WorkerProcessContext workerProcessContext) {
+            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(TestListenerInterface.class);
+            sender.send("other 1", 1);
+            sender.send("other 2", 2);
+        }
+    }
+
+    public static class NoCleanUpRemoteProcess implements Action<WorkerProcessContext>, Serializable {
+        public void execute(WorkerProcessContext workerProcessContext) {
+            final Lock lock = new ReentrantLock();
+            lock.lock();
+            new Thread(new Runnable() {
+                public void run() {
+                    lock.lock();
+                }
+            }).start();
+
+            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(
+                    TestListenerInterface.class);
+            sender.send("message 1", 1);
+            sender.send("message 2", 2);
+        }
+    }
+
+    public static class PingRemoteProcess implements Action<WorkerProcessContext>, Serializable, TestListenerInterface {
+        CountDownLatch stopReceived;
+        int count;
+
+        public void send(String message, int count) {
+            assertEquals(this.count, count);
+            this.count++;
+            if (message.equals("stop")) {
+                assertEquals(4, this.count);
+                stopReceived.countDown();
+            }
+        }
+
+        public void execute(WorkerProcessContext workerProcessContext) {
+            stopReceived = new CountDownLatch(1);
+            workerProcessContext.getServerConnection().addIncoming(TestListenerInterface.class, this);
+            try {
+                stopReceived.await();
+            } catch (InterruptedException e) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
+
+    public static class CrashingRemoteProcess implements Action<WorkerProcessContext>, Serializable {
+        public void execute(WorkerProcessContext workerProcessContext) {
+            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(TestListenerInterface.class);
+            sender.send("message 1", 1);
+            sender.send("message 2", 2);
+            // crash
+            Runtime.getRuntime().halt(1);
+        }
+    }
+
+    public static class BrokenRemoteProcess implements Action<WorkerProcessContext>, Serializable {
+        public void execute(WorkerProcessContext workerProcessContext) {
+            throw new RuntimeException("broken");
+        }
+    }
+
+    public static class NoOpAction implements Action<WorkerProcessContext>, Serializable {
+        public void execute(WorkerProcessContext workerProcessContext) {
+        }
+    }
+
+    public static class NoConnectRemoteProcess implements Action<WorkerProcessContext>, Serializable {
+        private void readObject(ObjectInputStream instr) {
+            System.exit(0);
+        }
+        
+        public void execute(WorkerProcessContext workerProcessContext) {
+            throw new UnsupportedOperationException();
+        }
+    }
+    
+    public interface TestListenerInterface {
+        public void send(String message, int count);
+    }
+}
+
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy
new file mode 100644
index 0000000..8d5c838
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests
+
+import org.gradle.integtests.fixtures.ExecutionResult
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class WrapperProjectIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('wrapper-project')
+
+    @Test
+    public void wrapperSample() {
+        File wrapperSampleDir = sample.dir
+
+        executer.inDirectory(wrapperSampleDir).withTasks('wrapper').run()
+
+        ExecutionResult result = executer.usingExecutable('gradlew').inDirectory(wrapperSampleDir).withTasks('hello').run()
+        assertThat(result.output, containsString('hello'))
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractExecutionResult.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractExecutionResult.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractExecutionResult.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractExecutionResult.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractGradleExecuter.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractGradleExecuter.java
new file mode 100644
index 0000000..b6dd865
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractGradleExecuter.java
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.fixtures;
+
+import java.io.File;
+import java.util.*;
+
+public abstract class AbstractGradleExecuter implements GradleExecuter {
+    private final List<String> args = new ArrayList<String>();
+    private final List<String> tasks = new ArrayList<String>();
+    private File workingDir;
+    private boolean quiet;
+    private boolean taskList;
+    private boolean dependencyList;
+    private boolean searchUpwards;
+    private Map<String, String> environmentVars = new HashMap<String, String>();
+    private List<File> initScripts = new ArrayList<File>();
+    private String executable;
+    private File userHomeDir;
+    private File buildScript;
+    private File projectDir;
+    private String buildScriptText;
+    private File settingsFile;
+
+    public GradleExecuter reset() {
+        args.clear();
+        tasks.clear();
+        initScripts.clear();
+        workingDir = null;
+        projectDir = null;
+        buildScript = null;
+        buildScriptText = null;
+        settingsFile = null;
+        quiet = false;
+        taskList = false;
+        dependencyList = false;
+        searchUpwards = false;
+        executable = null;
+        userHomeDir = null;
+        environmentVars.clear();
+        return this;
+    }
+
+    public GradleExecuter inDirectory(File directory) {
+        workingDir = directory;
+        return this;
+    }
+
+    public File getWorkingDir() {
+        return workingDir;
+    }
+
+    protected void copyTo(GradleExecuter executer) {
+        if (workingDir != null) {
+            executer.inDirectory(workingDir);
+        }
+        if (projectDir != null) {
+            executer.usingProjectDirectory(projectDir);
+        }
+        if (buildScript != null) {
+            executer.usingBuildScript(buildScript);
+        }
+        if (buildScriptText != null) {
+            executer.usingBuildScript(buildScriptText);
+        }
+        if (settingsFile != null) {
+            executer.usingSettingsFile(settingsFile);
+        }
+        for (File initScript : initScripts) {
+            executer.usingInitScript(initScript);
+        }
+        executer.withTasks(tasks);
+        executer.withArguments(args);
+        executer.withEnvironmentVars(environmentVars);
+        executer.usingExecutable(executable);
+        if (quiet) {
+            executer.withQuietLogging();
+        }
+        if (taskList) {
+            executer.withTaskList();
+        }
+        if (dependencyList) {
+            executer.withDependencyList();
+        }
+        executer.withUserHomeDir(userHomeDir);
+    }
+
+    public GradleExecuter usingBuildScript(File buildScript) {
+        this.buildScript = buildScript;
+        return this;
+    }
+
+    public GradleExecuter usingBuildScript(String scriptText) {
+        this.buildScriptText = scriptText;
+        return this;
+    }
+
+    public GradleExecuter usingProjectDirectory(File projectDir) {
+        this.projectDir = projectDir;
+        return this;
+    }
+
+    public GradleExecuter usingSettingsFile(File settingsFile) {
+        this.settingsFile = settingsFile;
+        return this;
+    }
+
+    public GradleExecuter usingInitScript(File initScript) {
+        initScripts.add(initScript);
+        return this;
+    }
+
+    public File getUserHomeDir() {
+        return userHomeDir;
+    }
+
+    public GradleExecuter withUserHomeDir(File userHomeDir) {
+        this.userHomeDir = userHomeDir;
+        return this;
+    }
+
+    public GradleExecuter usingExecutable(String script) {
+        this.executable = script;
+        return this;
+    }
+
+    public String getExecutable() {
+        return executable;
+    }
+
+    public GradleExecuter withSearchUpwards() {
+        searchUpwards = true;
+        return this;
+    }
+
+    public boolean isQuiet() {
+        return quiet;
+    }
+
+    public GradleExecuter withQuietLogging() {
+        quiet = true;
+        return this;
+    }
+
+    public GradleExecuter withTaskList() {
+        taskList = true;
+        return this;
+    }
+
+    public GradleExecuter withDependencyList() {
+        dependencyList = true;
+        return this;
+    }
+
+    public GradleExecuter withArguments(String... args) {
+        return withArguments(Arrays.asList(args));
+    }
+
+    public GradleExecuter withArguments(List<String> args) {
+        this.args.clear();
+        this.args.addAll(args);
+        return this;
+    }
+
+    public GradleExecuter withEnvironmentVars(Map<String, ?> environment) {
+        environmentVars.clear();
+        for (Map.Entry<String, ?> entry : environment.entrySet()) {
+            environmentVars.put(entry.getKey(), entry.getValue().toString());
+        }
+        return this;
+    }
+
+    public Map<String, String> getEnvironmentVars() {
+        return environmentVars;
+    }
+
+    public GradleExecuter withTasks(String... names) {
+        return withTasks(Arrays.asList(names));
+    }
+
+    public GradleExecuter withTasks(List<String> names) {
+        tasks.clear();
+        tasks.addAll(names);
+        return this;
+    }
+
+    protected List<String> getAllArgs() {
+        List<String> allArgs = new ArrayList<String>();
+        if (buildScript != null) {
+            allArgs.add("--build-file");
+            allArgs.add(buildScript.getAbsolutePath());
+        }
+        if (buildScriptText != null) {
+            allArgs.add("--embedded");
+            allArgs.add(buildScriptText);
+        }
+        if (projectDir != null) {
+            allArgs.add("--project-dir");
+            allArgs.add(projectDir.getAbsolutePath());
+        }
+        for (File initScript : initScripts) {
+            allArgs.add("--init-script");
+            allArgs.add(initScript.getAbsolutePath());
+        }
+        if (settingsFile != null) {
+            allArgs.add("--settings-file");
+            allArgs.add(settingsFile.getAbsolutePath());
+        }
+        if (quiet) {
+            allArgs.add("--quiet");
+        }
+        if (taskList) {
+            allArgs.add("tasks");
+        }
+        if (dependencyList) {
+            allArgs.add("dependencies");
+        }
+        if (!searchUpwards) {
+            allArgs.add("--no-search-upward");
+        }
+        if (userHomeDir != null) {
+            args.add("--gradle-user-home");
+            args.add(userHomeDir.getAbsolutePath());
+        }
+        allArgs.addAll(args);
+        allArgs.addAll(tasks);
+        return allArgs;
+    }
+
+    public final ExecutionResult run() {
+        try {
+            return doRun();
+        } finally {
+            reset();
+        }
+    }
+
+    public final ExecutionFailure runWithFailure() {
+        try {
+            return doRunWithFailure();
+        } finally {
+            reset();
+        }
+    }
+
+    protected abstract ExecutionResult doRun();
+
+    protected abstract ExecutionFailure doRunWithFailure();
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ArtifactBuilder.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ArtifactBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ArtifactBuilder.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ArtifactBuilder.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/BasicGradleDistribution.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/BasicGradleDistribution.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/BasicGradleDistribution.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/BasicGradleDistribution.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/DaemonGradleExecuter.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/DaemonGradleExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/DaemonGradleExecuter.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/DaemonGradleExecuter.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionFailure.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionFailure.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionFailure.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionFailure.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionResult.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionResult.java
new file mode 100644
index 0000000..8b1a8c4
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionResult.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.fixtures;
+
+public interface ExecutionResult {
+    String getOutput();
+
+    String getError();
+
+    void assertOutputHasNoStackTraces();
+
+    void assertErrorHasNoStackTraces();
+
+    /**
+     * Asserts that exactly the given set of tasks have been executed in the given order. Note: ignores buildSrc tasks.
+     */
+    ExecutionResult assertTasksExecuted(String... taskPaths);
+
+    /**
+     * Asserts that exactly the given set of tasks have been skipped. Note: ignores buildSrc tasks.
+     */
+    ExecutionResult assertTasksSkipped(String... taskPaths);
+
+    /**
+     * Asserts that exactly the given set of tasks have not been skipped. Note: ignores buildSrc tasks.
+     */
+    ExecutionResult assertTasksNotSkipped(String... taskPaths);
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ForkingGradleExecuter.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ForkingGradleExecuter.java
new file mode 100644
index 0000000..c8669e3
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/ForkingGradleExecuter.java
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests.fixtures;
+
+import org.gradle.api.Action;
+import org.gradle.process.internal.ExecHandle;
+import org.gradle.process.internal.ExecHandleBuilder;
+import org.gradle.util.GUtil;
+import org.gradle.util.Jvm;
+import org.gradle.util.OperatingSystem;
+import org.gradle.util.TestFile;
+import org.hamcrest.Matcher;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+import java.util.*;
+import java.util.regex.Pattern;
+
+import static org.gradle.util.Matchers.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+public class ForkingGradleExecuter extends AbstractGradleExecuter {
+    private static final Logger LOG = LoggerFactory.getLogger(ForkingGradleExecuter.class);
+    private final TestFile gradleHomeDir;
+
+    public ForkingGradleExecuter(TestFile gradleHomeDir) {
+        this.gradleHomeDir = gradleHomeDir;
+    }
+
+    public TestFile getGradleHomeDir() {
+        return gradleHomeDir;
+    }
+
+    @Override
+    protected ExecutionResult doRun() {
+        Map result = doRun(false);
+        return new ForkedExecutionResult(result);
+    }
+
+    @Override
+    protected ExecutionFailure doRunWithFailure() {
+        Map result = doRun(true);
+        return new ForkedExecutionFailure(result);
+    }
+
+    protected Map doRun(boolean expectFailure) {
+        gradleHomeDir.assertIsDir();
+
+        CommandBuilder commandBuilder = OperatingSystem.current().isWindows() ? new WindowsCommandBuilder()
+                : new UnixCommandBuilder();
+
+        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+        ByteArrayOutputStream errStream = new ByteArrayOutputStream();
+
+        ExecHandleBuilder builder = new ExecHandleBuilder() {
+            @Override
+            public File getWorkingDir() {
+                // Override this, so that the working directory is not canonicalised. Some int tests require that
+                // the working directory is not canonicalised
+                return ForkingGradleExecuter.this.getWorkingDir();
+            }
+        };
+        builder.setStandardOutput(outStream);
+        builder.setErrorOutput(errStream);
+        builder.environment("GRADLE_HOME", "");
+        builder.environment("JAVA_HOME", Jvm.current().getJavaHome());
+        builder.environment("GRADLE_OPTS", "-ea");
+        builder.environment(getEnvironmentVars());
+        builder.workingDir(getWorkingDir());
+
+        commandBuilder.build(builder);
+
+        builder.args(getAllArgs());
+
+        LOG.info(String.format("Execute in %s with: %s %s", builder.getWorkingDir(), builder.getExecutable(),
+                builder.getArgs()));
+
+        ExecHandle proc = builder.build();
+        int exitValue = proc.start().waitForFinish().getExitValue();
+
+        String output = outStream.toString();
+        String error = errStream.toString();
+        boolean failed = exitValue != 0;
+
+        LOG.info("OUTPUT: " + output);
+        LOG.info("ERROR: " + error);
+
+        if (failed != expectFailure) {
+            String message = String.format("Gradle execution %s in %s with: %s %s%nOutput:%n%s%nError:%n%s%n-----%n",
+                    expectFailure ? "did not fail" : "failed", builder.getWorkingDir(), builder.getExecutable(),
+                    builder.getArgs(), output, error);
+            System.out.println(message);
+            throw new RuntimeException(message);
+        }
+        return GUtil.map("output", output, "error", error);
+    }
+
+    private interface CommandBuilder {
+        void build(ExecHandleBuilder builder);
+    }
+
+    private class WindowsCommandBuilder implements CommandBuilder {
+        public void build(ExecHandleBuilder builder) {
+            String cmd;
+            if (getExecutable() != null) {
+                cmd = getExecutable().replace('/', File.separatorChar);
+            } else {
+                cmd = "gradle";
+            }
+            builder.executable("cmd");
+            builder.args("/c", cmd);
+            String gradleHome = gradleHomeDir.getAbsolutePath();
+            builder.environment("Path", String.format("%s\\bin;%s", gradleHome, System.getenv("Path")));
+            builder.environment("GRADLE_EXIT_CONSOLE", "true");
+        }
+    }
+
+    private class UnixCommandBuilder implements CommandBuilder {
+        public void build(ExecHandleBuilder builder) {
+            if (getExecutable() != null) {
+                builder.executable(String.format("%s/%s", getWorkingDir().getAbsolutePath(), getExecutable()));
+            } else {
+                builder.executable(String.format("%s/bin/gradle", gradleHomeDir.getAbsolutePath()));
+            }
+        }
+    }
+
+    private static class ForkedExecutionResult extends AbstractExecutionResult {
+        private final Map result;
+        private final Pattern skippedTaskPattern = Pattern.compile("(:\\S+?(:\\S+?)*)\\s+((SKIPPED)|(UP-TO-DATE))");
+        private final Pattern notSkippedTaskPattern = Pattern.compile("(:\\S+?(:\\S+?)*)");
+        private final Pattern taskPattern = Pattern.compile("(:\\S+?(:\\S+?)*)(\\s+.+)?");
+
+        public ForkedExecutionResult(Map result) {
+            this.result = result;
+        }
+
+        public String getOutput() {
+            return result.get("output").toString();
+        }
+
+        public String getError() {
+            return result.get("error").toString();
+        }
+
+        public ExecutionResult assertTasksExecuted(String... taskPaths) {
+            List<String> tasks = grepTasks(taskPattern);
+            List<String> expectedTasks = Arrays.asList(taskPaths);
+            assertThat(String.format("Expected tasks %s not found in process output:%n%s", expectedTasks, getOutput()), tasks, equalTo(expectedTasks));
+            return this;
+        }
+
+        public ExecutionResult assertTasksSkipped(String... taskPaths) {
+            Set<String> tasks = new HashSet<String>(grepTasks(skippedTaskPattern));
+            Set<String> expectedTasks = new HashSet<String>(Arrays.asList(taskPaths));
+            assertThat(String.format("Expected skipped tasks %s not found in process output:%n%s", expectedTasks, getOutput()), tasks, equalTo(expectedTasks));
+            return this;
+        }
+
+        public ExecutionResult assertTasksNotSkipped(String... taskPaths) {
+            Set<String> tasks = new HashSet<String>(grepTasks(notSkippedTaskPattern));
+            Set<String> expectedTasks = new HashSet<String>(Arrays.asList(taskPaths));
+            assertThat(String.format("Expected executed tasks %s not found in process output:%n%s", expectedTasks, getOutput()), tasks, equalTo(expectedTasks));
+            return this;
+        }
+
+        private List<String> grepTasks(final Pattern pattern) {
+            final List<String> tasks = new ArrayList<String>();
+
+            eachLine(new Action<String>() {
+                public void execute(String s) {
+                    java.util.regex.Matcher matcher = pattern.matcher(s);
+                    if (matcher.matches()) {
+                        String taskName = matcher.group(1);
+                        if (!taskName.startsWith(":buildSrc:")) {
+                            tasks.add(taskName);
+                        }
+                    }
+                }
+            });
+
+            return tasks;
+        }
+
+        private void eachLine(Action<String> action) {
+            BufferedReader reader = new BufferedReader(new StringReader(getOutput()));
+            String line;
+            try {
+                while ((line = reader.readLine()) != null) {
+                    action.execute(line);
+                }
+            } catch (IOException e) {
+                throw new RuntimeException(e);
+            }
+        }
+    }
+
+    private static class ForkedExecutionFailure extends ForkedExecutionResult implements ExecutionFailure {
+        public ForkedExecutionFailure(Map result) {
+            super(result);
+        }
+
+        public ExecutionFailure assertHasLineNumber(int lineNumber) {
+            assertThat(getError(), containsString(String.format(" line: %d", lineNumber)));
+            return this;
+        }
+
+        public ExecutionFailure assertHasFileName(String filename) {
+            assertThat(getError(), containsLine(startsWith(filename)));
+            return this;
+        }
+
+        public ExecutionFailure assertHasCause(String description) {
+            assertThatCause(startsWith(description));
+            return this;
+        }
+
+        public ExecutionFailure assertThatCause(Matcher<String> matcher) {
+            Pattern causePattern = Pattern.compile("(?m)^Cause: ");
+            String error = getError();
+            java.util.regex.Matcher regExpMatcher = causePattern.matcher(error);
+            int pos = 0;
+            while (pos < error.length()) {
+                if (!regExpMatcher.find(pos)) {
+                    break;
+                }
+                int start = regExpMatcher.end();
+                String cause;
+                if (regExpMatcher.find(start)) {
+                    cause = error.substring(start, regExpMatcher.start());
+                    pos = regExpMatcher.start();
+                } else {
+                    cause = error.substring(start);
+                    pos = error.length();
+                }
+                if (matcher.matches(cause)) {
+                    return this;
+                }
+            }
+            fail(String.format("No matching cause found in '%s'", error));
+            return this;
+        }
+
+        public ExecutionFailure assertHasDescription(String context) {
+            assertThatDescription(startsWith(context));
+            return this;
+        }
+
+        public ExecutionFailure assertThatDescription(Matcher<String> matcher) {
+            assertThat(getError(), containsLine(matcher));
+            return this;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleBackedArtifactBuilder.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleBackedArtifactBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleBackedArtifactBuilder.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleBackedArtifactBuilder.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistribution.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistribution.java
new file mode 100644
index 0000000..f97a96b
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistribution.java
@@ -0,0 +1,179 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests.fixtures;
+
+import org.gradle.util.*;
+import org.junit.rules.MethodRule;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+
+import java.io.File;
+
+/**
+ * Provides access to a Gradle distribution for integration testing.
+ */
+public class GradleDistribution implements MethodRule, TestFileContext, BasicGradleDistribution {
+    private static final TestFile USER_HOME_DIR;
+    private static final TestFile GRADLE_HOME_DIR;
+    private static final TestFile SAMPLES_DIR;
+    private static final TestFile USER_GUIDE_OUTPUT_DIR;
+    private static final TestFile USER_GUIDE_INFO_DIR;
+    private static final TestFile DISTS_DIR;
+    private static final TestFile LIBS_REPO;
+    private final TemporaryFolder temporaryFolder = new TemporaryFolder();
+    private TestFile userHome;
+
+    static {
+        String workerId = System.getProperty("org.gradle.test.worker", "1");
+        USER_HOME_DIR = file("integTest.gradleUserHomeDir", "intTestHomeDir").file(String.format("worker-%s", workerId));
+        GRADLE_HOME_DIR = file("integTest.gradleHomeDir", null);
+        SAMPLES_DIR = file("integTest.samplesdir", new File(GRADLE_HOME_DIR, "samples").getAbsolutePath());
+        USER_GUIDE_OUTPUT_DIR = file("integTest.userGuideOutputDir",
+                "subprojects/docs/src/samples/userguideOutput");
+        USER_GUIDE_INFO_DIR = file("integTest.userGuideInfoDir", "subprojects/docs/build/src");
+        DISTS_DIR = file("integTest.distsDir", "build/distributions");
+        LIBS_REPO = file("integTest.libsRepo", "build/repo");
+    }
+
+    public GradleDistribution() {
+        this.userHome = USER_HOME_DIR;
+    }
+
+    @Override
+    public String toString() {
+        return String.format("Gradle %s", new GradleVersion().getVersion());
+    }
+
+    public boolean worksWith(Jvm jvm) {
+        return jvm.isJava5Compatible();
+    }
+
+    public void requireOwnUserHomeDir() {
+        userHome = getTestDir().file("user-home");
+    }
+
+    public Statement apply(Statement base, FrameworkMethod method, Object target) {
+        return temporaryFolder.apply(base, method, target);
+    }
+
+    private static TestFile file(String propertyName, String defaultFile) {
+        String path = System.getProperty(propertyName, defaultFile);
+        if (path == null) {
+            throw new RuntimeException(String.format("You must set the '%s' property to run the integration tests.",
+                    propertyName));
+        }
+        return new TestFile(new File(path));
+    }
+
+    /**
+     * The user home dir used for the current test. This is usually shared with other tests unless
+     * {@link #requireOwnUserHomeDir()} is called.
+     */
+    public TestFile getUserHomeDir() {
+        return userHome;
+    }
+
+    /**
+     * The distribution for the current test. This is usually shared with other tests.
+     */
+    public TestFile getGradleHomeDir() {
+        return GRADLE_HOME_DIR;
+    }
+
+    public String getVersion() {
+        return new GradleVersion().getVersion();
+    }
+
+    public TestFile getBinDistribution() {
+        return getDistributionsDir().file(String.format("gradle-%s-bin.zip", getVersion()));
+    }
+
+    /**
+     * The samples from the distribution. These are usually shared with other tests.
+     */
+    public TestFile getSamplesDir() {
+        return SAMPLES_DIR;
+    }
+
+    public TestFile getUserGuideInfoDir() {
+        return USER_GUIDE_INFO_DIR;
+    }
+
+    public TestFile getUserGuideOutputDir() {
+        return USER_GUIDE_OUTPUT_DIR;
+    }
+
+    /**
+     * The directory containing the distribution Zips
+     */
+    public TestFile getDistributionsDir() {
+        return DISTS_DIR;
+    }
+
+    public TestFile getLibsRepo() {
+        return LIBS_REPO;
+    }
+
+    /**
+     * Returns true if the given file is either part of the distributions, samples, or test files.
+     */
+    public boolean isFileUnderTest(File file) {
+        return GRADLE_HOME_DIR.isSelfOrDescendent(file)
+                || SAMPLES_DIR.isSelfOrDescendent(file)
+                || getTestDir().isSelfOrDescendent(file)
+                || getUserHomeDir().isSelfOrDescendent(file);
+    }
+
+    /**
+     * Returns a scratch-pad directory for the current test. This directory is not shared with any other tests.
+     */
+    public TestFile getTestDir() {
+        return temporaryFolder.getDir();
+    }
+
+    public TemporaryFolder getTemporaryFolder() {
+        return temporaryFolder;
+    }
+
+    /**
+     * Returns a previous version of Gradle.
+     *
+     * @param version The Gradle version
+     * @return An executer
+     */
+    public BasicGradleDistribution previousVersion(String version) {
+        return new PreviousGradleVersionExecuter(this, version);
+    }
+
+    public GradleExecuter executer() {
+        return new GradleDistributionExecuter(this);
+    }
+
+    /**
+     * Returns a scratch-pad file for the current test. Equivalent to getTestDir().file(path)
+     */
+    public TestFile file(Object... path) {
+        return getTestDir().file(path);
+    }
+
+    /**
+     * Returns a scratch-pad file for the current test. Equivalent to getTestDir().file(path)
+     */
+    public TestFile testFile(Object... path) {
+        return getTestDir().file(path);
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistributionExecuter.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistributionExecuter.java
new file mode 100644
index 0000000..3e0be13
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistributionExecuter.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.fixtures;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.util.TestFile;
+import org.junit.rules.MethodRule;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+
+import java.io.File;
+
+/**
+ * A Junit rule which provides a {@link GradleExecuter} implementation that executes Gradle using a given {@link
+ * GradleDistribution}. If not supplied in the constructor, this rule locates a field on the test object with type
+ * {@link GradleDistribution}.
+ *
+ * By default, this executer will execute Gradle in a forked process. There is a system property which enables executing
+ * Gradle in the current process.
+ */
+public class GradleDistributionExecuter extends AbstractGradleExecuter implements MethodRule {
+    private static final String IGNORE_SYS_PROP = "org.gradle.integtest.ignore";
+    private static final String EXECUTER_SYS_PROP = "org.gradle.integtest.executer";
+    private static final Executer EXECUTER;
+    private GradleDistribution dist;
+    private boolean workingDirSet;
+    private boolean userHomeSet;
+
+    private enum Executer {
+        forking, embedded, daemon
+    }
+
+    static {
+        EXECUTER = Executer.valueOf(System.getProperty(EXECUTER_SYS_PROP, Executer.forking.toString()).toLowerCase());
+    }
+
+    public GradleDistributionExecuter(GradleDistribution dist) {
+        this.dist = dist;
+        reset();
+    }
+
+    public GradleDistributionExecuter() {
+    }
+
+    public Statement apply(Statement base, final FrameworkMethod method, Object target) {
+        if (System.getProperty(IGNORE_SYS_PROP) != null) {
+            return new Statement() {
+                @Override
+                public void evaluate() throws Throwable {
+                    System.out.println(String.format("Skipping test '%s'", method.getName()));
+                }
+            };
+        }
+
+        if (dist == null) {
+            dist = RuleHelper.getField(target, GradleDistribution.class);
+        }
+        reset();
+        return base;
+    }
+
+    @Override
+    public GradleExecuter reset() {
+        super.reset();
+        workingDirSet = false;
+        userHomeSet = false;
+        return this;
+    }
+
+    @Override
+    public GradleExecuter inDirectory(File directory) {
+        super.inDirectory(directory);
+        workingDirSet = true;
+        return this;
+    }
+
+    @Override
+    public GradleExecuter withUserHomeDir(File userHomeDir) {
+        super.withUserHomeDir(userHomeDir);
+        userHomeSet = true;
+        return this;
+    }
+
+    @Override
+    protected ExecutionResult doRun() {
+        return checkResult(configureExecuter().run());
+    }
+
+    @Override
+    protected ExecutionFailure doRunWithFailure() {
+        return checkResult(configureExecuter().runWithFailure());
+    }
+
+    private <T extends ExecutionResult> T checkResult(T result) {
+        result.assertOutputHasNoStackTraces();
+        result.assertErrorHasNoStackTraces();
+        return result;
+    }
+
+    private GradleExecuter configureExecuter() {
+        if (!workingDirSet) {
+            inDirectory(dist.getTestDir());
+        }
+        if (!userHomeSet) {
+            withUserHomeDir(dist.getUserHomeDir());
+        }
+
+        if (!getClass().desiredAssertionStatus()) {
+            throw new RuntimeException("Assertions must be enabled when running integration tests.");
+        }
+
+        StartParameter parameter = new StartParameter();
+        parameter.setLogLevel(LogLevel.INFO);
+        parameter.setSearchUpwards(false);
+
+        InProcessGradleExecuter inProcessGradleExecuter = new InProcessGradleExecuter(parameter);
+        copyTo(inProcessGradleExecuter);
+
+        GradleExecuter returnedExecuter = inProcessGradleExecuter;
+
+        if (EXECUTER != Executer.embedded || !inProcessGradleExecuter.canExecute()) {
+            boolean useDaemon = EXECUTER == Executer.daemon && getExecutable() == null;
+            ForkingGradleExecuter forkingGradleExecuter = useDaemon ? new DaemonGradleExecuter(dist.getGradleHomeDir()) : new ForkingGradleExecuter(dist.getGradleHomeDir());
+            copyTo(forkingGradleExecuter);
+            returnedExecuter = forkingGradleExecuter;
+        }
+
+        boolean settingsFound = false;
+        for (
+                File dir = new TestFile(getWorkingDir()); dir != null && dist.isFileUnderTest(dir) && !settingsFound;
+                dir = dir.getParentFile()) {
+            if (new File(dir, "settings.gradle").isFile()) {
+                settingsFound = true;
+            }
+        }
+        if (settingsFound) {
+            returnedExecuter.withSearchUpwards();
+        }
+
+        return returnedExecuter;
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleExecuter.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleExecuter.java
new file mode 100644
index 0000000..6826368
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleExecuter.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.fixtures;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
+public interface GradleExecuter {
+    GradleExecuter inDirectory(File directory);
+
+    /**
+     * Enables search upwards. Defaults to false.
+     */
+    GradleExecuter withSearchUpwards();
+
+    /**
+     * Sets the task names to execute. Defaults to an empty list.
+     */
+    GradleExecuter withTasks(String... names);
+
+    /**
+     * Sets the task names to execute. Defaults to an empty list.
+     */
+    GradleExecuter withTasks(List<String> names);
+
+    GradleExecuter withTaskList();
+
+    GradleExecuter withDependencyList();
+
+    GradleExecuter withQuietLogging();
+
+    /**
+     * Sets the additional command-line arguments to use when executing the build. Defaults to an empty list.
+     */
+    GradleExecuter withArguments(String... args);
+
+    /**
+     * Sets the additional command-line arguments to use when executing the build. Defaults to an empty list.
+     */
+    GradleExecuter withArguments(List<String> args);
+
+    /**
+     * Sets the environment variables to use when executing the build. Defaults to the environment of this process.
+     */
+    GradleExecuter withEnvironmentVars(Map<String, ?> environment);
+
+    GradleExecuter usingSettingsFile(File settingsFile);
+
+    GradleExecuter usingInitScript(File initScript);
+
+    /**
+     * Uses the given project directory
+     */
+    GradleExecuter usingProjectDirectory(File projectDir);
+
+    /**
+     * Uses the given build script
+     */
+    GradleExecuter usingBuildScript(File buildScript);
+
+    /**
+     * Uses the given build script
+     *
+     * @param scriptText The script text.
+     */
+    GradleExecuter usingBuildScript(String scriptText);
+
+    /**
+     * Sets the user home dir. Set to null to use the default user home dir.
+     */
+    GradleExecuter withUserHomeDir(File userHomeDir);
+
+    /**
+     * Sets the executable to use. Set to null to use the default executable (if any)
+     */
+    GradleExecuter usingExecutable(String script);
+
+    /**
+     * Executes the requested build, asserting that the build succeeds. Resets the configuration of this executer.
+     *
+     * @return The result.
+     */
+    ExecutionResult run();
+
+    /**
+     * Executes the requested build, asserting that the build fails. Resets the configuration of this executer.
+     *
+     * @return The result.
+     */
+    ExecutionFailure runWithFailure();
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/HttpServer.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/HttpServer.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/HttpServer.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/HttpServer.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/InProcessGradleExecuter.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/InProcessGradleExecuter.java
new file mode 100644
index 0000000..c6c7481
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/InProcessGradleExecuter.java
@@ -0,0 +1,353 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests.fixtures;
+
+import junit.framework.AssertionFailedError;
+import org.gradle.BuildResult;
+import org.gradle.GradleLauncher;
+import org.gradle.StartParameter;
+import org.gradle.api.GradleException;
+import org.gradle.api.LocationAwareException;
+import org.gradle.api.Task;
+import org.gradle.api.execution.TaskExecutionGraph;
+import org.gradle.api.execution.TaskExecutionGraphListener;
+import org.gradle.api.execution.TaskExecutionListener;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.StandardOutputListener;
+import org.gradle.api.tasks.TaskState;
+import org.gradle.initialization.CommandLineParser;
+import org.gradle.initialization.DefaultCommandLineConverter;
+import org.gradle.initialization.DefaultGradleLauncherFactory;
+import org.hamcrest.Matcher;
+
+import java.io.File;
+import java.io.StringWriter;
+import java.util.*;
+
+import static org.gradle.util.Matchers.*;
+import static org.gradle.util.WrapUtil.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+public class InProcessGradleExecuter extends AbstractGradleExecuter {
+    private StartParameter parameter;
+
+    public InProcessGradleExecuter(StartParameter parameter) {
+        this.parameter = parameter;
+    }
+
+    @Override
+    public GradleExecuter reset() {
+        super.reset();
+        parameter = new StartParameter();
+        return this;
+    }
+
+    public StartParameter getParameter() {
+        return parameter;
+    }
+
+    @Override
+    public GradleExecuter inDirectory(File directory) {
+        parameter.setCurrentDir(directory);
+        return this;
+    }
+
+    @Override
+    public InProcessGradleExecuter withSearchUpwards() {
+        parameter.setSearchUpwards(true);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter withTasks(List<String> names) {
+        parameter.setTaskNames(names);
+        return this;
+    }
+
+    @Override
+    public InProcessGradleExecuter withTaskList() {
+        parameter.setTaskNames(toList("tasks"));
+        return this;
+    }
+
+    @Override
+    public InProcessGradleExecuter withDependencyList() {
+        parameter.setTaskNames(toList("dependencies"));
+        return this;
+    }
+
+    @Override
+    public InProcessGradleExecuter usingSettingsFile(File settingsFile) {
+        parameter.setSettingsFile(settingsFile);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter usingInitScript(File initScript) {
+        parameter.addInitScript(initScript);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter usingProjectDirectory(File projectDir) {
+        parameter.setProjectDir(projectDir);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter usingBuildScript(File buildScript) {
+        parameter.setBuildFile(buildScript);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter usingBuildScript(String scriptText) {
+        parameter.useEmbeddedBuildFile(scriptText);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter withArguments(List<String> args) {
+        CommandLineParser parser = new CommandLineParser();
+        DefaultCommandLineConverter converter = new DefaultCommandLineConverter();
+        converter.configure(parser);
+        converter.convert(parser.parse(args), parameter);
+        return this;
+    }
+
+    @Override
+    public GradleExecuter withUserHomeDir(File userHomeDir) {
+        parameter.setGradleUserHomeDir(userHomeDir);
+        return this;
+    }
+
+    @Override
+    protected ExecutionResult doRun() {
+        OutputListenerImpl outputListener = new OutputListenerImpl();
+        OutputListenerImpl errorListener = new OutputListenerImpl();
+        BuildListenerImpl buildListener = new BuildListenerImpl();
+        BuildResult result = doRun(outputListener, errorListener, buildListener);
+        result.rethrowFailure();
+        return new InProcessExecutionResult(buildListener.executedTasks, buildListener.skippedTasks,
+                outputListener.toString(), errorListener.toString());
+    }
+
+    @Override
+    protected ExecutionFailure doRunWithFailure() {
+        OutputListenerImpl outputListener = new OutputListenerImpl();
+        OutputListenerImpl errorListener = new OutputListenerImpl();
+        BuildListenerImpl buildListener = new BuildListenerImpl();
+        try {
+            doRun(outputListener, errorListener, buildListener).rethrowFailure();
+            throw new AssertionFailedError("expected build to fail but it did not.");
+        } catch (GradleException e) {
+            return new InProcessExecutionFailure(buildListener.executedTasks, buildListener.skippedTasks,
+                    outputListener.writer.toString(), errorListener.writer.toString(), e);
+        }
+    }
+
+    private BuildResult doRun(final OutputListenerImpl outputListener, OutputListenerImpl errorListener,
+                              BuildListenerImpl listener) {
+        assertCanExecute();
+        if (isQuiet()) {
+            parameter.setLogLevel(LogLevel.QUIET);
+        }
+        DefaultGradleLauncherFactory factory = (DefaultGradleLauncherFactory) GradleLauncher.getFactory();
+        factory.addListener(listener);
+        GradleLauncher gradleLauncher = GradleLauncher.newInstance(parameter);
+        gradleLauncher.addStandardOutputListener(outputListener);
+        gradleLauncher.addStandardErrorListener(errorListener);
+        try {
+            return gradleLauncher.run();
+        } finally {
+            System.clearProperty("test.single");
+            factory.removeListener(listener);
+        }
+    }
+
+    public void assertCanExecute() {
+        assertNull(getExecutable());
+        assertTrue(getEnvironmentVars().isEmpty());
+    }
+
+    public boolean canExecute() {
+        try {
+            assertCanExecute();
+        } catch (AssertionError e) {
+            return false;
+        }
+        return true;
+    }
+
+    private static class BuildListenerImpl implements TaskExecutionGraphListener {
+        private final List<String> executedTasks = new ArrayList<String>();
+        private final Set<String> skippedTasks = new HashSet<String>();
+
+        public void graphPopulated(TaskExecutionGraph graph) {
+            List<Task> planned = new ArrayList<Task>(graph.getAllTasks());
+            graph.addTaskExecutionListener(new TaskListenerImpl(planned, executedTasks, skippedTasks));
+        }
+    }
+
+    private static class OutputListenerImpl implements StandardOutputListener {
+        private StringWriter writer = new StringWriter();
+
+        @Override
+        public String toString() {
+            return writer.toString();
+        }
+
+        public void onOutput(CharSequence output) {
+            writer.append(output);
+        }
+    }
+
+    private static class TaskListenerImpl implements TaskExecutionListener {
+        private final List<Task> planned;
+        private final List<String> executedTasks;
+        private final Set<String> skippedTasks;
+        private Task current;
+
+        public TaskListenerImpl(List<Task> planned, List<String> executedTasks, Set<String> skippedTasks) {
+            this.planned = planned;
+            this.executedTasks = executedTasks;
+            this.skippedTasks = skippedTasks;
+        }
+
+        public void beforeExecute(Task task) {
+            assertThat(current, nullValue());
+            assertTrue(planned.contains(task));
+            current = task;
+
+            String taskPath = path(task);
+            if (taskPath.startsWith(":buildSrc:")) {
+                return;
+            }
+
+            executedTasks.add(taskPath);
+        }
+
+        public void afterExecute(Task task, TaskState state) {
+            assertThat(task, sameInstance(current));
+            current = null;
+
+            String taskPath = path(task);
+            if (taskPath.startsWith(":buildSrc:")) {
+                return;
+            }
+
+            if (state.getSkipped()) {
+                skippedTasks.add(taskPath);
+            }
+        }
+
+        private String path(Task task) {
+            return task.getProject().getGradle().getParent() == null ? task.getPath() : ":" + task.getProject().getRootProject().getName() + task.getPath();
+        }
+    }
+
+    public static class InProcessExecutionResult extends AbstractExecutionResult {
+        private final List<String> plannedTasks;
+        private final Set<String> skippedTasks;
+        private final String output;
+        private final String error;
+
+        public InProcessExecutionResult(List<String> plannedTasks, Set<String> skippedTasks, String output,
+                                        String error) {
+            this.plannedTasks = plannedTasks;
+            this.skippedTasks = skippedTasks;
+            this.output = output;
+            this.error = error;
+        }
+
+        public String getOutput() {
+            return output;
+        }
+
+        public String getError() {
+            return error;
+        }
+
+        public ExecutionResult assertTasksExecuted(String... taskPaths) {
+            List<String> expected = Arrays.asList(taskPaths);
+            assertThat(plannedTasks, equalTo(expected));
+            return this;
+        }
+
+        public ExecutionResult assertTasksSkipped(String... taskPaths) {
+            Set<String> expected = new HashSet<String>(Arrays.asList(taskPaths));
+            assertThat(skippedTasks, equalTo(expected));
+            return this;
+        }
+
+        public ExecutionResult assertTasksNotSkipped(String... taskPaths) {
+            Set<String> expected = new HashSet<String>(Arrays.asList(taskPaths));
+            Set<String> notSkipped = new HashSet<String>(plannedTasks);
+            notSkipped.removeAll(skippedTasks);
+            assertThat(notSkipped, equalTo(expected));
+            return this;
+        }
+    }
+
+    private static class InProcessExecutionFailure extends InProcessExecutionResult implements ExecutionFailure {
+        private final GradleException failure;
+
+        public InProcessExecutionFailure(List<String> tasks, Set<String> skippedTasks, String output, String error,
+                                         GradleException failure) {
+            super(tasks, skippedTasks, output, error);
+            this.failure = failure;
+        }
+
+        public ExecutionFailure assertHasLineNumber(int lineNumber) {
+            assertThat(failure.getMessage(), containsString(String.format(" line: %d", lineNumber)));
+            return this;
+
+        }
+
+        public ExecutionFailure assertHasFileName(String filename) {
+            assertThat(failure.getMessage(), startsWith(String.format("%s", filename)));
+            return this;
+        }
+
+        public ExecutionFailure assertHasCause(String description) {
+            assertThatCause(startsWith(description));
+            return this;
+        }
+
+        public ExecutionFailure assertThatCause(final Matcher<String> matcher) {
+            if (failure instanceof LocationAwareException) {
+                LocationAwareException exception = (LocationAwareException) failure;
+                assertThat(exception.getReportableCauses(), hasItem(hasMessage(matcher)));
+            } else {
+                assertThat(failure.getCause(), notNullValue());
+                assertThat(failure.getCause().getMessage(), matcher);
+            }
+            return this;
+        }
+
+        public ExecutionFailure assertHasDescription(String context) {
+            assertThatDescription(startsWith(context));
+            return this;
+        }
+
+        public ExecutionFailure assertThatDescription(Matcher<String> matcher) {
+            assertThat(failure.getMessage(), containsLine(matcher));
+            return this;
+        }
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/PreviousGradleVersionExecuter.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/PreviousGradleVersionExecuter.groovy
new file mode 100644
index 0000000..8908046
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/PreviousGradleVersionExecuter.groovy
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.fixtures
+
+import org.gradle.util.Jvm
+import org.gradle.util.TestFile
+import org.gradle.util.GradleVersion
+import org.gradle.api.tasks.wrapper.internal.DistributionLocator
+
+public class PreviousGradleVersionExecuter extends AbstractGradleExecuter implements BasicGradleDistribution {
+    private final GradleDistribution dist
+    def final GradleVersion version
+
+    PreviousGradleVersionExecuter(GradleDistribution dist, String version) {
+        this.dist = dist
+        this.version = new GradleVersion(version)
+    }
+
+    def String toString() {
+        version.toString()
+    }
+
+    String getVersion() {
+        return version.version
+    }
+
+    boolean worksWith(Jvm jvm) {
+        return version == new GradleVersion('0.9-rc-1') ? jvm.isJava6Compatible() : jvm.isJava5Compatible()
+    }
+
+    protected ExecutionResult doRun() {
+        ForkingGradleExecuter executer = new ForkingGradleExecuter(gradleHomeDir)
+        executer.inDirectory(dist.testDir)
+        copyTo(executer)
+        return executer.run()
+    }
+
+    GradleExecuter executer() {
+        this
+    }
+
+    TestFile getBinDistribution() {
+        def zipFile = dist.userHomeDir.parentFile.file("gradle-$version.version-bin.zip")
+        if (!zipFile.isFile()) {
+            try {
+                URL url = binDistributionUrl
+                System.out.println("downloading $url");
+                zipFile.copyFrom(url)
+            } catch (Throwable t) {
+                zipFile.delete()
+                throw t
+            }
+        }
+        return zipFile
+    }
+
+    private URL getBinDistributionUrl() {
+        return new URL(new DistributionLocator().getDistributionFor(version))
+    }
+
+    def TestFile getGradleHomeDir() {
+        return findGradleHome()
+    }
+
+    private TestFile findGradleHome() {
+        // maybe download and unzip distribution
+        TestFile versionsDir = dist.distributionsDir.parentFile.file('previousVersions')
+        TestFile gradleHome = versionsDir.file("gradle-$version.version")
+        TestFile markerFile = gradleHome.file('ok.txt')
+        if (!markerFile.isFile()) {
+            TestFile zipFile = binDistribution
+            zipFile.usingNativeTools().unzipTo(versionsDir)
+            markerFile.touch()
+        }
+        return gradleHome
+    }
+
+    protected ExecutionFailure doRunWithFailure() {
+        throw new UnsupportedOperationException();
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/RuleHelper.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/RuleHelper.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/RuleHelper.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/RuleHelper.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/Sample.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/Sample.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/Sample.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/Sample.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/TestClassExecutionResult.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/TestClassExecutionResult.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/TestClassExecutionResult.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/TestClassExecutionResult.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/TestExecutionResult.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/TestExecutionResult.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/TestExecutionResult.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/TestExecutionResult.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/TestResources.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/TestResources.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/TestResources.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/TestResources.java
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/UsesSample.java b/subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/UsesSample.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/UsesSample.java
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/fixtures/UsesSample.java
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenProjectIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenProjectIntegrationTest.groovy
new file mode 100644
index 0000000..e8391c6
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenProjectIntegrationTest.groovy
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.maven
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.TestResources
+
+class MavenProjectIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final TestResources testResources = new TestResources()
+
+    @Test
+    public void handlesSubProjectsWithoutTheMavenPluginApplied() {
+        dist.testFile("settings.gradle").write("include 'subProject'");
+        dist.testFile("build.gradle") << '''
+            apply plugin: 'java'
+            apply plugin: 'maven'
+        '''
+        executer.withTaskList().run();
+    }
+
+    @Test
+    public void canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration() {
+        executer.withTasks('uploadArchives').run()
+        def module = repo().module('group', 'root', 1.0)
+        module.assertArtifactsDeployed('root-1.0.jar')
+    }
+
+    @Test
+    public void canDeployAProjectWithNoMainArtifact() {
+        executer.withTasks('uploadArchives').run()
+        def module = repo().module('group', 'root', 1.0)
+        module.assertArtifactsDeployed('root-1.0-source.jar')
+    }
+
+    @Test
+    public void canDeployAProjectWithMetadataArtifacts() {
+        executer.withTasks('uploadArchives').run()
+        def module = repo().module('group', 'root', 1.0)
+        module.assertArtifactsDeployed('root-1.0.jar', 'root-1.0.jar.sig', 'root-1.0.pom', 'root-1.0.pom.sig')
+    }
+
+    def MavenRepository repo() {
+        new MavenRepository(dist.testFile('mavenRepo'))
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepoIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepoIntegrationTest.groovy
new file mode 100644
index 0000000..b39c744
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepoIntegrationTest.groovy
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+package org.gradle.integtests.maven
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.TestFile
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class MavenRepoIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('mavenRepo')
+
+    @Test
+    public void mavenRepoSample() {
+        List expectedFiles = ['sillyexceptions-1.0.1.jar', 'repotest-1.0.jar', 'testdep-1.0.jar', 'testdep2-1.0.jar',
+                'classifier-1.0-jdk15.jar', 'classifier-dep-1.0.jar', 'jaronly-1.0.jar']
+
+        File projectDir = sample.dir
+        executer.inDirectory(projectDir).withTasks('retrieve').run()
+        expectedFiles.each { new TestFile(projectDir, 'build', it).assertExists() }
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepository.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepository.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepository.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepository.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenSnapshotIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenSnapshotIntegrationTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenSnapshotIntegrationTest.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/MavenSnapshotIntegrationTest.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenPomGenerationIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenPomGenerationIntegrationTest.groovy
new file mode 100644
index 0000000..454dd0e
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenPomGenerationIntegrationTest.groovy
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.maven
+
+import groovy.text.SimpleTemplateEngine
+import org.custommonkey.xmlunit.Diff
+import org.custommonkey.xmlunit.XMLAssert
+import org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.util.Resources
+import org.gradle.util.TestFile
+import org.hamcrest.Matchers
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.junit.Assert.*
+import org.gradle.integtests.fixtures.Sample
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesMavenPomGenerationIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+
+    private TestFile pomProjectDir
+    private TestFile repoDir
+    private TestFile snapshotRepoDir
+
+    @Rule public Resources resources = new Resources();
+    @Rule public final Sample sample = new Sample('maven/pomGeneration')
+
+    @Before
+    public void setUp() {
+        pomProjectDir = sample.dir
+        repoDir = pomProjectDir.file('pomRepo');
+        snapshotRepoDir = pomProjectDir.file('snapshotRepo');
+    }
+    
+    @Test
+    public void checkWithNoCustomVersion() {
+        String version = '1.0'
+        String groupId = "gradle"
+        long start = System.currentTimeMillis();
+        executer.inDirectory(pomProjectDir).withTasks('clean', 'uploadArchives', 'install').run()
+        String repoPath = repoPath(groupId, version)
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId),
+                pomFile(repoDir, repoPath, version).text)
+        repoDir.file("$repoPath/mywar-${version}.war").assertIsCopyOf(pomProjectDir.file("target/libs/mywar-${version}.war"))
+        pomProjectDir.file('build').assertDoesNotExist()
+        pomProjectDir.file('target').assertIsDir()
+        checkInstall(start, pomProjectDir, version, groupId)
+    }
+
+    @Test
+    public void checkWithCustomVersion() {
+        long start = System.currentTimeMillis();
+        String version = "1.0MVN"
+        String groupId = "deployGroup"
+        executer.inDirectory(pomProjectDir).withArguments("-PcustomVersion=${version}").withTasks('clean', 'uploadArchives', 'install').run()
+        String repoPath = repoPath(groupId, version)
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId),
+                pomFile(repoDir, repoPath, version).text)
+        repoDir.file("$repoPath/mywar-${version}.war").assertIsCopyOf(pomProjectDir.file("target/libs/mywar-1.0.war"))
+        repoDir.file("$repoPath/mywar-${version}-javadoc.zip").assertIsCopyOf(pomProjectDir.file("target/distributions/mywar-1.0-javadoc.zip"))
+        pomProjectDir.file('build').assertDoesNotExist()
+        pomProjectDir.file('target').assertIsDir()
+        checkInstall(start, pomProjectDir, version, 'installGroup')
+    }
+
+    @Test
+    public void checkWithSnapshotVersion() {
+        String version = '1.0-SNAPSHOT'
+        String groupId = "deployGroup"
+        long start = System.currentTimeMillis();
+        executer.inDirectory(pomProjectDir).withArguments("-PcustomVersion=${version}").withTasks('clean', 'uploadArchives', 'install').run()
+        String repoPath = repoPath(groupId, version)
+        File pomFile = pomFile(snapshotRepoDir, repoPath, version)
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId), pomFile.text)
+        new TestFile(new File(pomFile.absolutePath.replace(".pom", ".war"))).assertIsFile()
+        pomProjectDir.file('build').assertDoesNotExist()
+        pomProjectDir.file('target').assertIsDir()
+        checkInstall(start, pomProjectDir, version, 'installGroup')
+    }
+
+    @Test
+    public void writeNewPom() {
+        executer.inDirectory(pomProjectDir).withTasks('clean', 'writeNewPom').run()
+        compareXmlWithIgnoringOrder(expectedPom(null, null, 'pomGeneration/expectedNewPom.txt'),
+                pomProjectDir.file("target/newpom.xml").text)
+    }
+
+    @Test
+    public void writeDeployerPom() {
+        String version = '1.0'
+        String groupId = "gradle"
+        executer.inDirectory(pomProjectDir).withTasks('clean', 'writeDeployerPom').run()
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId), pomProjectDir.file("target/deployerpom.xml").text)
+    }
+    
+    static String repoPath(String group, String version) {
+        "$group/mywar/$version"
+    }
+
+    static File pomFile(TestFile repoDir, String repoPath, String version) {
+        TestFile versionDir = repoDir.file(repoPath)
+        List matches = versionDir.listFiles().findAll { it.name.endsWith('.pom') }
+        assertEquals(1, matches.size())
+        matches[0]
+    }
+
+    void checkInstall(long start, TestFile pomProjectDir, String version, String groupId) {
+        TestFile localMavenRepo = new TestFile(pomProjectDir.file("target/localRepoPath.txt").text as File)
+        TestFile installedFile = localMavenRepo.file("$groupId/mywar/$version/mywar-${version}.war")
+        TestFile installedJavadocFile = localMavenRepo.file("$groupId/mywar/$version/mywar-${version}-javadoc.zip")
+        TestFile installedPom = localMavenRepo.file("$groupId/mywar/$version/mywar-${version}.pom")
+        installedFile.assertIsCopyOf(pomProjectDir.file("target/libs/mywar-1.0.war"))
+        installedJavadocFile.assertIsCopyOf(pomProjectDir.file("target/distributions/mywar-1.0-javadoc.zip"))
+        installedPom.assertIsFile()
+        Assert.assertTrue((start/2000) <= (installedFile.lastModified()/2000))
+        Assert.assertTrue((start/2000) <= (installedJavadocFile.lastModified()/2000))
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId), installedPom.text)
+    }
+    
+    private String expectedPom(String version, String groupId, String path = 'pomGeneration/expectedPom.txt') {
+        SimpleTemplateEngine templateEngine = new SimpleTemplateEngine();
+        String text = resources.getResource(path).text
+        return templateEngine.createTemplate(text).make(version: version, groupId: groupId)
+    }
+
+    private static void compareXmlWithIgnoringOrder(String expectedXml, String actualXml) {
+        Diff diff = new Diff(expectedXml, actualXml)
+        diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier())
+        XMLAssert.assertXMLEqual(diff, true);
+        Assert.assertThat(actualXml, Matchers.startsWith(String.format('<?xml version="1.0" encoding="UTF-8"?>')))
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenQuickstartIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenQuickstartIntegrationTest.groovy
new file mode 100644
index 0000000..2e32d7d
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenQuickstartIntegrationTest.groovy
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.maven
+
+import groovy.text.SimpleTemplateEngine
+import org.custommonkey.xmlunit.Diff
+import org.custommonkey.xmlunit.XMLAssert
+import org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+import org.gradle.util.Resources
+import org.gradle.util.TestFile
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.junit.Assert.assertEquals
+
+/**
+ * @author Hans Dockter
+ */
+class SamplesMavenQuickstartIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public Resources resources = new Resources();
+    @Rule public final Sample sample = new Sample('maven/quickstart')
+
+    private TestFile pomProjectDir
+    private TestFile repoDir
+
+    @Before
+    public void setUp() {
+        pomProjectDir = sample.dir
+        repoDir = pomProjectDir.file('pomRepo');
+    }
+
+    @Test
+    public void checkDeployAndInstall() {
+        String version = '1.0'
+        String groupId = "gradle"
+        long start = System.currentTimeMillis();
+        executer.inDirectory(pomProjectDir).withTasks('clean', 'uploadArchives', 'install').run()
+        String repoPath = repoPath(groupId, version)
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId),
+                pomFile(repoDir, repoPath, version).text)
+        repoDir.file("$repoPath/quickstart-1.0.jar").assertIsCopyOf(pomProjectDir.file('build/libs/quickstart-1.0.jar'))
+        checkInstall(start, pomProjectDir, version, groupId)
+    }
+
+    static String repoPath(String group, String version) {
+        "$group/quickstart/$version"
+    }
+
+    static File pomFile(TestFile repoDir, String repoPath, String version) {
+        TestFile versionDir = repoDir.file(repoPath)
+        List matches = versionDir.listFiles().findAll { it.name.endsWith('.pom') }
+        assertEquals(1, matches.size())
+        matches[0]
+    }
+
+    void checkInstall(long start, TestFile pomProjectDir, String version, String groupId) {
+        TestFile localMavenRepo = new TestFile(pomProjectDir.file("build/localRepoPath.txt").text as File)
+        TestFile installedFile = localMavenRepo.file("$groupId/quickstart/$version/quickstart-${version}.jar")
+        TestFile installedPom = localMavenRepo.file("$groupId/quickstart/$version/quickstart-${version}.pom")
+        installedFile.assertIsCopyOf(pomProjectDir.file('build/libs/quickstart-1.0.jar'))
+        installedPom.assertIsFile()
+        Assert.assertTrue((start/2000) <= (installedFile.lastModified()/2000));
+        compareXmlWithIgnoringOrder(expectedPom(version, groupId), installedPom.text)
+    }
+
+    private String expectedPom(String version, String groupId) {
+        SimpleTemplateEngine templateEngine = new SimpleTemplateEngine();
+        String text = resources.getResource('pomGeneration/expectedQuickstartPom.txt').text
+        return templateEngine.createTemplate(text).make(version: version, groupId: groupId)
+    }
+
+    private static void compareXmlWithIgnoringOrder(String expectedXml, String actualXml) {
+        Diff diff = new Diff(expectedXml, actualXml)
+        diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier())
+        XMLAssert.assertXMLEqual(diff, true);
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/SampleTestNGIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/SampleTestNGIntegrationTest.groovy
new file mode 100644
index 0000000..db4c470
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/SampleTestNGIntegrationTest.groovy
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.integtests.testng
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+import org.gradle.integtests.fixtures.UsesSample
+import org.junit.Rule
+import org.junit.Test
+
+/**
+ * @author Tom Eyckmans
+ */
+public class SampleTestNGIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample()
+
+    @Test @UsesSample('testng/suitexmlbuilder')
+    public void suiteXmlBuilder() {
+        executer.inDirectory(sample.dir).withTasks('clean', 'test').run()
+
+        def result = new TestNGExecutionResult(sample.dir)
+        result.assertTestClassesExecuted('org.gradle.testng.UserImplTest')
+        result.testClass('org.gradle.testng.UserImplTest').assertTestsExecuted('testOkFirstName')
+        result.testClass('org.gradle.testng.UserImplTest').assertTestPassed('testOkFirstName')
+    }
+
+    @Test @UsesSample('testng/java-jdk14-passing')
+    public void javaJdk14Passing() {
+        executer.inDirectory(sample.dir).withTasks('clean', 'test').run()
+
+        def result = new TestNGExecutionResult(sample.dir)
+        result.assertTestClassesExecuted('org.gradle.OkTest')
+        result.testClass('org.gradle.OkTest').assertTestPassed('passingTest')
+    }
+    
+    @Test @UsesSample('testng/java-jdk15-passing')
+    public void javaJdk15Passing() {
+        executer.inDirectory(sample.dir).withTasks('clean', 'test').run()
+
+        def result = new TestNGExecutionResult(sample.dir)
+        result.assertTestClassesExecuted('org.gradle.OkTest', 'org.gradle.ConcreteTest', 'org.gradle.SuiteSetup', 'org.gradle.SuiteCleanup', 'org.gradle.TestSetup', 'org.gradle.TestCleanup')
+        result.testClass('org.gradle.OkTest').assertTestsExecuted('passingTest', 'expectedFailTest')
+        result.testClass('org.gradle.OkTest').assertTestPassed('passingTest')
+        result.testClass('org.gradle.OkTest').assertTestPassed('expectedFailTest')
+        result.testClass('org.gradle.ConcreteTest').assertTestsExecuted('ok', 'alsoOk')
+        result.testClass('org.gradle.ConcreteTest').assertTestPassed('ok')
+        result.testClass('org.gradle.ConcreteTest').assertTestPassed('alsoOk')
+        result.testClass('org.gradle.SuiteSetup').assertConfigMethodPassed('setupSuite')
+        result.testClass('org.gradle.SuiteCleanup').assertConfigMethodPassed('cleanupSuite')
+        result.testClass('org.gradle.TestSetup').assertConfigMethodPassed('setupTest')
+        result.testClass('org.gradle.TestCleanup').assertConfigMethodPassed('cleanupTest')
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGExecutionResult.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGExecutionResult.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGExecutionResult.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGExecutionResult.groovy
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationProject.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationProject.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationProject.groovy
rename to subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationProject.groovy
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationTest.groovy
new file mode 100644
index 0000000..9a64e43
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationTest.groovy
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.integtests.testng
+
+import org.gradle.integtests.fixtures.ExecutionResult
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.TestResources
+import org.junit.Rule
+import org.junit.Test
+import static org.gradle.util.Matchers.containsLine
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.assertThat
+
+/**
+ * @author Tom Eyckmans
+ */
+public class TestNGIntegrationTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final TestResources resources = new TestResources()
+
+    @Test
+    public void executesTestsInCorrectEnvironment() {
+        ExecutionResult result = executer.withTasks('test').run();
+
+        assertThat(result.output, not(containsString('stdout')))
+        assertThat(result.error, not(containsString('stderr')))
+        assertThat(result.error, not(containsString('a warning')))
+
+        new TestNGExecutionResult(dist.testDir).testClass('org.gradle.OkTest').assertTestPassed('ok')
+    }
+
+    @Test
+    public void canListenForTestResults() {
+        ExecutionResult result = executer.withTasks("test").run();
+
+        assertThat(result.getOutput(), containsLine("START [tests] []"));
+        assertThat(result.getOutput(), containsLine("FINISH [tests] []"));
+        assertThat(result.getOutput(), containsLine("START [test process 'Gradle Worker 1'] [Gradle Worker 1]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test process 'Gradle Worker 1'] [Gradle Worker 1]"));
+        assertThat(result.getOutput(), containsLine("START [test 'Gradle test'] [Gradle test]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test 'Gradle test'] [Gradle test]"));
+        assertThat(result.getOutput(), containsLine("START [test method pass(SomeTest)] [pass]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test method pass(SomeTest)] [pass] [null]"));
+        assertThat(result.getOutput(), containsLine("START [test method fail(SomeTest)] [fail]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test method fail(SomeTest)] [fail] [java.lang.AssertionError]"));
+        assertThat(result.getOutput(), containsLine("START [test method knownError(SomeTest)] [knownError]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test method knownError(SomeTest)] [knownError] [java.lang.RuntimeException: message]"));
+        assertThat(result.getOutput(), containsLine("START [test method unknownError(SomeTest)] [unknownError]"));
+        assertThat(result.getOutput(), containsLine("FINISH [test method unknownError(SomeTest)] [unknownError] [org.gradle.messaging.remote.internal.PlaceholderException: AppException: null]"));
+    }
+
+    @Test
+    public void groovyJdk15Failing() {
+        executer.withTasks("test").runWithFailure().assertThatCause(startsWith('There were failing tests'))
+
+        def result = new TestNGExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.BadTest')
+        result.testClass('org.gradle.BadTest').assertTestFailed('failingTest', equalTo('broken'))
+    }
+
+    @Test
+    public void groovyJdk15Passing() {
+        executer.withTasks("test").run()
+
+        def result = new TestNGExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.OkTest')
+        result.testClass('org.gradle.OkTest').assertTestPassed('passingTest')
+    }
+
+    @Test
+    public void javaJdk14Failing() {
+        executer.withTasks("test").runWithFailure().assertThatCause(startsWith('There were failing tests'))
+
+        def result = new TestNGExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.BadTest')
+        result.testClass('org.gradle.BadTest').assertTestFailed('failingTest', equalTo('broken'))
+    }
+
+    @Test
+    public void javaJdk15Failing() {
+        def execution = executer.withTasks("test").runWithFailure().assertThatCause(startsWith('There were failing tests'))
+
+        def result = new TestNGExecutionResult(dist.testDir)
+        result.assertTestClassesExecuted('org.gradle.BadTest', 'org.gradle.TestWithBrokenSetup', 'org.gradle.BrokenAfterSuite', 'org.gradle.TestWithBrokenMethodDependency')
+        result.testClass('org.gradle.BadTest').assertTestFailed('failingTest', equalTo('broken'))
+        result.testClass('org.gradle.TestWithBrokenSetup').assertConfigMethodFailed('setup')
+        result.testClass('org.gradle.BrokenAfterSuite').assertConfigMethodFailed('cleanup')
+        result.testClass('org.gradle.TestWithBrokenMethodDependency').assertTestFailed('broken', equalTo('broken'))
+        result.testClass('org.gradle.TestWithBrokenMethodDependency').assertTestSkipped('okTest')
+        assertThat(execution.error, containsString('Test org.gradle.BadTest FAILED'))
+        assertThat(execution.error, containsString('Test org.gradle.TestWithBrokenSetup FAILED'))
+        assertThat(execution.error, containsString('Test org.gradle.BrokenAfterSuite FAILED'))
+        assertThat(execution.error, containsString('Test org.gradle.TestWithBrokenMethodDependency FAILED'))
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/SamplesToolingApiIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/SamplesToolingApiIntegrationTest.groovy
new file mode 100644
index 0000000..db72263
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/SamplesToolingApiIntegrationTest.groovy
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.tooling
+
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.junit.Rule
+import spock.lang.Specification
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+
+class SamplesToolingApiIntegrationTest extends Specification {
+    @Rule public final GradleDistribution distribution = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('toolingApi')
+
+    def canUseToolingApiToDetermineProjectClasspath() {
+        Properties props = new Properties()
+        props['toolingApiRepo'] = distribution.libsRepo.toURI().toString()
+        props['gradleDistribution'] = distribution.gradleHomeDir.toString()
+        sample.dir.file('gradle.properties').withOutputStream {outstr ->
+            props.store(outstr, 'props')
+        }
+
+        when:
+        def result = executer.inDirectory(sample.dir).withTasks('run').run()
+
+        then:
+        result.output.contains("gradle-tooling-api-${distribution.version}.jar")
+        result.output.contains("gradle-core-${distribution.version}.jar")
+        result.output.contains("gradle-wrapper-${distribution.version}.jar")
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiEclipseIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiEclipseIntegrationTest.groovy
new file mode 100644
index 0000000..5b35c82
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiEclipseIntegrationTest.groovy
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.tooling
+
+import org.gradle.tooling.BuildConnection
+import org.gradle.tooling.GradleConnector
+import org.gradle.tooling.model.ExternalDependency
+import org.gradle.tooling.model.eclipse.EclipseBuild
+import org.gradle.tooling.model.eclipse.EclipseProject
+
+class ToolingApiEclipseIntegrationTest extends ToolingApiSpecification {
+
+    def canBuildEclipseClasspathModelForABuild() {
+        def projectDir = dist.testDir
+        projectDir.file('build.gradle').text = '''
+            apply plugin: 'java'
+            repositories { mavenCentral() }
+            dependencies {
+                compile 'commons-lang:commons-lang:2.5'
+                runtime 'commons-io:commons-io:1.4'
+            }
+'''
+
+        when:
+        GradleConnector connector = GradleConnector.newConnector()
+        BuildConnection connection = connector.forProjectDirectory(projectDir).connect()
+        EclipseBuild build = connection.getModel(EclipseBuild.class)
+        EclipseProject rootProject = build.getRootProject()
+        connector.close()
+
+        then:
+        rootProject != null
+        rootProject.classpath.size() == 2
+        rootProject.classpath[0] instanceof ExternalDependency
+        rootProject.classpath[0].file.name == 'commons-io-1.4.jar'
+        rootProject.classpath[1] instanceof ExternalDependency
+        rootProject.classpath[1].file.name == 'commons-lang-2.5.jar'
+    }
+
+    def canBuildEclipseProjectHierarchyForAMultiProjectBuild() {
+        def projectDir = dist.testDir
+        projectDir.file('settings.gradle').text = '''
+            include "child1", "child2", "child1:child1"
+            rootProject.name = 'root'
+'''
+
+        when:
+        GradleConnector connector = GradleConnector.newConnector()
+        BuildConnection connection = connector.forProjectDirectory(projectDir).connect()
+        EclipseBuild build = connection.getModel(EclipseBuild.class)
+        EclipseProject rootProject = build.getRootProject()
+        connector.close()
+
+        then:
+        rootProject != null
+        rootProject.name == 'root'
+        rootProject.childProjects.size() == 2
+        rootProject.childProjects[0].name == 'child1'
+        rootProject.childProjects[0].childProjects.size() == 1
+
+        rootProject.childProjects[0].childProjects[0].name == 'child1'
+        rootProject.childProjects[0].childProjects[0].childProjects.size() == 0
+
+        rootProject.childProjects[1].name == 'child2'
+        rootProject.childProjects[1].childProjects.size() == 0
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiIntegrationTest.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiIntegrationTest.groovy
new file mode 100644
index 0000000..8773b60
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiIntegrationTest.groovy
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.tooling
+
+import org.gradle.tooling.BuildConnection
+import org.gradle.tooling.GradleConnector
+import org.gradle.tooling.model.Build
+import org.gradle.util.GradleVersion
+
+class ToolingApiIntegrationTest extends ToolingApiSpecification {
+    def canUseToolingApiWithoutSpecifyingADistributionToUse() {
+        def projectDir = dist.testDir
+        projectDir.file('build.gradle').text = "assert gradle.gradleVersion == '${new GradleVersion().version}'"
+
+        when:
+        GradleConnector connector = GradleConnector.newConnector()
+        BuildConnection connection = connector.forProjectDirectory(projectDir).connect()
+        Build model = connection.getModel(Build.class)
+        connector.close()
+
+        then:
+        model != null
+    }
+
+    def canSpecifyAGradleInstallationToUse() {
+        def projectDir = dist.testDir
+        projectDir.file('build.gradle').text = "assert gradle.gradleVersion == '${new GradleVersion().version}'"
+
+        when:
+        GradleConnector connector = GradleConnector.newConnector()
+        BuildConnection connection = connector.useInstallation(dist.gradleHomeDir).forProjectDirectory(projectDir).connect()
+        Build model = connection.getModel(Build.class)
+        connector.close()
+
+        then:
+        model != null
+    }
+
+    def canSpecifyAGradleDistributionToUse() {
+        def projectDir = dist.testDir
+        projectDir.file('build.gradle').text = "assert gradle.gradleVersion == '${new GradleVersion().version}'"
+
+        when:
+        GradleConnector connector = GradleConnector.newConnector()
+        BuildConnection connection = connector.useDistribution(dist.binDistribution.toURI()).forProjectDirectory(projectDir).connect()
+        Build model = connection.getModel(Build.class)
+        connector.close()
+
+        then:
+        model != null
+    }
+
+    def canSpecifyAGradleVersionToUse() {
+        def projectDir = dist.testDir
+        projectDir.file('build.gradle').text = "assert gradle.gradleVersion == '${new GradleVersion().version}'"
+
+        when:
+        GradleConnector connector = GradleConnector.newConnector()
+        BuildConnection connection = connector.useGradleVersion(new GradleVersion().version).forProjectDirectory(projectDir).connect()
+        Build model = connection.getModel(Build.class)
+        connector.close()
+
+        then:
+        model != null
+    }
+}
diff --git a/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiSpecification.groovy b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiSpecification.groovy
new file mode 100644
index 0000000..f9c1757
--- /dev/null
+++ b/subprojects/core/src/integTest/groovy/org/gradle/integtests/tooling/ToolingApiSpecification.groovy
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.tooling
+
+import spock.lang.Specification
+import org.gradle.tooling.internal.consumer.DistributionFactory
+import org.junit.Rule
+import org.gradle.util.SetSystemProperties
+import org.gradle.integtests.fixtures.GradleDistribution
+
+class ToolingApiSpecification extends Specification {
+    @Rule public final SetSystemProperties sysProperties = new SetSystemProperties()
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+
+    def setup() {
+        System.properties[DistributionFactory.USE_CLASSPATH_AS_DISTRIBUTION] = 'true'
+    }
+}
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectA-1.2-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectA-1.2-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectA-1.2-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectA-1.2-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectB-1.5-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectB-1.5-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectB-1.5-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectB-1.5-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectWithConfigurationHierarchy.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectWithConfigurationHierarchy.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectWithConfigurationHierarchy.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveConfigurationHierarchy/projectWithConfigurationHierarchy.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectA-1.2-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectA-1.2-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectA-1.2-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectA-1.2-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectB-1.5-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectB-1.5-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectB-1.5-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectB-1.5-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectWithCyclesInDependencyGraph.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectWithCyclesInDependencyGraph.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectWithCyclesInDependencyGraph.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInDependencyGraph/projectWithCyclesInDependencyGraph.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canHaveCycleInProjectDependencies/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canNestModules/projectWithNestedModules.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canNestModules/projectWithNestedModules.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canNestModules/projectWithNestedModules.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canNestModules/projectWithNestedModules.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectA-1.2-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectA-1.2-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectA-1.2-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectA-1.2-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectB-1.5-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectB-1.5-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectB-1.5-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectB-1.5-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectWithDynamicVersions.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectWithDynamicVersions.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectWithDynamicVersions.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/canUseDynamicVersions/projectWithDynamicVersions.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-1.2-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-1.2-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-1.2-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-1.2-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-2.0-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-2.0-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-2.0-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectA-2.0-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-1.5-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-1.5-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-1.5-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-1.5-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-2.1.5-ivy.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-2.1.5-ivy.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-2.1.5-ivy.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectB-2.1.5-ivy.xml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectWithConflicts.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectWithConflicts.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectWithConflicts.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/projectWithConflicts.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/dependencyReportWithConflicts/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/reportsUnknownDependencyError/projectWithUnknownDependency.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/reportsUnknownDependencyError/projectWithUnknownDependency.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/reportsUnknownDependencyError/projectWithUnknownDependency.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ArtifactDependenciesIntegrationTest/reportsUnknownDependencyError/projectWithUnknownDependency.gradle
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/CommandLineIntegrationTest/shared/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/CommandLineIntegrationTest/shared/build.gradle
new file mode 100644
index 0000000..7e2220e
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/CommandLineIntegrationTest/shared/build.gradle
@@ -0,0 +1,16 @@
+
+task checkGradleUserHomeViaSystemEnv << {
+    assert gradle.gradleUserHomeDir == file('customUserHome')
+}
+
+task checkDefaultGradleUserHome<< {
+    assert gradle.gradleUserHomeDir == new File(System.properties['user.home'], ".gradle")
+}
+
+task checkSystemPropertyGradleUserHomeHasPrecedence << {
+    assert gradle.gradleUserHomeDir == file('systemPropCustomUserHome')
+}
+
+task checkJavaHome << {
+    assert Jvm.current().javaHome == file(expectedJavaHome)
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/CommandLineIntegrationTest/shared/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/CommandLineIntegrationTest/shared/settings.gradle
new file mode 100644
index 0000000..a09df0a
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/CommandLineIntegrationTest/shared/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'commandLine'
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/buildSrc/src/main/groovy/org/gradle/CustomTask.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/buildSrc/src/main/groovy/org/gradle/CustomTask.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/buildSrc/src/main/groovy/org/gradle/CustomTask.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/buildSrc/src/main/groovy/org/gradle/CustomTask.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/src/main/java/org/gradle/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/src/main/java/org/gradle/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/canBuildJavaProject/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/shared/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/shared/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/shared/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest/shared/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/integTest/java/org/gradle/SomeClass.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/integTest/java/org/gradle/SomeClass.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/integTest/java/org/gradle/SomeClass.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/integTest/java/org/gradle/SomeClass.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/resources/someprops.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/resources/someprops.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/resources/someprops.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/main/resources/someprops.properties
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/resources/someprops.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/resources/someprops.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/resources/someprops.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/api/src/test/resources/someprops.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiClasspath.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiClasspath.xml
new file mode 100644
index 0000000..1ce57b6
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiClasspath.xml
@@ -0,0 +1,12 @@
+<classpath>
+	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="src" path="src/integTest/java"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/test/resources"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+	<classpathentry sourcepath="@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar" kind="lib"
+					path="@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar" exported="true"/>
+	<classpathentry sourcepath="@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar" kind="lib" path="@CACHE_DIR@/junit/junit/jars/junit-4.7.jar" exported="true"/>
+</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiJdt.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiJdt.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiJdt.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiJdt.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiProject.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiProject.xml
new file mode 100644
index 0000000..d96c07f
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiProject.xml
@@ -0,0 +1,15 @@
+<projectDescription>
+	<name>api</name>
+	<comment/>
+	<projects/>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments/>
+		</buildCommand>
+	</buildSpec>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectClasspath.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectClasspath.xml
new file mode 100644
index 0000000..d2ba916
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectClasspath.xml
@@ -0,0 +1,12 @@
+<classpath>
+	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="src" path="src/main/resources"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="src" path="src/main/groovy"/>
+	<classpathentry kind="src" path="src/test/resources"/>
+	<classpathentry kind="src" path="src/test/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+	<classpathentry sourcepath="@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar" kind="lib"
+					path="@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar" exported="true"/>
+	<classpathentry sourcepath="@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar" kind="lib" path="@CACHE_DIR@/junit/junit/jars/junit-4.7.jar" exported="true"/>
+</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectJdt.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectJdt.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectJdt.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectJdt.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectProject.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectProject.xml
new file mode 100644
index 0000000..34486ca
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectProject.xml
@@ -0,0 +1,16 @@
+<projectDescription>
+	<name>groovyproject</name>
+	<comment/>
+	<projects/>
+	<natures>
+		<nature>org.eclipse.jdt.groovy.core.groovyNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments/>
+		</buildCommand>
+	</buildSpec>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectClasspath.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectClasspath.xml
new file mode 100644
index 0000000..5a2ec8e
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectClasspath.xml
@@ -0,0 +1,4 @@
+<classpath>
+	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectJdt.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectJdt.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectJdt.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectJdt.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectProject.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectProject.xml
new file mode 100644
index 0000000..f67ee66
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectProject.xml
@@ -0,0 +1,15 @@
+<projectDescription>
+	<name>javabaseproject</name>
+	<comment/>
+	<projects/>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments/>
+		</buildCommand>
+	</buildSpec>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/masterProject.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/masterProject.xml
new file mode 100644
index 0000000..a3e9c8d
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/masterProject.xml
@@ -0,0 +1,8 @@
+<projectDescription>
+	<name>master</name>
+	<comment/>
+	<projects/>
+	<natures/>
+	<buildSpec/>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Classpath.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Classpath.xml
new file mode 100644
index 0000000..23469ff
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Classpath.xml
@@ -0,0 +1,5 @@
+<classpath>
+	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Jdt.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Jdt.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Jdt.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Jdt.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Project.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Project.xml
new file mode 100644
index 0000000..e25b5d6
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Project.xml
@@ -0,0 +1,25 @@
+<projectDescription>
+	<name>webAppJava6</name>
+	<comment/>
+	<projects/>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+	</natures>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments/>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments/>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments/>
+		</buildCommand>
+	</buildSpec>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpComponent.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpComponent.xml
new file mode 100644
index 0000000..b6ab7dc
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpComponent.xml
@@ -0,0 +1,8 @@
+<project-modules id="moduleCoreId" project-version="2.0">
+	<wb-module deploy-name="webAppJava6">
+		<property name="java-output-path" value="build/classes/main"/>
+		<property name="context-root" value="webAppJava6"/>
+		<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
+		<wb-resource deploy-path="/" source-path="src/main/webapp"/>
+	</wb-module>
+</project-modules>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpFacet.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpFacet.xml
new file mode 100644
index 0000000..27159df
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpFacet.xml
@@ -0,0 +1,6 @@
+<faceted-project>
+	<fixed facet="jst.java"/>
+	<fixed facet="jst.web"/>
+	<installed facet="jst.web" version="2.4"/>
+	<installed facet="jst.java" version="6.0"/>
+</faceted-project>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsClasspath.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsClasspath.xml
new file mode 100644
index 0000000..5fb6ab5
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsClasspath.xml
@@ -0,0 +1,12 @@
+<classpath>
+	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+	<classpathentry sourcepath="GRADLE_USER_HOME/cache/commons-lang/commons-lang/sources/commons-lang-2.5-sources.jar" kind="var"
+					path="GRADLE_USER_HOME/cache/commons-lang/commons-lang/jars/commons-lang-2.5.jar" exported="true">
+		<attributes>
+			<attribute name="javadoc_location" value="GRADLE_USER_HOME/cache/commons-lang/commons-lang/javadocs/commons-lang-2.5-javadoc.jar"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="GRADLE_USER_HOME/cache/junit/junit/sources/junit-4.7-sources.jar" kind="var" path="GRADLE_USER_HOME/cache/junit/junit/jars/junit-4.7.jar" exported="true"/>
+</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsJdt.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsJdt.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsJdt.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsJdt.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsProject.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsProject.xml
new file mode 100644
index 0000000..4cf73e3
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsProject.xml
@@ -0,0 +1,25 @@
+<projectDescription>
+	<name>webAppWithVars</name>
+	<comment/>
+	<projects/>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+	</natures>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments/>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments/>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments/>
+		</buildCommand>
+	</buildSpec>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpComponent.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpComponent.xml
new file mode 100644
index 0000000..24c0b21
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpComponent.xml
@@ -0,0 +1,11 @@
+<project-modules id="moduleCoreId" project-version="2.0">
+	<wb-module deploy-name="webAppWithVars">
+		<property name="java-output-path" value="build/classes/main"/>
+		<property name="context-root" value="webAppWithVars"/>
+		<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
+		<wb-resource deploy-path="/" source-path="src/main/webapp"/>
+		<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/GRADLE_USER_HOME//cache/commons-lang/commons-lang/jars/commons-lang-2.5.jar">
+			<dependency-type>uses</dependency-type>
+		</dependent-module>
+	</wb-module>
+</project-modules>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpFacet.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpFacet.xml
new file mode 100644
index 0000000..76c2355
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpFacet.xml
@@ -0,0 +1,6 @@
+<faceted-project>
+	<fixed facet="jst.java"/>
+	<fixed facet="jst.web"/>
+	<installed facet="jst.web" version="2.4"/>
+	<installed facet="jst.java" version="5.0"/>
+</faceted-project>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceClasspath.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceClasspath.xml
new file mode 100644
index 0000000..0a572fe
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceClasspath.xml
@@ -0,0 +1,19 @@
+<classpath>
+	<classpathentry kind="output" path="bin"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
+	<classpathentry kind="src" path="/api" exported="true"/>
+	<classpathentry sourcepath="@CACHE_DIR@/commons-lang/commons-lang/sources/commons-lang-2.5-sources.jar" kind="lib" path="@CACHE_DIR@/commons-lang/commons-lang/jars/commons-lang-2.5.jar"
+					exported="true">
+		<attributes>
+			<attribute name="javadoc_location" value="@CACHE_DIR@/commons-lang/commons-lang/javadocs/commons-lang-2.5-javadoc.jar"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="@CACHE_DIR@/commons-io/commons-io/sources/commons-io-1.2-sources.jar" kind="lib" path="@CACHE_DIR@/commons-io/commons-io/jars/commons-io-1.2.jar" exported="true">
+		<attributes>
+			<attribute name="javadoc_location" value="@CACHE_DIR@/commons-io/commons-io/javadocs/commons-io-1.2-javadoc.jar"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar" kind="lib" path="@CACHE_DIR@/junit/junit/jars/junit-4.7.jar" exported="true"/>
+	<classpathentry sourcepath="@CACHE_DIR@/org.slf4j/slf4j-api/sources/slf4j-api-1.5.8-sources.jar" kind="lib" path="@CACHE_DIR@/org.slf4j/slf4j-api/jars/slf4j-api-1.5.8.jar" exported="true"/>
+</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceJdt.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceJdt.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceJdt.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceJdt.properties
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceProject.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceProject.xml
new file mode 100644
index 0000000..3baf8a8
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceProject.xml
@@ -0,0 +1,25 @@
+<projectDescription>
+	<name>webservice</name>
+	<comment/>
+	<projects/>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+	</natures>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments/>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments/>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments/>
+		</buildCommand>
+	</buildSpec>
+	<links/>
+</projectDescription>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpComponent.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpComponent.xml
new file mode 100644
index 0000000..6878335
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpComponent.xml
@@ -0,0 +1,14 @@
+<project-modules id="moduleCoreId" project-version="2.0">
+	<wb-module deploy-name="webservice">
+		<property name="context-root" value="webservice"/>
+		<property name="java-output-path" value="build/classes/main"/>
+		<wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
+		<wb-resource deploy-path="/" source-path="src/main/webapp"/>
+		<dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/api/api">
+			<dependency-type>uses</dependency-type>
+		</dependent-module>
+		<dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/@CACHE_DIR@/commons-lang/commons-lang/jars/commons-lang-2.5.jar">
+			<dependency-type>uses</dependency-type>
+		</dependent-module>
+	</wb-module>
+</project-modules>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpFacet.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpFacet.xml
new file mode 100644
index 0000000..76c2355
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpFacet.xml
@@ -0,0 +1,6 @@
+<faceted-project>
+	<fixed facet="jst.java"/>
+	<fixed facet="jst.web"/>
+	<installed facet="jst.web" version="2.4"/>
+	<installed facet="jst.java" version="5.0"/>
+</faceted-project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/groovy/script.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/groovy/script.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/groovy/script.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/groovy/script.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/java/org/gradle/api/PersonList.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/java/org/gradle/api/PersonList.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/java/org/gradle/api/PersonList.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/java/org/gradle/api/PersonList.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/resources/someprops.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/resources/someprops.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/resources/someprops.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/main/resources/someprops.properties
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/java/org/gradle/shared/PersonTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/java/org/gradle/shared/PersonTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/java/org/gradle/shared/PersonTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/java/org/gradle/shared/PersonTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/resources/someprops.properties b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/resources/someprops.properties
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/resources/someprops.properties
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/groovyproject/src/test/resources/someprops.properties
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/javabaseproject/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/javabaseproject/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/javabaseproject/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/javabaseproject/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/master/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/java/org/gradle/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/java/org/gradle/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/webapp/index.html b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/webapp/index.html
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/webapp/index.html
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppJava6/src/main/webapp/index.html
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/src/main/java/org/gradle/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/src/main/java/org/gradle/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webAppWithVars/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/canExecuteCommands.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/canExecuteCommands.gradle
new file mode 100644
index 0000000..bd60577
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/canExecuteCommands.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'java'
+
+defaultTasks 'execTask', 'execByMethod'
+
+task execTask(type: Exec) {
+    dependsOn sourceSets.main.runtimeClasspath
+    testFile = file("$buildDir/$name")
+    executable = Jvm.current().getJavaExecutable()
+    args '-cp', sourceSets.main.runtimeClasspath.asPath, 'org.gradle.TestMain', projectDir, testFile
+    doLast {
+        assert testFile.exists()
+    }
+}
+
+task execByMethod {
+    dependsOn sourceSets.main.runtimeClasspath
+    testFile = file("$buildDir/$name")
+    doFirst {
+        exec {
+            executable = Jvm.current().getJavaExecutable()
+            args '-cp', sourceSets.main.runtimeClasspath.asPath, 'org.gradle.TestMain', projectDir, testFile
+        }
+    }
+    doLast {
+        assert testFile.exists()
+    }
+}
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/canExecuteJava.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/canExecuteJava.gradle
new file mode 100644
index 0000000..febcd4f
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/canExecuteJava.gradle
@@ -0,0 +1,27 @@
+apply plugin: 'java'
+
+defaultTasks 'javaexecTask', 'javaexecByMethod'
+
+task javaexecTask(type: JavaExec, dependsOn: classes) {
+    testFile = file("$buildDir/$name")
+    classpath(sourceSets.main.classesDir)
+    main = 'org.gradle.TestMain'
+    args projectDir, testFile
+    doLast {
+        assert testFile.exists()
+    }
+}
+
+task javaexecByMethod(dependsOn: classes) {
+    testFile = file("$buildDir/$name")
+    doFirst {
+        javaexec {
+            classpath(sourceSets.main.classesDir)
+            main = 'org.gradle.TestMain'
+            args projectDir, testFile
+        }
+    }
+    doLast {
+        assert testFile.exists()
+    }
+}
\ No newline at end of file
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/shared/src/main/java/org/gradle/TestMain.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/shared/src/main/java/org/gradle/TestMain.java
new file mode 100644
index 0000000..6c47dbb
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/shared/src/main/java/org/gradle/TestMain.java
@@ -0,0 +1,16 @@
+package org.gradle;
+
+import java.io.File;
+
+public class TestMain {
+    public static void main(String[] args) throws Exception {
+        File expectedWorkingDir = new File(args[0]).getCanonicalFile();
+        File actualWorkingDir = new File(System.getProperty("user.dir")).getCanonicalFile();
+        if (!expectedWorkingDir.getCanonicalFile().equals(actualWorkingDir)) {
+            throw new RuntimeException(String.format("Unexpected working directory '%s', expected '%s'.", actualWorkingDir, expectedWorkingDir));
+        }
+        File file = new File(args[1]);
+        file.getParentFile().mkdirs();
+        file.createNewFile();
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/main/java/org/gradle/api/PersonList.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/api/src/test/java/org/gradle/shared/PersonTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/build.gradle
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/api/api.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/api/api.iml.xml
new file mode 100644
index 0000000..1127e08
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/api/api.iml.xml
@@ -0,0 +1,40 @@
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <exclude-output/>
+    <orderEntry type="inheritedJdk"/>
+    <content url="file://$MODULE_DIR$/">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
+      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
+      <excludeFolder url="file://$MODULE_DIR$/build"/>
+    </content>
+    <orderEntry type="sourceFolder" forTests="false"/>
+    <output url="file://$MODULE_DIR$/out/production/api"/>
+    <output-test url="file://$MODULE_DIR$/out/test/api"/>
+    <orderEntry type="module-library" exported="" scope="RUNTIME">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" scope="TEST">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/junit/junit/jars/junit-4.7.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+  </component>
+  <component name="ModuleRootManager"/>
+</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iml.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iml.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iml.xml
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.ipr.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.ipr.xml
new file mode 100644
index 0000000..58a91cb
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.ipr.xml
@@ -0,0 +1,102 @@
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac"/>
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
+      <entry name=".+\.(gif|png|jpeg|jpg)"/>
+    </resourceExtensions>
+    <annotationProcessing enabled="false" useClasspath="true"/>
+    <wildcardResourcePatterns>
+      <entry name="!?*.groovy"/>
+      <entry name="!?*.java"/>
+    </wildcardResourcePatterns>
+  </component>
+  <component name="CopyrightManager" default="">
+    <module2copyright/>
+  </component>
+  <component name="DependencyValidationManager">
+    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
+  </component>
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
+  <component name="GradleUISettings">
+    <setting name="root"/>
+  </component>
+  <component name="GradleUISettings2">
+    <setting name="root"/>
+  </component>
+  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY"/>
+    <option name="OPTION_SCOPE" value="protected"/>
+    <option name="OPTION_HIERARCHY" value="true"/>
+    <option name="OPTION_NAVIGATOR" value="true"/>
+    <option name="OPTION_INDEX" value="true"/>
+    <option name="OPTION_SEPARATE_INDEX" value="true"/>
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
+    <option name="OPTION_DEPRECATED_LIST" value="true"/>
+    <option name="OTHER_OPTIONS" value=""/>
+    <option name="HEAP_SIZE"/>
+    <option name="LOCALE"/>
+    <option name="OPEN_IN_BROWSER" value="true"/>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
+      <module fileurl="file://$PROJECT_DIR$/api/api.iml" filepath="$PROJECT_DIR$/api/api.iml"/>
+      <module fileurl="file://$PROJECT_DIR$/webservice/webservice.iml" filepath="$PROJECT_DIR$/webservice/webservice.iml"/>
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.6">
+    <output url="file://$PROJECT_DIR$/out"/>
+  </component>
+  <component name="SvnBranchConfigurationManager">
+    <option name="mySupportsUserInfoFilter" value="true"/>
+  </component>
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs=""/>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ArtifactsStructureConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+      <state key="Copyright.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+        </UIState>
+      </state>
+      <state key="ProjectJDKs.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl>
+              <option name="proportions">
+                <list>
+                  <option value="0.2"/>
+                </list>
+              </option>
+            </SplitterProportionsDataImpl>
+          </splitter-proportions>
+          <last-edited>1.6</last-edited>
+        </UIState>
+      </state>
+      <state key="ScopeChooserConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+    </states>
+  </component>
+</project>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iws.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iws.xml
new file mode 100644
index 0000000..9354ea5
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iws.xml
@@ -0,0 +1,206 @@
+<project version="4">
+  <component name="ChangeListManager">
+    <option name="TRACKING_ENABLED" value="true"/>
+    <option name="SHOW_DIALOG" value="false"/>
+    <option name="HIGHLIGHT_CONFLICTS" value="true"/>
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false"/>
+    <option name="LAST_RESOLUTION" value="IGNORE"/>
+  </component>
+  <component name="ChangesViewManager" flattened_view="true" show_ignored="false"/>
+  <component name="CreatePatchCommitExecutor">
+    <option name="PATCH_PATH" value=""/>
+    <option name="REVERSE_PATCH" value="false"/>
+  </component>
+  <component name="DaemonCodeAnalyzer">
+    <disable_hints/>
+  </component>
+  <component name="DebuggerManager">
+    <breakpoint_any>
+      <breakpoint>
+        <option name="NOTIFY_CAUGHT" value="true"/>
+        <option name="NOTIFY_UNCAUGHT" value="true"/>
+        <option name="ENABLED" value="false"/>
+        <option name="LOG_ENABLED" value="false"/>
+        <option name="LOG_EXPRESSION_ENABLED" value="false"/>
+        <option name="SUSPEND_POLICY" value="SuspendAll"/>
+        <option name="COUNT_FILTER_ENABLED" value="false"/>
+        <option name="COUNT_FILTER" value="0"/>
+        <option name="CONDITION_ENABLED" value="false"/>
+        <option name="CLASS_FILTERS_ENABLED" value="false"/>
+        <option name="INSTANCE_FILTERS_ENABLED" value="false"/>
+        <option name="CONDITION" value=""/>
+        <option name="LOG_MESSAGE" value=""/>
+      </breakpoint>
+      <breakpoint>
+        <option name="NOTIFY_CAUGHT" value="true"/>
+        <option name="NOTIFY_UNCAUGHT" value="true"/>
+        <option name="ENABLED" value="false"/>
+        <option name="LOG_ENABLED" value="false"/>
+        <option name="LOG_EXPRESSION_ENABLED" value="false"/>
+        <option name="SUSPEND_POLICY" value="SuspendAll"/>
+        <option name="COUNT_FILTER_ENABLED" value="false"/>
+        <option name="COUNT_FILTER" value="0"/>
+        <option name="CONDITION_ENABLED" value="false"/>
+        <option name="CLASS_FILTERS_ENABLED" value="false"/>
+        <option name="INSTANCE_FILTERS_ENABLED" value="false"/>
+        <option name="CONDITION" value=""/>
+        <option name="LOG_MESSAGE" value=""/>
+      </breakpoint>
+    </breakpoint_any>
+    <breakpoint_rules/>
+    <ui_properties/>
+  </component>
+  <component name="ModuleEditorState">
+    <option name="LAST_EDITED_MODULE_NAME"/>
+    <option name="LAST_EDITED_TAB_NAME"/>
+  </component>
+  <component name="ProjectInspectionProfilesVisibleTreeState">
+    <entry key="Project Default">
+      <profile-state/>
+    </entry>
+  </component>
+  <component name="ProjectLevelVcsManager">
+    <OptionsSetting value="true" id="Add"/>
+    <OptionsSetting value="true" id="Remove"/>
+    <OptionsSetting value="true" id="Checkout"/>
+    <OptionsSetting value="true" id="Update"/>
+    <OptionsSetting value="true" id="Status"/>
+    <OptionsSetting value="true" id="Edit"/>
+    <ConfirmationsSetting value="0" id="Add"/>
+    <ConfirmationsSetting value="0" id="Remove"/>
+  </component>
+  <component name="ProjectReloadState">
+    <option name="STATE" value="0"/>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="GoToFile.includeJavaFiles" value="false"/>
+    <property name="GoToClass.toSaveIncludeLibraries" value="false"/>
+    <property name="MemberChooser.sorted" value="false"/>
+    <property name="MemberChooser.showClasses" value="true"/>
+    <property name="GoToClass.includeLibraries" value="false"/>
+    <property name="MemberChooser.copyJavadoc" value="false"/>
+  </component>
+  <component name="RunManager">
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true"/>
+      <option name="SERVER_MODE" value="false"/>
+      <option name="SHMEM_ADDRESS" value="javadebug"/>
+      <option name="HOST" value="localhost"/>
+      <option name="PORT" value="5005"/>
+      <method>
+        <option name="BuildArtifacts" enabled="false"/>
+      </method>
+    </configuration>
+    <configuration default="true" type="Applet" factoryName="Applet">
+      <module name=""/>
+      <option name="MAIN_CLASS_NAME"/>
+      <option name="HTML_FILE_NAME"/>
+      <option name="HTML_USED" value="false"/>
+      <option name="WIDTH" value="400"/>
+      <option name="HEIGHT" value="300"/>
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy"/>
+      <option name="VM_PARAMETERS"/>
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
+      <option name="ALTERNATIVE_JRE_PATH"/>
+      <method>
+        <option name="BuildArtifacts" enabled="false"/>
+        <option name="Make" enabled="true"/>
+      </method>
+    </configuration>
+    <configuration default="true" type="Application" factoryName="Application">
+      <extension name="coverage" enabled="false" merge="false"/>
+      <option name="MAIN_CLASS_NAME"/>
+      <option name="VM_PARAMETERS"/>
+      <option name="PROGRAM_PARAMETERS"/>
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"/>
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
+      <option name="ALTERNATIVE_JRE_PATH"/>
+      <option name="ENABLE_SWING_INSPECTOR" value="false"/>
+      <option name="ENV_VARIABLES"/>
+      <option name="PASS_PARENT_ENVS" value="true"/>
+      <module name=""/>
+      <envs/>
+      <method>
+        <option name="BuildArtifacts" enabled="false"/>
+        <option name="Make" enabled="true"/>
+      </method>
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit">
+      <extension name="coverage" enabled="false" merge="false"/>
+      <module name=""/>
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
+      <option name="ALTERNATIVE_JRE_PATH"/>
+      <option name="PACKAGE_NAME"/>
+      <option name="MAIN_CLASS_NAME"/>
+      <option name="METHOD_NAME"/>
+      <option name="TEST_OBJECT" value="class"/>
+      <option name="VM_PARAMETERS"/>
+      <option name="PARAMETERS"/>
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"/>
+      <option name="ENV_VARIABLES"/>
+      <option name="PASS_PARENT_ENVS" value="true"/>
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="moduleWithDependencies"/>
+      </option>
+      <envs/>
+      <method>
+        <option name="BuildArtifacts" enabled="false"/>
+        <option name="Make" enabled="true"/>
+      </method>
+    </configuration>
+    <list size="0"/>
+    <configuration name="<template>" type="WebApp" default="true" selected="false">
+      <Host>localhost</Host>
+      <Port>5050</Port>
+    </configuration>
+  </component>
+  <component name="ShelveChangesManager" show_recycled="false"/>
+  <component name="SvnConfiguration" maxAnnotateRevisions="500">
+    <option name="USER" value=""/>
+    <option name="PASSWORD" value=""/>
+    <option name="LAST_MERGED_REVISION"/>
+    <option name="UPDATE_RUN_STATUS" value="false"/>
+    <option name="MERGE_DRY_RUN" value="false"/>
+    <option name="MERGE_DIFF_USE_ANCESTRY" value="true"/>
+    <option name="UPDATE_LOCK_ON_DEMAND" value="false"/>
+    <option name="IGNORE_SPACES_IN_MERGE" value="false"/>
+    <option name="DETECT_NESTED_COPIES" value="true"/>
+    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true"/>
+    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true"/>
+    <myIsUseDefaultProxy>false</myIsUseDefaultProxy>
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task"/>
+    <servers/>
+  </component>
+  <component name="VcsManagerConfiguration">
+    <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true"/>
+    <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true"/>
+    <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true"/>
+    <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true"/>
+    <option name="PERFORM_EDIT_IN_BACKGROUND" value="true"/>
+    <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true"/>
+    <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true"/>
+    <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false"/>
+    <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false"/>
+    <option name="ENABLE_BACKGROUND_PROCESSES" value="false"/>
+    <option name="CHANGED_ON_SERVER_INTERVAL" value="60"/>
+    <option name="FORCE_NON_EMPTY_COMMENT" value="false"/>
+    <option name="LAST_COMMIT_MESSAGE"/>
+    <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true"/>
+    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false"/>
+    <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false"/>
+    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false"/>
+    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false"/>
+    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8"/>
+    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5"/>
+    <option name="ACTIVE_VCS_NAME"/>
+    <option name="UPDATE_GROUP_BY_PACKAGES" value="false"/>
+    <option name="UPDATE_GROUP_BY_CHANGELIST" value="false"/>
+    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false"/>
+    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6"/>
+  </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager/>
+  </component>
+</project>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webservice/webservice.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webservice/webservice.iml.xml
new file mode 100644
index 0000000..b2d50ba
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webservice/webservice.iml.xml
@@ -0,0 +1,76 @@
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <exclude-output/>
+    <orderEntry type="inheritedJdk"/>
+    <content url="file://$MODULE_DIR$/">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
+      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
+      <excludeFolder url="file://$MODULE_DIR$/build"/>
+    </content>
+    <orderEntry type="sourceFolder" forTests="false"/>
+    <output url="file://$MODULE_DIR$/out/production/webservice"/>
+    <output-test url="file://$MODULE_DIR$/out/test/webservice"/>
+    <orderEntry type="module-library" exported="">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/org.slf4j/slf4j-api/jars/slf4j-api-1.5.8.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/org.slf4j/slf4j-api/sources/slf4j-api-1.5.8-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/compile-1.0.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES/>
+      </library>
+    </orderEntry>
+    <orderEntry type="module" module-name="api" exported=""/>
+    <orderEntry type="module-library" exported="" scope="RUNTIME">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/commons-lang/commons-lang/jars/commons-lang-2.4.jar!/"/>
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://@CACHE_DIR@/commons-lang/commons-lang/javadocs/commons-lang-2.4-javadoc.jar!/"/>
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/commons-lang/commons-lang/sources/commons-lang-2.4-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="" scope="RUNTIME">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/commons-io/commons-io/jars/commons-io-1.2.jar!/"/>
+        </CLASSES>
+        <JAVADOC>
+          <root url="jar://@CACHE_DIR@/commons-io/commons-io/javadocs/commons-io-1.2-javadoc.jar!/"/>
+        </JAVADOC>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/commons-io/commons-io/sources/commons-io-1.2-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" scope="TEST">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/junit/junit/jars/junit-4.7.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+  </component>
+  <component name="ModuleRootManager"/>
+</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/webservice/src/main/java/org/gradle/webservice/TestTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/build.gradle
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/expectedFiles/root.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/expectedFiles/root.iml.xml
new file mode 100644
index 0000000..21dd9f0
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/expectedFiles/root.iml.xml
@@ -0,0 +1,39 @@
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output/>
+    <content url="file://$MODULE_DIR$/">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
+      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
+      <excludeFolder url="file://$MODULE_DIR$/build"/>
+    </content>
+    <orderEntry type="inheritedJdk"/>
+    <orderEntry type="sourceFolder" forTests="false"/>
+    <output url="file://$MODULE_DIR$/out/production/root"/>
+    <output-test url="file://$MODULE_DIR$/out/test/root"/>
+    <orderEntry type="module-library" exported="" scope="RUNTIME">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library" exported="" scope="RUNTIME">
+      <library>
+        <CLASSES>
+          <root url="jar://@CACHE_DIR@/junit/junit/jars/junit-4.7.jar!/"/>
+        </CLASSES>
+        <JAVADOC/>
+        <SOURCES>
+          <root url="jar://@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar!/"/>
+        </SOURCES>
+      </library>
+    </orderEntry>
+  </component>
+</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/root.iml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/root.iml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/root.iml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/root.iml
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/overwritesExistingDependencies/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/build.gradle
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/expectedFiles/root.ipr.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/expectedFiles/root.ipr.xml
new file mode 100644
index 0000000..ac65d74
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/expectedFiles/root.ipr.xml
@@ -0,0 +1,101 @@
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac"/>
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
+      <entry name=".+\.(gif|png|jpeg|jpg)"/>
+    </resourceExtensions>
+    <annotationProcessing enabled="false" useClasspath="true"/>
+    <wildcardResourcePatterns>
+      <entry name="!?*.groovy"/>
+      <entry name="!?*.java"/>
+    </wildcardResourcePatterns>
+  </component>
+  <component name="CopyrightManager" default="">
+    <module2copyright/>
+  </component>
+  <component name="DependencyValidationManager">
+    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
+  </component>
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
+  <component name="GradleUISettings">
+    <setting name="root"/>
+  </component>
+  <component name="GradleUISettings2">
+    <setting name="root"/>
+  </component>
+  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY"/>
+    <option name="OPTION_SCOPE" value="protected"/>
+    <option name="OPTION_HIERARCHY" value="true"/>
+    <option name="OPTION_NAVIGATOR" value="true"/>
+    <option name="OPTION_INDEX" value="true"/>
+    <option name="OPTION_SEPARATE_INDEX" value="true"/>
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
+    <option name="OPTION_DEPRECATED_LIST" value="true"/>
+    <option name="OTHER_OPTIONS" value=""/>
+    <option name="HEAP_SIZE"/>
+    <option name="LOCALE"/>
+    <option name="OPEN_IN_BROWSER" value="true"/>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
+      <module fileurl="file://$PROJECT_DIR$/a/a.iml" filepath="$PROJECT_DIR$/a/a.iml"/>
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.6">
+    <output url="file://$PROJECT_DIR$/out"/>
+  </component>
+  <component name="SvnBranchConfigurationManager">
+    <option name="mySupportsUserInfoFilter" value="true"/>
+  </component>
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs=""/>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ArtifactsStructureConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+      <state key="Copyright.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+        </UIState>
+      </state>
+      <state key="ProjectJDKs.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl>
+              <option name="proportions">
+                <list>
+                  <option value="0.2"/>
+                </list>
+              </option>
+            </SplitterProportionsDataImpl>
+          </splitter-proportions>
+          <last-edited>1.6</last-edited>
+        </UIState>
+      </state>
+      <state key="ScopeChooserConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+    </states>
+  </component>
+</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.iml.xml
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.iml.xml
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.iml.xml
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.ipr.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.ipr.xml
new file mode 100644
index 0000000..7e8002f
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.ipr.xml
@@ -0,0 +1,100 @@
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac"/>
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
+      <entry name=".+\.(gif|png|jpeg|jpg)"/>
+    </resourceExtensions>
+    <annotationProcessing enabled="false" useClasspath="true"/>
+    <wildcardResourcePatterns>
+      <entry name="!?*.groovy"/>
+      <entry name="!?*.java"/>
+    </wildcardResourcePatterns>
+  </component>
+  <component name="CopyrightManager" default="">
+    <module2copyright/>
+  </component>
+  <component name="DependencyValidationManager">
+    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
+  </component>
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
+  <component name="GradleUISettings">
+    <setting name="root"/>
+  </component>
+  <component name="GradleUISettings2">
+    <setting name="root"/>
+  </component>
+  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY"/>
+    <option name="OPTION_SCOPE" value="protected"/>
+    <option name="OPTION_HIERARCHY" value="true"/>
+    <option name="OPTION_NAVIGATOR" value="true"/>
+    <option name="OPTION_INDEX" value="true"/>
+    <option name="OPTION_SEPARATE_INDEX" value="true"/>
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
+    <option name="OPTION_DEPRECATED_LIST" value="true"/>
+    <option name="OTHER_OPTIONS" value=""/>
+    <option name="HEAP_SIZE"/>
+    <option name="LOCALE"/>
+    <option name="OPEN_IN_BROWSER" value="true"/>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.6">
+    <output url="file://$PROJECT_DIR$/out"/>
+  </component>
+  <component name="SvnBranchConfigurationManager">
+    <option name="mySupportsUserInfoFilter" value="true"/>
+  </component>
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs=""/>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ArtifactsStructureConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+      <state key="Copyright.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+        </UIState>
+      </state>
+      <state key="ProjectJDKs.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl>
+              <option name="proportions">
+                <list>
+                  <option value="0.2"/>
+                </list>
+              </option>
+            </SplitterProportionsDataImpl>
+          </splitter-proportions>
+          <last-edited>1.6</last-edited>
+        </UIState>
+      </state>
+      <state key="ScopeChooserConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+    </states>
+  </component>
+</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/settings.gradle
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.iml.xml
new file mode 100644
index 0000000..1096372
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.iml.xml
@@ -0,0 +1,18 @@
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <exclude-output/>
+    <orderEntry type="inheritedJdk"/>
+    <content url="file://$MODULE_DIR$/">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
+      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
+      <excludeFolder url="file://$MODULE_DIR$/build"/>
+    </content>
+    <orderEntry type="sourceFolder" forTests="false"/>
+    <output url="file://$MODULE_DIR$/out/production/root"/>
+    <output-test url="file://$MODULE_DIR$/out/test/root"/>
+  </component>
+  <component name="ModuleRootManager"/>
+</module>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.ipr.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.ipr.xml
new file mode 100644
index 0000000..67b3c8f
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.ipr.xml
@@ -0,0 +1,102 @@
+<project version="4">
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac"/>
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
+      <entry name=".+\.(gif|png|jpeg|jpg)"/>
+    </resourceExtensions>
+    <annotationProcessing enabled="false" useClasspath="true"/>
+    <wildcardResourcePatterns>
+      <entry name="!?*.groovy"/>
+      <entry name="!?*.java"/>
+    </wildcardResourcePatterns>
+  </component>
+  <component name="CopyrightManager" default="">
+    <module2copyright/>
+  </component>
+  <component name="DependencyValidationManager">
+    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
+  </component>
+  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
+  <component name="GradleUISettings">
+    <setting name="root"/>
+  </component>
+  <component name="GradleUISettings2">
+    <setting name="root"/>
+  </component>
+  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY"/>
+    <option name="OPTION_SCOPE" value="protected"/>
+    <option name="OPTION_HIERARCHY" value="true"/>
+    <option name="OPTION_NAVIGATOR" value="true"/>
+    <option name="OPTION_INDEX" value="true"/>
+    <option name="OPTION_SEPARATE_INDEX" value="true"/>
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
+    <option name="OPTION_DEPRECATED_LIST" value="true"/>
+    <option name="OTHER_OPTIONS" value=""/>
+    <option name="HEAP_SIZE"/>
+    <option name="LOCALE"/>
+    <option name="OPEN_IN_BROWSER" value="true"/>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/../top-level.iml" filepath="$PROJECT_DIR$/../top-level.iml"/>
+      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
+      <module fileurl="file://$PROJECT_DIR$/../a child project/a child.iml" filepath="$PROJECT_DIR$/../a child project/a child.iml"/>
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.5">
+    <output url="file://$PROJECT_DIR$/out"/>
+  </component>
+  <component name="SvnBranchConfigurationManager">
+    <option name="mySupportsUserInfoFilter" value="true"/>
+  </component>
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs=""/>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ArtifactsStructureConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+      <state key="Copyright.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+        </UIState>
+      </state>
+      <state key="ProjectJDKs.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl>
+              <option name="proportions">
+                <list>
+                  <option value="0.2"/>
+                </list>
+              </option>
+            </SplitterProportionsDataImpl>
+          </splitter-proportions>
+          <last-edited>1.6</last-edited>
+        </UIState>
+      </state>
+      <state key="ScopeChooserConfigurable.UI">
+        <UIState>
+          <splitter-proportions>
+            <SplitterProportionsDataImpl/>
+          </splitter-proportions>
+          <settings/>
+        </UIState>
+      </state>
+    </states>
+  </component>
+</project>
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/top-level.iml.xml b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/top-level.iml.xml
new file mode 100644
index 0000000..2d7dc07
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/top-level.iml.xml
@@ -0,0 +1,18 @@
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <exclude-output/>
+    <orderEntry type="inheritedJdk"/>
+    <content url="file://$MODULE_DIR$/">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
+      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
+      <excludeFolder url="file://$MODULE_DIR$/build"/>
+    </content>
+    <orderEntry type="sourceFolder" forTests="false"/>
+    <output url="file://$MODULE_DIR$/out/production/top-level"/>
+    <output-test url="file://$MODULE_DIR$/out/test/top-level"/>
+  </component>
+  <component name="ModuleRootManager"/>
+</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/root/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/root/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/root/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/root/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/settings.gradle
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/DirTransformerTask.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/DirTransformerTask.java
new file mode 100644
index 0000000..57615e7
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/DirTransformerTask.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests;
+
+import org.codehaus.groovy.runtime.DefaultGroovyMethods;
+import org.gradle.api.DefaultTask;
+import org.gradle.api.tasks.InputDirectory;
+import org.gradle.api.tasks.OutputDirectory;
+import org.gradle.api.tasks.TaskAction;
+
+import java.io.File;
+import java.io.IOException;
+
+public class DirTransformerTask extends DefaultTask {
+    private File inputDir;
+    private File outputDir;
+
+    @InputDirectory
+    public File getInputDir() {
+        return inputDir;
+    }
+
+    public void setInputDir(File inputDir) {
+        this.inputDir = inputDir;
+    }
+
+    @OutputDirectory
+    public File getOutputDir() {
+        return outputDir;
+    }
+
+    public void setOutputDir(File outputDir) {
+        this.outputDir = outputDir;
+    }
+
+    @TaskAction
+    public void transform() throws IOException {
+        for (File inputFile : inputDir.listFiles()) {
+            File outputFile = new File(outputDir, inputFile.getName());
+            String text = DefaultGroovyMethods.getText(inputFile);
+            DefaultGroovyMethods.setText(outputFile, String.format("[%s]", text));
+        }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GeneratorTask.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/GeneratorTask.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GeneratorTask.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/GeneratorTask.java
diff --git a/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/TransformerTask.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/TransformerTask.java
new file mode 100644
index 0000000..571af0e
--- /dev/null
+++ b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalBuildIntegrationTest/shared/buildSrc/src/main/java/TransformerTask.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.integtests;
+
+import org.codehaus.groovy.runtime.DefaultGroovyMethods;
+import org.gradle.api.DefaultTask;
+import org.gradle.api.tasks.Input;
+import org.gradle.api.tasks.InputFile;
+import org.gradle.api.tasks.OutputFile;
+import org.gradle.api.tasks.TaskAction;
+
+import java.io.File;
+import java.io.IOException;
+
+public class TransformerTask extends DefaultTask {
+    private File inputFile;
+    private File outputFile;
+    private String format = "[%s]";
+
+    @InputFile
+    public File getInputFile() {
+        return inputFile;
+    }
+
+    public void setInputFile(File inputFile) {
+        this.inputFile = inputFile;
+    }
+
+    @OutputFile
+    public File getOutputFile() {
+        return outputFile;
+    }
+
+    public void setOutputFile(File outputFile) {
+        this.outputFile = outputFile;
+    }
+
+    @Input
+    public String getFormat() {
+        return format;
+    }
+
+    public void setFormat(String format) {
+        this.format = format;
+    }
+
+    @TaskAction
+    public void transform() throws IOException {
+        String text = DefaultGroovyMethods.getText(inputFile);
+        DefaultGroovyMethods.setText(outputFile, String.format(format, text));
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/NewIPerson.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/NewIPerson.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/NewIPerson.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/NewIPerson.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/IPerson.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/IPerson.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/IPerson.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/IPerson.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/Person.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/Person.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/Person.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesDependentClasses/src/main/groovy/Person.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/PersonImpl.Groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/PersonImpl.Groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/PersonImpl.Groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalGroovyCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/groovy/PersonImpl.Groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/IPerson.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/IPerson.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/IPerson.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/IPerson.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClasses/src/main/java/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/NewIPerson.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/NewIPerson.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/NewIPerson.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/NewIPerson.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/app/src/main/java/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/app/src/main/java/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/app/src/main/java/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/app/src/main/java/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/lib/src/main/java/IPerson.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/lib/src/main/java/IPerson.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/lib/src/main/java/IPerson.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/lib/src/main/java/IPerson.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesDependentClassesAcrossProjectBoundaries/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/java/Test.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/java/Test.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/java/Test.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalJavaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/java/Test.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.scala b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.scala
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.scala
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/NewIPerson.scala
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/IPerson.scala b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/IPerson.scala
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/IPerson.scala
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/IPerson.scala
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/Person.scala b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/Person.scala
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/Person.scala
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesDependentClasses/src/main/scala/Person.scala
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/PersonImpl.scala b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/PersonImpl.scala
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/PersonImpl.scala
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalScalaCompileIntegrationTest/recompilesSourceWhenPropertiesChange/src/main/scala/PersonImpl.scala
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/doesNotRunStaleTests/src/test/java/Broken.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/doesNotRunStaleTests/src/test/java/Broken.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/doesNotRunStaleTests/src/test/java/Broken.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/doesNotRunStaleTests/src/test/java/Broken.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitExtra.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitExtra.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitExtra.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitExtra.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/JUnitTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/TestNGTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/TestNGTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/TestNGTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSelectedTestsChange/src/test/java/TestNGTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewMainClass.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewMainClass.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewMainClass.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewMainClass.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewOk.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewOk.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewOk.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/NewOk.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/src/main/java/MainClass.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/src/main/java/MainClass.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/src/main/java/MainClass.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/executesTestsWhenSourceChanges/src/main/java/MainClass.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/src/test/java/Ok.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/src/test/java/Ok.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/src/test/java/Ok.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/IncrementalTestIntegrationTest/shared/src/test/java/Ok.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test1.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test1.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test1.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test1.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test2.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test2.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test2.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canHaveMultipleTestTaskInstances/src/test/java/org/gradle/Test2.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/src/test/java/org/gradle/Test1.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/src/test/java/org/gradle/Test1.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/src/test/java/org/gradle/Test1.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunJunit3Tests/src/test/java/org/gradle/Test1.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/NotATest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/NotATest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/NotATest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/NotATest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok2.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok2.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok2.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/canRunSingleTests/src/test/java/Ok2.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/AbstractHasRunWith.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/AbstractHasRunWith.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/AbstractHasRunWith.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/AbstractHasRunWith.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/CustomRunner.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/CustomRunner.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/CustomRunner.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/CustomRunner.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/EmptyRunWithSubclass.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/EmptyRunWithSubclass.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/EmptyRunWithSubclass.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/EmptyRunWithSubclass.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/TestsOnInner.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/TestsOnInner.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/TestsOnInner.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/detectsTestClasses/src/test/java/org/gradle/TestsOnInner.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OtherTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OtherTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OtherTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OtherTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfter.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfter.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfter.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfter.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfterClass.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfterClass.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfterClass.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenAfterClass.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBefore.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBefore.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBefore.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBefore.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeAndAfter.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeAndAfter.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeAndAfter.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeAndAfter.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeClass.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeClass.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeClass.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenBeforeClass.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenConstructor.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenConstructor.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenConstructor.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenConstructor.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenException.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenException.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenException.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenException.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/BrokenTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/Unloadable.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/Unloadable.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/Unloadable.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/JUnitIntegrationTest/reportsAndBreaksBuildWhenTestFails/src/test/java/org/gradle/Unloadable.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/buildSrc/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/buildSrc/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/buildSrc/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/buildSrc/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/external.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/external.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/external.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/external.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/init.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/init.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/init.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/init.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/buildSrc/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/buildSrc/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/buildSrc/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/nestedBuild/buildSrc/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project1/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project1/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project1/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project1/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project2/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project2/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project2/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/project2/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/logging/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/multiThreaded/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/multiThreaded/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/multiThreaded/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/LoggingIntegrationTest/multiThreaded/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/main/java/Person.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/main/java/Person.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/main/java/Person.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/main/java/Person.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/test/java/PersonTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/test/java/PersonTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/test/java/PersonTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/ProjectLayoutIntegrationTest/canUseANonStandardBuildDir/src/test/java/PersonTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/ignore/bad.file b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/ignore/bad.file
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/ignore/bad.file
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/ignore/bad.file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.a b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.a
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.a
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.a
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.b b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.b
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.b
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/one.b
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/ignore/bad.file b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/ignore/bad.file
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/ignore/bad.file
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/ignore/bad.file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.a b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.a
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.a
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.a
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.b b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.b
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.b
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/one/sub/onesub.b
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.a b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.a
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.a
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.a
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.b b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.b
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.b
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/root.b
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/ignore/bad.file b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/ignore/bad.file
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/ignore/bad.file
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/ignore/bad.file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.a b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.a
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.a
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.a
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.b b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.b
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.b
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src/two/two.b
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.a b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.a
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.a
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.a
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.b b/subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.b
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.b
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/copyTestResources/src2/three/three.b
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedClasspathFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedClasspathFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedClasspathFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedClasspathFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedProjectFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedProjectFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedProjectFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/groovy/expectedProjectFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiClasspathFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiClasspathFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiClasspathFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiClasspathFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiProjectFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiProjectFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiProjectFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedApiProjectFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceClasspathFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceClasspathFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceClasspathFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceClasspathFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceProjectFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceProjectFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceProjectFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceProjectFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceWtpFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceWtpFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceWtpFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/java/expectedWebserviceWtpFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedClasspathFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedClasspathFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedClasspathFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedClasspathFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedProjectFile.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedProjectFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedProjectFile.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/eclipseproject/scala/expectedProjectFile.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithMetadataArtifacts/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/settings.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/settings.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/settings.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenProjectIntegrationTest/canDeployAProjectWithNoMainArtifact/settings.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/producer.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/producer.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/producer.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/producer.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/projectWithMavenSnapshots.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/projectWithMavenSnapshots.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/projectWithMavenSnapshots.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/projectWithMavenSnapshots.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/src/main/java/org/gradle/Test.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/src/main/java/org/gradle/Test.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/src/main/java/org/gradle/Test.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/MavenSnapshotIntegrationTest/shared/src/main/java/org/gradle/Test.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedNewPom.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedNewPom.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedNewPom.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedNewPom.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedPom.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedPom.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedPom.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedPom.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedQuickstartPom.txt b/subprojects/core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedQuickstartPom.txt
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedQuickstartPom.txt
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/maven/pomGeneration/expectedQuickstartPom.txt
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/AppException.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/AppException.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/AppException.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/AppException.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/SomeTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/SomeTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/SomeTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/canListenForTestResults/src/test/java/SomeTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/executesTestsInCorrectEnvironment/src/test/java/org/gradle/OkTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/main/groovy/org/gradle/Ok.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/main/groovy/org/gradle/Ok.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/main/groovy/org/gradle/Ok.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/main/groovy/org/gradle/Ok.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/test/groovy/org/gradle/BadTest.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/test/groovy/org/gradle/BadTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/test/groovy/org/gradle/BadTest.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Failing/src/test/groovy/org/gradle/BadTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/main/groovy/org/gradle/Ok.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/main/groovy/org/gradle/Ok.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/main/groovy/org/gradle/Ok.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/main/groovy/org/gradle/Ok.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/test/groovy/org/gradle/OkTest.groovy b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/test/groovy/org/gradle/OkTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/test/groovy/org/gradle/OkTest.groovy
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/groovyJdk15Passing/src/test/groovy/org/gradle/OkTest.groovy
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/main/java/org/gradle/Ok.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/main/java/org/gradle/Ok.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/main/java/org/gradle/Ok.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/main/java/org/gradle/Ok.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/test/java/org/gradle/BadTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/test/java/org/gradle/BadTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/test/java/org/gradle/BadTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk14Failing/src/test/java/org/gradle/BadTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/build.gradle b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/build.gradle
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/build.gradle
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/build.gradle
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/main/java/org/gradle/Ok.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/main/java/org/gradle/Ok.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/main/java/org/gradle/Ok.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/main/java/org/gradle/Ok.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BadTest.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BadTest.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BadTest.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BadTest.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BrokenAfterSuite.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BrokenAfterSuite.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BrokenAfterSuite.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/BrokenAfterSuite.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenMethodDependency.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenMethodDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenMethodDependency.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenMethodDependency.java
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenSetup.java b/subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenSetup.java
similarity index 100%
rename from subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenSetup.java
rename to subprojects/core/src/integTest/resources/org/gradle/integtests/testng/TestNGIntegrationTest/javaJdk15Failing/src/test/java/org/gradle/TestWithBrokenSetup.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/BuildAdapter.java b/subprojects/core/src/main/groovy/org/gradle/BuildAdapter.java
new file mode 100644
index 0000000..4e825c9
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/BuildAdapter.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle;
+
+import org.gradle.api.initialization.Settings;
+import org.gradle.api.invocation.Gradle;
+
+/**
+ * A {@link BuildListener} adapter class for receiving build events. The methods in this class are empty. This class
+ * exists as convenience for creating listener objects.
+ */
+public class BuildAdapter implements BuildListener {
+    public void buildStarted(Gradle gradle) {
+    }
+
+    public void settingsEvaluated(Settings settings) {
+    }
+
+    public void projectsLoaded(Gradle gradle) {
+    }
+
+    public void projectsEvaluated(Gradle gradle) {
+    }
+
+    public void buildFinished(BuildResult result) {
+    }
+}
+
diff --git a/subprojects/core/src/main/groovy/org/gradle/BuildExceptionReporter.java b/subprojects/core/src/main/groovy/org/gradle/BuildExceptionReporter.java
new file mode 100644
index 0000000..8c187e5
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/BuildExceptionReporter.java
@@ -0,0 +1,264 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle;
+
+import org.codehaus.groovy.runtime.StackTraceUtils;
+import org.gradle.api.Action;
+import org.gradle.api.GradleException;
+import org.gradle.api.LocationAwareException;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.configuration.ImplicitTasksConfigurer;
+import org.gradle.execution.TaskSelectionException;
+import org.gradle.initialization.BuildClientMetaData;
+import org.gradle.initialization.DefaultCommandLineConverter;
+import org.gradle.logging.StyledTextOutput;
+import org.gradle.logging.StyledTextOutputFactory;
+import org.gradle.logging.internal.AbstractStyledTextOutput;
+import org.gradle.logging.internal.LoggingCommandLineConverter;
+import org.gradle.util.GUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.gradle.logging.StyledTextOutput.Style.Failure;
+import static org.gradle.logging.StyledTextOutput.Style.UserInput;
+
+/**
+ * A {@link BuildListener} which reports the build exception, if any.
+ */
+public class BuildExceptionReporter extends BuildAdapter {
+    public final BuildClientMetaData clientMetaData;
+
+    private enum ExceptionStyle {
+        None, Sanitized, Full
+    }
+
+    private final StyledTextOutputFactory textOutputFactory;
+    private final StartParameter startParameter;
+
+    public BuildExceptionReporter(StyledTextOutputFactory textOutputFactory, StartParameter startParameter, BuildClientMetaData clientMetaData) {
+        this.textOutputFactory = textOutputFactory;
+        this.startParameter = startParameter;
+        this.clientMetaData = clientMetaData;
+    }
+
+    public void buildFinished(BuildResult result) {
+        Throwable failure = result.getFailure();
+        if (failure == null) {
+            return;
+        }
+
+        reportException(failure);
+    }
+
+    public void reportException(Throwable failure) {
+        FailureDetails details = new FailureDetails(failure);
+        if (failure instanceof GradleException) {
+            reportBuildFailure((GradleException) failure, details);
+        } else {
+            reportInternalError(details);
+        }
+
+        write(details);
+    }
+
+    protected void write(FailureDetails details) {
+        StyledTextOutput output = textOutputFactory.create(BuildExceptionReporter.class, LogLevel.ERROR);
+
+        output.println();
+        output.withStyle(Failure).text("FAILURE: ");
+        details.summary.replay(output.withStyle(Failure));
+
+        if (details.location.hasContent) {
+            output.println().println();
+            output.println("* Where:");
+            details.location.replay(output);
+        }
+
+        if (details.details.hasContent) {
+            output.println().println();
+            output.println("* What went wrong:");
+            details.details.replay(output);
+        }
+
+        if (details.resolution.hasContent) {
+            output.println().println();
+            output.println("* Try:");
+            details.resolution.replay(output);
+        }
+
+        Throwable exception = null;
+        switch (details.exception) {
+            case None:
+                break;
+            case Sanitized:
+                exception = StackTraceUtils.deepSanitize(details.failure);
+                break;
+            case Full:
+                exception = details.failure;
+                break;
+        }
+
+        if (exception != null) {
+            output.println().println();
+            output.println("* Exception is:");
+            output.exception(exception);
+        }
+
+        output.println();
+    }
+
+    public void reportInternalError(FailureDetails details) {
+        details.summary.text("Build aborted because of an internal error.");
+        details.details.text("Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.");
+        details.resolution.text("Run with ");
+        details.resolution.withStyle(UserInput).format("-%s", LoggingCommandLineConverter.DEBUG);
+        details.resolution.text(" option to get additional debug info.");
+        details.exception = ExceptionStyle.Full;
+    }
+
+    private void reportBuildFailure(GradleException failure, FailureDetails details) {
+        boolean debug = startParameter.getLogLevel() == LogLevel.DEBUG;
+        boolean stacktrace = startParameter != null
+                && (startParameter.getShowStacktrace() != StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS
+                        || debug);
+        if (stacktrace) {
+            details.exception = ExceptionStyle.Sanitized;
+        }
+        boolean fullStacktrace = startParameter != null
+                && (startParameter.getShowStacktrace() == StartParameter.ShowStacktrace.ALWAYS_FULL);
+        if (fullStacktrace) {
+            details.exception = ExceptionStyle.Full;
+        }
+
+        if (failure instanceof TaskSelectionException) {
+            formatTaskSelectionFailure((TaskSelectionException) failure, details);
+        } else {
+            formatGenericFailure(failure, debug, stacktrace, fullStacktrace, details);
+        }
+    }
+
+    private void formatTaskSelectionFailure(TaskSelectionException failure, FailureDetails details) {
+        assert failure.getCause() == null;
+        details.summary.text("Could not determine which tasks to execute.");
+        details.details.text(getMessage(failure));
+        details.resolution.text("Run ");
+        clientMetaData.describeCommand(details.resolution.withStyle(UserInput), ImplicitTasksConfigurer.TASKS_TASK);
+        details.resolution.text(" to get a list of available tasks.");
+    }
+
+    private void formatGenericFailure(GradleException failure, boolean debug, boolean stacktrace, boolean fullStacktrace,
+                                      FailureDetails details) {
+        details.summary.text("Build failed with an exception.");
+        if (!debug) {
+            if (!stacktrace && !fullStacktrace) {
+                details.resolution.text("Run with ");
+                details.resolution.withStyle(UserInput).format("-%s", DefaultCommandLineConverter.STACKTRACE);
+                details.resolution.text(" or ");
+                details.resolution.withStyle(UserInput).format("-%s", LoggingCommandLineConverter.DEBUG);
+                details.resolution.text(" option to get more details. ");
+            } else {
+                details.resolution.text("Run with ");
+                details.resolution.withStyle(UserInput).format("-%s", LoggingCommandLineConverter.DEBUG);
+                details.resolution.text(" option to get more details. ");
+            }
+            if (!fullStacktrace) {
+                details.resolution.text("Run with ");
+                details.resolution.withStyle(UserInput).format("-%s", DefaultCommandLineConverter.FULL_STACKTRACE);
+                details.resolution.text(" option to get the full (very verbose) stacktrace.");
+            }
+        }
+
+        if (failure instanceof LocationAwareException) {
+            LocationAwareException scriptException = (LocationAwareException) failure;
+            if (scriptException.getLocation() != null) {
+                details.location.text(scriptException.getLocation());
+            }
+            details.details.text(scriptException.getOriginalMessage());
+            for (Throwable cause : scriptException.getReportableCauses()) {
+                details.details.format("%nCause: %s", getMessage(cause));
+            }
+        } else {
+            details.details.text(getMessage(failure));
+        }
+    }
+
+    private String getMessage(Throwable throwable) {
+        String message = throwable.getMessage();
+        if (GUtil.isTrue(message)) {
+            return message;
+        }
+        return String.format("%s (no error message)", throwable.getClass().getName());
+    }
+
+    private static class FailureDetails {
+        private ExceptionStyle exception = ExceptionStyle.None;
+        private final RecordingStyledTextOutput summary = new RecordingStyledTextOutput();
+        private final RecordingStyledTextOutput details = new RecordingStyledTextOutput();
+        private final RecordingStyledTextOutput location = new RecordingStyledTextOutput();
+        private final RecordingStyledTextOutput resolution = new RecordingStyledTextOutput();
+        private final Throwable failure;
+
+        public FailureDetails(Throwable failure) {
+            this.failure = failure;
+        }
+    }
+
+    private static class RecordingStyledTextOutput extends AbstractStyledTextOutput {
+        private final List<Action<StyledTextOutput>> events = new ArrayList<Action<StyledTextOutput>>();
+        private boolean hasContent;
+
+        void replay(StyledTextOutput output) {
+            for (Action<StyledTextOutput> event : events) {
+                event.execute(output);
+            }
+            events.clear();
+        }
+
+        @Override
+        protected void doStyleChange(final Style style) {
+            if (!events.isEmpty() && (events.get(events.size() - 1) instanceof ChangeStyleAction)) {
+                events.remove(events.size() - 1);
+            }
+            events.add(new ChangeStyleAction(style));
+        }
+
+        @Override
+        protected void doAppend(final String text) {
+            if (text.length() == 0) {
+                return;
+            }
+            hasContent = true;
+            events.add(new Action<StyledTextOutput>() {
+                public void execute(StyledTextOutput styledTextOutput) {
+                    styledTextOutput.text(text);
+                }
+            });
+        }
+
+        private static class ChangeStyleAction implements Action<StyledTextOutput> {
+            private final Style style;
+
+            public ChangeStyleAction(Style style) {
+                this.style = style;
+            }
+
+            public void execute(StyledTextOutput styledTextOutput) {
+                styledTextOutput.style(style);
+            }
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildListener.java b/subprojects/core/src/main/groovy/org/gradle/BuildListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/BuildListener.java
rename to subprojects/core/src/main/groovy/org/gradle/BuildListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildLogger.java b/subprojects/core/src/main/groovy/org/gradle/BuildLogger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/BuildLogger.java
rename to subprojects/core/src/main/groovy/org/gradle/BuildLogger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildResult.java b/subprojects/core/src/main/groovy/org/gradle/BuildResult.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/BuildResult.java
rename to subprojects/core/src/main/groovy/org/gradle/BuildResult.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildResultLogger.java b/subprojects/core/src/main/groovy/org/gradle/BuildResultLogger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/BuildResultLogger.java
rename to subprojects/core/src/main/groovy/org/gradle/BuildResultLogger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/CacheUsage.java b/subprojects/core/src/main/groovy/org/gradle/CacheUsage.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/CacheUsage.java
rename to subprojects/core/src/main/groovy/org/gradle/CacheUsage.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/CommandLineArgumentException.java b/subprojects/core/src/main/groovy/org/gradle/CommandLineArgumentException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/CommandLineArgumentException.java
rename to subprojects/core/src/main/groovy/org/gradle/CommandLineArgumentException.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/GradleLauncher.java b/subprojects/core/src/main/groovy/org/gradle/GradleLauncher.java
new file mode 100644
index 0000000..94475cf
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/GradleLauncher.java
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle;
+
+import org.gradle.api.logging.StandardOutputListener;
+import org.gradle.initialization.DefaultGradleLauncherFactory;
+import org.gradle.initialization.GradleLauncherFactory;
+
+/**
+ * <p>{@code GradleLauncher} is the main entry point for embedding Gradle. You use this class to manage a Gradle build,
+ * as follows:</p>
+ *
+ * <ol>
+ *
+ * <li>Optionally create a {@link StartParameter} instance and configure it with the desired properties. The properties
+ * of {@code StartParameter} generally correspond to the command-line options of Gradle. You can use {@link
+ * #createStartParameter(String...)} to create a {@link StartParameter} from a set of command-line options.</li>
+ *
+ * <li>Obtain a {@code GradleLauncher} instance by calling {@link #newInstance}, passing in the {@code StartParameter},
+ * or an array of Strings that will be treated as command line arguments.</li>
+ *
+ * <li>Optionally add one or more listeners to the {@code GradleLauncher}.</li>
+ *
+ * <li>Call {@link #run} to execute the build. This will return a {@link BuildResult}. Note that if the build fails, the
+ * resulting exception will be contained in the {@code BuildResult}.</li>
+ *
+ * <li>Query the build result. You might want to call {@link BuildResult#rethrowFailure()} to rethrow any build
+ * failure.</li>
+ *
+ * </ol>
+ *
+ * @author Hans Dockter
+ */
+public abstract class GradleLauncher {
+
+    private static GradleLauncherFactory factory;
+
+    /**
+     * <p>Executes the build for this {@code GradleLauncher} instance and returns the result. Note that when the build
+     * fails, the exception is available using {@link org.gradle.BuildResult#getFailure()}.</p>
+     *
+     * @return The result. Never returns null.
+     */
+    public abstract BuildResult run();
+
+    /**
+     * Evaluates the settings and all the projects. The information about available tasks and projects is accessible via
+     * the {@link org.gradle.api.invocation.Gradle#getRootProject()} object.
+     *
+     * @return The result. Never returns null.
+     */
+    public abstract BuildResult getBuildAnalysis();
+
+    /**
+     * Evaluates the settings and all the projects. The information about available tasks and projects is accessible via
+     * the {@link org.gradle.api.invocation.Gradle#getRootProject()} object. Fills the execution plan without running
+     * the build. The tasks to be executed tasks are available via {@link org.gradle.api.invocation.Gradle#getTaskGraph()}.
+     *
+     * @return The result. Never returns null.
+     */
+    public abstract BuildResult getBuildAndRunAnalysis();
+
+    /**
+     * Returns a {@code GradleLauncher} instance based on the passed start parameter.
+     *
+     * @param startParameter The start parameter object the GradleLauncher instance is initialized with
+     * @return The {@code GradleLauncher}. Never returns null.
+     */
+    public static GradleLauncher newInstance(final StartParameter startParameter) {
+        return getFactory().newInstance(startParameter);
+    }
+
+    public static synchronized GradleLauncherFactory getFactory() {
+        if (factory == null) {
+            factory = new DefaultGradleLauncherFactory();
+        }
+        return factory;
+    }
+
+    /**
+     * Returns a {@code GradleLauncher} instance based on the passed command line syntax arguments.
+     *
+     * @param commandLineArgs A String array where each element denotes an entry of the Gradle command line syntax
+     * @return The {@code GradleLauncher}. Never returns null.
+     */
+    public static GradleLauncher newInstance(String... commandLineArgs) {
+        return newInstance(createStartParameter(commandLineArgs));
+    }
+
+    /**
+     * Returns a {@code StartParameter} object out of command line syntax arguments. Each command line option has an
+     * associated field in the {@code StartParameter} object.
+     *
+     * @param commandLineArgs A String array where each element denotes an entry of the Gradle command line syntax
+     * @return The {@code GradleLauncher}. Never returns null.
+     */
+    public static StartParameter createStartParameter(final String... commandLineArgs) {
+        return getFactory().createStartParameter(commandLineArgs);
+    }
+
+    public static synchronized void injectCustomFactory(GradleLauncherFactory gradleLauncherFactory) {
+        factory = gradleLauncherFactory;
+    }
+
+    /**
+     * <p>Adds a listener to this build instance. The listener is notified of events which occur during the execution of
+     * the build. See {@link org.gradle.api.invocation.Gradle#addListener(Object)} for supported listener types.</p>
+     *
+     * @param listener The listener to add. Has no effect if the listener has already been added.
+     */
+    public abstract void addListener(Object listener);
+
+    /**
+     * Use the given listener. See {@link org.gradle.api.invocation.Gradle#useLogger(Object)} for details.
+     *
+     * @param logger The logger to use.
+     */
+    public abstract void useLogger(Object logger);
+
+    /**
+     * <p>Adds a {@link StandardOutputListener} to this build instance. The listener is notified of any text written to
+     * standard output by Gradle's logging system
+     *
+     * @param listener The listener to add. Has no effect if the listener has already been added.
+     */
+    public abstract void addStandardOutputListener(StandardOutputListener listener);
+
+    /**
+     * <p>Adds a {@link StandardOutputListener} to this build instance. The listener is notified of any text written to
+     * standard error by Gradle's logging system
+     *
+     * @param listener The listener to add. Has no effect if the listener has already been added.
+     */
+    public abstract void addStandardErrorListener(StandardOutputListener listener);
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/StartParameter.java b/subprojects/core/src/main/groovy/org/gradle/StartParameter.java
new file mode 100644
index 0000000..d11f83e
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/StartParameter.java
@@ -0,0 +1,551 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle;
+
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.execution.*;
+import org.gradle.groovy.scripts.UriScriptSource;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.gradle.groovy.scripts.StringScriptSource;
+import org.gradle.initialization.*;
+import org.gradle.util.GFileUtils;
+import org.gradle.util.GUtil;
+
+import java.io.File;
+import java.util.*;
+
+/**
+ * <p>{@code StartParameter} defines the configuration used by a {@link GradleLauncher} instance to execute a build. The
+ * properties of {@code StartParameter} generally correspond to the command-line options of Gradle. You pass a {@code
+ * StartParameter} instance to {@link GradleLauncher#newInstance(StartParameter)} when you create a new {@code Gradle}
+ * instance.</p>
+ *
+ * <p>You can obtain an instance of a {@code StartParameter} by either creating a new one, or duplicating an existing
+ * one using {@link #newInstance} or {@link #newBuild}.</p>
+ *
+ * @author Hans Dockter
+ * @see GradleLauncher
+ */
+public class StartParameter {
+    public static final String GRADLE_USER_HOME_PROPERTY_KEY = "gradle.user.home";
+    /**
+     * The default user home directory.
+     */
+    public static final File DEFAULT_GRADLE_USER_HOME = new File(System.getProperty("user.home") + "/.gradle");
+
+    /**
+     * Specifies the detail to include in stacktraces.
+     */
+    public enum ShowStacktrace {
+        INTERNAL_EXCEPTIONS, ALWAYS, ALWAYS_FULL
+    }
+
+    private List<String> taskNames = new ArrayList<String>();
+    private Set<String> excludedTaskNames = new HashSet<String>();
+    private ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction
+            = new ProjectDependenciesBuildInstruction(true);
+    private File currentDir;
+    private boolean searchUpwards = true;
+    private Map<String, String> projectProperties = new HashMap<String, String>();
+    private Map<String, String> systemPropertiesArgs = new HashMap<String, String>();
+    private File gradleUserHomeDir;
+    private CacheUsage cacheUsage = CacheUsage.ON;
+    private ScriptSource buildScriptSource;
+    private ScriptSource settingsScriptSource;
+    private BuildExecuter buildExecuter;
+    private ProjectSpec defaultProjectSelector;
+    private LogLevel logLevel = LogLevel.LIFECYCLE;
+    private ShowStacktrace showStacktrace = ShowStacktrace.INTERNAL_EXCEPTIONS;
+    private File buildFile;
+    private List<File> initScripts = new ArrayList<File>();
+    private boolean dryRun;
+    private boolean noOpt;
+    private boolean colorOutput = true;
+    private boolean profile;
+
+    /**
+     * Creates a {@code StartParameter} with default values. This is roughly equivalent to running Gradle on the
+     * command-line with no arguments.
+     */
+    public StartParameter() {
+        String gradleUserHome = System.getProperty(GRADLE_USER_HOME_PROPERTY_KEY);
+        if (gradleUserHome == null) {
+            gradleUserHome = System.getenv("GRADLE_USER_HOME");
+            if (gradleUserHome == null) {
+                gradleUserHome = DEFAULT_GRADLE_USER_HOME.getAbsolutePath();
+            }
+        }
+
+        gradleUserHomeDir = GFileUtils.canonicalise(new File(gradleUserHome));
+        setCurrentDir(null);
+    }
+
+    /**
+     * Duplicates this {@code StartParameter} instance.
+     *
+     * @return the new parameters.
+     */
+    public StartParameter newInstance() {
+        StartParameter startParameter = new StartParameter();
+        startParameter.buildFile = buildFile;
+        startParameter.taskNames = taskNames;
+        startParameter.projectDependenciesBuildInstruction = projectDependenciesBuildInstruction;
+        startParameter.currentDir = currentDir;
+        startParameter.searchUpwards = searchUpwards;
+        startParameter.projectProperties = projectProperties;
+        startParameter.systemPropertiesArgs = systemPropertiesArgs;
+        startParameter.gradleUserHomeDir = gradleUserHomeDir;
+        startParameter.cacheUsage = cacheUsage;
+        startParameter.buildScriptSource = buildScriptSource;
+        startParameter.settingsScriptSource = settingsScriptSource;
+        startParameter.initScripts = new ArrayList<File>(initScripts); 
+        startParameter.buildExecuter = buildExecuter;
+        startParameter.defaultProjectSelector = defaultProjectSelector;
+        startParameter.logLevel = logLevel;
+        startParameter.colorOutput = colorOutput;
+        startParameter.showStacktrace = showStacktrace;
+        startParameter.dryRun = dryRun;
+        startParameter.noOpt = noOpt;
+        startParameter.profile = profile;
+        return startParameter;
+    }
+
+    /**
+     * <p>Creates the parameters for a new build, using these parameters as a template. Copies the environmental
+     * properties from this parameter (eg gradle user home dir, etc), but does not copy the build specific properties
+     * (eg task names).</p>
+     *
+     * @return The new parameters.
+     */
+    public StartParameter newBuild() {
+        StartParameter startParameter = new StartParameter();
+        startParameter.gradleUserHomeDir = gradleUserHomeDir;
+        startParameter.cacheUsage = cacheUsage;
+        startParameter.logLevel = logLevel;
+        startParameter.colorOutput = colorOutput;
+        startParameter.profile = profile;
+        return startParameter;
+    }
+
+    public boolean equals(Object obj) {
+        return EqualsBuilder.reflectionEquals(this, obj);
+    }
+
+    public int hashCode() {
+        return HashCodeBuilder.reflectionHashCode(this);
+    }
+
+    /**
+     * Returns the build file to use to select the default project. Returns null when the build file is not used to
+     * select the default project.
+     *
+     * @return The build file. May be null.
+     */
+    public File getBuildFile() {
+        return buildFile;
+    }
+
+    /**
+     * Sets the build file to use to select the default project. Use null to disable selecting the default project using
+     * the build file.
+     *
+     * @param buildFile The build file. May be null.
+     */
+    public void setBuildFile(File buildFile) {
+        if (buildFile == null) {
+            this.buildFile = null;
+            setCurrentDir(null);
+        } else {
+            this.buildFile = GFileUtils.canonicalise(buildFile);
+            currentDir = this.buildFile.getParentFile();
+            defaultProjectSelector = new BuildFileProjectSpec(this.buildFile);
+        }
+    }
+
+    /**
+     * <p>Returns the {@link ScriptSource} to use for the build file for this build. Returns null when the default build
+     * file(s) are to be used. This source is used for <em>all</em> projects included in the build.</p>
+     *
+     * @return The build file source, or null to use the defaults.
+     */
+    public ScriptSource getBuildScriptSource() {
+        return buildScriptSource;
+    }
+
+    /**
+     * <p>Returns the {@link ScriptSource} to use for the settings script for this build. Returns null when the default
+     * settings script is to be used.</p>
+     *
+     * @return The settings script source, or null to use the default.
+     */
+    public ScriptSource getSettingsScriptSource() {
+        return settingsScriptSource;
+    }
+
+    /**
+     * <p>Sets the {@link ScriptSource} to use for the settings script. Set to null to use the default settings
+     * script.</p>
+     *
+     * @param settingsScriptSource The settings script source.
+     */
+    public void setSettingsScriptSource(ScriptSource settingsScriptSource) {
+        this.settingsScriptSource = settingsScriptSource;
+    }
+
+    /**
+     * <p>Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
+     * </p>
+     *
+     * @param buildScriptText The script to use as the build file.
+     * @return this
+     */
+    public StartParameter useEmbeddedBuildFile(String buildScriptText) {
+        return setBuildScriptSource(new StringScriptSource("embedded build file", buildScriptText));
+    }
+    
+    /**
+     * <p>Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
+     * </p>
+     *
+     * @param buildScript The script to use as the build file.
+     * @return this
+     */
+    public StartParameter setBuildScriptSource(ScriptSource buildScript) {
+        buildScriptSource = buildScript;
+        settingsScriptSource = new StringScriptSource("empty settings file", "");
+        searchUpwards = false;
+        return this;
+    }
+
+    /**
+     * <p>Returns the {@link BuildExecuter} to use for the build.</p>
+     *
+     * @return The {@link BuildExecuter}. Never returns null.
+     */
+    public BuildExecuter getBuildExecuter() {
+        BuildExecuter executer = buildExecuter;
+        if (executer == null) {
+            executer = new DefaultBuildExecuter(taskNames, excludedTaskNames);
+        }
+        if (dryRun) {
+            executer = new DryRunBuildExecuter(executer);
+        }
+        return executer;
+    }
+
+    /**
+     * <p>Sets the {@link BuildExecuter} to use for the build. You can use the method to change the algorithm used to
+     * execute the build, by providing your own {@code BuildExecuter} implementation.</p>
+     *
+     * <p> Set to null to use the default executer. When this property is set to a non-null value, the taskNames and
+     * mergedBuild properties are ignored.</p>
+     *
+     * @param buildExecuter The executer to use, or null to use the default executer.
+     */
+    public void setBuildExecuter(BuildExecuter buildExecuter) {
+        this.buildExecuter = buildExecuter;
+    }
+
+    /**
+     * Returns the names of the tasks to execute in this build. When empty, the default tasks for the project will be
+     * executed.
+     *
+     * @return the names of the tasks to execute in this build. Never returns null.
+     */
+    public List<String> getTaskNames() {
+        return taskNames;
+    }
+
+    /**
+     * <p>Sets the tasks to execute in this build. Set to an empty list, or null, to execute the default tasks for the
+     * project. The tasks are executed in the order provided, subject to dependency between the tasks.</p>
+     *
+     * @param taskNames the names of the tasks to execute in this build.
+     */
+    public void setTaskNames(Collection<String> taskNames) {
+        this.taskNames = !GUtil.isTrue(taskNames) ? new ArrayList<String>() : new ArrayList<String>(taskNames);
+        buildExecuter = null;
+    }
+
+    /**
+     * Returns the names of the tasks to be excluded from this build. When empty, no tasks are excluded from the build.
+     *
+     * @return The names of the excluded tasks. Returns an empty set if there are no such tasks.
+     */
+    public Set<String> getExcludedTaskNames() {
+        return excludedTaskNames;
+    }
+
+    /**
+     * Sets the tasks to exclude from this build.
+     *
+     * @param excludedTaskNames The task names. Can be null.
+     */
+    public void setExcludedTaskNames(Collection<String> excludedTaskNames) {
+        this.excludedTaskNames = !GUtil.isTrue(excludedTaskNames) ? new HashSet<String>() : new HashSet<String>(excludedTaskNames);
+    }
+
+    /**
+     * Returns the directory to use to select the default project, and to search for the settings file.
+     *
+     * @return The current directory. Never returns null.
+     */
+    public File getCurrentDir() {
+        return currentDir;
+    }
+
+    /**
+     * Sets the directory to use to select the default project, and to search for the settings file. Set to null to use
+     * the default current directory.
+     *
+     * @param currentDir The directory. Should not be null.
+     */
+    public void setCurrentDir(File currentDir) {
+        if (currentDir != null) {
+            this.currentDir = GFileUtils.canonicalise(currentDir);
+        } else {
+            this.currentDir = GFileUtils.canonicalise(new File(System.getProperty("user.dir")));
+        }
+        defaultProjectSelector = null;
+    }
+
+    public boolean isSearchUpwards() {
+        return searchUpwards;
+    }
+
+    public void setSearchUpwards(boolean searchUpwards) {
+        this.searchUpwards = searchUpwards;
+    }
+
+    public Map<String, String> getProjectProperties() {
+        return projectProperties;
+    }
+
+    public void setProjectProperties(Map<String, String> projectProperties) {
+        this.projectProperties = projectProperties;
+    }
+
+    public Map<String, String> getSystemPropertiesArgs() {
+        return systemPropertiesArgs;
+    }
+
+    public void setSystemPropertiesArgs(Map<String, String> systemPropertiesArgs) {
+        this.systemPropertiesArgs = systemPropertiesArgs;
+    }
+
+    /**
+     * Returns the directory to use as the user home directory.
+     *
+     * @return The home directory.
+     */
+    public File getGradleUserHomeDir() {
+        return gradleUserHomeDir;
+    }
+
+    /**
+     * Sets the directory to use as the user home directory. Set to null to use the default directory.
+     *
+     * @param gradleUserHomeDir The home directory. May be null.
+     */
+    public void setGradleUserHomeDir(File gradleUserHomeDir) {
+        this.gradleUserHomeDir = gradleUserHomeDir == null ? DEFAULT_GRADLE_USER_HOME : GFileUtils.canonicalise(gradleUserHomeDir);
+    }
+
+    public ProjectDependenciesBuildInstruction getProjectDependenciesBuildInstruction() {
+        return projectDependenciesBuildInstruction;
+    }
+
+    public void setProjectDependenciesBuildInstruction(
+            ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction) {
+        this.projectDependenciesBuildInstruction = projectDependenciesBuildInstruction;
+    }
+
+    public CacheUsage getCacheUsage() {
+        return cacheUsage;
+    }
+
+    public void setCacheUsage(CacheUsage cacheUsage) {
+        this.cacheUsage = cacheUsage;
+    }
+
+    public boolean isDryRun() {
+        return dryRun;
+    }
+
+    public void setDryRun(boolean dryRun) {
+        this.dryRun = dryRun;
+    }
+
+    public boolean isNoOpt() {
+        return noOpt;
+    }
+
+    public void setNoOpt(boolean noOpt) {
+        this.noOpt = noOpt;
+    }
+
+    /**
+     * Sets the settings file to use for the build. Use null to use the default settings file.
+     *
+     * @param settingsFile The settings file to use. May be null.
+     */
+    public void setSettingsFile(File settingsFile) {
+        if (settingsFile == null) {
+            settingsScriptSource = null;
+        } else {
+            File canonicalFile = GFileUtils.canonicalise(settingsFile);
+            currentDir = canonicalFile.getParentFile();
+            settingsScriptSource = new UriScriptSource("settings file", canonicalFile);
+        }
+    }
+
+    /**
+     * Adds the given file to the list of init scripts that are run before the build starts.  This list is in
+     * addition to the user init script located in ${user.home}/.gradle/init.gradle.
+     * @param initScriptFile The init script to be run during the Gradle invocation.
+     */
+    public void addInitScript(File initScriptFile) {
+        initScripts.add(initScriptFile);
+    }
+
+    public void setInitScripts(List<File> initScripts) {
+        this.initScripts = initScripts;
+    }
+
+    /**
+     * Returns all explicitly added init scripts that will be run before the build starts.  This list does not
+     * contain the user init script located in ${user.home}/.gradle/init.gradle, even though that init script
+     * will also be run.
+     * @return list of all explicitly added init scripts.
+     */
+    public List<File> getInitScripts() {
+        return Collections.unmodifiableList(initScripts);
+    }
+
+    public LogLevel getLogLevel() {
+        return logLevel;
+    }
+
+    public void setLogLevel(LogLevel logLevel) {
+        this.logLevel = logLevel;
+    }
+
+    public ShowStacktrace getShowStacktrace() {
+        return showStacktrace;
+    }
+
+    public void setShowStacktrace(ShowStacktrace showStacktrace) {
+        this.showStacktrace = showStacktrace;
+    }
+
+    /**
+     * Returns the selector used to choose the default project of the build. This is the project used as the starting
+     * point for resolving task names, and for determining the default tasks.
+     *
+     * @return The default project. Never returns null.
+     */
+    public ProjectSpec getDefaultProjectSelector() {
+        return defaultProjectSelector != null ? defaultProjectSelector : new DefaultProjectSpec(currentDir);
+    }
+
+    /**
+     * Sets the selector used to choose the default project of the build.
+     *
+     * @param defaultProjectSelector The selector. Should not be null.
+     */
+    public void setDefaultProjectSelector(ProjectSpec defaultProjectSelector) {
+        this.defaultProjectSelector = defaultProjectSelector;
+    }
+
+    /**
+     * Sets the project directory to use to select the default project. Use null to use the default criteria for
+     * selecting the default project.
+     *
+     * @param projectDir The project directory. May be null.
+     */
+    public void setProjectDir(File projectDir) {
+        if (projectDir == null) {
+            setCurrentDir(null);
+        } else {
+            File canonicalFile = GFileUtils.canonicalise(projectDir);
+            currentDir = canonicalFile;
+            defaultProjectSelector = new ProjectDirectoryProjectSpec(canonicalFile);
+        }
+    }
+
+    /**
+     * Returns true if logging output should be displayed in color when Gradle is running in a terminal which supports
+     * color output. The default value is true.
+     *
+     * @return true if logging output should be displayed in color.
+     */
+    public boolean isColorOutput() {
+        return colorOutput;
+    }
+
+    /**
+     * Specifies whether logging output should be displayed in color.
+     *
+     * @param colorOutput true if logging output should be displayed in color.
+     */
+    public void setColorOutput(boolean colorOutput) {
+        this.colorOutput = colorOutput;
+    }
+
+    /**
+     * Specifies if a profile report should be generated.
+     * @param profile true if a profile report should be generated
+     */
+    public void setProfile(boolean profile) {
+        this.profile = profile;
+    }
+
+    /**
+     * Returns true if a profile report will be generated.
+     */
+    public boolean isProfile() {
+        return profile;
+    }
+
+    @Override
+    public String toString() {
+        return "StartParameter{"
+                + "taskNames=" + taskNames
+                + ", excludedTaskNames=" + excludedTaskNames
+                + ", currentDir=" + currentDir
+                + ", searchUpwards=" + searchUpwards
+                + ", projectProperties=" + projectProperties
+                + ", systemPropertiesArgs=" + systemPropertiesArgs
+                + ", gradleUserHomeDir=" + gradleUserHomeDir
+                + ", cacheUsage=" + cacheUsage
+                + ", buildScriptSource=" + buildScriptSource
+                + ", settingsScriptSource=" + settingsScriptSource
+                + ", buildExecuter=" + buildExecuter
+                + ", defaultProjectSelector=" + defaultProjectSelector
+                + ", logLevel=" + logLevel
+                + ", showStacktrace=" + showStacktrace
+                + ", buildFile=" + buildFile
+                + ", initScripts=" + initScripts
+                + ", dryRun=" + dryRun
+                + ", noOpt=" + noOpt
+                + ", profile=" + profile
+                + '}';
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/TaskExecutionLogger.java b/subprojects/core/src/main/groovy/org/gradle/TaskExecutionLogger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/TaskExecutionLogger.java
rename to subprojects/core/src/main/groovy/org/gradle/TaskExecutionLogger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Action.java b/subprojects/core/src/main/groovy/org/gradle/api/Action.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Action.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Action.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/AntBuilder.java b/subprojects/core/src/main/groovy/org/gradle/api/AntBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/AntBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/api/AntBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Buildable.java b/subprojects/core/src/main/groovy/org/gradle/api/Buildable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Buildable.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Buildable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/CircularReferenceException.java b/subprojects/core/src/main/groovy/org/gradle/api/CircularReferenceException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/CircularReferenceException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/CircularReferenceException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/DefaultTask.java b/subprojects/core/src/main/groovy/org/gradle/api/DefaultTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/DefaultTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/DefaultTask.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/DomainObjectCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/DomainObjectCollection.java
new file mode 100644
index 0000000..98e185f
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/DomainObjectCollection.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api;
+
+import groovy.lang.Closure;
+import org.gradle.api.specs.Spec;
+
+import java.util.Set;
+
+/**
+ * <p>A {@code DomainObjectCollection} represents a read-only set of domain objects of type {@code T}.</p>
+ *
+ * <p>You can use the methods of this interface to query the elements of the collection. You can also add actions
+ * which are executed as elements are added to this collection.</p>
+ *
+ * @param <T> The type of domain objects in this collection.
+ */
+public interface DomainObjectCollection<T> extends Iterable<T> {
+    /**
+     * Returns the objects in this collection.
+     *
+     * @return The objects. Returns an empty set if this collection is empty.
+     */
+    Set<T> getAll();
+
+    /**
+     * Returns the objects in this collection which meet the given specification.
+     *
+     * @param spec The specification to use.
+     * @return The matching objects. Returns an empty set if there are no such objects in this collection.
+     */
+    Set<T> findAll(Spec<? super T> spec);
+
+    /**
+     * Returns a collection containing the objects in this collection of the given type.  The returned collection is
+     * live, so that when matching objects are later added to this collection, they are also visible in the filtered
+     * collection.
+     *
+     * @param type The type of objects to find.
+     * @return The matching objects. Returns an empty set if there are no such objects in this collection.
+     */
+    <S extends T> DomainObjectCollection<S> withType(Class<S> type);
+
+    /**
+     * Returns a collection containing the objects in this collection of the given type. Equivalent to calling
+     * {@code withType(type).all(configureAction)}
+     *
+     * @param type The type of objects to find.
+     * @param configureAction The action to execute for each object in the resulting collection.
+     * @return The matching objects. Returns an empty set if there are no such objects in this collection.
+     */
+    <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction);
+
+    /**
+     * Returns a collection containing the objects in this collection of the given type. Equivalent to calling
+     * {@code withType(type).all(configureClosure)}.
+     *
+     * @param type The type of objects to find.
+     * @param configureClosure The closure to execute for each object in the resulting collection.
+     * @return The matching objects. Returns an empty set if there are no such objects in this collection.
+     */
+    <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure);
+
+    /**
+     * Returns a collection which contains the objects in this collection which meet the given specification. The
+     * returned collection is live, so that when matching objects are added to this collection, they are also visible in
+     * the filtered collection.
+     *
+     * @param spec The specification to use.
+     * @return The collection of matching objects. Returns an empty collection if there are no such objects in this
+     *         collection.
+     */
+    DomainObjectCollection<T> matching(Spec<? super T> spec);
+
+    /**
+     * Returns a collection which contains the objects in this collection which meet the given closure specification. The
+     * returned collection is live, so that when matching objects are added to this collection, they are also visible in
+     * the filtered collection.
+     *
+     * @param spec The specification to use. The closure gets a collection element as an argument.
+     * @return The collection of matching objects. Returns an empty collection if there are no such objects in this
+     *         collection.
+     */
+    DomainObjectCollection<T> matching(Closure spec);
+
+    /**
+     * Adds an {@code Action} to be executed when an object is added to this collection.
+     *
+     * @param action The action to be executed
+     * @return the supplied action
+     */
+    Action<? super T> whenObjectAdded(Action<? super T> action);
+
+    /**
+     * Adds a closure to be called when an object is added to this collection. The newly added object is passed to the
+     * closure as the parameter.
+     *
+     * @param action The closure to be called
+     */
+    void whenObjectAdded(Closure action);
+
+    /**
+     * Adds an {@code Action} to be executed when an object is removed from this collection.
+     *
+     * @param action The action to be executed
+     * @return the supplied action
+     */
+    Action<? super T> whenObjectRemoved(Action<? super T> action);
+
+    /**
+     * Executes the given action against all objects in this collection, and any objects subsequently added to this
+     * collection.
+     *
+     * @param action The action to be executed
+     * @deprecated Use {@link #all(Action)} instead.
+     */
+    @Deprecated
+    void allObjects(Action<? super T> action);
+
+    /**
+     * Executes the given closure against all objects in this collection, and any objects subsequently added to this
+     * collection.
+     *
+     * @param action The closure to be called
+     * @deprecated Use {@link #all(groovy.lang.Closure)} instead.
+     */
+    @Deprecated
+    void allObjects(Closure action);
+
+    /**
+     * Executes the given action against all objects in this collection, and any objects subsequently added to this
+     * collection.
+     *
+     * @param action The action to be executed
+     */
+    void all(Action<? super T> action);
+
+    /**
+     * Executes the given closure against all objects in this collection, and any objects subsequently added to this
+     * collection. The object is passed to the closure as the closure delegate. Alternatively, it is also passed as a parameter.
+     *
+     * @param action The action to be executed
+     */
+    void all(Closure action);
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/GradleException.java b/subprojects/core/src/main/groovy/org/gradle/api/GradleException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/GradleException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/GradleException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/GradleScriptException.java b/subprojects/core/src/main/groovy/org/gradle/api/GradleScriptException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/GradleScriptException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/GradleScriptException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/IllegalDependencyNotation.java b/subprojects/core/src/main/groovy/org/gradle/api/IllegalDependencyNotation.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/IllegalDependencyNotation.java
rename to subprojects/core/src/main/groovy/org/gradle/api/IllegalDependencyNotation.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/IllegalOperationAtExecutionTimeException.java b/subprojects/core/src/main/groovy/org/gradle/api/IllegalOperationAtExecutionTimeException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/IllegalOperationAtExecutionTimeException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/IllegalOperationAtExecutionTimeException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/InvalidUserDataException.java b/subprojects/core/src/main/groovy/org/gradle/api/InvalidUserDataException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/InvalidUserDataException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/InvalidUserDataException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/JavaVersion.java b/subprojects/core/src/main/groovy/org/gradle/api/JavaVersion.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/JavaVersion.java
rename to subprojects/core/src/main/groovy/org/gradle/api/JavaVersion.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/LocationAwareException.java b/subprojects/core/src/main/groovy/org/gradle/api/LocationAwareException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/LocationAwareException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/LocationAwareException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/NamedDomainObjectCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/NamedDomainObjectCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/NamedDomainObjectContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/NamedDomainObjectContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectContainer.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectFactory.java
new file mode 100644
index 0000000..1fb157d
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/NamedDomainObjectFactory.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api;
+
+/**
+ * A factory for named objects of type {@code T}.
+ *
+ * @param <T> The type of objects which this factory creates.
+ */
+public interface NamedDomainObjectFactory<T> {
+    /**
+     * Creates a new object with the given name.
+     *
+     * @param name The name
+     * @return The object.
+     */
+    T create(String name);
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/PathValidation.java b/subprojects/core/src/main/groovy/org/gradle/api/PathValidation.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/PathValidation.java
rename to subprojects/core/src/main/groovy/org/gradle/api/PathValidation.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Plugin.java b/subprojects/core/src/main/groovy/org/gradle/api/Plugin.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Plugin.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Plugin.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/Project.java b/subprojects/core/src/main/groovy/org/gradle/api/Project.java
new file mode 100644
index 0000000..f2a9dcf
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/Project.java
@@ -0,0 +1,1483 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api;
+
+import groovy.lang.Closure;
+import groovy.lang.MissingPropertyException;
+import org.gradle.api.file.ConfigurableFileTree;
+import org.gradle.api.file.ConfigurableFileCollection;
+import org.gradle.api.file.CopySpec;
+import org.gradle.api.file.FileTree;
+import org.gradle.api.artifacts.dsl.*;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.initialization.dsl.ScriptHandler;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.LoggingManager;
+import org.gradle.api.plugins.Convention;
+import org.gradle.api.plugins.PluginContainer;
+import org.gradle.api.tasks.TaskContainer;
+import org.gradle.api.tasks.WorkResult;
+import org.gradle.process.ExecResult;
+
+import java.io.File;
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * <p>This interface is the main API you use to interact with Gradle from your build file. From a <code>Project</code>,
+ * you have programmatic access to all of Gradle's features.</p>
+ *
+ * <h3>Lifecycle</h3>
+ *
+ * <p>There is a one-to-one relationship between a <code>Project</code> and a <code>{@value #DEFAULT_BUILD_FILE}</code>
+ * file. During build initialisation, Gradle assembles a <code>Project</code> object for each project which is to
+ * participate in the build, as follows:</p>
+ *
+ * <ul>
+ *
+ * <li>Create a {@link org.gradle.api.initialization.Settings} instance for the build.</li>
+ *
+ * <li>Evaluate the <code>{@value org.gradle.api.initialization.Settings#DEFAULT_SETTINGS_FILE}</code> script, if
+ * present, against the {@link org.gradle.api.initialization.Settings} object to configure it.</li>
+ *
+ * <li>Use the configured {@link org.gradle.api.initialization.Settings} object to create the hierarchy of
+ * <code>Project</code> instances.</li>
+ *
+ * <li>Finally, evaluate each <code>Project</code> by executing its <code>{@value #DEFAULT_BUILD_FILE}</code> file, if
+ * present, against the project. The project are evaulated in breadth-wise order, such that a project is evaulated
+ * before its child projects. This order can be overridden by adding an evaluation dependency.</li>
+ *
+ * </ul>
+ *
+ * <h3>Tasks</h3>
+ *
+ * <p>A project is essentially a collection of {@link Task} objects. Each task performs some basic piece of work, such
+ * as compiling classes, or running unit tests, or zipping up a WAR file. You add tasks to a project using one of the
+ * {@code add()} methods on {@link TaskContainer}, such as {@link TaskContainer#add(String)}.  You can locate existing
+ * tasks using one of the lookup methods on {@link TaskContainer}, such as {@link org.gradle.api.tasks.TaskCollection#getByName(String)}.</p>
+ *
+ * <h3>Dependencies</h3>
+ *
+ * <p>A project generally has a number of dependencies it needs in order to do its work.  Also, a project generally
+ * produces a number of artifacts, which other projects can use. Those dependencies are grouped in configurations, and
+ * can be retrieved and uploaded from repositories. You use the {@link org.gradle.api.artifacts.ConfigurationContainer}
+ * returned by {@link #getConfigurations()} method to manage the configurations. The {@link
+ * org.gradle.api.artifacts.dsl.DependencyHandler} returned by {@link #getDependencies()} method to manage the
+ * dependencies. The {@link org.gradle.api.artifacts.dsl.ArtifactHandler} returned by {@link #getArtifacts()} method to
+ * manage the artifacts. The {@link org.gradle.api.artifacts.dsl.RepositoryHandler} returned by {@link
+ * #getRepositories()} method to manage the repositories.</p>
+ *
+ * <h3>Multi-project Builds</h3>
+ *
+ * <p>Projects are arranged into a hierarchy of projects. A project has a name, and a fully qualified path which
+ * uniquely identifies it in the hierarchy.</p>
+ *
+ * <h3>Build scripts</h3>
+ *
+ * <p>Gradle executes the project's build file against the <code>Project</code> instance to configure the project. Any
+ * property or method which your script uses which is not defined in the script is delegated through to the associated
+ * <code>Project</code> object.  This means, that you can use any of the methods and properties on the
+ * <code>Project</code> interface directly in your script.</p><p>For example:
+ * <pre>
+ * defaultTasks('some-task')  // Delegates to Project.defaultTasks()
+ * reportDir = file('reports') // Delegates to Project.file() and Project.setProperty()
+ * </pre>
+ * <p>You can also access the <code>Project</code> instance using the <code>project</code> property. This can make the
+ * script clearer in some cases. For example, you could use <code>project.name</code> rather than <code>name</code> to
+ * access the project's name.</p>
+ *
+ * <a name="properties"/> <h4>Dynamic Properties</h4>
+ *
+ * <p>A project has 5 property 'scopes', which it searches for properties. You can access these properties by name in
+ * your build file, or by calling the project's {@link #property(String)} method. The scopes are:</p>
+ *
+ * <ul>
+ *
+ * <li>The <code>Project</code> object itself. This scope includes any property getters and setters declared by the
+ * <code>Project</code> implementation class.  For example, {@link #getRootProject()} is accessible as the
+ * <code>rootProject</code> property.  The properties of this scope are readable or writable depending on the presence
+ * of the corresponding getter or setter method.</li>
+ *
+ * <li>The <em>additional</em> properties of the project.  Each project maintains a map of additional properties, which
+ * can contain any arbitrary name -> value pair.  The properties of this scope are readable and writable.</li>
+ *
+ * <li>The <em>convention</em> properties added to the project by each {@link Plugin} applied to the project. A {@link
+ * Plugin} can add properties and methods to a project through the project's {@link Convention} object.  The properties
+ * of this scope may be readable or writable, depending on the convention objects.</li>
+ *
+ * <li>The tasks of the project.  A task is accessible by using its name as a property name.  The properties of this
+ * scope are read-only. For example, a task called <code>compile</code> is accessible as the <code>compile</code>
+ * property.</li>
+ *
+ * <li>The additional properties and convention properties of the project's parent project, recursively up to the root
+ * project. The properties of this scope are read-only.</li>
+ *
+ * </ul>
+ *
+ * <p>When reading a property, the project searches the above scopes in order, and returns the value from the first
+ * scope it finds the property in.  See {@link #property(String)} for more details.</p>
+ *
+ * <p>When writing a property, the project searches the above scopes in order, and sets the property in the first scope
+ * it finds the property in. If not found, the project adds the property to its map of additional properties. See {@link
+ * #setProperty(String, Object)} for more details.</p>
+ *
+ * <h4>Dynamic Methods</h4>
+ *
+ * <p>A project has 5 method 'scopes', which it searches for methods:</p>
+ *
+ * <ul>
+ *
+ * <li>The <code>Project</code> object itself.</li>
+ *
+ * <li>The build file. The project searches for a matching method declared in the build file.</li>
+ *
+ * <li>The <em>convention</em> methods added to the project by each {@link Plugin} applied to the project. A {@link
+ * Plugin} can add properties and method to a project through the project's {@link Convention} object.</li>
+ *
+ * <li>The tasks of the project. A method is added for each task, using the name of the task as the method name and
+ * taking a single closure parameter. The method calls the {@link Task#configure(groovy.lang.Closure)} method for the
+ * associated task with the provided closure. For example, if the project has a task called <code>compile</code>, then a
+ * method is added with the following signature: <code>void compile(Closure configureClosure)</code>.</li>
+ *
+ * <li>The parent project, recursively up to the root project.</li>
+ *
+ * </ul>
+ *
+ * @author Hans Dockter
+ */
+public interface Project extends Comparable<Project> {
+    /**
+     * The default project build file name.
+     */
+    public static final String DEFAULT_BUILD_FILE = "build.gradle";
+
+    /**
+     * The hierarchy separator for project and task path names.
+     */
+    public static final String PATH_SEPARATOR = ":";
+
+    /**
+     * The default build directory name.
+     */
+    public static final String DEFAULT_BUILD_DIR_NAME = "build";
+
+    public static final String GRADLE_PROPERTIES = "gradle.properties";
+
+    public static final String SYSTEM_PROP_PREFIX = "systemProp";
+
+    public static final String TMP_DIR_NAME = ".gradle";
+
+    public static final String DEFAULT_VERSION = "unspecified";
+
+    public static final String DEFAULT_STATUS = "release";
+
+    /**
+     * <p>Returns the root project for the hierarchy that this project belongs to.  In the case of a single-project
+     * build, this method returns this project.</p>
+     *
+     * @return The root project. Never returns null.
+     */
+    Project getRootProject();
+
+    /**
+     * <p>Returns the root directory of this project. The root directory is the project directory of the root
+     * project.</p>
+     *
+     * @return The root directory. Never returns null.
+     */
+    File getRootDir();
+
+    /**
+     * <p>Returns the build directory of this project.  The build directory is the directory which all artifacts are
+     * generated into.  The default value for the build directory is <code><i>projectDir</i>/build</code></p>
+     *
+     * @return The build directory. Never returns null.
+     */
+    File getBuildDir();
+
+    /**
+     * <p>Sets the build directory of this project. The build directory is the directory which all artifacts are
+     * generated into. The path parameter is evaluated as described for {@link #file(Object)}. This mean you can use,
+     * amongst other things, a relative or absolute path or File object to specify the build directory.</p>
+     *
+     * @param path The build directory. This is evaluated as for {@link #file(Object)}
+     */
+    void setBuildDir(Object path);
+
+    /**
+     * <p>Returns the name of the build directory of this project. It is resolved relative to the project directory of
+     * this project to determine the build directory. The default value is {@value #DEFAULT_BUILD_DIR_NAME}.</p>
+     *
+     * @return The build dir name. Never returns null.
+     */
+    @Deprecated
+    String getBuildDirName();
+
+    /**
+     * <p>Sets the build directory name of this project.</p>
+     *
+     * @param buildDirName The build dir name. Should not be null.
+     * @deprecated Use {@link #setBuildDir(Object)} instead.
+     */
+    @Deprecated
+    void setBuildDirName(String buildDirName);
+
+    /**
+     * <p>Returns the build file Gradle will evaluate against this project object. The default is <code> {@value
+     * #DEFAULT_BUILD_FILE}</code>. If an embedded script is provided the build file will be null. </p>
+     *
+     * @return Current build file. May return null.
+     */
+    File getBuildFile();
+
+    /**
+     * <p>Returns the parent project of this project, if any.</p>
+     *
+     * @return The parent project, or null if this is the root project.
+     */
+    Project getParent();
+
+    /**
+     * <p>Returns the name of this project. The project's name is not necessarily unique within a project hierarchy. You
+     * should use the {@link #getPath()} method for a unique identifier for the project.</p>
+     *
+     * @return The name of this project. Never return null.
+     */
+    String getName();
+
+    /**
+     * Returns the description of this project.
+     *
+     * @return the description. May return null.
+     */
+    String getDescription();
+
+    /**
+     * Sets a description for this project.
+     *
+     * @param description The description of the project. Might be null.
+     */
+    void setDescription(String description);
+
+    /**
+     * <p>Returns the group of this project. Gradle always uses the {@code toString()} value of the group. The group
+     * defaults to the path with dots a separators.</p>
+     *
+     * @return The group of this project. Never returns null.
+     */
+    Object getGroup();
+
+    /**
+     * <p>Sets the group of this project.</p>
+     *
+     * @param group The group of this project. Must not be null.
+     */
+    void setGroup(Object group);
+
+    /**
+     * <p>Returns the version of this project. Gradle always uses the {@code toString()} value of the version. The
+     * version defaults to {@value #DEFAULT_VERSION}.</p>
+     *
+     * @return The version of this project. Never returns null.
+     */
+    Object getVersion();
+
+    /**
+     * <p>Sets the version of this project.</p>
+     *
+     * @param version The version of this project. Must not be null.
+     */
+    void setVersion(Object version);
+
+    /**
+     * <p>Returns the status of this project. Gradle always uses the {@code toString()} value of the status. The status
+     * defaults to {@value #DEFAULT_STATUS}.</p>
+     *
+     * <p>The status of the project is only relevant, if you upload libraries together with a module descriptor. The
+     * status specified here, will be part of this module descriptor.</p>
+     *
+     * @return The status of this project. Never returns null.
+     */
+    Object getStatus();
+
+    /**
+     * Sets the status of this project.
+     *
+     * @param status The status. Must not be null.
+     */
+    void setStatus(Object status);
+
+    /**
+     * <p>Returns the direct children of this project.</p>
+     *
+     * @return A map from child project name to child project. Returns an empty map if this this project does not have
+     *         any children.
+     */
+    Map<String, Project> getChildProjects();
+
+    /**
+     * <p>Returns the set of projects which this project depends on.</p>
+     *
+     * @return The set of projects. Returns an empty set if this project depends on no projects.
+     */
+    Set<Project> getDependsOnProjects();
+
+    /**
+     * <p>Sets a property of this project.  This method searches for a property with the given name in the following
+     * locations, and sets the property on the first location where it finds the property.</p>
+     *
+     * <ol>
+     *
+     * <li>The project object itself.  For example, the <code>rootDir</code> project property.</li>
+     *
+     * <li>The project's {@link Convention} object.  For example, the <code>srcRootName</code> java plugin
+     * property.</li>
+     *
+     * <li>The project's additional properties.</li>
+     *
+     * </ol>
+     *
+     * <p>If the property is not found in any of these locations, it is added to the project's additional
+     * properties.</p>
+     *
+     * @param name The name of the property
+     * @param value The value of the property
+     */
+    void setProperty(String name, Object value);
+
+    /**
+     * <p>Returns this project. This method is useful in build files to explicitly access project properties and
+     * methods. For example, using <code>project.name</code> can express your intent better than using
+     * <code>name</code>. This method also allows you to access project properties from a scope where the property may
+     * be hidden, such as, for example, from a method or closure. </p>
+     *
+     * @return This project. Never returns null.
+     */
+    Project getProject();
+
+    /**
+     * <p>Returns the set containing this project and its subprojects.</p>
+     *
+     * @return The set of projects.
+     */
+    Set<Project> getAllprojects();
+
+    /**
+     * <p>Returns the set containing the subprojects of this project.</p>
+     *
+     * @return The set of projects.  Returns an empty set if this project has no subprojects.
+     */
+    Set<Project> getSubprojects();
+
+    /**
+     * <p>Applies a {@link Plugin} to this project.</p>
+     *
+     * @param pluginId The id of the plugin.
+     * @return This project.
+     * @deprecated You should use the {@link #apply(java.util.Map)} or {@link #apply(groovy.lang.Closure)} method
+     *             instead.
+     */
+    @Deprecated
+    Project usePlugin(String pluginId);
+
+    /**
+     * <p>Applies a {@link Plugin} to this project.</p>
+     *
+     * @param pluginClass The class of the plugin.  This class must implement the {@link Plugin} interface.
+     * @return This project.
+     * @deprecated You should use the {@link #apply(java.util.Map)} or {@link #apply(groovy.lang.Closure)} method
+     *             instead.
+     */
+    @Deprecated
+    Project usePlugin(Class<? extends Plugin> pluginClass);
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Calling this method is equivalent to
+     * calling {@link #task(java.util.Map, String)} with an empty options map.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
+     *
+     * @param name The name of the task to be created
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     */
+    Task task(String name) throws InvalidUserDataException;
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. A map of creation options can be
+     * passed to this method to control how the task is created. The following options are available:</p>
+     *
+     * <table>
+     *
+     * <tr><th>Option</th><th>Description</th><th>Default Value</th></tr>
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_TYPE}</code></td><td>The class of the task to
+     * create.</td><td>{@link org.gradle.api.DefaultTask}</td></tr>
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_OVERWRITE}</code></td><td>Replace an existing
+     * task?</td><td><code>false</code></td></tr>
+     *
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_DEPENDS_ON}</code></td><td>A task name or set of task names which
+     * this task depends on</td><td><code>[]</code></td></tr>
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_ACTION}</code></td><td>A closure or {@link Action} to add to the
+     * task.</td><td><code>null</code></td></tr>
+     *
+     * </table>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
+     * to true, an exception is thrown.</p>
+     *
+     * @param args The task creation options.
+     * @param name The name of the task to be created
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     */
+    Task task(Map<String, ?> args, String name) throws InvalidUserDataException;
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
+     * closure is executed to configure the task. A map of creation options can be passed to this method to control how
+     * the task is created. See {@link #task(java.util.Map, String)} for the available options.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
+     * to true, an exception is thrown.</p>
+     *
+     * @param args The task creation options.
+     * @param name The name of the task to be created
+     * @param configureClosure The closure to use to configure the created task.
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     */
+    Task task(Map<String, ?> args, String name, Closure configureClosure);
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
+     * closure is executed to configure the task.</p> <p/> <p>After the task is added to the project, it is made
+     * available as a property of the project, so that you can reference the task by name in your build file.  See <a
+     * href="#properties">here</a> for more details</p>
+     *
+     * @param name The name of the task to be created
+     * @param configureClosure The closure to use to configure the created task.
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     */
+    Task task(String name, Closure configureClosure);
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Calling this method is equivalent to
+     * calling {@link #createTask(java.util.Map, String)} with an empty options map.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
+     *
+     * @param name The name of the task to be created
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     * @deprecated You should use {@link #task(String)} instead.
+     */
+    @Deprecated
+    Task createTask(String name) throws InvalidUserDataException;
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
+     * action is passed to the task's {@link Task#doFirst(Action)} method. Calling this method is equivalent to calling
+     * {@link #createTask(java.util.Map, String, Action)} with an empty options map.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
+     *
+     * @param name The name of the task to be created
+     * @param action The action to be passed to the {@link Task#doFirst(Action)} method of the created task.
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
+     */
+    @Deprecated
+    Task createTask(String name, Action<? super Task> action) throws InvalidUserDataException;
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. A map of creation options can be
+     * passed to this method to control how the task is created. The following options are available:</p>
+     *
+     * <table>
+     *
+     * <tr><th>Option</th><th>Description</th><th>Default Value</th></tr>
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_TYPE}</code></td><td>The class of the task to
+     * create.</td><td>{@link org.gradle.api.DefaultTask}</td></tr>
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_OVERWRITE}</code></td><td>Replace an existing
+     * task?</td><td><code>false</code></td></tr>
+     *
+     * <tr><td><code>{@value org.gradle.api.Task#TASK_DEPENDS_ON}</code></td><td>A task name or set of task names which
+     * this task depends on</td><td><code>[]</code></td></tr>
+     *
+     * </table>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
+     * to true, an exception is thrown.</p>
+     *
+     * @param args The task creation options.
+     * @param name The name of the task to be created
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
+     */
+    @Deprecated
+    Task createTask(Map<String, ?> args, String name) throws InvalidUserDataException;
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
+     * action is passed to the task's {@link Task#doFirst(Action)} method. A map of creation options can be passed to
+     * this method to control how the task is created. See {@link #createTask(java.util.Map, String)} for the available
+     * options.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
+     * to true, an exception is thrown.</p>
+     *
+     * @param args The task creation options.
+     * @param name The name of the task to be created
+     * @param action The action to be passed to the {@link Task#doFirst(Action)} method of the created task.
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
+     */
+    @Deprecated
+    Task createTask(Map<String, ?> args, String name, Action<? super Task> action) throws InvalidUserDataException;
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
+     * action closure is passed to the task's {@link Task#doFirst(Closure)} method. Calling this method is equivalent to
+     * calling {@link #createTask(java.util.Map, String, Closure)} with an empty options map.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
+     *
+     * @param name The name of the task to be created
+     * @param action The closure to be passed to the {@link Task#doFirst(Closure)} method of the created task.
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
+     */
+    @Deprecated
+    Task createTask(String name, Closure action);
+
+    /**
+     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
+     * action closure is passed to the task's {@link Task#doFirst(Closure)} method. A map of creation options can be
+     * passed to this method to control how the task is created. See {@link #createTask(java.util.Map, String)} for the
+     * available options.</p>
+     *
+     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
+     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
+     *
+     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
+     * to true, an exception is thrown.</p>
+     *
+     * @param args The task creation options.
+     * @param name The name of the task to be created
+     * @param action The closure to be passed to the {@link Task#doFirst(Closure)} method of the created task.
+     * @return The newly created task object
+     * @throws InvalidUserDataException If a task with the given name already exists in this project.
+     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
+     */
+    @Deprecated
+    Task createTask(Map<String, ?> args, String name, Closure action);
+
+    /**
+     * <p>Returns the path of this project.  The path is the fully qualified name of the project.</p>
+     *
+     * @return The path. Never returns null.
+     */
+    String getPath();
+
+    /**
+     * <p>Returns the names of the default tasks of this project. These are used when no tasks names are provided when
+     * starting the build.</p>
+     *
+     * @return The default task names. Returns an empty list if this project has no default tasks.
+     */
+    List<String> getDefaultTasks();
+
+    /**
+     * <p>Sets the names of the default tasks of this project. These are used when no tasks names are provided when
+     * starting the build.</p>
+     *
+     * @param defaultTasks The default task names.
+     */
+    void setDefaultTasks(List<String> defaultTasks);
+
+    /**
+     * <p>Sets the names of the default tasks of this project. These are used when no tasks names are provided when
+     * starting the build.</p>
+     *
+     * @param defaultTasks The default task names.
+     */
+    void defaultTasks(String... defaultTasks);
+
+    /**
+     * <p>Declares that this project has an execution dependency on the project with the given path.</p>
+     *
+     * @param path The path of the project which this project depends on.
+     * @throws UnknownProjectException If no project with the given path exists.
+     */
+    void dependsOn(String path) throws UnknownProjectException;
+
+    /**
+     * <p>Declares that this project has an execution dependency on the project with the given path.</p>
+     *
+     * @param path The path of the project which this project depends on.
+     * @param evaluateDependsOnProject If true, adds an evaluation dependency.
+     * @throws UnknownProjectException If no project with the given path exists.
+     */
+    void dependsOn(String path, boolean evaluateDependsOnProject) throws UnknownProjectException;
+
+    /**
+     * <p>Declares that this project has an evaulation dependency on the project with the given path.</p>
+     *
+     * @param path The path of the project which this project depends on.
+     * @return The project which this project depends on.
+     * @throws UnknownProjectException If no project with the given path exists.
+     */
+    Project evaluationDependsOn(String path) throws UnknownProjectException;
+
+    /**
+     * <p>Declares that all child projects of this project have an execution dependency on this project.</p>
+     *
+     * @return this project.
+     */
+    Project childrenDependOnMe();
+
+    /**
+     * <p>Declares that this project have an execution dependency on each of its child projects.</p>
+     *
+     * @return this project.
+     */
+    Project dependsOnChildren();
+
+    /**
+     * <p>Declares that this project have an execution dependency on each of its child projects.</p>
+     *
+     * @param evaluateDependsOnProject If true, adds an evaluation dependency.
+     * @return this project.
+     */
+    Project dependsOnChildren(boolean evaluateDependsOnProject);
+
+    /**
+     * <p>Locates a project by path. If the path is relative, it is interpreted relative to this project.</p>
+     *
+     * @param path The path.
+     * @return The project with the given path. Returns null if no such project exists.
+     */
+    Project findProject(String path);
+
+    /**
+     * <p>Locates a project by path. If the path is relative, it is interpreted relative to this project.</p>
+     *
+     * @param path The path.
+     * @return The project with the given path. Never returns null.
+     * @throws UnknownProjectException If no project with the given path exists.
+     */
+    Project project(String path) throws UnknownProjectException;
+
+    /**
+     * <p>Locates a project by path and configures it using the given closure. If the path is relative, it is
+     * interpreted relative to this project. The target project is passed to the closure as the closure's delegate.</p>
+     *
+     * @param path The path.
+     * @param configureClosure The closure to use to configure the project.
+     * @return The project with the given path. Never returns null.
+     * @throws UnknownProjectException If no project with the given path exists.
+     */
+    Project project(String path, Closure configureClosure);
+
+    /**
+     * <p>Returns a map of the tasks contained in this project, and optionally its subprojects.</p>
+     *
+     * @param recursive If true, returns the tasks of this project and its subprojects.  If false, returns the tasks of
+     * just this project.
+     * @return A map from project to a set of tasks.
+     */
+    Map<Project, Set<Task>> getAllTasks(boolean recursive);
+
+    /**
+     * <p>Returns the set of tasks with the given name contained in this project, and optionally its subprojects.</p>
+     *
+     * @param name The name of the task to locate.
+     * @param recursive If true, returns the tasks of this project and its subprojects. If false, returns the tasks of
+     * just this project.
+     * @return The set of tasks. Returns an empty set if no such tasks exist in this project.
+     */
+    Set<Task> getTasksByName(String name, boolean recursive);
+
+    /**
+     * <p>The directory containing the project build file.</p>
+     *
+     * @return The project directory. Never returns null.
+     */
+    File getProjectDir();
+
+    /**
+     * <p>Resolves a file path relative to the project directory of this project. This method converts the supplied path
+     * based on its type:</p>
+     *
+     * <ul>
+     *
+     * <li>{@link File}. If the file is an absolute file, it is returned as is. Otherwise, the file's path is
+     * interpreted relative to the project directory.</li>
+     *
+     * <li>{@link java.net.URI} or {@link java.net.URL}. The URL's path is interpreted as the file path. Currently, only
+     * {@code file:} URLs are supported.
+     *
+     * <li>{@link Closure}. The closure's return value is resolved recursively.</li>
+     *
+     * <li>{@link java.util.concurrent.Callable}. The callable's return value is resolved recursively.</li>
+     *
+     * <li>{@link Object}. The object's {@code toString()} value is interpreted as a path. If the path is a relative
+     * path, the project directory will be used as a base directory. A String starting with {@code file:} is treated as
+     * a file URL.</li>
+     *
+     * </ul>
+     *
+     * @param path The object to resolve as a File.
+     * @return The resolved file. Never returns null.
+     */
+    File file(Object path);
+
+    /**
+     * <p>Resolves a file path relative to the project directory of this project and validates it using the given
+     * scheme. See {@link PathValidation} for the list of possible validations.</p>
+     *
+     * @param path An object which toString method value is interpreted as a relative path to the project directory.
+     * @param validation The validation to perform on the file.
+     * @return The resolved file. Never returns null.
+     * @throws InvalidUserDataException When the file does not meet the given validation constraint.
+     */
+    File file(Object path, PathValidation validation) throws InvalidUserDataException;
+
+    /**
+     * <p>Resolves a file path to a URI, relative to the project directory of this project. Evaluates the provided path
+     * object as described for {@link #file(Object)}, with the exception that any URI scheme is supported, not just
+     * 'file:' URIs.</p>
+     *
+     * @param path The object to resolve as a URI.
+     * @return The resolved URI. Never returns null.
+     */
+    URI uri(Object path);
+
+    /**
+     * <p>Returns the relative path from the project directory to the given path. The given path object is (logically)
+     * resolved as described for {@link #file(Object)}, from which a relative path is calculated.</p>
+     *
+     * @param path The path to convert to a relative path.
+     * @return The relative path. Never returns null.
+     */
+    String relativePath(Object path);
+
+    /**
+     * <p>Returns a {@link ConfigurableFileCollection} containing the given files. You can pass any of the following
+     * types to this method:</p>
+     *
+     * <ul> <li>A {@code String}. Interpreted relative to the project directory, as for {@link #file(Object)}. A string
+     * that starts with {@code file:} is treated as a file URL.</li>
+     *
+     * <li>A {@code File}. Interpreted relative to the project directory, as for {@link #file(Object)}.</li>
+     *
+     * <li>{@link java.net.URI} or {@link java.net.URL}. The URL's path is interpreted as a file path. Currently, only
+     * {@code file:} URLs are supported.
+     *
+     * <li>A {@code Collection} or an array. May contain any of the types listed here. The elements of the collection
+     * are recursively converted to files.</li>
+     *
+     * <li>A {@link org.gradle.api.file.FileCollection}. The contents of the collection are included in the returned
+     * collection.</li>
+     *
+     * <li>A {@link java.util.concurrent.Callable}. The {@code call()} method may return any of the types listed here.
+     * The return value of the {@code call()} method is recursively converted to files. A {@code null} return value is
+     * treated as an empty collection.</li>
+     *
+     * <li>A Closure. May return any of the types listed here. The return value of the closure is recursively converted
+     * to files. A {@code null} return value is treated as an empty collection.</li>
+     *
+     * <li>An Object. Its {@code toString()} value is treated the same way as a String, as for {@link
+     * #file(Object)}.</li> </ul>
+     *
+     * <p>The returned file collection is lazy, so that the paths are evaluated only when the contents of the file
+     * collection are queried. The file collection is also live, so that it evaluates the above each time the contents
+     * of the collection is queried.</p>
+     *
+     * <p>The returned file collection maintains the iteration order of the supplied paths.</p>
+     *
+     * @param paths The paths to the files. May be empty.
+     * @return The file collection. Never returns null.
+     */
+    ConfigurableFileCollection files(Object... paths);
+
+    /**
+     * <p>Creates a new {@code ConfigurableFileCollection} using the given paths. The paths are evaluated as for {@link
+     * #files(Object...)}. The file collection is configured using the given closure. The file collection is passed to
+     * the closure as its delegate. Example:</p>
+     * <pre>
+     * files "$buildDir/classes" {
+     *     builtBy 'compile'
+     * }
+     * </pre>
+     * <p>The returned file collection is lazy, so that the paths are evaluated only when the contents of the file
+     * collection are queried. The file collection is also live, so that it evaluates the above each time the contents
+     * of the collection is queried.</p>
+     *
+     * @param paths The contents of the file collection. Evaluated as for {@link #files(Object...)}.
+     * @param configureClosure The closure to use to configure the file collection.
+     * @return the configured file tree. Never returns null.
+     */
+    ConfigurableFileCollection files(Object paths, Closure configureClosure);
+
+    /**
+     * <p>Creates a new {@code ConfigurableFileTree} using the given base directory. The given baseDir path is evaluated
+     * as for {@link #file(Object)}.</p>
+     *
+     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
+     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
+     * queried.</p>
+     *
+     * @param baseDir The base directory of the file tree. Evaluated as for {@link #file(Object)}.
+     * @return the file tree. Never returns null.
+     */
+    ConfigurableFileTree fileTree(Object baseDir);
+
+    /**
+     * <p>Creates a new {@code ConfigurableFileTree} using the provided map of arguments.  The map will be applied as
+     * properties on the new file tree.  Example:</p>
+     *
+     * <pre>
+     * fileTree(dir:'src', excludes:['**/ignore/**','**/.svn/**'])
+     * </pre>
+     *
+     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
+     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
+     * queried.</p>
+     *
+     * @param args map of property assignments to {@code ConfigurableFileTree} object
+     * @return the configured file tree. Never returns null.
+     */
+    ConfigurableFileTree fileTree(Map<String, ?> args);
+
+    /**
+     * <p>Creates a new {@code ConfigurableFileTree} using the provided closure.  The closure will be used to configure
+     * the new file tree. The file tree is passed to the closure as its delegate.  Example:</p>
+     *
+     * <pre>
+     * fileTree {
+     *    from 'src'
+     *    exclude '**/.svn/**'
+     * }.copy { into 'dest'}
+     * </pre>
+     *
+     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
+     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
+     * queried.</p>
+     *
+     * @param closure Closure to configure the {@code ConfigurableFileTree} object
+     * @return the configured file tree. Never returns null.
+     */
+    ConfigurableFileTree fileTree(Closure closure);
+
+    /**
+     * <p>Creates a new {@code FileTree} which contains the contents of the given ZIP file. The given zipPath path is
+     * evaluated as for {@link #file(Object)}. You can combine this method with the {@link #copy(groovy.lang.Closure)}
+     * method to unzip a ZIP file.</p>
+     *
+     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
+     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
+     * queried.</p>
+     *
+     * @param zipPath The ZIP file. Evaluated as for {@link #file(Object)}.
+     * @return the file tree. Never returns null.
+     */
+    FileTree zipTree(Object zipPath);
+
+    /**
+     * <p>Creates a new {@code FileTree} which contains the contents of the given TAR file. The given tarPath path is
+     * evaluated as for {@link #file(Object)}. You can combine this method with the {@link #copy(groovy.lang.Closure)}
+     * method to untar a TAR file.</p>
+     *
+     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
+     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
+     * queried.</p>
+     *
+     * @param tarPath The TAR file. Evaluated as for {@link #file(Object)}.
+     * @return the file tree. Never returns null.
+     */
+    FileTree tarTree(Object tarPath);
+
+    /**
+     * Creates a directory and returns a file pointing to it.
+     *
+     * @param path The path for the directory to be created. Evaluated as for {@link #file(Object)}.
+     * @return the created directory
+     * @throws org.gradle.api.InvalidUserDataException If the path points to an existing file.
+     */
+    File mkdir(Object path);
+
+    /**
+     * Deletes files and directories.
+     *
+     * @param paths Any type of object accepted by {@link org.gradle.api.Project#files(Object...)}
+     * @return true if anything got deleted, false otherwise
+     */
+    boolean delete(Object... paths);
+
+    /**
+     * Executes a Java main class. The closure configures a {@link org.gradle.process.JavaExecSpec}.
+     *
+     * @param closure The closure for configuring the execution.
+     * @return the result of the execution
+     */
+    ExecResult javaexec(Closure closure);
+
+    /**
+     * Executes an external command. The closure configures a {@link org.gradle.process.ExecSpec}.
+     *
+     * @param closure The closure for configuring the execution.
+     * @return the result of the execution
+     */
+    ExecResult exec(Closure closure);
+
+    /**
+     * <p>Converts a name to an absolute project path, resolving names relative to this project.</p>
+     *
+     * @param path The path to convert.
+     * @return The absolute path.
+     * @deprecated Use {@link #absoluteProjectPath(String)} instead.
+     */
+    @Deprecated
+    String absolutePath(String path);
+
+    /**
+     * <p>Converts a name to an absolute project path, resolving names relative to this project.</p>
+     *
+     * @param path The path to convert.
+     * @return The absolute path.
+     */
+    String absoluteProjectPath(String path);
+
+    /**
+     * <p>Converts a name to a project path relative to this project.</p>
+     *
+     * @param path The path to convert.
+     * @return The relative path.
+     */
+    String relativeProjectPath(String path);
+
+    /**
+     * <p>Returns the <code>AntBuilder</code> for this project. You can use this in your build file to execute ant
+     * tasks.</p>
+     *
+     * @return The <code>AntBuilder</code> for this project. Never returns null.
+     */
+    AntBuilder getAnt();
+
+    /**
+     * <p>Creates an additional <code>AntBuilder</code> for this project. You can use this in your build file to execute
+     * ant tasks.</p>
+     *
+     * @return Creates an <code>AntBuilder</code> for this project. Never returns null.
+     * @see #getAnt()
+     */
+    AntBuilder createAntBuilder();
+
+    /**
+     * <p>Executes the given closure against the <code>AntBuilder</code> for this project. You can use this in your
+     * build file to execute ant tasks. The <code>AntBuild</code> is passed to the closure as the closure's
+     * delegate.</p>
+     *
+     * @param configureClosure The closure to execute against the <code>AntBuilder</code>.
+     * @return The <code>AntBuilder</code>. Never returns null.
+     */
+    AntBuilder ant(Closure configureClosure);
+
+    /**
+     * Returns the configurations of this project.
+     *
+     * @return The configuration of this project.
+     */
+    ConfigurationContainer getConfigurations();
+
+    /**
+     * <p>Configures the dependency configurations for this project.
+     *
+     * <p>This method executes the given closure against the {@link ConfigurationContainer} for this project. The {@link
+     * ConfigurationContainer} is passed to the closure as the closure's delegate.
+     *
+     * @param configureClosure the closure to use to configure the dependency configurations.
+     */
+    void configurations(Closure configureClosure);
+
+    /**
+     * Returns a handler for assigning artifacts produced by the project to configurations.
+     */
+    ArtifactHandler getArtifacts();
+
+    /**
+     * <p>Configures the published artifacts for this project.
+     *
+     * <p>This method executes the given closure against the {@link ArtifactHandler} for this project. The {@link
+     * ArtifactHandler} is passed to the closure as the closure's delegate.
+     *
+     * @param configureClosure the closure to use to configure the published artifacts.
+     */
+    void artifacts(Closure configureClosure);
+
+    /**
+     * <p>Returns the {@link Convention} for this project.</p> <p/> <p>You can access this property in your build file
+     * using <code>convention</code>. You can also can also access the properties and methods of the convention object
+     * as if they were properties and methods of this project. See <a href="#properties">here</a> for more details</p>
+     *
+     * @return The <code>Convention</code>. Never returns null.
+     */
+    Convention getConvention();
+
+    /**
+     * <p>Compares the nesting level of this project with another project of the multi-project hierarchy.</p>
+     *
+     * @param otherProject The project to compare the nesting level with.
+     * @return a negative integer, zero, or a positive integer as this project has a nesting level less than, equal to,
+     *         or greater than the specified object.
+     * @see #getDepth()
+     */
+    int depthCompare(Project otherProject);
+
+    /**
+     * <p>Returns the nesting level of a project in a multi-project hierarchy. For single project builds this is always
+     * 0. In a multi-project hierarchy 0 is returned for the root project.</p>
+     */
+    int getDepth();
+
+    /**
+     * <p>Returns the tasks of this project.</p>
+     *
+     * @return the tasks of this project.
+     */
+    TaskContainer getTasks();
+
+    /**
+     * <p>Configures the sub-projects of this project</p>
+     *
+     * <p>This method executes the given {@link Action} against the sub-projects of this project.</p>
+     *
+     * @param action The action to execute.
+     */
+    void subprojects(Action<? super Project> action);
+
+    /**
+     * <p>Configures the sub-projects of this project.</p>
+     *
+     * <p>This method executes the given closure against each of the sub-projects of this project. The target {@link
+     * Project} is passed to the closure as the closure's delegate.</p>
+     *
+     * @param configureClosure The closure to execute.
+     */
+    void subprojects(Closure configureClosure);
+
+    /**
+     * <p>Configures this project and each of its sub-projects.</p>
+     *
+     * <p>This method executes the given {@link Action} against this project and each of its sub-projects.</p>
+     *
+     * @param action The action to execute.
+     */
+    void allprojects(Action<? super Project> action);
+
+    /**
+     * <p>Configures this project and each of its sub-projects.</p>
+     *
+     * <p>This method executes the given closure against this project and its sub-projects. The target {@link Project}
+     * is passed to the closure as the closure's delegate.</p>
+     *
+     * @param configureClosure The closure to execute.
+     */
+    void allprojects(Closure configureClosure);
+
+    /**
+     * Adds an action to execute immediately before this project is evaluated.
+     *
+     * @param action the action to execute.
+     */
+    void beforeEvaluate(Action<? super Project> action);
+
+    /**
+     * Adds an action to execute immediately after this project is evaluated.
+     *
+     * @param action the action to execute.
+     */
+    void afterEvaluate(Action<? super Project> action);
+
+    /**
+     * <p>Adds a closure to be called immediately before this project is evaluated. The project is passed to the closure
+     * as a parameter.</p>
+     *
+     * @param closure The closure to call.
+     */
+    void beforeEvaluate(Closure closure);
+
+    /**
+     * <p>Adds a closure to be called immediately after this project has been evaluated. The project is passed to the
+     * closure as a parameter. Such a listener gets notified when the build file belonging to this project has been
+     * executed. A parent project may for example add such a listener to its child project. Such a listener can futher
+     * configure those child projects based on the state of the child projects after their build files have been
+     * run.</p>
+     *
+     * @param closure The closure to call.
+     */
+    void afterEvaluate(Closure closure);
+
+    /**
+     * <p>Determines if this project has the given property. See <a href="#properties">here</a> for details of the
+     * properties which are available for a project.</p>
+     *
+     * @param propertyName The name of the property to locate.
+     * @return True if this project has the given property, false otherwise.
+     */
+    boolean hasProperty(String propertyName);
+
+    /**
+     * <p>Returns the properties of this project. See <a href="#properties">here</a> for details of the properties which
+     * are available for a project.</p>
+     *
+     * @return A map from property name to value.
+     */
+    Map<String, ?> getProperties();
+
+    /**
+     * <p>Returns the value of the given property.  This method locates a property as follows:</p>
+     *
+     * <ol>
+     *
+     * <li>If this project object has a property with the given name, return the value of the property.</li>
+     *
+     * <li>If this project's convention object has a property with the given name, return the value of the
+     * property.</li>
+     *
+     * <li>If this project has an additional property with the given name, return the value of the property.</li>
+     *
+     * <li>If this project has a task with the given name, return the task.</li>
+     *
+     * <li>Search up through this project's ancestor projects for a convention property or additional property with the
+     * given name.</li>
+     *
+     * <li>If not found, throw {@link MissingPropertyException}</li>
+     *
+     * </ol>
+     *
+     * @param propertyName The name of the property.
+     * @return The value of the property, possibly null.
+     * @throws MissingPropertyException When the given property is unknown.
+     */
+    Object property(String propertyName) throws MissingPropertyException;
+
+    /**
+     * <p>Returns the logger for this project. You can use this in your build file to write log messages.</p>
+     *
+     * @return The logger. Never returns null.
+     */
+    Logger getLogger();
+
+    /**
+     * <p>Returns the {@link org.gradle.api.invocation.Gradle} invocation which this project belongs to.</p>
+     *
+     * @return The Gradle object. Never returns null.
+     */
+    Gradle getGradle();
+
+    /**
+     * Returns the {@link org.gradle.api.logging.LoggingManager} which can be used to control the logging level and
+     * standard output/error capture for this project's build script. By default, System.out is redirected to the Gradle
+     * logging system at the QUIET log level, and System.err is redirected at the ERROR log level.
+     *
+     * @return the LoggingManager. Never returns null.
+     */
+    LoggingManager getLogging();
+
+    /**
+     * Disables redirection of standard output during project evaluation. By default redirection is enabled.
+     *
+     * @see #captureStandardOutput(org.gradle.api.logging.LogLevel)
+     */
+    @Deprecated
+    void disableStandardOutputCapture();
+
+    /**
+     * <p>Starts redirection of standard output during to the logging system during project evaluation. By default
+     * redirection is enabled and the output is redirected to the QUIET level. System.err is always redirected to the
+     * ERROR level. Redirection of output at execution time can be configured via the tasks.</p>
+     *
+     * <p>In a multi-project this is a per-project setting.</p>
+     *
+     * @param level The level standard out should be logged to.
+     * @see #disableStandardOutputCapture()
+     * @see Task#captureStandardOutput(org.gradle.api.logging.LogLevel)
+     * @see org.gradle.api.Task#disableStandardOutputCapture()
+     * @deprecated Use the {@link org.gradle.api.logging.LoggingManager} returned by {@link #getLogging()} instead
+     */
+    @Deprecated
+    void captureStandardOutput(LogLevel level);
+
+    /**
+     * <p>Configures an object via a closure, with the closure's delegate set to the supplied object. This way you don't
+     * have to specify the context of a configuration statement multiple times. <p/> Instead of:</p>
+     * <pre>
+     * MyType myType = new MyType()
+     * myType.doThis()
+     * myType.doThat()
+     * </pre>
+     * <p/> you can do:
+     * <pre>
+     * MyType myType = configure(new MyType()) {
+     *     doThis()
+     *     doThat()
+     * }
+     * </pre>
+     *
+     * <p>The object being configured is also passed to the closure as a parameter, so you can access it explicitly if
+     * required:</p>
+     * <pre>
+     * configure(someObj) { obj -> obj.doThis() }
+     * </pre>
+     *
+     * @param object The object to configure
+     * @param configureClosure The closure with configure statements
+     * @return The configured object
+     */
+    Object configure(Object object, Closure configureClosure);
+
+    /**
+     * Configures a collection of objects via a closure. This is equivalent to calling {@link #configure(Object,
+     * groovy.lang.Closure)} for each of the given objects.
+     *
+     * @param objects The objects to configure
+     * @param configureClosure The closure with configure statements
+     * @return The configured objects.
+     */
+    Iterable<?> configure(Iterable<?> objects, Closure configureClosure);
+
+    /**
+     * Configures a collection of objects via an action.
+     *
+     * @param objects The objects to configure
+     * @param configureAction The action to apply to each object
+     * @return The configured objects.
+     */
+    <T> Iterable<T> configure(Iterable<T> objects, Action<? super T> configureAction);
+
+    /**
+     * Returns a handler to create repositories which are used for retrieving dependencies and uploading artifacts
+     * produced by the project.
+     *
+     * @return the repository handler. Never returns null.
+     */
+    RepositoryHandler getRepositories();
+
+    /**
+     * <p>Configures the repositories for this project.
+     *
+     * <p>This method executes the given closure against the {@link RepositoryHandler} for this project. The {@link
+     * RepositoryHandler} is passed to the closure as the closure's delegate.
+     *
+     * @param configureClosure the closure to use to configure the repositories.
+     */
+    void repositories(Closure configureClosure);
+
+    /**
+     * Creates a new repository handler. <p/> Each repository handler is a factory and container for repositories. For
+     * example each instance of an upload task has its own repository handler.
+     *
+     * @return a new repository handler
+     */
+    RepositoryHandler createRepositoryHandler();
+
+    /**
+     * Returns the dependency handler of this project. The returned dependency handler instance can be used for adding
+     * new dependencies. For accessing already declared dependencies, the configurations can be used.
+     *
+     * @return the dependency handler. Never returns null.
+     * @see #getConfigurations()
+     */
+    DependencyHandler getDependencies();
+
+    /**
+     * <p>Configures the dependencies for this project.
+     *
+     * <p>This method executes the given closure against the {@link DependencyHandler} for this project. The {@link
+     * DependencyHandler} is passed to the closure as the closure's delegate.
+     *
+     * @param configureClosure the closure to use to configure the dependencies.
+     */
+    void dependencies(Closure configureClosure);
+
+    /**
+     * Returns the plugins container for this project. The returned container can be used to manage the plugins which
+     * are used by this project.
+     *
+     * @return the plugin container. Never returns null.
+     */
+    PluginContainer getPlugins();
+
+    /**
+     * Returns the build script handler for this project. You can use this handler to query details about the build
+     * script for this project, and manage the classpath used to compile and execute the project's build script.
+     *
+     * @return the classpath handler. Never returns null.
+     */
+    ScriptHandler getBuildscript();
+
+    /**
+     * <p>Configures the build script classpath for this project.
+     *
+     * <p>The given closure is executed against this project's {@link ScriptHandler}. The {@link ScriptHandler} is
+     * passed to the closure as the closure's delegate.
+     *
+     * @param configureClosure the closure to use to configure the build script classpath.
+     */
+    void buildscript(Closure configureClosure);
+
+    /**
+     * Copies the specified files.  The given closure is used to configure a {@link CopySpec}, which is then used to
+     * copy the files. Example:
+     * <pre>
+     * copy {
+     *    from configurations.runtime
+     *    into 'build/deploy/lib'
+     * }
+     * </pre>
+     * Note that CopySpecs can be nested:
+     * <pre>
+     * copy {
+     *    into 'build/webroot'
+     *    exclude '**/.svn/**'
+     *    from('src/main/webapp') {
+     *       include '**/*.jsp'
+     *       filter(ReplaceTokens, tokens:[copyright:'2009', version:'2.3.1'])
+     *    }
+     *    from('src/main/js') {
+     *       include '**/*.js'
+     *    }
+     * }
+     * </pre>
+     *
+     * @param closure Closure to configure the CopySpec
+     * @return {@link WorkResult} that can be used to check if the copy did any work.
+     */
+    WorkResult copy(Closure closure);
+
+    /**
+     * Creates a {@link CopySpec} which can later be used to copy files or create an archive. The given closure is used
+     * to configure the {@link CopySpec} before it is returned by this method.
+     *
+     * @param closure Closure to configure the CopySpec
+     * @return The CopySpec
+     */
+    CopySpec copySpec(Closure closure);
+
+    /**
+     * <p>Configures this project using plugins or scripts. The given closure is used to configure an {@link
+     * org.gradle.api.plugins.ObjectConfigurationAction} which is then used to configure this project.</p>
+     *
+     * @param closure The closure to configure the {@code ObjectConfigurationAction}.
+     */
+    void apply(Closure closure);
+
+    /**
+     * <p>Configures this project using plugins or scripts. The following options are available:</p>
+     *
+     * <ul><li>{@code from}: A script to apply to the project. Accepts any path supported by {@link #uri(Object)}.</li>
+     *
+     * <li>{@code plugin}: The id or implementation class of the plugin to apply to the project.</li>
+     *
+     * <li>{@code to}: The target delegate object or objects. Use this to configure objects other than the
+     * project.</li></ul>
+     *
+     * <p>For more detail, see {@link org.gradle.api.plugins.ObjectConfigurationAction}.</p>
+     *
+     * @param options The options to use to configure the {@code ObjectConfigurationAction}.
+     */
+    void apply(Map<String, ?> options);
+
+    /**
+     * Returns the evaluation state of this project. You can use this to access information about the evaluation of this
+     * project, such as whether it has failed.
+     *
+     * @return the project state. Never returns null.
+     */
+    ProjectState getState();
+
+    /**
+     * Creates a container for managing named objects of the specified type. The specified type must have a public constructor which takes the name as a String parameter.
+     *
+     * @param type The type of objects for the container to contain.
+     * @param <T> The type of objects for the container to contain.
+     * @return The container.
+     */
+    <T> NamedDomainObjectContainer<T> container(Class<T> type);
+
+    /**
+     * Creates a container for managing named objects of the specified type. The given factory is used to create object instances.
+     *
+     * @param type The type of objects for the container to contain.
+     * @param factory The factory to use to create object instances.
+     * @param <T> The type of objects for the container to contain.
+     * @return The container.
+     */
+    <T> NamedDomainObjectContainer<T> container(Class<T> type, NamedDomainObjectFactory<? extends T> factory);
+
+    /**
+     * Creates a container for managing named objects of the specified type. The given closure is used to create object instances. The name of the instance to be created is passed as a parameter to
+     * the closure.
+     *
+     * @param type The type of objects for the container to contain.
+     * @param factoryClosure The closure to use to create object instances.
+     * @param <T> The type of objects for the container to contain.
+     * @return The container.
+     */
+    <T> NamedDomainObjectContainer<T> container(Class<T> type, Closure factoryClosure);
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/ProjectEvaluationListener.java b/subprojects/core/src/main/groovy/org/gradle/api/ProjectEvaluationListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/ProjectEvaluationListener.java
rename to subprojects/core/src/main/groovy/org/gradle/api/ProjectEvaluationListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/ProjectState.java b/subprojects/core/src/main/groovy/org/gradle/api/ProjectState.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/ProjectState.java
rename to subprojects/core/src/main/groovy/org/gradle/api/ProjectState.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Rule.java b/subprojects/core/src/main/groovy/org/gradle/api/Rule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Rule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Rule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Script.java b/subprojects/core/src/main/groovy/org/gradle/api/Script.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Script.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Script.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/ScriptCompilationException.java b/subprojects/core/src/main/groovy/org/gradle/api/ScriptCompilationException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/ScriptCompilationException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/ScriptCompilationException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Task.java b/subprojects/core/src/main/groovy/org/gradle/api/Task.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Task.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Task.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Transformer.java b/subprojects/core/src/main/groovy/org/gradle/api/Transformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/Transformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/Transformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/UncheckedIOException.java b/subprojects/core/src/main/groovy/org/gradle/api/UncheckedIOException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/UncheckedIOException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/UncheckedIOException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/UnknownDomainObjectException.java b/subprojects/core/src/main/groovy/org/gradle/api/UnknownDomainObjectException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/UnknownDomainObjectException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/UnknownDomainObjectException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/UnknownProjectException.java b/subprojects/core/src/main/groovy/org/gradle/api/UnknownProjectException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/UnknownProjectException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/UnknownProjectException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/UnknownTaskException.java b/subprojects/core/src/main/groovy/org/gradle/api/UnknownTaskException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/UnknownTaskException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/UnknownTaskException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ClientModule.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ClientModule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ClientModule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ClientModule.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/artifacts/Configuration.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/Configuration.java
new file mode 100644
index 0000000..a71c005
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/Configuration.java
@@ -0,0 +1,409 @@
+/*
+ * Copyright 2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.artifacts;
+
+import groovy.lang.Closure;
+import org.apache.ivy.plugins.resolver.DependencyResolver;
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.tasks.TaskDependency;
+
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * <p>A {@code Configuration} represents a group of artifacts and their dependencies.</p>
+ */
+public interface Configuration extends FileCollection {
+    /**
+     * The states a configuration can be into. A configuration is only mutable as long as it is
+     * in the unresolved state.
+     */
+    enum State { UNRESOLVED, RESOLVED, RESOLVED_WITH_FAILURES }
+
+    /**
+     * Returns the state of the configuration.
+     *
+     * @see org.gradle.api.artifacts.Configuration.State
+     */
+    State getState();
+
+    /**
+     * Returns the name of this configuration.
+     *
+     * @return The configuration name, never null.
+     */
+    String getName();
+
+    /**
+     * Returns true if this is a visible configuration. A visible configuration is usable outside the project it belongs
+     * to. The default value is true.
+     *
+     * @return true if this is a visible configuration.
+     */
+    boolean isVisible();
+
+    /**
+     * Sets the visibility of this configuration. When visible is set to true, this configuration is visibile outside
+     * the project it belongs to. The default value is true.
+     *
+     * @param visible true if this is a visible configuration
+     * @return this configuration
+     */
+    Configuration setVisible(boolean visible);
+
+    /**
+     * Returns the names of the configurations which this configuration extends from. The artifacts of the super
+     * configurations are also available in this configuration.
+     *
+     * @return The super configurations. Returns an empty set when this configuration does not extend any others.
+     */
+    Set<Configuration> getExtendsFrom();
+
+    /**
+     * Sets the configurations which this configuration extends from.
+     *
+     * @param superConfigs The super configuration. Should not be null.
+     * @return this configuration
+     */
+    Configuration setExtendsFrom(Set<Configuration> superConfigs);
+
+    /**
+     * Adds the given configurations to the set of configuration which this configuration extends from.
+     *
+     * @param superConfigs The super configurations.
+     * @return this configuration
+     */
+    Configuration extendsFrom(Configuration... superConfigs);
+
+    /**
+     * Returns the transitivity of this configuration. A transitive configuration contains the transitive closure of its
+     * direct dependencies, and all their dependencies. An intransitive configuration contains only the direct
+     * dependencies. The default value is true.
+     *
+     * @return true if this is a transitive configuration, false otherwise.
+     */
+    boolean isTransitive();
+
+    /**
+     * Sets the transitivity of this configuration. When set to true, this configuration will contain the transitive
+     * closure of its dependencies and their dependencies. The default value is true.
+     *
+     * @param t true if this is a transitive configuration.
+     * @return this configuration
+     */
+    Configuration setTransitive(boolean t);
+
+    /**
+     * Returns the description for this configuration.
+     *
+     * @return the description. May be null.
+     */
+    String getDescription();
+
+    /**
+     * Sets the description for this configuration.
+     *
+     * @param description the description. May be null
+     * @return this configuration
+     */
+    Configuration setDescription(String description);
+
+    /**
+     * Gets a ordered set including this configuration and all superconfigurations
+     * recursively.
+     * @return the list of all configurations
+     */
+    Set<Configuration> getHierarchy();
+
+    /**
+     * Resolves this configuration. This locates and downloads the files which make up this configuration, and returns
+     * the resulting set of files.
+     *
+     * @return The files of this configuration.
+     */
+    Set<File> resolve();
+
+    /**
+     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as
+     * {@link #files(org.gradle.api.specs.Spec)}.
+     *
+     * @param dependencySpecClosure The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
+     * @return The files of a subset of dependencies of this configuration.
+     */
+    Set<File> files(Closure dependencySpecClosure);
+
+    /**
+     * Resolves this configuration. This locates and downloads the files which make up this configuration.
+     * But only the resulting set of files belonging to the subset of dependencies specified by the dependencySpec
+     * is returned.
+     *
+     * @param dependencySpec The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
+     * @return The files of a subset of dependencies of this configuration.
+     */
+    Set<File> files(Spec<Dependency> dependencySpec);
+
+    /**
+     * Resolves this configuration. This locates and downloads the files which make up this configuration.
+     * But only the resulting set of files belonging to the specified dependencies
+     * is returned.
+     *
+     * @param dependencies The dependences to be resolved
+     * @return The files of a subset of dependencies of this configuration.
+     */
+    Set<File> files(Dependency... dependencies);
+
+    /**
+     * Resolves this configuration lazyly. The resolve happens when the elements of the returned FileCollection get accessed the first time.
+     * This locates and downloads the files which make up this configuration. Only the resulting set of files belonging to the subset
+     * of dependencies specified by the dependencySpec is contained in the FileCollection.
+     *
+     * @param dependencySpec The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
+     * @return The FileCollection with a subset of dependencies of this configuration.
+     */
+    FileCollection fileCollection(Spec<Dependency> dependencySpec);
+
+    /**
+     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as
+     * {@link #fileCollection(org.gradle.api.specs.Spec)}.
+     *
+     * @param dependencySpecClosure The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
+     * @return The FileCollection with a subset of dependencies of this configuration.
+     */
+    FileCollection fileCollection(Closure dependencySpecClosure);
+
+    /**
+     * Resolves this configuration lazyly. The resolve happens when the elements of the returned FileCollection get accessed the first time.
+     * This locates and downloads the files which make up this configuration. Only the resulting set of files belonging to specified
+     * dependencies is contained in the FileCollection.
+     *
+     * @param dependencies The dependencies for which the FileCollection should contain the files.
+     * @return The FileCollection with a subset of dependencies of this configuration.
+     */
+    FileCollection fileCollection(Dependency... dependencies);
+
+
+    /**
+     * Resolves this configuration. This locates and downloads the files which make up this configuration, and returns
+     * a ResolvedConfiguration that may be used to determine information about the resolve (including errors).
+     *
+     * @return The ResolvedConfiguration object
+     */
+    ResolvedConfiguration getResolvedConfiguration();
+
+    /**
+     * Returns the name of the task that upload the artifacts of this configuration to repositories
+     * declared by the user.
+     *
+     * @see org.gradle.api.tasks.Upload
+     */
+    String getUploadTaskName();
+
+    /**
+     * Returns a {@code TaskDependency} object containing all required dependencies to build the internal dependencies
+     * (e.g. project dependencies) belonging to this configuration or to one of its super configurations.
+     *
+     * @return a TaskDependency object
+     */
+    TaskDependency getBuildDependencies();
+
+    /**
+     * Returns a TaskDependency object containing dependencies on all tasks with the specified name from project
+     * dependencies related to this configuration or one of its super configurations.  These other projects may be
+     * projects this configuration depends on or projects with a similarly named configuation that depend on this one
+     * based on the useDependOn argument.
+     *
+     * @param useDependedOn if true, add tasks from project dependencies in this conifguration, otherwise use projects
+     *                      from configurations with the same name that depend on this one.
+     * @param taskName name of task to depend on
+     * @return the populated TaskDependency object
+     */
+    TaskDependency getTaskDependencyFromProjectDependency(boolean useDependedOn, final String taskName);
+
+    /**
+     * Returns a {@code TaskDependency} object containing all required dependencies to build the artifacts
+     * belonging to this configuration or to one of its super configurations.
+     *
+     * @return a task dependency object
+     */
+    TaskDependency getBuildArtifacts();
+
+    /**
+     * Publishes the artifacts of this configuration to the specified repositories. This
+     * method is usually used only internally as the users use the associated upload tasks to
+     * upload the artifacts.
+     *
+     * @param publishRepositories The repositories to publish the artifacts to.
+     * @param descriptorDestination The destination dir for the descriptor file (if null no descriptor file is written).
+     *
+     * @see org.gradle.api.tasks.Upload
+     * @see #getUploadTaskName()
+     */
+    void publish(List<DependencyResolver> publishRepositories, File descriptorDestination);
+
+    /**
+     * Gets the set of dependencies directly contained in this configuration
+     * (ignoring superconfigurations).
+     *
+     * @return the set of dependencies
+     */
+    Set<Dependency> getDependencies();
+
+    /**
+     * Gets the complete set of dependencies including those contributed by
+     * superconfigurations.
+     *
+     * @return the set of dependencies
+     */
+    Set<Dependency> getAllDependencies();
+
+    /**
+     * Gets the set of dependencies of type T directly contained in this configuration (ignoring superconfigurations).
+     *
+     * @param type the dependency type
+     * @param <T> the dependency type
+     * @return The set. Returns an empty set if there are no such dependencies.
+     */
+    <T extends Dependency> Set<T> getDependencies(Class<T> type);
+
+    /**
+     * Gets the set of dependencies of type T for this configuration including those contributed by superconfigurations.
+     *
+     * @param type the dependency type
+     * @param <T> the dependency type
+     * @return The set. Returns an empty set if there are no such dependencies.
+     */
+    <T extends Dependency> Set<T> getAllDependencies(Class<T> type);
+
+    /**
+     * Adds a dependency to this configuration.
+     *
+     * @param dependency The dependency to be added.
+     */
+    void addDependency(Dependency dependency);
+
+    /**
+     * Returns the artifacts of this configuration excluding the artifacts of extended configurations.
+     */
+    Set<PublishArtifact> getArtifacts();
+
+    /**
+     * Returns the artifacts of this configuration including the artifacts of extended configurations.
+     */
+    Set<PublishArtifact> getAllArtifacts();
+
+    /**
+     * Returns the artifacts of this configuration as a {@link FileCollection}, including artifacts of extended
+     * configurations.
+     *
+     * @return the artifact files.
+     */
+    FileCollection getAllArtifactFiles();
+
+    /**
+     * Returns the exclude rules applied for resolving any dependency of this configuration.
+     *
+     * @see #exclude(java.util.Map)
+     */
+    Set<ExcludeRule> getExcludeRules();
+
+    /**
+     * Adds an exclude rule to exclude transitive dependencies for all dependencies of this configuration.
+     * You can also add exclude rules per-dependency. See {@link ModuleDependency#exclude(java.util.Map)}.
+     *
+     * @param excludeProperties the properties to define the exclude rule.
+     * @return this
+     */
+    Configuration exclude(Map<String, String> excludeProperties);
+
+    /**
+     * Returns all the configurations belonging to the same configuration container as this
+     * configuration (including this configuration).
+     */
+    Set<Configuration> getAll();
+
+    /**
+     * Adds an artifact to be published to this configuration.
+     *
+     * @param artifact The artifact.
+     * @return this
+     */
+    Configuration addArtifact(PublishArtifact artifact);
+
+    /**
+     * Removes an artifact from the artifacts to be published to this configuration.
+     *
+     * @param artifact The artifact.
+     * @return this
+     */
+    Configuration removeArtifact(PublishArtifact artifact);
+
+    /**
+     * Creates a copy of this configuration that only contains the dependencies directly in this configuration
+     * (without contributions from superconfigurations).  The new configuation will be in the
+     * UNRESOLVED state, but will retain all other attributes of this configuration except superconfigurations.
+     * {@link #getHierarchy()} for the copy will not include any superconfigurations.
+     * @return copy of this configuration
+     */
+    Configuration copy();
+
+    /**
+     * Creates a copy of this configuration that contains the dependencies directly in this configuration
+     * and those derived from superconfigurations.  The new configuration will be in the
+     * UNRESOLVED state, but will retain all other attributes of this configuration except superconfigurations.
+     * {@link #getHierarchy()} for the copy will not include any superconfigurations.
+     * @return copy of this configuration
+     */
+    Configuration copyRecursive();
+
+    /**
+     * Creates a copy of this configuration ignoring superconfigurations (see {@link #copy()} but filtering
+     * the dependencies using the dependencySpec.  The dependencySpec may be obtained from
+     * {@link org.gradle.api.artifacts.specs.DependencySpecs DependencySpecs.type()} like
+     * DependencySpecs.type(Type.EXTERNAL)
+     * @param dependencySpec filtering requirements
+     * @return copy of this configuration
+     */
+    Configuration copy(Spec<Dependency> dependencySpec);
+
+    /**
+     * Creates a copy of this configuration with dependencies from superconfigurations (see {@link #copyRecursive()})
+     *  but filtering the dependencies using the dependencySpec.  The dependencySpec may be obtained from
+     * {@link org.gradle.api.artifacts.specs.DependencySpecs DependencySpecs.type()} like
+     * DependencySpecs.type(Type.EXTERNAL)
+     * @param dependencySpec filtering requirements
+     * @return copy of this configuration
+     */
+    Configuration copyRecursive(Spec<Dependency> dependencySpec);
+
+    /**
+     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as {@link #copy(org.gradle.api.specs.Spec)}
+     *
+     * @param dependencySpec filtering requirements
+     * @return copy of this configuration
+     */
+    Configuration copy(Closure dependencySpec);
+
+    /**
+     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as {@link #copyRecursive(org.gradle.api.specs.Spec)}
+     *
+     * @param dependencySpec filtering requirements
+     * @return copy of this configuration
+     */
+    Configuration copyRecursive(Closure dependencySpec);
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ConfigurationContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ConfigurationContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ConfigurationContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ConfigurationContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Dependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/Dependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Dependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/Dependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/DependencyArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/DependencyArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/DependencyArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/DependencyArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExcludeRule.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExcludeRule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExcludeRule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExcludeRule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExcludeRuleContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExcludeRuleContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExcludeRuleContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExcludeRuleContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExternalDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExternalDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExternalDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExternalDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExternalModuleDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExternalModuleDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ExternalModuleDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ExternalModuleDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/FileCollectionDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/FileCollectionDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/FileCollectionDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/FileCollectionDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Module.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/Module.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Module.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/Module.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ModuleDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ModuleDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ModuleDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ModuleDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ProjectDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ProjectDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ProjectDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ProjectDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/PublishArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/PublishArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/PublishArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/PublishArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/PublishInstruction.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/PublishInstruction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/PublishInstruction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/PublishInstruction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolveException.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolveException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolveException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolveException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolvedArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolvedArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolvedConfiguration.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedConfiguration.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolvedConfiguration.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedConfiguration.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolvedDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolvedDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolvedDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolverContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolverContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/ResolverContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/ResolverContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/SelfResolvingDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/SelfResolvingDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/SelfResolvingDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/SelfResolvingDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/UnknownConfigurationException.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/UnknownConfigurationException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/UnknownConfigurationException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/UnknownConfigurationException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/UnknownRepositoryException.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/UnknownRepositoryException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/UnknownRepositoryException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/UnknownRepositoryException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/ArtifactHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/ArtifactHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/ArtifactHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/ArtifactHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/DependencyHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/DependencyHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/DependencyHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/DependencyHandler.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/RepositoryHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/RepositoryHandler.java
new file mode 100644
index 0000000..b230e30
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/RepositoryHandler.java
@@ -0,0 +1,261 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.artifacts.dsl;
+
+import groovy.lang.Closure;
+import org.apache.ivy.plugins.resolver.DependencyResolver;
+import org.apache.ivy.plugins.resolver.FileSystemResolver;
+import org.gradle.api.artifacts.ResolverContainer;
+import org.gradle.api.artifacts.maven.GroovyMavenDeployer;
+import org.gradle.api.artifacts.maven.MavenResolver;
+import org.gradle.api.internal.artifacts.configurations.ResolverProvider;
+
+import java.util.Map;
+
+/**
+ * A {@code RepositoryHandler} manages a set of repositories, allowing repositories to be defined and queried.
+ *
+ * @author Hans Dockter
+ */
+public interface RepositoryHandler extends ResolverContainer, ResolverProvider {
+    final String DEFAULT_MAVEN_DEPLOYER_NAME = "mavenDeployer";
+    final String DEFAULT_MAVEN_INSTALLER_NAME = "mavenInstaller";
+
+    /**
+     * Adds a resolver that looks into a number of directories for artifacts. The artifacts are expected to be located in the
+     * root of the specified directories. The resolver ignores any group/organization information specified in the
+     * dependency section of your build script. If you only use this kind of resolver you might specify your
+     * dependencies like <code>":junit:4.4"</code> instead of <code>"junit:junit:4.4"</code>.
+     *
+     * The following parameter are accepted as keys for the map:
+     *
+     * <table summary="Shows property keys and associated values">
+     * <tr><th>Key</th>
+     *     <th>Description of Associated Value</th></tr>
+     * <tr><td><code>name</code></td>
+     *     <td><em>(optional)</em> The name of the repository.
+     * The default is a Hash value of the rootdir paths. The name is used in the console output,
+     * to point to information related to a particular repository. A name must be unique amongst a repository group.</td></tr>
+     * <tr><td><code>dirs</code></td>
+     *     <td>Specifies a list of rootDirs where to look for dependencies.</td></tr>
+     * </table>
+     *
+     * <p>Examples:
+     * <pre>
+     * repositories {
+     *     flatDir name: 'libs', dirs: "$projectDir/libs"
+     *     flatDir dirs: ["$projectDir/libs1", "$projectDir/libs2"]
+     * }
+     * </pre>
+     * </p>
+     *
+     * @param args
+     * @return the added resolver
+     * @throws org.gradle.api.InvalidUserDataException In the case neither rootDir nor rootDirs is specified of if both
+     * are specified.
+     */
+    FileSystemResolver flatDir(Map<String, ?> args);
+
+    /**
+     * Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is
+     * always {@link org.gradle.api.artifacts.ResolverContainer#MAVEN_CENTRAL_URL}. The behavior of this resolver
+     * is otherwise the same as the ones added by {@link #mavenRepo(java.util.Map)}.
+     *
+     * The following parameter are accepted as keys for the map:
+     *
+     * <table summary="Shows property keys and associated values">
+     * <tr><th>Key</th>
+     *     <th>Description of Associated Value</th></tr>
+     * <tr><td><code>name</code></td>
+     *     <td><em>(optional)</em> The name of the repository. The default is
+     * {@value org.gradle.api.artifacts.ResolverContainer#DEFAULT_MAVEN_CENTRAL_REPO_NAME} is used as the name. A name
+     * must be unique amongst a repository group.
+     * </td></tr>
+     * <tr><td><code>urls</code></td>
+     *     <td>A single jar repository or a collection of jar repositories. Sometimes the artifact
+     * lives in a different repository than the POM. In such a case you can specify further locations to look for an artifact.
+     * But be aware that the POM is only looked up in the root repository</td></tr>
+     * </table>
+     *
+     * <p>Examples:
+     * <pre>
+     * repositories {
+     *     mavenCentral urls: ["http://www.mycompany.com/repository1", "http://www.mycompany.com/repository2"]
+     *     mavenCentral name: "nonDefaultName", urls: ["http://www.mycompany.com/repository"]
+     * }
+     * </pre>
+     * </p>
+     *
+     * @param args A list of urls of repositories to look for artifacts only.
+     * @return the added resolver
+     * @see #mavenRepo(java.util.Map)
+     */
+    DependencyResolver mavenCentral(Map<String, ?> args);
+
+    /**
+     * Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is
+     * {@value org.gradle.api.artifacts.ResolverContainer#MAVEN_CENTRAL_URL}. The name of the repository is
+     * {@value org.gradle.api.artifacts.ResolverContainer#DEFAULT_MAVEN_CENTRAL_REPO_NAME}.
+     *
+     * <p>Examples:
+     * <pre>
+     * repositories {
+     *     mavenCentral()
+     * }
+     * </pre>
+     * </p>
+     *
+     * @return the added resolver
+     * @see #mavenRepo(java.util.Map)
+     * @see #mavenCentral(java.util.Map)
+     */
+    DependencyResolver mavenCentral();
+
+    /**
+     * Adds a repository which looks in the local Maven cache for dependencies. The name of the repository is
+     * {@value org.gradle.api.artifacts.ResolverContainer#DEFAULT_MAVEN_LOCAL_REPO_NAME}.
+     *
+     * <p>Examples:
+     * <pre>
+     * repositories {
+     *     mavenLocal()
+     * }
+     * </pre>
+     * </p>
+     *
+     * @return the added resolver
+     * @see #mavenRepo(java.util.Map)
+     */
+    DependencyResolver mavenLocal();
+
+    /**
+     * Adds a repository which is Maven compatible. The compatibility is in regard to layout, snapshot handling and
+     * dealing with the pom.xml. This repository can't be used for publishing in a Maven compatible way. For publishing
+     * to a Maven repository, have a look at {@link #mavenDeployer(java.util.Map)} or {@link #mavenInstaller(java.util.Map)}.
+     *
+     * By default the repository accepts to resolve artifacts without a pom. The repository always looks first for the pom
+     * in the root repository. It then looks for the artifact in the root repository. Sometimes the artifact
+     * lives in a different repository than the pom. In such a case you can specify further locations to look for an artifact.
+     * But be aware that the pom is only looked up in the root repository.
+     *
+     * The following parameter are accepted as keys for the map:
+     *
+     * <table summary="Shows property keys and associated values">
+     * <tr><th>Key</th>
+     *     <th>Description of Associated Value</th></tr>
+     * <tr><td><code>name</code></td>
+     *     <td><em>(optional)</em> The name of the repository. The default is the URL of the root repo.
+     * The name is used in the console output,
+     * to point to information related to a particular repository. A name must be unique amongst a repository group.
+     * </td></tr>
+     * <tr><td><code>urls</code></td>
+     *     <td>A single repository url or a list of urls. The first url is the the url of the root repo.
+     * Gradle always looks first for the pom in the root repository. After this it looks for the artifact in the root repository.
+     * If the artifact can't be found there, it looks for it in the other repositories.</td></tr>
+     * </table>
+     *
+     * <p>Examples:
+     * <pre>
+     * repositories {
+     *     mavenRepo urls: ["http://www.mycompany.com/repository1", "http://www.mycompany.com/repository2"]
+     *     mavenRepo name: "nonDefaultName", urls: ["http://www.mycompany.com/repository"]
+     * }
+     * </pre>
+     * </p>
+     *
+     * For Ivy related reasons, Maven Snapshot dependencies are only properly resolved if no additional jar locations
+     * are specified. This is unfortunate and we hope to improve this in a future release.
+     *
+     * @param args The argument to create the repository
+     * @return the added repository
+     * @see #mavenCentral(java.util.Map)
+     */
+    DependencyResolver mavenRepo(Map<String, ?> args);
+
+    DependencyResolver mavenRepo(Map<String, ?> args, Closure configClosure);
+
+    GroovyMavenDeployer mavenDeployer();
+
+    GroovyMavenDeployer mavenDeployer(Closure configureClosure);
+
+    /**
+     * Adds a repository for publishing to a Maven repository. This repository can not be used for reading from a Maven
+     * repository.
+     *
+     * The following parameter are accepted as keys for the map:
+     *
+     * <table summary="Shows property keys and associated values">
+     * <tr><th>Key</th>
+     *     <th>Description of Associated Value</th></tr>
+     * <tr><td><code>name</code></td>
+     *     <td><em>(optional)</em> The name of the repository. The default is <em>mavenDeployer-{SOME_ID}</em>.
+     * The name is used in the console output,
+     * to point to information related to a particular repository. A name must be unique amongst a repository group.
+     * </td></tr>
+     * </table>
+     *
+     * @param args The argument to create the repository
+     * @return The added repository
+     * @see #mavenDeployer(java.util.Map, groovy.lang.Closure)
+     */
+    GroovyMavenDeployer mavenDeployer(Map<String, ?> args);
+
+    /**
+     * Behaves the same way as {@link #mavenDeployer(java.util.Map)}. Additionally a closure can be passed to
+     * further configure the added repository.
+     *
+     * @param args The argument to create the repository
+     * @param configureClosure
+     * @return The added repository
+     */
+    GroovyMavenDeployer mavenDeployer(Map<String, ?> args, Closure configureClosure);
+
+    MavenResolver mavenInstaller();
+
+    MavenResolver mavenInstaller(Closure configureClosure);
+
+    /**
+     * Adds a repository for installing to a local Maven cache. This repository can not be used for reading.
+     *
+     * The following parameter are accepted as keys for the map:
+     *
+     * <table summary="Shows property keys and associated values">
+     * <tr><th>Key</th>
+     *     <th>Description of Associated Value</th></tr>
+     * <tr><td><code>name</code></td>
+     *     <td><em>(optional)</em> The name of the repository. The default is <em>mavenInstaller-{SOME_ID}</em>.
+     * The name is used in the console output,
+     * to point to information related to a particular repository. A name must be unique amongst a repository group.
+     * </td></tr>
+     * </table>
+     *
+     * @param args The argument to create the repository
+     * @return The added repository
+     * @see #mavenInstaller(java.util.Map, groovy.lang.Closure) (java.util.Map, groovy.lang.Closure)
+     */
+    MavenResolver mavenInstaller(Map<String, ?> args);
+
+    /**
+     * Behaves the same way as {@link #mavenInstaller(java.util.Map)}. Additionally a closure can be passed to
+     * further configure the added repository.
+     *
+     * @param args The argument to create the repository
+     * @param configureClosure
+     * @return The added repository
+     */
+    MavenResolver mavenInstaller(Map<String, ?> args, Closure configureClosure);
+
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/dsl/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMapping.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMapping.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMapping.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMapping.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/GroovyMavenDeployer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/GroovyMavenDeployer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/GroovyMavenDeployer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/GroovyMavenDeployer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployment.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployment.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployment.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenDeployment.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenPom.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenPom.java
new file mode 100644
index 0000000..0018e53
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenPom.java
@@ -0,0 +1,226 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.artifacts.maven;
+
+import groovy.lang.Closure;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.gradle.api.Action;
+import org.gradle.api.artifacts.ConfigurationContainer;
+
+import java.io.Writer;
+import java.util.List;
+
+/**
+ * Is used for generating a Maven pom file and customizing the generation.
+ * To learn about the Maven pom see: <a href="http://maven.apache.org/pom.html">http://maven.apache.org/pom.html</a>
+ *
+ * @author Hans Dockter
+ */
+public interface MavenPom {
+    /**
+     * Returns the scope mappings used for generating this pom.
+     */
+    Conf2ScopeMappingContainer getScopeMappings();
+
+    /**
+     * Provides a builder for the Maven pom for adding or modifying properties of the Maven {@link #getModel()}.
+     * The syntax is exactly the same as used by polyglot Maven. For example:
+     *
+     * <pre>
+     * pom.project {
+     *    inceptionYear '2008'
+     *    licenses {
+     *       license {
+     *          name 'The Apache Software License, Version 2.0'
+     *          url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+     *          distribution 'repo'
+     *       }
+     *    }
+     * }
+     * </pre>
+     *
+     * @param pom
+     * @return this
+     */
+    MavenPom project(Closure pom);
+
+    /**
+     * Returns the group id for this POM.
+     *
+     * @see org.apache.maven.model.Model#setGroupId(String)
+     */
+    String getGroupId();
+
+    /**
+     * Sets the group id for this POM.
+     *
+     * @see org.apache.maven.model.Model#getGroupId
+     * @return this
+     */
+    MavenPom setGroupId(String groupId);
+
+    /**
+     * Returns the artifact id for this POM.
+     * 
+     * @see org.apache.maven.model.Model#getArtifactId()
+     */
+    String getArtifactId();
+
+    /**
+     * Sets the artifact id for this POM.
+     *
+     * @see org.apache.maven.model.Model#setArtifactId(String)
+     * @return this
+     */
+    MavenPom setArtifactId(String artifactId);
+
+    /**
+     * Returns the version for this POM.
+     *
+     * @see org.apache.maven.model.Model#getVersion()
+     */
+    String getVersion();
+
+    /**
+     * Sets the version for this POM.
+     *
+     * @see org.apache.maven.model.Model#setVersion(String)
+     * @return this
+     */
+    MavenPom setVersion(String version);
+
+    /**
+     * Returns the packaging for this POM.
+     *
+     * @see org.apache.maven.model.Model#getPackaging()
+     */
+    String getPackaging();
+
+    /**
+     * Sets the packaging for this POM.
+     *
+     * @see org.apache.maven.model.Model#setPackaging(String)
+     * @return this
+     */
+    MavenPom setPackaging(String packaging);
+
+    /**
+     * Sets the dependencies for this POM.
+     *
+     * @see org.apache.maven.model.Model#setDependencies(java.util.List)
+     * @return this
+     */
+    MavenPom setDependencies(List<Dependency> dependencies);
+
+    /**
+     * Returns the dependencies for this POM.
+     * 
+     * @see org.apache.maven.model.Model#getDependencies()
+     */
+    List<Dependency> getDependencies();
+
+    /**
+     * Returns the underlying native Maven {@link org.apache.maven.model.Model} object. The MavenPom object
+     * delegates all the configuration information to this object. There Gradle MavenPom objects provides
+     * delegation methods just for setting the groupId, artifactId, version and packaging. For all other
+     * elements, either use the model object or {@link #project(groovy.lang.Closure)}.
+     *
+     * @return the underlying native Maven object
+     */
+    Model getModel();
+
+    /**
+     * Sets the underlying native Maven {@link org.apache.maven.model.Model} object.
+     *
+     * @param model
+     * @return this
+     * @see #getModel() 
+     */
+    MavenPom setModel(Model model);
+
+    /**
+     * Writes the {@link #getEffectivePom()} xml to a writer while applying the {@link #withXml(org.gradle.api.Action)} actions.
+     *
+     * @param writer The writer to write the pom xml.
+     * @return this
+     */
+    MavenPom writeTo(Writer writer);
+
+    /**
+     * Writes the {@link #getEffectivePom()} xml to a file while applying the {@link #withXml(org.gradle.api.Action)} actions.
+     * The path is resolved as defined by {@link org.gradle.api.Project#files(Object...)}
+     * The file will be encoded as UTF-8.
+     *
+     * @param path The path of the file to write the pom xml into.
+     * @return this
+     */
+    MavenPom writeTo(Object path);
+
+    /**
+     * <p>Adds a closure to be called when the pom has been configured. The pom is passed to the closure as a
+     * parameter.</p>
+     *
+     * @param closure The closure to execute when the pom has been configured.
+     * @return this
+     */
+    MavenPom whenConfigured(Closure closure);
+
+    /**
+     * <p>Adds an action to be called when the pom has been configured. The pom is passed to the action as a
+     * parameter.</p>
+     *
+     * @param action The action to execute when the pom has been configured.
+     * @return this
+     */
+    MavenPom whenConfigured(Action<MavenPom> action);
+
+    /**
+     * <p>Adds a closure to be called when the POM XML has been created. The XML is passed to the closure as a
+     * parameter in form of a {@link org.gradle.api.artifacts.maven.XmlProvider}. The action can modify the XML.</p>
+     *
+     * @param closure The closure to execute when the POM XML has been created.
+     * @return this
+     */
+    MavenPom withXml(Closure closure);
+
+    /**
+     * <p>Adds an action to be called when the POM XML has been created. The XML is passed to the action as a
+     * parameter in form of a {@link org.gradle.api.artifacts.maven.XmlProvider}. The action can modify the XML.</p>
+     *
+     * @param action The action to execute when the POM XML has been created.
+     * @return this
+     */
+    MavenPom withXml(Action<XmlProvider> action);
+
+    /**
+     * Returns the configuration container used for mapping configurations to maven scopes.
+     */
+    ConfigurationContainer getConfigurations();
+
+    /**
+     * Sets the configuration container used for mapping configurations to maven scopes.
+     * @return this
+     */
+    MavenPom setConfigurations(ConfigurationContainer configurations);
+
+    /**
+     * Returns a pom with the generated dependencies and the {@link #whenConfigured(org.gradle.api.Action)} actions applied.
+     *
+     * @return the effective pom
+     */
+    MavenPom getEffectivePom();
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/MavenResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/PomFilterContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/PomFilterContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/PomFilterContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/PomFilterContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/PublishFilter.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/PublishFilter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/PublishFilter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/PublishFilter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/XmlProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/XmlProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/XmlProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/XmlProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/maven/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/repositories/WebdavResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/repositories/WebdavResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/repositories/WebdavResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/repositories/WebdavResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/repositories/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/repositories/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/repositories/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/repositories/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/DependencySpecs.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/DependencySpecs.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/DependencySpecs.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/DependencySpecs.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/Type.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/Type.java
new file mode 100644
index 0000000..c4edf5b
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/Type.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.artifacts.specs;
+
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.ProjectDependency;
+import org.gradle.api.artifacts.ExternalDependency;
+
+/**
+ * Dependency types.
+ */
+public enum Type {
+    EXTERNAL {
+        public boolean isOf(Dependency dependency) {
+            return dependency instanceof ExternalDependency;
+        }
+    },
+    PROJECT {
+        public boolean isOf(Dependency dependency) {
+            return dependency instanceof ProjectDependency;
+        }
+    };
+
+    public abstract boolean isOf(Dependency dependency);
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/artifacts/specs/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskActionListener.java b/subprojects/core/src/main/groovy/org/gradle/api/execution/TaskActionListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskActionListener.java
rename to subprojects/core/src/main/groovy/org/gradle/api/execution/TaskActionListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraph.java b/subprojects/core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraph.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraph.java
rename to subprojects/core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraph.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraphListener.java b/subprojects/core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraphListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraphListener.java
rename to subprojects/core/src/main/groovy/org/gradle/api/execution/TaskExecutionGraphListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskExecutionListener.java b/subprojects/core/src/main/groovy/org/gradle/api/execution/TaskExecutionListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/TaskExecutionListener.java
rename to subprojects/core/src/main/groovy/org/gradle/api/execution/TaskExecutionListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/execution/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/execution/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/execution/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/ConfigurableFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/file/ConfigurableFileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/ConfigurableFileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/ConfigurableFileCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/ConfigurableFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/file/ConfigurableFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/ConfigurableFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/ConfigurableFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/ContentFilterable.java b/subprojects/core/src/main/groovy/org/gradle/api/file/ContentFilterable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/ContentFilterable.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/ContentFilterable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/CopyProcessingSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/file/CopyProcessingSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/CopyProcessingSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/CopyProcessingSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/CopySourceSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/file/CopySourceSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/CopySourceSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/CopySourceSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/CopySpec.java b/subprojects/core/src/main/groovy/org/gradle/api/file/CopySpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/CopySpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/CopySpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/DeleteAction.java b/subprojects/core/src/main/groovy/org/gradle/api/file/DeleteAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/DeleteAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/DeleteAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/EmptyFileVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/file/EmptyFileVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/EmptyFileVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/EmptyFileVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/file/FileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/FileCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileCopyDetails.java b/subprojects/core/src/main/groovy/org/gradle/api/file/FileCopyDetails.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileCopyDetails.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/FileCopyDetails.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/file/FileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/FileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileTreeElement.java b/subprojects/core/src/main/groovy/org/gradle/api/file/FileTreeElement.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileTreeElement.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/FileTreeElement.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileVisitDetails.java b/subprojects/core/src/main/groovy/org/gradle/api/file/FileVisitDetails.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileVisitDetails.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/FileVisitDetails.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/file/FileVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/FileVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/FileVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/RelativePath.java b/subprojects/core/src/main/groovy/org/gradle/api/file/RelativePath.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/RelativePath.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/RelativePath.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/SourceDirectorySet.java b/subprojects/core/src/main/groovy/org/gradle/api/file/SourceDirectorySet.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/SourceDirectorySet.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/SourceDirectorySet.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/file/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/file/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/file/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/file/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/ProjectDescriptor.java b/subprojects/core/src/main/groovy/org/gradle/api/initialization/ProjectDescriptor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/ProjectDescriptor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/initialization/ProjectDescriptor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/Settings.java b/subprojects/core/src/main/groovy/org/gradle/api/initialization/Settings.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/Settings.java
rename to subprojects/core/src/main/groovy/org/gradle/api/initialization/Settings.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/dsl/ScriptHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/initialization/dsl/ScriptHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/dsl/ScriptHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/initialization/dsl/ScriptHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/dsl/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/initialization/dsl/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/dsl/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/initialization/dsl/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/initialization/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/initialization/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/initialization/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractClassGenerator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractClassGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractClassGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractClassGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractClassPathProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractClassPathProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractClassPathProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractClassPathProvider.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractDomainObjectCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractDomainObjectCollection.java
new file mode 100644
index 0000000..21ebfe2
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractDomainObjectCollection.java
@@ -0,0 +1,163 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal;
+
+import groovy.lang.Closure;
+import org.gradle.api.Action;
+import org.gradle.api.DomainObjectCollection;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.specs.Specs;
+import org.gradle.util.ConfigureUtil;
+import org.gradle.util.DeprecationLogger;
+
+import java.util.*;
+
+public abstract class AbstractDomainObjectCollection<T> implements DomainObjectCollection<T> {
+    private final Store<T> store;
+
+    protected AbstractDomainObjectCollection(Store<T> store) {
+        this.store = store;
+    }
+
+    public Set<T> getAll() {
+        return new LinkedHashSet<T>(store.getAll());
+    }
+
+    public Set<T> findAll(Spec<? super T> spec) {
+        return Specs.filterIterable(store.getAll(), spec);
+    }
+
+    public Iterator<T> iterator() {
+        return getAll().iterator();
+    }
+
+    public void allObjects(Action<? super T> action) {
+        DeprecationLogger.nagUser("DomainObjectCollection.allObjects()", "all()");
+        all(action);
+    }
+
+    public void allObjects(Closure action) {
+        DeprecationLogger.nagUser("DomainObjectCollection.allObjects()", "all()");
+        all(action);
+    }
+
+    public void all(Action<? super T> action) {
+        whenObjectAdded(action);
+        for (T t : new ArrayList<T>(store.getAll())) {
+            action.execute(t);
+        }
+    }
+
+    public void all(Closure action) {
+        all(toAction(action));
+    }
+
+    public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Action<? super S> configureAction) {
+        DomainObjectCollection<S> result = withType(type);
+        result.all(configureAction);
+        return result;
+    }
+
+    public <S extends T> DomainObjectCollection<S> withType(Class<S> type, Closure configureClosure) {
+        DomainObjectCollection<S> result = withType(type);
+        result.all(configureClosure);
+        return result;
+    }
+
+    public Action<? super T> whenObjectAdded(Action<? super T> action) {
+        store.objectAdded(action);
+        return action;
+    }
+
+    public Action<? super T> whenObjectRemoved(Action<? super T> action) {
+        store.objectRemoved(action);
+        return action;
+    }
+
+    public void whenObjectAdded(Closure action) {
+        whenObjectAdded(toAction(action));
+    }
+
+    private Action<? super T> toAction(final Closure action) {
+        return new Action<T>() {
+            public void execute(T t) {
+                ConfigureUtil.configure(action, t);
+            }
+        };
+    }
+
+    protected interface Store<S> {
+        Collection<? extends S> getAll();
+
+        void objectAdded(Action<? super S> action);
+
+        void objectRemoved(Action<? super S> action);
+    }
+
+    protected static class FilteredStore<S> implements Store<S> {
+        private final Store<? super S> store;
+        private final Class<S> type;
+        private final Spec<? super S> spec;
+
+        public FilteredStore(Store<? super S> store, Class<S> type, Spec<? super S> spec) {
+            this.store = store;
+            this.type = type;
+            this.spec = spec;
+        }
+
+        public Collection<? extends S> getAll() {
+            List<S> values = new ArrayList<S>();
+            for (Object s : store.getAll()) {
+                S filtered = filter(s);
+                if (filtered != null) {
+                    values.add(filtered);
+                }
+            }
+            return values;
+        }
+
+        public void objectAdded(Action<? super S> action) {
+            store.objectAdded(filter(action));
+        }
+
+        public void objectRemoved(Action<? super S> action) {
+            store.objectRemoved(filter(action));
+        }
+
+        protected S filter(Object object) {
+            if (!type.isInstance(object)) {
+                return null;
+            }
+            S s = type.cast(object);
+            if (!spec.isSatisfiedBy(s)) {
+                return null;
+            }
+            return s;
+        }
+
+        protected Action<Object> filter(final Action<? super S> action) {
+            return new Action<Object>() {
+                public void execute(Object object) {
+                    S s = filter(object);
+                    if (s != null) {
+                        action.execute(s);
+                    }
+                }
+            };
+        }
+    }
+
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractDynamicObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractDynamicObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractDynamicObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractDynamicObject.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractTask.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractTask.java
new file mode 100644
index 0000000..8c39ba0
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/AbstractTask.java
@@ -0,0 +1,456 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal;
+
+import groovy.lang.Closure;
+import groovy.lang.MissingPropertyException;
+import org.codehaus.groovy.runtime.InvokerInvocationException;
+import org.gradle.api.*;
+import org.gradle.api.internal.file.TemporaryFileProvider;
+import org.gradle.api.internal.plugins.DefaultConvention;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.internal.project.ServiceRegistry;
+import org.gradle.api.internal.tasks.DefaultTaskDependency;
+import org.gradle.api.internal.tasks.TaskDependencyInternal;
+import org.gradle.api.internal.tasks.TaskExecuter;
+import org.gradle.api.internal.tasks.TaskStateInternal;
+import org.gradle.api.logging.*;
+import org.gradle.api.plugins.Convention;
+import org.gradle.api.specs.AndSpec;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.tasks.TaskDependency;
+import org.gradle.api.tasks.TaskInputs;
+import org.gradle.api.tasks.TaskState;
+import org.gradle.logging.LoggingManagerInternal;
+import org.gradle.logging.StandardOutputCapture;
+import org.gradle.util.ConfigureUtil;
+import org.gradle.util.DeprecationLogger;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+/**
+ * @author Hans Dockter
+ */
+public abstract class AbstractTask implements TaskInternal, DynamicObjectAware {
+    private static Logger buildLogger = Logging.getLogger(Task.class);
+    private static ThreadLocal<TaskInfo> nextInstance = new ThreadLocal<TaskInfo>();
+    private ProjectInternal project;
+
+    private String name;
+
+    private List<Action<? super Task>> actions = new ArrayList<Action<? super Task>>();
+
+    private String path;
+
+    private boolean enabled = true;
+
+    private DefaultTaskDependency dependencies;
+
+    private DynamicObjectHelper dynamicObjectHelper;
+
+    private String description;
+
+    private String group;
+
+    private AndSpec<Task> onlyIfSpec = new AndSpec<Task>(createNewOnlyIfSpec());
+
+    private final TaskOutputsInternal outputs;
+
+    private final TaskInputs inputs;
+
+    private TaskExecuter executer;
+
+    private final ServiceRegistry services;
+
+    private final TaskStateInternal state;
+
+    private final LoggingManagerInternal loggingManager;
+
+    protected AbstractTask() {
+        this(taskInfo());
+    }
+
+    private static TaskInfo taskInfo() {
+        TaskInfo taskInfo = nextInstance.get();
+        assert taskInfo != null;
+        return taskInfo;
+    }
+
+    private AbstractTask(TaskInfo taskInfo) {
+        this.project = taskInfo.project;
+        this.name = taskInfo.name;
+        assert project != null;
+        assert name != null;
+        path = project.absoluteProjectPath(name);
+        state = new TaskStateInternal(toString());
+        dynamicObjectHelper = new DynamicObjectHelper(this, new DefaultConvention());
+        dependencies = new DefaultTaskDependency(project.getTasks());
+        services = project.getServices().createFor(this);
+        outputs = services.get(TaskOutputsInternal.class);
+        inputs = services.get(TaskInputs.class);
+        executer = services.get(TaskExecuter.class);
+        loggingManager = services.get(LoggingManagerInternal.class);
+    }
+
+    public static <T extends Task> T injectIntoNewInstance(ProjectInternal project, String name, Callable<T> factory) {
+        nextInstance.set(new TaskInfo(project, name));
+        try {
+            try {
+                return factory.call();
+            } catch (RuntimeException e) {
+                throw e;
+            } catch (Exception e) {
+                throw new RuntimeException(e);
+            }
+        } finally {
+            nextInstance.set(null);
+        }
+    }
+
+    public TaskState getState() {
+        return state;
+    }
+
+    public AntBuilder getAnt() {
+        return project.getAnt();
+    }
+
+    public Project getProject() {
+        return project;
+    }
+
+    public void setProject(Project project) {
+        this.project = (ProjectInternal) project;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public List<Action<? super Task>> getActions() {
+        return actions;
+    }
+
+    public void setActions(List<Action<? super Task>> actions) {
+        this.actions = actions;
+    }
+
+    public TaskDependencyInternal getTaskDependencies() {
+        return dependencies;
+    }
+
+    public Set<Object> getDependsOn() {
+        return dependencies.getValues();
+    }
+
+    public void setDependsOn(Iterable<?> dependsOn) {
+        dependencies.setValues(dependsOn);
+    }
+
+    public void onlyIf(Closure onlyIfClosure) {
+        this.onlyIfSpec = this.onlyIfSpec.and(onlyIfClosure);
+    }
+
+    public void onlyIf(Spec<? super Task> onlyIfSpec) {
+        this.onlyIfSpec = this.onlyIfSpec.and(onlyIfSpec);
+    }
+
+    public void setOnlyIf(Spec<? super Task> spec) {
+        onlyIfSpec = createNewOnlyIfSpec().and(spec);
+    }
+
+    public void setOnlyIf(Closure onlyIfClosure) {
+        onlyIfSpec = createNewOnlyIfSpec().and(onlyIfClosure);
+    }
+
+    private AndSpec<Task> createNewOnlyIfSpec() {
+        return new AndSpec<Task>(new Spec<Task>() {
+            public boolean isSatisfiedBy(Task element) {
+                return element == AbstractTask.this && enabled;
+            }
+        });
+    }
+
+    public Spec<? super TaskInternal> getOnlyIf() {
+        return onlyIfSpec;
+    }
+
+    public boolean getDidWork() {
+        return state.getDidWork();
+    }
+
+    public void setDidWork(boolean didWork) {
+        state.setDidWork(didWork);
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public boolean getEnabled() {
+        return enabled;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public Task deleteAllActions() {
+        actions.clear();
+        return this;
+    }
+
+    public void execute() {
+        executer.execute(this, state);
+        state.rethrowFailure();
+    }
+
+    public TaskExecuter getExecuter() {
+        return executer;
+    }
+
+    public void setExecuter(TaskExecuter executer) {
+        this.executer = executer;
+    }
+
+    public Task dependsOn(Object... paths) {
+        dependencies.add(paths);
+        return this;
+    }
+
+    public Task doFirst(Action<? super Task> action) {
+        if (action == null) {
+            throw new InvalidUserDataException("Action must not be null!");
+        }
+        actions.add(0, action);
+        return this;
+    }
+
+    public Task doLast(Action<? super Task> action) {
+        if (action == null) {
+            throw new InvalidUserDataException("Action must not be null!");
+        }
+        actions.add(action);
+        return this;
+    }
+
+    public boolean equals(Object other) {
+        if (other == this) {
+            return true;
+        }
+        if (other == null || other.getClass() != getClass()) {
+            return false;
+        }
+        AbstractTask otherTask = (AbstractTask) other;
+        return getPath().equals(otherTask.getPath());
+    }
+
+    public int hashCode() {
+        return path.hashCode();
+    }
+
+    public int compareTo(Task otherTask) {
+        int depthCompare = project.compareTo(otherTask.getProject());
+        if (depthCompare == 0) {
+            return getPath().compareTo(otherTask.getPath());
+        } else {
+            return depthCompare;
+        }
+    }
+
+    public String toString() {
+        return String.format("task '%s'", path);
+    }
+
+    public Logger getLogger() {
+        return buildLogger;
+    }
+
+    public Task disableStandardOutputCapture() {
+        DeprecationLogger.nagUser("Task.disableStandardOutputCapture()");
+        loggingManager.disableStandardOutputCapture();
+        return this;
+    }
+
+    public Task captureStandardOutput(LogLevel level) {
+        DeprecationLogger.nagUser("Task.captureStandardOutput()", "getLogging().captureStandardOutput()");
+        loggingManager.captureStandardOutput(level);
+        return this;
+    }
+
+    public LoggingManager getLogging() {
+        return loggingManager;
+    }
+
+    public StandardOutputCapture getStandardOutputCapture() {
+        return loggingManager;
+    }
+
+    public Map<String, Object> getAdditionalProperties() {
+        return dynamicObjectHelper.getAdditionalProperties();
+    }
+
+    public DynamicObjectHelper getDynamicObjectHelper() {
+        return dynamicObjectHelper;
+    }
+
+    public Object property(String propertyName) throws MissingPropertyException {
+        return dynamicObjectHelper.getProperty(propertyName);
+    }
+
+    public boolean hasProperty(String propertyName) {
+        return dynamicObjectHelper.hasProperty(propertyName);
+    }
+
+    public void setProperty(String name, Object value) {
+        dynamicObjectHelper.setProperty(name, value);
+    }
+
+    public Convention getConvention() {
+        return dynamicObjectHelper.getConvention();
+    }
+
+    public void setConvention(Convention convention) {
+        dynamicObjectHelper.setConvention(convention);
+    }
+
+    public DynamicObject getAsDynamicObject() {
+        return dynamicObjectHelper;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public String getGroup() {
+        return group;
+    }
+
+    public void setGroup(String group) {
+        this.group = group;
+    }
+
+    public TaskInputs getInputs() {
+        return inputs;
+    }
+
+    public TaskOutputsInternal getOutputs() {
+        return outputs;
+    }
+
+    protected ServiceRegistry getServices() {
+        return services;
+    }
+
+    public boolean dependsOnTaskDidWork() {
+        TaskDependency dependency = getTaskDependencies();
+        for (Task depTask : dependency.getDependencies(this)) {
+            if (depTask.getDidWork()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public Task doFirst(Closure action) {
+        if (action == null) {
+            throw new InvalidUserDataException("Action must not be null!");
+        }
+        doFirst(convertClosureToAction(action));
+        return this;
+    }
+
+    public Task doLast(Closure action) {
+        if (action == null) {
+            throw new InvalidUserDataException("Action must not be null!");
+        }
+        doLast(convertClosureToAction(action));
+        return this;
+    }
+
+    public Task leftShift(Closure action) {
+        return doLast(action);
+    }
+
+    public Task configure(Closure closure) {
+        return ConfigureUtil.configure(closure, this);
+    }
+
+    public File getTemporaryDir() {
+        File dir = getServices().get(TemporaryFileProvider.class).newTemporaryFile(getName());
+        dir.mkdirs();
+        return dir;
+    }
+
+    private Action<Task> convertClosureToAction(Closure actionClosure) {
+        actionClosure.setDelegate(this);
+        actionClosure.setResolveStrategy(Closure.DELEGATE_FIRST);
+        return new ClosureTaskAction(actionClosure);
+    }
+
+    private static class TaskInfo {
+        private final ProjectInternal project;
+        private final String name;
+
+        private TaskInfo(ProjectInternal project, String name) {
+            this.name = name;
+            this.project = project;
+        }
+    }
+
+    private static class ClosureTaskAction implements Action<Task> {
+        private final Closure closure;
+
+        private ClosureTaskAction(Closure closure) {
+            this.closure = closure;
+        }
+
+        public void execute(Task task) {
+            try {
+                if (closure.getMaximumNumberOfParameters() == 0) {
+                    closure.call();
+                } else {
+                    closure.call(task);
+                }
+            } catch (InvokerInvocationException e) {
+                Throwable cause = e.getCause();
+                if (cause instanceof RuntimeException) {
+                    throw (RuntimeException) cause;
+                }
+                throw e;
+            }
+        }
+    }
+
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/AsmBackedClassGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerDelegate.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerDelegate.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerDelegate.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerDelegate.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/BeanDynamicObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/BeanDynamicObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/BeanDynamicObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/BeanDynamicObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/CachingDirectedGraphWalker.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/CachingDirectedGraphWalker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/CachingDirectedGraphWalker.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/CachingDirectedGraphWalker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ChainingTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ChainingTransformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ChainingTransformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ChainingTransformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ClassGenerator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ClassGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ClassGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ClassGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ClassPathProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ClassPathProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ClassPathProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ClassPathProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ClassPathRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ClassPathRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ClassPathRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ClassPathRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/CompositeDynamicObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/CompositeDynamicObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/CompositeDynamicObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/CompositeDynamicObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/Contextual.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/Contextual.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/Contextual.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/Contextual.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ConventionAwareHelper.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ConventionAwareHelper.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ConventionAwareHelper.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ConventionAwareHelper.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ConventionMapping.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ConventionMapping.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ConventionMapping.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ConventionMapping.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ConventionTask.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ConventionTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ConventionTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ConventionTask.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultAutoCreateDomainObjectContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultAutoCreateDomainObjectContainer.java
new file mode 100644
index 0000000..732fb4d
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultAutoCreateDomainObjectContainer.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal;
+
+import groovy.lang.Closure;
+import org.gradle.api.NamedDomainObjectFactory;
+import org.gradle.util.ReflectionUtil;
+
+public class DefaultAutoCreateDomainObjectContainer<T> extends AutoCreateDomainObjectContainer<T> {
+    private final NamedDomainObjectFactory<? extends T> factory;
+
+    public DefaultAutoCreateDomainObjectContainer(Class<T> type, ClassGenerator classGenerator, NamedDomainObjectFactory<? extends T> factory) {
+        super(type, classGenerator);
+        this.factory = factory;
+    }
+
+    public DefaultAutoCreateDomainObjectContainer(Class<T> type, ClassGenerator classGenerator) {
+        this(type, classGenerator, new DefaultConstructorObjectFactory<T>(type));
+    }
+    
+    public DefaultAutoCreateDomainObjectContainer(Class<T> type, ClassGenerator classGenerator, final Closure factoryClosure) {
+        this(type, classGenerator, new ClosureObjectFactory<T>(type, factoryClosure));
+    }
+
+    @Override
+    protected T create(String name) {
+        return factory.create(name);
+    }
+
+    private static class DefaultConstructorObjectFactory<T> implements NamedDomainObjectFactory<T> {
+        private final Class<T> type;
+
+        public DefaultConstructorObjectFactory(Class<T> type) {
+            this.type = type;
+        }
+
+        public T create(String name) {
+            return type.cast(ReflectionUtil.newInstance(type, new Object[]{name}));
+        }
+    }
+
+    private static class ClosureObjectFactory<T> implements NamedDomainObjectFactory<T> {
+        private final Class<T> type;
+        private final Closure factoryClosure;
+
+        public ClosureObjectFactory(Class<T> type, Closure factoryClosure) {
+            this.type = type;
+            this.factoryClosure = factoryClosure;
+        }
+
+        public T create(String name) {
+            return type.cast(factoryClosure.call(name));
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultClassPathProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultClassPathProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultClassPathProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultClassPathProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultClassPathRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultClassPathRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultClassPathRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultClassPathRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultDomainObjectContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultDomainObjectContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultDomainObjectContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultDomainObjectContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DirectedGraph.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DirectedGraph.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DirectedGraph.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DirectedGraph.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DirectedGraphWithEdgeValues.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DirectedGraphWithEdgeValues.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DirectedGraphWithEdgeValues.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DirectedGraphWithEdgeValues.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DomainObjectContext.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DomainObjectContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DomainObjectContext.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DomainObjectContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DynamicObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DynamicObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DynamicObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DynamicObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DynamicObjectAware.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DynamicObjectAware.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DynamicObjectAware.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DynamicObjectAware.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DynamicObjectHelper.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/DynamicObjectHelper.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/DynamicObjectHelper.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/DynamicObjectHelper.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ExceptionAnalyser.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/ExceptionAnalyser.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/ExceptionAnalyser.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/ExceptionAnalyser.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/Factory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/Factory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/Factory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/Factory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GradleDistributionLocator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/GradleDistributionLocator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GradleDistributionLocator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/GradleDistributionLocator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GradleInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/GradleInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GradleInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/GradleInternal.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/GraphAggregator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/GraphAggregator.java
new file mode 100644
index 0000000..68d5c2c
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/GraphAggregator.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal;
+
+import java.util.*;
+
+/**
+ * Groups the nodes of a graph based on their reachability from a set of starting nodes.
+ */
+public class GraphAggregator<N> {
+    private final CachingDirectedGraphWalker<N, N> graphWalker;
+
+    public GraphAggregator(DirectedGraph<N, ?> graph) {
+        graphWalker = new CachingDirectedGraphWalker<N, N>(new ConnectedNodesAsValuesDirectedGraph<N>(graph));
+    }
+
+    public Result<N> group(Collection<? extends N> startNodes, Collection<? extends N> allNodes) {
+        Map<N, Set<N>> reachableByNode = new HashMap<N, Set<N>>();
+        Set<N> topLevelNodes = new LinkedHashSet<N>(allNodes);
+        for (N node : allNodes) {
+            Set<N> reachableNodes = graphWalker.add(node).findValues();
+            reachableByNode.put(node, reachableNodes);
+            topLevelNodes.removeAll(reachableNodes);
+        }
+        topLevelNodes.addAll(startNodes);
+        Map<N, Set<N>> nodes = new HashMap<N, Set<N>>();
+        for (N node : topLevelNodes) {
+            nodes.put(node, calculateReachableNodes(reachableByNode, node, topLevelNodes));
+        }
+        return new Result<N>(nodes, topLevelNodes);
+    }
+
+    private Set<N> calculateReachableNodes(Map<N, Set<N>> nodes, N node, Set<N> topLevelNodes) {
+        Set<N> reachableNodes = nodes.get(node);
+        reachableNodes.add(node);
+        Set<N> reachableStartNodes = new LinkedHashSet<N>(topLevelNodes);
+        reachableStartNodes.retainAll(reachableNodes);
+        reachableStartNodes.remove(node);
+        for (N startNode : reachableStartNodes) {
+            reachableNodes.removeAll(calculateReachableNodes(nodes, startNode, topLevelNodes));
+        }
+        return reachableNodes;
+    }
+
+    public static class Result<N> {
+        private final Map<N, Set<N>> nodes;
+        private final Set<N> topLevelNodes;
+
+        public Result(Map<N, Set<N>> nodes, Set<N> topLevelNodes) {
+            this.nodes = nodes;
+            this.topLevelNodes = topLevelNodes;
+        }
+
+        public Set<N> getNodes(N startNode) {
+            return nodes.get(startNode);
+        }
+
+        public Set<N> getTopLevelNodes() {
+            return topLevelNodes;
+        }
+    }
+
+    private static class ConnectedNodesAsValuesDirectedGraph<N> implements DirectedGraph<N, N> {
+        private final DirectedGraph<N, ?> graph;
+
+        private ConnectedNodesAsValuesDirectedGraph(DirectedGraph<N, ?> graph) {
+            this.graph = graph;
+        }
+
+        public void getNodeValues(N node, Collection<N> values, Collection<N> connectedNodes) {
+            Set<N> edges = new LinkedHashSet<N>();
+            graph.getNodeValues(node, new ArrayList(), edges);
+            values.addAll(edges);
+            connectedNodes.addAll(edges);
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGenerator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/IConventionAware.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/IConventionAware.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/IConventionAware.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/IConventionAware.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/MapBackedDynamicObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/MapBackedDynamicObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/MapBackedDynamicObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/MapBackedDynamicObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/NoConventionMapping.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/NoConventionMapping.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/NoConventionMapping.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/NoConventionMapping.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/NoDynamicObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/NoDynamicObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/NoDynamicObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/NoDynamicObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/SettingsInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/SettingsInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/SettingsInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/SettingsInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/TaskExecutionHistory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/TaskExecutionHistory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/TaskExecutionHistory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/TaskExecutionHistory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/TaskInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/TaskInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/TaskInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/TaskInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/TaskOutputsInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/TaskOutputsInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/TaskOutputsInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/TaskOutputsInternal.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/XmlTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/XmlTransformer.java
new file mode 100644
index 0000000..6e04018
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/XmlTransformer.java
@@ -0,0 +1,274 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal;
+
+import groovy.lang.Closure;
+import groovy.util.IndentPrinter;
+import groovy.util.Node;
+import groovy.util.XmlNodePrinter;
+import groovy.util.XmlParser;
+import org.apache.commons.lang.StringUtils;
+import org.codehaus.groovy.runtime.DefaultGroovyMethods;
+import org.gradle.api.Action;
+import org.gradle.api.Transformer;
+import org.gradle.api.artifacts.maven.XmlProvider;
+import org.gradle.util.TextUtil;
+import org.gradle.util.UncheckedException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+
+public class XmlTransformer implements Transformer<String> {
+    private final List<Action<? super XmlProvider>> actions = new ArrayList<Action<? super XmlProvider>>();
+    private String indentation = "  ";
+
+    public void addAction(Action<? super XmlProvider> provider) {
+        actions.add(provider);
+    }
+
+    public void setIndentation(String indentation) {
+        this.indentation = indentation;
+    }
+
+    public void addAction(Closure closure) {
+        actions.add((Action<XmlProvider>) DefaultGroovyMethods.asType(closure, Action.class));
+    }
+
+    public String transform(String original) {
+        return doTransform(original).toString();
+    }
+
+    public void transform(String original, Writer destination) {
+        doTransform(original).writeTo(destination);
+    }
+
+    public void transform(String original, OutputStream destination) {
+        doTransform(original).writeTo(destination);
+    }
+
+    public void transform(Node original, Writer destination) {
+        doTransform(original).writeTo(destination);
+    }
+
+    public void transform(Node original, OutputStream destination) {
+        doTransform(original).writeTo(destination);
+    }
+
+    private XmlProviderImpl doTransform(String original) {
+        XmlProviderImpl provider = new XmlProviderImpl(original);
+        provider.apply(actions);
+        return provider;
+    }
+
+    private XmlProviderImpl doTransform(Node original) {
+        XmlProviderImpl provider = new XmlProviderImpl(original);
+        provider.apply(actions);
+        return provider;
+    }
+
+    private class XmlProviderImpl implements XmlProvider {
+        private StringBuilder builder;
+        private Node node;
+        private String stringValue;
+        private Element element;
+
+        public XmlProviderImpl(String original) {
+            this.stringValue = original;
+        }
+
+        public XmlProviderImpl(Node original) {
+            this.node = original;
+        }
+
+        public void apply(Iterable<Action<? super XmlProvider>> actions) {
+            for (Action<? super XmlProvider> action : actions) {
+                action.execute(this);
+            }
+        }
+
+        @Override
+        public String toString() {
+            StringWriter writer = new StringWriter();
+            writeTo(writer);
+            return writer.toString();
+        }
+
+        public void writeTo(Writer writer) {
+            doWriteTo(writer, null);
+        }
+
+        public void writeTo(OutputStream stream) {
+            try {
+                Writer writer = new OutputStreamWriter(stream, "UTF-8");
+                doWriteTo(writer, "UTF-8");
+                writer.flush();
+            } catch (IOException e) {
+                throw UncheckedException.asUncheckedException(e);
+            }
+        }
+
+        public StringBuilder asString() {
+            if (builder == null) {
+                builder = new StringBuilder(toString());
+                node = null;
+                element = null;
+            }
+            return builder;
+        }
+
+        public Node asNode() {
+            if (node == null) {
+                try {
+                    node = new XmlParser().parseText(toString());
+                } catch (Exception e) {
+                    throw UncheckedException.asUncheckedException(e);
+                }
+                builder = null;
+                element = null;
+            }
+            return node;
+        }
+
+        public Element asElement() {
+            if (element == null) {
+                Document document;
+                try {
+                    document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(toString())));
+                } catch (Exception e) {
+                    throw UncheckedException.asUncheckedException(e);
+                }
+                element = document.getDocumentElement();
+                builder = null;
+                node = null;
+            }
+            return element;
+        }
+
+        private void doWriteTo(Writer writer, String encoding) {
+            writeXmlDeclaration(writer, encoding);
+
+            try {
+                if (node != null) {
+                    final PrintWriter printWriter = new PrintWriter(writer);
+                    IndentPrinter indentPrinter = new IndentPrinter(printWriter, indentation) {
+                        @Override
+                        public void println() {
+                            printWriter.println();
+                        }
+                    };
+                    XmlNodePrinter nodePrinter = new XmlNodePrinter(indentPrinter);
+                    nodePrinter.setPreserveWhitespace(true);
+                    nodePrinter.print(node);
+                    printWriter.flush();
+                } else if (element != null) {
+                    printNode(element, writer);
+                } else if (builder != null) {
+                    writer.append(TextUtil.toNativeLineSeparators(removeAnyXmlDeclaration(builder)));
+                } else {
+                    writer.append(TextUtil.toNativeLineSeparators(removeAnyXmlDeclaration(stringValue)));
+                }
+            } catch (IOException e) {
+                throw UncheckedException.asUncheckedException(e);
+            }
+        }
+
+        private void printNode(org.w3c.dom.Node node, Writer destination) {
+            removeEmptyTextNodes(node); // empty text nodes hinder subsequent formatting
+            int indentAmount = determineIndentAmount();
+
+            try {
+                TransformerFactory factory = TransformerFactory.newInstance();
+                try {
+                    factory.setAttribute("indent-number", indentAmount);
+                } catch (IllegalArgumentException ignored) {
+                    /* unsupported by this transformer */
+                }
+
+                javax.xml.transform.Transformer transformer = factory.newTransformer();
+                transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+                transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+                try {
+                    // some impls support this but not factory.setAttribute("indent-number")
+                    transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", String.valueOf(indentAmount));
+                } catch (IllegalArgumentException ignored) {
+                    /* unsupported by this transformer */
+                }
+
+                transformer.transform(new DOMSource(node), new StreamResult(destination));
+            } catch (TransformerException e) {
+                throw UncheckedException.asUncheckedException(e);
+            }
+        }
+
+        private int determineIndentAmount() {
+            if (indentation.equals("\t")) { // not supported by javax.xml.transform.Transformer; use two spaces instead
+                return 2;
+            }
+            return indentation.length(); // assume indentation uses spaces
+        }
+
+        private void removeEmptyTextNodes(org.w3c.dom.Node node) {
+            org.w3c.dom.NodeList children = node.getChildNodes();
+
+            for (int i = 0; i < children.getLength(); i++) {
+                org.w3c.dom.Node child = children.item(i);
+                if (child.getNodeType() == org.w3c.dom.Node.TEXT_NODE && child.getNodeValue().trim().length() == 0) {
+                    node.removeChild(child);
+                } else {
+                    removeEmptyTextNodes(child);
+                }
+            }
+        }
+
+        private void writeXmlDeclaration(Writer writer, String encoding) {
+            try {
+                writer.write("<?xml version=\"1.0\"");
+                if (encoding != null) {
+                    writer.write(" encoding=\"");
+                    writer.write(encoding);
+                    writer.write("\"");
+                }
+                writer.write("?>");
+                writer.write(TextUtil.LINE_SEPARATOR);
+            } catch (IOException e) {
+                throw UncheckedException.asUncheckedException(e);
+            }
+        }
+        private boolean hasXmlDeclaration(String xml) {
+            return xml.startsWith("<?xml"); // XML declarations must be located at first position of first line
+        }
+
+        private String removeAnyXmlDeclaration(CharSequence sequence) {
+            String str = sequence.toString();
+            if (hasXmlDeclaration(str)) {
+                str = str.substring(str.indexOf("?>") + 2);
+                str = StringUtils.stripStart(str, null);
+            }
+            return str;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ArtifactContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ArtifactContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ArtifactContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ArtifactContainer.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContext.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContext.java
new file mode 100644
index 0000000..6047752
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContext.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts;
+
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.internal.CachingDirectedGraphWalker;
+import org.gradle.api.internal.DirectedGraph;
+import org.gradle.api.internal.file.UnionFileCollection;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class CachingDependencyResolveContext implements DependencyResolveContext {
+    private final List<Object> queue = new ArrayList<Object>();
+    private final CachingDirectedGraphWalker<Object, FileCollection> walker = new CachingDirectedGraphWalker<Object, FileCollection>(new DependencyGraph());
+    private final boolean transitive;
+
+    public CachingDependencyResolveContext(boolean transitive) {
+        this.transitive = transitive;
+    }
+
+    public boolean isTransitive() {
+        return transitive;
+    }
+
+    public FileCollection resolve() {
+        try {
+            walker.add(queue);
+            return new UnionFileCollection(walker.findValues());
+        } finally {
+            queue.clear();
+        }
+    }
+
+    public void add(Object dependency) {
+        queue.add(dependency);
+    }
+
+    private class DependencyGraph implements DirectedGraph<Object, FileCollection> {
+        public void getNodeValues(Object node, Collection<FileCollection> values, Collection<Object> connectedNodes) {
+            if (node instanceof FileCollection) {
+                FileCollection fileCollection = (FileCollection) node;
+                values.add(fileCollection);
+            } else if (node instanceof DependencyInternal) {
+                DependencyInternal dependencyInternal = (DependencyInternal) node;
+                queue.clear();
+                dependencyInternal.resolve(CachingDependencyResolveContext.this);
+                connectedNodes.addAll(queue);
+                queue.clear();
+            } else {
+                throw new IllegalArgumentException(String.format("Cannot resolve object of unknown type %s.", node.getClass().getSimpleName()));
+            }
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ConfigurationContainerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ConfigurationContainerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ConfigurationContainerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ConfigurationContainerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRule.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRuleContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRuleContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRuleContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultExcludeRuleContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultModule.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultModule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultModule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultModule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyResolveContext.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyResolveContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyResolveContext.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/DependencyResolveContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/IvyService.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/IvyService.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/IvyService.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/IvyService.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstruction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstruction.java
new file mode 100644
index 0000000..fbb5638
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstruction.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts;
+
+/**
+ * @author Hans Dockter
+ */
+public class ProjectDependenciesBuildInstruction {
+    private final boolean rebuild;
+
+    public ProjectDependenciesBuildInstruction(boolean rebuild) {
+        this.rebuild = rebuild;
+    }
+
+    public boolean isRebuild() {
+        return rebuild;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        ProjectDependenciesBuildInstruction that = (ProjectDependenciesBuildInstruction) o;
+
+        return rebuild == that.rebuild;
+    }
+
+    @Override
+    public int hashCode() {
+        return rebuild ? 1 : 0;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifier.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifier.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifier.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifier.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/Configurations.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/Configurations.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/Configurations.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/Configurations.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsProvider.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java
new file mode 100644
index 0000000..78827cc
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java
@@ -0,0 +1,535 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts.configurations;
+
+import groovy.lang.Closure;
+import org.apache.ivy.plugins.resolver.DependencyResolver;
+import org.gradle.api.Action;
+import org.gradle.api.InvalidUserDataException;
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.artifacts.*;
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.internal.DefaultDomainObjectContainer;
+import org.gradle.api.internal.artifacts.DefaultExcludeRule;
+import org.gradle.api.internal.artifacts.IvyService;
+import org.gradle.api.internal.file.AbstractFileCollection;
+import org.gradle.api.internal.tasks.AbstractTaskDependency;
+import org.gradle.api.internal.tasks.TaskDependencyInternal;
+import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.specs.Specs;
+import org.gradle.api.tasks.TaskDependency;
+import org.gradle.util.WrapUtil;
+
+import java.io.File;
+import java.util.*;
+
+import static org.apache.ivy.core.module.descriptor.Configuration.Visibility;
+
+public class DefaultConfiguration extends AbstractFileCollection implements Configuration {
+    private final String path;
+    private final String name;
+
+    private Visibility visibility = Visibility.PUBLIC;
+    private boolean transitive = true;
+    private Set<Configuration> extendsFrom = new LinkedHashSet<Configuration>();
+    private String description;
+    private ConfigurationsProvider configurationsProvider;
+
+    private IvyService ivyService;
+
+    private DefaultDomainObjectContainer<Dependency> dependencies =
+            new DefaultDomainObjectContainer<Dependency>(Dependency.class);
+
+    private Set<PublishArtifact> artifacts = new LinkedHashSet<PublishArtifact>();
+
+    private Set<ExcludeRule> excludeRules = new LinkedHashSet<ExcludeRule>();
+
+    private final ConfigurationTaskDependency taskDependency = new ConfigurationTaskDependency();
+
+    // This lock only protects the following fields
+    private final Object lock = new Object();
+    private State state = State.UNRESOLVED;
+    private ResolvedConfiguration cachedResolvedConfiguration;
+
+    public DefaultConfiguration(String path, String name, ConfigurationsProvider configurationsProvider,
+                                IvyService ivyService) {
+        this.path = path;
+        this.name = name;
+        this.configurationsProvider = configurationsProvider;
+        this.ivyService = ivyService;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public State getState() {
+        synchronized (lock) {
+            return state;
+        }
+    }
+
+    public boolean isVisible() {
+        return visibility == Visibility.PUBLIC;
+    }
+
+    public Configuration setVisible(boolean visible) {
+        throwExceptionIfNotInUnresolvedState();
+        this.visibility = visible ? Visibility.PUBLIC : Visibility.PRIVATE;
+        return this;
+    }
+
+    public Set<Configuration> getExtendsFrom() {
+        return Collections.unmodifiableSet(extendsFrom);
+    }
+
+    public Configuration setExtendsFrom(Set<Configuration> extendsFrom) {
+        throwExceptionIfNotInUnresolvedState();
+        this.extendsFrom = new HashSet<Configuration>();
+        for (Configuration configuration : extendsFrom) {
+            extendsFrom(configuration);
+        }
+        return this;
+    }
+
+    public Configuration extendsFrom(Configuration... extendsFrom) {
+        throwExceptionIfNotInUnresolvedState();
+        for (Configuration configuration : extendsFrom) {
+            if (configuration.getHierarchy().contains(this)) {
+                throw new InvalidUserDataException(String.format(
+                        "Cyclic extendsFrom from %s and %s is not allowed. See existing hierarchy: %s", this,
+                        configuration, configuration.getHierarchy()));
+            }
+            this.extendsFrom.add(configuration);
+        }
+        return this;
+    }
+
+    public boolean isTransitive() {
+        return transitive;
+    }
+
+    public Configuration setTransitive(boolean transitive) {
+        throwExceptionIfNotInUnresolvedState();
+        this.transitive = transitive;
+        return this;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public Configuration setDescription(String description) {
+        throwExceptionIfNotInUnresolvedState();
+        this.description = description;
+        return this;
+    }
+
+    public Set<Configuration> getHierarchy() {
+        Set<Configuration> result = WrapUtil.<Configuration>toLinkedSet(this);
+        collectSuperConfigs(this, result);
+        return result;
+    }
+
+    private void collectSuperConfigs(Configuration configuration, Set<Configuration> result) {
+        for (Configuration superConfig : configuration.getExtendsFrom()) {
+            if (result.contains(superConfig)) {
+                result.remove(superConfig);
+            }
+            result.add(superConfig);
+            collectSuperConfigs(superConfig, result);
+        }
+    }
+
+    public Set<Configuration> getAll() {
+        return configurationsProvider.getAll();
+    }
+
+    public Set<File> resolve() {
+        return getFiles();
+    }
+
+    public Set<File> getFiles() {
+        return fileCollection(Specs.SATISFIES_ALL).getFiles();
+    }
+
+    public Set<File> files(Dependency... dependencies) {
+        return fileCollection(dependencies).getFiles();
+    }
+
+    public Set<File> files(Closure dependencySpecClosure) {
+        return fileCollection(dependencySpecClosure).getFiles();
+    }
+
+    public Set<File> files(Spec<Dependency> dependencySpec) {
+        return fileCollection(dependencySpec).getFiles();
+    }
+
+    public FileCollection fileCollection(Spec<Dependency> dependencySpec) {
+        return new ConfigurationFileCollection(dependencySpec);
+    }
+
+    public FileCollection fileCollection(Closure dependencySpecClosure) {
+        return new ConfigurationFileCollection(dependencySpecClosure);
+    }
+
+    public FileCollection fileCollection(Dependency... dependencies) {
+        return new ConfigurationFileCollection(WrapUtil.toLinkedSet(dependencies));
+    }
+
+    public ResolvedConfiguration getResolvedConfiguration() {
+        synchronized (lock) {
+            if (state == State.UNRESOLVED) {
+                cachedResolvedConfiguration = ivyService.resolve(this);
+                if (cachedResolvedConfiguration.hasError()) {
+                    state = State.RESOLVED_WITH_FAILURES;
+                } else {
+                    state = State.RESOLVED;
+                }
+            }
+            return cachedResolvedConfiguration;
+        }
+    }
+
+    public void publish(List<DependencyResolver> publishResolvers, File descriptorDestination) {
+        ivyService.publish(getHierarchy(), descriptorDestination, publishResolvers);
+    }
+
+    public TaskDependency getBuildDependencies() {
+        return taskDependency;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public TaskDependency getTaskDependencyFromProjectDependency(final boolean useDependedOn, final String taskName) {
+        return new AbstractTaskDependency() {
+            public void resolve(TaskDependencyResolveContext context) {
+                if (useDependedOn) {
+                    addTaskDependenciesFromProjectsIDependOn(taskName, context);
+                } else {
+                    Project thisProject = context.getTask().getProject();
+                    addTaskDependenciesFromProjectsDependingOnMe(thisProject, taskName, context);
+                }
+            }
+
+            private void addTaskDependenciesFromProjectsIDependOn(final String taskName,
+                                                                  final TaskDependencyResolveContext context) {
+                Set<ProjectDependency> projectDependencies = getAllDependencies(ProjectDependency.class);
+                for (ProjectDependency projectDependency : projectDependencies) {
+                    Task nextTask = projectDependency.getDependencyProject().getTasks().findByName(taskName);
+                    if (nextTask != null) {
+                        context.add(nextTask);
+                    }
+                }
+            }
+
+            private void addTaskDependenciesFromProjectsDependingOnMe(final Project thisProject, final String taskName,
+                                                                      final TaskDependencyResolveContext context) {
+                Set<Task> tasksWithName = thisProject.getRootProject().getTasksByName(taskName, true);
+                for (Task nextTask : tasksWithName) {
+                    Configuration configuration = nextTask.getProject().getConfigurations().findByName(getName());
+                    if (configuration != null && doesConfigurationDependOnProject(configuration, thisProject)) {
+                        context.add(nextTask);
+                    }
+                }
+            }
+        };
+    }
+
+    private static boolean doesConfigurationDependOnProject(Configuration configuration, Project project) {
+        Set<ProjectDependency> projectDependencies = configuration.getAllDependencies(ProjectDependency.class);
+        for (ProjectDependency projectDependency : projectDependencies) {
+            if (projectDependency.getDependencyProject().equals(project)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public TaskDependency getBuildArtifacts() {
+        return getAllArtifactFiles().getBuildDependencies();
+    }
+
+    public Set<Dependency> getDependencies() {
+        return dependencies.getAll();
+    }
+
+    public Set<Dependency> getAllDependencies() {
+        return Configurations.getDependencies(getHierarchy(), Specs.<Dependency>satisfyAll());
+    }
+
+    public <T extends Dependency> Set<T> getDependencies(Class<T> type) {
+        return filter(type, getDependencies());
+    }
+
+    private <T extends Dependency> Set<T> filter(Class<T> type, Set<Dependency> dependencySet) {
+        Set<T> matches = new LinkedHashSet<T>();
+        for (Dependency dependency : dependencySet) {
+            if (type.isInstance(dependency)) {
+                matches.add(type.cast(dependency));
+            }
+        }
+        return matches;
+    }
+
+    public <T extends Dependency> Set<T> getAllDependencies(Class<T> type) {
+        return filter(type, getAllDependencies());
+    }
+
+    public void addDependency(Dependency dependency) {
+        throwExceptionIfNotInUnresolvedState();
+        dependencies.addObject(dependency);
+    }
+
+    public Configuration addArtifact(PublishArtifact artifact) {
+        throwExceptionIfNotInUnresolvedState();
+        artifacts.add(artifact);
+        return this;
+    }
+
+    public Configuration removeArtifact(PublishArtifact artifact) {
+        throwExceptionIfNotInUnresolvedState();
+        artifacts.remove(artifact);
+        return this;
+    }
+
+    public Set<PublishArtifact> getArtifacts() {
+        return Collections.unmodifiableSet(artifacts);
+    }
+
+    public Set<PublishArtifact> getAllArtifacts() {
+        return Configurations.getArtifacts(this.getHierarchy(), Specs.SATISFIES_ALL);
+    }
+
+    public FileCollection getAllArtifactFiles() {
+        return new ArtifactsFileCollection();
+    }
+
+    public Set<ExcludeRule> getExcludeRules() {
+        return Collections.unmodifiableSet(excludeRules);
+    }
+
+    public void setExcludeRules(Set<ExcludeRule> excludeRules) {
+        throwExceptionIfNotInUnresolvedState();
+        this.excludeRules = excludeRules;
+    }
+
+    public DefaultConfiguration exclude(Map<String, String> excludeRuleArgs) {
+        throwExceptionIfNotInUnresolvedState();
+        excludeRules.add(new DefaultExcludeRule(excludeRuleArgs));
+        return this;
+    }
+
+    public String getUploadTaskName() {
+        return Configurations.uploadTaskName(getName());
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        DefaultConfiguration that = (DefaultConfiguration) o;
+        return path.equals(that.path);
+    }
+
+    @Override
+    public int hashCode() {
+        return path.hashCode();
+    }
+
+    public String getDisplayName() {
+        return String.format("configuration '%s'", path);
+    }
+
+    public Configuration getConfiguration(Dependency dependency) {
+        for (Configuration configuration : getHierarchy()) {
+            if (configuration.getDependencies().contains(dependency)) {
+                return configuration;
+            }
+        }
+        return null;
+    }
+
+    public Configuration copy() {
+        return createCopy(getDependencies());
+    }
+
+    public Configuration copyRecursive() {
+        return createCopy(getAllDependencies());
+    }
+
+    public Configuration copy(Spec<Dependency> dependencySpec) {
+        return createCopy(Specs.filterIterable(getDependencies(), dependencySpec));
+    }
+
+    public Configuration copyRecursive(Spec<Dependency> dependencySpec) {
+        return createCopy(Specs.filterIterable(getAllDependencies(), dependencySpec));
+    }
+
+    private DefaultConfiguration createCopy(Set<Dependency> dependencies) {
+        DetachedConfigurationsProvider configurationsProvider = new DetachedConfigurationsProvider();
+        DefaultConfiguration copiedConfiguration = new DefaultConfiguration(path + "Copy", name + "Copy",
+                configurationsProvider, ivyService);
+        configurationsProvider.setTheOnlyConfiguration(copiedConfiguration);
+        // state, cachedResolvedConfiguration, and extendsFrom intentionally not copied - must re-resolve copy
+        // copying extendsFrom could mess up dependencies when copy was re-resolved
+
+        copiedConfiguration.visibility = visibility;
+        copiedConfiguration.transitive = transitive;
+        copiedConfiguration.description = description;
+
+        for (PublishArtifact artifact : getAllArtifacts()) {
+            copiedConfiguration.addArtifact(artifact);
+        }
+
+        // todo An ExcludeRule is a value object but we don't enforce immutability for DefaultExcludeRule as strong as we
+        // should (we expose the Map). We should provide a better API for ExcludeRule (I don't want to use unmodifiable Map).
+        // As soon as DefaultExcludeRule is truly immutable, we don't need to create a new instance of DefaultExcludeRule. 
+        for (ExcludeRule excludeRule : getExcludeRules()) {
+            copiedConfiguration.excludeRules.add(new DefaultExcludeRule(excludeRule.getExcludeArgs()));
+        }
+
+        for (Dependency dependency : dependencies) {
+            copiedConfiguration.addDependency(dependency.copy());
+        }
+        return copiedConfiguration;
+    }
+
+    public Configuration copy(Closure dependencySpec) {
+        return copy(Specs.<Dependency>convertClosureToSpec(dependencySpec));
+    }
+
+    public Configuration copyRecursive(Closure dependencySpec) {
+        return copyRecursive(Specs.<Dependency>convertClosureToSpec(dependencySpec));
+    }
+
+    private void throwExceptionIfNotInUnresolvedState() {
+        if (getState() != State.UNRESOLVED) {
+            throw new InvalidUserDataException("You can't change a configuration which is not in unresolved state!");
+        }
+    }
+
+    class ArtifactsFileCollection extends AbstractFileCollection {
+        private final TaskDependencyInternal taskDependency = new AbstractTaskDependency() {
+            public void resolve(TaskDependencyResolveContext context) {
+                for (Configuration configuration : getExtendsFrom()) {
+                    context.add(configuration.getBuildArtifacts());
+                }
+                for (PublishArtifact publishArtifact : getArtifacts()) {
+                    context.add(publishArtifact);
+                }
+            }
+        };
+
+        public String getDisplayName() {
+            return String.format("%s artifacts", DefaultConfiguration.this);
+        }
+
+        @Override
+        public TaskDependency getBuildDependencies() {
+            return taskDependency;
+        }
+
+        public Set<File> getFiles() {
+            Set<File> files = new LinkedHashSet<File>();
+            for (PublishArtifact artifact : getAllArtifacts()) {
+                files.add(artifact.getFile());
+            }
+            return files;
+        }
+    }
+
+    class ConfigurationFileCollection extends AbstractFileCollection {
+        private Spec<Dependency> dependencySpec;
+
+        private ConfigurationFileCollection(Spec<Dependency> dependencySpec) {
+            this.dependencySpec = dependencySpec;
+        }
+
+        public ConfigurationFileCollection(Closure dependencySpecClosure) {
+            this.dependencySpec = Specs.convertClosureToSpec(dependencySpecClosure);
+        }
+
+        public ConfigurationFileCollection(final Set<Dependency> dependencies) {
+            this.dependencySpec = new Spec<Dependency>() {
+                public boolean isSatisfiedBy(Dependency element) {
+                    return dependencies.contains(element);
+                }
+            };
+        }
+
+        public Spec<Dependency> getDependencySpec() {
+            return dependencySpec;
+        }
+
+        public String getDisplayName() {
+            return String.format("%s dependencies", DefaultConfiguration.this);
+        }
+
+        public Set<File> getFiles() {
+            synchronized (lock) {
+                ResolvedConfiguration resolvedConfiguration = getResolvedConfiguration();
+                if (getState() == State.RESOLVED_WITH_FAILURES) {
+                    resolvedConfiguration.rethrowFailure();
+                }
+                return resolvedConfiguration.getFiles(dependencySpec);
+            }
+        }
+    }
+
+    public Action<? super Dependency> whenDependencyAdded(Action<? super Dependency> action) {
+        return dependencies.whenObjectAdded(action);
+    }
+
+    public void whenDependencyAdded(Closure closure) {
+        dependencies.whenObjectAdded(closure);
+    }
+
+    public void allDependencies(Action<? super Dependency> action) {
+        dependencies.all(action);
+    }
+
+    public void allDependencies(Closure action) {
+        dependencies.all(action);
+    }
+
+    private class ConfigurationTaskDependency extends AbstractTaskDependency {
+        @Override
+        public String toString() {
+            return String.format("build dependencies %s", DefaultConfiguration.this);
+        }
+
+        public void resolve(TaskDependencyResolveContext context) {
+            for (Configuration configuration : getExtendsFrom()) {
+                context.add(configuration);
+            }
+            for (SelfResolvingDependency dependency : DefaultConfiguration.this.getDependencies(
+                    SelfResolvingDependency.class)) {
+                context.add(dependency);
+            }
+        }
+    }
+}
+
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DependencyMetaDataProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DependencyMetaDataProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DependencyMetaDataProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DependencyMetaDataProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DetachedConfigurationsProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DetachedConfigurationsProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DetachedConfigurationsProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DetachedConfigurationsProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ResolverProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ResolverProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ResolverProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/ResolverProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractExternalDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractExternalDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractExternalDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractExternalDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModule.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependency.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java
new file mode 100644
index 0000000..4da0820
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts.dependencies;
+
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.artifacts.ProjectDependency;
+import org.gradle.api.internal.artifacts.CachingDependencyResolveContext;
+import org.gradle.api.internal.artifacts.DependencyResolveContext;
+import org.gradle.api.internal.tasks.AbstractTaskDependency;
+import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
+import org.gradle.api.tasks.TaskDependency;
+
+import java.io.File;
+import java.util.Set;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultProjectDependency extends AbstractModuleDependency implements ProjectDependency {
+    private Project dependencyProject;
+    private final ProjectDependenciesBuildInstruction instruction;
+    private final TaskDependencyImpl taskDependency = new TaskDependencyImpl();
+
+    public DefaultProjectDependency(Project dependencyProject, ProjectDependenciesBuildInstruction instruction) {
+        this(dependencyProject, null, instruction);
+    }
+
+    public DefaultProjectDependency(Project dependencyProject, String configuration,
+                                    ProjectDependenciesBuildInstruction instruction) {
+        super(configuration);
+        this.dependencyProject = dependencyProject;
+        this.instruction = instruction;
+    }
+
+    public Project getDependencyProject() {
+        return dependencyProject;
+    }
+
+    public String getGroup() {
+        return dependencyProject.getGroup().toString();
+    }
+
+    public String getName() {
+        return dependencyProject.getName();
+    }
+
+    public String getVersion() {
+        return dependencyProject.getVersion().toString();
+    }
+
+    public Configuration getProjectConfiguration() {
+        return dependencyProject.getConfigurations().getByName(getConfiguration());
+    }
+
+    public ProjectDependency copy() {
+        DefaultProjectDependency copiedProjectDependency = new DefaultProjectDependency(dependencyProject,
+                getConfiguration(), instruction);
+        copyTo(copiedProjectDependency);
+        return copiedProjectDependency;
+    }
+
+    public Set<File> resolve() {
+        return resolve(true);
+    }
+
+    public Set<File> resolve(boolean transitive) {
+        CachingDependencyResolveContext context = new CachingDependencyResolveContext(transitive);
+        context.add(this);
+        return context.resolve().getFiles();
+    }
+
+    @Override
+    public void resolve(DependencyResolveContext context) {
+        boolean transitive = isTransitive() && context.isTransitive();
+        for (Dependency dependency : getProjectConfiguration().getAllDependencies()) {
+            if (!(dependency instanceof ProjectDependency)) {
+                context.add(dependency);
+            } else if (transitive) {
+                context.add(dependency);
+            }
+            // else project dep and non-transitive, so skip
+        }
+    }
+
+    public TaskDependency getBuildDependencies() {
+        return taskDependency;
+    }
+
+    public boolean contentEquals(Dependency dependency) {
+        if (this == dependency) {
+            return true;
+        }
+        if (dependency == null || getClass() != dependency.getClass()) {
+            return false;
+        }
+
+        ProjectDependency that = (ProjectDependency) dependency;
+        if (!isCommonContentEquals(that)) {
+            return false;
+        }
+
+        return dependencyProject.equals(that.getDependencyProject());
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        DefaultProjectDependency that = (DefaultProjectDependency) o;
+        if (!this.getDependencyProject().equals(that.getDependencyProject())) {
+            return false;
+        }
+        if (!this.getConfiguration().equals(that.getConfiguration())) {
+            return false;
+        }
+        if (!this.instruction.equals(that.instruction)) {
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        return getDependencyProject().hashCode() ^ getConfiguration().hashCode() ^ instruction.hashCode();
+    }
+
+    @Override
+    public String toString() {
+        return "DefaultProjectDependency{" + "dependencyProject='" + dependencyProject + '\'' + ", configuration='"
+                + getConfiguration() + '\'' + '}';
+    }
+
+    private class TaskDependencyImpl extends AbstractTaskDependency {
+        public void resolve(TaskDependencyResolveContext context) {
+            if (!instruction.isRebuild()) {
+                return;
+            }
+            Configuration configuration = getProjectConfiguration();
+            context.add(configuration);
+            context.add(configuration.getBuildArtifacts());
+        }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/AbstractScriptTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/AbstractScriptTransformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/AbstractScriptTransformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/AbstractScriptTransformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptClasspathScriptTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptClasspathScriptTransformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptClasspathScriptTransformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptClasspathScriptTransformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptTransformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptTransformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/BuildScriptTransformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/ClasspathScriptTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/ClasspathScriptTransformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/ClasspathScriptTransformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/ClasspathScriptTransformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandler.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandler.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandler.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandler.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/FixMainScriptTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/FixMainScriptTransformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/FixMainScriptTransformer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/FixMainScriptTransformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/PublishArtifactFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/PublishArtifactFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/PublishArtifactFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/PublishArtifactFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/SharedConventionRepositoryHandlerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/SharedConventionRepositoryHandlerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/SharedConventionRepositoryHandlerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/SharedConventionRepositoryHandlerFactory.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/TaskDefinitionScriptTransformer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/TaskDefinitionScriptTransformer.java
new file mode 100644
index 0000000..8276ca1
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/TaskDefinitionScriptTransformer.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts.dsl;
+
+import org.codehaus.groovy.ast.CodeVisitorSupport;
+import org.codehaus.groovy.ast.DynamicVariable;
+import org.codehaus.groovy.ast.expr.*;
+import org.codehaus.groovy.control.CompilationFailedException;
+import org.codehaus.groovy.control.Phases;
+import org.codehaus.groovy.control.SourceUnit;
+
+import java.util.Collections;
+import java.util.List;
+
+public class TaskDefinitionScriptTransformer extends AbstractScriptTransformer {
+    protected int getPhase() {
+        return Phases.CANONICALIZATION;
+    }
+
+    public String getId() {
+        return "tasks";
+    }
+
+    public void call(SourceUnit source) throws CompilationFailedException {
+        visitScriptCode(source, new TaskDefinitionTransformer());
+    }
+
+    private class TaskDefinitionTransformer extends CodeVisitorSupport {
+        @Override
+        public void visitMethodCallExpression(MethodCallExpression call) {
+            doVisitMethodCallExpression(call);
+            super.visitMethodCallExpression(call);
+        }
+
+        private void doVisitMethodCallExpression(MethodCallExpression call) {
+            if (!isInstanceMethod(call, "task")) {
+                return;
+            }
+
+            ArgumentListExpression args = (ArgumentListExpression) call.getArguments();
+            if (args.getExpressions().size() == 0 || args.getExpressions().size() > 3) {
+                return;
+            }
+
+            // Matches: task <arg>{1, 3}
+
+            if (args.getExpressions().size() > 1) {
+                if (args.getExpression(0) instanceof MapExpression && args.getExpression(1) instanceof VariableExpression) {
+                    // Matches: task <name-value-pairs>, <identifier>, <arg>?
+                    // Map to: task(<name-value-pairs>, '<identifier>', <arg>?)
+                    transformVariableExpression(call, 1);
+                } else if (args.getExpression(0) instanceof VariableExpression) {
+                    // Matches: task <identifier>, <arg>?
+                    transformVariableExpression(call, 0);
+                }
+                return;
+            }
+
+            // Matches: task <arg> or task(<arg>)
+
+            Expression arg = args.getExpression(0);
+            if (arg instanceof VariableExpression) {
+                // Matches: task <identifier> or task(<identifier>)
+                transformVariableExpression(call, 0);
+            } else if (arg instanceof BinaryExpression) {
+                // Matches: task <expression> <operator> <expression>
+                transformBinaryExpression(call, (BinaryExpression) arg);
+            } else if (arg instanceof MethodCallExpression) {
+                // Matches: task <method-call>
+                maybeTransformNestedMethodCall((MethodCallExpression) arg, call);
+            }
+        }
+
+        private void transformVariableExpression(MethodCallExpression call, int index) {
+            ArgumentListExpression args = (ArgumentListExpression) call.getArguments();
+            VariableExpression arg = (VariableExpression) args.getExpression(index);
+            if (!isDynamicVar(arg)) {
+                return;
+            }
+
+            // Matches: task args?, <identifier>, args? or task(args?, <identifier>, args?)
+            // Map to: task(args?, '<identifier>', args?)
+            String taskName = arg.getText();
+            call.setMethod(new ConstantExpression("task"));
+            args.getExpressions().set(index, new ConstantExpression(taskName));
+        }
+
+        private void transformBinaryExpression(MethodCallExpression call, BinaryExpression expression) {
+
+            // Matches: task <expression> <operator> <expression>
+
+            if (expression.getLeftExpression() instanceof VariableExpression || expression.getLeftExpression() instanceof GStringExpression || expression
+                    .getLeftExpression() instanceof ConstantExpression) {
+                // Matches: task <identifier> <operator> <expression> | task <string> <operator> <expression>
+                // Map to: passThrough(task('<identifier>') <operator> <expression>) | passThrough(task(<string>) <operator> <expression>)
+                call.setMethod(new ConstantExpression("passThrough"));
+                Expression argument;
+                if (expression.getLeftExpression() instanceof VariableExpression) {
+                    argument = new ConstantExpression(expression.getLeftExpression().getText());
+                } else {
+                    argument = expression.getLeftExpression();
+                }
+                expression.setLeftExpression(new MethodCallExpression(call.getObjectExpression(), "task", argument));
+            } else if (expression.getLeftExpression() instanceof MethodCallExpression) {
+                // Matches: task <method-call> <operator> <expression>
+                MethodCallExpression transformedCall = new MethodCallExpression(call.getObjectExpression(), "task", new ArgumentListExpression());
+                boolean transformed = maybeTransformNestedMethodCall((MethodCallExpression) expression.getLeftExpression(), transformedCall);
+                if (transformed) {
+                    // Matches: task <identifier> <arg-list> <operator> <expression>
+                    // Map to: passThrough(task('<identifier>', <arg-list>) <operator> <expression>)
+                    call.setMethod(new ConstantExpression("passThrough"));
+                    expression.setLeftExpression(transformedCall);
+                }
+            }
+        }
+
+        private boolean maybeTransformNestedMethodCall(MethodCallExpression nestedMethod, MethodCallExpression target) {
+            if (!(isTaskIdentifier(nestedMethod.getMethod()) && targetIsThis(nestedMethod))) {
+                return false;
+            }
+
+            // Matches: task <identifier> <arg-list> | task <string> <arg-list>
+            // Map to: task("<identifier>", <arg-list>) | task(<string>, <arg-list>)
+
+            Expression taskName = nestedMethod.getMethod();
+            Expression mapArg = null;
+            List<Expression> extraArgs = Collections.emptyList();
+
+            if (nestedMethod.getArguments() instanceof TupleExpression) {
+                TupleExpression nestedArgs = (TupleExpression) nestedMethod.getArguments();
+                if (nestedArgs.getExpressions().size() == 2 && nestedArgs.getExpression(0) instanceof MapExpression && nestedArgs.getExpression(1) instanceof ClosureExpression) {
+                    // Matches: task <identifier>(<options-map>) <closure>
+                    mapArg = nestedArgs.getExpression(0);
+                    extraArgs = nestedArgs.getExpressions().subList(1, nestedArgs.getExpressions().size());
+                } else if (nestedArgs.getExpressions().size() == 1 && nestedArgs.getExpression(0) instanceof ClosureExpression) {
+                    // Matches: task <identifier> <closure>
+                    extraArgs = nestedArgs.getExpressions();
+                } else if (nestedArgs.getExpressions().size() == 1 && nestedArgs.getExpression(0) instanceof NamedArgumentListExpression) {
+                    // Matches: task <identifier>(<options-map>)
+                    mapArg = nestedArgs.getExpression(0);
+                } else if (nestedArgs.getExpressions().size() != 0) {
+                    return false;
+                }
+            }
+
+            target.setMethod(new ConstantExpression("task"));
+            ArgumentListExpression args = (ArgumentListExpression) target.getArguments();
+            args.getExpressions().clear();
+            if (mapArg != null) {
+                args.addExpression(mapArg);
+            }
+            args.addExpression(taskName);
+            for (Expression extraArg : extraArgs) {
+                args.addExpression(extraArg);
+            }
+            return true;
+        }
+
+        private boolean isInstanceMethod(MethodCallExpression call, String name) {
+            boolean isTaskMethod = isMethodOnThis(call, name);
+            if (!isTaskMethod) {
+                return false;
+            }
+
+            return call.getArguments() instanceof ArgumentListExpression;
+        }
+
+        private boolean isTaskIdentifier(Expression expression) {
+            return expression instanceof ConstantExpression || expression instanceof GStringExpression;
+        }
+
+        private boolean isDynamicVar(Expression expression) {
+            if (!(expression instanceof VariableExpression)) {
+                return false;
+            }
+            VariableExpression variableExpression = (VariableExpression) expression;
+            return variableExpression.getAccessedVariable() instanceof DynamicVariable;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactory.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactory.java
new file mode 100644
index 0000000..838be15
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactory.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts.dsl.dependencies;
+
+import groovy.lang.Closure;
+import org.gradle.api.GradleException;
+import org.gradle.api.IllegalDependencyNotation;
+import org.gradle.api.InvalidUserDataException;
+import org.gradle.api.artifacts.ClientModule;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.ProjectDependency;
+
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultDependencyFactory implements DependencyFactory {
+    private Set<IDependencyImplementationFactory> dependencyFactories;
+    private IDependencyImplementationFactory clientModuleFactory;
+    private ProjectDependencyFactory projectDependencyFactory;
+
+    public DefaultDependencyFactory(Set<IDependencyImplementationFactory> dependencyFactories,
+                                    IDependencyImplementationFactory clientModuleFactory,
+                                    ProjectDependencyFactory projectDependencyFactory) {
+        this.dependencyFactories = dependencyFactories;
+        this.clientModuleFactory = clientModuleFactory;
+        this.projectDependencyFactory = projectDependencyFactory;
+    }
+
+    public Dependency createDependency(Object dependencyNotation) {
+        if (dependencyNotation instanceof Dependency) {
+            return (Dependency) dependencyNotation;
+        }
+        
+        Dependency dependency = null;
+        for (IDependencyImplementationFactory factory : dependencyFactories) {
+            try {
+                dependency = factory.createDependency(Dependency.class, dependencyNotation);
+                break;
+            } catch (IllegalDependencyNotation e) {
+                // ignore
+            } catch (Exception e) {
+                throw new GradleException(String.format("Could not create a dependency using notation: %s", dependencyNotation), e);
+            }
+        }
+
+        if (dependency == null) {
+            throw new InvalidUserDataException(String.format("The dependency notation: %s is invalid.",
+                    dependencyNotation));
+        }
+        return dependency;
+    }
+
+    public ClientModule createModule(Object dependencyNotation, Closure configureClosure) {
+        ClientModule clientModule = clientModuleFactory.createDependency(ClientModule.class, dependencyNotation);
+        ModuleFactoryDelegate moduleFactoryDelegate = new ModuleFactoryDelegate(clientModule, this);
+        moduleFactoryDelegate.prepareDelegation(configureClosure);
+        if (configureClosure != null) {
+            configureClosure.call();
+        }
+        return clientModule;
+    }
+
+    public ProjectDependency createProjectDependencyFromMap(ProjectFinder projectFinder, Map<? extends String, ? extends Object> map) {
+        return projectDependencyFactory.createProjectDependencyFromMap(projectFinder, map);
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandler.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandler.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandler.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandler.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DependencyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DependencyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DependencyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/IDependencyImplementationFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/IDependencyImplementationFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/IDependencyImplementationFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/IDependencyImplementationFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/MapModuleNotationParser.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/MapModuleNotationParser.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/MapModuleNotationParser.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/MapModuleNotationParser.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDescriptorDelegate.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDescriptorDelegate.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDescriptorDelegate.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDescriptorDelegate.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryHelper.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryHelper.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryHelper.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryHelper.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ParsedModuleStringNotation.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ParsedModuleStringNotation.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ParsedModuleStringNotation.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ParsedModuleStringNotation.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectDependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectDependencyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectDependencyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectDependencyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectFinder.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectFinder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectFinder.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ProjectFinder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyConversionResult.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyConversionResult.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyConversionResult.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyConversionResult.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyReportConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyReportConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyReportConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyReportConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyService.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyService.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyService.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyService.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyService.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyService.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyService.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyService.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyConversionResult.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyConversionResult.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyConversionResult.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyConversionResult.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyPublisher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyPublisher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyPublisher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyPublisher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyDependencyResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyLoggingAdaper.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyLoggingAdaper.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyLoggingAdaper.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyLoggingAdaper.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyReportConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyReportConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyReportConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyReportConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtil.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/PublishOptionsFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/PublishOptionsFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/PublishOptionsFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/PublishOptionsFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ResolverFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ResolverFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ResolverFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ResolverFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SettingsConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SettingsConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SettingsConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SettingsConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyService.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyService.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyService.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyService.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SnapshotVersionMatcher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SnapshotVersionMatcher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SnapshotVersionMatcher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/SnapshotVersionMatcher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/AbstractModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/AbstractModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/AbstractModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/AbstractModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsExtraAttributesStrategy.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsExtraAttributesStrategy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsExtraAttributesStrategy.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsExtraAttributesStrategy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsToModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsToModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsToModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ArtifactsToModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ConfigurationsToModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ConfigurationsToModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ConfigurationsToModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ConfigurationsToModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ExcludeRuleConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ExcludeRuleConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ExcludeRuleConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ExcludeRuleConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ModuleDescriptorFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ModuleDescriptorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ModuleDescriptorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ModuleDescriptorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModule.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependenciesToModuleDescriptorConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependenciesToModuleDescriptorConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependenciesToModuleDescriptorConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependenciesToModuleDescriptorConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegate.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegate.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegate.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegate.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ModuleDescriptorFactoryForClientModule.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ModuleDescriptorFactoryForClientModule.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ModuleDescriptorFactoryForClientModule.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ModuleDescriptorFactoryForClientModule.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorStrategy.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorStrategy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorStrategy.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorStrategy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultArtifactPomFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultArtifactPomFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultArtifactPomFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultArtifactPomFactory.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPom.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPom.java
new file mode 100644
index 0000000..bf22068
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPom.java
@@ -0,0 +1,251 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.publish.maven;
+
+import groovy.lang.Closure;
+import org.apache.commons.io.IOUtils;
+import org.apache.maven.model.Dependency;
+import org.apache.maven.model.Model;
+import org.apache.maven.project.MavenProject;
+import org.codehaus.groovy.runtime.InvokerHelper;
+import org.gradle.api.Action;
+import org.gradle.api.UncheckedIOException;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer;
+import org.gradle.api.artifacts.maven.MavenPom;
+import org.gradle.api.artifacts.maven.XmlProvider;
+import org.gradle.api.internal.XmlTransformer;
+import org.gradle.api.internal.artifacts.publish.maven.dependencies.PomDependenciesConverter;
+import org.gradle.api.internal.artifacts.publish.maven.pombuilder.CustomModelBuilder;
+import org.gradle.api.internal.file.FileResolver;
+import org.gradle.listener.ActionBroadcast;
+
+import java.io.*;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultMavenPom implements MavenPom {
+    private PomDependenciesConverter pomDependenciesConverter;
+    private FileResolver fileResolver;
+    private MavenProject mavenProject = new MavenProject();
+    private Conf2ScopeMappingContainer scopeMappings;
+    private ActionBroadcast<MavenPom> whenConfiguredActions = new ActionBroadcast<MavenPom>();
+    private XmlTransformer withXmlActions = new XmlTransformer();
+    private ConfigurationContainer configurations;
+
+    public DefaultMavenPom(ConfigurationContainer configurationContainer, Conf2ScopeMappingContainer scopeMappings, PomDependenciesConverter pomDependenciesConverter,
+                           FileResolver fileResolver) {
+        this.configurations = configurationContainer;
+        this.scopeMappings = scopeMappings;
+        this.pomDependenciesConverter = pomDependenciesConverter;
+        this.fileResolver = fileResolver;
+        mavenProject.setModelVersion("4.0.0");
+    }
+
+    public Conf2ScopeMappingContainer getScopeMappings() {
+        return scopeMappings;
+    }
+
+    public ConfigurationContainer getConfigurations() {
+        return configurations;
+    }
+
+    public DefaultMavenPom setConfigurations(ConfigurationContainer configurations) {
+        this.configurations = configurations;
+        return this;
+    }
+    
+    public DefaultMavenPom setGroupId(String groupId) {
+        getModel().setGroupId(groupId);
+        return this;
+    }
+
+    public String getGroupId() {
+        return getModel().getGroupId();
+    }
+
+    public DefaultMavenPom setArtifactId(String artifactId) {
+        getModel().setArtifactId(artifactId);
+        return this;
+    }
+
+    public String getArtifactId() {
+        return getModel().getArtifactId();
+    }
+
+    public DefaultMavenPom setDependencies(List<Dependency> dependencies) {
+        getModel().setDependencies(dependencies);
+        return this;
+    }
+
+    public List<Dependency> getDependencies() {
+        return getModel().getDependencies();
+    }
+
+    public DefaultMavenPom setName(String name) {
+        getModel().setName(name);
+        return this;
+    }
+
+    public String getName() {
+        return getModel().getName();
+    }
+
+    public DefaultMavenPom setVersion(String version) {
+        getModel().setVersion(version);
+        return this;
+    }
+
+    public String getVersion() {
+        return getModel().getVersion();
+    }
+
+    public String getPackaging() {
+        return getModel().getPackaging();
+    }
+
+    public DefaultMavenPom setPackaging(String packaging) {
+        getModel().setPackaging(packaging);
+        return this;
+    }
+
+    public DefaultMavenPom project(Closure cl) {
+        CustomModelBuilder pomBuilder = new CustomModelBuilder(getModel());
+        InvokerHelper.invokeMethod(pomBuilder, "project", cl);
+        return this;
+    }
+
+    public Model getModel() {
+        return mavenProject.getModel();
+    }
+
+    public DefaultMavenPom setModel(Model model) {
+        this.mavenProject = new MavenProject(model);
+        return this;
+    }
+
+    public MavenProject getMavenProject() {
+        return mavenProject;
+    }
+
+    public DefaultMavenPom setMavenProject(MavenProject mavenProject) {
+        this.mavenProject = mavenProject;
+        return this;
+    }
+
+    public List<Dependency> getGeneratedDependencies() {
+        if (configurations == null) {
+            return Collections.emptyList();
+        }
+        return pomDependenciesConverter.convert(getScopeMappings(), configurations.getAll());
+    }
+
+    public DefaultMavenPom getEffectivePom() {
+        DefaultMavenPom effectivePom = new DefaultMavenPom(null, this.scopeMappings, pomDependenciesConverter, fileResolver);
+        try {
+            effectivePom.setMavenProject((MavenProject) mavenProject.clone());
+        } catch (CloneNotSupportedException e) {
+            throw new RuntimeException(e);
+        }
+        effectivePom.getDependencies().addAll(getGeneratedDependencies());
+        effectivePom.withXmlActions = withXmlActions;
+        whenConfiguredActions.execute(effectivePom);
+        return effectivePom;
+    }
+
+    public PomDependenciesConverter getPomDependenciesConverter() {
+        return pomDependenciesConverter;
+    }
+
+    public FileResolver getFileResolver() {
+        return fileResolver;
+    }
+
+    public DefaultMavenPom setFileResolver(FileResolver fileResolver) {
+        this.fileResolver = fileResolver;
+        return this;
+    }
+
+    public DefaultMavenPom writeTo(final Writer pomWriter) {
+        getEffectivePom().writeNonEffectivePom(pomWriter);
+        return this;
+    }
+
+    public DefaultMavenPom writeTo(Object path) {
+        OutputStream stream = null;
+
+        try {
+            File file = fileResolver.resolve(path);
+            if (file.getParentFile() != null) {
+                file.getParentFile().mkdirs();
+            }
+            stream = new FileOutputStream(file);
+            getEffectivePom().writeNonEffectivePom(stream);
+            return this;
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        } finally {
+            IOUtils.closeQuietly(stream);
+        }
+    }
+
+    private void writeNonEffectivePom(final Writer pomWriter) {
+        try {
+            final StringWriter stringWriter = new StringWriter();
+            mavenProject.writeModel(stringWriter);
+            withXmlActions.transform(stringWriter.toString(), pomWriter);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        } finally {
+            IOUtils.closeQuietly(pomWriter);
+        }
+    }
+
+    private void writeNonEffectivePom(OutputStream stream) {
+        try {
+            final StringWriter stringWriter = new StringWriter();
+            mavenProject.writeModel(stringWriter);
+            withXmlActions.transform(stringWriter.toString(), stream);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        } finally {
+            IOUtils.closeQuietly(stream);
+        }
+    }
+
+    public DefaultMavenPom whenConfigured(final Closure closure) {
+        whenConfiguredActions.add(closure);
+        return this;
+    }
+
+    public DefaultMavenPom whenConfigured(final Action<MavenPom> action) {
+        whenConfiguredActions.add(action);
+        return this;
+    }
+
+    public DefaultMavenPom withXml(final Closure closure) {
+        withXmlActions.addAction(closure);
+        return this;
+    }
+
+    public DefaultMavenPom withXml(final Action<XmlProvider> action) {
+        withXmlActions.addAction(action);
+        return this;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/MavenPomMetaInfoProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/MavenPomMetaInfoProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/MavenPomMetaInfoProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/MavenPomMetaInfoProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/ExcludeRuleConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/ExcludeRuleConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/ExcludeRuleConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/ExcludeRuleConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesWriter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesWriter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesWriter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/PomDependenciesWriter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPom.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPom.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPom.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPom.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ArtifactPomFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstaller.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstaller.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstaller.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstaller.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ClassifierArtifact.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ClassifierArtifact.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ClassifierArtifact.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/ClassifierArtifact.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomDeployTask.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomDeployTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomDeployTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomDeployTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallDeployTaskSupport.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallDeployTaskSupport.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallDeployTaskSupport.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallDeployTaskSupport.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallTask.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/CustomInstallTask.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPom.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPom.java
new file mode 100644
index 0000000..53d06ad
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPom.java
@@ -0,0 +1,212 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.publish.maven.deploy;
+
+import com.google.common.collect.Sets;
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.maven.project.MavenProject;
+import org.gradle.api.InvalidUserDataException;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.PublishArtifact;
+import org.gradle.api.artifacts.maven.MavenPom;
+import org.gradle.api.internal.artifacts.publish.AbstractPublishArtifact;
+
+import java.io.File;
+import java.util.*;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultArtifactPom implements ArtifactPom {
+    private static final Set<String> PACKAGING_TYPES = Sets.newHashSet("war", "jar", "ear");
+    private final MavenPom pom;
+    private final Map<ArtifactKey, PublishArtifact> artifacts = new HashMap<ArtifactKey, PublishArtifact>();
+
+    private PublishArtifact artifact;
+
+    private final Set<PublishArtifact> classifiers = new HashSet<PublishArtifact>();
+
+    public DefaultArtifactPom(MavenPom pom) {
+        this.pom = pom;
+    }
+
+    public MavenPom getPom() {
+        return pom;
+    }
+
+    public PublishArtifact getArtifact() {
+        return artifact;
+    }
+
+    public Set<PublishArtifact> getAttachedArtifacts() {
+        return Collections.unmodifiableSet(classifiers);
+    }
+
+    public PublishArtifact writePom(final File pomFile) {
+        getPom().writeTo(pomFile);
+        return new PomArtifact(pomFile);
+    }
+
+    public void addArtifact(Artifact artifact, File src) {
+        throwExceptionIfArtifactOrSrcIsNull(artifact, src);
+        PublishArtifact publishArtifact = new MavenArtifact(artifact, src);
+        ArtifactKey artifactKey = new ArtifactKey(publishArtifact);
+        if (this.artifacts.containsKey(artifactKey)) {
+            throw new InvalidUserDataException(String.format("A POM cannot have multiple artifacts with the same type and classifier. Already have %s, trying to add %s.", this.artifacts.get(
+                    artifactKey), publishArtifact));
+        }
+
+        if (publishArtifact.getClassifier() != null) {
+            addArtifact(publishArtifact);
+            assignArtifactValuesToPom(artifact, pom, false);
+            return;
+        }
+
+        if (this.artifact != null) {
+            // Choose the 'main' artifact based on its type.
+            if (!PACKAGING_TYPES.contains(artifact.getType())) {
+                addArtifact(publishArtifact);
+                return;
+            }
+            if (PACKAGING_TYPES.contains(this.artifact.getType())) {
+                throw new InvalidUserDataException("A POM can not have multiple main artifacts. " + "Already have " + this.artifact + ", trying to add " + publishArtifact);
+            }
+            addArtifact(this.artifact);
+        }
+
+        this.artifact = publishArtifact;
+        this.artifacts.put(artifactKey, publishArtifact);
+        assignArtifactValuesToPom(artifact, pom, true);
+    }
+
+    private void addArtifact(PublishArtifact artifact) {
+        classifiers.add(artifact);
+        artifacts.put(new ArtifactKey(artifact), artifact);
+    }
+
+    private String getClassifier(Artifact artifact) {
+        return artifact.getExtraAttribute(Dependency.CLASSIFIER);
+    }
+
+    private void assignArtifactValuesToPom(Artifact artifact, MavenPom pom, boolean setType) {
+        if (pom.getGroupId().equals(MavenProject.EMPTY_PROJECT_GROUP_ID)) {
+            pom.setGroupId(artifact.getModuleRevisionId().getOrganisation());
+        }
+        if (pom.getArtifactId().equals(MavenProject.EMPTY_PROJECT_ARTIFACT_ID)) {
+            pom.setArtifactId(artifact.getName());
+        }
+        if (pom.getVersion().equals(MavenProject.EMPTY_PROJECT_VERSION)) {
+            pom.setVersion(artifact.getModuleRevisionId().getRevision());
+        }
+        if (setType) {
+            pom.setPackaging(artifact.getType());
+        }
+    }
+
+    private void throwExceptionIfArtifactOrSrcIsNull(Artifact artifact, File src) {
+        if (artifact == null) {
+            throw new InvalidUserDataException("Artifact must not be null.");
+        }
+        if (src == null) {
+            throw new InvalidUserDataException("Src file must not be null.");
+        }
+    }
+
+    private static class ArtifactKey {
+        private final String type;
+        private final String classifier;
+
+        private ArtifactKey(PublishArtifact artifact) {
+            this.type = artifact.getType();
+            this.classifier = artifact.getClassifier();
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            ArtifactKey other = (ArtifactKey) o;
+            return ObjectUtils.equals(type, other.type) && ObjectUtils.equals(classifier, other.classifier);
+        }
+
+        @Override
+        public int hashCode() {
+            return ObjectUtils.hashCode(type) ^ ObjectUtils.hashCode(classifier);
+        }
+    }
+
+    private abstract class AbstractMavenArtifact extends AbstractPublishArtifact {
+        private final File file;
+
+        protected AbstractMavenArtifact(File file) {
+            this.file = file;
+        }
+
+        public File getFile() {
+            return file;
+        }
+
+        public String getName() {
+            return pom.getArtifactId();
+        }
+
+        public Date getDate() {
+            return null;
+        }
+    }
+
+    private class MavenArtifact extends AbstractMavenArtifact {
+        private final Artifact artifact;
+
+        private MavenArtifact(Artifact artifact, File file) {
+            super(file);
+            this.artifact = artifact;
+        }
+
+        public String getClassifier() {
+            return DefaultArtifactPom.this.getClassifier(artifact);
+        }
+
+        public String getExtension() {
+            return artifact.getExt();
+        }
+
+        public String getType() {
+            return artifact.getType();
+        }
+    }
+
+    private class PomArtifact extends AbstractMavenArtifact {
+        public PomArtifact(File pomFile) {
+            super(pomFile);
+        }
+
+        public String getExtension() {
+            return "pom";
+        }
+
+        public String getType() {
+            return "pom";
+        }
+
+        public String getClassifier() {
+            return null;
+        }
+
+        public Date getDate() {
+            return null;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultDeployTaskFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultDeployTaskFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultDeployTaskFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultDeployTaskFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultInstallTaskFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultInstallTaskFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultInstallTaskFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultInstallTaskFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultMavenDeployment.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultMavenDeployment.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultMavenDeployment.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultMavenDeployment.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/LoggingHelper.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/LoggingHelper.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/LoggingHelper.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/LoggingHelper.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/PomFilter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/PomFilter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/PomFilter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/PomFilter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployer.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployer.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployer.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployer.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryBuilder.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/RepositoryFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/CustomModelBuilder.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/CustomModelBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/CustomModelBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/CustomModelBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/ModelFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/ModelFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/ModelFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/ModelFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/PlexusLoggerAdapter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/PlexusLoggerAdapter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/PlexusLoggerAdapter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/pombuilder/PlexusLoggerAdapter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/DefaultInternalRepository.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/DefaultInternalRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/DefaultInternalRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/DefaultInternalRepository.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/InternalRepository.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/InternalRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/InternalRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/InternalRepository.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/WebdavRepository.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/WebdavRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/WebdavRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/artifacts/repositories/WebdavRepository.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/CachingHasher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/CachingHasher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/CachingHasher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/CachingHasher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultHasher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultHasher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultHasher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultHasher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepository.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepository.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/FileCollectionSnapshot.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/FileCollectionSnapshot.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/FileCollectionSnapshot.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/FileCollectionSnapshot.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/FileSnapshotter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/FileSnapshotter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/FileSnapshotter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/FileSnapshotter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/Hasher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/Hasher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/Hasher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/Hasher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/MapMergeChangeListener.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/MapMergeChangeListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/MapMergeChangeListener.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/MapMergeChangeListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/OutputFilesSnapshotter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/OutputFilesSnapshotter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/OutputFilesSnapshotter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/OutputFilesSnapshotter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepository.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepository.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactState.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactState.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactState.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactState.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactStateRepository.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactStateRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactStateRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/changedetection/TaskArtifactStateRepository.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileCollection.java
new file mode 100644
index 0000000..f3f6ab6
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileCollection.java
@@ -0,0 +1,225 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file;
+
+import groovy.lang.Closure;
+import org.apache.commons.lang.StringUtils;
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.file.FileTree;
+import org.gradle.api.internal.tasks.DefaultTaskDependency;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.specs.Specs;
+import org.gradle.api.tasks.StopExecutionException;
+import org.gradle.api.tasks.TaskDependency;
+import org.gradle.util.GUtil;
+
+import java.io.File;
+import java.util.*;
+
+public abstract class AbstractFileCollection implements FileCollection {
+    /**
+     * Returns the display name of this file collection. Used in log and error messages.
+     *
+     * @return the display name
+     */
+    public abstract String getDisplayName();
+
+    @Override
+    public String toString() {
+        return getDisplayName();
+    }
+
+    public File getSingleFile() throws IllegalStateException {
+        Collection<File> files = getFiles();
+        if (files.isEmpty()) {
+            throw new IllegalStateException(String.format("Expected %s to contain exactly one file, however, it contains no files.", getDisplayName()));
+        }
+        if (files.size() != 1) {
+            throw new IllegalStateException(String.format("Expected %s to contain exactly one file, however, it contains %d files.", getDisplayName(), files.size()));
+        }
+        return files.iterator().next();
+    }
+
+    public Iterator<File> iterator() {
+        return getFiles().iterator();
+    }
+
+    public String getAsPath() {
+        return GUtil.join(getFiles(), File.pathSeparator);
+    }
+
+    public boolean contains(File file) {
+        return getFiles().contains(file);
+    }
+
+    public FileCollection plus(FileCollection collection) {
+        return new UnionFileCollection(this, collection);
+    }
+
+    public FileCollection minus(final FileCollection collection) {
+        return new AbstractFileCollection() {
+            @Override
+            public String getDisplayName() {
+                return AbstractFileCollection.this.getDisplayName();
+            }
+
+            @Override
+            public TaskDependency getBuildDependencies() {
+                return AbstractFileCollection.this.getBuildDependencies();
+            }
+
+            public Set<File> getFiles() {
+                Set<File> files = new LinkedHashSet<File>(AbstractFileCollection.this.getFiles());
+                files.removeAll(collection.getFiles());
+                return files;
+            }
+        };
+    }
+
+    public FileCollection add(FileCollection collection) throws UnsupportedOperationException {
+        throw new UnsupportedOperationException(String.format("%s does not allow modification.", getCapDisplayName()));
+    }
+
+    public void addToAntBuilder(Object builder, String nodeName, AntType type) {
+        if (type == AntType.ResourceCollection) {
+            addAsResourceCollection(builder, nodeName);
+        } else if (type == AntType.FileSet) {
+            addAsFileSet(builder, nodeName);
+        } else {
+            addAsMatchingTask(builder, nodeName);
+        }
+    }
+
+    protected void addAsMatchingTask(Object builder, String nodeName) {
+        new AntFileCollectionMatchingTaskBuilder(getAsFileTrees()).addToAntBuilder(builder, nodeName);
+    }
+
+    protected void addAsFileSet(Object builder, String nodeName) {
+        for (DefaultConfigurableFileTree fileTree : getAsFileTrees()) {
+            fileTree.addToAntBuilder(builder, nodeName, AntType.FileSet);
+        }
+    }
+
+    protected void addAsResourceCollection(Object builder, String nodeName) {
+        new AntFileCollectionBuilder(this).addToAntBuilder(builder, nodeName);
+    }
+
+    /**
+     * Returns this collection as a set of {@link DefaultConfigurableFileTree} instances.
+     */
+    protected Collection<DefaultConfigurableFileTree> getAsFileTrees() {
+        List<DefaultConfigurableFileTree> fileTrees = new ArrayList<DefaultConfigurableFileTree>();
+        for (File file : getFiles()) {
+            if (file.isFile()) {
+                DefaultConfigurableFileTree fileTree = new DefaultConfigurableFileTree(file.getParentFile(), null, null);
+                fileTree.include(new String[]{file.getName()});
+                fileTrees.add(fileTree);
+            }
+        }
+        return fileTrees;
+    }
+
+    public Object addToAntBuilder(Object node, String childNodeName) {
+        addToAntBuilder(node, childNodeName, AntType.ResourceCollection);
+        return this;
+    }
+
+    public boolean isEmpty() {
+        return getFiles().isEmpty();
+    }
+
+    public FileCollection stopExecutionIfEmpty() {
+        if (isEmpty()) {
+            throw new StopExecutionException(String.format("%s does not contain any files.", getCapDisplayName()));
+        }
+        return this;
+    }
+
+    public Object asType(Class<?> type) throws UnsupportedOperationException {
+        if (type.isAssignableFrom(Set.class)) {
+            return getFiles();
+        }
+        if (type.isAssignableFrom(List.class)) {
+            return new ArrayList<File>(getFiles());
+        }
+        if (type.isAssignableFrom(File[].class)) {
+            Set<File> files = getFiles();
+            return files.toArray(new File[files.size()]);
+        }
+        if (type.isAssignableFrom(File.class)) {
+            return getSingleFile();
+        }
+        if (type.isAssignableFrom(FileCollection.class)) {
+            return this;
+        }
+        if (type.isAssignableFrom(FileTree.class)) {
+            return getAsFileTree();
+        }
+        throw new UnsupportedOperationException(String.format("Cannot convert %s to type %s, as this type is not supported.", getDisplayName(), type.getSimpleName()));
+    }
+
+    public TaskDependency getBuildDependencies() {
+        return new DefaultTaskDependency();
+    }
+
+    public FileTree getAsFileTree() {
+        return new CompositeFileTree() {
+            @Override
+            public TaskDependency getBuildDependencies() {
+                return AbstractFileCollection.this.getBuildDependencies();
+            }
+
+            @Override
+            protected void addSourceCollections(Collection<FileCollection> sources) {
+                TaskDependency taskDependency = AbstractFileCollection.this.getBuildDependencies();
+                for (File file : AbstractFileCollection.this.getFiles()) {
+                    sources.add(new SingletonFileTree(file, taskDependency));
+                }
+            }
+
+            @Override
+            public String getDisplayName() {
+                return AbstractFileCollection.this.getDisplayName();
+            }
+        };
+    }
+
+    public FileCollection filter(Closure filterClosure) {
+        return filter(Specs.convertClosureToSpec(filterClosure));
+    }
+
+    public FileCollection filter(final Spec<? super File> filterSpec) {
+        return new AbstractFileCollection() {
+            @Override
+            public String getDisplayName() {
+                return AbstractFileCollection.this.getDisplayName();
+            }
+
+            @Override
+            public TaskDependency getBuildDependencies() {
+                return AbstractFileCollection.this.getBuildDependencies();
+            }
+
+            public Set<File> getFiles() {
+                return Specs.filterIterable(AbstractFileCollection.this, filterSpec);
+            }
+        };
+    }
+
+    protected String getCapDisplayName() {
+        return StringUtils.capitalize(getDisplayName());
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTreeElement.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTreeElement.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTreeElement.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/AbstractFileTreeElement.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionBuilder.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionBuilder.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionBuilder.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionBuilder.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionMatchingTaskBuilder.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionMatchingTaskBuilder.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionMatchingTaskBuilder.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/AntFileCollectionMatchingTaskBuilder.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AntFileTreeBuilder.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/AntFileTreeBuilder.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AntFileTreeBuilder.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/AntFileTreeBuilder.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/BaseDirConverter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/BaseDirConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/BaseDirConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/BaseDirConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/CompositeFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/CompositeFileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/CompositeFileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/CompositeFileCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/CompositeFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/CompositeFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/CompositeFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/CompositeFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultConfigurableFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultConfigurableFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultConfigurableFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultConfigurableFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultDirectoryWalker.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultDirectoryWalker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultDirectoryWalker.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultDirectoryWalker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultFileOperations.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultFileOperations.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultFileOperations.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultFileOperations.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultFileTreeElement.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultFileTreeElement.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultFileTreeElement.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultFileTreeElement.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySet.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySet.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySet.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySet.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DirectoryWalker.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/DirectoryWalker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/DirectoryWalker.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/DirectoryWalker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileOperations.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileOperations.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileOperations.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileOperations.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileSetHelper.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileSetHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileSetHelper.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileSetHelper.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileSource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/FileSource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/FileSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/IdentityFileResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/IdentityFileResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/IdentityFileResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/IdentityFileResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/MapFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/MapFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/MapFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/MapFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/PathResolvingFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/PathResolvingFileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/PathResolvingFileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/PathResolvingFileCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/RelativePathSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/RelativePathSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/RelativePathSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/RelativePathSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SimpleFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/SimpleFileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SimpleFileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/SimpleFileCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SingletonFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/SingletonFileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SingletonFileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/SingletonFileCollection.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/file/SingletonFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/SingletonFileTree.java
new file mode 100644
index 0000000..c286ef2
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/SingletonFileTree.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file;
+
+import org.gradle.api.file.*;
+import org.gradle.api.tasks.TaskDependency;
+
+import java.io.File;
+import java.util.Collection;
+
+class SingletonFileTree extends CompositeFileTree {
+    private final File file;
+    private final TaskDependency builtBy;
+
+    public SingletonFileTree(File file, TaskDependency builtBy) {
+        this.file = file;
+        this.builtBy = builtBy;
+    }
+
+    @Override
+    public String getDisplayName() {
+        return String.format("file '%s'", file);
+    }
+
+    @Override
+    public TaskDependency getBuildDependencies() {
+        return builtBy;
+    }
+
+    protected void addSourceCollections(Collection<FileCollection> sources) {
+        if (file.isDirectory()) {
+            sources.add(new DefaultConfigurableFileTree(file, null, null));
+        } else if (file.isFile()) {
+            sources.add(new FileFileTree());
+        }
+    }
+
+    private class FileVisitDetailsImpl extends DefaultFileTreeElement implements FileVisitDetails {
+        private FileVisitDetailsImpl() {
+            super(file, new RelativePath(true, file.getName()));
+        }
+
+        public void stopVisiting() {
+        }
+    }
+
+    private class FileFileTree extends AbstractFileTree {
+        public String getDisplayName() {
+            return SingletonFileTree.this.getDisplayName();
+        }
+
+        public FileTree visit(FileVisitor visitor) {
+            visitor.visitFile(new FileVisitDetailsImpl());
+            return this;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/TemporaryFileProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/TemporaryFileProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/TemporaryFileProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/TemporaryFileProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/UnionFileCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/UnionFileCollection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/UnionFileCollection.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/UnionFileCollection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/UnionFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/UnionFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/UnionFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/UnionFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/ant/AntFileResource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/ant/AntFileResource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/ant/AntFileResource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/ant/AntFileResource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/ant/BaseDirSelector.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/ant/BaseDirSelector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/ant/BaseDirSelector.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/ant/BaseDirSelector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopyAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopyAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopyAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopyAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/TarFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/TarFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/TarFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/TarFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/ZipFileTree.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/ZipFileTree.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/archive/ZipFileTree.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/archive/ZipFileTree.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/ArchiveCopyAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/ArchiveCopyAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/ArchiveCopyAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/ArchiveCopyAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopyAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopyAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopyAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopyAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopyActionImpl.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopyActionImpl.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopyActionImpl.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopyActionImpl.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecImpl.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecImpl.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecImpl.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecImpl.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecSource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecSource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/CopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/DelegatingCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/DelegatingCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/DelegatingCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/DelegatingCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/DeleteActionImpl.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/DeleteActionImpl.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/DeleteActionImpl.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/DeleteActionImpl.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/EmptyCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/EmptyCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/EmptyCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/EmptyCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyActionImpl.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyActionImpl.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyActionImpl.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopyActionImpl.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FilterChain.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FilterChain.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/FilterChain.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/FilterChain.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/LineFilter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/LineFilter.java
new file mode 100644
index 0000000..7766e84
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/LineFilter.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file.copy;
+
+import groovy.lang.Closure;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+
+public class LineFilter extends Reader {
+    private final Closure closure;
+    private String transformedLine;
+    private int transformedIndex;
+    private final BufferedReader bufferedIn;
+    private final String lineTerminator;
+    private final Reader in;
+
+    /**
+     * Creates a new filtered reader.
+     *
+     * @param closure a Closure to filter each line
+     * @throws NullPointerException if <code>in</code> is <code>null</code>
+     */
+    public LineFilter(Reader in, Closure closure) {
+        this.in = in;
+        this.bufferedIn = new BufferedReader(in);
+        this.closure = closure;
+        lineTerminator = System.getProperty("line.separator");
+    }
+
+    private String getTransformedLine() throws IOException {
+        StringBuilder line = new StringBuilder();
+        boolean eol = false;
+        int ch;
+        while (!eol && (ch = bufferedIn.read()) >= 0) {
+            if (ch == '\n') {
+                eol = true;
+            } else if (ch == '\r') {
+                eol = true;
+                bufferedIn.mark(1);
+                if (bufferedIn.read() != '\n') {
+                    bufferedIn.reset();
+                }
+            } else {
+                line.append((char) ch);
+            }
+        }
+        if (line.length() == 0 && !eol) {
+            return null;
+        }
+
+        StringBuilder result = new StringBuilder();
+        result.append(closure.call(line.toString()).toString());
+        if (eol) {
+            result.append(lineTerminator);
+        }
+        return result.toString();
+    }
+
+    private void ensureData() throws IOException {
+        if (transformedLine == null || transformedIndex >= transformedLine.length()) {
+            transformedLine = getTransformedLine();
+            transformedIndex = 0;
+        }
+    }
+
+    @Override
+    public int read() throws IOException {
+        ensureData();
+        if (transformedLine == null) {
+            return -1;
+        }
+        return transformedLine.charAt(transformedIndex++);
+    }
+
+    @Override
+    public int read(char[] cbuf, int off, int len) throws IOException {
+        for (int i = 0; i < len; i++) {
+            final int c = read();
+            if (c == -1) {
+                if (i == 0) {
+                    return -1;
+                } else {
+                    return i;
+                }
+            }
+            cbuf[off + i] = (char) c;
+        }
+        return len;
+    }
+
+    public void close() throws IOException {
+        in.close();
+    }
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitor.java
new file mode 100644
index 0000000..97ded0f
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitor.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file.copy;
+
+import groovy.lang.Closure;
+import org.gradle.api.Action;
+import org.gradle.api.file.*;
+import org.gradle.api.internal.file.AbstractFileTreeElement;
+
+import java.io.*;
+import java.util.Map;
+
+public class MappingCopySpecVisitor extends DelegatingCopySpecVisitor {
+    private ReadableCopySpec spec;
+
+    public MappingCopySpecVisitor(CopySpecVisitor visitor) {
+        super(visitor);
+    }
+
+    public void visitSpec(ReadableCopySpec spec) {
+        this.spec = spec;
+        getVisitor().visitSpec(spec);
+    }
+
+    public void visitDir(FileVisitDetails dirDetails) {
+        getVisitor().visitDir(new FileVisitDetailsImpl(dirDetails, spec));
+    }
+
+    public void visitFile(final FileVisitDetails fileDetails) {
+        FileVisitDetailsImpl details = new FileVisitDetailsImpl(fileDetails, spec);
+        for (Action<? super FileCopyDetails> action : spec.getAllCopyActions()) {
+            action.execute(details);
+            if (details.excluded) {
+                return;
+            }
+        }
+        getVisitor().visitFile(details);
+    }
+
+    private static class FileVisitDetailsImpl extends AbstractFileTreeElement implements FileVisitDetails, FileCopyDetails {
+        private final FileVisitDetails fileDetails;
+        private final ReadableCopySpec spec;
+        private final FilterChain filterChain = new FilterChain();
+        private RelativePath relativePath;
+        private boolean excluded;
+
+        public FileVisitDetailsImpl(FileVisitDetails fileDetails, ReadableCopySpec spec) {
+            this.fileDetails = fileDetails;
+            this.spec = spec;
+        }
+
+        public String getDisplayName() {
+            return fileDetails.toString();
+        }
+
+        public void stopVisiting() {
+            fileDetails.stopVisiting();
+        }
+
+        public File getFile() {
+            if (filterChain.hasFilters()) {
+                throw new UnsupportedOperationException();
+            } else {
+                return fileDetails.getFile();
+            }
+        }
+
+        public boolean isDirectory() {
+            return fileDetails.isDirectory();
+        }
+
+        public long getLastModified() {
+            return fileDetails.getLastModified();
+        }
+
+        public long getSize() {
+            if (filterChain.hasFilters()) {
+                ByteCountingOutputStream outputStream = new ByteCountingOutputStream();
+                copyTo(outputStream);
+                return outputStream.size;
+            } else {
+                return fileDetails.getSize();
+            }
+        }
+
+        public InputStream open() {
+            if (filterChain.hasFilters()) {
+                return filterChain.transform(fileDetails.open());
+            } else {
+                return fileDetails.open();
+            }
+        }
+
+        public void copyTo(OutputStream outstr) {
+            if (filterChain.hasFilters()) {
+                super.copyTo(outstr);
+            } else {
+                fileDetails.copyTo(outstr);
+            }
+        }
+
+        public boolean copyTo(File target) {
+            if (filterChain.hasFilters()) {
+                return super.copyTo(target);
+            } else {
+                return fileDetails.copyTo(target);
+            }
+        }
+
+        public RelativePath getRelativePath() {
+            if (relativePath == null) {
+                RelativePath path = fileDetails.getRelativePath();
+                relativePath = spec.getDestPath().append(path.isFile(), path.getSegments());
+            }
+            return relativePath;
+        }
+
+        public void setRelativePath(RelativePath path) {
+            this.relativePath = path;
+        }
+
+        public void setName(String name) {
+            relativePath = getRelativePath().replaceLastName(name);
+        }
+
+        public void setPath(String path) {
+            relativePath = RelativePath.parse(getRelativePath().isFile(), path);
+        }
+
+        public void exclude() {
+            excluded = true;
+        }
+
+        public ContentFilterable filter(Closure closure) {
+            filterChain.add(closure);
+            return this;
+        }
+
+        public ContentFilterable filter(Map<String, ?> properties, Class<? extends FilterReader> filterType) {
+            filterChain.add(filterType, properties);
+            return this;
+        }
+
+        public ContentFilterable filter(Class<? extends FilterReader> filterType) {
+            filterChain.add(filterType);
+            return this;
+        }
+
+        public ContentFilterable expand(Map<String, ?> properties) {
+            filterChain.expand(properties);
+            return this;
+        }
+    }
+
+    private static class ByteCountingOutputStream extends OutputStream {
+        long size;
+
+        @Override
+        public void write(int b) throws IOException {
+            size++;
+        }
+
+        @Override
+        public void write(byte[] b) throws IOException {
+            size += b.length;
+        }
+
+        @Override
+        public void write(byte[] b, int off, int len) throws IOException {
+            size += len;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/ReadableCopySpec.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/ReadableCopySpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/ReadableCopySpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/ReadableCopySpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/RegExpNameMapper.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/RegExpNameMapper.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/RegExpNameMapper.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/RegExpNameMapper.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/RenamingCopyAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/RenamingCopyAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/RenamingCopyAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/RenamingCopyAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitor.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitor.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcher.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/GreedyPatternStep.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/GreedyPatternStep.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/GreedyPatternStep.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/GreedyPatternStep.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcher.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcher.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcher.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactory.java
new file mode 100644
index 0000000..9a8670f
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactory.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file.pattern;
+
+import org.gradle.api.file.RelativePath;
+import org.gradle.api.specs.Spec;
+
+/**
+ * @author Steve Appling
+ */
+public class PatternMatcherFactory {
+    public static Spec<RelativePath> getPatternMatcher(boolean partialMatchDirs, boolean caseSensitive, String pattern) {
+        // trailing / or \ assumes **
+        if (pattern.endsWith("/") || pattern.endsWith("\\")) {
+            pattern = pattern + "**";
+        }
+
+        if (pattern.length() == 0) {
+            return new DefaultPatternMatcher(partialMatchDirs, true);
+        } else {
+            String[] parts = pattern.split("\\\\|/");
+            if (parts.length == 2) {
+                if ("**".equals(parts[0])) {
+                    if ("**".equals(parts[1])) {
+                        // don't need second **
+                        return new DefaultPatternMatcher(partialMatchDirs, caseSensitive, "**");
+                    } else {
+                        // common name only case
+                        return new NameOnlyPatternMatcher(partialMatchDirs, caseSensitive, parts[1]);
+                    }
+                }
+            }
+            return new DefaultPatternMatcher(partialMatchDirs, caseSensitive, parts);
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStep.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStep.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStep.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStep.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStepFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStepFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStepFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternStepFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStep.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStep.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStep.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStep.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/AbstractScriptHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/AbstractScriptHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/AbstractScriptHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/AbstractScriptHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/NoClassLoaderUpdateScriptHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/NoClassLoaderUpdateScriptHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/NoClassLoaderUpdateScriptHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/NoClassLoaderUpdateScriptHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/ScriptClassLoaderProvider.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/ScriptClassLoaderProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/ScriptClassLoaderProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/ScriptClassLoaderProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/initialization/ScriptHandlerInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/AbstractConvention.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/AbstractConvention.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/AbstractConvention.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/AbstractConvention.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultConvention.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultConvention.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultConvention.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultConvention.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationAction.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginCollection.java
new file mode 100644
index 0000000..8b2bd27
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginCollection.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.plugins;
+
+import groovy.lang.Closure;
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.internal.DefaultDomainObjectContainer;
+import org.gradle.api.plugins.PluginCollection;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.specs.Specs;
+import org.gradle.util.DeprecationLogger;
+
+public class DefaultPluginCollection<T extends Plugin> extends DefaultDomainObjectContainer<T>
+        implements PluginCollection<T> {
+    public DefaultPluginCollection(Class<T> type) {
+        super(type);
+    }
+
+    protected DefaultPluginCollection(Class<T> type, ObjectStore<T> store) {
+        super(type, store);
+    }
+
+    public PluginCollection<T> matching(Spec<? super T> spec) {
+        return new DefaultPluginCollection<T>(getType(), storeWithSpec(spec));
+    }
+
+    @Override
+    public PluginCollection<T> matching(Closure spec) {
+        return matching(Specs.convertClosureToSpec(spec));
+    }
+
+    public <S extends T> PluginCollection<S> withType(Class<S> type) {
+        return new DefaultPluginCollection<S>(type, storeWithType(type));
+    }
+
+    public Action<? super T> whenPluginAdded(Action<? super T> action) {
+        return whenObjectAdded(action);
+    }
+
+    public void whenPluginAdded(Closure closure) {
+        whenObjectAdded(closure);
+    }
+
+    public void allPlugins(Action<? super T> action) {
+        DeprecationLogger.nagUser("PluginCollection.allPlugins()", "all()");
+        all(action);
+    }
+
+    public void allPlugins(Closure closure) {
+        DeprecationLogger.nagUser("PluginCollection.allPlugins()", "all()");
+        all(closure);
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/EmbeddableJavaProject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/EmbeddableJavaProject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/EmbeddableJavaProject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/EmbeddableJavaProject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/IdePlugin.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/IdePlugin.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/IdePlugin.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/IdePlugin.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/PluginRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/PluginRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/PluginRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/plugins/PluginRegistry.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/project/AbstractProject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/AbstractProject.java
new file mode 100644
index 0000000..f5c902e
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/AbstractProject.java
@@ -0,0 +1,976 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.project;
+
+import groovy.lang.Closure;
+import groovy.lang.MissingPropertyException;
+import groovy.lang.Script;
+import org.gradle.api.*;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.artifacts.Module;
+import org.gradle.api.artifacts.dsl.ArtifactHandler;
+import org.gradle.api.artifacts.dsl.DependencyHandler;
+import org.gradle.api.artifacts.dsl.RepositoryHandler;
+import org.gradle.api.file.ConfigurableFileCollection;
+import org.gradle.api.file.ConfigurableFileTree;
+import org.gradle.api.file.CopySpec;
+import org.gradle.api.file.FileTree;
+import org.gradle.api.initialization.dsl.ScriptHandler;
+import org.gradle.api.internal.*;
+import org.gradle.api.internal.artifacts.configurations.DependencyMetaDataProvider;
+import org.gradle.api.internal.file.FileOperations;
+import org.gradle.api.internal.file.FileResolver;
+import org.gradle.api.internal.initialization.ScriptClassLoaderProvider;
+import org.gradle.api.internal.plugins.DefaultObjectConfigurationAction;
+import org.gradle.api.internal.tasks.TaskContainerInternal;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.api.logging.LoggingManager;
+import org.gradle.api.plugins.Convention;
+import org.gradle.api.plugins.PluginContainer;
+import org.gradle.api.tasks.Directory;
+import org.gradle.api.tasks.WorkResult;
+import org.gradle.configuration.ProjectEvaluator;
+import org.gradle.configuration.ScriptPlugin;
+import org.gradle.configuration.ScriptPluginFactory;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.gradle.listener.ListenerBroadcast;
+import org.gradle.logging.LoggingManagerInternal;
+import org.gradle.logging.StandardOutputCapture;
+import org.gradle.process.ExecResult;
+import org.gradle.util.Configurable;
+import org.gradle.util.ConfigureUtil;
+import org.gradle.util.DeprecationLogger;
+import org.gradle.util.Path;
+
+import java.io.File;
+import java.net.URI;
+import java.util.*;
+
+import static java.util.Collections.*;
+import static org.gradle.util.GUtil.*;
+
+/**
+ * @author Hans Dockter
+ */
+public abstract class AbstractProject implements ProjectInternal, DynamicObjectAware {
+    private static Logger buildLogger = Logging.getLogger(Project.class);
+    private ServiceRegistryFactory services;
+
+    private final ProjectInternal rootProject;
+
+    private final GradleInternal gradle;
+
+    private ProjectEvaluator projectEvaluator;
+
+    private ScriptSource buildScriptSource;
+
+    private final File projectDir;
+
+    private final ProjectInternal parent;
+
+    private final String name;
+
+    private Object group;
+
+    private Object version;
+
+    private Object status;
+
+    private final Map<String, Project> childProjects = new HashMap<String, Project>();
+
+    private List<String> defaultTasks = new ArrayList<String>();
+
+    private Set<Project> dependsOnProjects = new HashSet<Project>();
+
+    private ProjectStateInternal state;
+
+    private FileResolver fileResolver;
+    private FileOperations fileOperations;
+
+    private Factory<? extends AntBuilder> antBuilderFactory;
+
+    private AntBuilder ant;
+
+    private Object buildDir = Project.DEFAULT_BUILD_DIR_NAME;
+
+    private PluginContainer pluginContainer;
+
+    private final int depth;
+
+    private TaskContainerInternal taskContainer;
+
+    private TaskContainerInternal implicitTasksContainer;
+
+    private IProjectRegistry<ProjectInternal> projectRegistry;
+
+    private DependencyHandler dependencyHandler;
+
+    private ConfigurationContainer configurationContainer;
+
+    private ArtifactHandler artifactHandler;
+
+    private Factory<? extends RepositoryHandler> repositoryHandlerFactory;
+
+    private RepositoryHandler repositoryHandler;
+
+    private ScriptHandler scriptHandler;
+
+    private ScriptClassLoaderProvider scriptClassLoaderProvider;
+
+    private ListenerBroadcast<ProjectEvaluationListener> evaluationListener = new ListenerBroadcast<ProjectEvaluationListener>(ProjectEvaluationListener.class);
+
+    private LoggingManagerInternal loggingManager;
+
+    private DynamicObjectHelper dynamicObjectHelper;
+
+    private String description;
+
+    private final Path path;
+
+    public AbstractProject(String name,
+                           ProjectInternal parent,
+                           File projectDir,
+                           ScriptSource buildScriptSource,
+                           GradleInternal gradle,
+                           ServiceRegistryFactory serviceRegistryFactory) {
+        assert name != null;
+        this.rootProject = parent != null ? parent.getRootProject() : this;
+        this.projectDir = projectDir;
+        this.parent = parent;
+        this.name = name;
+        this.state = new ProjectStateInternal();
+        this.buildScriptSource = buildScriptSource;
+        this.gradle = gradle;
+
+        if (parent == null) {
+            path = Path.ROOT;
+            depth = 0;
+        } else {
+            String path = parent.absoluteProjectPath(name);
+            depth = parent.getDepth() + 1;
+            this.path = Path.path(path);
+        }
+
+        services = serviceRegistryFactory.createFor(this);
+        fileResolver = services.get(FileResolver.class);
+        antBuilderFactory = services.getFactory(AntBuilder.class);
+        taskContainer = services.newInstance(TaskContainerInternal.class);
+        implicitTasksContainer = services.newInstance(TaskContainerInternal.class);
+        fileOperations = services.get(FileOperations.class);
+        repositoryHandlerFactory = services.getFactory(RepositoryHandler.class);
+        projectEvaluator = services.get(ProjectEvaluator.class);
+        repositoryHandler = repositoryHandlerFactory.create();
+        configurationContainer = services.get(ConfigurationContainer.class);
+        pluginContainer = services.get(PluginContainer.class);
+        artifactHandler = services.get(ArtifactHandler.class);
+        dependencyHandler = services.get(DependencyHandler.class);
+        scriptHandler = services.get(ScriptHandler.class);
+        scriptClassLoaderProvider = services.get(ScriptClassLoaderProvider.class);
+        projectRegistry = services.get(IProjectRegistry.class);
+        loggingManager = services.get(LoggingManagerInternal.class);
+
+        dynamicObjectHelper = new DynamicObjectHelper(this);
+        dynamicObjectHelper.setConvention(services.get(Convention.class));
+        if (parent != null) {
+            dynamicObjectHelper.setParent(parent.getInheritedScope());
+        }
+        dynamicObjectHelper.addObject(taskContainer.getAsDynamicObject(), DynamicObjectHelper.Location.AfterConvention);
+
+        evaluationListener.add(gradle.getProjectEvaluationBroadcaster());
+    }
+
+    public RepositoryHandler createRepositoryHandler() {
+        return repositoryHandlerFactory.create();
+    }
+
+    public ProjectInternal getRootProject() {
+        return rootProject;
+    }
+
+    public GradleInternal getGradle() {
+        return gradle;
+    }
+
+    public PluginContainer getPlugins() {
+        return pluginContainer;
+    }
+
+    public ProjectEvaluator getProjectEvaluator() {
+        return projectEvaluator;
+    }
+
+    public void setProjectEvaluator(ProjectEvaluator projectEvaluator) {
+        this.projectEvaluator = projectEvaluator;
+    }
+
+    public ScriptHandler getBuildscript() {
+        return scriptHandler;
+    }
+
+    public void beforeCompile(ScriptPlugin configurer) {
+        if (configurer.getSource() != buildScriptSource) {
+            return;
+        }
+        configurer.setScriptBaseClass(ProjectScript.class);
+        configurer.setClassLoaderProvider(scriptClassLoaderProvider);
+    }
+
+    public void afterCompile(ScriptPlugin configurer, org.gradle.groovy.scripts.Script script) {
+        if (configurer.getSource() != buildScriptSource) {
+            return;
+        }
+        setScript(script);
+    }
+
+    public File getBuildFile() {
+        return getBuildscript().getSourceFile();
+    }
+
+    public void setScript(Script buildScript) {
+        dynamicObjectHelper.addObject(new BeanDynamicObject(buildScript).withNoProperties(),
+                DynamicObjectHelper.Location.BeforeConvention);
+    }
+
+    public ScriptSource getBuildScriptSource() {
+        return buildScriptSource;
+    }
+
+    public File getRootDir() {
+        return rootProject.getProjectDir();
+    }
+
+    public ProjectInternal getParent() {
+        return parent;
+    }
+
+    public ProjectIdentifier getParentIdentifier() {
+        return parent;
+    }
+
+    public DynamicObject getAsDynamicObject() {
+        return dynamicObjectHelper;
+    }
+
+    public DynamicObject getInheritedScope() {
+        return dynamicObjectHelper.getInheritable();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Object getGroup() {
+        if (group != null) {
+            return group;
+        } else if (this == rootProject) {
+            return "";
+        }
+        return rootProject.getName() + (getParent() == rootProject ? "" : "." + getParent().getPath().substring(1).replace(':', '.'));
+    }
+
+    public void setGroup(Object group) {
+        this.group = group;
+    }
+
+    public Object getVersion() {
+        return version == null ? DEFAULT_VERSION : version;
+    }
+
+    public void setVersion(Object version) {
+        this.version = version;
+    }
+
+    public Object getStatus() {
+        return status == null ? DEFAULT_STATUS : status;
+    }
+
+    public void setStatus(Object status) {
+        this.status = status;
+    }
+
+    public Map<String, Project> getChildProjects() {
+        return childProjects;
+    }
+
+    public List<String> getDefaultTasks() {
+        return defaultTasks;
+    }
+
+    public void setDefaultTasks(List<String> defaultTasks) {
+        this.defaultTasks = defaultTasks;
+    }
+
+    public Set<Project> getDependsOnProjects() {
+        return dependsOnProjects;
+    }
+
+    public Map<String, Object> getAdditionalProperties() {
+        return dynamicObjectHelper.getAdditionalProperties();
+    }
+
+    public ProjectStateInternal getState() {
+        return state;
+    }
+
+    public FileResolver getFileResolver() {
+        return fileResolver;
+    }
+
+    public void setFileResolver(FileResolver fileResolver) {
+        this.fileResolver = fileResolver;
+    }
+
+    public void setAnt(AntBuilder ant) {
+        this.ant = ant;
+    }
+
+    public ArtifactHandler getArtifacts() {
+        return artifactHandler;
+    }
+
+    public void setArtifactHandler(ArtifactHandler artifactHandler) {
+        this.artifactHandler = artifactHandler;
+    }
+
+    public RepositoryHandler getRepositories() {
+        return repositoryHandler;
+    }
+
+    public Factory<? extends RepositoryHandler> getRepositoryHandlerFactory() {
+        return repositoryHandlerFactory;
+    }
+
+    public ConfigurationContainer getConfigurations() {
+        return configurationContainer;
+    }
+
+    public void setConfigurationContainer(ConfigurationContainer configurationContainer) {
+        this.configurationContainer = configurationContainer;
+    }
+
+    public String getBuildDirName() {
+        return buildDir.toString();
+    }
+
+    public void setBuildDirName(String buildDirName) {
+        DeprecationLogger.nagUser("Project.setBuildDirName()", "setBuildDir()");
+        this.buildDir = buildDirName;
+    }
+
+    public Convention getConvention() {
+        return dynamicObjectHelper.getConvention();
+    }
+
+    public void setConvention(Convention convention) {
+        dynamicObjectHelper.setConvention(convention);
+    }
+
+    public String getPath() {
+        return path.toString();
+    }
+
+    public int getDepth() {
+        return depth;
+    }
+
+    public IProjectRegistry<ProjectInternal> getProjectRegistry() {
+        return projectRegistry;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        AbstractProject that = (AbstractProject) o;
+
+        return path.equals(that.path);
+    }
+
+    @Override
+    public int hashCode() {
+        return path.hashCode();
+    }
+
+    public int depthCompare(Project otherProject) {
+        return new Integer(getDepth()).compareTo(otherProject.getDepth());
+    }
+
+    public int compareTo(Project otherProject) {
+        int depthCompare = depthCompare(otherProject);
+        if (depthCompare == 0) {
+            return getPath().compareTo(otherProject.getPath());
+        } else {
+            return depthCompare;
+        }
+    }
+
+    public String absolutePath(String path) {
+        DeprecationLogger.nagUser("Project.absolutePath()", "Project.absoluteProjectPath()");
+        return absoluteProjectPath(path);
+    }
+
+    public String absoluteProjectPath(String path) {
+        return this.path.absolutePath(path);
+    }
+
+    public String relativeProjectPath(String path) {
+        return this.path.relativePath(path);
+    }
+
+    public Project project(String path) {
+        Project project = findProject(path);
+        if (project == null) {
+            throw new UnknownProjectException(String.format("Project with path '%s' could not be found in %s.", path, this));
+        }
+        return project;
+    }
+
+    public Project findProject(String path) {
+        if (!isTrue(path)) {
+            throw new InvalidUserDataException("A path must be specified!");
+        }
+        return projectRegistry.getProject(absoluteProjectPath(path));
+    }
+
+    public Set<Project> getAllprojects() {
+        return new TreeSet<Project>(projectRegistry.getAllProjects(getPath()));
+    }
+
+    public Set<Project> getSubprojects() {
+        return new TreeSet<Project>(projectRegistry.getSubProjects(getPath()));
+    }
+
+    public void subprojects(Action<? super Project> action) {
+        configure(getSubprojects(), action);
+    }
+
+    public void allprojects(Action<? super Project> action) {
+        configure(getAllprojects(), action);
+    }
+
+    public <T> Iterable<T> configure(Iterable<T> objects, Action<? super T> configureAction) {
+        for (T object : objects) {
+            configureAction.execute(object);
+        }
+        return objects;
+    }
+
+    public AntBuilder getAnt() {
+        if (ant == null) {
+            ant = createAntBuilder();
+        }
+        return ant;
+    }
+
+    public AntBuilder createAntBuilder() {
+        return antBuilderFactory.create();
+    }
+
+    /**
+     * This method is used when scripts access the project via project.x
+     */
+    public Project getProject() {
+        return this;
+    }
+
+    public AbstractProject evaluate() {
+        projectEvaluator.evaluate(this, state);
+        state.rethrowFailure();
+        return this;
+    }
+
+    public Project usePlugin(String pluginId) {
+        warnUsePluginDeprecated();
+        pluginContainer.apply(pluginId);
+        return this;
+    }
+
+    public Project usePlugin(Class<? extends Plugin> pluginClass) {
+        warnUsePluginDeprecated();
+        pluginContainer.apply(pluginClass);
+        return this;
+    }
+
+    public TaskContainerInternal getTasks() {
+        return taskContainer;
+    }
+
+    public TaskContainerInternal getImplicitTasks() {
+        return implicitTasksContainer;
+    }
+
+    public void defaultTasks(String... defaultTasks) {
+        if (defaultTasks == null) {
+            throw new InvalidUserDataException("Default tasks must not be null!");
+        }
+        this.defaultTasks = new ArrayList<String>();
+        for (String defaultTask : defaultTasks) {
+            if (defaultTask == null) {
+                throw new InvalidUserDataException("Default tasks must not be null!");
+            }
+            this.defaultTasks.add(defaultTask);
+        }
+    }
+
+    public Task createTask(String name) {
+        return createTask(new HashMap<String, Object>(), name, (Action) null);
+    }
+
+    public Task createTask(Map<String, ?> args, String name) {
+        return createTask(args, name, (Action) null);
+    }
+
+    public Task createTask(String name, Action<? super Task> action) {
+        return createTask(new HashMap<String, Object>(), name, action);
+    }
+
+    public Task createTask(String name, Closure action) {
+        return createTask(new HashMap<String, Object>(), name, action);
+    }
+
+    public Task createTask(Map args, String name, Closure action) {
+        warnCreateTaskDeprecated();
+        Map<String, Object> allArgs = new HashMap<String, Object>(args);
+        allArgs.put(Task.TASK_NAME, name);
+        allArgs.put(Task.TASK_ACTION, action);
+        return taskContainer.add(allArgs);
+    }
+
+    public Task createTask(Map<String, ?> args, String name, Action<? super Task> action) {
+        warnCreateTaskDeprecated();
+        Map<String, Object> allArgs = new HashMap<String, Object>(args);
+        allArgs.put(Task.TASK_NAME, name);
+        if (action != null) {
+            allArgs.put(Task.TASK_ACTION, action);
+        }
+        return taskContainer.add(allArgs);
+    }
+
+    private void warnCreateTaskDeprecated() {
+        DeprecationLogger.nagUser("Project.createTask()", "task()");
+    }
+
+    private void warnUsePluginDeprecated() {
+        DeprecationLogger.nagUser("Project.usePlugin()", "apply()");
+    }
+
+    public void addChildProject(ProjectInternal childProject) {
+        childProjects.put(childProject.getName(), childProject);
+    }
+
+    public File getProjectDir() {
+        return projectDir;
+    }
+
+    public File getBuildDir() {
+        return file(buildDir);
+    }
+
+    public void setBuildDir(Object path) {
+        buildDir = path;
+    }
+
+    public void dependsOn(String path) {
+        dependsOn(path, true);
+    }
+
+    public void dependsOn(String path, boolean evaluateDependsOnProject) {
+        if (!isTrue(path)) {
+            throw new InvalidUserDataException("You must specify a project!");
+        }
+        dependsOnProjects.add(project(path));
+        if (evaluateDependsOnProject) {
+            evaluationDependsOn(path);
+        }
+    }
+
+    public Project evaluationDependsOn(String path) {
+        if (!isTrue(path)) {
+            throw new InvalidUserDataException("You must specify a project!");
+        }
+        DefaultProject projectToEvaluate = (DefaultProject) project(path);
+        if (projectToEvaluate.getState().getExecuting()) {
+            throw new CircularReferenceException(String.format("Circular referencing during evaluation for %s.",
+                    projectToEvaluate));
+        }
+        return projectToEvaluate.evaluate();
+    }
+
+    public Project childrenDependOnMe() {
+        for (Project project : childProjects.values()) {
+            project.dependsOn(getPath(), false);
+        }
+        return this;
+    }
+
+    public Project dependsOnChildren() {
+        return dependsOnChildren(false);
+    }
+
+    public Project dependsOnChildren(boolean evaluateDependsOnProject) {
+        for (Project project : childProjects.values()) {
+            dependsOn(project.getPath(), evaluateDependsOnProject);
+        }
+        return this;
+    }
+
+    public String toString() {
+        if (parent != null) {
+            return String.format("project '%s'", path);
+        } else {
+            return String.format("root project '%s'", name);
+        }
+    }
+
+    public Map<Project, Set<Task>> getAllTasks(boolean recursive) {
+        final Map<Project, Set<Task>> foundTargets = new TreeMap<Project, Set<Task>>();
+        Action<Project> action = new Action<Project>() {
+            public void execute(Project project) {
+                foundTargets.put(project, new TreeSet<Task>(project.getTasks().getAll()));
+            }
+        };
+        if (recursive) {
+            allprojects(action);
+        } else {
+            action.execute(this);
+        }
+        return foundTargets;
+    }
+
+    public Set<Task> getTasksByName(final String name, boolean recursive) {
+        if (!isTrue(name)) {
+            throw new InvalidUserDataException("Name is not specified!");
+        }
+        final Set<Task> foundTasks = new HashSet<Task>();
+        Action<Project> action = new Action<Project>() {
+            public void execute(Project project) {
+                Task task = project.getTasks().findByName(name);
+                if (task != null) {
+                    foundTasks.add(task);
+                }
+            }
+        };
+        if (recursive) {
+            allprojects(action);
+        } else {
+            action.execute(this);
+        }
+        return foundTasks;
+    }
+
+    public File file(Object path) {
+        return fileOperations.file(path);
+    }
+
+    public File file(Object path, PathValidation validation) {
+        return fileOperations.file(path, validation);
+    }
+
+    public URI uri(Object path) {
+        return fileOperations.uri(path);
+    }
+
+    public ConfigurableFileCollection files(Object... paths) {
+        return fileOperations.files(paths);
+    }
+
+    public ConfigurableFileCollection files(Object paths, Closure closure) {
+        return fileOperations.files(paths, closure);
+    }
+
+    public ConfigurableFileTree fileTree(Object baseDir) {
+        return fileOperations.fileTree(baseDir);
+    }
+
+    public ConfigurableFileTree fileTree(Map<String, ?> args) {
+        return fileOperations.fileTree(args);
+    }
+
+    public ConfigurableFileTree fileTree(Closure closure) {
+        return fileOperations.fileTree(closure);
+    }
+
+    public FileTree zipTree(Object zipPath) {
+        return fileOperations.zipTree(zipPath);
+    }
+
+    public FileTree tarTree(Object tarPath) {
+        return fileOperations.tarTree(tarPath);
+    }
+
+    public String relativePath(Object path) {
+        return fileOperations.relativePath(path);
+    }
+
+    public File mkdir(Object path) {
+        return fileOperations.mkdir(path);
+    }
+
+    public boolean delete(Object... paths) {
+        return fileOperations.delete(paths);
+    }
+
+    public Directory dir(String path) {
+        String[] pathElements = path.split("/");
+        String name = "";
+        Directory dirTask = null;
+        for (String pathElement : pathElements) {
+            name += name.length() != 0 ? "/" + pathElement : pathElement;
+            Task task = taskContainer.findByName(name);
+            if (task instanceof Directory) {
+                dirTask = (Directory) task;
+            } else if (task != null) {
+                throw new InvalidUserDataException(String.format("Cannot add directory task '%s' as a non-directory task with this name already exists.", name));
+            } else {
+                dirTask = taskContainer.add(name, Directory.class);
+            }
+        }
+        return dirTask;
+    }
+
+    public void setTaskContainer(TaskContainerInternal taskContainer) {
+        this.taskContainer = taskContainer;
+    }
+
+    public Factory<? extends AntBuilder> getAntBuilderFactory() {
+        return antBuilderFactory;
+    }
+
+    public void setAntBuilderFactory(Factory<? extends AntBuilder> antBuilderFactory) {
+        this.antBuilderFactory = antBuilderFactory;
+    }
+
+    public DependencyHandler getDependencies() {
+        return dependencyHandler;
+    }
+
+    public void setDependencyHandler(DependencyHandler dependencyHandler) {
+        this.dependencyHandler = dependencyHandler;
+    }
+
+    public ProjectEvaluationListener getProjectEvaluationBroadcaster() {
+        return evaluationListener.getSource();
+    }
+
+    public void beforeEvaluate(Action<? super Project> action) {
+        evaluationListener.add("beforeEvaluate", action);
+    }
+
+    public void afterEvaluate(Action<? super Project> action) {
+        evaluationListener.add("afterEvaluate", action);
+    }
+
+    public void beforeEvaluate(Closure closure) {
+        evaluationListener.add("beforeEvaluate", closure);
+    }
+
+    public void afterEvaluate(Closure closure) {
+        evaluationListener.add("afterEvaluate", closure);
+    }
+
+    public Logger getLogger() {
+        return buildLogger;
+    }
+
+    public StandardOutputCapture getStandardOutputCapture() {
+        return loggingManager;
+    }
+
+    public LoggingManager getLogging() {
+        return loggingManager;
+    }
+
+    public void disableStandardOutputCapture() {
+        DeprecationLogger.nagUser("Project.disableStandardOutputCapture()");
+        loggingManager.disableStandardOutputCapture();
+    }
+
+    public void captureStandardOutput(LogLevel level) {
+        DeprecationLogger.nagUser("Project.captureStandardOutput()", "getLogging().captureStandardOutput()");
+        loggingManager.captureStandardOutput(level);
+    }
+
+    public Object property(String propertyName) throws MissingPropertyException {
+        return dynamicObjectHelper.getProperty(propertyName);
+    }
+
+    public void setProperty(String name, Object value) {
+        dynamicObjectHelper.setProperty(name, value);
+    }
+
+    public boolean hasProperty(String propertyName) {
+        return dynamicObjectHelper.hasProperty(propertyName);
+    }
+
+    public Map<String, ?> getProperties() {
+        return dynamicObjectHelper.getProperties();
+    }
+
+    public WorkResult copy(Closure closure) {
+        return fileOperations.copy(closure);
+    }
+
+    public CopySpec copySpec(Closure closure) {
+        return fileOperations.copySpec(closure);
+    }
+
+    public ExecResult javaexec(Closure closure) {
+        return fileOperations.javaexec(closure);
+    }
+
+    public ExecResult exec(Closure closure) {
+        return fileOperations.exec(closure);
+    }
+
+    public ServiceRegistryFactory getServices() {
+        return services;
+    }
+
+    public Module getModule() {
+        return getServices().get(DependencyMetaDataProvider.class).getModule();
+    }
+
+    public void apply(Closure closure) {
+        DefaultObjectConfigurationAction action = new DefaultObjectConfigurationAction(fileResolver, services.get(
+                ScriptPluginFactory.class), this);
+        configure(action, closure);
+        action.execute();
+    }
+
+    public void apply(Map<String, ?> options) {
+        DefaultObjectConfigurationAction action = new DefaultObjectConfigurationAction(fileResolver, services.get(
+                ScriptPluginFactory.class), this);
+        ConfigureUtil.configureByMap(options, action);
+        action.execute();
+    }
+
+    public AntBuilder ant(Closure configureClosure) {
+        return ConfigureUtil.configure(configureClosure, getAnt());
+    }
+
+    public void subprojects(Closure configureClosure) {
+        configure(getSubprojects(), configureClosure);
+    }
+
+    public void allprojects(Closure configureClosure) {
+        configure(getAllprojects(), configureClosure);
+    }
+
+    public Project project(String path, Closure configureClosure) {
+        return ConfigureUtil.configure(configureClosure, project(path));
+    }
+
+    public Object configure(Object object, Closure configureClosure) {
+        return ConfigureUtil.configure(configureClosure, object);
+    }
+
+    public Iterable<?> configure(Iterable<?> objects, Closure configureClosure) {
+        for (Object object : objects) {
+            configure(object, configureClosure);
+        }
+        return objects;
+    }
+
+    public void configurations(Closure configureClosure) {
+        ((Configurable<?>) getConfigurations()).configure(configureClosure);
+    }
+
+    public void repositories(Closure configureClosure) {
+        ConfigureUtil.configure(configureClosure, getRepositories());
+    }
+
+    public void dependencies(Closure configureClosure) {
+        ConfigureUtil.configure(configureClosure, getDependencies());
+    }
+
+    public void artifacts(Closure configureClosure) {
+        ConfigureUtil.configure(configureClosure, getArtifacts());
+    }
+
+    public void buildscript(Closure configureClosure) {
+        ConfigureUtil.configure(configureClosure, getBuildscript());
+    }
+
+    public Task task(String task) {
+        return taskContainer.add(task);
+    }
+
+    public Task task(Object task) {
+        return taskContainer.add(task.toString());
+    }
+
+    public Task task(String task, Closure configureClosure) {
+        return taskContainer.add(task).configure(configureClosure);
+    }
+
+    public Task task(Object task, Closure configureClosure) {
+        return task(task.toString(), configureClosure);
+    }
+
+    public Task task(Map options, String task) {
+        return taskContainer.add(addMaps(options, singletonMap(Task.TASK_NAME, task)));
+    }
+
+    public Task task(Map options, Object task) {
+        return task(options, task.toString());
+    }
+
+    public Task task(Map options, String task, Closure configureClosure) {
+        return taskContainer.add(addMaps(options, singletonMap(Task.TASK_NAME, task))).configure(configureClosure);
+    }
+
+    public Task task(Map options, Object task, Closure configureClosure) {
+        return task(options, task.toString(), configureClosure);
+    }
+
+    /**
+     * This is called by the task creation DSL. Need to find a cleaner way to do this...
+     */
+    public Object passThrough(Object object) {
+        return object;
+    }
+
+    public <T> NamedDomainObjectContainer<T> container(Class<T> type) {
+        ClassGenerator classGenerator = getServices().get(ClassGenerator.class);
+        return classGenerator.newInstance(DefaultAutoCreateDomainObjectContainer.class, type, classGenerator);
+    }
+
+    public <T> NamedDomainObjectContainer<T> container(Class<T> type, NamedDomainObjectFactory<? extends T> factory) {
+        ClassGenerator classGenerator = getServices().get(ClassGenerator.class);
+        return classGenerator.newInstance(DefaultAutoCreateDomainObjectContainer.class, type, classGenerator, factory);
+    }
+
+    public <T> NamedDomainObjectContainer<T> container(Class<T> type, Closure factoryClosure) {
+        ClassGenerator classGenerator = getServices().get(ClassGenerator.class);
+        return classGenerator.newInstance(DefaultAutoCreateDomainObjectContainer.class, type, classGenerator, factoryClosure);
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilder.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilder.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilder.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilder.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilder.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilder.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilder.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilder.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultProject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultProject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultProject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultProject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultProjectRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultProjectRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultProjectRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultProjectRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/DefaultServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/DefaultServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/GlobalServicesRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/GlobalServicesRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/GlobalServicesRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/GlobalServicesRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/IProjectFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/IProjectFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/IProjectFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/IProjectFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/IProjectRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/IProjectRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/IProjectRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/IProjectRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/IsolatedAntBuilder.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/IsolatedAntBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/IsolatedAntBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/IsolatedAntBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectIdentifier.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectIdentifier.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectIdentifier.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectIdentifier.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectScript.groovy b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectScript.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectScript.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectScript.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectStateInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectStateInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ProjectStateInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ProjectStateInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistryFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistryFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistryFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ServiceRegistryFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ant/AntLoggingAdapter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ant/AntLoggingAdapter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ant/AntLoggingAdapter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ant/AntLoggingAdapter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ant/BasicAntBuilder.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/ant/BasicAntBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/ant/BasicAntBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/ant/BasicAntBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ITaskFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ITaskFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ITaskFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ITaskFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputDirectoryPropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputDirectoryPropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputDirectoryPropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputDirectoryPropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilePropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilePropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilePropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilePropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilesPropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilesPropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilesPropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputFilesPropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputPropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputPropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputPropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/InputPropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/NestedBeanPropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/NestedBeanPropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/NestedBeanPropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/NestedBeanPropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputDirectoryPropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputDirectoryPropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputDirectoryPropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputDirectoryPropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputFilePropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputFilePropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputFilePropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/OutputFilePropertyAnnotationHandler.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuter.java
new file mode 100644
index 0000000..4794ff7
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuter.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.project.taskfactory;
+
+import org.gradle.api.Task;
+import org.gradle.api.internal.TaskInternal;
+import org.gradle.api.internal.tasks.TaskExecuter;
+import org.gradle.api.internal.tasks.TaskStateInternal;
+
+public class PostExecutionAnalysisTaskExecuter implements TaskExecuter {
+    private final TaskExecuter executer;
+
+    public PostExecutionAnalysisTaskExecuter(TaskExecuter executer) {
+        this.executer = executer;
+    }
+
+    public void execute(TaskInternal task, TaskStateInternal state) {
+        executer.execute(task, state);
+        if (task.getActions().isEmpty()) {
+            boolean upToDate = true;
+            for (Task dependency : task.getTaskDependencies().getDependencies(task)) {
+                if (!dependency.getState().getSkipped()) {
+                    upToDate = false;
+                    break;
+                }
+            }
+            if (upToDate) {
+                state.upToDate();
+            }
+        } else if (!state.getDidWork()) {
+            state.upToDate();
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyActionContext.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyActionContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyActionContext.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyActionContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyAnnotationHandler.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyAnnotationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyAnnotationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PropertyAnnotationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/TaskFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/TaskFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/TaskFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/TaskFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/UpdateAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/UpdateAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/UpdateAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/UpdateAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ValidationAction.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ValidationAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ValidationAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/project/taskfactory/ValidationAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/CachingResource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/CachingResource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/CachingResource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/resource/CachingResource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/DelegatingResource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/DelegatingResource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/DelegatingResource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/resource/DelegatingResource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/Resource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/Resource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/Resource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/resource/Resource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/ResourceException.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/ResourceException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/ResourceException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/resource/ResourceException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/ResourceNotFoundException.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/ResourceNotFoundException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/ResourceNotFoundException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/resource/ResourceNotFoundException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/StringResource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/StringResource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/StringResource.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/resource/StringResource.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java
new file mode 100644
index 0000000..276d81a
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.resource;
+
+import org.apache.commons.io.IOUtils;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.net.URI;
+
+import static org.gradle.util.GFileUtils.*;
+
+public class UriResource implements Resource {
+    private final File sourceFile;
+    private final URI sourceUri;
+    private final String description;
+
+    public UriResource(String description, File sourceFile) {
+        this.description = description;
+        this.sourceFile = canonicalise(sourceFile);
+        this.sourceUri = sourceFile.toURI();
+    }
+
+    public UriResource(String description, URI sourceUri) {
+        this.description = description;
+        this.sourceFile = sourceUri.getScheme().equals("file") ? canonicalise(new File(sourceUri.getPath())) : null;
+        this.sourceUri = sourceUri;
+    }
+
+    public String getDisplayName() {
+        return String.format("%s '%s'", description, sourceFile != null ? sourceFile.getAbsolutePath() : sourceUri);
+    }
+
+    public String getText() {
+        if (sourceFile != null && sourceFile.isDirectory()) {
+            throw new ResourceException(String.format("Could not read %s as it is a directory.", getDisplayName()));
+        }
+        try {
+            InputStream inputStream = sourceUri.toURL().openStream();
+            try {
+                return IOUtils.toString(inputStream);
+            } finally {
+                inputStream.close();
+            }
+        } catch (FileNotFoundException e) {
+            throw new ResourceNotFoundException(String.format(String.format("Could not read %s as it does not exist.", getDisplayName())));
+        } catch (Exception e) {
+            throw new ResourceException(String.format("Could not read %s.", getDisplayName()), e);
+        }
+    }
+
+    public boolean getExists() {
+        try {
+            InputStream inputStream = sourceUri.toURL().openStream();
+            try {
+                return true;
+            } finally {
+                inputStream.close();
+            }
+        } catch (FileNotFoundException e) {
+            return false;
+        } catch (Exception e) {
+            throw new ResourceException(String.format("Could not determine if %s exists.", getDisplayName()), e);
+        }
+    }
+
+    public File getFile() {
+        return sourceFile;
+    }
+
+    public URI getURI() {
+        return sourceUri;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/AbstractTaskDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/AbstractTaskDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/AbstractTaskDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/AbstractTaskDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContext.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContext.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/CommandLineOption.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/CommandLineOption.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/CommandLineOption.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/CommandLineOption.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskCollection.java
new file mode 100644
index 0000000..506014c
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskCollection.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.tasks;
+
+import groovy.lang.Closure;
+import org.gradle.api.*;
+import org.gradle.api.internal.ClassGenerator;
+import org.gradle.api.internal.DefaultNamedDomainObjectContainer;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.specs.Specs;
+import org.gradle.api.tasks.TaskCollection;
+import org.gradle.util.DeprecationLogger;
+
+public class DefaultTaskCollection<T extends Task> extends DefaultNamedDomainObjectContainer<T> implements TaskCollection<T> {
+    protected final ProjectInternal project;
+
+    public DefaultTaskCollection(Class<T> type, ClassGenerator classGenerator, ProjectInternal project) {
+        super(type, classGenerator);
+        this.project = project;
+    }
+
+    public DefaultTaskCollection(Class<T> type, ClassGenerator classGenerator, ProjectInternal project, NamedObjectStore<T> store) {
+        super(type, classGenerator, store);
+        this.project = project;
+    }
+
+    @Override
+    public TaskCollection<T> matching(Spec<? super T> spec) {
+        return getClassGenerator().newInstance(DefaultTaskCollection.class, getType(), getClassGenerator(), project, storeWithSpec(spec));
+    }
+
+    @Override
+    public TaskCollection<T> matching(Closure spec) {
+        return matching(Specs.convertClosureToSpec(spec));
+    }
+
+    @Override
+    public <S extends T> TaskCollection<S> withType(Class<S> type) {
+        return getClassGenerator().newInstance(DefaultTaskCollection.class, type, getClassGenerator(), project, storeWithType(type));
+    }
+
+    public Action<? super T> whenTaskAdded(Action<? super T> action) {
+        return whenObjectAdded(action);
+    }
+
+    public void whenTaskAdded(Closure closure) {
+        whenObjectAdded(closure);
+    }
+
+    public void allTasks(Action<? super T> action) {
+        DeprecationLogger.nagUser("TaskCollection.allTasks()", "all()");
+        all(action);
+    }
+
+    public void allTasks(Closure action) {
+        DeprecationLogger.nagUser("TaskCollection.allTasks()", "all()");
+        all(action);
+    }
+
+    @Override
+    public String getTypeDisplayName() {
+        return "task";
+    }
+
+    @Override
+    protected UnknownDomainObjectException createNotFoundException(String name) {
+        return new UnknownTaskException(String.format("Task with name '%s' not found in %s.", name, project));
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskInputs.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskInputs.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskInputs.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskInputs.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputs.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputs.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputs.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputs.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/SkipTaskExecuter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/SkipTaskExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/SkipTaskExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/SkipTaskExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskContainerInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskContainerInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskContainerInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskContainerInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyResolveContext.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyResolveContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyResolveContext.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskDependencyResolveContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskExecuter.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskResolver.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskStateInternal.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskStateInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/TaskStateInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/TaskStateInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/AbstractPersistableConfigurationObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/AbstractPersistableConfigurationObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/AbstractPersistableConfigurationObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/AbstractPersistableConfigurationObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/Generator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/Generator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/Generator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/Generator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObject.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGenerator.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObject.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObject.java
rename to subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObject.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObject.java b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObject.java
new file mode 100644
index 0000000..d86f779
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObject.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.tasks.generator;
+
+import groovy.util.Node;
+import groovy.util.XmlParser;
+import org.gradle.api.internal.XmlTransformer;
+
+import java.io.*;
+
+/**
+ * A {@link PersistableConfigurationObject} which is stored in an XML file.
+ */
+public abstract class XmlPersistableConfigurationObject extends AbstractPersistableConfigurationObject {
+    private final XmlTransformer xmlTransformer;
+    private Node xml;
+
+    protected XmlPersistableConfigurationObject(XmlTransformer xmlTransformer) {
+        this.xmlTransformer = xmlTransformer;
+    }
+
+    public Node getXml() {
+        return xml;
+    }
+
+    @Override
+    public void load(InputStream inputStream) throws Exception {
+        xml = new XmlParser().parse(inputStream);
+        load(xml);
+    }
+
+    @Override
+    public void store(OutputStream outputStream) {
+        store(xml);
+        xmlTransformer.transform(xml, outputStream);
+    }
+
+    /**
+     * Called immediately after the XML file has been read.
+     */
+    protected abstract void load(Node xml);
+
+    /**
+     * Called immediately before the XML file is to be written.
+     */
+    protected abstract void store(Node xml);
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/invocation/Gradle.java b/subprojects/core/src/main/groovy/org/gradle/api/invocation/Gradle.java
new file mode 100644
index 0000000..43afa2d
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/invocation/Gradle.java
@@ -0,0 +1,218 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.invocation;
+
+import groovy.lang.Closure;
+import org.gradle.BuildListener;
+import org.gradle.StartParameter;
+import org.gradle.api.Project;
+import org.gradle.api.ProjectEvaluationListener;
+import org.gradle.api.execution.TaskExecutionGraph;
+
+import java.io.File;
+
+/**
+ * <p>Represents an invocation of Gradle.</p>
+ *
+ * <p>You can obtain a {@code Gradle} instance by calling {@link Project#getGradle()}.</p>
+ */
+public interface Gradle {
+    /**
+     * <p>Returns the current Gradle version.</p>
+     *
+     * @return The Gradle version. Never returns null.
+     */
+    String getGradleVersion();
+
+    /**
+     * <p>Returns the Gradle user home directory. This directory is used to cache downloaded resources.</p>
+     *
+     * @return The user home directory. Never returns null.
+     */
+    File getGradleUserHomeDir();
+
+    /**
+     * <p>Returns the Gradle home directory, if any. This directory is the directory containing the Gradle distribution
+     * executing this build.</p>
+     *
+     * @return The home directory. May return null.
+     * @deprecated No replacement
+     */
+    File getGradleHomeDir();
+
+    /**
+     * <p>Returns the parent build of this build, if any.</p>
+     *
+     * @return The parent build. May return null.
+     */
+    Gradle getParent();
+
+    /**
+     * <p>Returns the root project of this build.</p>
+     *
+     * @return The root project. Never returns null.
+     */
+    Project getRootProject();
+
+    /**
+     * <p>Returns the {@link TaskExecutionGraph} for this build.</p>
+     *
+     * @return The task graph. Never returns null.
+     */
+    TaskExecutionGraph getTaskGraph();
+
+    /**
+     * Returns the {@link StartParameter} used to start this build.
+     *
+     * @return The start parameter. Never returns null.
+     */
+    StartParameter getStartParameter();
+
+    /**
+     * Adds a listener to this build, to receive notifications as projects are evaluated.
+     *
+     * @param listener The listener to add. Does nothing if this listener has already been added.
+     * @return The added listener.
+     */
+    ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener);
+
+    /**
+     * Removes the given listener from this build.
+     *
+     * @param listener The listener to remove. Does nothing if this listener has not been added.
+     */
+    void removeProjectEvaluationListener(ProjectEvaluationListener listener);
+
+    /**
+     * Adds a closure to be called immediately before a project is evaluated. The project is passed to the closure as a
+     * parameter.
+     *
+     * @param closure The closure to execute.
+     */
+    void beforeProject(Closure closure);
+
+    /**
+     * Adds a closure to be called immediately after a project is evaluated. The project is passed to the closure as the
+     * first parameter. The project evaluation failure, if any, is passed as the second parameter. Both parameters are
+     * optional.
+     *
+     * @param closure The closure to execute.
+     */
+    void afterProject(Closure closure);
+
+    /**
+     * Adds a closure to be called when the build is started. This {@code Gradle} instance is passed to the closure as
+     * the first parameter.
+     *
+     * @param closure The closure to execute.
+     */
+    void buildStarted(Closure closure);
+
+    /**
+     * Adds a closure to be called when the build settings have been loaded and evaluated. The settings object is
+     * fully configured and is ready to use to load the build projects. The
+     * {@link org.gradle.api.initialization.Settings} object is passed to the closure as a parameter.
+     *
+     * @param closure The closure to execute.
+     */
+    void settingsEvaluated(Closure closure);
+
+    /**
+     * Adds a closure to be called when the projects for the build have been created from the settings.
+     * None of the projects have been evaluated. This {@code Gradle} instance is passed to the closure as a parameter.
+     *
+     * @param closure The closure to execute.
+     */
+    void projectsLoaded(Closure closure);
+
+    /**
+     * Adds a closure to be called when all projects for the build have been evaluated. The project objects are fully
+     * configured and are ready to use to populate the task graph. This {@code Gradle} instance is passed to
+     * the closure as a parameter.
+     *
+     * @param closure The closure to execute.
+     */
+    void projectsEvaluated(Closure closure);
+
+    /**
+     * Adds a closure to be called when the build is completed. All selected tasks have been executed.
+     * A {@link org.gradle.BuildResult} instance is passed to the closure as a parameter.
+     *
+     * @param closure The closure to execute.
+     */
+    void buildFinished(Closure closure);
+
+    /**
+     * <p>Adds a {@link BuildListener} to this Build instance. The listener is notified of events which occur during the
+     * execution of the build.</p>
+     *
+     * @param buildListener The listener to add.
+     */
+    void addBuildListener(BuildListener buildListener);
+
+    /**
+     * Adds the given listener to this build. The listener may implement any of the given listener interfaces:
+     *
+     * <ul>
+     *
+     * <li>{@link org.gradle.BuildListener}
+     *
+     * <li>{@link org.gradle.api.execution.TaskExecutionGraphListener}
+     *
+     * <li>{@link org.gradle.api.ProjectEvaluationListener}
+     *
+     * <li>{@link org.gradle.api.execution.TaskExecutionListener}
+     *
+     * <li>{@link org.gradle.api.execution.TaskActionListener}
+     *
+     * <li>{@link org.gradle.api.logging.StandardOutputListener}
+     *
+     * <li>{@link org.gradle.api.tasks.testing.TestListener}
+     *
+     * </ul>
+     *
+     * @param listener The listener to add. Does nothing if this listener has already been added.
+     */
+    public void addListener(Object listener);
+
+    /**
+     * Removes the given listener from this build.
+     *
+     * @param listener The listener to remove. Does nothing if this listener has not been added.
+     */
+    public void removeListener(Object listener);
+
+    /**
+     * Uses the given object as a logger. The logger object may implement any of the listener interfaces supported by
+     * {@link #addListener(Object)}. Each listener interface has exactly one associated logger. When you call this
+     * method with a logger of a given listener type, the new logger will replace whichever logger is currently
+     * associated with the listener type. This allows you to selectively replace the standard logging which Gradle
+     * provides with your own implementation, for certain types of events.
+     *
+     * @param logger The logger to use.
+     */
+    public void useLogger(Object logger);
+
+    /**
+     * Returns this {@code Gradle} instance. This method is useful in init scripts to explicitly access Gradle
+     * properties and methods. For example, using <code>gradle.parent</code> can express your intent better than using
+     * <code>parent</code>. This property also allows you to access Gradle properties from a scope where the property
+     * may be hidden, such as, for example, from a method or closure.
+     *
+     * @return this. Never returns null.
+     */
+    Gradle getGradle();
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/invocation/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/invocation/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/invocation/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/invocation/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/LogLevel.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/LogLevel.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/LogLevel.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/LogLevel.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/Logger.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/Logger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/Logger.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/Logger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/Logging.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/Logging.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/Logging.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/Logging.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/LoggingManager.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/LoggingManager.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/LoggingManager.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/LoggingManager.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/LoggingOutput.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/LoggingOutput.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/LoggingOutput.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/LoggingOutput.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/StandardOutputListener.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/StandardOutputListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/StandardOutputListener.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/StandardOutputListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/logging/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/logging/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/logging/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/Convention.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/Convention.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/Convention.java
rename to subprojects/core/src/main/groovy/org/gradle/api/plugins/Convention.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/ObjectConfigurationAction.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/ObjectConfigurationAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/ObjectConfigurationAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/plugins/ObjectConfigurationAction.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginCollection.java
new file mode 100644
index 0000000..0262dd3
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginCollection.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins;
+
+import org.gradle.api.DomainObjectCollection;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+
+import groovy.lang.Closure;
+
+/**
+ * <p>A {@code PluginCollection} represents a collection of {@link org.gradle.api.Plugin} instances.</p>
+ * 
+ * @author Hans Dockter
+ * @param <T> The type of plugins which this collection contains.
+ */
+public interface PluginCollection<T extends Plugin> extends DomainObjectCollection<T> {
+    /**
+     * {@inheritDoc}
+     */
+    PluginCollection<T> matching(Spec<? super T> spec);
+
+    /**
+     * {@inheritDoc}
+     */
+    PluginCollection<T> matching(Closure closure);
+
+    /**
+     * {@inheritDoc}
+     */
+    <S extends T> PluginCollection<S> withType(Class<S> type);
+
+    /**
+     * Adds an {@code Action} to be executed when a plugin is added to this collection.
+     *
+     * @param action The action to be executed
+     * @return the supplied action
+     */
+    Action<? super T> whenPluginAdded(Action<? super T> action);
+
+    /**
+     * Adds a closure to be called when a plugin is added to this collection. The plugin is passed to the closure as the
+     * parameter.
+     *
+     * @param closure The closure to be called
+     */
+    void whenPluginAdded(Closure closure);
+
+    /**
+     * Executes the given action against all plugins in this collection, and any plugins subsequently added to this
+     * collection.
+     *
+     * @param action The action to be executed
+     * @deprecated Use {@link #all(org.gradle.api.Action)} instead.
+     */
+    @Deprecated
+    void allPlugins(Action<? super T> action);
+
+    /**
+     * Executes the given closure against all plugins in this collection, and any plugins subsequently added to this
+     * collection.
+     *
+     * @param closure The closure to be called
+     * @deprecated Use {@link #all(groovy.lang.Closure)} instead.
+     */
+    @Deprecated
+    void allPlugins(Closure closure);
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginInstantiationException.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginInstantiationException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginInstantiationException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/plugins/PluginInstantiationException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/UnknownPluginException.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/UnknownPluginException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/UnknownPluginException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/plugins/UnknownPluginException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/plugins/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/plugins/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/AndSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/AndSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/AndSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/AndSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/CompositeSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/CompositeSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/CompositeSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/CompositeSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/NotSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/NotSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/NotSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/NotSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/OrSpec.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/OrSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/OrSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/OrSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/Spec.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/Spec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/Spec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/Spec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/Specs.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/Specs.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/Specs.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/Specs.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/specs/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/specs/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/specs/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/AbstractCopyTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/AbstractCopyTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/AbstractCopyTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/AbstractCopyTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/AntBuilderAware.groovy b/subprojects/core/src/main/groovy/org/gradle/api/tasks/AntBuilderAware.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/AntBuilderAware.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/AntBuilderAware.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/ConventionValue.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/ConventionValue.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/ConventionValue.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/ConventionValue.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Copy.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Copy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Copy.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Copy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Delete.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Delete.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Delete.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Delete.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Directory.groovy b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Directory.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Directory.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Directory.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Exec.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Exec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Exec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Exec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/GeneratorTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/GeneratorTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/GeneratorTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/GeneratorTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/GradleBuild.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/GradleBuild.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/GradleBuild.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/GradleBuild.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Input.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Input.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Input.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Input.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/InputDirectory.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/InputDirectory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/InputDirectory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/InputDirectory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/InputFile.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/InputFile.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/InputFile.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/InputFile.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/InputFiles.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/InputFiles.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/InputFiles.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/InputFiles.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/JavaExec.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/JavaExec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/JavaExec.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/JavaExec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Nested.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Nested.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Nested.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Nested.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Optional.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Optional.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Optional.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Optional.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/OutputDirectory.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/OutputDirectory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/OutputDirectory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/OutputDirectory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/OutputFile.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/OutputFile.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/OutputFile.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/OutputFile.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/SkipWhenEmpty.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/SkipWhenEmpty.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/SkipWhenEmpty.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/SkipWhenEmpty.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/SourceTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/SourceTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/SourceTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/SourceTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/StopActionException.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/StopActionException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/StopActionException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/StopActionException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/StopExecutionException.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/StopExecutionException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/StopExecutionException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/StopExecutionException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Sync.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Sync.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Sync.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Sync.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskAction.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskAction.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskAction.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskCollection.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskCollection.java
new file mode 100644
index 0000000..5c30130
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskCollection.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.tasks;
+
+import groovy.lang.Closure;
+import org.gradle.api.*;
+import org.gradle.api.specs.Spec;
+
+/**
+ * A {@code TaskCollection} contains a set of {@link Task} instances, and provides a number of query methods.
+ *
+ * @param <T> The type of tasks which this collection contains.
+ */
+public interface TaskCollection<T extends Task> extends NamedDomainObjectCollection<T> {
+
+    /**
+     * {@inheritDoc}
+     */
+    TaskCollection<T> matching(Spec<? super T> spec);
+
+    /**
+     * {@inheritDoc}
+     */
+    TaskCollection<T> matching(Closure closure);
+
+    /**
+     * {@inheritDoc}
+     */
+    T getByName(String name, Closure configureClosure) throws UnknownTaskException;
+
+    /**
+     * {@inheritDoc}
+     */
+    T getByName(String name) throws UnknownTaskException;
+
+    /**
+     * {@inheritDoc}
+     */
+    <S extends T> TaskCollection<S> withType(Class<S> type);
+
+    /**
+     * Adds an {@code Action} to be executed when a task is added to this collection.
+     *
+     * @param action The action to be executed
+     * @return the supplied action
+     */
+    Action<? super T> whenTaskAdded(Action<? super T> action);
+
+    /**
+     * Adds a closure to be called when a task is added to this collection. The task is passed to the closure as the
+     * parameter.
+     *
+     * @param closure The closure to be called
+     */
+    void whenTaskAdded(Closure closure);
+
+    /**
+     * Executes the given action against all tasks in this collection, and any tasks subsequently added to this
+     * collection.
+     *
+     * @param action The action to be executed
+     * @deprecated Use {@link #all(org.gradle.api.Action)} instead.
+     */
+    @Deprecated
+    void allTasks(Action<? super T> action);
+
+    /**
+     * Executes the given closure against all tasks in this collection, and any tasks subsequently added to this
+     * collection.
+     *
+     * @param closure The closure to be called
+     * @deprecated Use {@link #all(groovy.lang.Closure)} instead.
+     */
+    @Deprecated
+    void allTasks(Closure closure);
+
+    /**
+     * {@inheritDoc}
+     */
+    T getAt(String name) throws UnknownTaskException;
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskContainer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskContainer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskContainer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskDependency.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskDependency.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskDependency.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskDependency.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskExecutionException.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskExecutionException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskExecutionException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskExecutionException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskInputs.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskInputs.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskInputs.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskInputs.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskInstantiationException.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskInstantiationException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskInstantiationException.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskInstantiationException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskOutputs.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskOutputs.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskOutputs.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskOutputs.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskState.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskState.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskState.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/TaskState.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Upload.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/Upload.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/Upload.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/Upload.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/VerificationTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/VerificationTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/VerificationTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/VerificationTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/WorkResult.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/WorkResult.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/WorkResult.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/WorkResult.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/XmlGeneratorTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/XmlGeneratorTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/XmlGeneratorTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/XmlGeneratorTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/ant/AntTarget.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/ant/AntTarget.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/ant/AntTarget.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/ant/AntTarget.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/ant/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/ant/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/ant/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/ant/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/Compression.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/Compression.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/Compression.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/Compression.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/Tar.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/Tar.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/Tar.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/Tar.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/Zip.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/Zip.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/Zip.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/Zip.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/bundling/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/bundling/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/TaskReportTask.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/TaskReportTask.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/TaskReportTask.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/TaskReportTask.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModel.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModel.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModel.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModel.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModel.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModel.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModel.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModel.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DependencyReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DependencyReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DependencyReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/DependencyReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphvizReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphvizReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphvizReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/GraphvizReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/ReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/ReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/ReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/ReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModel.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModel.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModel.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModel.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetails.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetails.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetails.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetails.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactory.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportModel.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportModel.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportModel.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportModel.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRenderer.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/diagnostics/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/diagnostics/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/util/PatternFilterable.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/util/PatternFilterable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/util/PatternFilterable.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/util/PatternFilterable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/util/PatternSet.groovy b/subprojects/core/src/main/groovy/org/gradle/api/tasks/util/PatternSet.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/util/PatternSet.groovy
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/util/PatternSet.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/util/package-info.java b/subprojects/core/src/main/groovy/org/gradle/api/tasks/util/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/util/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/api/tasks/util/package-info.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/cache/AutoCloseCacheFactory.java b/subprojects/core/src/main/groovy/org/gradle/cache/AutoCloseCacheFactory.java
new file mode 100644
index 0000000..576ad67
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/cache/AutoCloseCacheFactory.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.cache;
+
+import org.gradle.CacheUsage;
+import org.gradle.util.GFileUtils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+public class AutoCloseCacheFactory implements CacheFactory {
+    private final CacheFactory cacheFactory;
+    private final Map<File, CacheInfo> openCaches = new HashMap<File, CacheInfo>();
+
+    public AutoCloseCacheFactory(CacheFactory cacheFactory) {
+        this.cacheFactory = cacheFactory;
+    }
+
+    public PersistentCache open(File cacheDir, CacheUsage usage, Map<String, ?> properties) {
+        File canonicalDir = GFileUtils.canonicalise(cacheDir);
+        CacheInfo cacheInfo = openCaches.get(canonicalDir);
+        if (cacheInfo == null) {
+            PersistentCache cache = cacheFactory.open(cacheDir, usage, properties);
+            cacheInfo = new CacheInfo(cache, properties);
+            openCaches.put(canonicalDir, cacheInfo);
+        } else {
+            if (!properties.equals(cacheInfo.properties)) {
+                throw new UnsupportedOperationException(String.format("Cache '%s' is already open with different state.", cacheDir));
+            }
+        }
+        cacheInfo.addReference();
+        return cacheInfo.cache;
+    }
+
+    public void close(PersistentCache cache) {
+        for (CacheInfo cacheInfo : openCaches.values()) {
+            if (cacheInfo.cache == cache) {
+                if (cacheInfo.removeReference()) {
+                    openCaches.values().remove(cacheInfo);
+                    cacheFactory.close(cacheInfo.cache);
+                }
+                return;
+            }
+        }
+        throw new IllegalArgumentException("Attempting to close unknown cache " + cache);
+    }
+
+    public void close() {
+        try {
+            for (CacheInfo cacheInfo : openCaches.values()) {
+                cacheFactory.close(cacheInfo.cache);
+            }
+        } finally {
+            openCaches.clear();
+        }
+    }
+
+    private static class CacheInfo {
+        int count;
+        final Map<String, ?> properties;
+        final PersistentCache cache;
+
+        private CacheInfo(PersistentCache cache, Map<String, ?> properties) {
+            this.cache = cache;
+            this.properties = new HashMap<String, Object>(properties);
+        }
+
+        public void addReference() {
+            count++;
+        }
+
+        public boolean removeReference() {
+            count--;
+            return count == 0;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/CacheBuilder.java b/subprojects/core/src/main/groovy/org/gradle/cache/CacheBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/CacheBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/CacheBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/CacheFactory.java b/subprojects/core/src/main/groovy/org/gradle/cache/CacheFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/CacheFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/CacheFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/CacheRepository.java b/subprojects/core/src/main/groovy/org/gradle/cache/CacheRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/CacheRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/CacheRepository.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultCacheFactory.java b/subprojects/core/src/main/groovy/org/gradle/cache/DefaultCacheFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultCacheFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/DefaultCacheFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultCacheRepository.java b/subprojects/core/src/main/groovy/org/gradle/cache/DefaultCacheRepository.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultCacheRepository.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/DefaultCacheRepository.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/cache/DefaultPersistentDirectoryCache.java b/subprojects/core/src/main/groovy/org/gradle/cache/DefaultPersistentDirectoryCache.java
new file mode 100644
index 0000000..03969aa
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/cache/DefaultPersistentDirectoryCache.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.cache;
+
+import org.gradle.CacheUsage;
+import org.gradle.cache.btree.BTreePersistentIndexedCache;
+import org.gradle.util.GFileUtils;
+import org.gradle.util.GUtil;
+
+import java.io.File;
+import java.util.Map;
+import java.util.Properties;
+
+public class DefaultPersistentDirectoryCache implements PersistentCache {
+    private final File dir;
+    private final File propertiesFile;
+    private final Properties properties = new Properties();
+    private boolean valid;
+    private BTreePersistentIndexedCache indexedCache;
+    private SimpleStateCache stateCache;
+
+    public DefaultPersistentDirectoryCache(File dir, CacheUsage cacheUsage, Map<String, ?> properties) {
+        this.dir = dir;
+        propertiesFile = new File(dir, "cache.properties");
+        this.properties.putAll(properties);
+        determineIfCacheIsValid(cacheUsage, properties);
+        buildCacheDir();
+    }
+
+    @Override
+    public String toString() {
+        return String.format("Cache %s", dir);
+    }
+
+    private void buildCacheDir() {
+        if (!valid) {
+            GFileUtils.deleteDirectory(dir);
+        }
+        if (!dir.isDirectory()) {
+            dir.mkdirs();
+        }
+    }
+
+    private void determineIfCacheIsValid(CacheUsage cacheUsage, Map<String, ?> properties) {
+        valid = false;
+
+        if (cacheUsage != CacheUsage.ON) {
+            return;
+        }
+
+        if (!propertiesFile.isFile()) {
+            return;
+        }
+
+        Properties currentProperties = GUtil.loadProperties(propertiesFile);
+        for (Map.Entry<String, ?> entry : properties.entrySet()) {
+            if (!entry.getValue().toString().equals(currentProperties.getProperty(entry.getKey()))) {
+                return;
+            }
+        }
+        valid = true;
+    }
+
+    public <K, V> BTreePersistentIndexedCache<K, V> openIndexedCache(Serializer<V> serializer) {
+        if (indexedCache == null) {
+            indexedCache = new BTreePersistentIndexedCache<K, V>(this, serializer);
+        }
+        return indexedCache;
+    }
+
+    public <K, V> BTreePersistentIndexedCache<K, V> openIndexedCache() {
+        return openIndexedCache(new DefaultSerializer<V>());
+    }
+
+    public <T> SimpleStateCache<T> openStateCache() {
+        if (stateCache == null) {
+            stateCache = new SimpleStateCache<T>(this, new DefaultSerializer<T>());
+        }
+        return stateCache;
+    }
+
+    public Properties getProperties() {
+        return properties;
+    }
+
+    public File getBaseDir() {
+        return dir;
+    }
+
+    public boolean isValid() {
+        return valid;
+    }
+
+    public void markValid() {
+        GUtil.saveProperties(properties, propertiesFile);
+        valid = true;
+    }
+
+    public void close() {
+        if (indexedCache != null) {
+            indexedCache.close();
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultSerializer.java b/subprojects/core/src/main/groovy/org/gradle/cache/DefaultSerializer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultSerializer.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/DefaultSerializer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/PersistentCache.java b/subprojects/core/src/main/groovy/org/gradle/cache/PersistentCache.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/PersistentCache.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/PersistentCache.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/PersistentIndexedCache.java b/subprojects/core/src/main/groovy/org/gradle/cache/PersistentIndexedCache.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/PersistentIndexedCache.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/PersistentIndexedCache.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/PersistentStateCache.java b/subprojects/core/src/main/groovy/org/gradle/cache/PersistentStateCache.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/PersistentStateCache.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/PersistentStateCache.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/Serializer.java b/subprojects/core/src/main/groovy/org/gradle/cache/Serializer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/Serializer.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/Serializer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/SimpleStateCache.java b/subprojects/core/src/main/groovy/org/gradle/cache/SimpleStateCache.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/SimpleStateCache.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/SimpleStateCache.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BTreePersistentIndexedCache.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/BTreePersistentIndexedCache.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BTreePersistentIndexedCache.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/BTreePersistentIndexedCache.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/Block.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/Block.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/Block.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/Block.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BlockPayload.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/BlockPayload.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BlockPayload.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/BlockPayload.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BlockPointer.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/BlockPointer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BlockPointer.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/BlockPointer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BlockStore.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/BlockStore.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/BlockStore.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/BlockStore.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/CachingBlockStore.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/CachingBlockStore.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/CachingBlockStore.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/CachingBlockStore.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/CorruptedCacheException.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/CorruptedCacheException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/CorruptedCacheException.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/CorruptedCacheException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/FileBackedBlockStore.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/FileBackedBlockStore.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/FileBackedBlockStore.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/FileBackedBlockStore.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/FreeListBlockStore.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/FreeListBlockStore.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/FreeListBlockStore.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/FreeListBlockStore.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/StateCheckBlockStore.java b/subprojects/core/src/main/groovy/org/gradle/cache/btree/StateCheckBlockStore.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/cache/btree/StateCheckBlockStore.java
rename to subprojects/core/src/main/groovy/org/gradle/cache/btree/StateCheckBlockStore.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/BuildConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/configuration/BuildConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/BuildConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/BuildConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/BuildScriptProcessor.java b/subprojects/core/src/main/groovy/org/gradle/configuration/BuildScriptProcessor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/BuildScriptProcessor.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/BuildScriptProcessor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultBuildConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/configuration/DefaultBuildConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultBuildConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/DefaultBuildConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultInitScriptProcessor.java b/subprojects/core/src/main/groovy/org/gradle/configuration/DefaultInitScriptProcessor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultInitScriptProcessor.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/DefaultInitScriptProcessor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultProjectEvaluator.java b/subprojects/core/src/main/groovy/org/gradle/configuration/DefaultProjectEvaluator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultProjectEvaluator.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/DefaultProjectEvaluator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultScriptPluginFactory.java b/subprojects/core/src/main/groovy/org/gradle/configuration/DefaultScriptPluginFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/DefaultScriptPluginFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/DefaultScriptPluginFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/GradleLauncherMetaData.java b/subprojects/core/src/main/groovy/org/gradle/configuration/GradleLauncherMetaData.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/GradleLauncherMetaData.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/GradleLauncherMetaData.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/Help.java b/subprojects/core/src/main/groovy/org/gradle/configuration/Help.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/Help.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/Help.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ImplicitTasksConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ImplicitTasksConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ImplicitTasksConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ImplicitTasksConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ImportsReader.groovy b/subprojects/core/src/main/groovy/org/gradle/configuration/ImportsReader.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ImportsReader.groovy
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ImportsReader.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ImportsScriptSource.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ImportsScriptSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ImportsScriptSource.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ImportsScriptSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/InitScriptProcessor.java b/subprojects/core/src/main/groovy/org/gradle/configuration/InitScriptProcessor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/InitScriptProcessor.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/InitScriptProcessor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ProjectDependencies2TaskResolver.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ProjectDependencies2TaskResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ProjectDependencies2TaskResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ProjectDependencies2TaskResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ProjectEvaluationConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ProjectEvaluationConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ProjectEvaluationConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ProjectEvaluationConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ProjectEvaluator.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ProjectEvaluator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ProjectEvaluator.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ProjectEvaluator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ScriptPlugin.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ScriptPlugin.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ScriptPlugin.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ScriptPlugin.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ScriptPluginFactory.java b/subprojects/core/src/main/groovy/org/gradle/configuration/ScriptPluginFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/configuration/ScriptPluginFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/configuration/ScriptPluginFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/BuildExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/BuildExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/BuildExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/BuildExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/DefaultBuildExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/DefaultBuildExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/DefaultBuildExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/DefaultBuildExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/DefaultTaskGraphExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/DefaultTaskGraphExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/DefaultTaskGraphExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/DefaultTaskGraphExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/DelegatingBuildExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/DelegatingBuildExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/DelegatingBuildExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/DelegatingBuildExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/DryRunBuildExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/DryRunBuildExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/DryRunBuildExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/DryRunBuildExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/ProjectDefaultsBuildExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/ProjectDefaultsBuildExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/ProjectDefaultsBuildExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/ProjectDefaultsBuildExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskGraphExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/TaskGraphExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskGraphExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/TaskGraphExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskNameResolver.java b/subprojects/core/src/main/groovy/org/gradle/execution/TaskNameResolver.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskNameResolver.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/TaskNameResolver.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskNameResolvingBuildExecuter.java b/subprojects/core/src/main/groovy/org/gradle/execution/TaskNameResolvingBuildExecuter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskNameResolvingBuildExecuter.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/TaskNameResolvingBuildExecuter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskSelectionException.java b/subprojects/core/src/main/groovy/org/gradle/execution/TaskSelectionException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskSelectionException.java
rename to subprojects/core/src/main/groovy/org/gradle/execution/TaskSelectionException.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/execution/TaskSelector.java b/subprojects/core/src/main/groovy/org/gradle/execution/TaskSelector.java
new file mode 100644
index 0000000..dc873f0
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/execution/TaskSelector.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.execution;
+
+import com.google.common.collect.SetMultimap;
+import org.apache.commons.lang.StringUtils;
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.util.NameMatcher;
+
+import java.util.Map;
+import java.util.Set;
+
+public class TaskSelector {
+    private final TaskNameResolver taskNameResolver;
+    private Set<Task> tasks;
+    private String taskName;
+
+    public TaskSelector() {
+        this(new TaskNameResolver());
+    }
+
+    public TaskSelector(TaskNameResolver taskNameResolver) {
+        this.taskNameResolver = taskNameResolver;
+    }
+
+    public void selectTasks(GradleInternal gradle, String path) {
+        SetMultimap<String, Task> tasksByName;
+        String baseName;
+        String prefix;
+
+        ProjectInternal project = gradle.getDefaultProject();
+
+        if (path.contains(Project.PATH_SEPARATOR)) {
+            String projectPath = StringUtils.substringBeforeLast(path, Project.PATH_SEPARATOR);
+            projectPath = projectPath.length() == 0 ? Project.PATH_SEPARATOR : projectPath;
+            project = findProject(project, projectPath);
+            baseName = StringUtils.substringAfterLast(path, Project.PATH_SEPARATOR);
+            prefix = project.getPath() + Project.PATH_SEPARATOR;
+
+            tasksByName = taskNameResolver.select(baseName, project);
+        } else {
+            baseName = path;
+            prefix = "";
+
+            tasksByName = taskNameResolver.selectAll(path, project);
+        }
+
+        Set<Task> tasks = tasksByName.get(baseName);
+        if (!tasks.isEmpty()) {
+            // An exact match
+            this.tasks = tasks;
+            this.taskName = path;
+            return;
+        }
+
+        NameMatcher matcher = new NameMatcher();
+        String actualName = matcher.find(baseName, tasksByName.keySet());
+
+        if (actualName != null) {
+            // A partial match
+            this.tasks = tasksByName.get(actualName);
+            this.taskName = prefix + actualName;
+            return;
+        }
+
+        throw new TaskSelectionException(matcher.formatErrorMessage("task", project));
+    }
+
+    public String getTaskName() {
+        return taskName;
+    }
+
+    public Set<Task> getTasks() {
+        return tasks;
+    }
+
+    private static ProjectInternal findProject(ProjectInternal startFrom, String path) {
+        if (path.equals(Project.PATH_SEPARATOR)) {
+            return startFrom.getRootProject();
+        }
+        Project current = startFrom;
+        if (path.startsWith(Project.PATH_SEPARATOR)) {
+            current = current.getRootProject();
+            path = path.substring(1);
+        }
+        for (String pattern : path.split(Project.PATH_SEPARATOR)) {
+            Map<String, Project> children = current.getChildProjects();
+
+            NameMatcher matcher = new NameMatcher();
+            Project child = matcher.find(pattern, children);
+            if (child != null) {
+                current = child;
+                continue;
+            }
+
+            throw new TaskSelectionException(matcher.formatErrorMessage("project", current));
+        }
+
+        return (ProjectInternal) current;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGenerator.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/BasicScript.groovy b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/BasicScript.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/BasicScript.groovy
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/BasicScript.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandler.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptSource.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptSource.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/CachingScriptSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScript.groovy b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScript.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScript.groovy
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScript.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandler.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactory.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactory.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DelegatingScriptSource.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DelegatingScriptSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/DelegatingScriptSource.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/DelegatingScriptSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/Script.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/Script.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/Script.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/Script.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptAware.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptAware.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptAware.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptAware.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilationHandler.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompiler.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompiler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompiler.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompiler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilerFactory.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptCompilerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptExecutionListener.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptExecutionListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptExecutionListener.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptExecutionListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptMetaData.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptMetaData.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptMetaData.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptMetaData.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunner.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunner.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunner.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunner.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunnerFactory.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunnerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunnerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptRunnerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptSource.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/ScriptSource.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/ScriptSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/StringScriptSource.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/StringScriptSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/StringScriptSource.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/StringScriptSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/Transformer.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/Transformer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/Transformer.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/Transformer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/UriScriptSource.java b/subprojects/core/src/main/groovy/org/gradle/groovy/scripts/UriScriptSource.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/groovy/scripts/UriScriptSource.java
rename to subprojects/core/src/main/groovy/org/gradle/groovy/scripts/UriScriptSource.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/AbstractCommandLineConverter.java b/subprojects/core/src/main/groovy/org/gradle/initialization/AbstractCommandLineConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/AbstractCommandLineConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/AbstractCommandLineConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/AbstractProjectSpec.java b/subprojects/core/src/main/groovy/org/gradle/initialization/AbstractProjectSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/AbstractProjectSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/AbstractProjectSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/AbstractSettingsFileSearchStrategyTemplate.java b/subprojects/core/src/main/groovy/org/gradle/initialization/AbstractSettingsFileSearchStrategyTemplate.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/AbstractSettingsFileSearchStrategyTemplate.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/AbstractSettingsFileSearchStrategyTemplate.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BaseSettings.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BaseSettings.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BaseSettings.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/BaseSettings.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildClientMetaData.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildClientMetaData.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildClientMetaData.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/BuildClientMetaData.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildFileProjectSpec.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildFileProjectSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildFileProjectSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/BuildFileProjectSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildLoader.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildLoader.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildLoader.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/BuildLoader.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildProgressLogger.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildProgressLogger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildProgressLogger.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/BuildProgressLogger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildRequestMetaData.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildRequestMetaData.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildRequestMetaData.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/BuildRequestMetaData.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/BuildSourceBuilder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildSourceBuilder.java
new file mode 100644
index 0000000..eb52f1d
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/BuildSourceBuilder.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.initialization;
+
+import org.apache.commons.io.IOUtils;
+import org.gradle.*;
+import org.gradle.api.Project;
+import org.gradle.api.UncheckedIOException;
+import org.gradle.api.internal.plugins.EmbeddableJavaProject;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.cache.CacheRepository;
+import org.gradle.cache.PersistentStateCache;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.gradle.groovy.scripts.StringScriptSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.*;
+
+/**
+ * @author Hans Dockter
+ */
+public class BuildSourceBuilder {
+    private static final Logger LOGGER = LoggerFactory.getLogger(BuildSourceBuilder.class);
+
+    private final GradleLauncherFactory gradleLauncherFactory;
+    private final ClassLoaderFactory classLoaderFactory;
+    private final CacheRepository cacheRepository;
+
+    private static final String DEFAULT_BUILD_SOURCE_SCRIPT_RESOURCE = "defaultBuildSourceScript.txt";
+
+    public BuildSourceBuilder(GradleLauncherFactory gradleLauncherFactory, ClassLoaderFactory classLoaderFactory, CacheRepository cacheRepository) {
+        this.gradleLauncherFactory = gradleLauncherFactory;
+        this.classLoaderFactory = classLoaderFactory;
+        this.cacheRepository = cacheRepository;
+    }
+
+    public URLClassLoader buildAndCreateClassLoader(StartParameter startParameter) {
+        Set<File> classpath = createBuildSourceClasspath(startParameter);
+        Iterator<File> classpathIterator = classpath.iterator();
+        URL[] urls = new URL[classpath.size()];
+        for (int i = 0; i < urls.length; i++) {
+            try {
+                urls[i] = classpathIterator.next().toURI().toURL();
+            } catch (MalformedURLException e) {
+                throw new UncheckedIOException(e);
+            }
+        }
+        return new URLClassLoader(urls, classLoaderFactory.getRootClassLoader());
+    }
+
+    public Set<File> createBuildSourceClasspath(StartParameter startParameter) {
+        assert startParameter.getCurrentDir() != null && startParameter.getBuildFile() == null;
+
+        LOGGER.debug("Starting to build the build sources.");
+        if (!startParameter.getCurrentDir().isDirectory()) {
+            LOGGER.debug("Gradle source dir does not exist. We leave.");
+            return new HashSet<File>();
+        }
+        LOGGER.info("================================================" + " Start building buildSrc");
+        StartParameter startParameterArg = startParameter.newInstance();
+        startParameterArg.setProjectProperties(startParameter.getProjectProperties());
+        startParameterArg.setSearchUpwards(false);
+        startParameterArg.setProfile(startParameter.isProfile());
+
+        // If we were not the most recent version of Gradle to build the buildSrc dir, then do a clean build
+        // Otherwise, just to a regular build
+        PersistentStateCache<Boolean> stateCache = cacheRepository.cache("buildSrc").forObject(startParameter.getCurrentDir()).invalidateOnVersionChange().open().openStateCache();
+        boolean rebuild = stateCache.get() == null;
+
+        if (!new File(startParameter.getCurrentDir(), Project.DEFAULT_BUILD_FILE).isFile()) {
+            LOGGER.debug("Gradle script file does not exist. Using default one.");
+            ScriptSource source = new StringScriptSource("default buildSrc build script", getDefaultScript());
+            startParameterArg.setBuildScriptSource(source);
+        }
+
+        GradleLauncher gradleLauncher = gradleLauncherFactory.newInstance(startParameterArg);
+        BuildSrcBuildListener listener = new BuildSrcBuildListener(rebuild);
+        gradleLauncher.addListener(listener);
+        gradleLauncher.run().rethrowFailure();
+
+        stateCache.set(true);
+
+        Set<File> buildSourceClasspath = new LinkedHashSet<File>();
+        buildSourceClasspath.addAll(listener.getRuntimeClasspath());
+        LOGGER.debug("Gradle source classpath is: {}", buildSourceClasspath);
+        LOGGER.info("================================================" + " Finished building buildSrc");
+
+        return buildSourceClasspath;
+    }
+
+    static String getDefaultScript() {
+        try {
+            return IOUtils.toString(BuildSourceBuilder.class.getResourceAsStream(DEFAULT_BUILD_SOURCE_SCRIPT_RESOURCE));
+        } catch (IOException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static class BuildSrcBuildListener extends BuildAdapter {
+        private EmbeddableJavaProject projectInfo;
+        private Set<File> classpath;
+        private final boolean rebuild;
+
+        public BuildSrcBuildListener(boolean rebuild) {
+            this.rebuild = rebuild;
+        }
+
+        @Override
+        public void projectsEvaluated(Gradle gradle) {
+            projectInfo = gradle.getRootProject().getConvention().getPlugin(EmbeddableJavaProject.class);
+            gradle.getStartParameter().setTaskNames(rebuild ? projectInfo.getRebuildTasks() : projectInfo.getBuildTasks());
+            classpath = projectInfo.getRuntimeClasspath().getFiles();
+        }
+
+        public Collection<File> getRuntimeClasspath() {
+            return classpath;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ClassLoaderFactory.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ClassLoaderFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ClassLoaderFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ClassLoaderFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/CommandLineConverter.java b/subprojects/core/src/main/groovy/org/gradle/initialization/CommandLineConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/CommandLineConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/CommandLineConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/CommandLineOption.java b/subprojects/core/src/main/groovy/org/gradle/initialization/CommandLineOption.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/CommandLineOption.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/CommandLineOption.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/CommandLineParser.java b/subprojects/core/src/main/groovy/org/gradle/initialization/CommandLineParser.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/CommandLineParser.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/CommandLineParser.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultBuildRequestMetaData.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultBuildRequestMetaData.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultBuildRequestMetaData.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultBuildRequestMetaData.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultClassLoaderFactory.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultClassLoaderFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultClassLoaderFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultClassLoaderFactory.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultCommandLineConverter.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultCommandLineConverter.java
new file mode 100644
index 0000000..3ba97d1
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultCommandLineConverter.java
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+import org.gradle.CacheUsage;
+import org.gradle.CommandLineArgumentException;
+import org.gradle.StartParameter;
+import org.gradle.api.InvalidUserDataException;
+import org.gradle.api.initialization.Settings;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.internal.file.BaseDirConverter;
+import org.gradle.api.internal.file.FileResolver;
+import org.gradle.configuration.ImplicitTasksConfigurer;
+import org.gradle.logging.LoggingConfiguration;
+import org.gradle.logging.internal.LoggingCommandLineConverter;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultCommandLineConverter extends AbstractCommandLineConverter<StartParameter> {
+    private static final String NO_SEARCH_UPWARDS = "u";
+    private static final String PROJECT_DIR = "p";
+    private static final String NO_PROJECT_DEPENDENCY_REBUILD = "a";
+    private static final String BUILD_FILE = "b";
+    public static final String INIT_SCRIPT = "I";
+    private static final String SETTINGS_FILE = "c";
+    private static final String TASKS = "t";
+    private static final String PROPERTIES = "r";
+    private static final String DEPENDENCIES = "n";
+    public static final String FULL_STACKTRACE = "S";
+    public static final String STACKTRACE = "s";
+    private static final String SYSTEM_PROP = "D";
+    private static final String PROJECT_PROP = "P";
+    public static final String GRADLE_USER_HOME = "g";
+    private static final String EMBEDDED_SCRIPT = "e";
+    private static final String CACHE = "C";
+    private static final String DRY_RUN = "m";
+    private static final String NO_OPT = "no-opt";
+    private static final String EXCLUDE_TASK = "x";
+    private static final String PROFILE = "profile";
+
+    private static BiMap<String, StartParameter.ShowStacktrace> showStacktraceMap = HashBiMap.create();
+    private final CommandLineConverter<LoggingConfiguration> loggingConfigurationCommandLineConverter = new LoggingCommandLineConverter();
+
+    //Initialize bi-directional maps so you can convert these back and forth from their command line options to their
+    //object representation.
+
+    static {
+        showStacktraceMap.put(FULL_STACKTRACE, StartParameter.ShowStacktrace.ALWAYS_FULL);
+        showStacktraceMap.put(STACKTRACE, StartParameter.ShowStacktrace.ALWAYS);
+        //showStacktraceMap.put( , StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS ); there is no command argument for this. Rather, the lack of an argument means 'default to this'.
+    }
+
+    public void configure(CommandLineParser parser) {
+        loggingConfigurationCommandLineConverter.configure(parser);
+        parser.allowMixedSubcommandsAndOptions();
+        parser.option(NO_SEARCH_UPWARDS, "no-search-upward").hasDescription(String.format("Don't search in parent folders for a %s file.", Settings.DEFAULT_SETTINGS_FILE));
+        parser.option(CACHE, "cache").hasArgument().hasDescription("Specifies how compiled build scripts should be cached. Possible values are: 'rebuild' and 'on'. Default value is 'on'");
+        parser.option(DRY_RUN, "dry-run").hasDescription("Runs the builds with all task actions disabled.");
+        parser.option(STACKTRACE, "stacktrace").hasDescription("Print out the stacktrace also for user exceptions (e.g. compile error).");
+        parser.option(FULL_STACKTRACE, "full-stacktrace").hasDescription("Print out the full (very verbose) stacktrace for any exceptions.");
+        parser.option(TASKS, "tasks").mapsToSubcommand(ImplicitTasksConfigurer.TASKS_TASK).hasDescription("Show list of available tasks [deprecated - use 'gradle tasks' instead].");
+        parser.option(PROPERTIES, "properties").mapsToSubcommand(ImplicitTasksConfigurer.PROPERTIES_TASK).hasDescription("Show list of all available project properties [deprecated - use 'gradle properties' instead].");
+        parser.option(DEPENDENCIES, "dependencies").mapsToSubcommand(ImplicitTasksConfigurer.DEPENDENCIES_TASK).hasDescription("Show list of all project dependencies [deprecated - use 'gradle dependencies' instead].");
+        parser.option(PROJECT_DIR, "project-dir").hasArgument().hasDescription("Specifies the start directory for Gradle. Defaults to current directory.");
+        parser.option(GRADLE_USER_HOME, "gradle-user-home").hasArgument().hasDescription("Specifies the gradle user home directory.");
+        parser.option(INIT_SCRIPT, "init-script").hasArguments().hasDescription("Specifies an initialization script.");
+        parser.option(SETTINGS_FILE, "settings-file").hasArgument().hasDescription("Specifies the settings file.");
+        parser.option(BUILD_FILE, "build-file").hasArgument().hasDescription("Specifies the build file.");
+        parser.option(SYSTEM_PROP, "system-prop").hasArguments().hasDescription("Set system property of the JVM (e.g. -Dmyprop=myvalue).");
+        parser.option(PROJECT_PROP, "project-prop").hasArguments().hasDescription("Set project property for the build script (e.g. -Pmyprop=myvalue).");
+        parser.option(EMBEDDED_SCRIPT, "embedded").hasArgument().hasDescription("Specify an embedded build script.");
+        parser.option(NO_PROJECT_DEPENDENCY_REBUILD, "no-rebuild").hasDescription("Do not rebuild project dependencies.");
+        parser.option(NO_OPT).hasDescription("Ignore any task optimization.");
+        parser.option(EXCLUDE_TASK, "exclude-task").hasArguments().hasDescription("Specify a task to be excluded from execution.");
+        parser.option(PROFILE).hasDescription("Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.");
+    }
+
+    @Override
+    protected StartParameter newInstance() {
+        return new StartParameter();
+    }
+
+    public StartParameter convert(ParsedCommandLine options, StartParameter startParameter) throws CommandLineArgumentException {
+        LoggingConfiguration loggingConfiguration = loggingConfigurationCommandLineConverter.convert(options);
+        startParameter.setLogLevel(loggingConfiguration.getLogLevel());
+        startParameter.setColorOutput(loggingConfiguration.isColorOutput());
+        FileResolver resolver = new BaseDirConverter(startParameter.getCurrentDir());
+
+        for (String keyValueExpression : options.option(SYSTEM_PROP).getValues()) {
+            String[] elements = keyValueExpression.split("=");
+            startParameter.getSystemPropertiesArgs().put(elements[0], elements.length == 1 ? "" : elements[1]);
+        }
+
+        for (String keyValueExpression : options.option(PROJECT_PROP).getValues()) {
+            String[] elements = keyValueExpression.split("=");
+            startParameter.getProjectProperties().put(elements[0], elements.length == 1 ? "" : elements[1]);
+        }
+
+        if (options.hasOption(NO_SEARCH_UPWARDS)) {
+            startParameter.setSearchUpwards(false);
+        }
+
+        if (options.hasOption(PROJECT_DIR)) {
+            startParameter.setProjectDir(resolver.resolve(options.option(PROJECT_DIR).getValue()));
+        }
+        if (options.hasOption(GRADLE_USER_HOME)) {
+            startParameter.setGradleUserHomeDir(resolver.resolve(options.option(GRADLE_USER_HOME).getValue()));
+        }
+        if (options.hasOption(BUILD_FILE)) {
+            startParameter.setBuildFile(resolver.resolve(options.option(BUILD_FILE).getValue()));
+        }
+        if (options.hasOption(SETTINGS_FILE)) {
+            startParameter.setSettingsFile(resolver.resolve(options.option(SETTINGS_FILE).getValue()));
+        }
+
+        for (String script : options.option(INIT_SCRIPT).getValues()) {
+            startParameter.addInitScript(resolver.resolve(script));
+        }
+
+        if (options.hasOption(CACHE)) {
+            try {
+                startParameter.setCacheUsage(CacheUsage.fromString(options.option(CACHE).getValue()));
+            } catch (InvalidUserDataException e) {
+                throw new CommandLineArgumentException(e.getMessage());
+            }
+        }
+
+        if (options.hasOption(EMBEDDED_SCRIPT)) {
+            if (options.hasOption(BUILD_FILE) || options.hasOption(NO_SEARCH_UPWARDS) || options.hasOption(SETTINGS_FILE)) {
+                System.err.println(String.format(
+                        "Error: The -%s option can't be used together with the -%s, -%s or -%s options.",
+                        EMBEDDED_SCRIPT, BUILD_FILE, SETTINGS_FILE, NO_SEARCH_UPWARDS));
+                throw new CommandLineArgumentException(String.format(
+                        "Error: The -%s option can't be used together with the -%s, -%s or -%s options.",
+                        EMBEDDED_SCRIPT, BUILD_FILE, SETTINGS_FILE, NO_SEARCH_UPWARDS));
+            }
+            startParameter.useEmbeddedBuildFile(options.option(EMBEDDED_SCRIPT).getValue());
+        }
+
+        if (options.hasOption(FULL_STACKTRACE)) {
+            if (options.hasOption(STACKTRACE)) {
+                throw new CommandLineArgumentException(String.format(
+                        "Error: The -%s option can't be used together with the -%s option.", FULL_STACKTRACE,
+                        STACKTRACE));
+            }
+            startParameter.setShowStacktrace(StartParameter.ShowStacktrace.ALWAYS_FULL);
+        } else if (options.hasOption(STACKTRACE)) {
+            startParameter.setShowStacktrace(StartParameter.ShowStacktrace.ALWAYS);
+        }
+
+        if (options.hasOption(NO_PROJECT_DEPENDENCY_REBUILD)) {
+            startParameter.setProjectDependenciesBuildInstruction(new ProjectDependenciesBuildInstruction(false));
+        }
+
+        if (!options.getExtraArguments().isEmpty()) {
+            startParameter.setTaskNames(options.getExtraArguments());
+        }
+
+        if (options.hasOption(DRY_RUN)) {
+            startParameter.setDryRun(true);
+        }
+
+        if (options.hasOption(NO_OPT)) {
+            startParameter.setNoOpt(true);
+        }
+
+        if (options.hasOption(EXCLUDE_TASK)) {
+            startParameter.setExcludedTaskNames(options.option(EXCLUDE_TASK).getValues());
+        }
+
+        if (options.hasOption(PROFILE)) {
+            startParameter.setProfile(true);
+        }
+
+        return startParameter;
+    }
+
+    /**
+     * This returns the stack trace level object represented by the command line argument
+     *
+     * @param commandLineArgument a single command line argument (with no '-')
+     * @return the corresponding stack trace level or null if it doesn't match any.
+     * @author mhunsicker
+     */
+    public StartParameter.ShowStacktrace getShowStacktrace(String commandLineArgument) {
+        StartParameter.ShowStacktrace showStacktrace = showStacktraceMap.get(commandLineArgument);
+        if (showStacktrace == null) {
+            return null;
+        }
+
+        return showStacktrace;
+    }
+
+    /**
+     * This returns the command line argument that represents the specified stack trace level.
+     *
+     * @param showStacktrace the stack trace level.
+     * @return the command line argument or null if this level cannot be represented on the command line.
+     * @author mhunsicker
+     */
+    public String getShowStacktraceCommandLine(StartParameter.ShowStacktrace showStacktrace) {
+        String commandLine = showStacktraceMap.inverse().get(showStacktrace);
+        if (commandLine == null) {
+            return null;
+        }
+
+        return commandLine;
+    }
+
+    /**
+     * This returns the ShowStacktrace levels that are supported on the command line.
+     *
+     * @return a collection of available ShowStacktrace levels
+     * @author mhunsicker
+     */
+    public Collection<StartParameter.ShowStacktrace> getShowStacktrace() {
+        return Collections.unmodifiableCollection(showStacktraceMap.values());
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultExceptionAnalyser.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultExceptionAnalyser.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultExceptionAnalyser.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultExceptionAnalyser.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncher.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncher.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncher.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncher.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncherFactory.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncherFactory.java
new file mode 100644
index 0000000..c11b6a2
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncherFactory.java
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.initialization;
+
+import org.gradle.*;
+import org.gradle.api.internal.ExceptionAnalyser;
+import org.gradle.api.internal.project.GlobalServicesRegistry;
+import org.gradle.api.internal.project.IProjectFactory;
+import org.gradle.api.internal.project.ServiceRegistry;
+import org.gradle.api.internal.project.TopLevelBuildServiceRegistry;
+import org.gradle.api.logging.Logging;
+import org.gradle.api.logging.StandardOutputListener;
+import org.gradle.cache.CacheRepository;
+import org.gradle.configuration.BuildConfigurer;
+import org.gradle.invocation.DefaultGradle;
+import org.gradle.listener.ListenerManager;
+import org.gradle.logging.LoggingManagerInternal;
+import org.gradle.logging.ProgressLoggerFactory;
+import org.gradle.logging.StyledTextOutputFactory;
+import org.gradle.profile.ProfileListener;
+import org.gradle.util.WrapUtil;
+
+import java.util.Arrays;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultGradleLauncherFactory implements GradleLauncherFactory {
+    private final ServiceRegistry sharedServices;
+    private final NestedBuildTracker tracker;
+    private CommandLineConverter<StartParameter> commandLineConverter;
+
+    public DefaultGradleLauncherFactory(ServiceRegistry loggingServices) {
+        this(new GlobalServicesRegistry(loggingServices));
+    }
+    
+    public DefaultGradleLauncherFactory() {
+        this(new GlobalServicesRegistry());
+    }
+
+    private DefaultGradleLauncherFactory(GlobalServicesRegistry globalServices) {
+        sharedServices = globalServices;
+
+        // Start logging system
+//        sharedServices.newInstance(LoggingManagerInternal.class).setLevel(LogLevel.LIFECYCLE).start();
+
+        commandLineConverter = sharedServices.get(CommandLineConverter.class);
+        tracker = new NestedBuildTracker();
+
+        // Register default loggers 
+        ListenerManager listenerManager = sharedServices.get(ListenerManager.class);
+        listenerManager.addListener(new BuildProgressLogger(sharedServices.get(ProgressLoggerFactory.class)));
+
+        GradleLauncher.injectCustomFactory(this);
+    }
+
+    public void addListener(Object listener) {
+        sharedServices.get(ListenerManager.class).addListener(listener);
+    }
+
+    public void removeListener(Object listener) {
+        sharedServices.get(ListenerManager.class).removeListener(listener);
+    }
+
+    public StartParameter createStartParameter(String... commandLineArgs) {
+        return commandLineConverter.convert(Arrays.asList(commandLineArgs));
+    }
+
+    public DefaultGradleLauncher newInstance(StartParameter startParameter) {
+        BuildRequestMetaData requestMetaData;
+        if (tracker.getCurrentBuild() != null) {
+            requestMetaData = new DefaultBuildRequestMetaData(tracker.getCurrentBuild().getServices().get(BuildClientMetaData.class), System.currentTimeMillis());
+        } else {
+            requestMetaData = new DefaultBuildRequestMetaData(System.currentTimeMillis());
+        }
+        return doNewInstance(startParameter, requestMetaData);
+    }
+
+    public DefaultGradleLauncher newInstance(StartParameter startParameter, BuildRequestMetaData requestMetaData) {
+        // This should only be used for top-level builds
+        assert tracker.getCurrentBuild() == null;
+        return doNewInstance(startParameter, requestMetaData);
+    }
+
+    private DefaultGradleLauncher doNewInstance(StartParameter startParameter, BuildRequestMetaData requestMetaData) {
+        TopLevelBuildServiceRegistry serviceRegistry = new TopLevelBuildServiceRegistry(sharedServices, startParameter);
+        serviceRegistry.add(BuildRequestMetaData.class, requestMetaData);
+        serviceRegistry.add(BuildClientMetaData.class, requestMetaData.getClient());
+        ListenerManager listenerManager = serviceRegistry.get(ListenerManager.class);
+        LoggingManagerInternal loggingManager = serviceRegistry.newInstance(LoggingManagerInternal.class);
+        loggingManager.setLevel(startParameter.getLogLevel());
+        loggingManager.colorStdOutAndStdErr(startParameter.isColorOutput());
+
+        //this hooks up the ListenerManager and LoggingConfigurer so you can call Gradle.addListener() with a StandardOutputListener.
+        loggingManager.addStandardOutputListener(listenerManager.getBroadcaster(StandardOutputListener.class));
+        loggingManager.addStandardErrorListener(listenerManager.getBroadcaster(StandardOutputListener.class));
+
+        listenerManager.useLogger(new TaskExecutionLogger(serviceRegistry.get(ProgressLoggerFactory.class)));
+        if (tracker.getCurrentBuild() == null) {
+            listenerManager.useLogger(new BuildLogger(Logging.getLogger(BuildLogger.class), serviceRegistry.get(StyledTextOutputFactory.class), startParameter, requestMetaData));
+        }
+        listenerManager.addListener(tracker);
+        listenerManager.addListener(new BuildCleanupListener(serviceRegistry));
+
+        if (startParameter.isProfile()) {
+            listenerManager.addListener(new ProfileListener(requestMetaData.getBuildTimeClock().getStartTime()));
+        }
+
+        DefaultGradle gradle = new DefaultGradle(
+                tracker.getCurrentBuild(),
+                startParameter, serviceRegistry);
+        return new DefaultGradleLauncher(
+                gradle,
+                serviceRegistry.get(InitScriptHandler.class),
+                new SettingsHandler(
+                        new EmbeddedScriptSettingsFinder(
+                                new DefaultSettingsFinder(WrapUtil.<ISettingsFileSearchStrategy>toList(
+                                        new MasterDirSettingsFinderStrategy(),
+                                        new ParentDirSettingsFinderStrategy()))),
+                        serviceRegistry.get(SettingsProcessor.class),
+                        new BuildSourceBuilder(
+                                this,
+                                serviceRegistry.get(ClassLoaderFactory.class),
+                                serviceRegistry.get(CacheRepository.class))),
+                new DefaultGradlePropertiesLoader(),
+                new BuildLoader(
+                        serviceRegistry.get(IProjectFactory.class)
+                ),
+                serviceRegistry.get(BuildConfigurer.class),
+                gradle.getBuildListenerBroadcaster(),
+                serviceRegistry.get(ExceptionAnalyser.class),
+                loggingManager);
+    }
+
+    public void setCommandLineConverter(
+            CommandLineConverter<StartParameter> commandLineConverter) {
+        this.commandLineConverter = commandLineConverter;
+    }
+
+    private static class BuildCleanupListener extends BuildAdapter {
+        private final TopLevelBuildServiceRegistry services;
+
+        private BuildCleanupListener(TopLevelBuildServiceRegistry services) {
+            this.services = services;
+        }
+
+        @Override
+        public void buildFinished(BuildResult result) {
+            services.close();
+        }
+    }
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradlePropertiesLoader.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradlePropertiesLoader.java
new file mode 100644
index 0000000..2dd11c3
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultGradlePropertiesLoader.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import org.gradle.StartParameter;
+import org.gradle.util.GUtil;
+import org.gradle.api.Project;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultGradlePropertiesLoader implements IGradlePropertiesLoader {
+    private static Logger logger = LoggerFactory.getLogger(DefaultGradlePropertiesLoader.class);
+
+    private Map<String, String> gradleProperties = new HashMap<String, String>();
+
+    public void loadProperties(File settingsDir, StartParameter startParameter) {
+        loadProperties(settingsDir, startParameter, getAllSystemProperties(), getAllEnvProperties());
+    }
+
+    void loadProperties(File settingsDir, StartParameter startParameter, Map<String, String> systemProperties, Map<String, String> envProperties) {
+        gradleProperties.clear();
+        addGradleProperties(new File(settingsDir, Project.GRADLE_PROPERTIES), new File(startParameter.getGradleUserHomeDir(), Project.GRADLE_PROPERTIES));
+        setSystemProperties(startParameter.getSystemPropertiesArgs());
+        gradleProperties.putAll(getEnvProjectProperties(envProperties));
+        gradleProperties.putAll(getSystemProjectProperties(systemProperties));
+        gradleProperties.putAll(startParameter.getProjectProperties());
+    }
+
+    Map getAllSystemProperties() {
+        return System.getProperties();
+    }
+
+    Map<String, String> getAllEnvProperties() {
+        // The reason why we have an try-catch block here is for JDK 1.4 compatibility. We use the retrotranslator to produce
+        // a 1.4 compatible version. But the retrotranslator is not capable of translating System.getenv to 1.4.
+        // The System.getenv call is only available in 1.5. In fact 1.4 does not offer any API to read
+        // environment variables. Therefore this call leads to an exception when used with 1.4. We ignore the exception in this
+        // case and simply return an empty hashmap.
+        try {
+            return System.getenv();
+        } catch (Throwable e) {
+            logger.debug("The System.getenv() call has lead to an exception. Probably you are running on Java 1.4.", e);
+            return Collections.emptyMap();
+        }
+    }
+
+    private void addGradleProperties(File... files) {
+        for (File propertyFile : files) {
+            if (propertyFile.isFile()) {
+                Properties properties = GUtil.loadProperties(propertyFile);
+                gradleProperties.putAll(new HashMap(properties));
+            }
+        }
+    }
+
+    public Map<String, String> getGradleProperties() {
+        return gradleProperties;
+    }
+
+    public void setGradleProperties(Map<String, String> gradleProperties) {
+        this.gradleProperties = gradleProperties;
+    }
+
+    private Map<String, String> getSystemProjectProperties(Map<String, String> systemProperties) {
+        Map<String, String> systemProjectProperties = new HashMap<String, String>();
+        for (Map.Entry<String, String> entry : systemProperties.entrySet()) {
+            if (entry.getKey().startsWith(SYSTEM_PROJECT_PROPERTIES_PREFIX) && entry.getKey().length() > SYSTEM_PROJECT_PROPERTIES_PREFIX.length()) {
+                systemProjectProperties.put(entry.getKey().substring(SYSTEM_PROJECT_PROPERTIES_PREFIX.length()), entry.getValue());
+            }
+        }
+        logger.debug("Found system project properties: {}", systemProjectProperties.keySet());
+        return systemProjectProperties;
+    }
+
+    private Map<String, String> getEnvProjectProperties(Map<String, String> envProperties) {
+        Map<String, String> envProjectProperties = new HashMap<String, String>();
+        for (Map.Entry<String, String> entry : envProperties.entrySet()) {
+            if (entry.getKey().startsWith(ENV_PROJECT_PROPERTIES_PREFIX) && entry.getKey().length() > ENV_PROJECT_PROPERTIES_PREFIX.length()) {
+                envProjectProperties.put(entry.getKey().substring(ENV_PROJECT_PROPERTIES_PREFIX.length()), entry.getValue());
+            }
+        }
+        logger.debug("Found env project properties: {}", envProjectProperties.keySet());
+        return envProjectProperties;
+    }
+
+    private void setSystemProperties(Map<String, String> properties) {
+        System.getProperties().putAll(properties);
+        addSystemPropertiesFromGradleProperties();
+    }
+
+    private void addSystemPropertiesFromGradleProperties() {
+        for (String key : gradleProperties.keySet()) {
+            if (key.startsWith(Project.SYSTEM_PROP_PREFIX + '.')) {
+                System.setProperty(key.substring((Project.SYSTEM_PROP_PREFIX + '.').length()), gradleProperties.get(key));
+            }
+        }
+    }
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultInitScriptFinder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultInitScriptFinder.java
new file mode 100644
index 0000000..c926551
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultInitScriptFinder.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.initialization;
+
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.gradle.groovy.scripts.UriScriptSource;
+
+import java.io.File;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Simple finder that "finds" all the init scripts that were explicitly added to the start parameters.
+ */
+public class DefaultInitScriptFinder implements InitScriptFinder {
+    public List<ScriptSource> findScripts(GradleInternal gradle) {
+        List<File> scriptFiles = gradle.getStartParameter().getInitScripts();
+        List<ScriptSource> scripts = new ArrayList<ScriptSource>(scriptFiles.size());
+        for (File file : scriptFiles) {
+            scripts.add(new UriScriptSource("initialization script", file));
+        }
+
+        return scripts;
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptor.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptor.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistry.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultProjectSpec.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultProjectSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultProjectSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultProjectSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultSettings.groovy b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultSettings.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultSettings.groovy
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultSettings.groovy
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultSettingsFinder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/DefaultSettingsFinder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultSettingsFinder.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/DefaultSettingsFinder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinder.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ExceptionDecoratingClassGenerator.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ExceptionDecoratingClassGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ExceptionDecoratingClassGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ExceptionDecoratingClassGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/GradleLauncherFactory.java b/subprojects/core/src/main/groovy/org/gradle/initialization/GradleLauncherFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/GradleLauncherFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/GradleLauncherFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/IGradlePropertiesLoader.java b/subprojects/core/src/main/groovy/org/gradle/initialization/IGradlePropertiesLoader.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/IGradlePropertiesLoader.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/IGradlePropertiesLoader.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/IProjectDescriptorRegistry.java b/subprojects/core/src/main/groovy/org/gradle/initialization/IProjectDescriptorRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/IProjectDescriptorRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/IProjectDescriptorRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ISettingsFileSearchStrategy.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ISettingsFileSearchStrategy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ISettingsFileSearchStrategy.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ISettingsFileSearchStrategy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ISettingsFinder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ISettingsFinder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ISettingsFinder.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ISettingsFinder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScript.groovy b/subprojects/core/src/main/groovy/org/gradle/initialization/InitScript.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScript.groovy
rename to subprojects/core/src/main/groovy/org/gradle/initialization/InitScript.groovy
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/InitScriptFinder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/InitScriptFinder.java
new file mode 100644
index 0000000..806f11e
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/InitScriptFinder.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.groovy.scripts.ScriptSource;
+
+import java.util.List;
+
+/**
+ * Interface for objects that can find init scripts for a given build.
+ */
+public interface InitScriptFinder {
+    public List<ScriptSource> findScripts(GradleInternal gradle);
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/InitScriptHandler.java b/subprojects/core/src/main/groovy/org/gradle/initialization/InitScriptHandler.java
new file mode 100644
index 0000000..1f6e606
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/InitScriptHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.gradle.configuration.InitScriptProcessor;
+
+import java.util.List;
+
+/**
+ * Finds and executes all init scripts for a given build.
+ */
+public class InitScriptHandler {
+    private final InitScriptFinder finder;
+    private final InitScriptProcessor processor;
+
+    public InitScriptHandler(InitScriptFinder finder, InitScriptProcessor processor) {
+        this.finder = finder;
+        this.processor = processor;
+    }
+
+    public void executeScripts(GradleInternal gradle) {
+        List<ScriptSource> scriptSources = finder.findScripts(gradle);
+        for (ScriptSource source : scriptSources) {
+            processor.process(source, gradle);
+        }
+    }
+}
+
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategy.java b/subprojects/core/src/main/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategy.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/NestedBuildTracker.java b/subprojects/core/src/main/groovy/org/gradle/initialization/NestedBuildTracker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/NestedBuildTracker.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/NestedBuildTracker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategy.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategy.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ParsedCommandLine.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ParsedCommandLine.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ParsedCommandLine.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ParsedCommandLine.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ParsedCommandLineOption.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ParsedCommandLineOption.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ParsedCommandLineOption.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ParsedCommandLineOption.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ProjectDirectoryProjectSpec.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ProjectDirectoryProjectSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ProjectDirectoryProjectSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ProjectDirectoryProjectSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ProjectSpec.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ProjectSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ProjectSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ProjectSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessor.java b/subprojects/core/src/main/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessor.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategy.java b/subprojects/core/src/main/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategy.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessor.java b/subprojects/core/src/main/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessor.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsFactory.java b/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/SettingsFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsHandler.java b/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/SettingsHandler.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsLocation.java b/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsLocation.java
new file mode 100644
index 0000000..70e001a
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsLocation.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import org.gradle.groovy.scripts.ScriptSource;
+
+import java.io.File;
+
+public class SettingsLocation {
+    private File settingsDir;
+    private ScriptSource settingsScriptSource;
+
+    public SettingsLocation(File settingsDir, ScriptSource settingsScriptSource) {
+        this.settingsDir = settingsDir;
+        this.settingsScriptSource = settingsScriptSource;
+    }
+
+    public File getSettingsDir() {
+        return settingsDir;
+    }
+
+    public ScriptSource getSettingsScriptSource() {
+        return settingsScriptSource;
+    }
+}
+
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsProcessor.java b/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsProcessor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsProcessor.java
rename to subprojects/core/src/main/groovy/org/gradle/initialization/SettingsProcessor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsScript.groovy b/subprojects/core/src/main/groovy/org/gradle/initialization/SettingsScript.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsScript.groovy
rename to subprojects/core/src/main/groovy/org/gradle/initialization/SettingsScript.groovy
diff --git a/subprojects/core/src/main/groovy/org/gradle/initialization/UserHomeInitScriptFinder.java b/subprojects/core/src/main/groovy/org/gradle/initialization/UserHomeInitScriptFinder.java
new file mode 100644
index 0000000..8be4ff4
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/initialization/UserHomeInitScriptFinder.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.gradle.groovy.scripts.UriScriptSource;
+
+import java.io.File;
+import java.util.List;
+
+public class UserHomeInitScriptFinder implements InitScriptFinder {
+    public static final String DEFAULT_INIT_SCRIPT_NAME = "init.gradle";
+
+    private final InitScriptFinder finder;
+
+    public UserHomeInitScriptFinder(InitScriptFinder finder) {
+        this.finder = finder;
+    }
+
+    public List<ScriptSource> findScripts(GradleInternal gradle) {
+        List<ScriptSource> scripts = finder.findScripts(gradle);
+
+        File userHomeDir = gradle.getStartParameter().getGradleUserHomeDir();
+        File userInitScript = new File(userHomeDir, DEFAULT_INIT_SCRIPT_NAME);
+        if (userInitScript.isFile()) {
+            scripts.add(new UriScriptSource("initialization script", userInitScript));
+        }
+
+        return scripts;
+    }
+}
+
diff --git a/subprojects/core/src/main/groovy/org/gradle/invocation/DefaultGradle.java b/subprojects/core/src/main/groovy/org/gradle/invocation/DefaultGradle.java
new file mode 100644
index 0000000..669af4f
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/invocation/DefaultGradle.java
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.invocation;
+
+import groovy.lang.Closure;
+import org.gradle.BuildListener;
+import org.gradle.StartParameter;
+import org.gradle.api.ProjectEvaluationListener;
+import org.gradle.api.internal.GradleDistributionLocator;
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.api.internal.project.IProjectRegistry;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.internal.project.ServiceRegistryFactory;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.execution.TaskGraphExecuter;
+import org.gradle.listener.ListenerManager;
+import org.gradle.util.GradleVersion;
+import org.gradle.util.MultiParentClassLoader;
+
+import java.io.File;
+
+public class DefaultGradle implements GradleInternal {
+    private ProjectInternal rootProject;
+    private ProjectInternal defaultProject;
+    private TaskGraphExecuter taskGraph;
+    private final Gradle parent;
+    private StartParameter startParameter;
+    private MultiParentClassLoader scriptClassLoader;
+    private IProjectRegistry<ProjectInternal> projectRegistry;
+    private final ListenerManager listenerManager;
+    private final ServiceRegistryFactory services;
+    private final GradleDistributionLocator distributionLocator;
+
+    public DefaultGradle(Gradle parent, StartParameter startParameter, ServiceRegistryFactory parentRegistry) {
+        this.parent = parent;
+        this.startParameter = startParameter;
+        this.services = parentRegistry.createFor(this);
+        this.listenerManager = services.get(ListenerManager.class);
+        projectRegistry = services.get(IProjectRegistry.class);
+        taskGraph = services.get(TaskGraphExecuter.class);
+        scriptClassLoader = services.get(MultiParentClassLoader.class);
+        distributionLocator = services.get(GradleDistributionLocator.class);
+    }
+
+    @Override
+    public String toString() {
+        return rootProject == null ? "build" : String.format("build '%s'", rootProject.getName());
+    }
+
+    public Gradle getParent() {
+        return parent;
+    }
+
+    public String getGradleVersion() {
+        return new GradleVersion().getVersion();
+    }
+
+    public File getGradleHomeDir() {
+        return distributionLocator.getGradleHome();
+    }
+
+    public File getGradleUserHomeDir() {
+        return startParameter.getGradleUserHomeDir();
+    }
+
+    public StartParameter getStartParameter() {
+        return startParameter;
+    }
+
+    public ProjectInternal getRootProject() {
+        return rootProject;
+    }
+
+    public void setRootProject(ProjectInternal rootProject) {
+        this.rootProject = rootProject;
+    }
+
+    public ProjectInternal getDefaultProject() {
+        return defaultProject;
+    }
+
+    public void setDefaultProject(ProjectInternal defaultProject) {
+        this.defaultProject = defaultProject;
+    }
+
+    public TaskGraphExecuter getTaskGraph() {
+        return taskGraph;
+    }
+
+    public void setTaskGraph(TaskGraphExecuter taskGraph) {
+        this.taskGraph = taskGraph;
+    }
+
+    public IProjectRegistry<ProjectInternal> getProjectRegistry() {
+        return projectRegistry;
+    }
+
+    public MultiParentClassLoader getScriptClassLoader() {
+        return scriptClassLoader;
+    }
+
+    public ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener) {
+        addListener(listener);
+        return listener;
+    }
+
+    public void removeProjectEvaluationListener(ProjectEvaluationListener listener) {
+        removeListener(listener);
+    }
+
+    public void beforeProject(Closure closure) {
+        listenerManager.addListener(ProjectEvaluationListener.class, "beforeEvaluate", closure);
+    }
+
+    public void afterProject(Closure closure) {
+        listenerManager.addListener(ProjectEvaluationListener.class, "afterEvaluate", closure);
+    }
+
+    public void buildStarted(Closure closure) {
+        listenerManager.addListener(BuildListener.class, "buildStarted", closure);
+    }
+
+    public void settingsEvaluated(Closure closure) {
+        listenerManager.addListener(BuildListener.class, "settingsEvaluated", closure);
+    }
+
+    public void projectsLoaded(Closure closure) {
+        listenerManager.addListener(BuildListener.class, "projectsLoaded", closure);
+    }
+
+    public void projectsEvaluated(Closure closure) {
+        listenerManager.addListener(BuildListener.class, "projectsEvaluated", closure);
+    }
+
+    public void buildFinished(Closure closure) {
+        listenerManager.addListener(BuildListener.class, "buildFinished", closure);
+    }
+
+    public void addListener(Object listener) {
+        listenerManager.addListener(listener);
+    }
+
+    public void removeListener(Object listener) {
+        listenerManager.removeListener(listener);
+    }
+
+    public void useLogger(Object logger) {
+        listenerManager.useLogger(logger);
+    }
+
+    public ProjectEvaluationListener getProjectEvaluationBroadcaster() {
+        return listenerManager.getBroadcaster(ProjectEvaluationListener.class);
+    }
+
+    public void addBuildListener(BuildListener buildListener) {
+        addListener(buildListener);
+    }
+
+    public BuildListener getBuildListenerBroadcaster() {
+        return listenerManager.getBroadcaster(BuildListener.class);
+    }
+
+    public Gradle getGradle() {
+        return this;
+    }
+
+    public ServiceRegistryFactory getServices() {
+        return services;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/ActionBroadcast.java b/subprojects/core/src/main/groovy/org/gradle/listener/ActionBroadcast.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/ActionBroadcast.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/ActionBroadcast.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/AsyncListenerBroadcast.java b/subprojects/core/src/main/groovy/org/gradle/listener/AsyncListenerBroadcast.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/AsyncListenerBroadcast.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/AsyncListenerBroadcast.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/ContextClassLoaderProxy.java b/subprojects/core/src/main/groovy/org/gradle/listener/ContextClassLoaderProxy.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/ContextClassLoaderProxy.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/ContextClassLoaderProxy.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/DefaultListenerManager.java b/subprojects/core/src/main/groovy/org/gradle/listener/DefaultListenerManager.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/DefaultListenerManager.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/DefaultListenerManager.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/ListenerBroadcast.java b/subprojects/core/src/main/groovy/org/gradle/listener/ListenerBroadcast.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/ListenerBroadcast.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/ListenerBroadcast.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/ListenerManager.java b/subprojects/core/src/main/groovy/org/gradle/listener/ListenerManager.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/ListenerManager.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/ListenerManager.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/listener/ListenerNotificationException.java b/subprojects/core/src/main/groovy/org/gradle/listener/ListenerNotificationException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/listener/ListenerNotificationException.java
rename to subprojects/core/src/main/groovy/org/gradle/listener/ListenerNotificationException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/LoggingConfiguration.java b/subprojects/core/src/main/groovy/org/gradle/logging/LoggingConfiguration.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/LoggingConfiguration.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/LoggingConfiguration.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/LoggingManagerInternal.java b/subprojects/core/src/main/groovy/org/gradle/logging/LoggingManagerInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/LoggingManagerInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/LoggingManagerInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/LoggingServiceRegistry.java b/subprojects/core/src/main/groovy/org/gradle/logging/LoggingServiceRegistry.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/LoggingServiceRegistry.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/LoggingServiceRegistry.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/ProgressLogger.java b/subprojects/core/src/main/groovy/org/gradle/logging/ProgressLogger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/ProgressLogger.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/ProgressLogger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/ProgressLoggerFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/ProgressLoggerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/ProgressLoggerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/ProgressLoggerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/StandardOutputCapture.java b/subprojects/core/src/main/groovy/org/gradle/logging/StandardOutputCapture.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/StandardOutputCapture.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/StandardOutputCapture.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/StandardOutputRedirector.java b/subprojects/core/src/main/groovy/org/gradle/logging/StandardOutputRedirector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/StandardOutputRedirector.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/StandardOutputRedirector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/StyledTextOutput.java b/subprojects/core/src/main/groovy/org/gradle/logging/StyledTextOutput.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/StyledTextOutput.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/StyledTextOutput.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/StyledTextOutputFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/StyledTextOutputFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/StyledTextOutputFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/StyledTextOutputFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutput.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutput.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutput.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutput.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutputFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutputFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutputFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/AbstractStyledTextOutputFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/AnsiConsole.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/AnsiConsole.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/AnsiConsole.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/AnsiConsole.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/CategorisedOutputEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/CategorisedOutputEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/CategorisedOutputEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/CategorisedOutputEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ColorMap.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ColorMap.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ColorMap.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ColorMap.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/Console.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/Console.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/Console.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/Console.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ConsoleBackedProgressRenderer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ConsoleBackedProgressRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ConsoleBackedProgressRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ConsoleBackedProgressRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultColorMap.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultColorMap.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultColorMap.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultColorMap.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManager.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManager.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManager.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManager.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManagerFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManagerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManagerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultLoggingManagerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirector.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirector.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultStyledTextOutputFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultStyledTextOutputFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/DefaultStyledTextOutputFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/DefaultStyledTextOutputFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/Label.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/Label.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/Label.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/Label.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LogEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LogEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LogEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LogEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LogLevelChangeEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LogLevelChangeEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LogLevelChangeEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LogLevelChangeEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutput.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutput.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutput.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutput.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingCommandLineConverter.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingCommandLineConverter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingCommandLineConverter.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingCommandLineConverter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingOutputInternal.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingOutputInternal.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingOutputInternal.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingOutputInternal.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingSystem.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingSystem.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingSystem.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingSystem.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingSystemAdapter.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingSystemAdapter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/LoggingSystemAdapter.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/LoggingSystemAdapter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/MarkerFilter.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/MarkerFilter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/MarkerFilter.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/MarkerFilter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/OutputEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/OutputEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/OutputEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/OutputEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/OutputEventListener.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/OutputEventListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/OutputEventListener.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/OutputEventListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/OutputEventRenderer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/OutputEventRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/OutputEventRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/OutputEventRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/PrintStreamLoggingSystem.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/PrintStreamLoggingSystem.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/PrintStreamLoggingSystem.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/PrintStreamLoggingSystem.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressCompleteEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressCompleteEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressCompleteEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressCompleteEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressListener.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressListener.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressLogEventGenerator.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressLogEventGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressLogEventGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressLogEventGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressLoggingBridge.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressLoggingBridge.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressLoggingBridge.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressLoggingBridge.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressStartEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressStartEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/ProgressStartEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/ProgressStartEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/RenderableOutputEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/RenderableOutputEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/RenderableOutputEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/RenderableOutputEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StdErrLoggingSystem.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/StdErrLoggingSystem.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StdErrLoggingSystem.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/StdErrLoggingSystem.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StdOutLoggingSystem.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/StdOutLoggingSystem.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StdOutLoggingSystem.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/StdOutLoggingSystem.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutput.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutput.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutput.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutput.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutputFactory.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutputFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutputFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/StreamingStyledTextOutputFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputBackedRenderer.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputBackedRenderer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputBackedRenderer.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputBackedRenderer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputEvent.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/StyledTextOutputEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/TerminalDetector.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/TerminalDetector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/TerminalDetector.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/TerminalDetector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/TextArea.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/TextArea.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/TextArea.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/TextArea.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/TextStreamOutputEventListener.java b/subprojects/core/src/main/groovy/org/gradle/logging/internal/TextStreamOutputEventListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/logging/internal/TextStreamOutputEventListener.java
rename to subprojects/core/src/main/groovy/org/gradle/logging/internal/TextStreamOutputEventListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/actor/Actor.java b/subprojects/core/src/main/groovy/org/gradle/messaging/actor/Actor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/actor/Actor.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/actor/Actor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/actor/ActorFactory.java b/subprojects/core/src/main/groovy/org/gradle/messaging/actor/ActorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/actor/ActorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/actor/ActorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/actor/internal/DefaultActorFactory.java b/subprojects/core/src/main/groovy/org/gradle/messaging/actor/internal/DefaultActorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/actor/internal/DefaultActorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/actor/internal/DefaultActorFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/AsyncStoppable.java b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/AsyncStoppable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/AsyncStoppable.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/AsyncStoppable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/CompositeStoppable.java b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/CompositeStoppable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/CompositeStoppable.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/CompositeStoppable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactory.java b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactory.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/ExecutorFactory.java b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/ExecutorFactory.java
new file mode 100644
index 0000000..0cead7b
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/ExecutorFactory.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.messaging.concurrent;
+
+public interface ExecutorFactory {
+    /**
+     * Creates an executor which can run multiple tasks concurrently. It is the caller's responsibility to stop the executor.
+     *
+     * @param displayName The display name for the this executor. Used for thread names, logging and error message.
+     * @return The executor.
+     */
+    StoppableExecutor create(String displayName);
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/Stoppable.java b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/Stoppable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/Stoppable.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/Stoppable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/StoppableExecutor.java b/subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/StoppableExecutor.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/StoppableExecutor.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/concurrent/StoppableExecutor.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/Addressable.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/Addressable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/Addressable.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/Addressable.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/AsyncDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/AsyncDispatch.java
new file mode 100644
index 0000000..53cf82b
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/AsyncDispatch.java
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.messaging.dispatch;
+
+import org.gradle.messaging.concurrent.AsyncStoppable;
+import org.gradle.util.UncheckedException;
+
+import java.util.LinkedList;
+import java.util.concurrent.Executor;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * <p>A {@link org.gradle.messaging.dispatch.Dispatch} implementation which delivers messages asynchronously. Calls to
+ * {@link #dispatch} queue the message. Worker threads delivers the messages in the order they have been received to one
+ * of a pool of delegate {@link org.gradle.messaging.dispatch.Dispatch} instances.</p>
+ */
+public class AsyncDispatch<T> implements StoppableDispatch<T>, AsyncStoppable {
+    private enum State {
+        Init, Stopped
+    }
+
+    private static final int MAX_QUEUE_SIZE = 200;
+    private final Lock lock = new ReentrantLock();
+    private final Condition condition = lock.newCondition();
+    private final LinkedList<T> queue = new LinkedList<T>();
+    private final Executor executor;
+    private final int maxQueueSize;
+    private int dispatchers;
+    private State state;
+
+    public AsyncDispatch(Executor executor) {
+        this(executor, null, MAX_QUEUE_SIZE);
+    }
+
+    public AsyncDispatch(Executor executor, final Dispatch<? super T> dispatch) {
+        this(executor, dispatch, MAX_QUEUE_SIZE);
+    }
+
+    public AsyncDispatch(Executor executor, final Dispatch<? super T> dispatch, int maxQueueSize) {
+        this.executor = executor;
+        this.maxQueueSize = maxQueueSize;
+        state = State.Init;
+        if (dispatch != null) {
+            dispatchTo(dispatch);
+        }
+    }
+
+    public void dispatchTo(final Dispatch<? super T> dispatch) {
+        onDispatchThreadStart();
+        executor.execute(new Runnable() {
+            public void run() {
+                try {
+                    dispatchMessages(dispatch);
+                } finally {
+                    onDispatchThreadExit();
+                }
+            }
+        });
+    }
+
+    private void onDispatchThreadStart() {
+        lock.lock();
+        try {
+            if (state != State.Init) {
+                throw new IllegalStateException("This dispatch has been stopped.");
+            }
+            dispatchers++;
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    private void onDispatchThreadExit() {
+        lock.lock();
+        try {
+            dispatchers--;
+            condition.signalAll();
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    private void setState(State state) {
+        this.state = state;
+        condition.signalAll();
+    }
+
+    private void dispatchMessages(Dispatch<? super T> dispatch) {
+        while (true) {
+            T message = null;
+            lock.lock();
+            try {
+                while (state != State.Stopped && queue.isEmpty()) {
+                    try {
+                        condition.await();
+                    } catch (InterruptedException e) {
+                        throw new UncheckedException(e);
+                    }
+                }
+                if (!queue.isEmpty()) {
+                    message = queue.remove();
+                    condition.signalAll();
+                }
+            } finally {
+                lock.unlock();
+            }
+
+            if (message == null) {
+                // Have been stopped and nothing to deliver
+                return;
+            }
+
+            dispatch.dispatch(message);
+        }
+    }
+
+    public void dispatch(final T message) {
+        lock.lock();
+        try {
+            while (state != State.Stopped && queue.size() >= maxQueueSize) {
+                try {
+                    condition.await();
+                } catch (InterruptedException e) {
+                    throw new UncheckedException(e);
+                }
+            }
+            if (state == State.Stopped) {
+                throw new IllegalStateException("This message dispatch has been stopped.");
+            }
+            queue.add(message);
+            condition.signalAll();
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    /**
+     * Commences a shutdown of this dispatch.
+     */
+    public void requestStop() {
+        lock.lock();
+        try {
+            doRequestStop();
+        } finally {
+            lock.unlock();
+        }
+    }
+
+    private void doRequestStop() {
+        setState(State.Stopped);
+    }
+
+    public void stop() {
+        lock.lock();
+        try {
+            setState(State.Stopped);
+            while (dispatchers > 0) {
+                condition.await();
+            }
+
+            if (!queue.isEmpty()) {
+                throw new IllegalStateException(
+                        "Cannot wait for messages to be dispatched, as there are no dispatch threads running.");
+            }
+        } catch (InterruptedException e) {
+            throw new UncheckedException(e);
+        } finally {
+            lock.unlock();
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/AsyncReceive.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/AsyncReceive.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/AsyncReceive.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/AsyncReceive.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/BroadcastDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/BroadcastDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/BroadcastDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/BroadcastDispatch.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatch.java
new file mode 100644
index 0000000..af1525b
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatch.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.messaging.dispatch;
+
+public class ContextClassLoaderDispatch<T> implements Dispatch<T> {
+    private final Dispatch<? super T> dispatch;
+    private final ClassLoader contextClassLoader;
+
+    public ContextClassLoaderDispatch(Dispatch<? super T> dispatch, ClassLoader contextClassLoader) {
+        this.dispatch = dispatch;
+        this.contextClassLoader = contextClassLoader;
+    }
+
+    public void dispatch(T message) {
+        ClassLoader original = Thread.currentThread().getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(contextClassLoader);
+        try {
+            dispatch.dispatch(message);
+        } finally {
+            Thread.currentThread().setContextClassLoader(original);
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/DiscardOnFailureDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/DiscardOnFailureDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/DiscardOnFailureDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/DiscardOnFailureDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/Dispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/Dispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/Dispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/Dispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/DispatchException.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/DispatchException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/DispatchException.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/DispatchException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListener.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListener.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/MethodInvocation.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/MethodInvocation.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/MethodInvocation.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/MethodInvocation.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapter.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapter.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/Receive.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/Receive.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/Receive.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/Receive.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ReflectionDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ReflectionDispatch.java
new file mode 100644
index 0000000..e814fb8
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ReflectionDispatch.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.messaging.dispatch;
+
+import org.gradle.util.UncheckedException;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+public class ReflectionDispatch implements Dispatch<MethodInvocation> {
+    private final Object target;
+
+    public ReflectionDispatch(Object target) {
+        this.target = target;
+    }
+
+    public void dispatch(MethodInvocation message) {
+        try {
+            Method method = message.getMethod();
+            method.setAccessible(true);
+            method.invoke(target, message.getArguments());
+        } catch (InvocationTargetException e) {
+            throw UncheckedException.asUncheckedException(e.getCause());
+        } catch (Throwable throwable) {
+            throw UncheckedException.asUncheckedException(throwable);
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/StoppableDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/StoppableDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/StoppableDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/StoppableDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ThreadSafeDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ThreadSafeDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ThreadSafeDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/dispatch/ThreadSafeDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/ConnectEvent.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/ConnectEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/ConnectEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/ConnectEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/MessagingClient.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/MessagingClient.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/MessagingClient.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/MessagingClient.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/MessagingServer.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/MessagingServer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/MessagingServer.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/MessagingServer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/ObjectConnection.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/ObjectConnection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/ObjectConnection.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/ObjectConnection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessage.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessage.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessage.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessage.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMetaInfo.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMetaInfo.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMetaInfo.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ChannelMetaInfo.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectException.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectException.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectRequest.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectRequest.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectRequest.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/ConnectRequest.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/Connection.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/Connection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/Connection.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/Connection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClient.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClient.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClient.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClient.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServer.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServer.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnection.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnection.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnection.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnection.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamEvent.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamEvent.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamEvent.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamEvent.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilter.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilter.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceive.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceive.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceive.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceive.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingMethodInvocationHandler.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingMethodInvocationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingMethodInvocationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/IncomingMethodInvocationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/Message.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/Message.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/Message.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/Message.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatch.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatch.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatch.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatch.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MethodMetaInfo.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MethodMetaInfo.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MethodMetaInfo.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MethodMetaInfo.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnection.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnection.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/MultiChannelConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingMethodInvocationHandler.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingMethodInvocationHandler.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingMethodInvocationHandler.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/OutgoingMethodInvocationHandler.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/PlaceholderException.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/PlaceholderException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/PlaceholderException.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/PlaceholderException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocation.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocation.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocation.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocation.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/SocketConnection.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/SocketConnection.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/SocketConnection.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/SocketConnection.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpIncomingConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpIncomingConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpIncomingConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpIncomingConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingClient.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingClient.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingClient.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingClient.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingServer.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingServer.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingServer.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpMessagingServer.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpOutgoingConnector.java b/subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpOutgoingConnector.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/messaging/remote/internal/TcpOutgoingConnector.java
rename to subprojects/core/src/main/groovy/org/gradle/messaging/remote/internal/TcpOutgoingConnector.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/package-info.java b/subprojects/core/src/main/groovy/org/gradle/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/BaseExecSpec.java b/subprojects/core/src/main/groovy/org/gradle/process/BaseExecSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/BaseExecSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/process/BaseExecSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/ExecResult.java b/subprojects/core/src/main/groovy/org/gradle/process/ExecResult.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/ExecResult.java
rename to subprojects/core/src/main/groovy/org/gradle/process/ExecResult.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/ExecSpec.java b/subprojects/core/src/main/groovy/org/gradle/process/ExecSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/ExecSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/process/ExecSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/JavaExecSpec.java b/subprojects/core/src/main/groovy/org/gradle/process/JavaExecSpec.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/JavaExecSpec.java
rename to subprojects/core/src/main/groovy/org/gradle/process/JavaExecSpec.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/JavaForkOptions.java b/subprojects/core/src/main/groovy/org/gradle/process/JavaForkOptions.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/JavaForkOptions.java
rename to subprojects/core/src/main/groovy/org/gradle/process/JavaForkOptions.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/ProcessForkOptions.java b/subprojects/core/src/main/groovy/org/gradle/process/ProcessForkOptions.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/ProcessForkOptions.java
rename to subprojects/core/src/main/groovy/org/gradle/process/ProcessForkOptions.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/AbstractExecHandleBuilder.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/AbstractExecHandleBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/AbstractExecHandleBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/AbstractExecHandleBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/BadExitCodeException.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/BadExitCodeException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/BadExitCodeException.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/BadExitCodeException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultExecAction.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultExecAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultExecAction.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultExecAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultExecHandle.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultExecHandle.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultExecHandle.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultExecHandle.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultJavaExecAction.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultJavaExecAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultJavaExecAction.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultJavaExecAction.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultJavaForkOptions.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultJavaForkOptions.java
new file mode 100644
index 0000000..c739abf
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultJavaForkOptions.java
@@ -0,0 +1,228 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.process.internal;
+
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.internal.file.FileResolver;
+import org.gradle.api.internal.file.PathResolvingFileCollection;
+import org.gradle.process.JavaForkOptions;
+import org.gradle.util.Jvm;
+
+import java.io.File;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class DefaultJavaForkOptions extends DefaultProcessForkOptions implements JavaForkOptions {
+    private final Pattern sysPropPattern = Pattern.compile("-D(.+?)=(.*)");
+    private final Pattern noArgSysPropPattern = Pattern.compile("-D([^=]+)");
+    private final Pattern maxHeapPattern = Pattern.compile("-Xmx(.+)");
+    private final Pattern bootstrapPattern = Pattern.compile("-Xbootclasspath:(.+)");
+    private final List<Object> extraJvmArgs = new ArrayList<Object>();
+    private final Map<String, Object> systemProperties = new TreeMap<String, Object>();
+    private FileCollection bootstrapClasspath;
+    private String maxHeapSize;
+    private boolean assertionsEnabled;
+    private boolean debug;
+
+    public DefaultJavaForkOptions(FileResolver resolver) {
+        this(resolver, Jvm.current());
+    }
+
+    public DefaultJavaForkOptions(FileResolver resolver, Jvm jvm) {
+        super(resolver);
+        this.bootstrapClasspath = new PathResolvingFileCollection(resolver, null);
+        setExecutable(jvm.getJavaExecutable());
+    }
+
+    public List<String> getAllJvmArgs() {
+        List<String> args = new ArrayList<String>();
+        args.addAll(getJvmArgs());
+        for (Map.Entry<String, Object> entry : getSystemProperties().entrySet()) {
+            if (entry.getValue() != null) {
+                args.add(String.format("-D%s=%s", entry.getKey(), entry.getValue().toString()));
+            } else {
+                args.add(String.format("-D%s", entry.getKey()));
+            }
+        }
+        if (maxHeapSize != null) {
+            args.add(String.format("-Xmx%s", maxHeapSize));
+        }
+        FileCollection bootstrapClasspath = getBootstrapClasspath();
+        if (!bootstrapClasspath.isEmpty()) {
+            args.add(String.format("-Xbootclasspath:%s", bootstrapClasspath.getAsPath()));
+        }
+        if (assertionsEnabled) {
+            args.add("-ea");
+        }
+        if (debug) {
+            args.add("-Xdebug");
+            args.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005");
+        }
+        return args;
+    }
+
+    public void setAllJvmArgs(Iterable<?> arguments) {
+        systemProperties.clear();
+        maxHeapSize = null;
+        extraJvmArgs.clear();
+        assertionsEnabled = false;
+        jvmArgs(arguments);
+    }
+
+    public List<String> getJvmArgs() {
+        List<String> args = new ArrayList<String>();
+        for (Object extraJvmArg : extraJvmArgs) {
+            args.add(extraJvmArg.toString());
+        }
+        return args;
+    }
+
+    public void setJvmArgs(Iterable<?> arguments) {
+        extraJvmArgs.clear();
+        jvmArgs(arguments);
+    }
+
+    public JavaForkOptions jvmArgs(Iterable<?> arguments) {
+        for (Object argument : arguments) {
+            String argStr = argument.toString();
+            Matcher matcher = sysPropPattern.matcher(argStr);
+            if (matcher.matches()) {
+                systemProperties.put(matcher.group(1), matcher.group(2));
+                continue;
+            }
+            matcher = noArgSysPropPattern.matcher(argStr);
+            if (matcher.matches()) {
+                systemProperties.put(matcher.group(1), null);
+                continue;
+            }
+            matcher = maxHeapPattern.matcher(argStr);
+            if (matcher.matches()) {
+                maxHeapSize = matcher.group(1);
+                continue;
+            }
+            matcher = bootstrapPattern.matcher(argStr);
+            if (matcher.matches()) {
+                setBootstrapClasspath(getResolver().resolveFiles((Object[]) matcher.group(1).split(Pattern.quote(File.pathSeparator))));
+                continue;
+            }
+            if (argStr.equals("-ea") || argStr.equals("-enableassertions")) {
+                assertionsEnabled = true;
+                continue;
+            }
+            if (argStr.equals("-da") || argStr.equals("-disableassertions")) {
+                assertionsEnabled = false;
+                continue;
+            }
+
+            extraJvmArgs.add(argument);
+        }
+
+        boolean xdebugFound = false;
+        boolean xrunjdwpFound = false;
+        Set<Object> matches = new HashSet<Object>();
+        for (Object extraJvmArg : extraJvmArgs) {
+            if (extraJvmArg.toString().equals("-Xdebug")) {
+                xdebugFound = true;
+                matches.add(extraJvmArg);
+            } else if (extraJvmArg.toString().equals("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005")) {
+                xrunjdwpFound = true;
+                matches.add(extraJvmArg);
+            }
+        }
+        if (xdebugFound && xrunjdwpFound) {
+            debug = true;
+            extraJvmArgs.removeAll(matches);
+        } else {
+            debug = false;
+        }
+
+        return this;
+    }
+
+    public JavaForkOptions jvmArgs(Object... arguments) {
+        jvmArgs(Arrays.asList(arguments));
+        return this;
+    }
+
+    public Map<String, Object> getSystemProperties() {
+        return systemProperties;
+    }
+
+    public void setSystemProperties(Map<String, ?> properties) {
+        systemProperties.clear();
+        systemProperties.putAll(properties);
+    }
+
+    public JavaForkOptions systemProperties(Map<String, ?> properties) {
+        systemProperties.putAll(properties);
+        return this;
+    }
+
+    public JavaForkOptions systemProperty(String name, Object value) {
+        systemProperties.put(name, value);
+        return this;
+    }
+
+    public FileCollection getBootstrapClasspath() {
+        return bootstrapClasspath;
+    }
+
+    public void setBootstrapClasspath(FileCollection classpath) {
+        this.bootstrapClasspath = classpath;
+    }
+
+    public JavaForkOptions bootstrapClasspath(Object... classpath) {
+        this.bootstrapClasspath = this.bootstrapClasspath.plus(getResolver().resolveFiles(classpath));
+        return this;
+    }
+
+    public String getMaxHeapSize() {
+        return maxHeapSize;
+    }
+
+    public void setMaxHeapSize(String heapSize) {
+        this.maxHeapSize = heapSize;
+    }
+
+    public boolean getEnableAssertions() {
+        return assertionsEnabled;
+    }
+
+    public void setEnableAssertions(boolean enabled) {
+        assertionsEnabled = enabled;
+    }
+
+    public boolean getDebug() {
+        return debug;
+    }
+
+    public void setDebug(boolean enabled) {
+        debug = enabled;
+    }
+
+    public JavaForkOptions copyTo(JavaForkOptions target) {
+        super.copyTo(target);
+        target.setJvmArgs(extraJvmArgs);
+        target.setSystemProperties(systemProperties);
+        target.setMaxHeapSize(maxHeapSize);
+        target.setBootstrapClasspath(bootstrapClasspath);
+        target.setEnableAssertions(assertionsEnabled);
+        target.setDebug(debug);
+        return this;
+    }
+}
diff --git a/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultProcessForkOptions.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultProcessForkOptions.java
new file mode 100644
index 0000000..b3b3544
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultProcessForkOptions.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.process.internal;
+
+import org.gradle.api.internal.file.FileResolver;
+import org.gradle.api.internal.file.FileSource;
+import org.gradle.process.ProcessForkOptions;
+import org.gradle.util.Jvm;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+public class DefaultProcessForkOptions implements ProcessForkOptions {
+    private final FileResolver resolver;
+    private Object executable;
+    private FileSource workingDir;
+    private final Map<String, Object> environment = new HashMap<String, Object>(Jvm.current().getInheritableEnvironmentVariables(System.getenv()));
+
+    public DefaultProcessForkOptions(FileResolver resolver) {
+        this.resolver = resolver;
+        workingDir = resolver.resolveLater(".");
+    }
+
+    protected FileResolver getResolver() {
+        return resolver;
+    }
+
+    public String getExecutable() {
+        return executable == null ? null : executable.toString();
+    }
+
+    public void setExecutable(Object executable) {
+        this.executable = executable;
+    }
+
+    public ProcessForkOptions executable(Object executable) {
+        setExecutable(executable);
+        return this;
+    }
+
+    public File getWorkingDir() {
+        return workingDir.get();
+    }
+
+    public void setWorkingDir(Object dir) {
+        this.workingDir = resolver.resolveLater(dir);
+    }
+
+    public ProcessForkOptions workingDir(Object dir) {
+        setWorkingDir(dir);
+        return this;
+    }
+
+    public Map<String, Object> getEnvironment() {
+        return environment;
+    }
+
+    public Map<String, String> getActualEnvironment() {
+        Map<String, String> actual = new HashMap<String, String>();
+        for (Map.Entry<String, Object> entry : environment.entrySet()) {
+            actual.put(entry.getKey(), String.valueOf(entry.getValue().toString()));
+        }
+        return actual;
+    }
+
+    public void setEnvironment(Map<String, ?> environmentVariables) {
+        environment.clear();
+        environment.putAll(environmentVariables);
+    }
+
+    public ProcessForkOptions environment(String name, Object value) {
+        environment.put(name, value);
+        return this;
+    }
+
+    public ProcessForkOptions environment(Map<String, ?> environmentVariables) {
+        environment.putAll(environmentVariables);
+        return this;
+    }
+
+    public ProcessForkOptions copyTo(ProcessForkOptions target) {
+        target.setExecutable(executable);
+        target.setWorkingDir(workingDir);
+        target.setEnvironment(environment);
+        return this;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcess.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcess.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcess.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcess.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcessFactory.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcessFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcessFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/DefaultWorkerProcessFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecAction.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecAction.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecException.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecException.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecException.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandle.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandle.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandle.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandle.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleBuilder.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleListener.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleListener.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleRunner.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleRunner.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleRunner.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleRunner.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleShutdownHookAction.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleShutdownHookAction.java
new file mode 100644
index 0000000..f2cbddf
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleShutdownHookAction.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.process.internal;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Terminates the external running 'sub' process when the Gradle process is being cancelled.
+ *
+ * @author Tom Eyckmans
+ */
+public class ExecHandleShutdownHookAction implements Runnable {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(ExecHandleShutdownHookAction.class);
+    private final ExecHandle execHandle;
+
+    public ExecHandleShutdownHookAction(ExecHandle execHandle) {
+        if (execHandle == null) {
+            throw new IllegalArgumentException("execHandle is null!");
+        }
+
+        this.execHandle = execHandle;
+    }
+
+    public void run() {
+        try {
+            execHandle.abort();
+        } catch (Throwable t) {
+            LOGGER.error("failed to abort " + execHandle, t);
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleState.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleState.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleState.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecHandleState.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecOutputHandleRunner.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ExecOutputHandleRunner.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecOutputHandleRunner.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ExecOutputHandleRunner.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/JavaExecAction.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/JavaExecAction.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/JavaExecAction.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/JavaExecAction.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/JavaExecHandleBuilder.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/JavaExecHandleBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/JavaExecHandleBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/JavaExecHandleBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ProcessBuilderFactory.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/ProcessBuilderFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ProcessBuilderFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/ProcessBuilderFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/WorkerProcess.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/WorkerProcess.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/WorkerProcess.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/WorkerProcess.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/WorkerProcessBuilder.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/WorkerProcessBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/WorkerProcessBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/WorkerProcessBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/WorkerProcessContext.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/WorkerProcessContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/WorkerProcessContext.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/WorkerProcessContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ActionExecutionWorker.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/ActionExecutionWorker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ActionExecutionWorker.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/ActionExecutionWorker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInIsolatedClassLoaderWorkerFactory.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInIsolatedClassLoaderWorkerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInIsolatedClassLoaderWorkerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInIsolatedClassLoaderWorkerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInSystemClassLoaderWorkerFactory.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInSystemClassLoaderWorkerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInSystemClassLoaderWorkerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/ApplicationClassesInSystemClassLoaderWorkerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorker.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorker.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/IsolatedApplicationClassLoaderWorker.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/IsolatedApplicationClassLoaderWorker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/IsolatedApplicationClassLoaderWorker.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/IsolatedApplicationClassLoaderWorker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/SystemApplicationClassLoaderWorker.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/SystemApplicationClassLoaderWorker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/SystemApplicationClassLoaderWorker.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/SystemApplicationClassLoaderWorker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/WorkerContext.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/WorkerContext.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/WorkerContext.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/WorkerContext.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/WorkerFactory.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/WorkerFactory.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/WorkerFactory.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/WorkerFactory.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProvider.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/launcher/BootstrapClassLoaderWorker.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/launcher/BootstrapClassLoaderWorker.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/launcher/BootstrapClassLoaderWorker.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/launcher/BootstrapClassLoaderWorker.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/launcher/GradleWorkerMain.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/launcher/GradleWorkerMain.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/launcher/GradleWorkerMain.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/launcher/GradleWorkerMain.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/package.html b/subprojects/core/src/main/groovy/org/gradle/process/internal/package.html
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/package.html
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/package.html
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/shutdown/ShutdownHookActionRegister.java b/subprojects/core/src/main/groovy/org/gradle/process/internal/shutdown/ShutdownHookActionRegister.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/shutdown/ShutdownHookActionRegister.java
rename to subprojects/core/src/main/groovy/org/gradle/process/internal/shutdown/ShutdownHookActionRegister.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/package-info.java b/subprojects/core/src/main/groovy/org/gradle/process/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/process/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/process/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/BuildProfile.java b/subprojects/core/src/main/groovy/org/gradle/profile/BuildProfile.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/profile/BuildProfile.java
rename to subprojects/core/src/main/groovy/org/gradle/profile/BuildProfile.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/ElapsedTimeFormatter.java b/subprojects/core/src/main/groovy/org/gradle/profile/ElapsedTimeFormatter.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/profile/ElapsedTimeFormatter.java
rename to subprojects/core/src/main/groovy/org/gradle/profile/ElapsedTimeFormatter.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/HTMLProfileReport.groovy b/subprojects/core/src/main/groovy/org/gradle/profile/HTMLProfileReport.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/profile/HTMLProfileReport.groovy
rename to subprojects/core/src/main/groovy/org/gradle/profile/HTMLProfileReport.groovy
diff --git a/subprojects/core/src/main/groovy/org/gradle/profile/ProfileListener.java b/subprojects/core/src/main/groovy/org/gradle/profile/ProfileListener.java
new file mode 100644
index 0000000..42fe01b
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/profile/ProfileListener.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.profile;
+
+import org.gradle.BuildListener;
+import org.gradle.BuildResult;
+import org.gradle.api.*;
+import org.gradle.api.execution.TaskExecutionListener;
+import org.gradle.api.initialization.Settings;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.api.tasks.TaskState;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class ProfileListener implements BuildListener, ProjectEvaluationListener, TaskExecutionListener {
+    private BuildProfile buildProfile;
+    private static final SimpleDateFormat FILE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
+    private long profileStarted;
+
+    public ProfileListener(long profileStarted) {
+        this.profileStarted = profileStarted;
+    }
+
+    // BuildListener
+    public void buildStarted(Gradle gradle) {
+        buildProfile = new BuildProfile(gradle);
+        buildProfile.setBuildStarted(System.currentTimeMillis());
+        buildProfile.setProfilingStarted(profileStarted);
+    }
+
+    public void settingsEvaluated(Settings settings) {
+        buildProfile.setSettingsEvaluated(System.currentTimeMillis());
+    }
+
+    public void projectsLoaded(Gradle gradle) {
+        buildProfile.setProjectsLoaded(System.currentTimeMillis());
+    }
+
+    public void projectsEvaluated(Gradle gradle) {
+        buildProfile.setProjectsEvaluated(System.currentTimeMillis());
+    }
+
+    public void buildFinished(BuildResult result) {
+        buildProfile.setBuildFinished(System.currentTimeMillis());
+
+        HTMLProfileReport report = new HTMLProfileReport(buildProfile);
+        File file = new File(result.getGradle().getRootProject().getBuildDir(), "reports/profile/profile-" + FILE_DATE_FORMAT.format(new Date(profileStarted)) + ".html");
+        file.getParentFile().mkdirs();
+        try {
+            file.createNewFile();
+            report.writeTo(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    // ProjectEvaluationListener
+    public void beforeEvaluate(Project project) {
+        buildProfile.getProjectProfile(project).setBeforeEvaluate(System.currentTimeMillis());
+    }
+
+    public void afterEvaluate(Project project, ProjectState state) {
+        ProjectProfile projectProfile = buildProfile.getProjectProfile(project);
+        projectProfile.setAfterEvaluate(System.currentTimeMillis());
+        projectProfile.setState(state);
+    }
+
+    // TaskExecutionListener
+    public void beforeExecute(Task task) {
+        Project project = task.getProject();
+        ProjectProfile projectProfile = buildProfile.getProjectProfile(project);
+        projectProfile.getTaskProfile(task).setStart(System.currentTimeMillis());
+    }
+
+    public void afterExecute(Task task, TaskState state) {
+        Project project = task.getProject();
+        ProjectProfile projectProfile = buildProfile.getProjectProfile(project);
+        TaskProfile taskProfile = projectProfile.getTaskProfile(task);
+        taskProfile.setFinish(System.currentTimeMillis());
+        taskProfile.setState(state);
+    }
+}
+
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/ProjectProfile.java b/subprojects/core/src/main/groovy/org/gradle/profile/ProjectProfile.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/profile/ProjectProfile.java
rename to subprojects/core/src/main/groovy/org/gradle/profile/ProjectProfile.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/TaskProfile.java b/subprojects/core/src/main/groovy/org/gradle/profile/TaskProfile.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/profile/TaskProfile.java
rename to subprojects/core/src/main/groovy/org/gradle/profile/TaskProfile.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/testfixtures/ProjectBuilder.java b/subprojects/core/src/main/groovy/org/gradle/testfixtures/ProjectBuilder.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/testfixtures/ProjectBuilder.java
rename to subprojects/core/src/main/groovy/org/gradle/testfixtures/ProjectBuilder.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/testfixtures/package-info.java b/subprojects/core/src/main/groovy/org/gradle/testfixtures/package-info.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/testfixtures/package-info.java
rename to subprojects/core/src/main/groovy/org/gradle/testfixtures/package-info.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/AntUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/AntUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/AntUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/AntUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/BulkReadInputStream.java b/subprojects/core/src/main/groovy/org/gradle/util/BulkReadInputStream.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/BulkReadInputStream.java
rename to subprojects/core/src/main/groovy/org/gradle/util/BulkReadInputStream.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ChangeListener.java b/subprojects/core/src/main/groovy/org/gradle/util/ChangeListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/ChangeListener.java
rename to subprojects/core/src/main/groovy/org/gradle/util/ChangeListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ClassLoaderObjectInputStream.java b/subprojects/core/src/main/groovy/org/gradle/util/ClassLoaderObjectInputStream.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/ClassLoaderObjectInputStream.java
rename to subprojects/core/src/main/groovy/org/gradle/util/ClassLoaderObjectInputStream.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/ClasspathUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/ClasspathUtil.java
new file mode 100644
index 0000000..89c1c71
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/ClasspathUtil.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util;
+
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author Hans Dockter
+ */
+public class ClasspathUtil {
+    public static void addUrl(URLClassLoader classLoader, Iterable<URL> classpathElements) {
+        try {
+            Method method = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
+            method.setAccessible(true);
+            for (URL classpathElement : classpathElements) {
+                method.invoke(classLoader, classpathElement);
+            }
+        } catch (Throwable t) {
+            t.printStackTrace();
+            throw new RuntimeException("Error, could not add URL to system classloader", t);
+        }
+    }
+
+    public static List<URL> getClasspath(ClassLoader classLoader) {
+        List<URL> implementationClassPath = new ArrayList<URL>();
+        for (
+                ClassLoader cl = classLoader; cl != ClassLoader.getSystemClassLoader().getParent(); cl = cl.getParent()) {
+            if (cl instanceof URLClassLoader) {
+                implementationClassPath.addAll(Arrays.asList(((URLClassLoader) cl).getURLs()));
+            }
+        }
+        return implementationClassPath;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/Clock.java b/subprojects/core/src/main/groovy/org/gradle/util/Clock.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/Clock.java
rename to subprojects/core/src/main/groovy/org/gradle/util/Clock.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/CompositeIdGenerator.java b/subprojects/core/src/main/groovy/org/gradle/util/CompositeIdGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/CompositeIdGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/util/CompositeIdGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/Configurable.java b/subprojects/core/src/main/groovy/org/gradle/util/Configurable.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/Configurable.java
rename to subprojects/core/src/main/groovy/org/gradle/util/Configurable.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ConfigureUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/ConfigureUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/ConfigureUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/ConfigureUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/DeleteOnExit.java b/subprojects/core/src/main/groovy/org/gradle/util/DeleteOnExit.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/DeleteOnExit.java
rename to subprojects/core/src/main/groovy/org/gradle/util/DeleteOnExit.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/DeprecationLogger.java b/subprojects/core/src/main/groovy/org/gradle/util/DeprecationLogger.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/DeprecationLogger.java
rename to subprojects/core/src/main/groovy/org/gradle/util/DeprecationLogger.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/DiffUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/DiffUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/DiffUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/DiffUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/DisconnectableInputStream.java b/subprojects/core/src/main/groovy/org/gradle/util/DisconnectableInputStream.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/DisconnectableInputStream.java
rename to subprojects/core/src/main/groovy/org/gradle/util/DisconnectableInputStream.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/FilteringClassLoader.java b/subprojects/core/src/main/groovy/org/gradle/util/FilteringClassLoader.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/FilteringClassLoader.java
rename to subprojects/core/src/main/groovy/org/gradle/util/FilteringClassLoader.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/GFileUtils.java b/subprojects/core/src/main/groovy/org/gradle/util/GFileUtils.java
new file mode 100644
index 0000000..35f3df3
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/GFileUtils.java
@@ -0,0 +1,539 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.util;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.LineIterator;
+import org.apache.commons.io.filefilter.IOFileFilter;
+import org.gradle.api.UncheckedIOException;
+
+import java.io.*;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import java.util.zip.Checksum;
+
+/**
+ * @author Hans Dockter
+ */
+public class GFileUtils {
+
+    public static final String FILE_SEPARATOR = System.getProperty("file.separator");
+
+    public static FileInputStream openInputStream(File file) {
+        try {
+            return FileUtils.openInputStream(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static FileOutputStream openOutputStream(File file) {
+        try {
+            return FileUtils.openOutputStream(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static String byteCountToDisplaySize(long size) {
+        return FileUtils.byteCountToDisplaySize(size);
+    }
+
+    public static void touch(File file) {
+        try {
+            FileUtils.touch(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static File[] convertFileCollectionToFileArray(Collection files) {
+        return FileUtils.convertFileCollectionToFileArray(files);
+    }
+
+    public static Collection listFiles(File directory, IOFileFilter fileFilter, IOFileFilter dirFilter) {
+        return FileUtils.listFiles(directory, fileFilter, dirFilter);
+    }
+
+    public static Iterator iterateFiles(File directory, IOFileFilter fileFilter, IOFileFilter dirFilter) {
+        return FileUtils.iterateFiles(directory, fileFilter, dirFilter);
+    }
+
+    public static Collection listFiles(File directory, String[] extensions, boolean recursive) {
+        return FileUtils.listFiles(directory, extensions, recursive);
+    }
+
+    public static Iterator iterateFiles(File directory, String[] extensions, boolean recursive) {
+        return FileUtils.iterateFiles(directory, extensions, recursive);
+    }
+
+    public static boolean contentEquals(File file1, File file2) {
+        try {
+            return FileUtils.contentEquals(file1, file2);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static File toFile(String... filePathParts) {
+        final StringWriter filePathBuffer = new StringWriter();
+
+        for (int i = 0; i < filePathParts.length; i++) {
+            filePathBuffer.write(filePathParts[i]);
+            if (i + 1 < filePathParts.length) {
+                filePathBuffer.write(FILE_SEPARATOR);
+            }
+        }
+
+        return new File(filePathBuffer.toString());
+    }
+
+    public static File toFile(URL url) {
+        return FileUtils.toFile(url);
+    }
+
+    public static File[] toFiles(URL[] urls) {
+        return FileUtils.toFiles(urls);
+    }
+
+    public static List<String> toPaths(Collection<File> files) {
+        List<String> paths = new ArrayList<String>();
+        for (File file : files) {
+            paths.add(file.getAbsolutePath());
+        }
+        return paths;
+    }
+
+    public static List<URL> toURLs(Iterable<File> files) {
+        List<URL> urls = new ArrayList<URL>();
+        for (File file : files) {
+            try {
+                urls.add(file.toURI().toURL());
+            } catch (MalformedURLException e) {
+                throw new UncheckedIOException(e);
+            }
+        }
+        return urls;
+    }
+
+    public static URL[] toURLArray(Collection<File> files) {
+        return toURLs(files.toArray(new File[files.size()]));
+    }
+
+    public static URL[] toURLs(File[] files) {
+        try {
+            URL[] urls = new URL[files.length];
+            for (int i = 0; i < files.length; i++) {
+                File file = files[i];
+                urls[i] = file.toURI().toURL();
+            }
+            return urls;
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyFileToDirectory(File srcFile, File destDir) {
+        try {
+            FileUtils.copyFileToDirectory(srcFile, destDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) {
+        try {
+            FileUtils.copyFileToDirectory(srcFile, destDir, preserveFileDate);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyFile(File srcFile, File destFile) {
+        try {
+            FileUtils.copyFile(srcFile, destFile);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyFile(File srcFile, File destFile, boolean preserveFileDate) {
+        try {
+            FileUtils.copyFile(srcFile, destFile, preserveFileDate);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyDirectoryToDirectory(File srcDir, File destDir) {
+        try {
+            FileUtils.copyDirectoryToDirectory(srcDir, destDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyDirectory(File srcDir, File destDir) {
+        try {
+            FileUtils.copyDirectory(srcDir, destDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyDirectory(File srcDir, File destDir, boolean preserveFileDate) {
+        try {
+            FileUtils.copyDirectory(srcDir, destDir, preserveFileDate);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyDirectory(File srcDir, File destDir, FileFilter filter) {
+        try {
+            FileUtils.copyDirectory(srcDir, destDir, filter);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyDirectory(File srcDir, File destDir, FileFilter filter, boolean preserveFileDate) {
+        try {
+            FileUtils.copyDirectory(srcDir, destDir, filter, preserveFileDate);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void copyURLToFile(URL source, File destination) {
+        try {
+            FileUtils.copyURLToFile(source, destination);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void deleteDirectory(File directory) {
+        try {
+            FileUtils.deleteDirectory(directory);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static boolean deleteQuietly(File file) {
+        return FileUtils.deleteQuietly(file);
+    }
+
+    public static void cleanDirectory(File directory) {
+        try {
+            FileUtils.cleanDirectory(directory);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static boolean waitFor(File file, int seconds) {
+        return FileUtils.waitFor(file, seconds);
+    }
+
+    public static String readFileToString(File file, String encoding) {
+        try {
+            return FileUtils.readFileToString(file, encoding);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static String readFileToString(File file) {
+        try {
+            return FileUtils.readFileToString(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static byte[] readFileToByteArray(File file) {
+        try {
+            return FileUtils.readFileToByteArray(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static List readLines(File file, String encoding) {
+        try {
+            return FileUtils.readLines(file, encoding);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static List readLines(File file) {
+        try {
+            return FileUtils.readLines(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static LineIterator lineIterator(File file, String encoding) {
+        try {
+            return FileUtils.lineIterator(file, encoding);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static LineIterator lineIterator(File file) {
+        try {
+            return FileUtils.lineIterator(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeStringToFile(File file, String data, String encoding) {
+        try {
+            FileUtils.writeStringToFile(file, data, encoding);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeStringToFile(File file, String data) {
+        try {
+            FileUtils.writeStringToFile(file, data);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeByteArrayToFile(File file, byte[] data) {
+        try {
+            FileUtils.writeByteArrayToFile(file, data);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeLines(File file, String encoding, Collection lines) {
+        try {
+            FileUtils.writeLines(file, encoding, lines);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeLines(File file, Collection lines) {
+        try {
+            FileUtils.writeLines(file, lines);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeLines(File file, String encoding, Collection lines, String lineEnding) {
+        try {
+            FileUtils.writeLines(file, encoding, lines, lineEnding);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void writeLines(File file, Collection lines, String lineEnding) {
+        try {
+            FileUtils.writeLines(file, lines, lineEnding);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void forceDelete(File file) {
+        try {
+            FileUtils.forceDelete(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void forceDeleteOnExit(File file) {
+        try {
+            FileUtils.forceDeleteOnExit(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void forceMkdir(File directory) {
+        try {
+            FileUtils.forceMkdir(directory);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static long sizeOfDirectory(File directory) {
+        return FileUtils.sizeOfDirectory(directory);
+    }
+
+    public static boolean isFileNewer(File file, File reference) {
+        return FileUtils.isFileNewer(file, reference);
+    }
+
+    public static boolean isFileNewer(File file, Date date) {
+        return FileUtils.isFileNewer(file, date);
+    }
+
+    public static boolean isFileNewer(File file, long timeMillis) {
+        return FileUtils.isFileNewer(file, timeMillis);
+    }
+
+    public static boolean isFileOlder(File file, File reference) {
+        return FileUtils.isFileOlder(file, reference);
+    }
+
+    public static boolean isFileOlder(File file, Date date) {
+        return FileUtils.isFileOlder(file, date);
+    }
+
+    public static boolean isFileOlder(File file, long timeMillis) {
+        return FileUtils.isFileOlder(file, timeMillis);
+    }
+
+    public static long checksumCRC32(File file) {
+        try {
+            return FileUtils.checksumCRC32(file);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static Checksum checksum(File file, Checksum checksum) {
+        try {
+            return FileUtils.checksum(file, checksum);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void moveDirectory(File srcDir, File destDir) {
+        try {
+            FileUtils.moveDirectory(srcDir, destDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void moveDirectoryToDirectory(File src, File destDir, boolean createDestDir) {
+        try {
+            FileUtils.moveDirectoryToDirectory(src, destDir, createDestDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void moveFile(File srcFile, File destFile) {
+        try {
+            FileUtils.moveFile(srcFile, destFile);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void moveFileToDirectory(File srcFile, File destDir, boolean createDestDir) {
+        try {
+            FileUtils.moveFileToDirectory(srcFile, destDir, createDestDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static void moveToDirectory(File src, File destDir, boolean createDestDir) {
+        try {
+            FileUtils.moveToDirectory(src, destDir, createDestDir);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static File canonicalise(File src) {
+        try {
+            return src.getCanonicalFile();
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public static List<File> getSubDirectories(File directory) {
+        final List<File> subDirectories = new ArrayList<File>();
+
+        addSubDirectories(directory, subDirectories);
+
+        return subDirectories;
+    }
+
+    public static void addSubDirectories(final File directory, final Collection<File> subDirectories) {
+        final File[] subFiles = directory.listFiles();
+
+        if (subFiles != null && subFiles.length > 0) {
+            for (final File subFile : subFiles) {
+                if (subFile.isDirectory()) {
+                    subDirectories.add(subFile);
+                    addSubDirectories(subFile, subDirectories);
+                }
+                // ignore files
+            }
+        }
+    }
+
+    public static List<File> getSubFiles(File directory) {
+        final List<File> subFilesList = new ArrayList<File>();
+
+        final File[] subFiles = directory.listFiles();
+        if (subFiles != null && subFiles.length > 0) {
+            for (final File subFile : subFiles) {
+                if (subFile.isFile()) {
+                    subFilesList.add(subFile);
+                }
+            }
+        }
+
+        return subFilesList;
+    }
+
+    public static boolean createDirectoriesWhenNotExistent(File... directories) {
+        if (directories != null && directories.length > 0) {
+            boolean directoriesCreated = true;
+            int directoriesIndex = 0;
+
+            while (directoriesCreated && directoriesIndex < directories.length) {
+                final File currentDirectory = directories[directoriesIndex];
+
+                if (!currentDirectory.exists()) {
+                    directoriesCreated = currentDirectory.mkdirs();
+                }
+
+                directoriesIndex++;
+            }
+
+            return directoriesCreated;
+        } else {
+            return true;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/GUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/GUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/GUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/GUtil.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/GradleVersion.java b/subprojects/core/src/main/groovy/org/gradle/util/GradleVersion.java
new file mode 100644
index 0000000..2a4b2fe
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/GradleVersion.java
@@ -0,0 +1,220 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util;
+
+import groovy.lang.GroovySystem;
+import org.apache.ivy.Ivy;
+import org.apache.tools.ant.Main;
+import org.gradle.api.InvalidUserDataException;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Hans Dockter
+ * @author Russel Winder
+ */
+public class GradleVersion implements Comparable<GradleVersion> {
+    private final static String BUILD_TIME = "buildTime";
+    private final static String VERSION = "version";
+    private final static String FILE_NAME = "/org/gradle/version.properties";
+    public final static String URL = "http://www.gradle.org";
+    private final static Pattern VERSION_PATTERN = Pattern.compile("(\\d+(\\.\\d+)+)(-(\\p{Alpha}+)-(\\d+))?(-(\\d{14}[-+]\\d{4}))?");
+
+    private final String version;
+    private final String buildTime;
+    private final Long snapshot;
+    private final String versionPart;
+    private final Stage stage;
+
+    public GradleVersion() {
+        this(GUtil.loadProperties(GradleVersion.class.getResourceAsStream(FILE_NAME)));
+    }
+
+    public GradleVersion(String version) {
+        this(properties(version));
+    }
+
+    private static Properties properties(String version) {
+        Properties properties = new Properties();
+        properties.setProperty(VERSION, version);
+        return properties;
+    }
+
+    private GradleVersion(Properties properties) {
+        version = properties.getProperty(VERSION);
+        buildTime = properties.getProperty(BUILD_TIME);
+        Matcher matcher = VERSION_PATTERN.matcher(version);
+        if (!matcher.matches()) {
+            throw new InvalidUserDataException(String.format("Unexpected Gradle version '%s'.", version));
+        }
+        versionPart = matcher.group(1);
+
+        if (matcher.group(3) != null) {
+            int stageNumber = 0;
+            if (matcher.group(4).equals("milestone")) {
+                stageNumber = 1;
+            } else if (matcher.group(4).equals("preview")) {
+                stageNumber = 2;
+            } else if (matcher.group(4).equals("rc")) {
+                stageNumber = 3;
+            }
+            stage = new Stage(stageNumber, Integer.parseInt(matcher.group(5)));
+        } else {
+            stage = null;
+        }
+
+        if (matcher.group(7) != null) {
+            try {
+                snapshot = new SimpleDateFormat("yyyyMMddHHmmssZ").parse(matcher.group(7)).getTime();
+            } catch (ParseException e) {
+                throw UncheckedException.asUncheckedException(e);
+            }
+        } else {
+            snapshot = null;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return String.format("Gradle %s", version);
+    }
+
+    public String getVersion() {
+        return version;
+    }
+
+    public String getBuildTime() {
+        return buildTime;
+    }
+
+    public boolean isSnapshot() {
+        return snapshot != null;
+    }
+
+    public int compareTo(GradleVersion gradleVersion) {
+        String[] majorVersionParts = versionPart.split("\\.");
+        String[] otherMajorVersionParts = gradleVersion.versionPart.split("\\.");
+        for (int i = 0; i < majorVersionParts.length && i < otherMajorVersionParts.length; i++) {
+            int part = Integer.parseInt(majorVersionParts[i]);
+            int otherPart = Integer.parseInt(otherMajorVersionParts[i]);
+            if (part > otherPart) {
+                return 1;
+            }
+            if (otherPart > part) {
+                return -1;
+            }
+        }
+        if (majorVersionParts.length > otherMajorVersionParts.length) {
+            return 1;
+        }
+        if (majorVersionParts.length < otherMajorVersionParts.length) {
+            return -1;
+        }
+
+        if (stage != null && gradleVersion.stage != null) {
+            int diff = stage.compareTo(gradleVersion.stage);
+            if (diff != 0) {
+                return diff;
+            }
+        }
+        if (stage == null && gradleVersion.stage != null) {
+            return 1;
+        }
+        if (stage != null && gradleVersion.stage == null) {
+            return -1;
+        }
+
+        if (snapshot != null && gradleVersion.snapshot != null) {
+            return snapshot.compareTo(gradleVersion.snapshot);
+        }
+        if (snapshot == null && gradleVersion.snapshot != null) {
+            return 1;
+        }
+        if (snapshot != null && gradleVersion.snapshot == null) {
+            return -1;
+        }
+
+        return 0;
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (o == this) {
+            return true;
+        }
+        if (o == null || o.getClass() != getClass()) {
+            return false;
+        }
+        GradleVersion other = (GradleVersion) o;
+        return version.equals(other.version);
+    }
+
+    @Override
+    public int hashCode() {
+        return version.hashCode();
+    }
+
+    public String prettyPrint() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("\n------------------------------------------------------------\nGradle ");
+        sb.append(getVersion());
+        sb.append("\n------------------------------------------------------------\n\nGradle build time: ");
+        sb.append(getBuildTime());
+        sb.append("\nGroovy: ");
+        sb.append(GroovySystem.getVersion());
+        sb.append("\nAnt: ");
+        sb.append(Main.getAntVersion());
+        sb.append("\nIvy: ");
+        sb.append(Ivy.getIvyVersion());
+        sb.append("\nJVM: ");
+        sb.append(Jvm.current());
+        sb.append("\nOS: ");
+        sb.append(OperatingSystem.current());
+        sb.append("\n");
+        return sb.toString();
+    }
+
+    private static final class Stage implements Comparable<Stage> {
+        final int stage;
+        final int number;
+
+        private Stage(int stage, int number) {
+            this.stage = stage;
+            this.number = number;
+        }
+
+        public int compareTo(Stage other) {
+            if (stage > other.stage) {
+                return 1;
+            }
+            if (stage < other.stage) {
+                return -1;
+            }
+            if (number > other.number) {
+                return 1;
+            }
+            if (number < other.number) {
+                return -1;
+            }
+            return 0;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/HashUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/HashUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/HashUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/HashUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/IdGenerator.java b/subprojects/core/src/main/groovy/org/gradle/util/IdGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/IdGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/util/IdGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/JarUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/JarUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/JarUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/JarUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/JavaMethod.java b/subprojects/core/src/main/groovy/org/gradle/util/JavaMethod.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/JavaMethod.java
rename to subprojects/core/src/main/groovy/org/gradle/util/JavaMethod.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/Jvm.java b/subprojects/core/src/main/groovy/org/gradle/util/Jvm.java
new file mode 100644
index 0000000..0ec9bb6
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/Jvm.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util;
+
+import org.apache.tools.ant.util.JavaEnvUtils;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+public class Jvm {
+    private final OperatingSystem os;
+
+    public static Jvm current() {
+        String vendor = System.getProperty("java.vm.vendor");
+        if (vendor.toLowerCase().startsWith("apple inc.")) {
+            return new AppleJvm(OperatingSystem.current());
+        }
+        return new Jvm(OperatingSystem.current());
+    }
+
+    Jvm(OperatingSystem os) {
+        this.os = os;
+    }
+
+    @Override
+    public String toString() {
+        return String.format("%s (%s %s)", System.getProperty("java.version"), System.getProperty("java.vm.vendor"), System.getProperty("java.vm.version"));
+    }
+
+    public File getJavaExecutable() {
+        return new File(JavaEnvUtils.getJdkExecutable("java"));
+    }
+
+    public File getJavadocExecutable() {
+        return new File(JavaEnvUtils.getJdkExecutable("javadoc"));
+    }
+
+    public boolean isJava5Compatible() {
+        return System.getProperty("java.version").startsWith("1.5") || isJava6Compatible();
+    }
+
+    public boolean isJava6Compatible() {
+        return System.getProperty("java.version").startsWith("1.6");
+    }
+
+    public File getJavaHome() {
+        File toolsJar = getToolsJar();
+        return toolsJar == null ? getDefaultJavaHome() : toolsJar.getParentFile().getParentFile();
+    }
+
+    private File getDefaultJavaHome() {
+        return GFileUtils.canonicalise(new File(System.getProperty("java.home")));
+    }
+
+    public File getToolsJar() {
+        File javaHome = getDefaultJavaHome();
+        File toolsJar = new File(javaHome, "lib/tools.jar");
+        if (toolsJar.exists()) {
+            return toolsJar;
+        }
+        if (javaHome.getName().equalsIgnoreCase("jre")) {
+            javaHome = javaHome.getParentFile();
+            toolsJar = new File(javaHome, "lib/tools.jar");
+            if (toolsJar.exists()) {
+                return toolsJar;
+            }
+        }
+        if (javaHome.getName().matches("jre\\d+") && os.isWindows()) {
+            javaHome = new File(javaHome.getParentFile(), String.format("jdk%s", System.getProperty("java.version")));
+            toolsJar = new File(javaHome, "lib/tools.jar");
+            if (toolsJar.exists()) {
+                return toolsJar;
+            }
+        }
+        return null;
+    }
+
+    public Map<String, ?> getInheritableEnvironmentVariables(Map<String, ?> envVars) {
+        return envVars;
+    }
+
+    static class AppleJvm extends Jvm {
+        AppleJvm(OperatingSystem os) {
+            super(os);
+        }
+
+        @Override
+        public Map<String, ?> getInheritableEnvironmentVariables(Map<String, ?> envVars) {
+            Map<String, Object> vars = new HashMap<String, Object>();
+            for (Map.Entry<String, ?> entry : envVars.entrySet()) {
+                if (entry.getKey().matches("APP_NAME_\\d+") || entry.getKey().matches("JAVA_MAIN_CLASS_\\d+")) {
+                    continue;
+                }
+                vars.put(entry.getKey(), entry.getValue());
+            }
+            return vars;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/LineBufferingOutputStream.java b/subprojects/core/src/main/groovy/org/gradle/util/LineBufferingOutputStream.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/LineBufferingOutputStream.java
rename to subprojects/core/src/main/groovy/org/gradle/util/LineBufferingOutputStream.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/LinePerThreadBufferingOutputStream.java b/subprojects/core/src/main/groovy/org/gradle/util/LinePerThreadBufferingOutputStream.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/LinePerThreadBufferingOutputStream.java
rename to subprojects/core/src/main/groovy/org/gradle/util/LinePerThreadBufferingOutputStream.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/LongIdGenerator.java b/subprojects/core/src/main/groovy/org/gradle/util/LongIdGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/LongIdGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/util/LongIdGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/MultiParentClassLoader.java b/subprojects/core/src/main/groovy/org/gradle/util/MultiParentClassLoader.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/MultiParentClassLoader.java
rename to subprojects/core/src/main/groovy/org/gradle/util/MultiParentClassLoader.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/NameMatcher.java b/subprojects/core/src/main/groovy/org/gradle/util/NameMatcher.java
new file mode 100644
index 0000000..57af8b3
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/NameMatcher.java
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.util;
+
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * Selects a single item from a list of candidates based on a camel-case pattern.
+ */
+public class NameMatcher {
+    private final SortedSet<String> matches = new TreeSet<String>();
+    private final Set<String> candidates = new TreeSet<String>();
+    private String pattern;
+
+    /**
+     * Locates the best match for the given pattern in the given set of candidate items.
+     *
+     * @return The matching item if exactly 1 match found, null if no matches or multiple matches.
+     */
+    public <T> T find(String pattern, Map<String, ? extends T> items) {
+        String name = find(pattern, items.keySet());
+        if (name != null) {
+            return items.get(name);
+        }
+        return null;
+    }
+
+    /**
+     * Locates the best match for the given pattern in the given set of candidate items.
+     *
+     * @return The match if exactly 1 match found, null if no matches or multiple matches.
+     */
+    public String find(String pattern, Collection<String> items) {
+        this.pattern = pattern;
+        matches.clear();
+        candidates.clear();
+
+        if (items.contains(pattern)) {
+            matches.add(pattern);
+            return pattern;
+        }
+
+        if (pattern.length() == 0) {
+            return null;
+        }
+
+        Pattern camelCasePattern = getPatternForName(pattern);
+        Pattern normalisedCamelCasePattern = Pattern.compile(camelCasePattern.pattern(), Pattern.CASE_INSENSITIVE);
+        String normalisedPattern = pattern.toUpperCase();
+
+        Set<String> matches1 = new TreeSet<String>();
+        Set<String> matches2 = new TreeSet<String>();
+
+        for (String candidate : items) {
+            if (camelCasePattern.matcher(candidate).matches()) {
+                matches1.add(candidate);
+                continue;
+            }
+            if (normalisedCamelCasePattern.matcher(candidate).lookingAt()) {
+                matches2.add(candidate);
+                continue;
+            }
+            if (StringUtils.getLevenshteinDistance(normalisedPattern, candidate.toUpperCase()) <= Math.min(3, pattern.length() / 2)) {
+                candidates.add(candidate);
+            }
+        }
+
+        if (!matches1.isEmpty()) {
+            matches.addAll(matches1);
+        } else {
+            matches.addAll(matches2);
+        }
+
+        if (matches.size() == 1) {
+            return matches.first();
+        }
+
+        return null;
+    }
+
+    private static Pattern getPatternForName(String name) {
+        Pattern boundaryPattern = Pattern.compile("((^|\\p{Punct})\\p{javaLowerCase}+)|(\\p{javaUpperCase}\\p{javaLowerCase}*)");
+        Matcher matcher = boundaryPattern.matcher(name);
+        int pos = 0;
+        StringBuilder builder = new StringBuilder();
+        while (matcher.find()) {
+            String prefix = name.substring(pos, matcher.start());
+            if (prefix.length() > 0) {
+                builder.append(Pattern.quote(prefix));
+            }
+            builder.append(Pattern.quote(matcher.group()));
+            builder.append("[\\p{javaLowerCase}\\p{Digit}]*");
+            pos = matcher.end();
+        }
+        builder.append(Pattern.quote(name.substring(pos, name.length())));
+        return Pattern.compile(builder.toString());
+    }
+
+    /**
+     * Returns all matches, when there were more than 1.
+     *
+     * @return The matches. Returns an empty set when there are no matches.
+     */
+    public Set<String> getMatches() {
+        return matches;
+    }
+
+    /**
+     * Returns the potential matches, if any.
+     *
+     * @return The matches. Returns an empty set when there are no potential matches.
+     */
+    public Set<String> getCandidates() {
+        return candidates;
+    }
+
+    public String formatErrorMessage(String singularItemDescription, Object container) {
+        String capItem = StringUtils.capitalize(singularItemDescription);
+        if (!matches.isEmpty()) {
+            return String.format("%s '%s' is ambiguous in %s. Candidates are: %s.", capItem, pattern, container, GUtil.toString(matches));
+        }
+        if (!candidates.isEmpty()) {
+            return String.format("%s '%s' not found in %s. Some candidates are: %s.", capItem, pattern, container, GUtil.toString(candidates));
+        }
+        return String.format("%s '%s' not found in %s.", capItem, pattern, container);
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/NoOpChangeListener.java b/subprojects/core/src/main/groovy/org/gradle/util/NoOpChangeListener.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/NoOpChangeListener.java
rename to subprojects/core/src/main/groovy/org/gradle/util/NoOpChangeListener.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ObservableUrlClassLoader.java b/subprojects/core/src/main/groovy/org/gradle/util/ObservableUrlClassLoader.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/ObservableUrlClassLoader.java
rename to subprojects/core/src/main/groovy/org/gradle/util/ObservableUrlClassLoader.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/OperatingSystem.java b/subprojects/core/src/main/groovy/org/gradle/util/OperatingSystem.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/OperatingSystem.java
rename to subprojects/core/src/main/groovy/org/gradle/util/OperatingSystem.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/Path.java b/subprojects/core/src/main/groovy/org/gradle/util/Path.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/Path.java
rename to subprojects/core/src/main/groovy/org/gradle/util/Path.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/PosixUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/PosixUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/PosixUtil.java
rename to subprojects/core/src/main/groovy/org/gradle/util/PosixUtil.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/RandomLongIdGenerator.java b/subprojects/core/src/main/groovy/org/gradle/util/RandomLongIdGenerator.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/RandomLongIdGenerator.java
rename to subprojects/core/src/main/groovy/org/gradle/util/RandomLongIdGenerator.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ReflectionUtil.groovy b/subprojects/core/src/main/groovy/org/gradle/util/ReflectionUtil.groovy
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/ReflectionUtil.groovy
rename to subprojects/core/src/main/groovy/org/gradle/util/ReflectionUtil.groovy
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/TextUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/TextUtil.java
new file mode 100644
index 0000000..fc06fe0
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/TextUtil.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util;
+
+public class TextUtil {
+    /**
+     * The native line separator for the current platform (e.g. \n or \r\n).
+     */
+    public static final String LINE_SEPARATOR = System.getProperty("line.separator");
+
+    /**
+     * Replaces all line separators (\r, \n, \r\n) in the specified string with
+     * the platform's native line separator.
+     */
+    public static String toNativeLineSeparators(String str) {
+        return str.replaceAll("\r\n|\r|\n", LINE_SEPARATOR);
+    }
+}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/TimeProvider.java b/subprojects/core/src/main/groovy/org/gradle/util/TimeProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/TimeProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/util/TimeProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/TrueTimeProvider.java b/subprojects/core/src/main/groovy/org/gradle/util/TrueTimeProvider.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/TrueTimeProvider.java
rename to subprojects/core/src/main/groovy/org/gradle/util/TrueTimeProvider.java
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/UncheckedException.java b/subprojects/core/src/main/groovy/org/gradle/util/UncheckedException.java
similarity index 100%
rename from subprojects/gradle-core/src/main/groovy/org/gradle/util/UncheckedException.java
rename to subprojects/core/src/main/groovy/org/gradle/util/UncheckedException.java
diff --git a/subprojects/core/src/main/groovy/org/gradle/util/WrapUtil.java b/subprojects/core/src/main/groovy/org/gradle/util/WrapUtil.java
new file mode 100644
index 0000000..a59c062
--- /dev/null
+++ b/subprojects/core/src/main/groovy/org/gradle/util/WrapUtil.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.util;
+
+import java.util.*;
+
+/**
+ * Common methods to wrap objects in generic collections.
+ *
+ */
+public class WrapUtil {
+    /**
+     * Wraps the given items in a mutable unordered set.
+     */
+    public static <T> Set<T> toSet(T... items) {
+        Set<T> coll = new HashSet<T>();
+        Collections.addAll(coll, items);
+        return coll;
+    }
+
+    /**
+     * Wraps the given items in a mutable ordered set.
+     */
+    public static <T> Set<T> toLinkedSet(T... items) {
+        Set<T> coll = new LinkedHashSet<T>();
+        Collections.addAll(coll, items);
+        return coll;
+    }
+
+    /**
+     * Wraps the given items in a mutable sorted set.
+     */
+    public static <T> SortedSet<T> toSortedSet(T... items) {
+        SortedSet<T> coll = new TreeSet<T>();
+        Collections.addAll(coll, items);
+        return coll;
+    }
+
+    /**
+     * Wraps the given items in a mutable sorted set using the given comparator.
+     */
+    public static <T> SortedSet<T> toSortedSet(Comparator<T> comp, T... items) {
+        SortedSet<T> coll = new TreeSet<T>(comp);
+        Collections.addAll(coll, items);
+        return coll;
+    }
+
+    /**
+     * Wraps the given items in a mutable list.
+     */
+    public static <T> List<T> toList(T... items) {
+        ArrayList<T> coll = new ArrayList<T>();
+        Collections.addAll(coll, items);
+        return coll;
+    }
+
+    /**
+     * Wraps the given items in a mutable list.
+     */
+    public static <T> List<T> toList(Iterable<? extends T> items) {
+        ArrayList<T> coll = new ArrayList<T>();
+        for (T item : items) {
+            coll.add(item);
+        }
+        return coll;
+    }
+
+    /**
+     * Wraps the given key and value in a mutable unordered map.
+     */
+    public static <K, V> Map<K, V> toMap(K key, V value) {
+        Map<K, V> map = new HashMap<K, V>();
+        map.put(key, value);
+        return map;
+    }
+
+    /**
+     * Wraps the given key and value in a mutable sorted map.
+     */
+    public static <K, V> SortedMap<K, V> toSortedMap(K key, V value) {
+        SortedMap<K, V> map = new TreeMap<K, V>();
+        map.put(key, value);
+        return map;
+    }
+
+    /**
+     * Wraps the given key and value in a mutable ordered map.
+     */
+    public static <K, V> Map<K, V> toLinkedMap(K key, V value) {
+        Map<K, V> map = new LinkedHashMap<K, V>();
+        map.put(key, value);
+        return map;
+    }
+
+    /**
+     * Wraps the given key and value in a mutable properties instance.
+     */
+    public static Properties toProperties(String key, String value) {
+        Properties props = new Properties();
+        props.setProperty(key, value);
+        return props;
+    }
+
+    public static <T> T[] toArray(T... items) {
+        return items;
+    }
+}
diff --git a/subprojects/gradle-core/src/main/resources/org/gradle/configuration/default-imports.txt b/subprojects/core/src/main/resources/org/gradle/configuration/default-imports.txt
similarity index 100%
rename from subprojects/gradle-core/src/main/resources/org/gradle/configuration/default-imports.txt
rename to subprojects/core/src/main/resources/org/gradle/configuration/default-imports.txt
diff --git a/subprojects/gradle-core/src/main/resources/org/gradle/initialization/defaultBuildSourceScript.txt b/subprojects/core/src/main/resources/org/gradle/initialization/defaultBuildSourceScript.txt
similarity index 100%
rename from subprojects/gradle-core/src/main/resources/org/gradle/initialization/defaultBuildSourceScript.txt
rename to subprojects/core/src/main/resources/org/gradle/initialization/defaultBuildSourceScript.txt
diff --git a/subprojects/gradle-core/src/main/resources/org/gradle/profile/ProfileTemplate.html b/subprojects/core/src/main/resources/org/gradle/profile/ProfileTemplate.html
similarity index 100%
rename from subprojects/gradle-core/src/main/resources/org/gradle/profile/ProfileTemplate.html
rename to subprojects/core/src/main/resources/org/gradle/profile/ProfileTemplate.html
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/BuildExceptionReporterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/BuildExceptionReporterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/BuildExceptionReporterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/BuildExceptionReporterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/BuildResultLoggerTest.java b/subprojects/core/src/test/groovy/org/gradle/BuildResultLoggerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/BuildResultLoggerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/BuildResultLoggerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/BuildResultTest.java b/subprojects/core/src/test/groovy/org/gradle/BuildResultTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/BuildResultTest.java
rename to subprojects/core/src/test/groovy/org/gradle/BuildResultTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/StartParameterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/StartParameterTest.groovy
new file mode 100644
index 0000000..6cb1c99
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/StartParameterTest.groovy
@@ -0,0 +1,254 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle
+
+import static org.gradle.util.Matchers.*
+
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction
+import org.gradle.api.logging.LogLevel
+import org.gradle.execution.BuildExecuter
+import org.gradle.execution.DefaultBuildExecuter
+import org.gradle.execution.DryRunBuildExecuter
+import org.gradle.groovy.scripts.ScriptSource
+import org.gradle.groovy.scripts.StringScriptSource
+import org.gradle.groovy.scripts.UriScriptSource
+import org.gradle.initialization.BuildFileProjectSpec
+import org.gradle.initialization.DefaultProjectSpec
+import org.gradle.initialization.ProjectDirectoryProjectSpec
+import org.gradle.initialization.ProjectSpec
+import org.gradle.util.TemporaryFolder
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import org.gradle.util.SetSystemProperties
+
+/**
+ * @author Hans Dockter
+ */
+class StartParameterTest {
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+    @Rule
+    public SetSystemProperties systemProperties = new SetSystemProperties()
+
+    @Test public void testNewInstance() {
+        StartParameter testObj = new StartParameter()
+        testObj.settingsFile = 'settingsfile' as File
+        testObj.buildFile = 'buildfile' as File
+        testObj.taskNames = ['a']
+        testObj.projectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(true)
+        testObj.currentDir = new File('a')
+        testObj.searchUpwards = false
+        testObj.projectProperties = [a: 'a']
+        testObj.systemPropertiesArgs = [b: 'b']
+        testObj.gradleUserHomeDir = new File('b')
+        testObj.initScripts = [new File('init script'), new File("/path/to/another init script")]
+        testObj.cacheUsage = CacheUsage.ON
+        testObj.logLevel = LogLevel.WARN
+        testObj.colorOutput = false
+
+        StartParameter startParameter = testObj.newInstance()
+        assertEquals(testObj, startParameter)
+    }
+
+    @Test public void testDefaultValues() {
+        StartParameter parameter = new StartParameter();
+        assertThat(parameter.gradleUserHomeDir, equalTo(StartParameter.DEFAULT_GRADLE_USER_HOME))
+        assertThat(parameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
+
+        assertThat(parameter.buildFile, nullValue())
+        assertThat(parameter.settingsScriptSource, nullValue())
+
+        assertThat(parameter.logLevel, equalTo(LogLevel.LIFECYCLE))
+        assertTrue(parameter.colorOutput)
+        assertThat(parameter.taskNames, isEmpty())
+        assertThat(parameter.excludedTaskNames, isEmpty())
+        assertThat(parameter.projectProperties, isEmptyMap())
+        assertThat(parameter.systemPropertiesArgs, isEmptyMap())
+        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
+        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(parameter.currentDir)))
+        assertFalse(parameter.dryRun)
+    }
+
+    @Test public void testDefaultWithGradleUserHomeSystemProp() {
+        File gradleUserHome = tmpDir.file("someGradleUserHomePath")
+        System.setProperty(StartParameter.GRADLE_USER_HOME_PROPERTY_KEY, gradleUserHome.absolutePath)
+        StartParameter parameter = new StartParameter();
+        assertThat(parameter.gradleUserHomeDir, equalTo(gradleUserHome))
+    }
+
+    @Test public void testSetCurrentDir() {
+        StartParameter parameter = new StartParameter()
+        File dir = new File('current')
+        parameter.currentDir = dir
+
+        assertThat(parameter.currentDir, equalTo(dir.canonicalFile))
+        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(dir.canonicalFile)))
+    }
+
+    @Test public void testSetBuildFile() {
+        StartParameter parameter = new StartParameter()
+        File file = new File('test/build file')
+        parameter.buildFile = file
+
+        assertThat(parameter.buildFile, equalTo(file.canonicalFile))
+        assertThat(parameter.currentDir, equalTo(file.canonicalFile.parentFile))
+        assertThat(parameter.defaultProjectSelector, reflectionEquals(new BuildFileProjectSpec(file.canonicalFile)))
+    }
+
+    @Test public void testSetNullBuildFile() {
+        StartParameter parameter = new StartParameter()
+        parameter.buildFile = new File('test/build file')
+        parameter.buildFile = null
+
+        assertThat(parameter.buildFile, nullValue())
+        assertThat(parameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
+        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(parameter.currentDir)))
+        assertThat(parameter.initScripts, equalTo(Collections.emptyList()))
+    }
+
+    @Test public void testSetProjectDir() {
+        StartParameter parameter = new StartParameter()
+        File file = new File('test/project dir')
+        parameter.projectDir = file
+
+        assertThat(parameter.currentDir, equalTo(file.canonicalFile))
+        assertThat(parameter.defaultProjectSelector, reflectionEquals(new ProjectDirectoryProjectSpec(file.canonicalFile)))
+    }
+
+    @Test public void testSetNullProjectDir() {
+        StartParameter parameter = new StartParameter()
+        parameter.projectDir = new File('test/project dir')
+        parameter.projectDir = null
+
+        assertThat(parameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
+        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(parameter.currentDir)))
+    }
+
+    @Test public void testSetSettingsFile() {
+        StartParameter parameter = new StartParameter()
+        File file = new File('some dir/settings file')
+        parameter.settingsFile = file
+
+        assertThat(parameter.currentDir, equalTo(file.canonicalFile.parentFile))
+        assertThat(parameter.settingsScriptSource, instanceOf(UriScriptSource.class))
+        assertThat(parameter.settingsScriptSource.resource.file, equalTo(file.canonicalFile))
+    }
+
+    @Test public void testSetNullSettingsFile() {
+        StartParameter parameter = new StartParameter()
+        parameter.settingsFile = null
+
+        assertThat(parameter.settingsScriptSource, nullValue())
+    }
+
+    @Test public void testSetSettingsScriptSource() {
+        StartParameter parameter = new StartParameter()
+        parameter.settingsFile = new File('settings file')
+
+        ScriptSource scriptSource = {} as ScriptSource
+
+        parameter.settingsScriptSource = scriptSource
+
+        assertThat(parameter.settingsScriptSource, sameInstance(scriptSource))
+    }
+
+    @Test public void testSetTaskNames() {
+        StartParameter parameter = new StartParameter()
+        parameter.taskNames = ['a', 'b']
+        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
+        assertThat(parameter.buildExecuter.delegate.names, equalTo(['a', 'b']))
+    }
+
+    @Test public void testSetTaskNamesUsesDefaultExecuter() {
+        StartParameter parameter = new StartParameter()
+
+        parameter.setBuildExecuter({} as BuildExecuter)
+        parameter.taskNames = []
+        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
+    }
+
+    @Test public void testSetExcludedTaskNames() {
+        StartParameter parameter = new StartParameter()
+        parameter.excludedTaskNames = ['a', 'b']
+        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
+        assertThat(parameter.buildExecuter.excludedTaskNames, equalTo(['a', 'b'] as Set))
+    }
+
+    @Test public void testUseEmbeddedBuildFile() {
+        StartParameter parameter = new StartParameter();
+        parameter.useEmbeddedBuildFile("<content>")
+        assertThat(parameter.buildScriptSource, instanceOf(StringScriptSource.class))
+        assertThat(parameter.buildScriptSource.resource.text, equalTo("<content>"))
+        assertThat(parameter.settingsScriptSource, instanceOf(StringScriptSource.class))
+        assertThat(parameter.settingsScriptSource.resource.text, equalTo(""))
+        assertThat(parameter.searchUpwards, equalTo(false))
+    }
+
+    @Test public void testSetNullUserHomeDir() {
+        StartParameter parameter = new StartParameter()
+        parameter.gradleUserHomeDir = null
+        assertThat(parameter.gradleUserHomeDir, equalTo(StartParameter.DEFAULT_GRADLE_USER_HOME))
+    }
+
+    @Test public void testWrapsExecuterWhenDryRunIsTrue() {
+        StartParameter parameter = new StartParameter()
+        def originalExecuter = [:] as BuildExecuter
+        parameter.buildExecuter = originalExecuter
+        parameter.dryRun = true
+        assertThat(parameter.buildExecuter, instanceOf(DryRunBuildExecuter))
+        assertThat(parameter.buildExecuter.delegate, sameInstance(originalExecuter))
+        parameter.dryRun = false
+        assertThat(parameter.buildExecuter, sameInstance(originalExecuter))
+    }
+
+    @Test public void testNewBuild() {
+        StartParameter parameter = new StartParameter()
+
+        // Copied properties
+        parameter.gradleUserHomeDir = new File("home")
+        parameter.cacheUsage = CacheUsage.REBUILD
+        parameter.logLevel = LogLevel.DEBUG
+        parameter.colorOutput = false
+
+        // Non-copied
+        parameter.currentDir = new File("other")
+        parameter.buildFile = new File("build file")
+        parameter.settingsFile = new File("settings file")
+        parameter.taskNames = ['task1']
+        parameter.excludedTaskNames = ['excluded1']
+        parameter.defaultProjectSelector = [:] as ProjectSpec
+        parameter.dryRun = true
+
+        StartParameter newParameter = parameter.newBuild();
+
+        assertThat(newParameter, not(equalTo(parameter)));
+
+        assertThat(newParameter.gradleUserHomeDir, equalTo(parameter.gradleUserHomeDir));
+        assertThat(newParameter.cacheUsage, equalTo(parameter.cacheUsage));
+        assertThat(newParameter.logLevel, equalTo(parameter.logLevel));
+        assertThat(newParameter.colorOutput, equalTo(parameter.colorOutput));
+
+        assertThat(newParameter.buildFile, nullValue())
+        assertThat(newParameter.taskNames, isEmpty())
+        assertThat(newParameter.excludedTaskNames, isEmpty())
+        assertThat(newParameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
+        assertThat(newParameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(newParameter.currentDir)))
+        assertFalse(newParameter.dryRun)
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/TaskExecutionLoggerTest.java b/subprojects/core/src/test/groovy/org/gradle/TaskExecutionLoggerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/TaskExecutionLoggerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/TaskExecutionLoggerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/AllGradleExceptionsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/AllGradleExceptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/AllGradleExceptionsTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/AllGradleExceptionsTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/GeneratorTaskTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/GeneratorTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/GeneratorTaskTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/GeneratorTaskTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/JavaVersionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/JavaVersionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/JavaVersionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/JavaVersionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/artifacts/PublishInstructionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/artifacts/PublishInstructionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/artifacts/PublishInstructionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/artifacts/PublishInstructionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingTest.java b/subprojects/core/src/test/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/artifacts/maven/Conf2ScopeMappingTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/artifacts/specs/DependencySpecsTest.java b/subprojects/core/src/test/groovy/org/gradle/api/artifacts/specs/DependencySpecsTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/artifacts/specs/DependencySpecsTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/artifacts/specs/DependencySpecsTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/file/FileVisitorUtil.groovy b/subprojects/core/src/test/groovy/org/gradle/api/file/FileVisitorUtil.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/file/FileVisitorUtil.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/file/FileVisitorUtil.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AbstractClassGeneratorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/AbstractClassGeneratorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AbstractClassGeneratorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/AbstractClassGeneratorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AbstractDynamicObjectTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/AbstractDynamicObjectTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AbstractDynamicObjectTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/AbstractDynamicObjectTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AsmBackedClassGeneratorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/AsmBackedClassGeneratorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AsmBackedClassGeneratorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/AsmBackedClassGeneratorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/AutoCreateDomainObjectContainerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/CachingDirectedGraphWalkerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/CachingDirectedGraphWalkerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/CachingDirectedGraphWalkerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/CachingDirectedGraphWalkerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/ChainingTransformerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/ChainingTransformerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/ChainingTransformerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/ChainingTransformerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/ConventionAwareHelperTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/ConventionAwareHelperTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/ConventionAwareHelperTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/ConventionAwareHelperTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultAutoCreateDomainObjectContainerSpec.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultAutoCreateDomainObjectContainerSpec.groovy
new file mode 100644
index 0000000..de9aba5
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultAutoCreateDomainObjectContainerSpec.groovy
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal
+
+import spock.lang.Specification
+import org.gradle.api.NamedDomainObjectFactory
+
+class DefaultAutoCreateDomainObjectContainerSpec extends Specification {
+    final NamedDomainObjectFactory<String> factory = Mock()
+    final ClassGenerator classGenerator = Mock()
+
+    def usesFactoryToCreateContainerElements() {
+        def container = new DefaultAutoCreateDomainObjectContainer<String>(String.class, classGenerator, factory)
+
+        when:
+        def result = container.add('a')
+
+        then:
+        result == 'element a'
+        1 * factory.create('a') >> 'element a'
+        0 * _._
+    }
+
+    def usesPublicConstructorWhenNoFactorySupplied() {
+        def container = new DefaultAutoCreateDomainObjectContainer<String>(String.class, classGenerator)
+
+        when:
+        def result = container.add('a')
+
+        then:
+        result == 'a'
+        0 * _._
+    }
+
+    def usesClosureToCreateContainerElements() {
+        def cl = { name -> "element $name" as String }
+        def container = new DefaultAutoCreateDomainObjectContainer<String>(String.class, classGenerator, cl)
+
+        when:
+        def result = container.add('a')
+
+        then:
+        result == 'element a'
+        0 * _._
+    }
+}
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultDomainObjectContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultDomainObjectContainerTest.java
new file mode 100644
index 0000000..0be7f99
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultDomainObjectContainerTest.java
@@ -0,0 +1,370 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal;
+
+import org.gradle.api.Action;
+import org.gradle.api.DomainObjectCollection;
+import org.gradle.api.specs.Spec;
+import org.gradle.util.HelperUtil;
+import org.gradle.util.TestClosure;
+import org.hamcrest.Description;
+import org.jmock.Expectations;
+import org.jmock.api.Invocation;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Iterator;
+
+import static org.gradle.util.WrapUtil.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+ at RunWith(JMock.class)
+public class DefaultDomainObjectContainerTest {
+    private final JUnit4Mockery context = new JUnit4Mockery();
+    private final DefaultDomainObjectContainer<CharSequence> container = new DefaultDomainObjectContainer<CharSequence>(CharSequence.class);
+
+    @Test
+    public void canGetAllDomainObjectsForEmptyCollection() {
+        assertTrue(container.getAll().isEmpty());
+    }
+
+    @Test
+    public void canGetAllDomainObjectsOrderedByOrderAdded() {
+        container.addObject("b");
+        container.addObject("a");
+        container.addObject("c");
+
+        assertThat(container.getAll(), equalTo(toLinkedSet((CharSequence) "b", "a", "c")));
+    }
+
+    @Test
+    public void canIterateOverEmptyCollection() {
+        Iterator<CharSequence> iterator = container.iterator();
+        assertFalse(iterator.hasNext());
+    }
+
+    @Test
+    public void canIterateOverDomainObjectsOrderedByOrderAdded() {
+        container.addObject("b");
+        container.addObject("a");
+        container.addObject("c");
+
+        Iterator<CharSequence> iterator = container.iterator();
+        assertThat(iterator.next(), equalTo((CharSequence) "b"));
+        assertThat(iterator.next(), equalTo((CharSequence) "a"));
+        assertThat(iterator.next(), equalTo((CharSequence) "c"));
+        assertFalse(iterator.hasNext());
+    }
+
+    @Test
+    public void canGetAllMatchingDomainObjectsOrderedByOrderAdded() {
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return !element.equals("b");
+            }
+        };
+
+        container.addObject("a");
+        container.addObject("b");
+        container.addObject("c");
+
+        assertThat(container.findAll(spec), equalTo(toLinkedSet((CharSequence) "a", "c")));
+    }
+
+    @Test
+    public void getAllMatchingDomainObjectsReturnsEmptySetWhenNoMatches() {
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return false;
+            }
+        };
+
+        container.addObject("a");
+
+        assertTrue(container.findAll(spec).isEmpty());
+    }
+
+    @Test
+    public void canGetFilteredCollectionContainingAllObjectsWhichMeetSpec() {
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return !element.equals("b");
+            }
+        };
+        TestClosure testClosure = new TestClosure() {
+            public Object call(Object param) {
+                return !param.equals("b");    
+            }
+        };
+
+        container.addObject("a");
+        container.addObject("b");
+        container.addObject("c");
+
+        assertThat(container.matching(spec).getAll(), equalTo(toLinkedSet((CharSequence) "a", "c")));
+        assertThat(container.matching(HelperUtil.toClosure(testClosure)).getAll(), equalTo(toLinkedSet((CharSequence) "a", "c")));
+    }
+
+    @Test
+    public void canGetFilteredCollectionContainingAllObjectsWhichHaveType() {
+        container.addObject("c");
+        container.addObject("a");
+        container.addObject(new StringBuffer("b"));
+
+        assertThat(container.withType(CharSequence.class).getAll(), equalTo(container.getAll()));
+        assertThat(container.withType(String.class).getAll(), equalTo(toLinkedSet("c", "a")));
+    }
+
+    @Test
+    public void canExecuteActionForAllElementsInATypeFilteredCollection() {
+        final Action<CharSequence> action = context.mock(Action.class);
+
+        container.addObject("c");
+        container.addObject(new StringBuffer("b"));
+
+        context.checking(new Expectations(){{
+            one(action).execute("c");
+            one(action).execute("a");
+        }});
+
+        container.withType(String.class, action);
+        container.addObject("a");
+    }
+
+    @Test
+    public void canExecuteClosureForAllElementsInATypeFilteredCollection() {
+        final TestClosure closure = context.mock(TestClosure.class);
+
+        container.addObject("c");
+        container.addObject(new StringBuffer("b"));
+
+        context.checking(new Expectations(){{
+            one(closure).call("c");
+            one(closure).call("a");
+        }});
+        
+        container.withType(String.class, HelperUtil.toClosure(closure));
+        container.addObject("a");
+    }
+
+    @Test
+    public void filteredCollectionIsLive() {
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return !element.equals("a");
+            }
+        };
+
+        container.addObject("a");
+
+        DomainObjectCollection<CharSequence> filteredCollection = container.matching(spec);
+        assertTrue(filteredCollection.getAll().isEmpty());
+
+        container.addObject("b");
+        container.addObject("c");
+
+        assertThat(filteredCollection.getAll(), equalTo(toLinkedSet((CharSequence) "b", "c")));
+    }
+
+    @Test
+    public void filteredCollectionExecutesActionWhenMatchingObjectAdded() {
+        final Action<CharSequence> action = context.mock(Action.class);
+
+        context.checking(new Expectations() {{
+            one(action).execute("a");
+        }});
+
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return !element.equals("b");
+            }
+        };
+
+        container.matching(spec).whenObjectAdded(action);
+
+        container.addObject("a");
+        container.addObject("b");
+    }
+
+    @Test
+    public void filteredCollectionExecutesClosureWhenMatchingObjectAdded() {
+        final TestClosure closure = context.mock(TestClosure.class);
+
+        context.checking(new Expectations() {{
+            one(closure).call("a");
+        }});
+
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return !element.equals("b");
+            }
+        };
+
+        container.matching(spec).whenObjectAdded(HelperUtil.toClosure(closure));
+
+        container.addObject("a");
+        container.addObject("b");
+    }
+
+    @Test
+    public void canChainFilteredCollections() {
+        Spec<CharSequence> spec = new Spec<CharSequence>() {
+            public boolean isSatisfiedBy(CharSequence element) {
+                return !element.equals("b");
+            }
+        };
+        Spec<String> spec2 = new Spec<String>() {
+            public boolean isSatisfiedBy(String element) {
+                return !element.equals("c");
+            }
+        };
+
+        container.addObject("a");
+        container.addObject("b");
+        container.addObject("c");
+        container.addObject(new StringBuffer("d"));
+
+        DomainObjectCollection<String> collection = container.matching(spec).withType(String.class).matching(spec2);
+        assertThat(collection.getAll(), equalTo(toSet("a")));
+    }
+
+    @Test
+    public void callsActionWhenObjectAdded() {
+        final Action<CharSequence> action = context.mock(Action.class);
+
+        context.checking(new Expectations() {{
+            one(action).execute("a");
+        }});
+
+        container.whenObjectAdded(action);
+        container.addObject("a");
+    }
+
+    @Test
+    public void callsClosureWithNewObjectAsParameterWhenObjectAdded() {
+        final TestClosure closure = context.mock(TestClosure.class);
+
+        context.checking(new Expectations() {{
+            one(closure).call("a");
+        }});
+
+        container.whenObjectAdded(HelperUtil.toClosure(closure));
+        container.addObject("a");
+    }
+
+    @Test
+    public void callsClosureWithNewObjectAsDelegateWhenObjectAdded() {
+        container.whenObjectAdded(HelperUtil.toClosure("{ assert delegate == 'a' }"));
+        container.addObject("a");
+    }
+
+    @Test
+    public void callsActionWhenObjectRemoved() {
+        final Action<CharSequence> action = context.mock(Action.class);
+        final String original = "a";
+
+        context.checking(new Expectations() {{
+            one(action).execute(with(sameInstance(original)));
+        }});
+
+        container.whenObjectRemoved(action);
+        container.addObject(original);
+        container.addObject("a");
+    }
+
+    @Test
+    public void allCallsActionForEachExistingObject() {
+        final Action<CharSequence> action = context.mock(Action.class);
+
+        context.checking(new Expectations() {{
+            one(action).execute("a");
+        }});
+
+        container.addObject("a");
+        container.all(action);
+    }
+
+    @Test
+    public void allCallsClosureForEachExistingObject() {
+        final TestClosure closure = context.mock(TestClosure.class);
+
+        context.checking(new Expectations() {{
+            one(closure).call("a");
+        }});
+
+        container.addObject("a");
+        container.all(HelperUtil.toClosure(closure));
+    }
+
+    @Test
+    public void allCallsActionForEachNewObject() {
+        final Action<CharSequence> action = context.mock(Action.class);
+
+        context.checking(new Expectations() {{
+            one(action).execute("a");
+        }});
+
+        container.all(action);
+        container.addObject("a");
+    }
+
+    @Test
+    public void allCallsClosureForEachNewObject() {
+        final TestClosure closure = context.mock(TestClosure.class);
+
+        context.checking(new Expectations() {{
+            one(closure).call("a");
+        }});
+
+        container.all(HelperUtil.toClosure(closure));
+        container.addObject("a");
+    }
+
+    @Test
+    public void allCallsClosureWithObjectAsDelegate() {
+        container.all(HelperUtil.toClosure(" { assert delegate == 'a' } "));
+        container.addObject("a");
+    }
+
+    @Test
+    public void allCallsActionForEachNewObjectAddedByTheAction() {
+        final Action<CharSequence> action = context.mock(Action.class);
+
+        context.checking(new Expectations() {{
+            one(action).execute("a");
+            will(new org.jmock.api.Action() {
+                public Object invoke(Invocation invocation) throws Throwable {
+                    container.addObject("c");
+                    return null;
+                }
+
+                public void describeTo(Description description) {
+                    description.appendText("add 'c'");
+                }
+            });
+            one(action).execute("b");
+            one(action).execute("c");
+        }});
+
+        container.addObject("a");
+        container.addObject("b");
+        container.all(action);
+    }
+
+}
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainerTest.java
new file mode 100644
index 0000000..0b64cad
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainerTest.java
@@ -0,0 +1,664 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal;
+
+import groovy.lang.Closure;
+import groovy.lang.MissingPropertyException;
+import org.gradle.api.Action;
+import org.gradle.api.DomainObjectCollection;
+import org.gradle.api.Rule;
+import org.gradle.api.UnknownDomainObjectException;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.specs.Specs;
+import org.gradle.util.*;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Iterator;
+
+import static org.gradle.util.HelperUtil.*;
+import static org.gradle.util.WrapUtil.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+ at RunWith(JMock.class)
+public class DefaultNamedDomainObjectContainerTest {
+    private final ClassGenerator classGenerator = new AsmBackedClassGenerator();
+    private final DefaultNamedDomainObjectContainer<Bean> container = classGenerator.newInstance(DefaultNamedDomainObjectContainer.class, Bean.class, classGenerator);
+    private final JUnit4Mockery context = new JUnit4Mockery();
+
+    @Test
+    public void usesTypeNameToGenerateDisplayName() {
+        assertThat(container.getTypeDisplayName(), equalTo("Bean"));
+        assertThat(container.getDisplayName(), equalTo("Bean container"));
+    }
+
+    @Test
+    public void canGetAllDomainObjectsForEmptyContainer() {
+        assertTrue(container.getAll().isEmpty());
+    }
+
+    @Test
+    public void canGetAllDomainObjectsOrderedByName() {
+        Bean bean1 = new Bean();
+        Bean bean2 = new Bean();
+        Bean bean3 = new Bean();
+
+        container.addObject("b", bean2);
+        container.addObject("a", bean1);
+        container.addObject("c", bean3);
+
+        assertThat(container.getAll(), equalTo(toLinkedSet(bean1, bean2, bean3)));
+    }
+
+    @Test
+    public void canIterateOverEmptyContainer() {
+        Iterator<Bean> iterator = container.iterator();
+        assertFalse(iterator.hasNext());
+    }
+
+    @Test
+    public void canIterateOverDomainObjectsOrderedByName() {
+        Bean bean1 = new Bean();
+        Bean bean2 = new Bean();
+        Bean bean3 = new Bean();
+
+        container.addObject("b", bean2);
+        container.addObject("a", bean1);
+        container.addObject("c", bean3);
+
+        Iterator<Bean> iterator = container.iterator();
+        assertThat(iterator.next(), sameInstance(bean1));
+        assertThat(iterator.next(), sameInstance(bean2));
+        assertThat(iterator.next(), sameInstance(bean3));
+        assertFalse(iterator.hasNext());
+    }
+
+    @Test
+    public void canGetAllDomainObjectsAsMapForEmptyContainer() {
+        assertTrue(container.getAsMap().isEmpty());
+    }
+
+    @Test
+    public void canGetAllDomainObjectsAsMap() {
+        Bean bean1 = new Bean();
+        Bean bean2 = new Bean();
+        Bean bean3 = new Bean();
+
+        container.addObject("b", bean2);
+        container.addObject("a", bean1);
+        container.addObject("c", bean3);
+
+        assertThat(container.getAsMap(), equalTo(GUtil.map("a", bean1, "b", bean2, "c", bean3)));
+    }
+
+    @Test
+    public void canGetAllMatchingDomainObjectsOrderedByName() {
+        Bean bean1 = new Bean();
+        final Bean bean2 = new Bean();
+        Bean bean3 = new Bean();
+
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element == bean2;
+            }
+        };
+
+        container.addObject("a", bean1);
+        container.addObject("b", bean2);
+        container.addObject("c", bean3);
+
+        assertThat(container.findAll(spec), equalTo(toLinkedSet(bean2)));
+    }
+
+    @Test
+    public void getAllMatchingDomainObjectsReturnsEmptySetWhenNoMatches() {
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return false;
+            }
+        };
+
+        container.addObject("a", new Bean());
+
+        assertTrue(container.findAll(spec).isEmpty());
+    }
+
+    @Test
+    public void canGetFilteredCollectionContainingAllObjectsWhichMeetSpec() {
+        final Bean bean1 = new Bean();
+        Bean bean2 = new Bean();
+        Bean bean3 = new Bean();
+
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element != bean1;
+            }
+        };
+
+        TestClosure testClosure = new TestClosure() {
+            public Object call(Object param) {
+                return param != bean1;
+            }
+        };
+
+        container.addObject("a", bean1);
+        container.addObject("b", bean2);
+        container.addObject("c", bean3);
+
+        assertThat(container.matching(spec).getAll(), equalTo(toLinkedSet(bean2, bean3)));
+        assertThat(container.matching(HelperUtil.toClosure(testClosure)).getAll(), equalTo(toLinkedSet(bean2, bean3)));
+        assertThat(container.matching(spec).findByName("a"), nullValue());
+        assertThat(container.matching(spec).findByName("b"), sameInstance(bean2));
+    }
+
+    @Test
+    public void canGetFilteredCollectionContainingAllObjectsWhichHaveType() {
+        class OtherBean extends Bean {
+        }
+        Bean bean1 = new Bean();
+        OtherBean bean2 = new OtherBean();
+        Bean bean3 = new Bean();
+
+        container.addObject("c", bean3);
+        container.addObject("a", bean1);
+        container.addObject("b", bean2);
+
+        assertThat(container.withType(Bean.class).getAll(), equalTo(toLinkedSet(bean1, bean2, bean3)));
+        assertThat(container.withType(OtherBean.class).getAll(), equalTo(toLinkedSet(bean2)));
+        assertThat(container.withType(OtherBean.class).findByName("a"), nullValue());
+        assertThat(container.withType(OtherBean.class).findByName("b"), sameInstance(bean2));
+    }
+
+    @Test
+    public void canExecuteActionForAllElementsInATypeFilteredCollection() {
+        class OtherBean extends Bean {
+        }
+        final Action<OtherBean> action = context.mock(Action.class);
+        Bean bean1 = new Bean();
+        final OtherBean bean2 = new OtherBean();
+
+        container.addObject("a", bean1);
+        container.addObject("b", bean2);
+
+        context.checking(new Expectations(){{
+            one(action).execute(bean2);
+        }});
+
+        container.withType(OtherBean.class, action);
+    }
+
+    @Test
+    public void canExecuteClosureForAllElementsInATypeFilteredCollection() {
+        class OtherBean extends Bean {
+        }
+        final TestClosure closure = context.mock(TestClosure.class);
+        Bean bean1 = new Bean();
+        final OtherBean bean2 = new OtherBean();
+
+        container.addObject("a", bean1);
+        container.addObject("b", bean2);
+
+        context.checking(new Expectations(){{
+            one(closure).call(bean2);
+        }});
+
+        container.withType(OtherBean.class, HelperUtil.toClosure(closure));
+    }
+
+    @Test
+    public void filteredCollectionIsLive() {
+        final Bean bean1 = new Bean();
+        Bean bean2 = new Bean();
+        Bean bean3 = new Bean();
+        Bean bean4 = new Bean();
+
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element != bean1;
+            }
+        };
+
+        container.addObject("a", bean1);
+
+        DomainObjectCollection<Bean> filteredCollection = container.matching(spec);
+        assertTrue(filteredCollection.getAll().isEmpty());
+
+        container.addObject("b", bean2);
+        container.addObject("c", bean3);
+
+        assertThat(filteredCollection.getAll(), equalTo(toLinkedSet(bean2, bean3)));
+
+        container.addObject("c", bean4);
+
+        assertThat(filteredCollection.getAll(), equalTo(toLinkedSet(bean2, bean4)));
+    }
+
+    @Test
+    public void filteredCollectionExecutesActionWhenMatchingObjectAdded() {
+        final Action<Bean> action = context.mock(Action.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(action).execute(bean);
+        }});
+
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element == bean;
+            }
+        };
+
+        container.matching(spec).whenObjectAdded(action);
+
+        container.addObject("bean", bean);
+        container.addObject("bean2", new Bean());
+    }
+
+    @Test
+    public void filteredCollectionExecutesClosureWhenMatchingObjectAdded() {
+        final TestClosure closure = context.mock(TestClosure.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(closure).call(bean);
+        }});
+
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element == bean;
+            }
+        };
+
+        container.matching(spec).whenObjectAdded(HelperUtil.toClosure(closure));
+
+        container.addObject("bean", bean);
+        container.addObject("bean2", new Bean());
+    }
+
+    @Test
+    public void canChainFilteredCollections() {
+        final Bean bean = new Bean();
+        final Bean bean2 = new Bean();
+        final Bean bean3 = new Bean();
+
+        Spec<Bean> spec = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element != bean;
+            }
+        };
+        Spec<Bean> spec2 = new Spec<Bean>() {
+            public boolean isSatisfiedBy(Bean element) {
+                return element != bean2;
+            }
+        };
+
+        container.addObject("a", bean);
+        container.addObject("b", bean2);
+        container.addObject("c", bean3);
+
+        DomainObjectCollection<Bean> collection = container.matching(spec).matching(spec2);
+        assertThat(collection.getAll(), equalTo(toSet(bean3)));
+    }
+
+    @Test
+    public void canGetDomainObjectByName() {
+        Bean bean = new Bean();
+        container.addObject("a", bean);
+
+        assertThat(container.getByName("a"), sameInstance(bean));
+        assertThat(container.getAt("a"), sameInstance(bean));
+    }
+
+    @Test
+    public void getDomainObjectByNameFailsForUnknownDomainObject() {
+        try {
+            container.getByName("unknown");
+            fail();
+        } catch (UnknownDomainObjectException e) {
+            assertThat(e.getMessage(), equalTo("Bean with name 'unknown' not found."));
+        }
+    }
+
+    @Test
+    public void getDomainObjectInvokesRuleForUnknownDomainObject() {
+        Bean bean = new Bean();
+        addRuleFor(bean);
+
+        assertThat(container.getByName("bean"), sameInstance(bean));
+    }
+
+    @Test
+    public void canConfigureDomainObjectByName() {
+        Bean bean = new Bean();
+        container.addObject("a", bean);
+
+        assertThat(container.getByName("a", toClosure("{ beanProperty = 'hi' }")), sameInstance(bean));
+        assertThat(bean.getBeanProperty(), equalTo("hi"));
+    }
+
+    @Test
+    public void configureDomainObjectInvokesRuleForUnknownDomainObject() {
+        Bean bean = new Bean();
+        addRuleFor(bean);
+
+        assertThat(container.getByName("bean", toClosure("{ beanProperty = 'hi' }")), sameInstance(bean));
+        assertThat(bean.getBeanProperty(), equalTo("hi"));
+    }
+
+    @Test
+    public void canFindDomainObjectByName() {
+        Bean bean = new Bean();
+        container.addObject("a", bean);
+
+        assertThat(container.findByName("a"), sameInstance(bean));
+    }
+
+    @Test
+    public void findDomainObjectByNameReturnsNullForUnknownDomainObject() {
+        assertThat(container.findByName("a"), nullValue());
+    }
+
+    @Test
+    public void findDomainObjectByNameInvokesRulesForUnknownDomainObject() {
+        Bean bean = new Bean();
+        addRuleFor(bean);
+
+        assertThat(container.findByName("bean"), sameInstance(bean));
+    }
+
+    @Test
+    public void findDomainObjectByNameInvokesNestedRulesOnlyOnceForUnknownDomainObject() {
+        final Bean bean1 = new Bean();
+        final Bean bean2 = new Bean();
+        container.addRule(new Rule() {
+            public String getDescription() {
+                return "rule1";
+            }
+
+            public void apply(String domainObjectName) {
+                if (domainObjectName.equals("bean1")) {
+                    container.addObject("bean1", bean1);
+                }
+            }
+        });
+        container.addRule(new Rule() {
+            private boolean applyHasBeenCalled;
+
+            public String getDescription() {
+                return "rule2";
+            }
+
+            public void apply(String domainObjectName) {
+                if (domainObjectName.equals("bean2")) {
+                    assertThat(applyHasBeenCalled, equalTo(false));
+                    container.findByName("bean1");
+                    container.findByName("bean2");
+                    container.addObject("bean2", bean2);
+                    applyHasBeenCalled = true;
+                }
+            }
+        });
+        container.findByName("bean2");
+        assertThat(container.getAll(), equalTo(WrapUtil.toSet(bean1, bean2)));
+    }
+
+    @Test
+    public void callsActionWhenObjectAdded() {
+        final Action<Bean> action = context.mock(Action.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(action).execute(bean);
+        }});
+
+        container.whenObjectAdded(action);
+        container.addObject("bean", bean);
+    }
+
+    @Test
+    public void callsClosureWhenObjectAdded() {
+        final TestClosure closure = context.mock(TestClosure.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(closure).call(bean);
+        }});
+
+        container.whenObjectAdded(HelperUtil.toClosure(closure));
+        container.addObject("bean", bean);
+    }
+
+    @Test
+    public void callsActionWhenObjectRemoved() {
+        final Action<Bean> action = context.mock(Action.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(action).execute(bean);
+        }});
+
+        container.whenObjectRemoved(action);
+        container.addObject("bean", bean);
+        container.addObject("bean", new Bean());
+    }
+
+    @Test
+    public void allCallsActionForEachExistingObject() {
+        final Action<Bean> action = context.mock(Action.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(action).execute(bean);
+        }});
+
+        container.addObject("bean", bean);
+        container.all(action);
+    }
+
+    @Test
+    public void allCallsClosureForEachExistingObject() {
+        final TestClosure closure = context.mock(TestClosure.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(closure).call(bean);
+        }});
+
+        container.addObject("bean", bean);
+        container.all(HelperUtil.toClosure(closure));
+    }
+
+    @Test
+    public void allCallsActionForEachNewObject() {
+        final Action<Bean> action = context.mock(Action.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(action).execute(bean);
+        }});
+
+        container.all(action);
+        container.addObject("bean", bean);
+    }
+
+    @Test
+    public void allCallsClosureForEachNewObject() {
+        final TestClosure closure = context.mock(TestClosure.class);
+        final Bean bean = new Bean();
+
+        context.checking(new Expectations() {{
+            one(closure).call(bean);
+        }});
+
+        container.all(HelperUtil.toClosure(closure));
+        container.addObject("bean", bean);
+    }
+
+    @Test
+    public void eachObjectIsAvailableAsADynamicProperty() {
+        Bean bean = new Bean();
+        container.addObject("child", bean);
+        assertTrue(container.getAsDynamicObject().hasProperty("child"));
+        assertThat(container.getAsDynamicObject().getProperty("child"), sameInstance((Object) bean));
+        assertThat(container.getAsDynamicObject().getProperties().get("child"), sameInstance((Object) bean));
+        assertThat(call("{ it.child }", container), sameInstance((Object) bean));
+        assertThat(call("{ it.child }", container.withType(Bean.class)), sameInstance((Object) bean));
+        assertThat(call("{ it.child }", container.matching(Specs.satisfyAll())), sameInstance((Object) bean));
+    }
+
+    @Test
+    public void eachObjectIsAvailableUsingAnIndex() {
+        Bean bean = new Bean();
+        container.addObject("child", bean);
+        assertThat(call("{ it['child'] }", container), sameInstance((Object) bean));
+    }
+
+    @Test
+    public void cannotGetUnknownProperty() {
+        assertFalse(container.getAsDynamicObject().hasProperty("unknown"));
+
+        try {
+            container.getAsDynamicObject().getProperty("unknown");
+            fail();
+        } catch (MissingPropertyException e) {
+            // expected
+        }
+    }
+
+    @Test
+    public void dynamicPropertyAccessInvokesRulesForUnknownDomainObject() {
+        Bean bean = new Bean();
+        addRuleFor(bean);
+
+        assertTrue(container.getAsDynamicObject().hasProperty("bean"));
+        assertThat(container.getAsDynamicObject().getProperty("bean"), sameInstance((Object) bean));
+    }
+
+    @Test
+    public void eachObjectIsAvailableAsConfigureMethod() {
+        Bean bean = new Bean();
+        container.addObject("child", bean);
+
+        Closure closure = toClosure("{ beanProperty = 'value' }");
+        assertTrue(container.getAsDynamicObject().hasMethod("child", closure));
+        container.getAsDynamicObject().invokeMethod("child", closure);
+        assertThat(bean.getBeanProperty(), equalTo("value"));
+
+        call("{ it.child { beanProperty = 'value 2' } }", container);
+        assertThat(bean.getBeanProperty(), equalTo("value 2"));
+
+        call("{ it.invokeMethod('child') { beanProperty = 'value 3' } }", container);
+        assertThat(bean.getBeanProperty(), equalTo("value 3"));
+    }
+
+    @Test
+    public void canUseDynamicPropertiesAndMethodsInsideConfigureClosures() {
+        Bean bean = new Bean();
+        container.addObject("child", bean);
+        container.addObject("aProp", bean);
+        container.addObject("a", bean);
+        container.addObject("withType", bean);
+        container.addObject("allObjects", bean);
+
+        ConfigureUtil.configure(toClosure("{ child.beanProperty = 'value 1' }"), container);
+        assertThat(bean.getBeanProperty(), equalTo("value 1"));
+
+        ConfigureUtil.configure(toClosure("{ child { beanProperty = 'value 2' } }"), container);
+        assertThat(bean.getBeanProperty(), equalTo("value 2"));
+
+        ConfigureUtil.configure(toClosure("{ aProp.beanProperty = 'value 3' }"), container);
+        assertThat(bean.getBeanProperty(), equalTo("value 3"));
+
+        ConfigureUtil.configure(toClosure("{ a.beanProperty = 'value 4' }"), container);
+        assertThat(bean.getBeanProperty(), equalTo("value 4"));
+
+        // Try with an element with the same name as a method
+        ConfigureUtil.configure(toClosure("{ withType.beanProperty = 'value 6' }"), container);
+        assertThat(bean.getBeanProperty(), equalTo("value 6"));
+
+        ConfigureUtil.configure(toClosure("{ withType { beanProperty = 'value 6' } }"), container);
+        assertThat(bean.getBeanProperty(), equalTo("value 6"));
+    }
+
+    @Test
+    public void cannotInvokeUnknownMethod() {
+        container.addObject("child", new Bean());
+
+        assertMethodUnknown("unknown");
+        assertMethodUnknown("unknown", toClosure("{ }"));
+        assertMethodUnknown("child");
+        assertMethodUnknown("child", "not a closure");
+        assertMethodUnknown("child", toClosure("{ }"), "something else");
+    }
+
+    private void assertMethodUnknown(String name, Object... arguments) {
+        assertFalse(container.getAsDynamicObject().hasMethod(name, arguments));
+        try {
+            container.getAsDynamicObject().invokeMethod(name, arguments);
+            fail();
+        } catch (groovy.lang.MissingMethodException e) {
+            // Expected
+        }
+    }
+
+    @Test
+    public void configureMethodInvokesRuleForUnknownDomainObject() {
+        Bean bean = new Bean();
+        addRuleFor(bean);
+
+        assertTrue(container.getAsDynamicObject().hasMethod("bean", toClosure("{ }")));
+    }
+
+    @Test
+    public void addRuleByClosure() {
+        String testPropertyKey = "org.gradle.test.addRuleByClosure";
+        String expectedTaskName = "someTaskName";
+        Closure ruleClosure = HelperUtil.toClosure(String.format("{ taskName -> System.setProperty('%s', '%s') }",
+                testPropertyKey, expectedTaskName));
+        container.addRule("description", ruleClosure);
+        container.getRules().get(0).apply(expectedTaskName);
+        assertThat(System.getProperty(testPropertyKey), equalTo(expectedTaskName));
+        System.getProperties().remove(testPropertyKey);
+    }
+
+    private void addRuleFor(final Bean bean) {
+        container.addRule(new Rule() {
+            public String getDescription() {
+                throw new UnsupportedOperationException();
+            }
+
+            public void apply(String taskName) {
+                container.addObject(taskName, bean);
+            }
+        });
+    }
+
+    private class Bean {
+        private String beanProperty;
+
+        public String getBeanProperty() {
+            return beanProperty;
+        }
+
+        public void setBeanProperty(String beanProperty) {
+            this.beanProperty = beanProperty;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultTaskTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultTaskTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/DefaultTaskTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTestHelper.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTestHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTestHelper.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/DynamicObjectHelperTestHelper.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/GraphAggregatorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/GraphAggregatorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/GraphAggregatorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/GraphAggregatorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGeneratorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGeneratorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGeneratorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/GroovySourceGenerationBackedClassGeneratorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/MapBackedDynamicObjectTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/MapBackedDynamicObjectTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/MapBackedDynamicObjectTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/MapBackedDynamicObjectTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/TestContainer.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/TestContainer.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/TestContainer.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/TestContainer.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/TestDecoratedGroovyBean.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/TestDecoratedGroovyBean.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/TestDecoratedGroovyBean.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/TestDecoratedGroovyBean.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/XmlTransformerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/XmlTransformerTest.groovy
new file mode 100644
index 0000000..2a8df9f
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/XmlTransformerTest.groovy
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal
+
+import spock.lang.Specification
+import org.gradle.api.artifacts.maven.XmlProvider
+import org.gradle.api.Action
+import org.gradle.util.TextUtil
+
+class XmlTransformerTest extends Specification {
+    final XmlTransformer transformer = new XmlTransformer()
+
+    def "returns original string when no actions are provided"() {
+        expect:
+        looksLike '<root/>', transformer.transform('<root/>')
+    }
+
+    def "action can access XML as StringBuilder"() {
+        Action<XmlProvider> action = Mock()
+        transformer.addAction(action)
+
+        when:
+        def result = transformer.transform('<root/>')
+
+        then:
+        action.execute(_) >> { XmlProvider provider ->
+            def builder = provider.asString()
+            builder.insert(builder.indexOf("root"), 'some-')
+        }
+        looksLike '<some-root/>', result
+    }
+
+    def "action can access XML as Node"() {
+        Action<XmlProvider> action = Mock()
+        transformer.addAction(action)
+
+        when:
+        def result = transformer.transform('<root/>')
+
+        then:
+        action.execute(_) >> { XmlProvider provider ->
+            provider.asNode().appendNode('child1')
+        }
+        looksLike '<root>\n  <child1/>\n</root>\n', result
+    }
+
+    def "action can access XML as DOM element"() {
+        Action<XmlProvider> action = Mock()
+        transformer.addAction(action)
+
+        when:
+        def result = transformer.transform('<root/>')
+
+        then:
+        action.execute(_) >> { XmlProvider provider ->
+            def document = provider.asElement().ownerDocument
+            provider.asElement().appendChild(document.createElement('child1'))
+        }
+        looksLike '<root>\n  <child1/>\n</root>\n', result
+    }
+
+    def "can transform String to a Writer"() {
+        Action<XmlProvider> action = Mock()
+        transformer.addAction(action)
+        StringWriter writer = new StringWriter()
+
+        when:
+        transformer.transform('<root/>', writer)
+
+        then:
+        action.execute(_) >> { XmlProvider provider ->
+            provider.asNode().appendNode('child1')
+        }
+        looksLike '<root>\n  <child1/>\n</root>\n', writer.toString()
+    }
+
+    def "can transform Node to a Writer"() {
+        Action<XmlProvider> action = Mock()
+        transformer.addAction(action)
+        StringWriter writer = new StringWriter()
+        Node node = new XmlParser().parseText('<root/>')
+
+        when:
+        transformer.transform(node, writer)
+
+        then:
+        action.execute(_) >> { XmlProvider provider ->
+            provider.asNode().appendNode('child1')
+        }
+        looksLike '<root>\n  <child1/>\n</root>\n', writer.toString()
+    }
+
+    def "can use a closure as an action"() {
+        transformer.addAction { provider ->
+            provider.asNode().appendNode('child1')
+        }
+        StringWriter writer = new StringWriter()
+
+        when:
+        transformer.transform('<root/>', writer)
+
+        then:
+        looksLike '<root>\n  <child1/>\n</root>\n', writer.toString()
+    }
+
+    def "can chain actions"() {
+        Action<XmlProvider> stringAction = Mock()
+        Action<XmlProvider> nodeAction = Mock()
+        Action<XmlProvider> elementAction = Mock()
+        Action<XmlProvider> stringAction2 = Mock()
+        transformer.addAction(stringAction)
+        transformer.addAction(elementAction)
+        transformer.addAction(nodeAction)
+        transformer.addAction(stringAction2)
+
+        when:
+        def result = transformer.transform('<root/>')
+
+        then:
+        stringAction.execute(_) >> { XmlProvider provider ->
+            def builder = provider.asString()
+            builder.insert(builder.indexOf("root"), 'some-')
+        }
+        nodeAction.execute(_) >> { XmlProvider provider ->
+            provider.asNode().appendNode('child2')
+        }
+        elementAction.execute(_) >> { XmlProvider provider ->
+            def document = provider.asElement().ownerDocument
+            provider.asElement().appendChild(document.createElement('child1'))
+        }
+        stringAction2.execute(_) >> { XmlProvider provider ->
+            provider.asString().append('<!-- end -->')
+        }
+
+        looksLike '<some-root>\n  <child1/>\n  <child2/>\n</some-root>\n<!-- end -->', result
+    }
+
+    def "can chain node actions"() {
+        Action<XmlProvider> nodeAction = Mock()
+        Action<XmlProvider> nodeAction2 = Mock()
+        transformer.addAction(nodeAction)
+        transformer.addAction(nodeAction2)
+
+        when:
+        def result = transformer.transform('<root/>')
+
+        then:
+        nodeAction.execute(_) >> { XmlProvider provider ->
+            provider.asNode().appendNode('child1')
+        }
+        nodeAction2.execute(_) >> { XmlProvider provider ->
+            provider.asNode().appendNode('child2')
+        }
+        looksLike '<root>\n  <child1/>\n  <child2/>\n</root>\n', result
+    }
+
+    def "indentation correct when writing out Node"() {
+        transformer.indentation = "\t"
+        transformer.addAction { XmlProvider provider -> provider.asNode().children()[0].appendNode("grandchild") }
+
+        when:
+        def result = transformer.transform("<root>\n  <child/>\n</root>\n")
+
+        then:
+        looksLike "<root>\n\t<child>\n\t\t<grandchild/>\n\t</child>\n</root>\n", result
+    }
+
+    def "indentation correct when writing out DOM element (only) if indenting with spaces"() {
+        transformer.indentation = expected
+        transformer.addAction { XmlProvider provider ->
+            def document = provider.asElement().ownerDocument
+            document.getElementsByTagName("child").item(0).appendChild(document.createElement("grandchild"))
+        }
+
+        when:
+        def result = transformer.transform("<root>\n  <child/>\n</root>\n")
+
+        then:
+        looksLike("<root>\n$actual<child>\n$actual$actual<grandchild/>\n$actual</child>\n</root>\n", result)
+
+        where:
+        expected | actual
+        "    "   | "    "
+        "\t"     | "  " // tabs not supported, two spaces used instead
+    }
+
+    private void looksLike(String expected, String actual) {
+        assert actual == TextUtil.toNativeLineSeparators(addXmlDeclaration(expected))
+    }
+
+    private String addXmlDeclaration(String value) {
+        "<?xml version=\"1.0\"?>\n" + value
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContextTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContextTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContextTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContextTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultConfigurationContainerFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifactTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifactTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifactTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedArtifactTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependencyTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependencyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependencyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolvedDependencyTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/DefaultResolverContainerTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstructionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstructionTest.java
new file mode 100644
index 0000000..ef655ad
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstructionTest.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts;
+
+import org.junit.Test;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.not;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Hans Dockter
+ */
+public class ProjectDependenciesBuildInstructionTest {
+    @Test
+    public void initWithNull() {
+        ProjectDependenciesBuildInstruction buildInstruction = new ProjectDependenciesBuildInstruction(false);
+        assertThat(buildInstruction.isRebuild(), equalTo(false));
+    }
+
+    @Test
+    public void initWithEmptyList() {
+        ProjectDependenciesBuildInstruction buildInstruction = new ProjectDependenciesBuildInstruction(true);
+        assertThat(buildInstruction.isRebuild(), equalTo(true));
+    }
+
+    @Test
+    public void equality() {
+        assertThat(new ProjectDependenciesBuildInstruction(false),
+                equalTo(new ProjectDependenciesBuildInstruction(false)));
+        assertThat(new ProjectDependenciesBuildInstruction(true),
+                equalTo(new ProjectDependenciesBuildInstruction(true)));
+
+        assertThat(new ProjectDependenciesBuildInstruction(false),
+                not(equalTo(new ProjectDependenciesBuildInstruction(true))));
+    }
+
+    @Test
+    public void hashCodeEquality() {
+        assertThat(new ProjectDependenciesBuildInstruction(false).hashCode(),
+                equalTo(new ProjectDependenciesBuildInstruction(false).hashCode()));
+        assertThat(new ProjectDependenciesBuildInstruction(true).hashCode(),
+                equalTo(new ProjectDependenciesBuildInstruction(true).hashCode()));
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifierTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifierTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifierTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ResolvedConfigurationIdentifierTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/ConfigurationsTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfigurationTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependencyTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependencyTest.java
new file mode 100644
index 0000000..a90a71d
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependencyTest.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.dependencies;
+
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.DependencyArtifact;
+import org.gradle.api.artifacts.ExcludeRule;
+import org.gradle.api.artifacts.ModuleDependency;
+import org.gradle.api.internal.artifacts.DefaultExcludeRule;
+import org.gradle.util.HelperUtil;
+import org.gradle.util.JUnit4GroovyMockery;
+
+import static org.gradle.util.Matchers.*;
+
+import org.gradle.util.WrapUtil;
+
+import static org.hamcrest.Matchers.*;
+
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Map;
+
+/**
+ * @author Hans Dockter
+ */
+ at RunWith(JMock.class)
+abstract public class AbstractModuleDependencyTest {
+
+    protected abstract AbstractModuleDependency getDependency();
+
+    protected abstract AbstractModuleDependency createDependency(String group, String name, String version);
+
+    protected abstract AbstractModuleDependency createDependency(String group, String name, String version, String configuration);
+
+    protected JUnit4Mockery context = new JUnit4GroovyMockery();
+
+    @Test
+    public void defaultValues() {
+        assertTrue(getDependency().isTransitive());
+        assertThat(getDependency().getArtifacts(), isEmpty());
+        assertThat(getDependency().getExcludeRules(), isEmpty());
+        assertThat(getDependency().getConfiguration(), equalTo(Dependency.DEFAULT_CONFIGURATION));
+    }
+
+    @Test
+    public void exclude() {
+        Map<String, String> excludeArgs1 = WrapUtil.toMap("key", "value");
+        Map<String, String> excludeArgs2 = WrapUtil.toMap("key2", "value2");
+
+        getDependency().exclude(excludeArgs1);
+        getDependency().exclude(excludeArgs2);
+
+        assertThat(getDependency().getExcludeRules().size(), equalTo(2));
+        assertThat(getDependency().getExcludeRules(), hasItem((ExcludeRule) new DefaultExcludeRule(excludeArgs1)));
+        assertThat(getDependency().getExcludeRules(), hasItem((ExcludeRule) new DefaultExcludeRule(excludeArgs2)));
+    }
+
+    @Test
+    public void addArtifact() {
+        DependencyArtifact artifact1 = createAnonymousArtifact();
+        DependencyArtifact artifact2 = createAnonymousArtifact();
+
+        getDependency().addArtifact(artifact1);
+        getDependency().addArtifact(artifact2);
+
+        assertThat(getDependency().getArtifacts().size(), equalTo(2));
+        assertThat(getDependency().getArtifacts(), hasItem(artifact1));
+        assertThat(getDependency().getArtifacts(), hasItem(artifact2));
+    }
+
+    private DependencyArtifact createAnonymousArtifact() {
+        return new DefaultDependencyArtifact(HelperUtil.createUniqueId(), "type", "org", "classifier", "url");
+    }
+
+    @Test
+    public void equality() {
+        assertThat(createDependency("group1", "name1", "version1"), equalTo(createDependency("group1", "name1", "version1")));
+        assertThat(createDependency("group1", "name1", "version1").hashCode(), equalTo(createDependency("group1", "name1", "version1").hashCode()));
+        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group1", "name1", "version2"))));
+        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group1", "name2", "version1"))));
+        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group2", "name1", "version1"))));
+        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group2", "name1", "version1"))));
+        assertThat(createDependency("group1", "name1", "version1", "depConf1"), not(equalTo(createDependency("group1", "name1", "version1", "depConf2"))));
+    }
+
+    protected void assertDeepCopy(ModuleDependency dependency, ModuleDependency copiedDependency) {
+        assertThat(copiedDependency.getGroup(), equalTo(dependency.getGroup()));
+        assertThat(copiedDependency.getName(), equalTo(dependency.getName()));
+        assertThat(copiedDependency.getVersion(), equalTo(dependency.getVersion()));
+        assertThat(copiedDependency.getConfiguration(), equalTo(dependency.getConfiguration()));
+        assertThat(copiedDependency.isTransitive(), equalTo(dependency.isTransitive()));
+        assertThat(copiedDependency.getArtifacts(), equalTo(dependency.getArtifacts()));
+        assertThat(copiedDependency.getArtifacts(), not(sameInstance(dependency.getArtifacts())));
+        assertThat(copiedDependency.getExcludeRules(), equalTo(dependency.getExcludeRules()));
+        assertThat(copiedDependency.getExcludeRules(), not(sameInstance(dependency.getExcludeRules())));
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModuleTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModuleTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModuleTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultClientModuleTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifactTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifactTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifactTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultDependencyArtifactTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExcludeRuleContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExcludeRuleContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExcludeRuleContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExcludeRuleContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependencyTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependencyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependencyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultExternalModuleDependencyTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependencyTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependencyTest.java
new file mode 100644
index 0000000..72c69f7
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependencyTest.java
@@ -0,0 +1,285 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts.dependencies;
+
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.artifacts.*;
+import org.gradle.api.internal.artifacts.DependencyResolveContext;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.tasks.TaskContainer;
+import org.gradle.api.tasks.TaskDependency;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JMock;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.util.Set;
+
+import static org.gradle.util.Matchers.isEmpty;
+import static org.gradle.util.Matchers.strictlyEqual;
+import static org.gradle.util.WrapUtil.toSet;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+/**
+ * @author Hans Dockter
+ */
+ at RunWith(JMock.class)
+public class DefaultProjectDependencyTest extends AbstractModuleDependencyTest {
+    private final ProjectDependenciesBuildInstruction instruction = new ProjectDependenciesBuildInstruction(true);
+    private final Project dependencyProjectStub = context.mock(Project.class);
+    private final ConfigurationContainer projectConfigurationsStub = context.mock(ConfigurationContainer.class);
+    private final Configuration projectConfigurationStub = context.mock(Configuration.class);
+    private final TaskContainer dependencyProjectTaskContainerStub = context.mock(TaskContainer.class);
+    private final DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, instruction);
+
+    protected AbstractModuleDependency getDependency() {
+        return projectDependency;
+    }
+
+    protected AbstractModuleDependency createDependency(String group, String name, String version) {
+        return createDependency(group, name, version, null);    
+    }
+
+    protected AbstractModuleDependency createDependency(String group, String name, String version, String configuration) {
+        ProjectInternal dependencyProject = context.mock(ProjectInternal.class);
+        DefaultProjectDependency projectDependency;
+        if (configuration != null) {
+            projectDependency = new DefaultProjectDependency(dependencyProject, configuration, instruction);
+        } else {
+            projectDependency = new DefaultProjectDependency(dependencyProject, instruction);
+        }
+        return projectDependency;
+    }
+
+    @Before
+    public void setUp() {
+        context.checking(new Expectations() {{
+            allowing(dependencyProjectStub).getConfigurations();
+            will(returnValue(projectConfigurationsStub));
+            allowing(projectConfigurationsStub).getByName("default");
+            will(returnValue(projectConfigurationStub));
+            allowing(dependencyProjectStub).getTasks();
+            will(returnValue(dependencyProjectTaskContainerStub));
+            allowing(dependencyProjectStub).getName();
+            will(returnValue("target-name"));
+            allowing(dependencyProjectStub).getGroup();
+            will(returnValue("target-group"));
+            allowing(dependencyProjectStub).getVersion();
+            will(returnValue("target-version"));
+        }});
+    }
+
+    @Test
+    public void init() {
+        assertTrue(projectDependency.isTransitive());
+        assertEquals("target-name", projectDependency.getName());
+        assertEquals("target-group", projectDependency.getGroup());
+        assertEquals("target-version", projectDependency.getVersion());
+    }
+
+    @Test
+    public void getConfiguration() {
+        context.checking(new Expectations() {{
+            allowing(projectConfigurationsStub).getByName("conf1");
+            will(returnValue(projectConfigurationStub));
+        }});
+
+        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction);
+        assertThat(projectDependency.getProjectConfiguration(), sameInstance(projectConfigurationStub));
+    }
+
+    @Test
+    public void resolveDelegatesToAllSelfResolvingDependenciesInTargetConfiguration() {
+        final DependencyResolveContext resolveContext = context.mock(DependencyResolveContext.class);
+        final Dependency projectSelfResolvingDependency = context.mock(Dependency.class);
+        final ProjectDependency transitiveProjectDependencyStub = context.mock(ProjectDependency.class);
+        context.checking(new Expectations() {{
+            allowing(projectConfigurationsStub).getByName("conf1");
+            will(returnValue(projectConfigurationStub));
+
+            allowing(projectConfigurationStub).getAllDependencies();
+            will(returnValue(toSet(projectSelfResolvingDependency, transitiveProjectDependencyStub)));
+
+            allowing(resolveContext).isTransitive();
+            will(returnValue(true));
+            
+            one(resolveContext).add(projectSelfResolvingDependency);
+            
+            one(resolveContext).add(transitiveProjectDependencyStub);
+        }});
+
+        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1",
+                instruction);
+        projectDependency.resolve(resolveContext);
+    }
+
+    @Test
+    public void resolveNotDelegatesToProjectDependenciesInTargetConfigurationIfConfigurationIsNonTransitive() {
+        final DependencyResolveContext resolveContext = context.mock(DependencyResolveContext.class);
+        final Dependency projectSelfResolvingDependency = context.mock(Dependency.class);
+        final ProjectDependency transitiveProjectDependencyStub = context.mock(ProjectDependency.class);
+        context.checking(new Expectations() {{
+            allowing(projectConfigurationsStub).getByName("conf1");
+            will(returnValue(projectConfigurationStub));
+
+            allowing(projectConfigurationStub).getAllDependencies();
+            will(returnValue(toSet(projectSelfResolvingDependency, transitiveProjectDependencyStub)));
+
+            allowing(resolveContext).isTransitive();
+            will(returnValue(false));
+
+            one(resolveContext).add(projectSelfResolvingDependency);
+        }});
+        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1",
+                instruction);
+        projectDependency.resolve(resolveContext);
+    }
+    
+    @Test
+    public void resolveNotDelegatesToTransitiveProjectDependenciesIfProjectDependencyIsNonTransitive() {
+        final DependencyResolveContext resolveContext = context.mock(DependencyResolveContext.class);
+        final SelfResolvingDependency projectSelfResolvingDependency = context.mock(SelfResolvingDependency.class);
+        final ProjectDependency transitiveProjectDependencyStub = context.mock(ProjectDependency.class);
+        context.checking(new Expectations() {{
+            allowing(projectConfigurationsStub).getByName("conf1");
+            will(returnValue(projectConfigurationStub));
+
+            allowing(projectConfigurationStub).getAllDependencies();
+            will(returnValue(toSet(projectSelfResolvingDependency, transitiveProjectDependencyStub)));
+
+            one(resolveContext).add(projectSelfResolvingDependency);
+        }});
+        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction);
+        projectDependency.setTransitive(false);
+        projectDependency.resolve(resolveContext);
+    }
+
+    private Task taskInTargetProject(final String name) {
+        final Task task = context.mock(Task.class, name);
+        context.checking(new Expectations(){{
+            allowing(dependencyProjectTaskContainerStub).getByName(name);
+            will(returnValue(task));
+        }});
+        return task;
+    }
+
+    @Test
+    public void dependsOnTargetConfigurationAndArtifactsOfTargetConfiguration() {
+        Task a = taskInTargetProject("a");
+        Task b = taskInTargetProject("b");
+        Task c = taskInTargetProject("c");
+        expectTargetConfigurationHasDependencies(a, b);
+        expectTargetConfigurationHasArtifacts(c);
+
+        assertThat(projectDependency.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(a, b, c)));
+    }
+
+    private void expectTargetConfigurationHasDependencies(final Task... tasks) {
+        context.checking(new Expectations(){{
+            TaskDependency dependencyStub = context.mock(TaskDependency.class, "dependencies");
+
+            allowing(projectConfigurationStub).getBuildDependencies();
+            will(returnValue(dependencyStub));
+
+            allowing(dependencyStub).getDependencies(null);
+            will(returnValue(toSet(tasks)));
+        }});
+    }
+
+    private void expectTargetConfigurationHasArtifacts(final Task... tasks) {
+        context.checking(new Expectations(){{
+            TaskDependency dependencyStub = context.mock(TaskDependency.class, "artifacts");
+
+            allowing(projectConfigurationStub).getBuildArtifacts();
+            will(returnValue(dependencyStub));
+
+            allowing(dependencyStub).getDependencies(null);
+            will(returnValue(toSet(tasks)));
+        }});
+    }
+
+    private void expectTargetConfigurationHasNoDependencies() {
+        context.checking(new Expectations() {{
+            TaskDependency dependencyStub = context.mock(TaskDependency.class);
+
+            allowing(projectConfigurationStub).getBuildDependencies();
+            will(returnValue(dependencyStub));
+
+            allowing(projectConfigurationStub).getBuildArtifacts();
+            will(returnValue(dependencyStub));
+
+            allowing(dependencyStub).getDependencies(null);
+            will(returnValue(toSet()));
+        }});
+    }
+
+    @Test
+    public void doesNotDependOnAnythingWhenProjectRebuildIsDisabled() {
+        DefaultProjectDependency dependency = new DefaultProjectDependency(dependencyProjectStub,
+                new ProjectDependenciesBuildInstruction(false));
+        assertThat(dependency.getBuildDependencies().getDependencies(null), isEmpty());
+    }
+
+    @Test
+    public void contentEqualsWithEqualDependencies() {
+        ProjectDependency dependency1 = createProjectDependency();
+        ProjectDependency dependency2 = createProjectDependency();
+        assertThat(dependency1.contentEquals(dependency2), equalTo(true));
+    }
+
+    @Test
+    public void contentEqualsWithNonEqualDependencies() {
+        ProjectDependency dependency1 = createProjectDependency();
+        ProjectDependency dependency2 = createProjectDependency();
+        dependency2.setTransitive(!dependency1.isTransitive());
+        assertThat(dependency1.contentEquals(dependency2), equalTo(false));
+    }
+
+    @Test
+    public void copy() {
+        ProjectDependency dependency = createProjectDependency();
+        ProjectDependency copiedDependency = dependency.copy();
+        assertDeepCopy(dependency, copiedDependency);
+        assertThat(copiedDependency.getDependencyProject(), sameInstance(dependency.getDependencyProject()));
+    }
+
+    private ProjectDependency createProjectDependency() {
+        ProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf", instruction);
+        projectDependency.addArtifact(new DefaultDependencyArtifact("name", "type", "ext", "classifier", "url"));
+        return projectDependency;
+    }
+
+    @Test
+    @Override
+    public void equality() {
+        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), strictlyEqual(new DefaultProjectDependency(
+                dependencyProjectStub, instruction)));
+        assertThat(new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction), strictlyEqual(new DefaultProjectDependency(
+                dependencyProjectStub, "conf1", instruction)));
+        assertThat(new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction), not(equalTo(new DefaultProjectDependency(
+                dependencyProjectStub, "conf2", instruction))));
+        Project otherProject = context.mock(Project.class, "otherProject");
+        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), not(equalTo(new DefaultProjectDependency(
+                otherProject, instruction))));
+        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), not(equalTo(new DefaultProjectDependency(
+                dependencyProjectStub, new ProjectDependenciesBuildInstruction(false)))));
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependencyTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependencyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependencyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultSelfResolvingDependencyTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandlerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandlerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultArtifactHandlerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultConfigurationHandlerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultConfigurationHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultConfigurationHandlerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultConfigurationHandlerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultPublishArtifactFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandlerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/AbstractModuleFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/AbstractModuleFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/AbstractModuleFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/AbstractModuleFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ClassPathDependencyFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultClientModuleFactoryTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactoryTest.java
new file mode 100644
index 0000000..0b872b1
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactoryTest.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.artifacts.dsl.dependencies;
+
+import groovy.lang.Closure;
+import org.gradle.api.IllegalDependencyNotation;
+import org.gradle.api.InvalidUserDataException;
+import org.gradle.api.artifacts.ClientModule;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.ModuleDependency;
+import org.gradle.api.artifacts.ProjectDependency;
+import org.gradle.util.HelperUtil;
+import org.gradle.util.WrapUtil;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.awt.*;
+import java.util.Map;
+
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Hans Dockter
+ */
+ at RunWith(JMock.class)
+public class DefaultDependencyFactoryTest {
+    private JUnit4Mockery context = new JUnit4Mockery();
+
+    private IDependencyImplementationFactory testImplPointFactoryStub = context.mock(IDependencyImplementationFactory.class, "Point");
+    private DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(
+            WrapUtil.toSet(testImplPointFactoryStub), null, null);
+
+    @Test
+    public void testCreateDependencyWithValidDescription() {
+        final Point point = createAnonymousPoint();
+        final Dependency pointDependencyDummy = context.mock(Dependency.class, "PointDependency");
+        context.checking(new Expectations() {{
+            allowing(testImplPointFactoryStub).createDependency(Dependency.class, point);
+            will(returnValue(pointDependencyDummy));
+        }});
+        assertSame(pointDependencyDummy, dependencyFactory.createDependency(point));
+    }
+
+    @Test
+    public void createDependencyWithDependencyObject() {
+        final Dependency dependencyDummy = context.mock(Dependency.class);
+        assertSame(dependencyDummy, dependencyFactory.createDependency(dependencyDummy));    
+    }
+
+    @Test
+    public void testCreateDependencyWithValidDescriptionAndClosure() {
+        final Point point = createAnonymousPoint();
+        final Dependency pointDependencyMock = context.mock(Dependency.class, "PointDependency");
+        context.checking(new Expectations() {{
+            allowing(testImplPointFactoryStub).createDependency(Dependency.class, point);
+            will(returnValue(pointDependencyMock));
+        }});
+        assertSame(pointDependencyMock, dependencyFactory.createDependency(point));
+    }
+
+    private Point createAnonymousPoint() {
+        return new Point(5, 4);
+    }
+
+    @Test(expected = InvalidUserDataException.class)
+    public void testCreateDependencyWithInvalidDescriptionShouldThrowInvalidUserDataEx() {
+        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
+        context.checking(new Expectations() {{
+            allowing(testImplPointFactoryStub).createDependency(with(equalTo(Dependency.class)), with(not(instanceOf(Point.class))));
+            will(throwException(new IllegalDependencyNotation()));
+            allowing(testImplStringFactoryStub).createDependency(with(equalTo(Dependency.class)), with(not(instanceOf(String.class))));
+            will(throwException(new IllegalDependencyNotation()));
+        }});
+        dependencyFactory.createDependency(createAnonymousInteger());
+    }
+
+    private Integer createAnonymousInteger() {
+        return new Integer(5);
+    }
+
+    @Test
+    public void createProject() {
+        final ProjectDependencyFactory projectDependencyFactoryStub = context.mock(ProjectDependencyFactory.class);
+        final ProjectDependency projectDependency = context.mock(ProjectDependency.class);
+        final ProjectFinder projectFinderDummy = context.mock(ProjectFinder.class);
+        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(null, null, projectDependencyFactoryStub);
+        final Map map = WrapUtil.toMap("key", "value");
+        context.checking(new Expectations() {{
+            allowing(projectDependencyFactoryStub).createProjectDependencyFromMap(projectFinderDummy, map);
+            will(returnValue(projectDependency));
+        }});
+        Closure configureClosure = HelperUtil.toClosure("{ transitive = false }");
+        assertThat(dependencyFactory.createProjectDependencyFromMap(projectFinderDummy, map), sameInstance(projectDependency));
+    }
+
+    @Test
+    public void createModule() {
+        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
+        final IDependencyImplementationFactory clientModuleFactoryStub = context.mock(IDependencyImplementationFactory.class);
+        final ClientModule clientModuleMock = context.mock(ClientModule.class);
+        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(WrapUtil.toSet(testImplStringFactoryStub), clientModuleFactoryStub, null);
+        final String someNotation1 = "someNotation1";
+        final String someNotation2 = "someNotation2";
+        final String someNotation3 = "someNotation3";
+        final String someNotation4 = "someNotation4";
+        final String someModuleNotation = "junit:junit:4.4";
+        final ModuleDependency dependencyDummy1 = context.mock(ModuleDependency.class, "dep1");
+        final ModuleDependency dependencyDummy2 = context.mock(ModuleDependency.class, "dep2");
+        final ModuleDependency dependencyDummy3 = context.mock(ModuleDependency.class, "dep3");
+        final ModuleDependency dependencyMock = context.mock(ModuleDependency.class, "dep4");
+        context.checking(new Expectations() {{
+            allowing(clientModuleFactoryStub).createDependency(ClientModule.class, someModuleNotation);
+            will(returnValue(clientModuleMock));
+            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation1);
+            will(returnValue(dependencyDummy1));
+            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation2);
+            will(returnValue(dependencyDummy2));
+            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation3);
+            will(returnValue(dependencyDummy3));
+            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation4);
+            will(returnValue(dependencyMock));
+            one(dependencyMock).setTransitive(true);
+            one(clientModuleMock).addDependency(dependencyDummy1);
+            one(clientModuleMock).addDependency(dependencyDummy2);
+            one(clientModuleMock).addDependency(dependencyDummy3);
+            one(clientModuleMock).addDependency(dependencyMock);
+        }});
+        Closure configureClosure = HelperUtil.toClosure(String.format(
+                "{dependency('%s'); dependencies('%s', '%s'); dependency('%s') { transitive = true }}",
+                someNotation1, someNotation2, someNotation3, someNotation4));
+        assertThat(dependencyFactory.createModule(someModuleNotation, configureClosure), equalTo(clientModuleMock));
+    }
+
+    @Test
+    public void createModuleWithNullClosure() {
+        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
+        final IDependencyImplementationFactory clientModuleFactoryStub = context.mock(IDependencyImplementationFactory.class);
+        final ClientModule clientModuleMock = context.mock(ClientModule.class);
+        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(WrapUtil.toSet(testImplStringFactoryStub), clientModuleFactoryStub, null);
+
+        final String someModuleNotation = "junit:junit:4.4";
+        context.checking(new Expectations() {{
+            allowing(clientModuleFactoryStub).createDependency(ClientModule.class, someModuleNotation);
+            will(returnValue(clientModuleMock));
+        }});
+        assertThat(dependencyFactory.createModule(someModuleNotation, null), equalTo(clientModuleMock));
+    }
+
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandlerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandlerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyHandlerTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactoryTest.java
new file mode 100644
index 0000000..4d8a851
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactoryTest.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.dsl.dependencies;
+
+import org.gradle.api.IllegalDependencyNotation;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.internal.AsmBackedClassGenerator;
+import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.util.GUtil;
+import org.gradle.util.HelperUtil;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+
+import java.awt.*;
+import java.util.Map;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultProjectDependencyFactoryTest {
+    private JUnit4Mockery context = new JUnit4Mockery();
+
+    private final ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(false);
+    private ProjectDependencyFactory projectDependencyFactory = new DefaultProjectDependencyFactory(projectDependenciesBuildInstruction, new AsmBackedClassGenerator());
+    private ProjectFinder projectFinder = context.mock(ProjectFinder.class);
+
+    @Test
+    public void testCreateProjectDependencyWithProject() {
+        Project dependencyProject = HelperUtil.createRootProject();
+        DefaultProjectDependency projectDependency = (DefaultProjectDependency)
+                projectDependencyFactory.createDependency(Dependency.class, dependencyProject);
+        assertThat(projectDependency.getDependencyProject(), equalTo(dependencyProject));
+    }
+
+    @Test
+    public void testCreateProjectDependencyWithMapNotation() {
+        boolean expectedTransitive = false;
+        final Map<String, Object> mapNotation = GUtil.map("path", ":path", "configuration", "conf", "transitive", expectedTransitive);
+        final ProjectInternal projectDummy = context.mock(ProjectInternal.class);
+        context.checking(new Expectations() {{
+            allowing(projectFinder).getProject((String) mapNotation.get("path"));
+            will(returnValue(projectDummy));
+        }});
+        DefaultProjectDependency projectDependency = (DefaultProjectDependency)
+                projectDependencyFactory.createProjectDependencyFromMap(projectFinder, mapNotation);
+        assertThat((ProjectInternal) projectDependency.getDependencyProject(), equalTo(projectDummy));
+        assertThat(projectDependency.getConfiguration(), equalTo(mapNotation.get("configuration")));
+        assertThat(projectDependency.isTransitive(), equalTo(expectedTransitive));
+    }
+
+    @Test (expected = IllegalDependencyNotation.class)
+    public void testWithUnknownTypeShouldThrowUnknownDependencyNotationEx() {
+        projectDependencyFactory.createDependency(Dependency.class, new Point(3, 4));
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleDependencyFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryDelegateTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryDelegateTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryDelegateTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/ModuleFactoryDelegateTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/SelfResolvingDependencyFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolverTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolverTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolverTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ClientModuleResolverTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisherTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisherTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisherTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyPublisherTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolverTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolverTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolverTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyDependencyResolverTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServicePublishTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServicePublishTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServicePublishTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServicePublishTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceResolveTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceResolveTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceResolveTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceResolveTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyServiceTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultPublishOptionsFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultResolverFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/DefaultSettingsConverterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyServiceTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyServiceTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyServiceTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ErrorHandlingIvyServiceTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolverTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolverTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolverTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/GradleIBiblioResolverTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtilTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtilTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtilTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/IvyUtilTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocatorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocatorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocatorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/LocalMavenCacheLocatorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/Report2ClasspathTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/Report2ClasspathTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/Report2ClasspathTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/Report2ClasspathTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolverTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolverTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolverTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/SelfResolvingDependencyResolverTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyServiceTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyServiceTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyServiceTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/ShortcircuitEmptyConfigsIvyServiceTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverterTest.java
new file mode 100644
index 0000000..df7666b
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverterTest.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2007-2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.ivyservice.moduleconverter;
+
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.DefaultArtifact;
+import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.PublishArtifact;
+import org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher;
+import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact;
+import org.gradle.util.HelperUtil;
+import org.gradle.util.WrapUtil;
+import static org.hamcrest.Matchers.equalTo;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import static org.junit.Assert.assertThat;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author Hans Dockter
+ */
+ at RunWith(JMock.class)
+public class DefaultArtifactsToModuleDescriptorConverterTest {
+    private JUnit4Mockery context = new JUnit4Mockery();
+
+    @Test
+    public void testAddArtifacts() {
+        final PublishArtifact publishArtifactConf1 = createNamedPublishArtifact("conf1");
+        Configuration configurationStub1 = createConfigurationStub(publishArtifactConf1);
+        final PublishArtifact publishArtifactConf2 = createNamedPublishArtifact("conf2");
+        Configuration configurationStub2 = createConfigurationStub(publishArtifactConf2);
+        final ArtifactsExtraAttributesStrategy artifactsExtraAttributesStrategyMock = context.mock(ArtifactsExtraAttributesStrategy.class);
+        final Map<String, String> extraAttributesArtifact1 = WrapUtil.toMap("name", publishArtifactConf1.getName());
+        final Map<String, String> extraAttributesArtifact2 = WrapUtil.toMap("name", publishArtifactConf2.getName());
+        context.checking(new Expectations() {{
+            one(artifactsExtraAttributesStrategyMock).createExtraAttributes(publishArtifactConf1);
+            will(returnValue(extraAttributesArtifact1));
+            one(artifactsExtraAttributesStrategyMock).createExtraAttributes(publishArtifactConf2);
+            will(returnValue(extraAttributesArtifact2));
+        }});
+        DefaultModuleDescriptor moduleDescriptor = HelperUtil.createModuleDescriptor(WrapUtil.toSet(configurationStub1.getName(),
+                configurationStub2.getName()));
+
+        DefaultArtifactsToModuleDescriptorConverter artifactsToModuleDescriptorConverter =
+                new DefaultArtifactsToModuleDescriptorConverter(artifactsExtraAttributesStrategyMock);
+
+        artifactsToModuleDescriptorConverter.addArtifacts(moduleDescriptor, WrapUtil.toSet(configurationStub1, configurationStub2));
+
+        assertArtifactIsAdded(configurationStub1, moduleDescriptor, extraAttributesArtifact1);
+        assertArtifactIsAdded(configurationStub2, moduleDescriptor, extraAttributesArtifact2);
+        assertThat(moduleDescriptor.getAllArtifacts().length, equalTo(2));
+    }
+
+    @Test
+    public void testIvyFileStrategy() {
+        assertThat(
+                DefaultArtifactsToModuleDescriptorConverter.IVY_FILE_STRATEGY.createExtraAttributes(context.mock(PublishArtifact.class)),
+                equalTo((Map) new HashMap<String, String>()));
+    }
+
+    @Test
+    public void testResolveStrategy() {
+        PublishArtifact publishArtifact = createNamedPublishArtifact("someName");
+        Map<String, String> expectedExtraAttributes = WrapUtil.toMap(DefaultIvyDependencyPublisher.FILE_PATH_EXTRA_ATTRIBUTE, publishArtifact.getFile().getAbsolutePath());
+        assertThat(
+                DefaultArtifactsToModuleDescriptorConverter.RESOLVE_STRATEGY.createExtraAttributes(publishArtifact),
+                equalTo(expectedExtraAttributes));
+    }
+
+    private void assertArtifactIsAdded(Configuration configuration, DefaultModuleDescriptor moduleDescriptor, Map<String, String> extraAttributes) {
+        assertThat(moduleDescriptor.getArtifacts(configuration.getName()),
+                equalTo(WrapUtil.toArray(expectedIvyArtifact(configuration, moduleDescriptor, extraAttributes))));
+    }
+
+    private Artifact expectedIvyArtifact(Configuration configuration, ModuleDescriptor moduleDescriptor, Map<String, String> additionalExtraAttributes) {
+        PublishArtifact publishArtifact = configuration.getArtifacts().iterator().next();
+        Map<String, String> extraAttributes = WrapUtil.toMap(Dependency.CLASSIFIER, publishArtifact.getClassifier());
+        extraAttributes.putAll(additionalExtraAttributes);
+        return new DefaultArtifact(moduleDescriptor.getModuleRevisionId(),
+                publishArtifact.getDate(),
+                publishArtifact.getName(),
+                publishArtifact.getType(),
+                publishArtifact.getExtension(),
+                extraAttributes);
+    }
+
+    private Configuration createConfigurationStub(final PublishArtifact publishArtifact) {
+        final Configuration configurationStub = IvyConverterTestUtil.createNamedConfigurationStub(publishArtifact.getName(), context);
+        context.checking(new Expectations() {{
+            allowing(configurationStub).getArtifacts();
+            will(returnValue(WrapUtil.toSet(publishArtifact)));
+        }});
+        return configurationStub;
+    }
+
+    private PublishArtifact createNamedPublishArtifact(String name) {
+        return new DefaultPublishArtifact(name, "ext", "type", "classifier", new Date(), new File("somePath"));
+    }
+
+
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultConfigurationsToModuleDescriptorConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultExcludeRuleConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultModuleDescriptorFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/IvyConverterTestUtil.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/IvyConverterTestUtil.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/IvyConverterTestUtil.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/IvyConverterTestUtil.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/PublishModuleDescriptorConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/ResolveModuleDescriptorConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternalTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternalTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternalTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractDependencyDescriptorFactoryInternalTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ClientModuleDependencyDescriptorFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultDependenciesToModuleDescriptorConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModuleTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModuleTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModuleTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DefaultModuleDescriptorFactoryForClientModuleTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegateTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegateTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegateTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/DependencyDescriptorFactoryDelegateTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ExternalModuleDependencyDescriptorFactoryTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactoryTest.java
new file mode 100644
index 0000000..57d33de
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactoryTest.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies;
+
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.gradle.api.artifacts.ExternalModuleDependency;
+import org.gradle.api.artifacts.Module;
+import org.gradle.api.artifacts.ProjectDependency;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency;
+import org.gradle.api.internal.artifacts.ivyservice.IvyUtil;
+import org.gradle.api.internal.project.AbstractProject;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.util.HelperUtil;
+import org.gradle.util.WrapUtil;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.*;
+
+/**
+ * @author Hans Dockter
+ */
+public class ProjectDependencyDescriptorFactoryTest extends AbstractDependencyDescriptorFactoryInternalTest {
+    private JUnit4Mockery context = new JUnit4Mockery();
+
+    private ProjectDependencyDescriptorStrategy descriptorStrategyStub = context.mock(ProjectDependencyDescriptorStrategy.class);
+    private ProjectDependencyDescriptorFactory projectDependencyDescriptorFactory =
+            new ProjectDependencyDescriptorFactory(excludeRuleConverterStub, descriptorStrategyStub);
+
+    @Test
+    public void canConvert() {
+        assertThat(projectDependencyDescriptorFactory.canConvert(context.mock(ProjectDependency.class)), equalTo(true));
+        assertThat(projectDependencyDescriptorFactory.canConvert(context.mock(ExternalModuleDependency.class)), equalTo(false));
+    }
+
+    @Test
+    public void testCreateFromProjectDependency() {
+        final ModuleRevisionId someModuleRevisionId = ModuleRevisionId.newInstance("a", "b", "c");
+        final ProjectDependency projectDependency = createProjectDependency(TEST_DEP_CONF);
+        setUpDependency(projectDependency);
+        context.checking(new Expectations() {{
+            allowing(descriptorStrategyStub).createModuleRevisionId(projectDependency);
+            will(returnValue(someModuleRevisionId));
+            allowing(descriptorStrategyStub).isChanging();
+            will(returnValue(true));
+        }});
+        projectDependencyDescriptorFactory.addDependencyDescriptor(TEST_CONF, moduleDescriptor, projectDependency);
+        DefaultDependencyDescriptor dependencyDescriptor = (DefaultDependencyDescriptor) moduleDescriptor.getDependencies()[0];
+
+        assertDependencyDescriptorHasCommonFixtureValues(dependencyDescriptor);
+        assertTrue(dependencyDescriptor.isChanging());
+        assertFalse(dependencyDescriptor.isForce());
+        assertEquals(someModuleRevisionId,
+                dependencyDescriptor.getDependencyRevisionId());
+    }
+
+    private ProjectDependency createProjectDependency(String dependencyConfiguration) {
+        AbstractProject dependencyProject = HelperUtil.createRootProject();
+        dependencyProject.setGroup("someGroup");
+        dependencyProject.setVersion("someVersion");
+        return new DefaultProjectDependency(dependencyProject, dependencyConfiguration, new ProjectDependenciesBuildInstruction(true));
+    }
+
+    @Test
+    public void addExternalModuleDependenciesWithSameModuleRevisionIdAndDifferentConfsShouldBePartOfSameDependencyDescriptor() {
+        final ProjectDependency dependency1 = createProjectDependency(TEST_DEP_CONF);
+        final ProjectDependency dependency2 = createProjectDependency(TEST_OTHER_DEP_CONF);
+
+        context.checking(new Expectations() {{
+            allowing(descriptorStrategyStub).isChanging();
+            will(returnValue(true));
+            allowing(descriptorStrategyStub).createModuleRevisionId(dependency1);
+            will(returnValue(IvyUtil.createModuleRevisionId(dependency1)));
+            allowing(descriptorStrategyStub).createModuleRevisionId(dependency2);
+            will(returnValue(IvyUtil.createModuleRevisionId(dependency2)));
+        }});
+        
+        assertThataddDependenciesWithSameModuleRevisionIdAndDifferentConfsShouldBePartOfSameDependencyDescriptor(
+                dependency1, dependency2, projectDependencyDescriptorFactory
+        );
+    }
+
+    @Test
+    public void ivyFileModuleRevisionIdShouldBeDeterminedByModuleForPublicDescriptorWithoutExtraAttributes() {
+        ProjectDependency projectDependency = createProjectDependency(TEST_CONF);
+        Module module = ((ProjectInternal) projectDependency.getDependencyProject()).getModule();
+        ModuleRevisionId moduleRevisionId =
+                ProjectDependencyDescriptorFactory.IVY_FILE_DESCRIPTOR_STRATEGY.createModuleRevisionId(projectDependency);
+        assertThat(moduleRevisionId.getOrganisation(), equalTo(module.getGroup()));
+        assertThat(moduleRevisionId.getName(), equalTo(module.getName()));
+        assertThat(moduleRevisionId.getRevision(), equalTo(module.getVersion()));
+        assertThat(moduleRevisionId.getExtraAttributes(), equalTo((Map) new HashMap()));
+    }
+
+    @Test
+    public void resolveModuleRevisionIdShouldBeDeterminedByModuleForResolvePlusExtraAttributes() {
+        ProjectDependency projectDependency = createProjectDependency(TEST_CONF);
+        Module module = ((ProjectInternal) projectDependency.getDependencyProject()).getModule();
+        ModuleRevisionId moduleRevisionId =
+                ProjectDependencyDescriptorFactory.RESOLVE_DESCRIPTOR_STRATEGY.createModuleRevisionId(projectDependency);
+        assertThat(moduleRevisionId.getOrganisation(), equalTo(module.getGroup()));
+        assertThat(moduleRevisionId.getName(), equalTo(module.getName()));
+        assertThat(moduleRevisionId.getRevision(), equalTo(module.getVersion()));
+        assertThat(moduleRevisionId.getExtraAttributes(),
+                equalTo((Map) WrapUtil.toMap(DependencyDescriptorFactory.PROJECT_PATH_KEY, projectDependency.getDependencyProject().getPath())));
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifactTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifactTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifactTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/AbstractPublishArtifactTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifactTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifactTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifactTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/ArchivePublishArtifactTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultArtifactContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifactTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifactTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifactTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/DefaultPublishArtifactTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomFactoryTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomTest.groovy
new file mode 100644
index 0000000..c6cf002
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomTest.groovy
@@ -0,0 +1,191 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.publish.maven
+
+import org.apache.commons.lang.builder.EqualsBuilder
+import org.apache.maven.model.Dependency
+import org.apache.maven.model.Model
+import org.gradle.api.Action
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.artifacts.ConfigurationContainer
+import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer
+import org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer
+import org.gradle.api.internal.artifacts.publish.maven.dependencies.PomDependenciesConverter
+import org.gradle.api.internal.file.FileResolver
+import org.gradle.util.TemporaryFolder
+import org.gradle.util.TestFile
+import org.gradle.util.TextUtil
+import org.junit.Rule
+import spock.lang.Specification
+
+class DefaultMavenPomTest extends Specification {
+    static final String EXPECTED_PACKAGING = "something";
+    static final String EXPECTED_GROUP_ID = "someGroup";
+    static final String EXPECTED_ARTIFACT_ID = "artifactId";
+    static final String EXPECTED_VERSION = "version";
+
+    @Rule
+    TemporaryFolder tmpDir = new TemporaryFolder()
+
+    Conf2ScopeMappingContainer conf2ScopeMappingContainer = new DefaultConf2ScopeMappingContainer()
+    PomDependenciesConverter pomDependenciesConverterStub = Mock()
+    ConfigurationContainer configurationContainerStub = Mock()
+    FileResolver fileResolver = Mock()
+    DefaultMavenPom mavenPom = new DefaultMavenPom(configurationContainerStub, conf2ScopeMappingContainer, pomDependenciesConverterStub,
+            fileResolver)
+
+    void setup() {
+        mavenPom.packaging = EXPECTED_PACKAGING
+        mavenPom.groupId = EXPECTED_GROUP_ID
+        mavenPom.artifactId = EXPECTED_ARTIFACT_ID
+        mavenPom.version = EXPECTED_VERSION
+    }
+
+    def init() {
+        expect:
+        mavenPom.scopeMappings.is(conf2ScopeMappingContainer)
+        mavenPom.configurations.is(configurationContainerStub)
+        mavenPom.fileResolver.is(fileResolver)
+        mavenPom.mavenProject.modelVersion == "4.0.0"
+    }
+
+    def setModel() {
+        def newModel = new Model()
+
+        when:
+        mavenPom.model = newModel
+
+        then:
+        mavenPom.model.is(newModel)
+    }
+
+    def effectivePomShouldHaveGeneratedDependencies() {
+        Set configurations = [Mock(Configuration)]
+        configurationContainerStub.getAll() >> configurations
+        List generatedDependencies = [new Dependency(groupId: 'someGroup')]
+        List manuallyAddedDependencies = [new Dependency()]
+        pomDependenciesConverterStub.convert(conf2ScopeMappingContainer, configurations) >> generatedDependencies
+
+        when:
+        mavenPom.dependencies = manuallyAddedDependencies.clone()
+
+        then:
+        EqualsBuilder.reflectionEquals(mavenPom.getEffectivePom().getMavenProject().getDependencies(), manuallyAddedDependencies + generatedDependencies)
+
+        when:
+        mavenPom.dependencies = []
+
+        then:
+        mavenPom.getEffectivePom().getMavenProject().getDependencies() == generatedDependencies
+    }
+
+    def configureActionsShouldBeAppliedAgainstEffectivePom() {
+        mavenPom.configurations = null
+        when:
+        mavenPom.whenConfigured(new Action() {
+            void execute(def mavenPom) {
+                mavenPom.mavenProject.inceptionYear = '1999'
+            }
+        })
+
+        then:
+        mavenPom.effectivePom.mavenProject.inceptionYear == '1999'
+        mavenPom.mavenProject.inceptionYear == null
+    }
+
+
+    def writeShouldUseEffectivePom() {
+        Set configurations = [Mock(Configuration)]
+        configurationContainerStub.getAll() >> configurations
+        List generatedDependencies = [new Dependency(groupId: 'someGroup')]
+        pomDependenciesConverterStub.convert(conf2ScopeMappingContainer, configurations) >> generatedDependencies
+
+        when:
+        StringWriter pomWriter = new StringWriter()
+        mavenPom.writeTo pomWriter
+
+        then:
+        pomWriter.toString().contains('someGroup')
+    }
+
+    def effectivePomWithNullConfigurationsShouldWork() {
+        when:
+        mavenPom.configurations = null
+
+        then:
+        mavenPom.getEffectivePom().getMavenProject().getDependencies() == []
+    }
+
+    void projectBuilder() {
+        mavenPom.mavenProject.inceptionYear = '2007'
+        mavenPom.mavenProject.description = 'some description'
+        mavenPom.project {
+            inceptionYear '2008'
+            licenses {
+                license {
+                    name 'The Apache Software License, Version 2.0'
+                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    distribution 'repo'
+                }
+            }
+        }
+
+        expect:
+        mavenPom.mavenProject.modelVersion == "4.0.0"
+        mavenPom.version == EXPECTED_VERSION
+        mavenPom.mavenProject.description == 'some description'
+        mavenPom.mavenProject.inceptionYear == '2008'
+        mavenPom.mavenProject.licenses.size() == 1
+        mavenPom.mavenProject.licenses[0].name == 'The Apache Software License, Version 2.0'
+        mavenPom.mavenProject.licenses[0].url == 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+        mavenPom.mavenProject.licenses[0].distribution == 'repo'
+    }
+
+    void writeToShouldApplyXmlActions() {
+        mavenPom.configurations = null
+        StringWriter pomWriter = new StringWriter()
+
+        when:
+        mavenPom.withXml {xmlProvider ->
+            xmlProvider.asString().append('someAppendix')
+        }
+        mavenPom.writeTo(pomWriter);
+
+        then:
+        pomWriter.toString().endsWith("someAppendix")
+    }
+
+    void writeToWritesCorrectPom() {
+        mavenPom.configurations = null
+        TestFile pomFile = tmpDir.file('someNonexistingDir').file('someFile')
+        fileResolver.resolve('file') >> pomFile
+
+        when:
+        mavenPom.writeTo('file');
+
+        then:
+        pomFile.text == TextUtil.toNativeLineSeparators('''<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>someGroup</groupId>
+  <artifactId>artifactId</artifactId>
+  <version>version</version>
+  <packaging>something</packaging>
+</project>
+''')
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DeployTaskFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DeployTaskFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DeployTaskFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DeployTaskFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultConf2ScopeMappingContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultExcludeRuleConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/dependencies/DefaultPomDependenciesConverterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolverTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolverTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolverTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/AbstractMavenResolverTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenDeployerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstallerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstallerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstallerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BaseMavenInstallerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/BasePomFilterContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomContainerTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomTest.java
new file mode 100644
index 0000000..9a0f068
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomTest.java
@@ -0,0 +1,272 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.artifacts.publish.maven.deploy;
+
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.DefaultArtifact;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.gradle.api.InvalidUserDataException;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.PublishArtifact;
+import org.gradle.api.artifacts.maven.MavenPom;
+import org.gradle.api.internal.artifacts.publish.maven.DefaultMavenPom;
+import org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer;
+import org.gradle.api.internal.artifacts.publish.maven.dependencies.PomDependenciesConverter;
+import org.gradle.api.internal.file.FileResolver;
+import org.gradle.util.GUtil;
+import org.gradle.util.TemporaryFolder;
+import org.jmock.Expectations;
+import org.jmock.Mockery;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultArtifactPomTest {
+    private DefaultArtifactPom artifactPom;
+    private MavenPom testPom;
+
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+
+    Mockery context = new JUnit4Mockery();
+
+    @Before
+    public void setUp() {
+        testPom = new DefaultMavenPom(context.mock(ConfigurationContainer.class), new DefaultConf2ScopeMappingContainer(),
+                context.mock(PomDependenciesConverter.class), context.mock(FileResolver.class));
+        artifactPom = new DefaultArtifactPom(testPom);
+    }
+
+    @Test
+    public void pomWithMainArtifact() {
+        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
+        File mainFile = new File("someFile");
+
+        artifactPom.addArtifact(mainArtifact, mainFile);
+
+        assertThat(artifactPom.getArtifact().getName(), equalTo("someName"));
+        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
+        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
+
+        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
+        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
+        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
+        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
+    }
+
+    @Test
+    public void pomWithMainArtifactAndClassifierArtifacts() {
+        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
+        File mainFile = new File("someFile");
+        Artifact classifierArtifact = createTestArtifact("otherName", "javadoc", "zip");
+        File classifierFile = new File("someClassifierFile");
+
+        artifactPom.addArtifact(mainArtifact, mainFile);
+        artifactPom.addArtifact(classifierArtifact, classifierFile);
+
+        assertThat(artifactPom.getArtifact().getName(), equalTo("someName"));
+        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
+        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
+
+        PublishArtifact artifact = singleItem(artifactPom.getAttachedArtifacts());
+        assertThat(artifact.getName(), equalTo("someName"));
+        assertThat(artifact.getExtension(), equalTo("zip"));
+        assertThat(artifact.getType(), equalTo("zip"));
+        assertThat(artifact.getClassifier(), equalTo("javadoc"));
+        assertThat(artifact.getFile(), equalTo(classifierFile));
+
+        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
+        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
+        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
+        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
+    }
+
+    @Test
+    public void pomWithClassifierArtifactsOnly() {
+        File classifierFile = new File("someClassifierFile");
+        Artifact classifierArtifact = createTestArtifact("someName", "javadoc", "zip");
+
+        artifactPom.addArtifact(classifierArtifact, classifierFile);
+
+        assertThat(artifactPom.getArtifact(), nullValue());
+
+        PublishArtifact artifact = singleItem(artifactPom.getAttachedArtifacts());
+        assertThat(artifact.getName(), equalTo("someName"));
+        assertThat(artifact.getExtension(), equalTo("zip"));
+        assertThat(artifact.getType(), equalTo("zip"));
+        assertThat(artifact.getClassifier(), equalTo("javadoc"));
+        assertThat(artifact.getFile(), equalTo(classifierFile));
+
+        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
+        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
+        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
+        assertThat(artifactPom.getPom().getPackaging(), equalTo("jar"));
+    }
+
+    @Test
+    public void pomWithMainArtifactAndMetadataArtifacts() {
+        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
+        File mainFile = new File("someFile");
+        File metadataFile = new File("someMetadataFile");
+        Artifact metadataArtifact = createTestArtifact("otherName", null, "sometype");
+
+        artifactPom.addArtifact(mainArtifact, mainFile);
+        artifactPom.addArtifact(metadataArtifact, metadataFile);
+
+        assertThat(artifactPom.getArtifact().getName(), equalTo("someName"));
+        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
+        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
+
+        PublishArtifact artifact = singleItem(artifactPom.getAttachedArtifacts());
+        assertThat(artifact.getName(), equalTo("someName"));
+        assertThat(artifact.getExtension(), equalTo("sometype"));
+        assertThat(artifact.getType(), equalTo("sometype"));
+        assertThat(artifact.getClassifier(), nullValue());
+        assertThat(artifact.getFile(), equalTo(metadataFile));
+
+        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
+        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
+        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
+        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
+    }
+    
+    @Test(expected = InvalidUserDataException.class)
+    public void addClassifierTwiceShouldThrowInvalidUserDataEx() {
+        File classifierFile = new File("someClassifierFile");
+        Artifact classifierArtifact = createTestArtifact("someName", "javadoc");
+        artifactPom.addArtifact(classifierArtifact, classifierFile);
+        artifactPom.addArtifact(classifierArtifact, classifierFile);
+    }
+
+    @Test(expected = InvalidUserDataException.class)
+    public void addMainArtifactTwiceShouldThrowInvalidUserDataEx() {
+        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
+        File mainFile = new File("someFile");
+        artifactPom.addArtifact(mainArtifact, mainFile);
+        artifactPom.addArtifact(mainArtifact, mainFile);
+    }
+
+    @Test
+    public void cannotAddMultipleArtifactsWithTheSameTypeAndClassifier() {
+
+        // No classifier
+        Artifact mainArtifact = createTestArtifact("someName", null);
+        artifactPom.addArtifact(mainArtifact, new File("someFile"));
+
+        assertIsDuplicate(mainArtifact, new File("someFile"));
+        assertIsDuplicate(mainArtifact, new File("otherFile"));
+        assertIsDuplicate(createTestArtifact("otherName", null), new File("otherFile"));
+
+        // Classifier
+        Artifact classifierArtifact = createTestArtifact("someName", "classifier");
+        artifactPom.addArtifact(classifierArtifact, new File("classifierFile"));
+
+        assertIsDuplicate(classifierArtifact, new File("someFile"));
+        assertIsDuplicate(classifierArtifact, new File("otherFile"));
+        assertIsDuplicate(createTestArtifact("otherName", "classifier"), new File("otherFile"));
+    }
+
+    private void assertIsDuplicate(Artifact artifact, File file) {
+        try {
+            artifactPom.addArtifact(artifact, file);
+            fail();
+        } catch (InvalidUserDataException e) {
+            assertThat(e.getMessage(), startsWith("A POM cannot have multiple artifacts with the same type and classifier."));
+        }
+    }
+
+    @Test
+    public void initWithCustomPomSettings() {
+        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
+        File mainFile = new File("someFile");
+
+        testPom.setArtifactId("customArtifactId");
+        testPom.setGroupId("customGroupId");
+        testPom.setVersion("customVersion");
+        testPom.setPackaging("customPackaging");
+
+        artifactPom.addArtifact(mainArtifact, mainFile);
+
+        assertThat(artifactPom.getArtifact().getName(), equalTo("customArtifactId"));
+        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
+        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
+        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
+
+        assertThat(artifactPom.getPom().getGroupId(), equalTo("customGroupId"));
+        assertThat(artifactPom.getPom().getArtifactId(), equalTo("customArtifactId"));
+        assertThat(artifactPom.getPom().getVersion(), equalTo("customVersion"));
+        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
+    }
+
+    private Artifact createTestArtifact(String name, String classifier) {
+        return createTestArtifact(name, classifier, "jar");
+    }
+
+    private Artifact createTestArtifact(String name, String classifier, String type) {
+        Map<String, String> extraAttributes = new HashMap<String, String>();
+        if (classifier != null) {
+            extraAttributes.put(Dependency.CLASSIFIER, classifier);
+        }
+        return new DefaultArtifact(ModuleRevisionId.newInstance("org", name, "1.0"), null, name, type, type, extraAttributes);
+    }
+
+    @Test
+    public void writePom() {
+        final MavenPom mavenPomMock = context.mock(MavenPom.class);
+        DefaultArtifactPom artifactPom = new DefaultArtifactPom(mavenPomMock);
+        final File somePomFile = new File(tmpDir.getDir(), "someDir/somePath");
+        context.checking(new Expectations() {{
+            allowing(mavenPomMock).getArtifactId();
+            will(returnValue("artifactId"));
+            one(mavenPomMock).writeTo(with(any(FileOutputStream.class)));
+        }});
+
+        PublishArtifact artifact = artifactPom.writePom(somePomFile);
+
+        assertThat(artifact.getName(), equalTo("artifactId"));
+        assertThat(artifact.getType(), equalTo("pom"));
+        assertThat(artifact.getExtension(), equalTo("pom"));
+        assertThat(artifact.getClassifier(), nullValue());
+        assertThat(artifact.getFile(), equalTo(somePomFile));
+    }
+
+    private <T> T singleItem(Iterable<? extends T> collection) {
+        List<T> elements = GUtil.addLists(collection);
+        assertThat(elements.size(), equalTo(1));
+        return elements.get(0);
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultPomFilterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenDeployerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenUploaderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenUploaderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenUploaderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/groovy/DefaultGroovyMavenUploaderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/CachingHasherTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/CachingHasherTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/CachingHasherTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/CachingHasherTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultFileSnapshotterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepositoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepositoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepositoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/DefaultTaskArtifactStateRepositoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepositoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepositoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepositoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/changedetection/ShortCircuitTaskArtifactStateRepositoryTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileCollectionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileCollectionTest.java
new file mode 100644
index 0000000..e307a3c
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileCollectionTest.java
@@ -0,0 +1,337 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file;
+
+import org.gradle.api.Task;
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.file.FileTree;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.tasks.StopExecutionException;
+import org.gradle.api.tasks.TaskDependency;
+import org.gradle.util.TestFile;
+import org.gradle.util.HelperUtil;
+import org.gradle.util.TemporaryFolder;
+import org.hamcrest.Matcher;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.File;
+import java.util.*;
+
+import static org.gradle.api.tasks.AntBuilderAwareUtil.*;
+import static org.gradle.util.Matchers.*;
+import static org.gradle.util.WrapUtil.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+public class AbstractFileCollectionTest {
+    @Rule
+    public TemporaryFolder testDir = new TemporaryFolder();
+
+    @Test
+    public void usesDisplayNameAsToString() {
+        TestFileCollection collection = new TestFileCollection();
+        assertThat(collection.toString(), equalTo("collection-display-name"));
+    }
+
+    @Test
+    public void canIterateOverFiles() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        Iterator<File> iterator = collection.iterator();
+        assertThat(iterator.next(), sameInstance(file1));
+        assertThat(iterator.next(), sameInstance(file2));
+        assertFalse(iterator.hasNext());
+    }
+
+    @Test
+    public void canGetSingleFile() {
+        File file = new File("f1");
+
+        TestFileCollection collection = new TestFileCollection(file);
+        assertThat(collection.getSingleFile(), sameInstance(file));
+    }
+
+    @Test
+    public void failsToGetSingleFileWhenCollectionContainsMultipleFiles() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        try {
+            collection.getSingleFile();
+            fail();
+        } catch (IllegalStateException e) {
+            assertThat(e.getMessage(), equalTo("Expected collection-display-name to contain exactly one file, however, it contains 2 files."));
+        }
+    }
+
+    @Test
+    public void failsToGetSingleFileWhenCollectionIsEmpty() {
+        TestFileCollection collection = new TestFileCollection();
+        try {
+            collection.getSingleFile();
+            fail();
+        } catch (IllegalStateException e) {
+            assertThat(e.getMessage(), equalTo("Expected collection-display-name to contain exactly one file, however, it contains no files."));
+        }
+    }
+
+    @Test
+    public void containsFile() {
+        File file1 = new File("f1");
+
+        TestFileCollection collection = new TestFileCollection(file1);
+        assertTrue(collection.contains(file1));
+        assertFalse(collection.contains(new File("f2")));
+    }
+
+    @Test
+    public void canGetFilesAsAPath() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        assertThat(collection.getAsPath(), equalTo(file1 + File.pathSeparator + file2));
+    }
+
+    @Test
+    public void canAddCollectionsTogether() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+        File file3 = new File("f3");
+
+        TestFileCollection collection1 = new TestFileCollection(file1, file2);
+        TestFileCollection collection2 = new TestFileCollection(file2, file3);
+        FileCollection sum = collection1.plus(collection2);
+        assertThat(sum, instanceOf(UnionFileCollection.class));
+        assertThat(sum.getFiles(), equalTo(toLinkedSet(file1, file2, file3)));
+    }
+
+    @Test
+    public void canSubtractCollections() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+        File file3 = new File("f3");
+
+        TestFileCollection collection1 = new TestFileCollection(file1, file2);
+        TestFileCollection collection2 = new TestFileCollection(file2, file3);
+        FileCollection sum = collection1.minus(collection2);
+        assertThat(sum.getFiles(), equalTo(toLinkedSet(file1)));
+    }
+
+    @Test
+    public void cannotAddCollectionToThisCollection() {
+        try {
+            new TestFileCollection().add(new TestFileCollection());
+            fail();
+        } catch (UnsupportedOperationException e) {
+            assertThat(e.getMessage(), equalTo("Collection-display-name does not allow modification."));
+        }
+    }
+
+    @Test
+    public void canAddToAntBuilderAsResourceCollection() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        assertSetContains(collection, toSet("f1", "f2"));
+    }
+
+    @Test
+    public void includesOnlyExistingFilesWhenAddedToAntBuilderAsAFileSetOrMatchingTask() {
+        TestFile testDir = this.testDir.getDir();
+        TestFile file1 = testDir.file("f1").touch();
+        TestFile dir1 = testDir.file("dir1").createDir();
+        TestFile file2 = dir1.file("f2").touch();
+        TestFile missing = testDir.file("f3");
+        testDir.file("f2").touch();
+        testDir.file("ignored1").touch();
+        dir1.file("f1").touch();
+        dir1.file("ignored1").touch();
+
+        TestFileCollection collection = new TestFileCollection(file1, file2, dir1, missing);
+        assertSetContainsForFileSet(collection, toSet("f1", "f2"));
+        assertSetContainsForMatchingTask(collection, toSet("f1", "f2"));
+    }
+
+    @Test
+    public void isEmptyWhenFilesIsEmpty() {
+        assertTrue(new TestFileCollection().isEmpty());
+        assertFalse(new TestFileCollection(new File("f1")).isEmpty());
+    }
+
+    @Test
+    public void throwsStopExceptionWhenEmpty() {
+        TestFileCollection collection = new TestFileCollection();
+        try {
+            collection.stopExecutionIfEmpty();
+            fail();
+        } catch (StopExecutionException e) {
+            assertThat(e.getMessage(), equalTo("Collection-display-name does not contain any files."));
+        }
+    }
+
+    @Test
+    public void doesNotThrowStopExceptionWhenNotEmpty() {
+        TestFileCollection collection = new TestFileCollection(new File("f1"));
+        collection.stopExecutionIfEmpty();
+    }
+
+    @Test
+    public void canConvertToCollectionTypes() {
+        File file = new File("f1");
+        TestFileCollection collection = new TestFileCollection(file);
+
+        assertThat(collection.asType(Collection.class), equalTo((Object) toLinkedSet(file)));
+        assertThat(collection.asType(Set.class), equalTo((Object) toLinkedSet(file)));
+        assertThat(collection.asType(List.class), equalTo((Object) toList(file)));
+    }
+
+    @Test
+    public void canConvertToArray() {
+        File file = new File("f1");
+        TestFileCollection collection = new TestFileCollection(file);
+
+        assertThat(collection.asType(File[].class), equalTo((Object) toArray(file)));
+    }
+
+    @Test
+    public void canConvertCollectionWithSingleFileToFile() {
+        File file = new File("f1");
+        TestFileCollection collection = new TestFileCollection(file);
+
+        assertThat(collection.asType(File.class), equalTo((Object) file));
+    }
+
+    @Test
+    public void canConvertToFileTree() {
+        TestFileCollection collection = new TestFileCollection();
+        assertThat(collection.asType(FileTree.class), notNullValue());
+    }
+
+    @Test
+    public void throwsUnsupportedOperationExceptionWhenConvertingToUnsupportedType() {
+        try {
+            new TestFileCollection().asType(Integer.class);
+            fail();
+        } catch (UnsupportedOperationException e) {
+            assertThat(e.getMessage(), equalTo("Cannot convert collection-display-name to type Integer, as this type is not supported."));
+        }
+    }
+
+    @Test
+    public void toFileTreeReturnsSingletonTreeForEachFileInCollection() {
+        File file = new File("f1");
+
+        TestFileCollection collection = new TestFileCollection(file);
+        FileTree tree = collection.getAsFileTree();
+        assertThat(tree, instanceOf(CompositeFileTree.class));
+        CompositeFileTree compositeTree = (CompositeFileTree) tree;
+        assertThat(compositeTree.getSourceCollections(), hasItems((Matcher) instanceOf(SingletonFileTree.class)));
+    }
+
+    @Test
+    public void canFilterContentsOfCollectionUsingSpec() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        FileCollection filtered = collection.filter(new Spec<File>() {
+            public boolean isSatisfiedBy(File element) {
+                return element.getName().equals("f1");
+            }
+        });
+        assertThat(filtered.getFiles(), equalTo(toSet(file1)));
+    }
+
+    @Test
+    public void canFilterContentsOfCollectionUsingClosure() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        FileCollection filtered = collection.filter(HelperUtil.toClosure("{f -> f.name == 'f1'}"));
+        assertThat(filtered.getFiles(), equalTo(toSet(file1)));
+    }
+
+    @Test
+    public void filteredCollectionIsLive() {
+        File file1 = new File("f1");
+        File file2 = new File("f2");
+        File file3 = new File("dir/f1");
+
+        TestFileCollection collection = new TestFileCollection(file1, file2);
+        FileCollection filtered = collection.filter(HelperUtil.toClosure("{f -> f.name == 'f1'}"));
+        assertThat(filtered.getFiles(), equalTo(toSet(file1)));
+
+        collection.files.add(file3);
+        assertThat(filtered.getFiles(), equalTo(toSet(file1, file3)));
+    }
+
+    @Test
+    public void hasNoDependencies() {
+        assertThat(new TestFileCollection().getBuildDependencies().getDependencies(null), isEmpty());
+    }
+
+    @Test
+    public void fileTreeHasSameDependenciesAsThis() {
+        TestFileCollectionWithDependency collection = new TestFileCollectionWithDependency();
+        collection.files.add(new File("f1"));
+
+        assertThat(collection.getAsFileTree().getBuildDependencies(), sameInstance(collection.dependency));
+        assertThat(collection.getAsFileTree().matching(HelperUtil.TEST_CLOSURE).getBuildDependencies(), sameInstance(collection.dependency));
+    }
+
+    @Test
+    public void filteredCollectionHasSameDependenciesAsThis() {
+        TestFileCollectionWithDependency collection = new TestFileCollectionWithDependency();
+
+        assertThat(collection.filter(HelperUtil.toClosure("{true}")).getBuildDependencies(), sameInstance(collection.dependency));
+    }
+
+    private class TestFileCollection extends AbstractFileCollection {
+        Set<File> files = new LinkedHashSet<File>();
+
+        private TestFileCollection(File... files) {
+            this.files.addAll(Arrays.asList(files));
+        }
+
+        public String getDisplayName() {
+            return "collection-display-name";
+        }
+
+        public Set<File> getFiles() {
+            return files;
+        }
+    }
+
+    private class TestFileCollectionWithDependency extends TestFileCollection {
+        TaskDependency dependency = new TaskDependency() {
+            public Set<? extends Task> getDependencies(Task task) {
+                throw new UnsupportedOperationException();
+            }
+        };
+
+        @Override
+        public TaskDependency getBuildDependencies() {
+            return dependency;
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeElementTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeElementTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeElementTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeElementTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/AbstractFileTreeTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/file/BaseDirConverterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/BaseDirConverterTest.groovy
new file mode 100644
index 0000000..089619e
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/BaseDirConverterTest.groovy
@@ -0,0 +1,334 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+package org.gradle.api.internal.file
+
+import org.gradle.api.InvalidUserDataException
+import org.gradle.api.PathValidation
+import org.gradle.api.file.FileCollection
+import org.gradle.util.TemporaryFolder
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+import java.util.concurrent.Callable
+import org.gradle.util.OperatingSystem
+
+/**
+ * @author Hans Dockter
+ */
+class BaseDirConverterTest {
+    static final String TEST_PATH = 'testpath'
+
+    File baseDir
+    File testFile
+    File testDir
+
+    BaseDirConverter baseDirConverter
+    @Rule public TemporaryFolder rootDir = new TemporaryFolder();
+
+    @Before public void setUp() {
+        baseDir = rootDir.dir
+        baseDirConverter = new BaseDirConverter(baseDir)
+        testFile = new File(baseDir, 'testfile')
+        testDir = new File(baseDir, 'testdir')
+    }
+
+    @Test(expected = IllegalArgumentException) public void testWithNullPath() {
+        baseDirConverter.resolve(null)
+    }
+
+    @Test public void testWithNoPathValidation() {
+        // No exceptions means test has passed
+        baseDirConverter.resolve(TEST_PATH)
+        baseDirConverter.resolve(TEST_PATH, PathValidation.NONE)
+    }
+
+    @Test public void testPathValidationWithNonExistingFile() {
+        try {
+            baseDirConverter.resolve(testFile.name, PathValidation.FILE)
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("File '$testFile.canonicalFile' does not exist.".toString()))
+        }
+    }
+
+    @Test public void testPathValidationForFileWithDirectory() {
+        testDir.mkdir()
+        try {
+            baseDirConverter.resolve(testDir.name, PathValidation.FILE)
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("File '$testDir.canonicalFile' is not a file.".toString()))
+        }
+    }
+
+    @Test public void testWithValidFile() {
+        testFile.createNewFile()
+        baseDirConverter.resolve(testFile.name, PathValidation.FILE)
+    }
+
+    @Test public void testPathValidationWithNonExistingDirectory() {
+        try {
+            baseDirConverter.resolve(testDir.name, PathValidation.DIRECTORY)
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("Directory '$testDir.canonicalFile' does not exist.".toString()))
+        }
+    }
+
+    @Test public void testPathValidationWithValidDirectory() {
+        testDir.mkdir()
+        baseDirConverter.resolve(testDir.name, PathValidation.DIRECTORY)
+    }
+
+    @Test public void testPathValidationForDirectoryWithFile() {
+        testFile.createNewFile()
+        try {
+            baseDirConverter.resolve(testFile.name, PathValidation.DIRECTORY)
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("Directory '$testFile.canonicalFile' is not a directory.".toString()))
+        }
+    }
+
+    @Test public void testPathValidationForExistingDirAndFile() {
+        testDir.mkdir()
+        testFile.createNewFile()
+        baseDirConverter.resolve(testDir.name, PathValidation.EXISTS)
+        baseDirConverter.resolve(testFile.name, PathValidation.EXISTS)
+    }
+
+    @Test public void testExistsPathValidationWithNonExistingDir() {
+        try {
+            baseDirConverter.resolve(testDir.name, PathValidation.EXISTS)
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("File '$testDir.canonicalFile' does not exist.".toString()))
+        }
+    }
+
+    @Test public void testExistsPathValidationWithNonExistingFile() {
+        try {
+            baseDirConverter.resolve(testFile.name, PathValidation.EXISTS)
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("File '$testFile.canonicalFile' does not exist.".toString()))
+        }
+    }
+
+    @Test public void testResolveAbsolutePath() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.path))
+    }
+
+    @Test public void testResolveRelativePath() {
+        String relativeFileName = "relative"
+        assertEquals(new File(baseDir, relativeFileName), baseDirConverter.resolve(relativeFileName))
+        assertEquals(baseDir, baseDirConverter.resolve("."))
+    }
+
+    @Test public void testResolveFileWithAbsolutePath() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile))
+    }
+
+    @Test public void testResolveRelativeObject() {
+        assertEquals(new File(baseDir, "12"), baseDirConverter.resolve(12))
+    }
+
+    @Test public void testResolveFileWithRelativePath() {
+        File relativeFile = new File('relative')
+        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve(relativeFile))
+    }
+
+    @Test public void testResolveAbsolutePathOnCaseInsensitiveFileSystemToUri() {
+        if (OperatingSystem.current().isCaseSensitiveFileSystem()) {
+            return
+        }
+
+        String path = baseDir.absolutePath.toLowerCase()
+        assertEquals(baseDir, baseDirConverter.resolve(path))
+    }
+
+    @Test public void testResolveRelativeFileURIString() {
+        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve('file:relative'))
+        assertEquals(new File(baseDir.parentFile, 'relative'), baseDirConverter.resolve('file:../relative'))
+    }
+
+    @Test public void testResolveAbsoluteFileURIString() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI().toString()))
+    }
+
+    @Test public void testResolveAbsoluteFileURI() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI()))
+    }
+
+    @Test public void testResolveAbsoluteFileURL() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI().toURL()))
+    }
+
+    @Test public void testResolveFilePathWithURIEncodedAndReservedCharacters() {
+        File absoluteFile = new File('white%20space').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.absolutePath))
+        absoluteFile = new File('white space').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.absolutePath))
+    }
+
+    @Test public void testResolveURIStringWithEncodedAndReservedCharacters() {
+        assertEquals(new File(baseDir, 'white space'), baseDirConverter.resolve('file:white%20space'))
+        assertEquals(new File(baseDir, 'not%encoded'), baseDirConverter.resolve('file:not%encoded'))
+        assertEquals(new File(baseDir, 'bad%1'), baseDirConverter.resolve('file:bad%1'))
+        assertEquals(new File(baseDir, 'white space'), baseDirConverter.resolve('file:white space'))
+    }
+
+    @Test public void testResolveURIWithReservedCharacters() {
+        File absoluteFile = new File('white space').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI()))
+    }
+
+    @Test public void testResolveURLWithReservedCharacters() {
+        File absoluteFile = new File('white space').canonicalFile
+        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI().toURL()))
+    }
+
+    @Test public void testCannotResolveNonFileURI() {
+        try {
+            baseDirConverter.resolve("http://www.gradle.org")
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo('Cannot convert URL \'http://www.gradle.org\' to a file.'))
+        }
+    }
+
+    @Test public void testResolveClosure() {
+        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve({'relative'}))
+    }
+
+    @Test public void testResolveCallable() {
+        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve({'relative'} as Callable))
+    }
+
+    @Test public void testResolveFileSource() {
+        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve(baseDirConverter.resolveLater('relative')))
+    }
+
+    @Test public void testResolveNestedClosuresAndCallables() {
+        Callable callable = {'relative'} as Callable
+        Closure closure = {callable}
+        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve(closure))
+    }
+
+    @Test public void testFiles() {
+        FileCollection collection = baseDirConverter.resolveFiles('a', 'b')
+        assertThat(collection, instanceOf(PathResolvingFileCollection))
+        assertThat(collection.sources, equalTo(['a', 'b']))
+    }
+
+    @Test public void testFilesReturnsSourceFileCollection() {
+        FileCollection source = baseDirConverter.resolveFiles('a')
+        FileCollection collection = baseDirConverter.resolveFiles(source)
+        assertThat(collection, sameInstance(source))
+    }
+
+    @Test public void testResolveAbsolutePathToUri() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile.toURI(), baseDirConverter.resolveUri(absoluteFile.path))
+    }
+
+    @Test public void testResolveRelativePathToUri() {
+        assertEquals(new File(baseDir, 'relative').toURI(), baseDirConverter.resolveUri('relative'))
+    }
+
+    @Test public void testResolveFileWithAbsolutePathToUri() {
+        File absoluteFile = new File('nonRelative').canonicalFile
+        assertEquals(absoluteFile.toURI(), baseDirConverter.resolveUri(absoluteFile))
+    }
+
+    @Test public void testResolveFileWithRelativePathToUri() {
+        File relativeFile = new File('relative')
+        assertEquals(new File(baseDir, 'relative').toURI(), baseDirConverter.resolveUri(relativeFile))
+    }
+
+    @Test public void testResolveUriStringToUri() {
+        assertEquals(new URI("http://www.gradle.org"), baseDirConverter.resolveUri("http://www.gradle.org"))
+    }
+
+    @Test public void testResolveUriObjectToUri() {
+        URI uri = new URI("http://www.gradle.org")
+        assertEquals(uri, baseDirConverter.resolveUri(uri))
+    }
+
+    @Test public void testResolveUrlObjectToUri() {
+        assertEquals(new URI("http://www.gradle.org"), baseDirConverter.resolveUri(new URL("http://www.gradle.org")))
+    }
+
+    @Test public void testResolveAbsolutePathWithReservedCharsToUri() {
+        assertEquals(new File(baseDir, 'with white%20space').toURI(), baseDirConverter.resolveUri('with white%20space'))
+        assertEquals('with white%20space', baseDirConverter.resolve(baseDirConverter.resolveUri('with white%20space')).name)
+    }
+
+    @Test public void testResolveUriStringWithEncodedCharsToUri() {
+        assertEquals(new URI("http://www.gradle.org/white%20space"), baseDirConverter.resolveUri("http://www.gradle.org/white%20space"))
+    }
+    
+    @Test public void testResolveRelativePathToRelativePath() {
+        assertEquals("relative", baseDirConverter.resolveAsRelativePath("relative"))
+    }
+
+    @Test public void testResolveAbsoluteChildPathToRelativePath() {
+        def absoluteFile = new File(baseDir, 'child').absoluteFile
+        assertEquals('child', baseDirConverter.resolveAsRelativePath(absoluteFile))
+        assertEquals('child', baseDirConverter.resolveAsRelativePath(absoluteFile.absolutePath))
+    }
+
+    @Test public void testResolveAbsoluteSiblingPathToRelativePath() {
+        def absoluteFile = new File(baseDir, '../sibling').absoluteFile
+        assertEquals("..${File.separator}sibling".toString(), baseDirConverter.resolveAsRelativePath(absoluteFile))
+        assertEquals("..${File.separator}sibling".toString(), baseDirConverter.resolveAsRelativePath(absoluteFile.absolutePath))
+    }
+
+    @Test public void testResolveBaseDirToRelativePath() {
+        assertEquals('.', baseDirConverter.resolveAsRelativePath(baseDir))
+        assertEquals('.', baseDirConverter.resolveAsRelativePath(baseDir.absolutePath))
+        assertEquals('.', baseDirConverter.resolveAsRelativePath('.'))
+        assertEquals('.', baseDirConverter.resolveAsRelativePath("../$baseDir.name"))
+    }
+
+    @Test public void testResolveParentDirToRelativePath() {
+        assertEquals('..', baseDirConverter.resolveAsRelativePath(baseDir.parentFile))
+        assertEquals('..', baseDirConverter.resolveAsRelativePath('..'))
+    }
+
+    @Test public void testResolveLater() {
+        String src;
+        Closure cl = { src }
+        FileSource source = baseDirConverter.resolveLater(cl)
+        src = 'file1'
+        assertEquals(new File(baseDir, 'file1'), source.get())
+    }
+    
+    @Test public void testCreateFileResolver() {
+        File newBaseDir = new File(baseDir, 'subdir')
+        assertEquals(new File(newBaseDir, 'file'), baseDirConverter.withBaseDir('subdir').resolve('file'))
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/CompositeFileCollectionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/CompositeFileCollectionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/CompositeFileCollectionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/CompositeFileCollectionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/CompositeFileTreeTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/CompositeFileTreeTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/CompositeFileTreeTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/CompositeFileTreeTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultDirectoryWalkerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultDirectoryWalkerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultDirectoryWalkerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultDirectoryWalkerTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultFileOperationsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultFileOperationsTest.groovy
new file mode 100644
index 0000000..b8b5898
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultFileOperationsTest.groovy
@@ -0,0 +1,327 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.api.internal.file
+
+import org.apache.commons.io.FileUtils
+import org.gradle.api.InvalidUserDataException
+import org.gradle.api.PathValidation
+import org.gradle.api.file.ConfigurableFileCollection
+import org.gradle.api.file.FileTree
+import org.gradle.api.internal.file.archive.TarFileTree
+import org.gradle.api.internal.file.archive.ZipFileTree
+import org.gradle.api.internal.file.copy.CopyActionImpl
+import org.gradle.api.internal.file.copy.CopySpecImpl
+import org.gradle.api.internal.tasks.TaskResolver
+import org.gradle.util.TemporaryFolder
+import org.gradle.util.TestFile
+import org.gradle.process.internal.ExecException
+import org.gradle.process.ExecResult
+import org.junit.Rule
+import org.junit.Test
+import spock.lang.Specification
+import org.gradle.util.OperatingSystem
+import org.gradle.util.ClasspathUtil
+
+public class DefaultFileOperationsTest extends Specification {
+    private final FileResolver resolver = Mock()
+    private final TaskResolver taskResolver = Mock()
+    private final TemporaryFileProvider temporaryFileProvider = Mock()
+    private DefaultFileOperations fileOperations = new DefaultFileOperations(resolver, taskResolver, temporaryFileProvider)
+    @Rule
+    public final TemporaryFolder tmpDir = new TemporaryFolder()
+
+    def resolvesFile() {
+        when:
+        TestFile file = expectPathResolved('path')
+
+        then:
+        fileOperations.file('path') == file
+    }
+
+    def resolvesFileWithValidation() {
+        TestFile file = tmpDir.file('path')
+        resolver.resolve('path', PathValidation.EXISTS) >> file
+
+        expect:
+        fileOperations.file('path', PathValidation.EXISTS) == file
+    }
+
+    def resolvesURI() {
+        when:
+        URI uri = expectPathResolvedToUri('path')
+
+        then:
+        fileOperations.uri('path') == uri
+    }
+
+    def resolvesFiles() {
+        when:
+        def fileCollection = fileOperations.files('a', 'b')
+
+        then:
+        fileCollection instanceof PathResolvingFileCollection
+        fileCollection.sources == ['a', 'b']
+        fileCollection.resolver.is(resolver)
+        fileCollection.buildDependency.resolver.is(taskResolver)
+    }
+
+    def createsFileTree() {
+        TestFile baseDir = expectPathResolved('base')
+
+        when:
+        def fileTree = fileOperations.fileTree('base')
+
+        then:
+        fileTree instanceof FileTree
+        fileTree.dir == baseDir
+        fileTree.resolver.is(resolver)
+    }
+
+    def createsFileTreeFromMap() {
+        TestFile baseDir = expectPathResolved('base')
+
+        when:
+        def fileTree = fileOperations.fileTree(dir: 'base')
+
+        then:
+        fileTree instanceof FileTree
+        fileTree.dir == baseDir
+        fileTree.resolver.is(resolver)
+    }
+
+    @Test
+    public void createsFileTreeFromClosure() {
+        TestFile baseDir = expectPathResolved('base')
+
+        when:
+        def fileTree = fileOperations.fileTree { from 'base' }
+
+        then:
+        fileTree instanceof FileTree
+        fileTree.dir == baseDir
+        fileTree.resolver.is(resolver)
+    }
+
+    def createsZipFileTree() {
+        expectPathResolved('path')
+        expectTempFileCreated()
+        when:
+        def zipTree = fileOperations.zipTree('path')
+
+        then:
+        zipTree instanceof ZipFileTree
+    }
+
+    def createsTarFileTree() {
+        expectPathResolved('path')
+        expectTempFileCreated()
+
+        when:
+        def tarTree = fileOperations.tarTree('path')
+
+        then:
+        tarTree instanceof TarFileTree
+    }
+
+    def copiesFiles() {
+        FileTree fileTree = Mock(FileTree)
+        resolver.resolveFilesAsTree(_) >> fileTree
+        // todo we should make this work so that we can be more specific
+//        resolver.resolveFilesAsTree(['file'] as Object[]) >> fileTree
+//        resolver.resolveFilesAsTree(['file'] as Set) >> fileTree
+        fileTree.matching(_) >> fileTree
+        resolver.resolve('dir') >> tmpDir.getDir()
+
+        when:
+        def result = fileOperations.copy { from 'file'; into 'dir' }
+
+        then:
+        result instanceof CopyActionImpl
+        !result.didWork
+    }
+
+    def deletes() {
+        TestFile fileToBeDeleted = tmpDir.file("file")
+        ConfigurableFileCollection fileCollection = new PathResolvingFileCollection(resolver, null, "file")
+        resolver.resolveFiles(["file"] as Object[]) >> fileCollection
+        resolver.resolve("file") >> fileToBeDeleted
+        fileToBeDeleted.touch();
+
+        expect:
+        fileOperations.delete('file') == true
+        fileToBeDeleted.isFile() == false
+    }
+
+    def makesDir() {
+        TestFile dirToBeCreated = tmpDir.file("parentDir", "dir")
+        resolver.resolve('parentDir/dir') >> dirToBeCreated
+
+        when:
+        File actualDir = fileOperations.mkdir('parentDir/dir')
+
+        then:
+        actualDir == dirToBeCreated
+        actualDir.isDirectory() == true
+    }
+
+    def makesDirThrowsExceptionIfPathPointsToFile() {
+        TestFile dirToBeCreated = tmpDir.file("parentDir", "dir")
+        dirToBeCreated.touch();
+        resolver.resolve('parentDir/dir') >> dirToBeCreated
+
+        when:
+        fileOperations.mkdir('parentDir/dir')
+
+        then:
+        thrown(InvalidUserDataException)
+    }
+
+    def createsCopySpec() {
+        when:
+        def spec = fileOperations.copySpec { include 'pattern'}
+
+        then:
+        spec instanceof CopySpecImpl
+        spec.includes == ['pattern'] as Set
+    }
+
+    private TestFile expectPathResolved(String path) {
+        TestFile file = tmpDir.file(path)
+        resolver.resolve(path) >> file
+        return file
+    }
+
+    private URI expectPathResolvedToUri(String path) {
+        TestFile file = tmpDir.file(path)
+        resolver.resolveUri(path) >> file.toURI()
+        return file.toURI()
+    }
+
+    private TestFile expectTempFileCreated() {
+        TestFile file = tmpDir.file('expandedArchives')
+        temporaryFileProvider.newTemporaryFile('expandedArchives') >> file
+        return file
+    }
+
+    def javaexec() {
+        File testFile = tmpDir.file("someFile")
+        fileOperations = new DefaultFileOperations(resolver(), taskResolver, temporaryFileProvider)
+        List files = ClasspathUtil.getClasspath(getClass().classLoader)
+
+        when:
+        ExecResult result = fileOperations.javaexec {
+            classpath(files as Object[])
+            main = 'org.gradle.api.internal.file.SomeMain'
+            args testFile.absolutePath
+        }
+
+        then:
+        testFile.isFile()
+        result.exitValue == 0
+    }
+
+    def javaexecWithNonZeroExitValueShouldThrowException() {
+        fileOperations = new DefaultFileOperations(resolver(), taskResolver, temporaryFileProvider)
+
+        when:
+        fileOperations.javaexec {
+            main = 'org.gradle.UnknownMain'
+        }
+
+        then:
+        thrown(ExecException)
+    }
+
+    def javaexecWithNonZeroExitValueAndIgnoreExitValueShouldNotThrowException() {
+        fileOperations = new DefaultFileOperations(resolver(), taskResolver, temporaryFileProvider)
+
+        when:
+        ExecResult result = fileOperations.javaexec {
+            main = 'org.gradle.UnknownMain'
+            ignoreExitValue = true
+        }
+
+        then:
+        result.exitValue != 0
+    }
+
+    def exec() {
+        if (OperatingSystem.current().isWindows()) {
+            return
+        }
+
+        fileOperations = new DefaultFileOperations(resolver(), taskResolver, temporaryFileProvider)
+        File testFile = tmpDir.file("someFile")
+
+        when:
+        ExecResult result = fileOperations.exec {
+            executable = "touch"
+            workingDir = tmpDir.getDir()
+            args testFile.name
+        }
+
+        then:
+        testFile.isFile()
+        result.exitValue == 0
+    }
+
+    def execWithNonZeroExitValueShouldThrowException() {
+        if (OperatingSystem.current().isWindows()) {
+            return
+        }
+        fileOperations = new DefaultFileOperations(resolver(), taskResolver, temporaryFileProvider)
+
+        when:
+        fileOperations.exec {
+            executable = "touch"
+            workingDir = tmpDir.getDir()
+            args tmpDir.dir.name + "/nonExistingDir/someFile"
+        }
+
+        then:
+        thrown(ExecException)
+    }
+
+    def execWithNonZeroExitValueAndIgnoreExitValueShouldNotThrowException() {
+        if (OperatingSystem.current().isWindows()) {
+            return
+        }
+        fileOperations = new DefaultFileOperations(resolver(), taskResolver, temporaryFileProvider)
+
+        when:
+        ExecResult result = fileOperations.exec {
+            ignoreExitValue = true
+            executable = "touch"
+            workingDir = tmpDir.getDir()
+            args tmpDir.dir.name + "/nonExistingDir/someFile"
+        }
+
+        then:
+        result.exitValue != 0
+    }
+
+    def resolver() {
+        return new BaseDirConverter(tmpDir.testDir)
+    }
+}
+
+class SomeMain {
+    static void main(String[] args) {
+        FileUtils.touch(new File(args[0]))
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySetTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySetTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySetTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultSourceDirectorySetTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProviderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProviderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProviderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/DefaultTemporaryFileProviderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/FileSetTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/FileSetTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/FileSetTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/FileSetTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/MapFileTreeTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/MapFileTreeTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/MapFileTreeTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/MapFileTreeTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/PathResolvingFileCollectionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/PathResolvingFileCollectionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/PathResolvingFileCollectionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/PathResolvingFileCollectionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/RelativePathTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/RelativePathTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/RelativePathTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/RelativePathTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/SimpleFileCollectionTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/SimpleFileCollectionTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/SimpleFileCollectionTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/SimpleFileCollectionTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/SingletonFileCollectionTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/SingletonFileCollectionTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/SingletonFileCollectionTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/SingletonFileCollectionTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/SingletonFileTreeTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/SingletonFileTreeTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/SingletonFileTreeTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/SingletonFileTreeTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/UnionFileCollectionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/UnionFileCollectionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/UnionFileCollectionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/UnionFileCollectionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/UnionFileTreeTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/UnionFileTreeTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/UnionFileTreeTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/UnionFileTreeTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/TarCopySpecVisitorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/TarFileTreeTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/TarFileTreeTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/TarFileTreeTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/TarFileTreeTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/ZipCopySpecVisitorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/ZipFileTreeTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/ZipFileTreeTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/archive/ZipFileTreeTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/archive/ZipFileTreeTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/CopyActionImplTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/CopyActionImplTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/CopyActionImplTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/CopyActionImplTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/CopySpecImplTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/CopySpecImplTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/CopySpecImplTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/CopySpecImplTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/DeleteActionImplTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/DeleteActionImplTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/DeleteActionImplTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/DeleteActionImplTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopyActionImplTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopyActionImplTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopyActionImplTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopyActionImplTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/FileCopySpecVisitorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/FilterChainTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/FilterChainTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/FilterChainTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/FilterChainTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/LineFilterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/LineFilterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/LineFilterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/LineFilterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/NormalizingCopySpecVisitorTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/RegExpNameMapperTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/RegExpNameMapperTest.java
new file mode 100644
index 0000000..6073b87
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/RegExpNameMapperTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.file.copy;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class RegExpNameMapperTest {
+    @Test
+    public void testRenameWithCapture() {
+        RegExpNameMapper mapper = new RegExpNameMapper("(.+).java", "$1Test.java");
+        assertEquals("SourceTest.java", mapper.transform("Source.java"));
+        assertEquals("SecondTest.java", mapper.transform("Second.java"));
+    }
+
+    @Test
+    public void testRenameNoMatch() {
+        RegExpNameMapper mapper = new RegExpNameMapper("(.+).java", "$1Test.java");
+        String noMatch = "NoMatch";
+        assertEquals(noMatch, mapper.transform(noMatch));
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/RenamingCopyActionTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/RenamingCopyActionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/RenamingCopyActionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/RenamingCopyActionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitorTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/copy/SyncCopySpecVisitorTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcherTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcherTest.java
new file mode 100644
index 0000000..697e4d7
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcherTest.java
@@ -0,0 +1,218 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.file.pattern;
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.gradle.api.file.RelativePath;
+
+import java.util.List;
+
+public class DefaultPatternMatcherTest {
+    private DefaultPatternMatcher matcher;
+    private RelativePath path;
+
+
+    @Test public void testParsing() {
+        List<PatternStep> steps;
+        PatternStep step;
+
+        // parse forward slash pattern
+        matcher = new DefaultPatternMatcher(true, true, "a", "b", "c");
+        steps = matcher.getStepsForTest();
+        assertEquals(3, steps.size());
+        step = steps.get(2);
+        assertTrue(step.matches("c", true));
+        //assertFalse(step.matches("c", false));
+
+        // try matching a wrong literal string
+        assertFalse(step.matches("somethingelse", true));
+
+        // check greedy
+        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c");
+        steps = matcher.getStepsForTest();
+        step = steps.get(1);
+        assertTrue(step.isGreedy());
+    }
+
+    @Test public void testEmpty() {
+        DefaultPatternMatcher matcher = new DefaultPatternMatcher(true, true);
+        List<PatternStep> steps = matcher.getStepsForTest();
+        assertEquals(0, steps.size());
+
+        // both empty
+        RelativePath path = new RelativePath(true);
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        // empty matcher, non-empty path
+        path = new RelativePath(true, "a");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        // non-empty matcher, empty path
+        matcher = new DefaultPatternMatcher(true, true, "a");
+        path = new RelativePath(true);
+        assertFalse(matcher.isSatisfiedBy(path));
+
+    }
+
+    @Test public void testLiterals() {
+        matcher = new DefaultPatternMatcher(true, true, "a");
+        path = new RelativePath(true, "a");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "b");
+        assertFalse(matcher.isSatisfiedBy(path));
+        
+        matcher = new DefaultPatternMatcher(true, true, "a", "b");
+        path = new RelativePath(true, "a", "b");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "c");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "b", "c");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        // short path
+        path = new RelativePath(true, "a");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        // long path
+        path = new RelativePath(true, "a", "b", "c");
+        assertFalse(matcher.isSatisfiedBy(path));
+    }
+
+    @Test public void testPartials() {
+        matcher = new DefaultPatternMatcher(true, true, "a", "b", "c");
+        path = new RelativePath(false, "a", "b");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "b");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        matcher = new DefaultPatternMatcher(false, true, "a", "b", "c");
+        path = new RelativePath(false, "a", "b");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+    }
+
+    @Test public void testWildCards() {
+        matcher = new DefaultPatternMatcher(true, true, "*");
+        path = new RelativePath(true, "anything");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "anything", "b");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        matcher = new DefaultPatternMatcher(true, true, "any??ing");
+        path = new RelativePath(true, "anything");
+        assertTrue(matcher.isSatisfiedBy(path));
+    }
+
+    @Test public void testGreedy() {
+        matcher = new DefaultPatternMatcher(true, true, "a", "**");
+        path = new RelativePath(true, "a", "b", "c");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        //leading greedy
+        matcher = new DefaultPatternMatcher(true, true, "**", "c");
+        path = new RelativePath(true, "a", "b", "c");
+        assertTrue(matcher.isSatisfiedBy(path));
+        
+        path = new RelativePath(true, "a", "b", "d");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        // inner greedy
+        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c");
+        path = new RelativePath(true, "a", "b", "c");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "aa", "bb", "c");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(false, "a", "aa", "bb", "d");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "aa", "bb", "d");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        // fake trail
+        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c", "d");
+        path = new RelativePath(true, "a", "b", "c", "e", "c", "d");
+        assertTrue(matcher.isSatisfiedBy(path));
+        
+        // multiple greedies
+        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c", "**", "e");
+        path = new RelativePath(true, "a", "b", "c", "d", "e");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "b", "bb", "c", "d", "e");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "q", "bb", "c", "d", "c", "d", "e");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        // Missing greedy
+        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c");
+        path = new RelativePath(true, "a", "c");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "a", "d");
+        assertFalse(matcher.isSatisfiedBy(path));
+    }
+
+    @Test public void testTypical() {
+        matcher = new DefaultPatternMatcher(true, true, "**", "CVS", "*");
+        path = new RelativePath(true, "CVS", "Repository");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "org", "gradle", "CVS", "Entries");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "org", "gradle", "CVS", "foo", "bar", "Entries");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        matcher = new DefaultPatternMatcher(true, true, "src", "main", "**");
+        path = new RelativePath(true, "src", "main", "groovy", "org");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "src", "test", "groovy", "org");
+        assertFalse(matcher.isSatisfiedBy(path));
+
+        matcher = new DefaultPatternMatcher(true, true, "**", "test", "**");
+        // below fails, trailing ** not ignored
+        path = new RelativePath(true, "src", "main", "test");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "src", "test", "main");
+        assertTrue(matcher.isSatisfiedBy(path));
+
+        path = new RelativePath(true, "src", "main", "fred");
+        assertFalse(matcher.isSatisfiedBy(path));
+    }
+
+    @Test public void testCase() {
+        matcher = new DefaultPatternMatcher(true, true, "a", "b");
+        assertTrue(matcher.isSatisfiedBy(new RelativePath(true, "a", "b")));
+        assertFalse(matcher.isSatisfiedBy(new RelativePath(true, "A", "B")));
+
+        matcher = new DefaultPatternMatcher(true, false, "a", "b");
+        assertTrue(matcher.isSatisfiedBy(new RelativePath(true, "a", "b")));
+        assertTrue(matcher.isSatisfiedBy(new RelativePath(true, "A", "B")));
+    }
+
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcherTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcherTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcherTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/NameOnlyPatternMatcherTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternStepFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternStepFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternStepFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/PatternStepFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStepTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStepTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStepTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/file/pattern/RegExpPatternStepTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/initialization/DefaultScriptHandlerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultConventionTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultConventionTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultConventionTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultConventionTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationActionTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationActionTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationActionTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultObjectConfigurationActionTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultPluginRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/DefaultProjectsPluginContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/IdePluginTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/IdePluginTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/plugins/IdePluginTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/plugins/IdePluginTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultAntBuilderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultIsolatedAntBuilderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectRegistryTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectTest.groovy
new file mode 100644
index 0000000..85e27b7
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectTest.groovy
@@ -0,0 +1,1087 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.project
+
+import java.awt.Point
+import java.text.FieldPosition
+import org.apache.tools.ant.types.FileSet
+import org.gradle.api.artifacts.ConfigurationContainer
+import org.gradle.api.artifacts.Module
+import org.gradle.api.artifacts.dsl.ArtifactHandler
+import org.gradle.api.artifacts.dsl.DependencyHandler
+import org.gradle.api.artifacts.dsl.RepositoryHandler
+import org.gradle.api.initialization.dsl.ScriptHandler
+import org.gradle.api.internal.artifacts.ConfigurationContainerFactory
+import org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer
+import org.gradle.api.internal.artifacts.configurations.DependencyMetaDataProvider
+import org.gradle.api.internal.artifacts.dsl.PublishArtifactFactory
+import org.gradle.api.internal.artifacts.dsl.dependencies.DependencyFactory
+import org.gradle.api.internal.artifacts.ivyservice.ResolverFactory
+import org.gradle.api.internal.artifacts.repositories.InternalRepository
+import org.gradle.api.internal.file.FileOperations
+import org.gradle.api.internal.file.FileResolver
+import org.gradle.api.internal.initialization.ScriptClassLoaderProvider
+import org.gradle.api.internal.plugins.DefaultConvention
+import org.gradle.api.internal.tasks.TaskContainerInternal
+import org.gradle.api.invocation.Gradle
+import org.gradle.api.logging.LogLevel
+import org.gradle.api.plugins.Convention
+import org.gradle.api.plugins.PluginContainer
+import org.gradle.api.tasks.Directory
+import org.gradle.configuration.ProjectEvaluator
+import org.gradle.configuration.ScriptPluginFactory
+import org.gradle.groovy.scripts.EmptyScript
+import org.gradle.groovy.scripts.ScriptSource
+import org.gradle.logging.LoggingManagerInternal
+import org.gradle.logging.StandardOutputCapture
+import org.gradle.util.HelperUtil
+import org.gradle.util.JUnit4GroovyMockery
+import org.gradle.util.TestClosure
+import org.jmock.integration.junit4.JMock
+import org.jmock.lib.legacy.ClassImposteriser
+import org.junit.Before
+import org.junit.Ignore
+import org.junit.Test
+import org.junit.runner.RunWith
+import org.gradle.api.*
+import org.gradle.api.internal.*
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.*
+
+/**
+ * @author Hans Dockter
+ */
+ at RunWith (JMock.class)
+class DefaultProjectTest {
+    JUnit4GroovyMockery context = new JUnit4GroovyMockery()
+
+    static final String TEST_PROJECT_NAME = 'testproject'
+
+    static final String TEST_BUILD_FILE_NAME = 'build.gradle'
+
+    static final String TEST_TASK_NAME = 'testtask'
+
+    Task testTask;
+
+    DefaultProject project, child1, child2, childchild
+
+    ProjectEvaluator projectEvaluator
+
+    IProjectRegistry projectRegistry
+
+    File rootDir
+
+    groovy.lang.Script testScript
+
+    ScriptSource script;
+
+    ServiceRegistry serviceRegistryMock
+    ServiceRegistryFactory projectServiceRegistryFactoryMock
+    TaskContainerInternal taskContainerMock
+    Factory<AntBuilder> antBuilderFactoryMock
+    AntBuilder testAntBuilder
+
+    ConfigurationContainerFactory configurationContainerFactoryMock;
+    DefaultConfigurationContainer configurationContainerMock;
+    InternalRepository internalRepositoryDummy = context.mock(InternalRepository)
+    ResolverFactory resolverFactoryMock = context.mock(ResolverFactory.class);
+    Factory<RepositoryHandler> repositoryHandlerFactoryMock = context.mock(Factory.class);
+    RepositoryHandler repositoryHandlerMock
+    DependencyFactory dependencyFactoryMock
+    DependencyHandler dependencyHandlerMock = context.mock(DependencyHandler)
+    PluginContainer pluginContainerMock = context.mock(PluginContainer)
+    PublishArtifactFactory publishArtifactFactoryMock = context.mock(PublishArtifactFactory)
+    ScriptHandler scriptHandlerMock = context.mock(ScriptHandler)
+    DependencyMetaDataProvider dependencyMetaDataProviderMock = context.mock(DependencyMetaDataProvider)
+    Gradle build;
+    Convention convention = new DefaultConvention();
+    FileOperations fileOperationsMock
+    LoggingManagerInternal loggingManagerMock;
+
+    @Before
+    void setUp() {
+        rootDir = new File("/path/root").absoluteFile
+
+        context.imposteriser = ClassImposteriser.INSTANCE
+        dependencyFactoryMock = context.mock(DependencyFactory.class)
+        loggingManagerMock = context.mock(LoggingManagerInternal.class)
+        taskContainerMock = context.mock(TaskContainerInternal.class);
+        antBuilderFactoryMock = context.mock(Factory.class)
+        testAntBuilder = new DefaultAntBuilder()
+        context.checking {
+            allowing(antBuilderFactoryMock).create(); will(returnValue(testAntBuilder))
+        }
+        configurationContainerMock = context.mock(DefaultConfigurationContainer.class)
+        configurationContainerFactoryMock = [createConfigurationContainer: {
+          resolverProvider, dependencyMetaDataProvider, projectDependenciesBuildInstruction ->
+            assertSame(build.startParameter.projectDependenciesBuildInstruction, projectDependenciesBuildInstruction)
+            configurationContainerMock}] as ConfigurationContainerFactory
+        repositoryHandlerMock =  context.mock(RepositoryHandler.class);
+        context.checking {
+          allowing(repositoryHandlerFactoryMock).create(); will(returnValue(repositoryHandlerMock))
+        }
+        script = context.mock(ScriptSource.class)
+        context.checking {
+            allowing(script).getDisplayName(); will(returnValue('[build file]'))
+            allowing(script).getClassName(); will(returnValue('scriptClass'))
+            allowing(scriptHandlerMock).getSourceFile(); will(returnValue(new File(rootDir, TEST_BUILD_FILE_NAME)))
+        }
+
+        testScript = new EmptyScript()
+
+        testTask = HelperUtil.createTask(DefaultTask)
+
+        projectEvaluator = context.mock(ProjectEvaluator.class)
+        projectRegistry = new DefaultProjectRegistry()
+
+        projectServiceRegistryFactoryMock = context.mock(ServiceRegistryFactory.class, 'parent')
+        serviceRegistryMock = context.mock(ServiceRegistryFactory.class, 'project')
+        build = context.mock(GradleInternal.class)
+        fileOperationsMock = context.mock(FileOperations.class)
+
+        context.checking {
+            allowing(projectServiceRegistryFactoryMock).createFor(withParam(notNullValue())); will(returnValue(serviceRegistryMock))
+            allowing(serviceRegistryMock).newInstance(TaskContainerInternal); will(returnValue(taskContainerMock))
+            allowing(taskContainerMock).getAsDynamicObject(); will(returnValue(new BeanDynamicObject(new TaskContainerDynamicObject(someTask: testTask))))
+            allowing(serviceRegistryMock).get(RepositoryHandler); will(returnValue(repositoryHandlerMock))
+            allowing(serviceRegistryMock).getFactory(RepositoryHandler); will(returnValue(repositoryHandlerFactoryMock))
+            allowing(serviceRegistryMock).get(ConfigurationContainer); will(returnValue(configurationContainerMock))
+            allowing(serviceRegistryMock).get(ArtifactHandler); will(returnValue(context.mock(ArtifactHandler)))
+            allowing(serviceRegistryMock).get(DependencyHandler); will(returnValue(dependencyHandlerMock))
+            allowing(serviceRegistryMock).get(Convention); will(returnValue(convention))
+            allowing(serviceRegistryMock).get(ProjectEvaluator); will(returnValue(projectEvaluator))
+            allowing(serviceRegistryMock).getFactory(AntBuilder); will(returnValue(antBuilderFactoryMock))
+            allowing(serviceRegistryMock).get(PluginContainer); will(returnValue(pluginContainerMock))
+            allowing(serviceRegistryMock).get(ScriptHandler); will(returnValue(scriptHandlerMock))
+            allowing(serviceRegistryMock).get(ScriptClassLoaderProvider); will(returnValue(context.mock(ScriptClassLoaderProvider)))
+            allowing(serviceRegistryMock).get(LoggingManagerInternal); will(returnValue(loggingManagerMock))
+            allowing(serviceRegistryMock).get(StandardOutputCapture); will(returnValue(context.mock(StandardOutputCapture)))
+            allowing(serviceRegistryMock).get(IProjectRegistry); will(returnValue(projectRegistry))
+            allowing(serviceRegistryMock).get(DependencyMetaDataProvider); will(returnValue(dependencyMetaDataProviderMock))
+            allowing(serviceRegistryMock).get(FileResolver); will(returnValue([:] as FileResolver))
+            allowing(serviceRegistryMock).get(ClassGenerator); will(returnValue(new AsmBackedClassGenerator()))
+            allowing(serviceRegistryMock).get(FileOperations);
+            will(returnValue(fileOperationsMock))
+            allowing(serviceRegistryMock).get(ScriptPluginFactory); will(returnValue([:] as ScriptPluginFactory))
+            Object listener = context.mock(ProjectEvaluationListener)
+            ignoring(listener)
+            allowing(build).getProjectEvaluationBroadcaster();
+            will(returnValue(listener))
+        }
+
+        // TODO - don't decorate the project objects
+        ClassGenerator classGenerator = new AsmBackedClassGenerator()
+        project = classGenerator.newInstance(DefaultProject.class, 'root', null, rootDir, script, build, projectServiceRegistryFactoryMock);
+        child1 = classGenerator.newInstance(DefaultProject.class, "child1", project, new File("child1"), script, build, projectServiceRegistryFactoryMock)
+        project.addChildProject(child1)
+        childchild = classGenerator.newInstance(DefaultProject.class, "childchild", child1, new File("childchild"), script, build, projectServiceRegistryFactoryMock)
+        child1.addChildProject(childchild)
+        child2 = classGenerator.newInstance(DefaultProject.class, "child2", project, new File("child2"), script, build, projectServiceRegistryFactoryMock)
+        project.addChildProject(child2)
+        [project, child1, childchild, child2].each {
+            projectRegistry.addProject(it)
+        }
+    }
+
+  @Test void testRepositories() {
+      context.checking {
+          allowing(repositoryHandlerFactoryMock).create(); will(returnValue(repositoryHandlerMock))
+          ignoring(repositoryHandlerMock)
+      }
+      assertThat(project.createRepositoryHandler(), sameInstance(repositoryHandlerMock))
+  }
+
+  @Ignore void testArtifacts() {
+        boolean called = false;
+        ArtifactHandler artifactHandlerMock = [testMethod: { called = true }] as ArtifactHandler
+        project.artifactHandler = artifactHandlerMock
+        project.artifacts {
+            testMethod()
+        }
+        assertTrue(called)
+  }
+
+  @Test void testDependencies() {
+      context.checking {
+          one(dependencyHandlerMock).add('conf', 'dep')
+      }
+      project.dependencies {
+          add('conf', 'dep')
+      }
+  }
+
+  @Test void testConfigurations() {
+        Closure cl = { }
+        context.checking {
+          one(configurationContainerMock).configure(cl)
+        }
+        project.configurationContainer = configurationContainerMock
+        project.configurations cl
+    }
+
+  @Test void testScriptClasspath() {
+        context.checking {
+            one(scriptHandlerMock).getRepositories()
+        }
+        project.buildscript {
+            repositories
+        }
+    }
+
+    @Test void testProject() {
+        assertSame project, child1.parent
+        assertSame project, child1.rootProject
+        checkProject(project, null, 'root', rootDir)
+    }
+
+    private void checkProject(DefaultProject project, Project parent, String name, File projectDir) {
+        assertSame parent, project.parent
+        assertEquals name, project.name
+        assertEquals Project.DEFAULT_VERSION, project.version
+        assertEquals Project.DEFAULT_STATUS, project.status
+        assertSame(rootDir, project.rootDir)
+        assertSame(projectDir, project.projectDir)
+        assertSame this.project, project.rootProject
+        assertEquals(new File(projectDir, TEST_BUILD_FILE_NAME), project.buildFile)
+        assertSame projectEvaluator, project.projectEvaluator
+        assertSame antBuilderFactoryMock, project.antBuilderFactory
+        assertSame project.gradle, build
+        assertNotNull(project.ant)
+        assertNotNull(project.convention)
+        assertEquals([], project.getDefaultTasks())
+        assert project.configurations.is(configurationContainerMock)
+        assert project.repositoryHandlerFactory.is(repositoryHandlerFactoryMock)
+        assertSame(repositoryHandlerMock, project.repositories)
+        assert projectRegistry.is(project.projectRegistry)
+        assertFalse project.state.executed
+        assertEquals DefaultProject.DEFAULT_BUILD_DIR_NAME, project.buildDirName
+    }
+
+    @Test public void testNullVersionAndStatus() {
+        project.version = 'version'
+        project.status = 'status'
+        assertEquals('version', project.version)
+        assertEquals('status', project.status)
+        project.version = null
+        project.status = null
+        assertEquals(Project.DEFAULT_VERSION, project.version)
+        assertEquals(Project.DEFAULT_STATUS, project.status)
+    }
+
+    @Test void testGetGroup() {
+        assertThat(project.getGroup(), equalTo(''))
+        assertThat(childchild.getGroup(), equalTo('root.child1'))
+
+        child1.group = ''
+        assertThat(child1.getGroup(), equalTo(''))
+
+        child1.group = null
+        assertThat(child1.getGroup(), equalTo('root'))
+    }
+
+    @Test public void testExecutesActionBeforeEvaluation() {
+        Action<Project> listener = context.mock(Action)
+        context.checking {
+            one(listener).execute(project)
+        }
+        project.beforeEvaluate(listener)
+        project.projectEvaluationBroadcaster.beforeEvaluate(project)
+    }
+
+    @Test public void testExecutesActionAfterEvaluation() {
+        Action<Project> listener = context.mock(Action)
+        context.checking {
+            one(listener).execute(project)
+        }
+        project.afterEvaluate(listener)
+        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
+    }
+
+    @Test public void testExecutesClosureBeforeEvaluation() {
+        TestClosure listener = context.mock(TestClosure)
+        context.checking {
+            one(listener).call(project)
+        }
+
+        project.beforeEvaluate(HelperUtil.toClosure(listener))
+        project.projectEvaluationBroadcaster.beforeEvaluate(project)
+    }
+
+    @Test public void testExecutesClosureAfterEvaluation() {
+        TestClosure listener = context.mock(TestClosure)
+        context.checking {
+            one(listener).call(project)
+        }
+
+        project.afterEvaluate(HelperUtil.toClosure(listener))
+        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
+    }
+
+    @Test void testEvaluate() {
+        context.checking {
+            one(projectEvaluator).evaluate(project, project.state)
+        }
+        assertSame(project, project.evaluate())
+    }
+
+    @Test void testUsePluginWithString() {
+        context.checking {
+            one(pluginContainerMock).apply('someplugin'); will(returnValue([:] as Plugin))
+        }
+        project.apply(plugin: 'someplugin')
+    }
+
+    @Test void testUsePluginWithClass() {
+        context.checking {
+            one(pluginContainerMock).apply(Plugin); will(returnValue([:] as Plugin))
+        }
+        project.apply(plugin: Plugin)
+    }
+
+    @Test void testEvaluationDependsOn() {
+        boolean mockReader2Finished = false
+        boolean mockReader1Called = false
+        final ProjectEvaluator mockReader1 = [evaluate: {DefaultProject project, state ->
+            project.evaluationDependsOn(child1.path)
+            assertTrue(mockReader2Finished)
+            mockReader1Called = true
+            testScript
+        }] as ProjectEvaluator
+        final ProjectEvaluator mockReader2 = [
+                evaluate: {DefaultProject project, state ->
+                    mockReader2Finished = true
+                    testScript
+                }] as ProjectEvaluator
+        project.projectEvaluator = mockReader1
+        child1.projectEvaluator = mockReader2
+        project.evaluate()
+        assertTrue mockReader1Called
+    }
+
+    @Test (expected = InvalidUserDataException) void testEvaluationDependsOnWithNullArgument() {
+        project.evaluationDependsOn(null)
+    }
+
+    @Test (expected = InvalidUserDataException) void testEvaluationDependsOnWithEmptyArgument() {
+        project.evaluationDependsOn('')
+    }
+
+    @Test (expected = CircularReferenceException) void testEvaluationDependsOnWithCircularDependency() {
+        final ProjectEvaluator mockReader1 = [evaluate: {DefaultProject project, ProjectState state ->
+            state.executing = true
+            project.evaluationDependsOn(child1.path)
+            testScript
+        }] as ProjectEvaluator
+        final ProjectEvaluator mockReader2 = [evaluate: {DefaultProject project, ProjectState state ->
+            state.executing = true
+            project.evaluationDependsOn(project.path)
+            testScript
+        }] as ProjectEvaluator
+        project.projectEvaluator = mockReader1
+        child1.projectEvaluator = mockReader2
+        project.evaluate()
+    }
+
+    @Test void testDependsOnWithNoEvaluation() {
+        boolean mockReaderCalled = false
+        final ProjectEvaluator mockReader = [evaluateProject: {DefaultProject project ->
+            mockReaderCalled = true
+            testScript
+        }] as ProjectEvaluator
+        child1.projectEvaluator = mockReader
+        project.dependsOn(child1.name, false)
+        assertFalse mockReaderCalled
+        assertEquals([child1] as Set, project.dependsOnProjects)
+        project.dependsOn(child2.path, false)
+        assertEquals([child1, child2] as Set, project.dependsOnProjects)
+    }
+
+    @Test void testDependsOn() {
+        boolean mockReaderCalled = false
+        final ProjectEvaluator mockReader = [evaluate: {DefaultProject project, state ->
+            mockReaderCalled = true
+            testScript
+        }] as ProjectEvaluator
+        child1.projectEvaluator = mockReader
+        project.dependsOn(child1.name)
+        assertTrue mockReaderCalled
+        assertEquals([child1] as Set, project.dependsOnProjects)
+
+    }
+
+    @Test void testChildrenDependsOnMe() {
+        project.childrenDependOnMe()
+        assertTrue(child1.dependsOnProjects.contains(project))
+        assertTrue(child2.dependsOnProjects.contains(project))
+        assertEquals(1, child1.dependsOnProjects.size())
+        assertEquals(1, child2.dependsOnProjects.size())
+    }
+
+    @Test void testDependsOnChildren() {
+        context.checking {
+            never(projectEvaluator).evaluate(child1, child1.state)
+        }
+
+        project.dependsOnChildren()
+        context.assertIsSatisfied()
+        assertTrue(project.dependsOnProjects.contains(child1))
+        assertTrue(project.dependsOnProjects.contains(child2))
+        assertEquals(2, project.dependsOnProjects.size())
+    }
+
+    @Test void testDependsOnChildrenIncludingEvaluate() {
+        context.checking {
+            one(projectEvaluator).evaluate(child1, child1.state)
+            one(projectEvaluator).evaluate(child2, child2.state)
+        }
+        project.dependsOnChildren(true)
+        assertTrue(project.dependsOnProjects.contains(child1))
+        assertTrue(project.dependsOnProjects.contains(child2))
+        assertEquals(2, project.dependsOnProjects.size())
+    }
+
+    @Test (expected = InvalidUserDataException) void testDependsOnWithNullPath() {
+        project.dependsOn(null)
+    }
+
+    @Test (expected = InvalidUserDataException) void testDependsOnWithEmptyPath() {
+        project.dependsOn('')
+    }
+
+    @Test (expected = UnknownProjectException) void testDependsOnWithUnknownParentPath() {
+        project.dependsOn(child1.path + 'XXX')
+    }
+
+    @Test (expected = UnknownProjectException) void testDependsOnWithUnknownProjectPath() {
+        project.dependsOn(child1.name + 'XXX')
+    }
+
+    @Test void testAddAndGetChildProject() {
+        ProjectInternal child1 = ['getName': {-> 'child1'}] as ProjectInternal
+        ProjectInternal child2 = ['getName': {-> 'child2'}] as ProjectInternal
+
+        project.addChildProject(child1)
+        assertEquals(2, project.childProjects.size())
+        assertSame(child1, project.childProjects.child1)
+
+        project.addChildProject(child2)
+        assertEquals(2, project.childProjects.size())
+        assertSame(child2, project.childProjects.child2)
+    }
+
+    @Test public void testDefaultTasks() {
+        project.defaultTasks("a", "b");
+        assertEquals(["a", "b"], project.getDefaultTasks())
+        project.defaultTasks("c");
+        assertEquals(["c"], project.getDefaultTasks())
+    }
+
+    @Test (expected = InvalidUserDataException) public void testDefaultTasksWithNull() {
+        project.defaultTasks(null);
+    }
+
+    @Test (expected = InvalidUserDataException) public void testDefaultTasksWithSingleNullValue() {
+        project.defaultTasks("a", null);
+    }
+
+    @Test public void testCreateTaskWithName() {
+        context.checking {
+            one(taskContainerMock).add([name: TEST_TASK_NAME]); will(returnValue(testTask))
+        }
+        assertSame(testTask, project.createTask(TEST_TASK_NAME));
+    }
+
+    @Test public void testCreateTaskWithNameAndArgs() {
+        Map testArgs = [a: 'b']
+        context.checking {
+            one(taskContainerMock).add(testArgs + [name: TEST_TASK_NAME]); will(returnValue(testTask))
+        }
+        assertSame(testTask, project.createTask(testArgs, TEST_TASK_NAME));
+    }
+
+    @Test public void testCreateTaskWithNameAndAction() {
+        Action<Task> testAction = {} as Action
+        context.checking {
+            one(taskContainerMock).add([name: TEST_TASK_NAME, action: testAction]); will(returnValue(testTask))
+        }
+        assertSame(testTask, project.createTask(TEST_TASK_NAME, testAction));
+    }
+
+    @Test public void testCreateTaskWithNameAndClosureAction() {
+        Closure testAction = {}
+        context.checking {
+            one(taskContainerMock).add([name: TEST_TASK_NAME, action: testAction]); will(returnValue(testTask))
+        }
+        assertSame(testTask, project.createTask(TEST_TASK_NAME, testAction));
+    }
+
+    @Test public void testCreateTaskWithNameArgsAndActions() {
+        Map testArgs = [a: 'b']
+        Action<Task> testAction = {} as Action
+        context.checking {
+            one(taskContainerMock).add(testArgs + [name: TEST_TASK_NAME, action: testAction]); will(returnValue(testTask))
+        }
+        assertSame(testTask, project.createTask(testArgs, TEST_TASK_NAME, testAction));
+    }
+
+    @Test void testCanAccessTaskAsAProjectProperty() {
+        assertThat(project.someTask, sameInstance(testTask))
+    }
+
+    @Test (expected = MissingPropertyException) void testPropertyShortCutForTaskCallWithNonExistingTask() {
+        project.unknownTask
+    }
+
+    @Test (expected = MissingMethodException) void testMethodShortCutForTaskCallWithNonExistingTask() {
+        project.unknownTask([dependsOn: '/task2'])
+    }
+
+    private Set getListWithAllProjects() {
+        [project, child1, child2, childchild]
+    }
+
+    private Set getListWithAllChildProjects() {
+        [child1, child2, childchild]
+
+    }
+
+    @Test void testPath() {
+        assertEquals(Project.PATH_SEPARATOR + "child1", child1.path)
+        assertEquals(Project.PATH_SEPARATOR, project.path)
+    }
+
+    @Test void testGetProject() {
+        assertSame(project, project.project(Project.PATH_SEPARATOR))
+        assertSame(child1, project.project(Project.PATH_SEPARATOR + "child1"))
+        assertSame(child1, project.project("child1"))
+        assertSame(childchild, child1.project('childchild'))
+        assertSame(child1, childchild.project(Project.PATH_SEPARATOR + "child1"))
+    }
+
+    @Test void testGetProjectWithUnknownAbsolutePath() {
+        try {
+            project.project(Project.PATH_SEPARATOR + "unknownchild")
+            fail()
+        } catch (UnknownProjectException e) {
+            assertEquals(e.getMessage(), "Project with path ':unknownchild' could not be found in root project 'root'.")
+        }
+    }
+
+    @Test void testGetProjectWithUnknownRelativePath() {
+        try {
+            project.project("unknownchild")
+            fail()
+        } catch (UnknownProjectException e) {
+            assertEquals(e.getMessage(), "Project with path 'unknownchild' could not be found in root project 'root'.")
+        }
+    }
+
+    @Test (expected = InvalidUserDataException) void testGetProjectWithEmptyPath() {
+        project.project("")
+    }
+
+    @Test (expected = InvalidUserDataException) void testGetProjectWithNullPath() {
+        project.project(null)
+    }
+
+    @Test void testFindProject() {
+        assertSame(project, project.findProject(Project.PATH_SEPARATOR))
+        assertSame(child1, project.findProject(Project.PATH_SEPARATOR + "child1"))
+        assertSame(child1, project.findProject("child1"))
+        assertSame(childchild, child1.findProject('childchild'))
+        assertSame(child1, childchild.findProject(Project.PATH_SEPARATOR + "child1"))
+    }
+
+    @Test void testFindProjectWithUnknownAbsolutePath() {
+        assertNull(project.findProject(Project.PATH_SEPARATOR + "unknownchild"))
+    }
+
+    @Test void testFindProjectWithUnknownRelativePath() {
+        assertNull(project.findProject("unknownChild"))
+    }
+
+    @Test void testGetProjectWithClosure() {
+        String newPropValue = 'someValue'
+        assert child1.is(project.project("child1") {
+            newProp = newPropValue
+        })
+        assertEquals(child1.newProp, newPropValue)
+    }
+
+    @Test void testGetAllTasksRecursive() {
+        Task projectTask = HelperUtil.createTask(DefaultTask.class)
+        Task child1Task = HelperUtil.createTask(DefaultTask.class)
+        Task child2Task = HelperUtil.createTask(DefaultTask.class)
+
+        Map expectedMap = new TreeMap()
+        expectedMap[project] = [projectTask] as TreeSet
+        expectedMap[child1] = [child1Task] as TreeSet
+        expectedMap[child2] = [child2Task] as TreeSet
+        expectedMap[childchild] = [] as TreeSet
+
+        context.checking {
+            one(taskContainerMock).getAll(); will(returnValue([projectTask] as Set))
+            one(taskContainerMock).getAll(); will(returnValue([child1Task] as Set))
+            one(taskContainerMock).getAll(); will(returnValue([child2Task] as Set))
+            one(taskContainerMock).getAll(); will(returnValue([] as Set))
+        }
+
+        assertEquals(expectedMap, project.getAllTasks(true))
+    }
+
+    @Test void testGetAllTasksNonRecursive() {
+        Task projectTask = HelperUtil.createTask(DefaultTask.class)
+
+        Map expectedMap = new TreeMap()
+        expectedMap[project] = [projectTask] as TreeSet
+
+        context.checking {
+            one(taskContainerMock).getAll(); will(returnValue([projectTask] as Set))
+        }
+
+        assertEquals(expectedMap, project.getAllTasks(false))
+    }
+
+    @Test void testGetTasksByNameRecursive() {
+        Task projectTask = HelperUtil.createTask(DefaultTask.class)
+        Task child1Task = HelperUtil.createTask(DefaultTask.class)
+
+        context.checking {
+            one(taskContainerMock).findByName('task'); will(returnValue(projectTask))
+            one(taskContainerMock).findByName('task'); will(returnValue(child1Task))
+            one(taskContainerMock).findByName('task'); will(returnValue(null))
+            one(taskContainerMock).findByName('task'); will(returnValue(null))
+        }
+
+        assertEquals([projectTask, child1Task] as Set, project.getTasksByName('task', true))
+    }
+
+    @Test void testGetTasksByNameNonRecursive() {
+        Task projectTask = HelperUtil.createTask(DefaultTask.class)
+
+        context.checking {
+            one(taskContainerMock).findByName('task'); will(returnValue(projectTask))
+        }
+
+        assertEquals([projectTask] as Set, project.getTasksByName('task', false))
+    }
+
+    @Test (expected = InvalidUserDataException) void testGetTasksWithEmptyName() {
+        project.getTasksByName('', true)
+    }
+
+    @Test (expected = InvalidUserDataException) void testGetTasksWithNullName() {
+        project.getTasksByName(null, true)
+    }
+
+    @Test void testGetTasksWithUnknownName() {
+        context.checking {
+            allowing(taskContainerMock).findByName('task'); will(returnValue(null))
+        }
+
+        assertEquals([] as Set, project.getTasksByName('task', true))
+        assertEquals([] as Set, project.getTasksByName('task', false))
+    }
+
+    private List addTestTaskToAllProjects(String name) {
+        List tasks = []
+        project.allprojects.each {Project project ->
+            tasks << addTestTask(project, name)
+        }
+        tasks
+    }
+
+    private Task addTestTask(Project project, String name) {
+        new DefaultTask(project, name)
+    }
+
+    @Test void testMethodMissing() {
+        boolean closureCalled = false
+        Closure testConfigureClosure = {closureCalled = true}
+        project.someTask(testConfigureClosure)
+        assert closureCalled
+
+        project.convention.plugins.test = new TestConvention()
+        assertEquals(TestConvention.METHOD_RESULT, project.scriptMethod(testConfigureClosure))
+
+        project.script = createScriptForMethodMissingTest('projectScript')
+        assertEquals('projectScript', project.scriptMethod(testConfigureClosure))
+    }
+
+    private groovy.lang.Script createScriptForMethodMissingTest(String returnValue) {
+        String code = """
+def scriptMethod(Closure closure) {
+    "$returnValue"
+}
+"""
+        HelperUtil.createScript(code)
+    }
+
+    @Test void testSetPropertyAndPropertyMissingWithProjectProperty() {
+        String propertyName = 'propName'
+        String expectedValue = 'somevalue'
+
+        project."$propertyName" = expectedValue
+        assertEquals(expectedValue, project."$propertyName")
+        assertEquals(expectedValue, child1."$propertyName")
+    }
+
+    @Test void testPropertyMissingWithExistingConventionProperty() {
+        String propertyName = 'conv'
+        String expectedValue = 'somevalue'
+        project.convention.plugins.test = new TestConvention()
+        project.convention.conv = expectedValue
+        assertEquals(expectedValue, project."$propertyName")
+        assertEquals(expectedValue, project.convention."$propertyName")
+        assertEquals(expectedValue, child1."$propertyName")
+    }
+
+    @Test void testSetPropertyAndPropertyMissingWithConventionProperty() {
+        String propertyName = 'conv'
+        String expectedValue = 'somevalue'
+        project.convention.plugins.test = new TestConvention()
+        project."$propertyName" = expectedValue
+        assertEquals(expectedValue, project."$propertyName")
+        assertEquals(expectedValue, project.convention."$propertyName")
+        assertEquals(expectedValue, child1."$propertyName")
+    }
+
+    @Test void testSetPropertyAndPropertyMissingWithProjectAndConventionProperty() {
+        String propertyName = 'archivesBaseName'
+        String expectedValue = 'somename'
+
+        project.archivesBaseName = expectedValue
+        project.convention.plugins.test = new TestConvention()
+        project.convention.archivesBaseName = 'someothername'
+        project."$propertyName" = expectedValue
+        assertEquals(expectedValue, project."$propertyName")
+        assertEquals('someothername', project.convention."$propertyName")
+    }
+
+    @Test void testPropertyMissingWithNullProperty() {
+        project.nullProp = null
+        assertNull(project.nullProp)
+        assert project.hasProperty('nullProp')
+    }
+
+    @Test (expected = MissingPropertyException)
+    public void testPropertyMissingWithUnknownProperty() {
+        project.unknownProperty
+    }
+
+    @Test void testHasProperty() {
+        assertTrue(project.hasProperty('name'))
+        String propertyName = 'beginIndex'
+        assertFalse(project.hasProperty(propertyName))
+        assertFalse(child1.hasProperty(propertyName))
+
+        project.convention.plugins.test = new FieldPosition(0)
+        project.convention."$propertyName" = 5
+        assertTrue(project.hasProperty(propertyName))
+        assertTrue(child1.hasProperty(propertyName))
+        project.convention = new DefaultConvention()
+        project."$propertyName" = 4
+        assertTrue(project.hasProperty(propertyName))
+        assertTrue(child1.hasProperty(propertyName))
+    }
+
+    @Test void testProperties() {
+        context.checking {
+            allowing(dependencyMetaDataProviderMock).getModule(); will(returnValue({} as Module))
+            ignoring(fileOperationsMock)
+            ignoring(taskContainerMock)
+        }
+        project.additional = 'additional'
+
+        Map properties = project.properties
+        assertEquals(properties.name, 'root')
+        assertEquals(properties.additional, 'additional')
+        assertSame(properties['someTask'], testTask)
+    }
+
+    @Test void testAdditionalProperty() {
+        String expectedPropertyName = 'somename'
+        String expectedPropertyValue = 'somevalue'
+        project.additionalProperties[expectedPropertyName] = expectedPropertyValue
+        assertEquals(project."$expectedPropertyName", expectedPropertyValue)
+    }
+
+    @Test void testAdditionalPropertiesAreInheritable() {
+        project.somename = 'somevalue'
+        assertTrue(project.inheritedScope.hasProperty('somename'))
+        assertEquals(project.inheritedScope.getProperty('somename'), 'somevalue')
+    }
+
+    @Test void testConventionPropertiesAreInheritable() {
+        project.convention.plugins.test = new TestConvention()
+        project.convention.plugins.test.conv = 'somevalue'
+        assertTrue(project.inheritedScope.hasProperty('conv'))
+        assertEquals(project.inheritedScope.getProperty('conv'), 'somevalue')
+    }
+
+    @Test void testInheritedPropertiesAreInheritable() {
+        project.somename = 'somevalue'
+        assertTrue(child1.inheritedScope.hasProperty('somename'))
+        assertEquals(child1.inheritedScope.getProperty('somename'), 'somevalue')
+    }
+
+    @Test void testGetProjectProperty() {
+        assert project.is(project.getProject())
+    }
+
+    @Test void testAllprojectsField() {
+        assertEquals(getListWithAllProjects(), project.allprojects)
+    }
+
+    @Test void testChildren() {
+        assertEquals(getListWithAllChildProjects(), project.subprojects)
+    }
+
+    @Test void testBuildDir() {
+        File dir = new File(rootDir, 'dir')
+        context.checking {
+            one(fileOperationsMock).file(Project.DEFAULT_BUILD_DIR_NAME)
+            will(returnValue(dir))
+        }
+        assertEquals(dir, child1.buildDir)
+
+        child1.buildDir = 12
+        context.checking {
+            one(fileOperationsMock).file(12)
+            will(returnValue(dir))
+        }
+        assertEquals(dir, child1.buildDir)
+    }
+
+    @Test public void testDir() {
+        Task dirTask1 = HelperUtil.createTask(Directory.class)
+        Task dirTask12 = HelperUtil.createTask(Directory.class)
+        Task dirTask123 = HelperUtil.createTask(Directory.class)
+        context.checking {
+            one(taskContainerMock).findByName('dir1'); will(returnValue(null))
+            one(taskContainerMock).add('dir1', Directory); will(returnValue(dirTask1))
+            one(taskContainerMock).findByName('dir1/dir2'); will(returnValue(null))
+            one(taskContainerMock).add('dir1/dir2', Directory); will(returnValue(dirTask12))
+            one(taskContainerMock).findByName('dir1/dir2/dir3'); will(returnValue(null))
+            one(taskContainerMock).add('dir1/dir2/dir3', Directory); will(returnValue(dirTask123))
+        }
+        assertSame(dirTask123, project.dir('dir1/dir2/dir3'));
+    }
+
+    @Test public void testDirWithExistingParentDirTask() {
+        Task dirTask1 = HelperUtil.createTask(Directory.class)
+        context.checking {
+            one(taskContainerMock).findByName('dir1'); will(returnValue(null))
+            one(taskContainerMock).add('dir1', Directory); will(returnValue(dirTask1))
+        }
+        project.dir('dir1')
+
+        Task dirTask14 = HelperUtil.createTask(Directory.class)
+        context.checking {
+            one(taskContainerMock).findByName('dir1'); will(returnValue(dirTask1))
+            one(taskContainerMock).findByName('dir1/dir4'); will(returnValue(null))
+            one(taskContainerMock).add('dir1/dir4', Directory); will(returnValue(dirTask14))
+        }
+        assertSame(dirTask14, project.dir('dir1/dir4'))
+    }
+
+    @Test public void testDirWithConflictingNonDirTask() {
+        Task dirTask14 = HelperUtil.createTask(DefaultTask.class)
+
+        Task dirTask1 = HelperUtil.createTask(Directory.class)
+        context.checking {
+            one(taskContainerMock).findByName('dir1'); will(returnValue(null))
+            one(taskContainerMock).add('dir1', Directory); will(returnValue(dirTask1))
+            one(taskContainerMock).findByName('dir1/dir4'); will(returnValue(dirTask14))
+        }
+
+        try {
+            project.dir('dir1/dir4')
+            fail()
+        } catch (InvalidUserDataException e) {
+            assertThat(e.message, equalTo("Cannot add directory task 'dir1/dir4' as a non-directory task with this name already exists."))
+        }
+    }
+
+    @Test void testCachingOfAnt() {
+        assertSame(testAntBuilder, project.ant)
+        assert project.ant.is(project.ant)
+    }
+
+    @Test void testAnt() {
+        Closure configureClosure = {fileset(dir: 'dir', id: 'fileset')}
+        project.ant(configureClosure)
+        assertThat(project.ant.project.getReference('fileset'), instanceOf(FileSet))
+    }
+
+    @Test void testCreateAntBuilder() {
+        assertSame testAntBuilder, project.createAntBuilder()
+    }
+
+    @Test void testCompareTo() {
+        assertThat(project, lessThan(child1))
+        assertThat(child1, lessThan(child2))
+        assertThat(child1, lessThan(childchild))
+        assertThat(child2, lessThan(childchild))
+    }
+
+    @Test void testDepthCompare() {
+        assertTrue(project.depthCompare(child1) < 0)
+        assertTrue(child1.depthCompare(project) > 0)
+        assertTrue(child1.depthCompare(child2) == 0)
+    }
+
+    @Test void testDepth() {
+        assertTrue(project.depth == 0)
+        assertTrue(child1.depth == 1)
+        assertTrue(child2.depth == 1)
+        assertTrue(childchild.depth == 2)
+    }
+
+    @Test void testSubprojects() {
+        checkConfigureProject('subprojects', listWithAllChildProjects)
+    }
+
+    @Test void testAllprojects() {
+        checkConfigureProject('allprojects', listWithAllProjects)
+    }
+
+    @Test void testConfigureProjects() {
+        checkConfigureProject('configure', [project, child1] as Set)
+    }
+
+    @Test void testHasUsefulToString() {
+        assertEquals('root project \'root\'', project.toString())
+        assertEquals('project \':child1\'', child1.toString())
+        assertEquals('project \':child1:childchild\'', childchild.toString())
+    }
+
+    private void checkConfigureProject(String configureMethod, Set projectsToCheck) {
+        String propValue = 'someValue'
+        if (configureMethod == 'configure') {
+            project."$configureMethod" projectsToCheck as List,
+                    {
+                        testSubProp = propValue
+                    }
+        } else {
+            project."$configureMethod"
+            {
+                testSubProp = propValue
+            }
+        }
+
+        projectsToCheck.each {
+            assertEquals(propValue, it.testSubProp)
+        }
+    }
+
+    @Test
+    void disableStandardOutputCapture() {
+        context.checking {
+            one(loggingManagerMock).disableStandardOutputCapture()
+        }
+        project.disableStandardOutputCapture()
+    }
+
+    @Test
+    void captureStandardOutput() {
+        context.checking {
+            one(loggingManagerMock).captureStandardOutput(LogLevel.DEBUG)
+        }
+        project.captureStandardOutput(LogLevel.DEBUG)
+    }
+
+    @Test
+    void configure() {
+        Point expectedPoint = new Point(4, 3)
+        Point actualPoint = project.configure(new Point()) {
+            setLocation(expectedPoint.x, expectedPoint.y)
+        }
+        assertEquals(expectedPoint, actualPoint)
+    }
+
+    @Test(expected = ReadOnlyPropertyException) void setName() {
+        project.name = "someNewName"
+    }
+
+    @Test void testGetModule() {
+        Module moduleDummyResolve = [:] as Module
+        context.checking {
+            allowing(dependencyMetaDataProviderMock).getModule(); will(returnValue(moduleDummyResolve))
+        }
+        assertThat(project.getModule(), equalTo(moduleDummyResolve))
+    }
+
+    @Test void convertsAbsolutePathToAbsolutePath() {
+        assertThat(project.absoluteProjectPath(':'), equalTo(':'))
+        assertThat(project.absoluteProjectPath(':other'), equalTo(':other'))
+        assertThat(child1.absoluteProjectPath(':'), equalTo(':'))
+        assertThat(child1.absoluteProjectPath(':other'), equalTo(':other'))
+    }
+
+    @Test void convertsRelativePathToAbsolutePath() {
+        assertThat(project.absoluteProjectPath('task'), equalTo(':task'))
+        assertThat(project.absoluteProjectPath('sub:other'), equalTo(':sub:other'))
+        assertThat(child1.absoluteProjectPath('task'), equalTo(':child1:task'))
+        assertThat(child1.absoluteProjectPath('sub:other'), equalTo(':child1:sub:other'))
+    }
+
+    @Test void convertsRelativePathToRelativePath() {
+        assertThat(project.relativeProjectPath('task'), equalTo('task'))
+        assertThat(project.relativeProjectPath('sub:other'), equalTo('sub:other'))
+    }
+
+    @Test void convertsAbsolutePathToRelativePath() {
+        assertThat(project.relativeProjectPath(':'), equalTo(':'))
+        assertThat(project.relativeProjectPath(':task'), equalTo('task'))
+        assertThat(project.relativeProjectPath(':sub:other'), equalTo('sub:other'))
+        assertThat(child1.relativeProjectPath(':child1'), equalTo(':child1'))
+        assertThat(child1.relativeProjectPath(':child1:task'), equalTo('task'))
+        assertThat(child1.relativeProjectPath(':child12:task'), equalTo(':child12:task'))
+        assertThat(child1.relativeProjectPath(':sub:other'), equalTo(':sub:other'))
+    }
+
+    @Test void createsADomainObjectContainer() {
+        assertThat(project.container(String.class), instanceOf(DefaultAutoCreateDomainObjectContainer.class))
+        assertThat(project.container(String.class), instanceOf(IConventionAware.class))
+
+        assertThat(project.container(String.class, context.mock(NamedDomainObjectFactory.class)), instanceOf(DefaultAutoCreateDomainObjectContainer.class))
+
+        assertThat(project.container(String.class, { }), instanceOf(DefaultAutoCreateDomainObjectContainer.class))
+    }
+
+}
+
+class TaskContainerDynamicObject {
+    Task someTask
+    
+    def someTask(Closure closure) {
+        closure.call()
+    }
+}
+
+class TestConvention {
+    final static String METHOD_RESULT = 'methodResult'
+    String name
+    String conv
+    String archivesBaseName
+
+    def scriptMethod(Closure cl) {
+        METHOD_RESULT
+    }
+}
+
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultServiceRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultServiceRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultServiceRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/DefaultServiceRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/GlobalServicesRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/GlobalServicesRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/GlobalServicesRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/GlobalServicesRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/GradleInternalServiceRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/ProjectFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/ProjectFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/ProjectFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/ProjectFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/ProjectInternalServiceRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/TaskInternalServiceRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TestPlugin1.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/TestPlugin1.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TestPlugin1.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/TestPlugin1.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TestPlugin2.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/TestPlugin2.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TestPlugin2.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/TestPlugin2.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/TopLevelBuildServiceRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/AnnotationProcessingTaskFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/DependencyAutoWireTaskFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/ExecutionShortCircuitTaskExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/InputFileTask.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/InputFileTask.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/InputFileTask.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/InputFileTask.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/TaskFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/TaskFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/taskfactory/TaskFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/project/taskfactory/TaskFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/resource/CachingResourceTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/resource/CachingResourceTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/resource/CachingResourceTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/resource/CachingResourceTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/resource/StringResourceTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/resource/StringResourceTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/resource/StringResourceTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/resource/StringResourceTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/resource/UriResourceTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/resource/UriResourceTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/resource/UriResourceTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/resource/UriResourceTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContextTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContextTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContextTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/CachingTaskDependencyResolveContextTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskContainerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskDependencyTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskDependencyTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskDependencyTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskDependencyTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskInputsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskInputsTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskInputsTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskInputsTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputsTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputsTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/DefaultTaskOutputsTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/ExecuteAtMostOnceTaskExecuterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/SkipTaskExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/SkipTaskExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/SkipTaskExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/SkipTaskExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/TaskStateInternalTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/TaskStateInternalTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/TaskStateInternalTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/TaskStateInternalTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGeneratorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGeneratorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGeneratorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/PersistableConfigurationObjectGeneratorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObjectTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObjectTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObjectTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/PropertiesPersistableConfigurationObjectTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObjectTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObjectTest.groovy
new file mode 100644
index 0000000..c757ddd
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObjectTest.groovy
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.tasks.generator
+
+import org.gradle.api.internal.XmlTransformer
+import org.gradle.util.TemporaryFolder
+import org.gradle.util.TextUtil
+import org.junit.Rule
+import spock.lang.Specification
+
+class XmlPersistableConfigurationObjectTest extends Specification {
+    @Rule public final TemporaryFolder tmpDir = new TemporaryFolder()
+    String rootElement
+    final XmlPersistableConfigurationObject object = new XmlPersistableConfigurationObject(new XmlTransformer()) {
+        @Override protected String getDefaultResourceName() {
+            return 'defaultResource.xml'
+        }
+
+        @Override protected void load(Node xml) {
+            rootElement = xml.name() as String
+        }
+
+        @Override protected void store(Node xml) {
+            xml.name = rootElement
+        }
+    }
+
+    def loadsFromXmlFile() {
+        def inputFile = tmpDir.file('input.xml')
+        inputFile.text = '<some-xml/>'
+
+        when:
+        object.load(inputFile)
+
+        then:
+        rootElement == 'some-xml'
+    }
+
+    def loadsFromDefaultResource() {
+        when:
+        object.loadDefaults()
+
+        then:
+        rootElement == 'default-xml'
+    }
+
+    def storesToXmlFile() {
+        object.loadDefaults()
+        rootElement = 'modified-xml'
+        def outputFile = tmpDir.file('output.xml')
+
+        when:
+        object.store(outputFile)
+
+        then:
+        outputFile.text == TextUtil.toNativeLineSeparators('<?xml version="1.0" encoding="UTF-8"?>\n<modified-xml/>\n')
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/defaultResource.xml b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/defaultResource.xml
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/defaultResource.xml
rename to subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/generator/defaultResource.xml
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultJavaForkOptionsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultJavaForkOptionsTest.groovy
new file mode 100644
index 0000000..1a265bd
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultJavaForkOptionsTest.groovy
@@ -0,0 +1,266 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.api.internal.tasks.util
+
+import static org.hamcrest.Matchers.*
+
+import org.gradle.api.file.FileCollection
+import org.gradle.api.internal.file.FileResolver
+import org.gradle.api.internal.file.IdentityFileResolver
+import org.gradle.process.JavaForkOptions
+import org.gradle.process.internal.DefaultJavaForkOptions
+import org.gradle.util.JUnit4GroovyMockery
+import org.gradle.util.Jvm
+import org.jmock.integration.junit4.JMock
+import org.junit.Test
+import org.junit.runner.RunWith
+import static org.gradle.util.Matchers.isEmpty
+import static org.gradle.util.Matchers.isEmptyMap
+import static org.junit.Assert.*
+import org.junit.Before
+
+ at RunWith(JMock.class)
+public class DefaultJavaForkOptionsTest {
+    private final JUnit4GroovyMockery context = new JUnit4GroovyMockery()
+    private final FileResolver resolver = context.mock(FileResolver.class)
+    private DefaultJavaForkOptions options
+
+    @Before
+    public void setup() {
+        context.checking {
+            allowing(resolver).resolveLater(".")
+        }
+        options = new DefaultJavaForkOptions(resolver, Jvm.current())
+    }
+
+    @Test
+    public void defaultValues() {
+        assertThat(options.executable, notNullValue())
+        assertThat(options.jvmArgs, isEmpty())
+        assertThat(options.systemProperties, isEmptyMap())
+        assertThat(options.maxHeapSize, nullValue())
+        assertThat(options.bootstrapClasspath.files, isEmpty())
+        assertFalse(options.enableAssertions)
+        assertFalse(options.debug)
+        assertThat(options.allJvmArgs, isEmpty())
+    }
+
+    @Test
+    public void convertsJvmArgsToStringOnGet() {
+        options.jvmArgs = [12, "${1 + 2}"]
+        assertThat(options.jvmArgs, equalTo(['12', '3']))
+    }
+
+    @Test
+    public void canAddJvmArgs() {
+        options.jvmArgs('arg1', 'arg2')
+        assertThat(options.jvmArgs, equalTo(['arg1', 'arg2']))
+    }
+
+    @Test
+    public void canSetSystemProperties() {
+        options.systemProperties = [key: 12, key2: "value", key3: null]
+        assertThat(options.systemProperties, equalTo(key: 12, key2: "value", key3: null))
+    }
+
+    @Test
+    public void canAddSystemProperties() {
+        options.systemProperties(key: 12)
+        options.systemProperty('key2', 'value2')
+        assertThat(options.systemProperties, equalTo(key: 12, key2: 'value2'))
+    }
+
+    @Test
+    public void allJvmArgsIncludeSystemPropertiesAsString() {
+        options.systemProperties(key: 12, key2: null, "key3": 'value')
+        options.jvmArgs('arg1')
+
+        assertThat(options.allJvmArgs, equalTo(['arg1', '-Dkey=12', '-Dkey2', '-Dkey3=value']))
+    }
+
+    @Test
+    public void systemPropertiesAreUpdatedWhenAddedUsingJvmArgs() {
+        options.systemProperties(key: 12)
+        options.jvmArgs('-Dkey=new value', '-Dkey2')
+
+        assertThat(options.systemProperties, equalTo(key: 'new value', key2: null))
+
+        options.allJvmArgs = []
+
+        assertThat(options.systemProperties, equalTo([:]))
+
+        options.allJvmArgs = ['-Dkey=value']
+
+        assertThat(options.systemProperties, equalTo([key: 'value']))
+    }
+
+    @Test
+    public void allJvmArgsIncludeMaxHeapSize() {
+        options.maxHeapSize = '1g'
+        options.jvmArgs('arg1')
+
+        assertThat(options.allJvmArgs, equalTo(['arg1', '-Xmx1g']))
+    }
+
+    @Test
+    public void maxHeapSizeIsUpdatedWhenSetUsingJvmArgs() {
+        options.maxHeapSize = '1g'
+        options.jvmArgs('-Xmx1024m')
+
+        assertThat(options.maxHeapSize, equalTo('1024m'))
+
+        options.allJvmArgs = []
+
+        assertThat(options.maxHeapSize, nullValue())
+
+        options.allJvmArgs = ['-Xmx1g']
+
+        assertThat(options.maxHeapSize, equalTo('1g'))
+    }
+
+    @Test
+    public void allJvmArgsIncludeAssertionsEnabled() {
+        assertThat(options.allJvmArgs, equalTo([]))
+
+        options.enableAssertions = true
+
+        assertThat(options.allJvmArgs, equalTo(['-ea']))
+    }
+
+    @Test
+    public void assertionsEnabledIsUpdatedWhenSetUsingJvmArgs() {
+        options.jvmArgs('-ea')
+        assertTrue(options.enableAssertions)
+        assertThat(options.jvmArgs, equalTo([]))
+
+        options.allJvmArgs = []
+        assertFalse(options.enableAssertions)
+
+        options.jvmArgs('-enableassertions')
+        assertTrue(options.enableAssertions)
+
+        options.allJvmArgs = ['-da']
+        assertFalse(options.enableAssertions)
+    }
+
+    @Test
+    public void allJvmArgsIncludeDebugArgs() {
+        assertThat(options.allJvmArgs, equalTo([]))
+
+        options.debug = true
+
+        assertThat(options.allJvmArgs, equalTo(['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005']))
+    }
+
+    @Test
+    public void debugIsUpdatedWhenSetUsingJvmArgs() {
+        options.jvmArgs('-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005')
+        assertTrue(options.debug)
+        assertThat(options.jvmArgs, equalTo([]))
+
+        options.allJvmArgs = []
+        assertFalse(options.debug)
+
+        options.jvmArgs = ['-Xdebug']
+        assertFalse(options.debug)
+        assertThat(options.jvmArgs, equalTo(['-Xdebug']))
+
+        options.jvmArgs = ['-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005']
+        assertFalse(options.debug)
+        assertThat(options.jvmArgs, equalTo(['-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005']))
+
+        options.jvmArgs '-Xdebug'
+        assertTrue(options.debug)
+        assertThat(options.jvmArgs, equalTo([]))
+
+        options.jvmArgs = ['-Xdebug', '-Xrunjdwp:transport=other']
+        assertFalse(options.debug)
+        assertThat(options.jvmArgs, equalTo(['-Xdebug', '-Xrunjdwp:transport=other']))
+
+        options.allJvmArgs = ['-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005', '-Xdebug']
+        assertTrue(options.debug)
+        assertThat(options.jvmArgs, equalTo([]))
+    }
+    
+    @Test
+    public void canSetBootstrapClasspath() {
+        def bootstrapClasspath = [:] as FileCollection
+        options.bootstrapClasspath = bootstrapClasspath
+
+        assertThat(options.bootstrapClasspath, sameInstance(bootstrapClasspath))
+    }
+
+    @Test
+    public void canAddToBootstrapClasspath() {
+        def files = ['file1.jar', 'file2.jar'].collect { new File(it).canonicalFile }
+        options = new DefaultJavaForkOptions(new IdentityFileResolver());
+        options.bootstrapClasspath(files[0])
+        options.bootstrapClasspath(files[1])
+
+        assertThat(options.bootstrapClasspath.getFiles(), equalTo(files as Set))
+    }
+
+    @Test
+    public void allJvmArgsIncludeBootstrapClasspath() {
+        def files = ['file1.jar', 'file2.jar'].collect { new File(it).canonicalFile }
+        options = new DefaultJavaForkOptions(new IdentityFileResolver());
+        options.bootstrapClasspath(files)
+
+        context.checking {
+            allowing(resolver).resolveFiles(['file.jar'])
+            will(returnValue([isEmpty: {false}, getAsPath: {'<classpath>'}] as FileCollection))
+        }
+
+        assertThat(options.allJvmArgs, equalTo(['-Xbootclasspath:' + files.join(System.properties['path.separator'])]))
+    }
+
+    @Test
+    public void canSetBootstrapClasspathViaAllJvmArgs() {
+        def files = ['file1.jar', 'file2.jar'].collect { new File(it).canonicalFile }
+        options = new DefaultJavaForkOptions(new IdentityFileResolver());
+        options.bootstrapClasspath(files[0])
+
+        options.allJvmArgs = ['-Xbootclasspath:' + files[1]]
+
+        assertThat(options.bootstrapClasspath.files, equalTo([files[1]] as Set))
+    }
+
+    @Test
+    public void canCopyToTargetOptions() {
+        options.executable('executable')
+        options.jvmArgs('arg')
+        options.systemProperties(key: 12)
+        options.maxHeapSize = '1g'
+
+        JavaForkOptions target = context.mock(JavaForkOptions.class)
+        context.checking {
+            one(target).setExecutable('executable')
+            one(target).setJvmArgs(['arg'])
+            one(target).setSystemProperties(key: 12)
+            one(target).setMaxHeapSize('1g')
+            one(target).setBootstrapClasspath(options.bootstrapClasspath)
+            one(target).setEnableAssertions(false)
+            one(target).setDebug(false)
+            ignoring(target)
+        }
+
+        options.copyTo(target)
+    }
+}
+
+
diff --git a/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultProcessForkOptionsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultProcessForkOptionsTest.groovy
new file mode 100644
index 0000000..1a7146b
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultProcessForkOptionsTest.groovy
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.tasks.util
+
+import static org.gradle.util.Matchers.*
+
+import org.gradle.api.internal.file.FileResolver
+import org.gradle.util.JUnit4GroovyMockery
+import org.gradle.process.ProcessForkOptions
+import org.jmock.integration.junit4.JMock
+import org.junit.Test
+import org.junit.runner.RunWith
+import static org.hamcrest.Matchers.*
+import static org.junit.Assert.assertThat
+import org.gradle.process.internal.DefaultProcessForkOptions
+import org.junit.Before
+import org.gradle.api.internal.file.FileSource
+
+ at RunWith(JMock.class)
+public class DefaultProcessForkOptionsTest {
+    private final JUnit4GroovyMockery context = new JUnit4GroovyMockery()
+    private final FileResolver resolver = context.mock(FileResolver.class)
+    private final FileSource workingDir = context.mock(FileSource.class)
+    private DefaultProcessForkOptions options
+    private final File baseDir = new File("base-dir")
+
+    @Before
+    public void setup() {
+        context.checking {
+            allowing(resolver).resolveLater(".")
+            will(returnValue(workingDir))
+        }
+        options = new DefaultProcessForkOptions(resolver)
+    }
+
+    @Test
+    public void defaultValues() {
+        assertThat(options.executable, nullValue())
+        assertThat(options.environment, not(isEmptyMap()))
+    }
+
+    @Test
+    public void resolvesWorkingDirectoryOnGet() {
+        context.checking {
+            one(resolver).resolveLater(12)
+            will(returnValue(workingDir))
+        }
+
+        options.workingDir = 12
+
+        context.checking {
+            one(workingDir).get()
+            will(returnValue(baseDir))
+        }
+
+        assertThat(options.workingDir, equalTo(baseDir))
+    }
+
+    @Test
+    public void convertsEnvironmentToString() {
+        options.environment = [key1: 12, key2: "${1+2}"]
+
+        assertThat(options.actualEnvironment, equalTo(key1: '12', key2: '3'))
+    }
+
+    @Test
+    public void canAddEnvironmentVariables() {
+        options.environment = [:]
+
+        assertThat(options.environment, equalTo([:]))
+
+        options.environment('key', 12)
+
+        assertThat(options.environment, equalTo([key: 12]))
+        assertThat(options.actualEnvironment, equalTo([key: '12']))
+
+        options.environment(key2: "value")
+
+        assertThat(options.environment, equalTo([key: 12, key2: "value"]))
+    }
+    
+    @Test
+    public void canCopyToTargetOptions() {
+        options.executable('executable')
+        options.environment('key', 12)
+
+        ProcessForkOptions target = context.mock(ProcessForkOptions.class)
+        context.checking {
+            one(target).setExecutable('executable')
+            one(target).setWorkingDir(workingDir)
+            one(target).setEnvironment(withParam(not(isEmptyMap())))
+        }
+
+        options.copyTo(target)
+    }
+}
+
+
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/logging/LogLevelTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/logging/LogLevelTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/logging/LogLevelTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/logging/LogLevelTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/logging/LoggingTest.java b/subprojects/core/src/test/groovy/org/gradle/api/logging/LoggingTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/logging/LoggingTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/logging/LoggingTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention1.groovy b/subprojects/core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention1.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention1.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention1.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention2.groovy b/subprojects/core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention2.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention2.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/plugins/TestPluginConvention2.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java b/subprojects/core/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/AndSpecTest.java b/subprojects/core/src/test/groovy/org/gradle/api/specs/AndSpecTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/AndSpecTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/specs/AndSpecTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/NotSpecTest.java b/subprojects/core/src/test/groovy/org/gradle/api/specs/NotSpecTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/NotSpecTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/specs/NotSpecTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/OrSpecTest.java b/subprojects/core/src/test/groovy/org/gradle/api/specs/OrSpecTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/OrSpecTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/specs/OrSpecTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/SpecsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/specs/SpecsTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/specs/SpecsTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/specs/SpecsTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractConventionTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractConventionTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractConventionTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractConventionTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractCopyTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractCopyTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractCopyTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractCopyTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractSpockTaskTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractSpockTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractSpockTaskTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractSpockTaskTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AbstractTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/AbstractTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AntBuilderAwareUtil.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/AntBuilderAwareUtil.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/AntBuilderAwareUtil.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/AntBuilderAwareUtil.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/CopyTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/CopyTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/CopyTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/CopyTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/DeleteTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/DeleteTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/DeleteTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/DeleteTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/DirectoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/DirectoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/DirectoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/DirectoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/ExecTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/ExecTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/ExecTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/ExecTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/GradleBuildTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/GradleBuildTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/GradleBuildTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/GradleBuildTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/GroovyTaskTestHelper.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/GroovyTaskTestHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/GroovyTaskTestHelper.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/GroovyTaskTestHelper.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/SourceTaskTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/SourceTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/SourceTaskTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/SourceTaskTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/UploadTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/UploadTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/UploadTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/UploadTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/ant/AntTargetTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/ant/AntTargetTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/ant/AntTargetTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/ant/AntTargetTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTaskTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTaskTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/bundling/AbstractArchiveTaskTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/bundling/TarTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/bundling/TarTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/bundling/TarTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/bundling/TarTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/bundling/ZipTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/bundling/ZipTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/bundling/ZipTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/bundling/ZipTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/AbstractReportTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/DependencyReportTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTaskTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTaskTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/ProjectReportTaskTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/PropertyReportTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/TaskReportTaskTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/TaskReportTaskTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/TaskReportTaskTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/TaskReportTaskTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModelTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModelTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModelTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AggregateMultiProjectTaskReportModelTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRendererTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRendererTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRendererTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/AsciiReportRendererTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModelTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModelTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModelTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/DefaultGroupTaskReportModelTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRendererTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRendererTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRendererTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/PropertyReportRendererTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModelTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModelTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModelTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/SingleProjectTaskReportModelTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskDetailsFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskModelSpecification.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskModelSpecification.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskModelSpecification.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskModelSpecification.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRendererTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRendererTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRendererTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TaskReportRendererTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRendererTest.java b/subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRendererTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRendererTest.java
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/diagnostics/internal/TextReportRendererTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/util/AbstractTestForPatternSet.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/util/AbstractTestForPatternSet.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/util/AbstractTestForPatternSet.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/util/AbstractTestForPatternSet.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/util/PatternSetTest.groovy b/subprojects/core/src/test/groovy/org/gradle/api/tasks/util/PatternSetTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/api/tasks/util/PatternSetTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/api/tasks/util/PatternSetTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/AutoCloseCacheFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/cache/AutoCloseCacheFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/AutoCloseCacheFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/cache/AutoCloseCacheFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultCacheFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/cache/DefaultCacheFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultCacheFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/cache/DefaultCacheFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultCacheRepositoryTest.java b/subprojects/core/src/test/groovy/org/gradle/cache/DefaultCacheRepositoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultCacheRepositoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/cache/DefaultCacheRepositoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultPersistentDirectoryCacheTest.java b/subprojects/core/src/test/groovy/org/gradle/cache/DefaultPersistentDirectoryCacheTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultPersistentDirectoryCacheTest.java
rename to subprojects/core/src/test/groovy/org/gradle/cache/DefaultPersistentDirectoryCacheTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultSerializerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/cache/DefaultSerializerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/DefaultSerializerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/cache/DefaultSerializerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/SimpleStateCacheTest.groovy b/subprojects/core/src/test/groovy/org/gradle/cache/SimpleStateCacheTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/SimpleStateCacheTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/cache/SimpleStateCacheTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/cache/btree/BTreePersistentIndexedCacheTest.java b/subprojects/core/src/test/groovy/org/gradle/cache/btree/BTreePersistentIndexedCacheTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/cache/btree/BTreePersistentIndexedCacheTest.java
rename to subprojects/core/src/test/groovy/org/gradle/cache/btree/BTreePersistentIndexedCacheTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/BuildScriptProcessorTest.java b/subprojects/core/src/test/groovy/org/gradle/configuration/BuildScriptProcessorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/BuildScriptProcessorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/configuration/BuildScriptProcessorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultBuildConfigurerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/configuration/DefaultBuildConfigurerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultBuildConfigurerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/configuration/DefaultBuildConfigurerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultInitScriptProcessorTest.java b/subprojects/core/src/test/groovy/org/gradle/configuration/DefaultInitScriptProcessorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultInitScriptProcessorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/configuration/DefaultInitScriptProcessorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultProjectEvaluatorTest.java b/subprojects/core/src/test/groovy/org/gradle/configuration/DefaultProjectEvaluatorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultProjectEvaluatorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/configuration/DefaultProjectEvaluatorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultScriptPluginFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/configuration/DefaultScriptPluginFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/DefaultScriptPluginFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/configuration/DefaultScriptPluginFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/GradleLauncherMetaDataTest.groovy b/subprojects/core/src/test/groovy/org/gradle/configuration/GradleLauncherMetaDataTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/GradleLauncherMetaDataTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/configuration/GradleLauncherMetaDataTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ImplicitTasksConfigurerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/configuration/ImplicitTasksConfigurerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ImplicitTasksConfigurerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/configuration/ImplicitTasksConfigurerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ImportsReaderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/configuration/ImportsReaderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ImportsReaderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/configuration/ImportsReaderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ImportsScriptSourceTest.java b/subprojects/core/src/test/groovy/org/gradle/configuration/ImportsScriptSourceTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ImportsScriptSourceTest.java
rename to subprojects/core/src/test/groovy/org/gradle/configuration/ImportsScriptSourceTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ProjectDependencies2TaskResolverTest.groovy b/subprojects/core/src/test/groovy/org/gradle/configuration/ProjectDependencies2TaskResolverTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/configuration/ProjectDependencies2TaskResolverTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/configuration/ProjectDependencies2TaskResolverTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/execution/DefaultBuildExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/execution/DefaultBuildExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/execution/DefaultBuildExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/execution/DefaultBuildExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/execution/DefaultTaskGraphExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/execution/DefaultTaskGraphExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/execution/DefaultTaskGraphExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/execution/DefaultTaskGraphExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/execution/DryRunBuildExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/execution/DryRunBuildExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/execution/DryRunBuildExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/execution/DryRunBuildExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/execution/ProjectDefaultsBuildExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/execution/ProjectDefaultsBuildExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/execution/ProjectDefaultsBuildExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/execution/ProjectDefaultsBuildExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/execution/TaskNameResolverTest.groovy b/subprojects/core/src/test/groovy/org/gradle/execution/TaskNameResolverTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/execution/TaskNameResolverTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/execution/TaskNameResolverTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/execution/TaskNameResolvingBuildExecuterTest.java b/subprojects/core/src/test/groovy/org/gradle/execution/TaskNameResolvingBuildExecuterTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/execution/TaskNameResolvingBuildExecuterTest.java
rename to subprojects/core/src/test/groovy/org/gradle/execution/TaskNameResolvingBuildExecuterTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGeneratorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGeneratorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGeneratorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/AsmBackedEmptyScriptGeneratorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandlerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandlerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptCompilationHandlerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptSourceTest.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptSourceTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptSourceTest.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/CachingScriptSourceTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandlerTest.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandlerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandlerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilationHandlerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptCompilerFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptRunnerFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptTest.groovy b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/DefaultScriptTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/EmptyScript.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/EmptyScript.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/EmptyScript.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/EmptyScript.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/StringScriptSourceTest.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/StringScriptSourceTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/StringScriptSourceTest.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/StringScriptSourceTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/UriScriptSourceTest.java b/subprojects/core/src/test/groovy/org/gradle/groovy/scripts/UriScriptSourceTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/groovy/scripts/UriScriptSourceTest.java
rename to subprojects/core/src/test/groovy/org/gradle/groovy/scripts/UriScriptSourceTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/AbstractSettingsFinderStrategyTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/AbstractSettingsFinderStrategyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/AbstractSettingsFinderStrategyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/AbstractSettingsFinderStrategyTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildFileProjectSpecTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/BuildFileProjectSpecTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildFileProjectSpecTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/BuildFileProjectSpecTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildLoaderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/BuildLoaderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildLoaderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/BuildLoaderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildProgressLoggerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/BuildProgressLoggerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildProgressLoggerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/BuildProgressLoggerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildSourceBuilderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/BuildSourceBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/BuildSourceBuilderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/BuildSourceBuilderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/CommandLineParserTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/CommandLineParserTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/CommandLineParserTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/CommandLineParserTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultCommandLineConverterTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultCommandLineConverterTest.java
new file mode 100644
index 0000000..db7f0e9
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultCommandLineConverterTest.java
@@ -0,0 +1,360 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.initialization;
+
+import org.gradle.CacheUsage;
+import org.gradle.CommandLineArgumentException;
+import org.gradle.StartParameter;
+import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.groovy.scripts.UriScriptSource;
+import org.gradle.util.GUtil;
+import org.gradle.util.TemporaryFolder;
+import org.gradle.util.TestFile;
+import org.junit.Rule;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+import static org.gradle.util.WrapUtil.*;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultCommandLineConverterTest {
+    @Rule
+    public TemporaryFolder testDir = new TemporaryFolder();
+
+    private TestFile currentDir = testDir.file("current-dir");
+    private File expectedBuildFile;
+    private File expectedGradleUserHome = StartParameter.DEFAULT_GRADLE_USER_HOME;
+    private File expectedProjectDir = currentDir;
+    private List<String> expectedTaskNames = toList();
+    private Set<String> expectedExcludedTasks = toSet();
+    private ProjectDependenciesBuildInstruction expectedProjectDependenciesBuildInstruction
+            = new ProjectDependenciesBuildInstruction(true);
+    private Map<String, String> expectedSystemProperties = new HashMap<String, String>();
+    private Map<String, String> expectedProjectProperties = new HashMap<String, String>();
+    private List<File> expectedInitScripts = new ArrayList<File>();
+    private CacheUsage expectedCacheUsage = CacheUsage.ON;
+    private boolean expectedSearchUpwards = true;
+    private boolean expectedDryRun;
+    private StartParameter.ShowStacktrace expectedShowStackTrace = StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
+    private String expectedEmbeddedScript = "somescript";
+    private LogLevel expectedLogLevel = LogLevel.LIFECYCLE;
+    private boolean expectedColorOutput = true;
+    private StartParameter actualStartParameter;
+    private boolean expectedProfile;
+
+    private final DefaultCommandLineConverter commandLineConverter = new DefaultCommandLineConverter();
+
+    @Test
+    public void withoutAnyOptions() {
+        checkConversion();
+    }
+
+    private void checkConversion(String... args) {
+        checkConversion(false, args);
+    }
+
+    private void checkStartParameter(StartParameter startParameter) {
+        assertEquals(expectedBuildFile, startParameter.getBuildFile());
+        assertEquals(expectedTaskNames, startParameter.getTaskNames());
+        assertEquals(expectedProjectDependenciesBuildInstruction,
+                startParameter.getProjectDependenciesBuildInstruction());
+        assertEquals(expectedProjectDir.getAbsoluteFile(), startParameter.getCurrentDir().getAbsoluteFile());
+        assertEquals(expectedCacheUsage, startParameter.getCacheUsage());
+        assertEquals(expectedSearchUpwards, startParameter.isSearchUpwards());
+        assertEquals(expectedProjectProperties, startParameter.getProjectProperties());
+        assertEquals(expectedSystemProperties, startParameter.getSystemPropertiesArgs());
+        assertEquals(expectedGradleUserHome.getAbsoluteFile(), startParameter.getGradleUserHomeDir().getAbsoluteFile());
+        assertEquals(expectedGradleUserHome.getAbsoluteFile(), startParameter.getGradleUserHomeDir().getAbsoluteFile());
+        assertEquals(expectedLogLevel, startParameter.getLogLevel());
+        assertEquals(expectedColorOutput, startParameter.isColorOutput());
+        assertEquals(expectedDryRun, startParameter.isDryRun());
+        assertEquals(expectedShowStackTrace, startParameter.getShowStacktrace());
+        assertEquals(expectedExcludedTasks, startParameter.getExcludedTaskNames());
+        assertEquals(expectedInitScripts, startParameter.getInitScripts());
+        assertEquals(expectedProfile, startParameter.isProfile());
+    }
+
+    private void checkConversion(final boolean embedded, String... args) {
+        actualStartParameter = new StartParameter();
+        actualStartParameter.setCurrentDir(currentDir);
+        commandLineConverter.convert(Arrays.asList(args), actualStartParameter);
+        // We check the params passed to the build factory
+        checkStartParameter(actualStartParameter);
+        if (embedded) {
+            assertThat(actualStartParameter.getBuildScriptSource().getResource().getText(), equalTo(expectedEmbeddedScript));
+        } else {
+            assert !GUtil.isTrue(actualStartParameter.getBuildScriptSource());
+        }
+    }
+
+    @Test
+    public void withSpecifiedGradleUserHomeDirectory() {
+        expectedGradleUserHome = testDir.file("home");
+        checkConversion("-g", expectedGradleUserHome.getAbsolutePath());
+
+        expectedGradleUserHome = currentDir.file("home");
+        checkConversion("-g", "home");
+    }
+
+    @Test
+    public void withSpecifiedProjectDirectory() {
+        expectedProjectDir = testDir.file("project-dir");
+        checkConversion("-p", expectedProjectDir.getAbsolutePath());
+
+        expectedProjectDir = currentDir.file("project-dir");
+        checkConversion("-p", "project-dir");
+    }
+
+    @Test
+    public void withSpecifiedBuildFileName() throws IOException {
+        expectedBuildFile = testDir.file("somename");
+        expectedProjectDir = expectedBuildFile.getParentFile();
+        checkConversion("-b", expectedBuildFile.getAbsolutePath());
+
+        expectedBuildFile = currentDir.file("somename");
+        expectedProjectDir = expectedBuildFile.getParentFile();
+        checkConversion("-b", "somename");
+    }
+
+    @Test
+    public void withSpecifiedSettingsFileName() throws IOException {
+        File expectedSettingsFile = currentDir.file("somesettings");
+        expectedProjectDir = expectedSettingsFile.getParentFile();
+
+        checkConversion("-c", "somesettings");
+
+        assertThat(actualStartParameter.getSettingsScriptSource(), instanceOf(UriScriptSource.class));
+        assertThat(actualStartParameter.getSettingsScriptSource().getResource().getFile(), equalTo(expectedSettingsFile));
+    }
+
+    @Test
+    public void withInitScripts() {
+        File script1 = currentDir.file("init1.gradle");
+        expectedInitScripts.add(script1);
+        checkConversion("-Iinit1.gradle");
+
+        File script2 = currentDir.file("init2.gradle");
+        expectedInitScripts.add(script2);
+        checkConversion("-Iinit1.gradle", "-Iinit2.gradle");
+    }
+    
+    @Test
+    public void withSystemProperties() {
+        final String prop1 = "gradle.prop1";
+        final String valueProp1 = "value1";
+        final String prop2 = "gradle.prop2";
+        final String valueProp2 = "value2";
+        expectedSystemProperties = toMap(prop1, valueProp1);
+        expectedSystemProperties.put(prop2, valueProp2);
+        checkConversion("-D", prop1 + "=" + valueProp1, "-D", prop2 + "=" + valueProp2);
+    }
+
+    @Test
+    public void withStartProperties() {
+        final String prop1 = "prop1";
+        final String valueProp1 = "value1";
+        final String prop2 = "prop2";
+        final String valueProp2 = "value2";
+        expectedProjectProperties = toMap(prop1, valueProp1);
+        expectedProjectProperties.put(prop2, valueProp2);
+        checkConversion("-P", prop1 + "=" + valueProp1, "-P", prop2 + "=" + valueProp2);
+    }
+
+    @Test
+    public void withTaskNames() {
+        expectedTaskNames = toList("a", "b");
+        checkConversion("a", "b");
+    }
+
+    @Test
+    public void withRebuildCacheFlagSet() {
+        expectedCacheUsage = CacheUsage.REBUILD;
+        checkConversion("-C", "rebuild");
+    }
+
+    @Test
+    public void withCacheOnFlagSet() {
+        checkConversion("-C", "on");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withUnknownCacheFlags() {
+        checkConversion("-C", "unknown");
+    }
+
+    @Test
+    public void withSearchUpwardsFlagSet() {
+        expectedSearchUpwards = false;
+        checkConversion("-u");
+    }
+
+    @Test
+    public void withShowFullStacktrace() {
+        expectedShowStackTrace = StartParameter.ShowStacktrace.ALWAYS_FULL;
+        checkConversion("-S");
+    }
+
+    @Test
+    public void withShowStacktrace() {
+        expectedShowStackTrace = StartParameter.ShowStacktrace.ALWAYS;
+        checkConversion("-s");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withShowStacktraceAndShowFullStacktraceShouldThrowCommandLineArgumentEx() {
+        checkConversion("-sf");
+    }
+
+    @Test
+    public void withDryRunFlagSet() {
+        expectedDryRun = true;
+        checkConversion("-m");
+    }
+
+    @Test
+    public void withExcludeTask() {
+        expectedExcludedTasks.add("excluded");
+        checkConversion("-x", "excluded");
+        expectedExcludedTasks.add("excluded2");
+        checkConversion("-x", "excluded", "-x", "excluded2");
+    }
+
+    @Test
+    public void withEmbeddedScript() {
+        expectedSearchUpwards = false;
+        checkConversion(true, "-e", expectedEmbeddedScript);
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withEmbeddedScriptAndConflictingNoSearchUpwardsOption() {
+        checkConversion("-e", "someScript", "-u", "clean");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withEmbeddedScriptAndConflictingSpecifyBuildFileOption() {
+        checkConversion("-e", "someScript", "-bsomeFile", "clean");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withEmbeddedScriptAndConflictingSpecifySettingsFileOption() {
+        checkConversion("-e", "someScript", "-csomeFile", "clean");
+    }
+
+    @Test
+    public void withNoProjectDependencyRebuild() {
+        expectedProjectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(false);
+        checkConversion("-a");
+    }
+
+    @Test
+    public void withQuietLoggingOptions() {
+        expectedLogLevel = LogLevel.QUIET;
+        checkConversion("-q");
+    }
+
+    @Test
+    public void withInfoLoggingOptions() {
+        expectedLogLevel = LogLevel.INFO;
+        checkConversion("-i");
+    }
+
+    @Test
+    public void withDebugLoggingOptions() {
+        expectedLogLevel = LogLevel.DEBUG;
+        checkConversion("-d");
+    }
+
+    @Test
+    public void withNoColor() {
+        expectedColorOutput = false;
+        checkConversion("--no-color");
+    }
+
+    @Test
+    public void withShowTasks() {
+        expectedTaskNames = toList("tasks");
+        checkConversion(false, "-t");
+    }
+
+    @Test
+    public void withShowAllTasks() {
+        expectedTaskNames = toList("tasks", "--all");
+        checkConversion(false, "-t", "--all");
+    }
+
+    @Test
+    public void withShowTasksAndEmbeddedScript() {
+        expectedSearchUpwards = false;
+        expectedTaskNames = toList("tasks");
+        checkConversion(true, "-e", expectedEmbeddedScript, "-t");
+    }
+
+    @Test
+    public void withShowProperties() {
+        expectedTaskNames = toList("properties");
+        checkConversion(false, "-r");
+    }
+
+    @Test
+    public void withShowDependencies() {
+        expectedTaskNames = toList("dependencies");
+        checkConversion(false, "-n");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withLowerPParameterWithoutArgument() {
+        checkConversion("-p");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withAParameterWithoutArgument() {
+        checkConversion("-A");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withUpperAAndLowerAParameter() {
+        checkConversion("-a", "-Atask1");
+    }
+
+    @Test
+    public void withProfile() {
+        expectedProfile = true;
+        checkConversion("--profile");
+    }
+
+    @Test(expected = CommandLineArgumentException.class)
+    public void withUnknownOption() {
+        checkConversion("--unknown");
+    }
+
+    @Test
+    public void withTaskAndTaskOption() {
+        expectedTaskNames = toList("someTask", "--some-task-option");
+        checkConversion("someTask", "--some-task-option");
+    }
+
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultExceptionAnalyserTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultExceptionAnalyserTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultExceptionAnalyserTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultExceptionAnalyserTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultGradleLauncherTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultGradlePropertiesLoaderTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultGradlePropertiesLoaderTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultGradlePropertiesLoaderTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultGradlePropertiesLoaderTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultInitScriptFinderTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultInitScriptFinderTest.java
new file mode 100644
index 0000000..af4f5c7
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultInitScriptFinderTest.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.initialization;
+
+import org.gradle.util.GFileUtils;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.jmock.Expectations;
+import org.gradle.StartParameter;
+import org.gradle.api.internal.GradleInternal;
+import org.gradle.groovy.scripts.ScriptSource;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+import static org.hamcrest.Matchers.*;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.File;
+
+public class DefaultInitScriptFinderTest {
+    @Test
+    public void testFindScripts() {
+        JUnit4Mockery context = new JUnit4Mockery();
+
+        final GradleInternal gradleMock = context.mock(GradleInternal.class);
+        final StartParameter testStartParameter = new StartParameter();
+        testStartParameter.addInitScript(new File("some init script"));
+        testStartParameter.addInitScript(new File("/path/to/another init script"));
+
+        context.checking(new Expectations() {{
+            allowing(gradleMock).getStartParameter();
+            will(returnValue(testStartParameter));
+        }});
+
+        List<ScriptSource> sourceList = new DefaultInitScriptFinder().findScripts(gradleMock);
+        assertThat(getSourceFiles(sourceList), equalTo(canonicalise(testStartParameter.getInitScripts())));
+    }
+
+    private List<File> canonicalise(List<File> files) {
+        List<File> results = new ArrayList<File>();
+        for (File file : files) {
+            results.add(GFileUtils.canonicalise(file));
+        }
+        return results;
+    }
+
+    private List<File> getSourceFiles(List<ScriptSource> sources) {
+        List<File> results = new ArrayList<File>(sources.size());
+        for (ScriptSource source : sources) {
+            results.add(source.getResource().getFile());
+        }
+        return results;
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistryTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorRegistryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultProjectDescriptorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultSettingsFinderTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultSettingsFinderTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultSettingsFinderTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultSettingsFinderTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultSettingsTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/DefaultSettingsTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultSettingsTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/DefaultSettingsTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinderTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinderTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinderTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/EmbeddedScriptSettingsFinderTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ExceptionDecoratingClassGeneratorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/ExceptionDecoratingClassGeneratorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ExceptionDecoratingClassGeneratorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/ExceptionDecoratingClassGeneratorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/InitScriptHandlerTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/InitScriptHandlerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/InitScriptHandlerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/InitScriptHandlerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategyTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/MasterDirSettingsFinderStrategyTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/NestedBuildTrackerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/NestedBuildTrackerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/NestedBuildTrackerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/NestedBuildTrackerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategyTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/ParentDirSettingsFinderStrategyTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ProjectDirectoryProjectSpecTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/ProjectDirectoryProjectSpecTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ProjectDirectoryProjectSpecTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/ProjectDirectoryProjectSpecTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessorTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessorTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessorTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/PropertiesLoadingSettingsProcessorTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategyTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategyTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategyTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/SameLevelDirSettingsFinderStrategyTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/initialization/ScriptEvaluatingSettingsProcessorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/SettingsFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/SettingsFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/SettingsFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/SettingsFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/SettingsHandlerTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/SettingsHandlerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/SettingsHandlerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/SettingsHandlerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/UserHomeInitScriptFinderTest.java b/subprojects/core/src/test/groovy/org/gradle/initialization/UserHomeInitScriptFinderTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/initialization/UserHomeInitScriptFinderTest.java
rename to subprojects/core/src/test/groovy/org/gradle/initialization/UserHomeInitScriptFinderTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/invocation/DefaultGradleTest.java b/subprojects/core/src/test/groovy/org/gradle/invocation/DefaultGradleTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/invocation/DefaultGradleTest.java
rename to subprojects/core/src/test/groovy/org/gradle/invocation/DefaultGradleTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/listener/ActionBroadcastTest.groovy b/subprojects/core/src/test/groovy/org/gradle/listener/ActionBroadcastTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/listener/ActionBroadcastTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/listener/ActionBroadcastTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/listener/AsyncListenerBroadcastTest.groovy b/subprojects/core/src/test/groovy/org/gradle/listener/AsyncListenerBroadcastTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/listener/AsyncListenerBroadcastTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/listener/AsyncListenerBroadcastTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/listener/DefaultListenerManagerTest.java b/subprojects/core/src/test/groovy/org/gradle/listener/DefaultListenerManagerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/listener/DefaultListenerManagerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/listener/DefaultListenerManagerTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/listener/ListenerBroadcastTest.java b/subprojects/core/src/test/groovy/org/gradle/listener/ListenerBroadcastTest.java
new file mode 100644
index 0000000..8e95111
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/listener/ListenerBroadcastTest.java
@@ -0,0 +1,334 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.listener;
+
+import org.gradle.api.Action;
+import org.gradle.messaging.dispatch.Dispatch;
+import org.gradle.messaging.dispatch.MethodInvocation;
+import org.gradle.util.JUnit4GroovyMockery;
+import org.gradle.util.TestClosure;
+import org.hamcrest.Description;
+import org.jmock.Expectations;
+import org.jmock.api.Invocation;
+import org.jmock.integration.junit4.JMock;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.gradle.util.HelperUtil.*;
+import static org.gradle.util.Matchers.*;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+ at RunWith(JMock.class)
+public class ListenerBroadcastTest {
+    private final JUnit4Mockery context = new JUnit4GroovyMockery();
+    private final ListenerBroadcast<TestListener> broadcast = new ListenerBroadcast<TestListener>(TestListener.class);
+
+    @Test
+    public void createsSourceObject() {
+        assertThat(broadcast.getSource(), notNullValue());
+        assertThat(broadcast.getSource(), strictlyEqual(broadcast.getSource()));
+        assertFalse(broadcast.getSource().equals(new ListenerBroadcast<TestListener>(TestListener.class).getSource()));
+        assertEquals(broadcast.getSource().hashCode(), broadcast.getSource().hashCode());
+        assertThat(broadcast.getSource().toString(), equalTo("TestListener broadcast"));
+    }
+
+    @Test
+    public void getTypeIsCorrect() {
+        assertThat(broadcast.getType(), equalTo(TestListener.class));
+    }
+
+    @Test
+    public void sourceObjectDoesNothingWhenNoListenersAdded() {
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void sourceObjectNotifiesEachListenerInOrderAdded() {
+        final TestListener listener1 = context.mock(TestListener.class, "listener1");
+        final TestListener listener2 = context.mock(TestListener.class, "listener2");
+
+        context.checking(new Expectations() {{
+            one(listener1).event1("param");
+            one(listener2).event1("param");
+        }});
+
+        broadcast.add(listener1);
+        broadcast.add(listener2);
+
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void canDispatchEventToListeners() throws NoSuchMethodException {
+        final TestListener listener1 = context.mock(TestListener.class, "listener1");
+        final TestListener listener2 = context.mock(TestListener.class, "listener2");
+
+        context.checking(new Expectations() {{
+            one(listener1).event1("param");
+            one(listener2).event1("param");
+        }});
+
+        broadcast.add(listener1);
+        broadcast.add(listener2);
+
+        MethodInvocation invocation = new MethodInvocation(TestListener.class.getMethod("event1", String.class), new Object[]{"param"});
+        broadcast.dispatch(invocation);
+    }
+
+    @Test
+    public void listenerIsNotUsedAfterItIsRemoved() {
+        TestListener listener = context.mock(TestListener.class);
+
+        broadcast.add(listener);
+        broadcast.remove(listener);
+
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void canUseDispatchToReceiveNotifications() throws NoSuchMethodException {
+        final Dispatch<MethodInvocation> dispatch1 = context.mock(Dispatch.class, "listener1");
+        final Dispatch<MethodInvocation> dispatch2 = context.mock(Dispatch.class, "listener2");
+        final MethodInvocation invocation = new MethodInvocation(TestListener.class.getMethod("event1", String.class), new Object[]{"param"});
+
+        context.checking(new Expectations() {{
+            one(dispatch1).dispatch(invocation);
+            one(dispatch2).dispatch(invocation);
+        }});
+
+        broadcast.add(dispatch1);
+        broadcast.add(dispatch2);
+
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void dispatchIsNotUsedAfterItIsRemoved() {
+        Dispatch<MethodInvocation> dispatch = context.mock(Dispatch.class);
+
+        broadcast.add(dispatch);
+        broadcast.remove(dispatch);
+
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void canUseClosureToReceiveNotificationsForSingleEventMethod() {
+        final TestClosure testClosure = context.mock(TestClosure.class);
+        context.checking(new Expectations() {{
+            one(testClosure).call("param");
+            will(returnValue("ignore me"));
+        }});
+
+        broadcast.add("event1", toClosure(testClosure));
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void doesNotNotifyClosureForOtherEventMethods() {
+        final TestClosure testClosure = context.mock(TestClosure.class);
+
+        broadcast.add("event1", toClosure(testClosure));
+        broadcast.getSource().event2(9, "param");
+    }
+
+    @Test
+    public void closureCanHaveFewerParametersThanEventMethod() {
+        broadcast.add("event2", toClosure("{ a -> 'result' }"));
+        broadcast.getSource().event2(1, "param");
+        broadcast.getSource().event2(2, null);
+    }
+
+    @Test
+    public void canUseActionForSingleEventMethod() {
+        final Action<String> action = context.mock(Action.class);
+        context.checking(new Expectations() {{
+            one(action).execute("param");
+        }});
+
+        broadcast.add("event1", action);
+        broadcast.getSource().event1("param");
+    }
+
+    @Test
+    public void doesNotNotifyActionForOtherEventMethods() {
+        final Action<String> action = context.mock(Action.class);
+
+        broadcast.add("event1", action);
+        broadcast.getSource().event2(9, "param");
+    }
+
+    @Test
+    public void actionCanHaveFewerParametersThanEventMethod() {
+        final Action<Integer> action = context.mock(Action.class);
+        context.checking(new Expectations() {{
+            one(action).execute(1);
+            one(action).execute(2);
+        }});
+        broadcast.add("event2", action);
+        broadcast.getSource().event2(1, "param");
+        broadcast.getSource().event2(2, null);
+    }
+
+    @Test
+    public void listenerCanAddAnotherListener() {
+        final TestListener listener1 = context.mock(TestListener.class, "listener1");
+        final TestListener listener2 = context.mock(TestListener.class, "listener2");
+        final TestListener listener3 = context.mock(TestListener.class, "listener3");
+
+        broadcast.add(listener1);
+        broadcast.add(listener2);
+
+        context.checking(new Expectations() {{
+            ignoring(listener2);
+            one(listener1).event1("event");
+            will(new org.jmock.api.Action() {
+                public void describeTo(Description description) {
+                    description.appendText("add listener");
+                }
+
+                public Object invoke(Invocation invocation) throws Throwable {
+                    broadcast.add(listener3);
+                    return null;
+                }
+            });
+        }});
+
+        broadcast.getSource().event1("event");
+    }
+
+    @Test
+    public void wrapsExceptionThrownByListener() {
+        final TestListener listener = context.mock(TestListener.class);
+        final RuntimeException failure = new RuntimeException();
+
+        context.checking(new Expectations() {{
+            one(listener).event1("param");
+            will(throwException(failure));
+        }});
+
+        broadcast.add(listener);
+
+        try {
+            broadcast.getSource().event1("param");
+            fail();
+        } catch (ListenerNotificationException e) {
+            assertThat(e.getMessage(), equalTo("Failed to notify test listener."));
+            assertThat(e.getCause(), sameInstance((Throwable) failure));
+        }
+    }
+
+    @Test
+    public void wrapsExceptionThrownByClosure() {
+        final TestClosure testClosure = context.mock(TestClosure.class);
+        final RuntimeException failure = new RuntimeException();
+
+        context.checking(new Expectations() {{
+            one(testClosure).call("param");
+            will(throwException(failure));
+        }});
+
+        broadcast.add("event1", toClosure(testClosure));
+
+        try {
+            broadcast.getSource().event1("param");
+            fail();
+        } catch (ListenerNotificationException e) {
+            assertThat(e.getMessage(), equalTo("Failed to notify test listener."));
+            assertThat(e.getCause(), sameInstance((Throwable) failure));
+        }
+    }
+
+    @Test
+    public void dispatchWrapsExceptionThrownByListener() throws NoSuchMethodException {
+        final TestListener listener = context.mock(TestListener.class);
+        final RuntimeException failure = new RuntimeException();
+
+        context.checking(new Expectations() {{
+            one(listener).event1("param");
+            will(throwException(failure));
+        }});
+
+        broadcast.add(listener);
+
+        try {
+            broadcast.dispatch(new MethodInvocation(TestListener.class.getMethod("event1", String.class), new Object[]{"param"}));
+            fail();
+        } catch (ListenerNotificationException e) {
+            assertThat(e.getMessage(), equalTo("Failed to notify test listener."));
+            assertThat(e.getCause(), sameInstance((Throwable) failure));
+        }
+    }
+
+    @Test
+    public void attemptsToNotifyAllOtherListenersWhenOneThrowsException() {
+        final TestListener listener1 = context.mock(TestListener.class);
+        final TestListener listener2 = context.mock(TestListener.class);
+        final RuntimeException failure = new RuntimeException();
+
+        context.checking(new Expectations() {{
+            one(listener1).event1("param");
+            will(throwException(failure));
+            one(listener2).event1("param");
+        }});
+
+        broadcast.add(listener1);
+        broadcast.add(listener2);
+
+        try {
+            broadcast.getSource().event1("param");
+            fail();
+        } catch (ListenerNotificationException e) {
+            assertThat(e.getCause(), sameInstance((Throwable) failure));
+        }
+    }
+
+    @Test
+    public void attemptsToNotifyAllOtherListenersWhenMultipleThrowException() {
+        final TestListener listener1 = context.mock(TestListener.class);
+        final TestListener listener2 = context.mock(TestListener.class);
+        final TestListener listener3 = context.mock(TestListener.class);
+        final RuntimeException failure = new RuntimeException();
+
+        context.checking(new Expectations() {{
+            one(listener1).event1("param");
+            will(throwException(failure));
+            one(listener2).event1("param");
+            will(throwException(new RuntimeException()));
+            one(listener3).event1("param");
+        }});
+
+        broadcast.add(listener1);
+        broadcast.add(listener2);
+        broadcast.add(listener3);
+
+        try {
+            broadcast.getSource().event1("param");
+            fail();
+        } catch (ListenerNotificationException e) {
+            assertThat(e.getCause(), sameInstance((Throwable) failure));
+        }
+    }
+
+    public interface TestListener {
+        void event1(String param);
+
+        void event2(int value, String other);
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/LoggingServiceRegistryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/LoggingServiceRegistryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/LoggingServiceRegistryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/LoggingServiceRegistryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/LoggingTestHelper.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/LoggingTestHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/LoggingTestHelper.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/LoggingTestHelper.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/AbstractStyledTextOutputTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/AbstractStyledTextOutputTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/AbstractStyledTextOutputTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/AbstractStyledTextOutputTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/AnsiConsoleTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/AnsiConsoleTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/AnsiConsoleTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/AnsiConsoleTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/ConsoleBackedProgressRendererTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/ConsoleBackedProgressRendererTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/ConsoleBackedProgressRendererTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/ConsoleBackedProgressRendererTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/ConsoleStub.java b/subprojects/core/src/test/groovy/org/gradle/logging/internal/ConsoleStub.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/ConsoleStub.java
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/ConsoleStub.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultColorMapTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultColorMapTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultColorMapTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultColorMapTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultLoggingManagerTest.java b/subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultLoggingManagerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultLoggingManagerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultLoggingManagerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultProgressLoggerFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirectorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirectorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirectorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/DefaultStandardOutputRedirectorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/JavaUtilLoggingConfigurerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LogEventTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/LogEventTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LogEventTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/LogEventTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutputTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutputTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutputTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/LoggingBackedStyledTextOutputTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LoggingCommandLineConverterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/LoggingCommandLineConverterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LoggingCommandLineConverterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/LoggingCommandLineConverterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LoggingSystemAdapterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/LoggingSystemAdapterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/LoggingSystemAdapterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/LoggingSystemAdapterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/OutputEventRendererTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/OutputEventRendererTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/OutputEventRendererTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/OutputEventRendererTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/OutputSpecification.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/OutputSpecification.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/OutputSpecification.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/OutputSpecification.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/PrintStreamLoggingSystemTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/PrintStreamLoggingSystemTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/PrintStreamLoggingSystemTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/PrintStreamLoggingSystemTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/ProgressLogEventGeneratorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/ProgressLogEventGeneratorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/ProgressLogEventGeneratorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/ProgressLogEventGeneratorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/Slf4jLoggingConfigurerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/StreamingStyledTextOutputTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/StreamingStyledTextOutputTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/StreamingStyledTextOutputTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/StreamingStyledTextOutputTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputBackedRendererTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputBackedRendererTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputBackedRendererTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputBackedRendererTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputEventTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputEventTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputEventTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/StyledTextOutputEventTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/TextStreamOutputEventListenerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/logging/internal/TextStreamOutputEventListenerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/logging/internal/TextStreamOutputEventListenerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/logging/internal/TextStreamOutputEventListenerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/actor/internal/DefaultActorFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/actor/internal/DefaultActorFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/actor/internal/DefaultActorFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/actor/internal/DefaultActorFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/concurrent/CompositeStoppableTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/concurrent/CompositeStoppableTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/concurrent/CompositeStoppableTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/concurrent/CompositeStoppableTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactoryTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactoryTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/concurrent/DefaultExecutorFactoryTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/AsyncDispatchTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/AsyncDispatchTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/AsyncDispatchTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/AsyncDispatchTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/AsyncReceiveTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/AsyncReceiveTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/AsyncReceiveTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/AsyncReceiveTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatchTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatchTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatchTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatchTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatchTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatchTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatchTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingDispatchTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListenerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListenerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListenerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ExceptionTrackingListenerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/MethodInvocationTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/MethodInvocationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/MethodInvocationTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/MethodInvocationTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/dispatch/ProxyDispatchAdapterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatchTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatchTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatchTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageMarshallingDispatchTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatchTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatchTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatchTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/ChannelMessageUnmarshallingDispatchTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClientTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClientTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClientTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingClientTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServerTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServerTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServerTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMessagingServerTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnectionTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnectionTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnectionTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultMultiChannelConnectionTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnectionTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnectionTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnectionTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/DefaultObjectConnectionTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatchTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatchTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatchTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamDispatchTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilterTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilterTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilterTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamFilterTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceiveTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceiveTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceiveTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/EndOfStreamReceiveTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnectorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnectorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnectorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeIncomingConnectorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnectorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnectorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnectorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/HandshakeOutgoingConnectorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/MessageTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/MessageTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/MessageTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/MessageTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatchTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatchTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatchTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationMarshallingDispatchTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatchTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatchTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatchTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/MethodInvocationUnmarshallingDispatchTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocationTest.java b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocationTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocationTest.java
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/RemoteMethodInvocationTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/TcpConnectorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/TcpConnectorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/messaging/remote/internal/TcpConnectorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/messaging/remote/internal/TcpConnectorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/DefaultExecHandleTest.java b/subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultExecHandleTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/DefaultExecHandleTest.java
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultExecHandleTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessFactoryTest.java b/subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessFactoryTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessFactoryTest.java
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessFactoryTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessTest.groovy b/subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/DefaultWorkerProcessTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/ExecHandleBuilderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/process/internal/ExecHandleBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/ExecHandleBuilderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/ExecHandleBuilderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/JavaExecHandleBuilderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/process/internal/JavaExecHandleBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/JavaExecHandleBuilderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/JavaExecHandleBuilderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/ActionExecutionWorkerTest.java b/subprojects/core/src/test/groovy/org/gradle/process/internal/child/ActionExecutionWorkerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/ActionExecutionWorkerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/child/ActionExecutionWorkerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorkerTest.java b/subprojects/core/src/test/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorkerTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorkerTest.java
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/child/ImplementationClassLoaderWorkerTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/SerializableMockHelper.groovy b/subprojects/core/src/test/groovy/org/gradle/process/internal/child/SerializableMockHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/SerializableMockHelper.groovy
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/child/SerializableMockHelper.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProviderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProviderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProviderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/process/internal/child/WorkerProcessClassPathProviderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/testfixtures/ProjectBuilderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/testfixtures/ProjectBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/testfixtures/ProjectBuilderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/testfixtures/ProjectBuilderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/ClockTest.java b/subprojects/core/src/test/groovy/org/gradle/util/ClockTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/ClockTest.java
rename to subprojects/core/src/test/groovy/org/gradle/util/ClockTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/CompositeIdGeneratorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/CompositeIdGeneratorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/CompositeIdGeneratorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/CompositeIdGeneratorTest.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/util/ConcurrentSpecification.groovy b/subprojects/core/src/test/groovy/org/gradle/util/ConcurrentSpecification.groovy
new file mode 100644
index 0000000..0c0d01a
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/util/ConcurrentSpecification.groovy
@@ -0,0 +1,477 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.util
+
+import java.util.concurrent.TimeUnit
+import java.util.concurrent.locks.Condition
+import java.util.concurrent.locks.Lock
+import java.util.concurrent.locks.ReentrantLock
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+import spock.lang.Specification
+
+/**
+ * <p>A base class for writing specifications which exercise concurrent code.
+ *
+ * <p>See {@link ConcurrentSpecificationTest} for some examples.
+ */
+class ConcurrentSpecification extends Specification {
+    private static final Logger LOG = LoggerFactory.getLogger(ConcurrentSpecification.class)
+    private final Lock lock = new ReentrantLock()
+    private final Condition threadsChanged = lock.newCondition()
+    private final Set<DeferredActionImpl> mocks = [] as Set
+    private final Set<TestThread> threads = [] as Set
+    private final List<Throwable> failures = []
+
+    def cleanup() {
+        finished()
+    }
+
+    /**
+     * Creates an action which will be used by a mock object to synchronise with the SUT.
+     *
+     * @return The action.
+     */
+    DeferredAction later() {
+        lock.lock()
+        try {
+            DeferredActionImpl mock = new DeferredActionImpl(this, lock)
+            mocks << mock
+            return mock
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    /**
+     * Starts a thread which executes the given closure. Blocks until all deferred actions are activated. Does not wait for the thread to complete.
+     *
+     * @return A handle to the test thread.
+     */
+    TestParticipant start(Closure cl) {
+        lock.lock()
+        try {
+            TestThread thread = new TestThread(this, lock, cl)
+            thread.start()
+            waitForAllMocks()
+            return new TestParticipantImpl(this, thread)
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    /**
+     * Returns a composite participant, which you can use to perform atomic operations on.
+     *
+     * @return A handle to the composite participant.
+     */
+    TestParticipant all(TestParticipant... participants) {
+        return new CompositeTestParticipant(this, lock, participants as List)
+    }
+
+    private void waitForAllMocks() {
+        LOG.info("Waiting for all mocks to block.")
+        Date timeout = shortTimeout()
+        mocks.each { mock ->
+            mock.waitUntilActivated(timeout)
+        }
+    }
+
+    /**
+     * Activates and executes all deferred actions and waits for all threads to complete. Asserts that the threads complete in a 'short' time. Rethrows any exceptions thrown by test threads.
+     */
+    void finished() {
+        Date timeout = shortTimeout()
+        lock.lock()
+        try {
+            LOG.info("Waiting for actions to complete.")
+            mocks.each { mock ->
+                mock.run(timeout)
+            }
+
+            LOG.info("Waiting for test threads to complete.")
+            while (!threads.isEmpty()) {
+                if (!threadsChanged.awaitUntil(timeout)) {
+                    failures << new IllegalStateException("Timeout waiting for test threads to complete.")
+                    break;
+                }
+            }
+            threads.each { thread ->
+                thread.interrupt()
+            }
+
+            LOG.info("Finishing up.")
+            if (!failures.isEmpty()) {
+                throw failures[0]
+            }
+        } finally {
+            threads.clear()
+            mocks.clear()
+            failures.clear()
+            lock.unlock()
+        }
+
+    }
+
+    static Date shortTimeout() {
+        return new Date(System.currentTimeMillis() + 5000)
+    }
+
+    void run(Closure cl, Date timeout) {
+        def thread = new TestThread(this, lock, cl)
+        thread.start()
+        thread.completesBefore(timeout)
+    }
+
+    void onThreadStart(TestThread thread) {
+        lock.lock()
+        try {
+            threads << thread
+            threadsChanged.signalAll()
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    void onThreadComplete(TestThread thread, Throwable failure) {
+        lock.lock()
+        try {
+            threads.remove(thread)
+            if (failure) {
+                failures << failure
+            }
+            threadsChanged.signalAll()
+        } finally {
+            lock.unlock()
+        }
+    }
+}
+
+class TestThread extends Thread {
+    private static final Logger LOG = LoggerFactory.getLogger(TestThread.class)
+    private final ConcurrentSpecification owner
+    private final Runnable action
+    private final Lock lock
+    private final Condition stateChanged
+    private boolean complete
+
+    TestThread(ConcurrentSpecification owner, Lock lock, Runnable action) {
+        this.owner = owner
+        this.action = action
+        this.lock = lock
+        this.stateChanged = lock.newCondition()
+    }
+
+    @Override
+    void start() {
+        LOG.info("$this started.")
+
+        lock.lock()
+        try {
+            owner.onThreadStart(this)
+            stateChanged.signalAll()
+        } finally {
+            lock.unlock()
+        }
+
+        super.start()
+    }
+
+    void running() {
+        lock.lock()
+        try {
+            if (complete) {
+                throw new IllegalStateException("$this should still be running, but is not.")
+            }
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    void completesBefore(Date timeout) {
+        lock.lock()
+        try {
+            LOG.info("Waiting for $this to complete.")
+            while (!complete) {
+                if (!stateChanged.awaitUntil(timeout)) {
+                    throw new IllegalStateException("Timeout waiting for $this to complete.")
+                }
+            }
+            LOG.info("$this completed.")
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    @Override
+    void run() {
+        Throwable failure = null
+        try {
+            action.run()
+        } catch (Throwable t) {
+            failure = t
+        }
+
+        lock.lock()
+        try {
+            complete = true
+            stateChanged.signalAll()
+            owner.onThreadComplete(this, failure)
+            LOG.info("$this completed.")
+        } finally {
+            lock.unlock()
+        }
+    }
+}
+
+/**
+ * Some potentially long running operation.
+ */
+interface LongRunningAction {
+    /**
+     * Blocks until this action has completed. Asserts that the action completes in a 'short' time. Rethrows any exception from the action.
+     */
+    void completed()
+
+    /**
+     * Blocks until this action has completed. Asserts that the action completes within the specified time. Rethrows any exception from the action.
+     */
+    void completesWithin(long maxWaitValue, TimeUnit maxWaitUnits)
+
+    /**
+     * Blocks until this action has completed. Asserts that the action completes before the given time. Rethrows any exception from the action.
+     */
+    void completesBefore(Date timeout)
+}
+
+/**
+ * An action which runs at some point in the future. A {@code DeferredAction} must be activated before it can run, by calling {@link DeferredAction#activate(Closure)}.
+ */
+interface DeferredAction extends LongRunningAction {
+    /**
+     * Registers that the target sync point has been reached, and this action is ready to execute. This method does not block.
+     *
+     * This action is started once this method has been called, and one of the following have been executed:
+     *
+     * <ul>
+     * <li>{@link TestParticipant#waitsFor(LongRunningAction)}</li>
+     * <li>{@link TestParticipant#doesNotWaitFor(LongRunningAction)}</li>
+     * <li>{@link ConcurrentSpecification#finished}</li>
+     * </ul>
+     */
+    void activate(Closure action)
+}
+
+interface TestParticipant extends LongRunningAction {
+    /**
+     * Asserts that this test participant is running.
+     */
+    void running()
+    /**
+     * Asserts that this test participant blocks until the given actions complete. If any action is a {@link DeferredAction}, the action is started.
+     *
+     * This method blocks until both this participant and the actions have completed, and asserts that everything completes in a 'short' time.
+     */
+    void waitsFor(LongRunningAction... targets)
+
+    /**
+     * Asserts that this test participant blocks until the given action completes.
+     *
+     * This method blocks until both this participant and the action have completed, and asserts that everything completes in a 'short' time.
+     */
+    void waitsFor(Closure action)
+
+    /**
+     * Asserts that this test participant does not block while the given actions are executing. If any action is a {@link DeferredAction}, it must be activated first.
+     *
+     * This method blocks until this participant has completed, and asserts that it completes in a 'short' time.
+     */
+    void doesNotWaitFor(LongRunningAction... targets)
+}
+
+abstract class AbstractAction implements LongRunningAction {
+    void completed() {
+        Date expiry = ConcurrentSpecification.shortTimeout()
+        completesBefore(expiry)
+    }
+
+    void completesWithin(long maxWaitValue, TimeUnit maxWaitUnits) {
+        Date expiry = new Date(System.currentTimeMillis() + maxWaitUnits.toMillis(maxWaitValue))
+        completesBefore(expiry + 500)
+    }
+
+    abstract void completesBefore(Date timeout)
+}
+
+class DeferredActionImpl extends AbstractAction implements DeferredAction {
+    private static final Logger LOG = LoggerFactory.getLogger(DeferredActionImpl.class)
+    private final ConcurrentSpecification owner
+    private final Lock lock
+    private final Condition stateChange = lock.newCondition()
+    private Closure action
+    private boolean activated
+    private boolean complete
+
+    DeferredActionImpl(ConcurrentSpecification owner, Lock lock) {
+        this.owner = owner
+        this.lock = lock
+    }
+
+    void activated() {
+        lock.lock()
+        try {
+            if (!activated) {
+                throw new IllegalStateException("Action has not been activated.")
+            }
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    @Override
+    void completesBefore(Date timeout) {
+        activated()
+        run(timeout)
+    }
+
+    void run(Date timeout) {
+        lock.lock()
+        try {
+            if (!activated || complete) {
+                return
+            }
+        } finally {
+            lock.unlock()
+        }
+
+        LOG.info("Running deferred action")
+        owner.run(action, timeout)
+        LOG.info("Deferred action complete")
+
+        lock.lock()
+        try {
+            complete = true
+            action = null
+            stateChange.signalAll()
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    void waitUntilActivated(Date timeout) {
+        lock.lock()
+        try {
+            while (!activated) {
+                if (!stateChange.awaitUntil(timeout)) {
+                    throw new IllegalStateException("Timeout waiting for action to be activated.")
+                }
+            }
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    void activate(Closure action) {
+        lock.lock()
+        try {
+            if (activated) {
+                throw new IllegalStateException("This action has already been activated.")
+            }
+
+            activated = true
+            this.action = action
+            stateChange.signalAll()
+        } finally {
+            lock.unlock()
+        }
+    }
+}
+
+abstract class AbstractTestParticipant extends AbstractAction implements TestParticipant {
+    private final ConcurrentSpecification owner
+
+    AbstractTestParticipant(ConcurrentSpecification owner) {
+        this.owner = owner
+    }
+
+    void doesNotWaitFor(LongRunningAction... targets) {
+        targets*.activated()
+        completed()
+    }
+
+    void waitsFor(LongRunningAction... targets) {
+        targets*.activated()
+        Thread.sleep(500)
+        running()
+        targets*.completed()
+        completed()
+    }
+
+    void waitsFor(Closure action) {
+        Thread.sleep(500)
+        running()
+        owner.run(action, owner.shortTimeout())
+        completed()
+    }
+}
+
+class TestParticipantImpl extends AbstractTestParticipant {
+    private final TestThread thread
+
+    TestParticipantImpl(ConcurrentSpecification owner, TestThread thread) {
+        super(owner)
+        this.thread = thread
+    }
+
+    @Override
+    void completesBefore(Date timeout) {
+        thread.completesBefore(timeout)
+    }
+
+    void running() {
+        thread.running()
+    }
+}
+
+class CompositeTestParticipant extends AbstractTestParticipant {
+    private final List<TestParticipant> participants
+    private final Lock lock
+
+    CompositeTestParticipant(ConcurrentSpecification owner, Lock lock, List<TestParticipant> participants) {
+        super(owner)
+        this.participants = participants
+        this.lock = lock
+    }
+
+    void running() {
+        lock.lock()
+        try {
+            participants*.running()
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    @Override
+    void completesBefore(Date timeout) {
+        lock.lock()
+        try {
+            participants*.completesBefore(timeout)
+        } finally {
+            lock.unlock()
+        }
+    }
+}
diff --git a/subprojects/core/src/test/groovy/org/gradle/util/ConcurrentSpecificationTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/ConcurrentSpecificationTest.groovy
new file mode 100644
index 0000000..44feb4e
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/util/ConcurrentSpecificationTest.groovy
@@ -0,0 +1,211 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.util
+
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.SynchronousQueue
+import java.util.concurrent.TimeUnit
+import spock.lang.Ignore
+
+class ConcurrentSpecificationTest extends ConcurrentSpecification {
+    def canCheckThatMethodCallWaitsUntilAsyncActionIsComplete() {
+        SomeAsyncWorker worker = Mock()
+        SomeSyncClass target = new SomeSyncClass(worker: worker)
+
+        def notifyListener = later()
+
+        when:
+        def result
+        def action = start {
+            result = target.doWork('value')
+        }
+
+        then:
+        action.waitsFor(notifyListener)
+        1 * worker.doLater(!null) >> { args -> notifyListener.activate { args[0].call('result') } }
+
+        when:
+        finished()
+
+        then:
+        result == 'result'
+    }
+
+    def canCheckThatMethodCallDoesNotWaitUntilAsyncActionIsComplete() {
+        SomeAsyncWorker worker = Mock()
+        Closure handler = Mock()
+        SomeSyncClass target = new SomeSyncClass(worker: worker)
+
+        def notifyListener = later()
+
+        when:
+        def action = start {
+            target.startWork(handler)
+        }
+
+        then:
+        action.doesNotWaitFor(notifyListener)
+        1 * worker.doLater(!null) >> { args -> notifyListener.activate { args[0].call('result') } }
+
+        when:
+        finished()
+
+        then:
+        1 * handler.call('[result]')
+    }
+
+    def canHaveMultipleAsyncActions() {
+        SomeAsyncWorker worker = Mock()
+        Closure handler = Mock()
+        SomeSyncClass target = new SomeSyncClass(worker: worker)
+
+        Closure listener
+        def notifyListener = later()
+        def notifyListenerAgain = later()
+
+        when:
+        def action = start {
+            target.startWork(handler)
+            target.startWork(handler)
+        }
+
+        then:
+        action.doesNotWaitFor(notifyListener, notifyListenerAgain)
+        2 * worker.doLater(!null) >> { args ->
+            if (!listener) {
+                listener = args[0];
+                notifyListener.activate { args[0].call('result1') }
+            } else {
+                notifyListenerAgain.activate { args[0].call('result2') }
+            }
+        }
+
+        when:
+        notifyListener.completed()
+
+        then:
+        1 * handler.call('[result1]')
+
+        when:
+        finished()
+
+        then:
+        1 * handler.call('[result2]')
+    }
+
+    def canCheckThatMethodCallsBlockUntilAnotherMethodIsCalled() {
+        SomeConditionClass condition = new SomeConditionClass()
+
+        when:
+        def action1 = start {
+            condition.waitUntilComplete()
+        }
+        def action2 = start {
+            condition.waitUntilComplete()
+        }
+
+        then:
+        all(action1, action2).waitsFor {
+            condition.complete()
+        }
+    }
+
+    def canCheckThatMethodCompletesInSpecifiedTime() {
+        SomeConditionClass condition = new SomeConditionClass()
+
+        when:
+        def timedOut = false
+        def action = start {
+            timedOut = condition.waitUntilComplete(200)
+        }
+
+        then:
+        action.completesWithin(200, TimeUnit.MILLISECONDS)
+
+        when:
+        finished()
+
+        then:
+        timedOut
+    }
+
+    def finishRethrowsExceptionThrownByTestThread() {
+        RuntimeException failure = new RuntimeException()
+
+        when:
+        start {
+            failure.fillInStackTrace()
+            throw failure
+        }
+        finished()
+
+        then:
+        RuntimeException e = thrown()
+        e.is(failure)
+    }
+
+    @Ignore
+    def completeRethrowsExceptionThrownByTestThread() {
+        RuntimeException failure = new RuntimeException()
+
+        when:
+        def action = start {
+            failure.fillInStackTrace()
+            throw failure
+        }
+        action.completed()
+
+        then:
+        RuntimeException e = thrown()
+        e.is(failure)
+    }
+}
+
+interface SomeAsyncWorker {
+    void doLater(Closure cl)
+}
+
+class SomeSyncClass {
+    SomeAsyncWorker worker
+
+    def doWork(Object value) {
+        SynchronousQueue queue = new SynchronousQueue()
+        worker.doLater { arg ->
+            queue.put(arg)
+        }
+        return queue.take()
+    }
+
+    def startWork(Closure handler) {
+        worker.doLater { result -> handler.call("[$result]" as String) }
+    }
+}
+
+class SomeConditionClass {
+    final CountDownLatch latch = new CountDownLatch(1)
+
+    void waitUntilComplete() {
+        latch.await()
+    }
+
+    boolean waitUntilComplete(int maxWaitMillis) {
+        return !latch.await(maxWaitMillis, TimeUnit.MILLISECONDS)
+    }
+
+    void complete() {
+        latch.countDown()
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/ConfigureUtilTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/ConfigureUtilTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/ConfigureUtilTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/ConfigureUtilTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/DiffUtilTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/DiffUtilTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/DiffUtilTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/DiffUtilTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/DisconnectableInputStreamTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/DisconnectableInputStreamTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/DisconnectableInputStreamTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/DisconnectableInputStreamTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/FilteringClassLoaderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/FilteringClassLoaderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/FilteringClassLoaderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/FilteringClassLoaderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/GUtilTest.java b/subprojects/core/src/test/groovy/org/gradle/util/GUtilTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/GUtilTest.java
rename to subprojects/core/src/test/groovy/org/gradle/util/GUtilTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/util/GradleVersionTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/GradleVersionTest.groovy
new file mode 100644
index 0000000..8b90542
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/util/GradleVersionTest.groovy
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util
+
+import org.codehaus.groovy.runtime.InvokerHelper
+import static org.junit.Assert.*
+
+import org.apache.tools.ant.Main
+import org.apache.ivy.Ivy
+import spock.lang.Specification;
+
+/**
+ * @author Hans Dockter
+ */
+class GradleVersionTest extends Specification {
+    final GradleVersion version = new GradleVersion()
+
+    def equalsAndHashCode() {
+        expect:
+        Matchers.strictlyEquals(new GradleVersion('0.9'), new GradleVersion('0.9'))
+        new GradleVersion('0.9') != new GradleVersion('1.0')
+    }
+
+    def canConstructSnapshotVersion() {
+        expect:
+        new GradleVersion('0.9-20101220110000+1100').snapshot
+        new GradleVersion('0.9-20101220110000-0800').snapshot
+        !new GradleVersion('0.9-rc-1').snapshot
+    }
+
+    def canCompareMajorVersions() {
+        expect:
+        new GradleVersion(a) > new GradleVersion(b)
+        new GradleVersion(b) < new GradleVersion(a)
+        new GradleVersion(a) == new GradleVersion(a)
+        new GradleVersion(b) == new GradleVersion(b)
+
+        where:
+        a | b
+        '0.9' | '0.8'
+        '1.0' | '0.10'
+        '10.0' | '2.1'
+        '2.5' | '2.4'
+    }
+
+    def canComparePointVersions() {
+        expect:
+        new GradleVersion(a) > new GradleVersion(b)
+        new GradleVersion(b) < new GradleVersion(a)
+        new GradleVersion(a) == new GradleVersion(a)
+        new GradleVersion(b) == new GradleVersion(b)
+
+        where:
+        a | b
+        '0.9.2' | '0.9.1'
+        '0.10.1' | '0.9.2'
+    }
+
+    def canComparePointVersionAndMajorVersions() {
+        expect:
+        new GradleVersion(a) > new GradleVersion(b)
+        new GradleVersion(b) < new GradleVersion(a)
+        new GradleVersion(a) == new GradleVersion(a)
+        new GradleVersion(b) == new GradleVersion(b)
+
+        where:
+        a | b
+        '0.9.1' | '0.9'
+        '0.10' | '0.9.1'
+    }
+
+    def canComparePreviewsMilestonesAndRCVersions() {
+        expect:
+        new GradleVersion(a) > new GradleVersion(b)
+        new GradleVersion(b) < new GradleVersion(a)
+        new GradleVersion(a) == new GradleVersion(a)
+        new GradleVersion(b) == new GradleVersion(b)
+
+        where:
+        a | b
+        '1.0-milestone-2' | '1.0-milestone-1'
+        '1.0-preview-2' | '1.0-preview-1'
+        '1.0-rc-2' | '1.0-rc-1'
+        '1.0-preview-1' | '1.0-milestone-7'
+        '1.0-rc-7' | '1.0-rc-1'
+        '1.0' | '1.0-rc-7'
+    }
+
+    def canCompareSnapshotVersions() {
+        expect:
+        new GradleVersion(a) > new GradleVersion(b)
+        new GradleVersion(b) < new GradleVersion(a)
+        new GradleVersion(a) == new GradleVersion(a)
+        new GradleVersion(b) == new GradleVersion(b)
+
+        where:
+        a | b
+        '0.9-20101220110000+1100' | '0.9-20101220100000+1100'
+        '0.9-20101220110000+1000' | '0.9-20101220100000+1100'
+        '0.9-20101220110000-0100' | '0.9-20101220100000+0000'
+        '0.9' | '0.9-20101220100000+1000'
+    }
+
+    def defaultValuesForGradleVersion() {
+        expect:
+        version.version != null
+        version.buildTime != null
+    }
+
+    def prettyPrint() {
+        String expectedText = """
+------------------------------------------------------------
+Gradle $version.version
+------------------------------------------------------------
+
+Gradle build time: $version.buildTime
+Groovy: $InvokerHelper.version
+Ant: $Main.antVersion
+Ivy: ${Ivy.ivyVersion}
+JVM: ${Jvm.current()}
+OS: ${OperatingSystem.current()}
+"""
+        expect:
+        version.prettyPrint() == expectedText
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/HelperUtil.groovy b/subprojects/core/src/test/groovy/org/gradle/util/HelperUtil.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/HelperUtil.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/HelperUtil.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/JUnit4GroovyMockery.java b/subprojects/core/src/test/groovy/org/gradle/util/JUnit4GroovyMockery.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/JUnit4GroovyMockery.java
rename to subprojects/core/src/test/groovy/org/gradle/util/JUnit4GroovyMockery.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/JavaMethodTest.java b/subprojects/core/src/test/groovy/org/gradle/util/JavaMethodTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/JavaMethodTest.java
rename to subprojects/core/src/test/groovy/org/gradle/util/JavaMethodTest.java
diff --git a/subprojects/core/src/test/groovy/org/gradle/util/JvmTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/JvmTest.groovy
new file mode 100644
index 0000000..57af7b1
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/util/JvmTest.groovy
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util
+
+import spock.lang.Specification
+import org.junit.Rule
+
+class JvmTest extends Specification {
+    @Rule public final TemporaryFolder tmpDir = new TemporaryFolder()
+    @Rule public final SetSystemProperties sysProp = new SetSystemProperties()
+    final OperatingSystem os = Mock()
+
+    def usesSystemPropertyToDetermineIfCompatibleWithJava5() {
+        System.properties['java.version'] = '1.5'
+
+        expect:
+        def jvm = Jvm.current()
+        jvm.java5Compatible
+        !jvm.java6Compatible
+    }
+
+    def usesSystemPropertyToDetermineIfCompatibleWithJava6() {
+        System.properties['java.version'] = '1.6'
+
+        expect:
+        def jvm = Jvm.current()
+        jvm.java5Compatible
+        jvm.java6Compatible
+    }
+
+    def looksForToolsJarInJavaHomeDirectory() {
+        TestFile javaHomeDir = tmpDir.createDir('jdk')
+        TestFile toolsJar = javaHomeDir.file('lib/tools.jar').createFile()
+        System.properties['java.home'] = javaHomeDir.absolutePath
+
+        expect:
+        def jvm = Jvm.current()
+        jvm.javaHome == javaHomeDir
+        jvm.toolsJar == toolsJar
+    }
+
+    def looksForToolsJarInParentOfJavaHomeDirectory() {
+        TestFile javaHomeDir = tmpDir.createDir('jdk')
+        TestFile toolsJar = javaHomeDir.file('lib/tools.jar').createFile()
+        System.properties['java.home'] = javaHomeDir.file('jre').absolutePath
+
+        expect:
+        def jvm = Jvm.current()
+        jvm.javaHome == javaHomeDir
+        jvm.toolsJar == toolsJar
+    }
+
+    def looksForToolsJarInSiblingOfJavaHomeDirectoryOnWindows() {
+        TestFile javaHomeDir = tmpDir.createDir('jdk1.6.0')
+        TestFile toolsJar = javaHomeDir.file('lib/tools.jar').createFile()
+        System.properties['java.home'] = tmpDir.createDir('jre6').absolutePath
+        System.properties['java.version'] = '1.6.0'
+        _ * os.windows >> true
+
+        expect:
+        def jvm = new Jvm(os)
+        jvm.javaHome == javaHomeDir
+        jvm.toolsJar == toolsJar
+    }
+
+    def usesSystemPropertyToLocateJavaHomeWhenToolsJarNotFound() {
+        TestFile javaHomeDir = tmpDir.createDir('jdk')
+        System.properties['java.home'] = javaHomeDir.absolutePath
+
+        expect:
+        def jvm = Jvm.current()
+        jvm.javaHome == javaHomeDir
+        jvm.toolsJar == null
+    }
+
+    def usesSystemPropertyToDetermineIfAppleJvm() {
+
+        when:
+        System.properties['java.vm.vendor'] = 'Apple Inc.'
+        def jvm = Jvm.current()
+
+        then:
+        jvm.class == Jvm.AppleJvm
+
+        when:
+        System.properties['java.vm.vendor'] = 'Sun'
+        jvm = Jvm.current()
+
+        then:
+        jvm.class == Jvm
+    }
+
+    def appleJvmFiltersEnvironmentVariables() {
+        Map<String, String> env = ['APP_NAME_1234': 'App', 'JAVA_MAIN_CLASS_1234': 'MainClass', 'OTHER': 'value']
+
+        expect:
+        def jvm = new Jvm.AppleJvm(os)
+        jvm.getInheritableEnvironmentVariables(env) == ['OTHER': 'value']
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/LineBufferingOutputStreamTest.java b/subprojects/core/src/test/groovy/org/gradle/util/LineBufferingOutputStreamTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/LineBufferingOutputStreamTest.java
rename to subprojects/core/src/test/groovy/org/gradle/util/LineBufferingOutputStreamTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/LinePerThreadBufferingOutputStreamTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/LinePerThreadBufferingOutputStreamTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/LinePerThreadBufferingOutputStreamTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/LinePerThreadBufferingOutputStreamTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/LongIdGeneratorTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/LongIdGeneratorTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/LongIdGeneratorTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/LongIdGeneratorTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/Matchers.java b/subprojects/core/src/test/groovy/org/gradle/util/Matchers.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/Matchers.java
rename to subprojects/core/src/test/groovy/org/gradle/util/Matchers.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/MultiParentClassLoaderTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/MultiParentClassLoaderTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/MultiParentClassLoaderTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/MultiParentClassLoaderTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/MultithreadedTestCase.java b/subprojects/core/src/test/groovy/org/gradle/util/MultithreadedTestCase.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/MultithreadedTestCase.java
rename to subprojects/core/src/test/groovy/org/gradle/util/MultithreadedTestCase.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/NameMatcherTest.java b/subprojects/core/src/test/groovy/org/gradle/util/NameMatcherTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/NameMatcherTest.java
rename to subprojects/core/src/test/groovy/org/gradle/util/NameMatcherTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/ObservableUrlClassLoaderTest.java b/subprojects/core/src/test/groovy/org/gradle/util/ObservableUrlClassLoaderTest.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/ObservableUrlClassLoaderTest.java
rename to subprojects/core/src/test/groovy/org/gradle/util/ObservableUrlClassLoaderTest.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/PathTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/PathTest.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/PathTest.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/PathTest.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/RedirectStdOutAndErr.java b/subprojects/core/src/test/groovy/org/gradle/util/RedirectStdOutAndErr.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/RedirectStdOutAndErr.java
rename to subprojects/core/src/test/groovy/org/gradle/util/RedirectStdOutAndErr.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/ReflectionEqualsMatcher.java b/subprojects/core/src/test/groovy/org/gradle/util/ReflectionEqualsMatcher.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/ReflectionEqualsMatcher.java
rename to subprojects/core/src/test/groovy/org/gradle/util/ReflectionEqualsMatcher.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/Resources.java b/subprojects/core/src/test/groovy/org/gradle/util/Resources.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/Resources.java
rename to subprojects/core/src/test/groovy/org/gradle/util/Resources.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/SetSystemProperties.java b/subprojects/core/src/test/groovy/org/gradle/util/SetSystemProperties.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/SetSystemProperties.java
rename to subprojects/core/src/test/groovy/org/gradle/util/SetSystemProperties.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TemporaryFolder.java b/subprojects/core/src/test/groovy/org/gradle/util/TemporaryFolder.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/TemporaryFolder.java
rename to subprojects/core/src/test/groovy/org/gradle/util/TemporaryFolder.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestDirHelper.groovy b/subprojects/core/src/test/groovy/org/gradle/util/TestDirHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/TestDirHelper.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/TestDirHelper.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/util/TestFile.java b/subprojects/core/src/test/groovy/org/gradle/util/TestFile.java
new file mode 100644
index 0000000..8f67505
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/util/TestFile.java
@@ -0,0 +1,446 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util;
+
+import groovy.lang.Closure;
+import org.apache.commons.io.FileUtils;
+import org.apache.tools.ant.taskdefs.Tar;
+import org.apache.tools.ant.taskdefs.Zip;
+import org.gradle.api.UncheckedIOException;
+import org.gradle.api.file.DeleteAction;
+import org.gradle.api.internal.file.IdentityFileResolver;
+import org.gradle.api.internal.file.copy.DeleteActionImpl;
+import org.hamcrest.Matcher;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.*;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import static org.junit.Assert.*;
+
+public class TestFile extends File implements TestFileContext {
+    private boolean useNativeTools;
+
+    public TestFile(File file, Object... path) {
+        super(join(file, path).getAbsolutePath());
+    }
+
+    public TestFile(URI uri) {
+        this(new File(uri));
+    }
+
+    public TestFile(String path) {
+        this(new File(path));
+    }
+
+    public TestFile(URL url) {
+        this(toUri(url));
+    }
+
+    public TestFile getTestDir() {
+        return this;
+    }
+
+    public TestFile usingNativeTools() {
+        useNativeTools = true;
+        return this;
+    }
+
+    private static URI toUri(URL url) {
+        try {
+            return url.toURI();
+        } catch (URISyntaxException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    private static File join(File file, Object[] path) {
+        File current = file.getAbsoluteFile();
+        for (Object p : path) {
+            current = new File(current, p.toString());
+        }
+        return GFileUtils.canonicalise(current);
+    }
+
+    public TestFile file(Object... path) {
+        return new TestFile(this, path);
+    }
+
+    public List<TestFile> files(Object... paths) {
+        List<TestFile> files = new ArrayList<TestFile>();
+        for (Object path : paths) {
+            files.add(file(path));
+        }
+        return files;
+    }
+
+    public TestFile writelns(String... lines) {
+        return writelns(Arrays.asList(lines));
+    }
+
+    public TestFile write(Object content) {
+        try {
+            FileUtils.writeStringToFile(this, content.toString());
+        } catch (IOException e) {
+            throw new UncheckedIOException(String.format("Could not write to test file '%s'", this), e);
+        }
+        return this;
+    }
+
+    public TestFile leftShift(Object content) {
+        getParentFile().mkdirs();
+        return write(content);
+    }
+
+    public String getText() {
+        assertIsFile();
+        try {
+            return FileUtils.readFileToString(this);
+        } catch (IOException e) {
+            throw new UncheckedIOException(String.format("Could not read from test file '%s'", this), e);
+        }
+    }
+
+    public Map<String, String> getProperties() {
+        assertIsFile();
+        Properties properties = new Properties();
+        try {
+            FileInputStream inStream = new FileInputStream(this);
+            try {
+                properties.load(inStream);
+            } finally {
+                inStream.close();
+            }
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+        Map<String, String> map = new HashMap<String, String>();
+        for (Object key : properties.keySet()) {
+            map.put(key.toString(), properties.getProperty(key.toString()));
+        }
+        return map;
+    }
+
+    public Manifest getManifest() {
+        assertIsFile();
+        try {
+            JarFile jarFile = new JarFile(this);
+            try {
+                return jarFile.getManifest();
+            } finally {
+                jarFile.close();
+            }
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public List<String> linesThat(Matcher<? super String> matcher) {
+        try {
+            BufferedReader reader = new BufferedReader(new FileReader(this));
+            try {
+                List<String> lines = new ArrayList<String>();
+                String line;
+                while ((line = reader.readLine()) != null) {
+                    if (matcher.matches(line)) {
+                        lines.add(line);
+                    }
+                }
+                return lines;
+            } finally {
+                reader.close();
+            }
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public void unzipTo(File target) {
+        assertIsFile();
+        new TestFileHelper(this).unzipTo(target, useNativeTools);
+    }
+
+    public void untarTo(File target) {
+        assertIsFile();
+
+        new TestFileHelper(this).untarTo(target, useNativeTools);
+    }
+
+    public void copyTo(File target) {
+        if (isDirectory()) {
+            try {
+                FileUtils.copyDirectory(this, target);
+            } catch (IOException e) {
+                throw new UncheckedIOException(String.format("Could not copy test directory '%s' to '%s'", this,
+                        target), e);
+            }
+        } else {
+            try {
+                FileUtils.copyFile(this, target);
+            } catch (IOException e) {
+                throw new UncheckedIOException(String.format("Could not copy test file '%s' to '%s'", this, target), e);
+            }
+        }
+    }
+
+    public void copyFrom(File target) {
+        new TestFile(target).copyTo(this);
+    }
+    
+    public void copyFrom(URL resource) {
+        try {
+            FileUtils.copyURLToFile(resource, this);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public TestFile linkTo(File target) {
+        getParentFile().createDir();
+        int retval = PosixUtil.current().symlink(target.getAbsolutePath(), getAbsolutePath());
+        if (retval != 0) {
+            throw new UncheckedIOException(String.format("Could not create link from '%s' to '%s'", target, this));
+        }
+        return this;
+    }
+
+    public TestFile touch() {
+        try {
+            FileUtils.touch(this);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+        assertIsFile();
+        return this;
+    }
+
+    /**
+     * Creates a directory structure specified by the given closure.
+     * <pre>
+     * dir.create {
+     *     subdir1 {
+     *        file 'somefile.txt'
+     *     }
+     *     subdir2 { nested { file 'someFile' } }
+     * }
+     * </pre>
+     */
+    public TestFile create(Closure structure) {
+        assertTrue(isDirectory() || mkdirs());
+        new TestDirHelper(this).apply(structure);
+        return this;
+    }
+
+    @Override
+    public TestFile getParentFile() {
+        return new TestFile(super.getParentFile());
+    }
+
+    @Override
+    public String toString() {
+        return getPath();
+    }
+
+    public TestFile writelns(Iterable<String> lines) {
+        Formatter formatter = new Formatter();
+        for (String line : lines) {
+            formatter.format("%s%n", line);
+        }
+        return write(formatter);
+    }
+
+    public TestFile assertExists() {
+        assertTrue(String.format("%s does not exist", this), exists());
+        return this;
+    }
+
+    public TestFile assertIsFile() {
+        assertTrue(String.format("%s is not a file", this), isFile());
+        return this;
+    }
+
+    public TestFile assertIsDir() {
+        assertTrue(String.format("%s is not a directory", this), isDirectory());
+        return this;
+    }
+
+    public TestFile assertDoesNotExist() {
+        assertFalse(String.format("%s should not exist", this), exists());
+        return this;
+    }
+
+    public TestFile assertContents(Matcher<String> matcher) {
+        assertThat(getText(), matcher);
+        return this;
+    }
+
+    public TestFile assertIsCopyOf(TestFile other) {
+        assertIsFile();
+        other.assertIsFile();
+        assertTrue(Arrays.equals(HashUtil.createHash(this), HashUtil.createHash(other)));
+        return this;
+    }
+
+    public TestFile assertPermissions(Matcher<String> matcher) {
+        if (OperatingSystem.current().isUnix()) {
+            assertThat(String.format("mismatched permissions for '%s'", this), getPermissions(), matcher);
+        }
+        return this;
+    }
+
+    private String getPermissions() {
+        assertExists();
+        return new TestFileHelper(this).getPermissions();
+    }
+
+    public TestFile setPermissions(String permissions) {
+        assertExists();
+        new TestFileHelper(this).setPermissions(permissions);
+        return this;
+    }
+
+    /**
+     * Asserts that this file contains exactly the given set of descendants.
+     */
+    public TestFile assertHasDescendants(String... descendants) {
+        Set<String> actual = new TreeSet<String>();
+        assertIsDir();
+        visit(actual, "", this);
+        Set<String> expected = new TreeSet<String>(Arrays.asList(descendants));
+
+        Set<String> extras = new TreeSet<String>(actual);
+        extras.removeAll(expected);
+        Set<String> missing = new TreeSet<String>(expected);
+        missing.removeAll(actual);
+
+        assertEquals(String.format("Extra files: %s, missing files: %s, expected: %s", extras, missing, expected), expected, actual);
+
+        return this;
+    }
+
+    private void visit(Set<String> names, String prefix, File file) {
+        for (File child : file.listFiles()) {
+            if (child.isFile()) {
+                names.add(prefix + child.getName());
+            } else if (child.isDirectory()) {
+                visit(names, prefix + child.getName() + "/", child);
+            }
+        }
+    }
+
+    public boolean isSelfOrDescendent(File file) {
+        if (file.getAbsolutePath().equals(getAbsolutePath())) {
+            return true;
+        }
+        return file.getAbsolutePath().startsWith(getAbsolutePath() + File.separatorChar);
+    }
+
+    public TestFile createDir() {
+        assertTrue(isDirectory() || mkdirs());
+        return this;
+    }
+
+    public TestFile deleteDir() {
+        DeleteAction delete = new DeleteActionImpl(new IdentityFileResolver());
+        delete.delete(this);
+        return this;
+    }
+
+    /**
+     * Attempts to delete this directory, ignoring failures to do so.
+     * @return this
+     */
+    public TestFile maybeDeleteDir() {
+        try {
+            deleteDir();
+        } catch (UncheckedIOException e) {
+            // Ignore
+        }
+        return this;
+    }
+
+    public TestFile createFile() {
+        new TestFile(getParentFile()).createDir();
+        try {
+            assertTrue(isFile() || createNewFile());
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+        return this;
+    }
+
+    public TestFile zipTo(TestFile zipFile) {
+        Zip zip = new Zip();
+        zip.setBasedir(this);
+        zip.setDestFile(zipFile);
+        AntUtil.execute(zip);
+        return this;
+    }
+
+    public TestFile tarTo(TestFile zipFile) {
+        Tar tar = new Tar();
+        tar.setBasedir(this);
+        tar.setDestFile(zipFile);
+        AntUtil.execute(tar);
+        return this;
+    }
+
+    public Snapshot snapshot() {
+        assertIsFile();
+        return new Snapshot();
+    }
+
+    public void assertHasChangedSince(Snapshot snapshot) {
+        Snapshot now = snapshot();
+        assertTrue(now.modTime != snapshot.modTime || !Arrays.equals(now.hash, snapshot.hash));
+    }
+
+    public void assertHasNotChangedSince(Snapshot snapshot) {
+        Snapshot now = snapshot();
+        assertEquals(String.format("last modified time of %s has changed", this), snapshot.modTime, now.modTime);
+        assertArrayEquals(String.format("contents of %s has changed", this), snapshot.hash, now.hash);
+    }
+
+    public void writeProperties(Map<?, ?> properties) {
+        Properties props = new Properties();
+        props.putAll(properties);
+        try {
+            FileOutputStream stream = new FileOutputStream(this);
+            try {
+                props.store(stream, "comment");
+            } finally {
+                stream.close();
+            }
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    public class Snapshot {
+        private final long modTime;
+        private final byte[] hash;
+
+        public Snapshot() {
+            modTime = lastModified();
+            hash = HashUtil.createHash(TestFile.this);
+        }
+    }
+}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFileContext.java b/subprojects/core/src/test/groovy/org/gradle/util/TestFileContext.java
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFileContext.java
rename to subprojects/core/src/test/groovy/org/gradle/util/TestFileContext.java
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFileHelper.groovy b/subprojects/core/src/test/groovy/org/gradle/util/TestFileHelper.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFileHelper.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/TestFileHelper.groovy
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestTask.groovy b/subprojects/core/src/test/groovy/org/gradle/util/TestTask.groovy
similarity index 100%
rename from subprojects/gradle-core/src/test/groovy/org/gradle/util/TestTask.groovy
rename to subprojects/core/src/test/groovy/org/gradle/util/TestTask.groovy
diff --git a/subprojects/core/src/test/groovy/org/gradle/util/TextUtilTest.groovy b/subprojects/core/src/test/groovy/org/gradle/util/TextUtilTest.groovy
new file mode 100644
index 0000000..e6734ee
--- /dev/null
+++ b/subprojects/core/src/test/groovy/org/gradle/util/TextUtilTest.groovy
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.util
+
+import spock.lang.Specification
+
+class TextUtilTest extends Specification {
+    private static String sep = TextUtil.LINE_SEPARATOR
+
+    def "toNativeLineSeparators() converts all line separators to native ones"() {
+        expect:
+        TextUtil.toNativeLineSeparators(original) == converted
+
+        where:
+        original                          | converted
+        "one\rtwo\nthree\r\nfour\n\rfive" | "one${sep}two${sep}three${sep}four${sep}${sep}five"
+    }
+}
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.properties b/subprojects/core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.properties
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.properties
rename to subprojects/core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.properties
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.xml b/subprojects/core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.xml
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.xml
rename to subprojects/core/src/test/resources/org/gradle/api/internal/tasks/generator/defaultResource.xml
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedClasspathFile.txt b/subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedClasspathFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedClasspathFile.txt
rename to subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedClasspathFile.txt
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedEmptyProjectFile.txt b/subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedEmptyProjectFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedEmptyProjectFile.txt
rename to subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedEmptyProjectFile.txt
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomBuilder.txt b/subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomBuilder.txt
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomBuilder.txt
rename to subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomBuilder.txt
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomNature.txt b/subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomNature.txt
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomNature.txt
rename to subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedProjectFileWithCustomNature.txt
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedWtpFile.txt b/subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedWtpFile.txt
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedWtpFile.txt
rename to subprojects/core/src/test/resources/org/gradle/api/tasks/ide/eclipse/expectedWtpFile.txt
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/testfixtures/ProjectBuilderTest.gradle b/subprojects/core/src/test/resources/org/gradle/testfixtures/ProjectBuilderTest.gradle
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/testfixtures/ProjectBuilderTest.gradle
rename to subprojects/core/src/test/resources/org/gradle/testfixtures/ProjectBuilderTest.gradle
diff --git a/subprojects/gradle-core/src/test/resources/org/gradle/util/ClassLoaderTest.txt b/subprojects/core/src/test/resources/org/gradle/util/ClassLoaderTest.txt
similarity index 100%
rename from subprojects/gradle-core/src/test/resources/org/gradle/util/ClassLoaderTest.txt
rename to subprojects/core/src/test/resources/org/gradle/util/ClassLoaderTest.txt
diff --git a/subprojects/docs/docs.gradle b/subprojects/docs/docs.gradle
new file mode 100644
index 0000000..a4a86d9
--- /dev/null
+++ b/subprojects/docs/docs.gradle
@@ -0,0 +1,490 @@
+
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import org.gradle.build.docs.UserGuideTransformTask
+import org.gradle.build.docs.ExtractSnippetsTask
+import org.gradle.build.docs.AssembleSamplesDocTask
+import org.gradle.build.docs.dsl.docbook.AssembleDslDocTask
+import org.gradle.build.docs.dsl.ExtractDslMetaDataTask
+
+apply plugin: 'base'
+
+configurations {
+    ftpAntTask
+    userGuideStyleSheets
+    userGuideTask
+}
+
+dependencies {
+    ftpAntTask module("org.apache.ant:ant-commons-net:1.7.0") {
+        module("commons-net:commons-net:1.4.1") {
+            dependencies("oro:oro:2.0.8 at jar")
+        }
+    }
+
+    userGuideTask 'xalan:xalan:2.7.1', 'xerces:xercesImpl:2.9.1'
+    userGuideTask module('xhtmlrenderer:xhtmlrenderer:R8rc1') {
+        dependency 'itext:itext:2.0.8 at jar'
+    }
+    userGuideTask 'xslthl:xslthl:2.0.1 at jar'
+
+    userGuideStyleSheets 'docbook:docbook-xsl:1.75.2 at zip'
+}
+
+RemoteLocations remoteLocations = new RemoteLocations(version: version)
+
+srcDocsDir = file('src/docs')
+userguideSrcDir = new File(srcDocsDir, 'userguide')
+cssSrcDir = new File(srcDocsDir, 'css')
+dslSrcDir = new File(srcDocsDir, 'dsl')
+
+docsDir = file("$buildDir/docs")
+userguideDir = new File(docsDir, 'userguide')
+distDocsDir = new File(buildDir, 'distDocs')
+samplesDir = file("$buildDir/samples")
+docbookSrc = new File(project.buildDir, 'src')
+samplesSrcDir = file('src/samples')
+websiteDocs = new File(buildDir, 'websiteDocs')
+
+tasks.withType(Docbook2Xhtml).allObjects { task->
+    task.dependsOn userguideStyleSheets
+    task.classpath = configurations.userGuideTask
+    task.stylesheetsDir = userguideStyleSheets.destinationDir
+}
+tasks.withType(UserGuideTransformTask).allObjects { task->
+    task.classpath = configurations.userGuideTask
+    task.dependsOn samples, dslDocbook
+    task.snippetsDir = samples.snippetsDir
+    task.linksFile = dslDocbook.linksFile
+}
+tasks.withType(AssembleDslDocTask).allObjects { task ->
+    task.classpath = configurations.userGuideTask
+    task.classDocbookDir = dslSrcDir
+}
+
+task samples(type: ExtractSnippetsTask) {
+    source samplesSrcDir
+    exclude 'userguideOutput/**'
+    exclude 'userguide/tutorial/antChecksumFiles/**'
+    exclude '**/readme.xml'
+    destDir = samplesDir
+    snippetsDir = new File(buildDir, 'snippets')
+    doLast {
+        copy {
+            from samplesSrcDir
+            into samplesDir
+            include 'userguide/tutorial/antChecksumFiles/**'
+        }
+    }
+}
+
+task userguideStyleSheets(type: Copy) {
+    File stylesheetsDir = new File(srcDocsDir, 'stylesheets')
+    into new File(buildDir, 'stylesheets')
+    from(stylesheetsDir) {
+        include '*.xsl'
+    }
+    from(cssSrcDir) {
+        include '*.css'
+    }
+    from(zipTree(configurations.userGuideStyleSheets.singleFile)) {
+        // Remove the prefix
+        eachFile { fcd -> fcd.path = fcd.path.replaceFirst('^docbook-xsl-[0-9\\.]+/', '') }
+    }
+}
+
+task samplesDocbook(type: AssembleSamplesDocTask) {
+    source samplesSrcDir
+    include '**/readme.xml'
+    destFile = new File(docbookSrc, 'samplesList.xml')
+}
+
+task samplesDocs(type: Docbook2Xhtml, dependsOn: samplesDocbook) {
+    source samplesDocbook.destFile
+    destFile = new File(samples.destDir, 'readme.html')
+    stylesheetName = 'standaloneHtml.xsl'
+}
+
+task dslMetaData(type: ExtractDslMetaDataTask) {
+    source { groovydoc.source }
+    destFile = new File(docbookSrc, 'dsl-meta-data.bin')
+}
+
+task dslDocbook(type: AssembleDslDocTask, dependsOn: [dslMetaData]) {
+    inputs.files fileTree(dir: dslSrcDir, includes: ['*.xml'])
+    sourceFile = new File(dslSrcDir, 'dsl.xml')
+    classMetaDataFile = dslMetaData.destFile
+    pluginsMetaDataFile = new File(dslSrcDir, 'plugins.xml')
+    destFile = new File(docbookSrc, 'dsl.xml')
+    linksFile = new File(docbookSrc, 'api-links.bin')
+}
+
+task dslStandaloneDocbook(type: UserGuideTransformTask, dependsOn: [dslDocbook]) {
+    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
+    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
+    sourceFile = dslDocbook.destFile
+    destFile = new File(docbookSrc, 'dsl-standalone.xml')
+    javadocUrl = '../javadoc'
+    groovydocUrl = '../groovydoc'
+    dsldocUrl = '.'
+    websiteUrl = 'http://www.gradle.org'
+}
+
+task dslHtml(type: Docbook2Xhtml, dependsOn: dslStandaloneDocbook) {
+    source dslStandaloneDocbook.destFile
+    destDir = new File(docsDir, 'dsl')
+    stylesheetName = 'dslHtml.xsl'
+    resources = fileTree {
+        from cssSrcDir
+        include '*.css'
+    } + fileTree {
+        from dslSrcDir
+        include '*.js'
+    }
+}
+
+task userguideDocbook(type: UserGuideTransformTask, dependsOn: [samples, samplesDocbook]) {
+    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
+    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
+    sourceFile = new File(userguideSrcDir, 'userguide.xml')
+    destFile = new File(docbookSrc, 'userguide.xml')
+    javadocUrl = '../javadoc'
+    groovydocUrl = '../groovydoc'
+    dsldocUrl = '../dsl'
+    websiteUrl = 'http://www.gradle.org'
+}
+
+task remoteUserguideDocbook(type: UserGuideTransformTask, dependsOn: samples) {
+    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
+    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
+    sourceFile = new File(userguideSrcDir, 'userguide.xml')
+    destFile = new File(docbookSrc, 'remoteUserguide.xml')
+    doFirst {
+        javadocUrl = remoteLocations.javadocUrl
+        groovydocUrl = remoteLocations.groovydocUrl
+        dsldocUrl = remoteLocations.dsldocUrl
+        websiteUrl = 'http://www.gradle.org'
+    }
+}
+
+task userguideHtml(type: Docbook2Xhtml, dependsOn: userguideDocbook) {
+    source userguideDocbook.destFile
+    destDir = userguideDir
+    stylesheetName = 'userGuideHtml.xsl'
+    resources = fileTree {
+        from userguideSrcDir
+        include 'img/*.png'
+    }
+    resources += fileTree {
+        from cssSrcDir
+        include '*.css'
+    }
+}
+
+task userguideSingleHtml(type: Docbook2Xhtml, dependsOn: userguideDocbook) {
+    source userguideDocbook.destFile
+    destFile = new File(userguideDir, 'userguide_single.html')
+    stylesheetName = 'userGuideSingleHtml.xsl'
+    resources = fileTree {
+        from userguideSrcDir
+        include 'img/*.png'
+    }
+    resources += fileTree {
+        from cssSrcDir
+        include '*.css'
+    }
+}
+
+task userguideXhtml(type: Docbook2Xhtml, dependsOn: remoteUserguideDocbook) {
+    source remoteUserguideDocbook.destFile
+    destFile = new File(buildDir, 'tmp/userguidePdf/userguidePdf.html')
+    stylesheetName = 'userGuidePdf.xsl'
+    resources = fileTree {
+        from userguideSrcDir
+        include 'img/*.png'
+    }
+    resources += fileTree {
+        from cssSrcDir
+        include '*.css'
+    }
+}
+
+task userguidePdf(type: Xhtml2Pdf, dependsOn: userguideXhtml) {
+    inputs.dir cssSrcDir
+    sourceFile = userguideXhtml.destFile
+    destFile = new File(userguideDir, 'userguide.pdf')
+    classpath = configurations.userGuideTask
+}
+
+task javadoc(type: Javadoc) {
+    group = 'documentation'
+    source groovyProjects().collect {project -> project.sourceSets.main.allJava }
+    destinationDir = new File(docsDir, 'javadoc')
+    classpath = files(groovyProjects().collect {project -> [project.sourceSets.main.compileClasspath, project.sourceSets.main.classes] })
+    include 'org/gradle/api/**'
+    include 'org/gradle/*'
+    include 'org/gradle/external/javadoc/**'
+    include 'org/gradle/process/**'
+    include 'org/gradle/plugins/**'
+    include 'org/gradle/testfixtures/**'
+    include 'org/gradle/tooling/**'
+    exclude '**/internal/**'
+    options.links("http://java.sun.com/j2se/1.5.0/docs/api", "http://groovy.codehaus.org/gapi/", "http://maven.apache.org/ref/2.2.1/maven-core/apidocs",
+        "http://maven.apache.org/ref/2.2.1/maven-model/apidocs")
+    doFirst {
+        title = "Gradle API $version"
+    }
+}
+
+task checkstyleApi(type: Checkstyle) {
+    source javadoc.source
+    configFile = file("$checkstyleConfigDir/checkstyle-api.xml")
+    classpath = files()
+    resultFile = file("$checkstyleResultsDir/checkstyle-api.xml")
+}
+
+task groovydoc(type: Groovydoc) {
+    group = 'documentation'
+    source groovyProjects().collect {project -> project.sourceSets.main.groovy + project.sourceSets.main.java }
+    destinationDir = new File(docsDir, 'groovydoc')
+    includes = javadoc.includes
+    excludes = javadoc.excludes
+    doFirst {
+        title = "Gradle API $version"
+    }
+    groovyClasspath = project(':core').configurations.groovy
+}
+
+task userguideFragmentSrc(type: UserGuideTransformTask, dependsOn: [userguideStyleSheets, samples]) {
+    tags << 'standalone'
+    sourceFile = new File(userguideSrcDir, 'installation.xml')
+    destFile = new File(docbookSrc, 'installation.xml')
+    doFirst {
+        javadocUrl = remoteLocations.javadocUrl
+        groovydocUrl = remoteLocations.groovydocUrl
+        dsldocUrl = remoteLocations.dsldocUrl
+        websiteUrl = 'http://www.gradle.org'
+    }
+}
+
+task distDocs(type: Docbook2Xhtml, dependsOn: userguideFragmentSrc) {
+    source userguideFragmentSrc.destFile
+    destFile = new File(distDocsDir, 'getting-started.html')
+    stylesheetName = 'standaloneHtml.xsl'
+}
+
+task websiteUserguideSrc(type: UserGuideTransformTask, dependsOn: [userguideStyleSheets, samples, samplesDocbook]) {
+    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
+    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
+    sourceFile = new File(userguideSrcDir, 'userguide.xml')
+    destFile = new File(docbookSrc, 'website.xml')
+    tags << 'website'
+    doFirst {
+        javadocUrl = remoteLocations.javadocUrl
+        groovydocUrl = remoteLocations.groovydocUrl
+        dsldocUrl = remoteLocations.dsldocUrl
+        websiteUrl = ''
+    }
+}
+
+task websiteUserguide(type: Docbook2Xhtml, dependsOn: websiteUserguideSrc) {
+    source websiteUserguideSrc.destFile
+    destFile = new File(websiteDocs, 'website.html')
+    stylesheetName = 'websiteHtml.xsl'
+    resources = fileTree {
+        from userguideSrcDir
+        include 'img/*.png'
+    }
+    resources += fileTree {
+        from cssSrcDir
+        include '*.css'
+    }
+}
+
+task websiteProperties {
+    def propertiesFile = new File(websiteDocs, 'version.properties')
+    inputs.property 'version', { version.toString() }
+    outputs.files propertiesFile
+    doLast {
+        def properties = new Properties()
+        properties.version = version.toString()
+        propertiesFile.parentFile.mkdirs()
+        propertiesFile.withOutputStream { outputStream -> properties.store(outputStream, 'documentation version properties') }
+    }
+}
+
+task websiteDocs {
+    dependsOn websiteUserguide, websiteProperties
+}
+
+task userguide {
+    dependsOn userguideHtml, userguideSingleHtml, userguidePdf
+    description = 'Generates the userguide'
+    group = 'documentation'
+}
+
+task docs {
+    dependsOn javadoc, groovydoc, userguide, distDocs, samplesDocs, dslHtml
+    description = 'Generates all documentation'
+    group = 'documentation'
+}
+
+task uploadDocs(dependsOn: docs) << {
+    ftp(action: 'mkdir', remotedir: remoteLocations.docsRemoteDir)
+    ftp(action: 'delete', remotedir: remoteLocations.docsRemoteDir) {
+        fileset() {
+            include(name: '**/*')
+        }
+    }
+    ftp(action: 'send', remotedir: remoteLocations.docsRemoteDir) {
+        fileset(dir: docsDir)
+    }
+}
+
+void ftp(Map args, Closure antFileset = {}) {
+    ant {
+        taskdef(name: 'ftp',
+                classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
+                classpath: configurations.ftpAntTask.asPath)
+        Map ftpArgs = args + [
+                server: 'ftp.gradle.org',
+                userid: websiteFtpUserName,
+                password: websiteFtpUserPassword
+        ]
+        delegate.ftp(ftpArgs) {
+            antFileset.delegate = delegate
+            antFileset()
+        }
+    }
+}
+
+class RemoteLocations {
+    def version
+
+    static final GRADLE_ORG_URL = "http://www.gradle.org"
+
+    String getDistributionUploadUrl() {
+        version.isRelease() ? 'https://dav.codehaus.org/dist/gradle' : 'https://dav.codehaus.org/snapshots.dist/gradle'
+    }
+
+    String getDocsRemoteDir() {
+        (version.isRelease() ? version.toString() : 'latest') + '/docs'
+    }
+
+    String getJavadocUrl() {
+        "$GRADLE_ORG_URL/${getDocsRemoteDir()}/javadoc"
+    }
+
+    String getGroovydocUrl() {
+        "$GRADLE_ORG_URL/${getDocsRemoteDir()}/groovydoc"
+    }
+
+    String getDsldocUrl() {
+        "$GRADLE_ORG_URL/${getDocsRemoteDir()}/dsl"
+    }
+}
+
+class Docbook2Xhtml extends SourceTask {
+    @InputFiles
+    FileCollection classpath
+
+    @OutputFile @Optional
+    File destFile
+
+    @OutputDirectory @Optional
+    File destDir
+
+    @InputDirectory
+    File stylesheetsDir
+
+    String stylesheetName
+
+    @InputFiles @Optional
+    FileCollection resources
+
+    @TaskAction
+    def transform() {
+        if (!((destFile != null) ^ (destDir != null))) {
+            throw new InvalidUserDataException("Must specify exactly 1 of output file or dir.")
+        }
+
+        source.visit { FileVisitDetails fvd ->
+            if (fvd.isDirectory()) {
+                return
+            }
+
+            ant.java(classname: 'org.apache.xalan.xslt.Process', failonerror: true, fork: true) {
+                jvmarg(value: '-Xmx256m')
+                arg(value: '-in')
+                arg(value: fvd.file)
+                if (destFile) {
+                    arg(value: '-out')
+                    arg(value: destFile)
+                } else {
+                    arg(value: '-out')
+                    File outFile = fvd.relativePath.replaceLastName(fvd.file.name.replaceAll('.xml$', '.html')).getFile(destDir)
+                    outFile.parentFile.mkdirs()
+                    arg(value: outFile)
+                }
+                arg(value: '-xsl')
+                arg(value: new File(stylesheetsDir, stylesheetName))
+                if (destDir) {
+                    arg(line: "-param base.dir ${destDir}/")
+                }
+                sysproperty(key: 'xslthl.config', value: new File("$stylesheetsDir/highlighting/xslthl-config.xml").toURI())
+                sysproperty(key: 'org.apache.xerces.xni.parser.XMLParserConfiguration', value: 'org.apache.xerces.parsers.XIncludeParserConfiguration')
+                classpath {
+                    path(path: classpath.asPath)
+                    path(location: new File(stylesheetsDir, 'extensions/xalan27.jar'))
+                }
+            }
+        }
+
+        if (resources) {
+            project.copy {
+                into this.destDir ?: destFile.parentFile
+                from resources
+            }
+        }
+    }
+}
+
+class Xhtml2Pdf extends DefaultTask {
+    @InputFile
+    File sourceFile
+
+    @OutputFile
+    File destFile
+
+    @InputFiles
+    FileCollection classpath
+
+    def Xhtml2Pdf() {
+        onlyIf { !OperatingSystem.current().isWindows() }
+    }
+
+    @TaskAction
+    def transform() {
+        def uris = classpath.files.collect {it.toURI().toURL()}
+        def classloader = new URLClassLoader(uris as URL[], getClass().classLoader)
+        def renderer = classloader.loadClass('org.xhtmlrenderer.pdf.ITextRenderer').newInstance()
+        renderer.setDocument(sourceFile)
+        renderer.layout()
+        destFile.withOutputStream {
+            renderer.createPDF(it)
+        }
+    }
+}
diff --git a/subprojects/gradle-docs/src/docs/css/base.css b/subprojects/docs/src/docs/css/base.css
similarity index 100%
rename from subprojects/gradle-docs/src/docs/css/base.css
rename to subprojects/docs/src/docs/css/base.css
diff --git a/subprojects/gradle-docs/src/docs/css/dsl.css b/subprojects/docs/src/docs/css/dsl.css
similarity index 100%
rename from subprojects/gradle-docs/src/docs/css/dsl.css
rename to subprojects/docs/src/docs/css/dsl.css
diff --git a/subprojects/gradle-docs/src/docs/css/print.css b/subprojects/docs/src/docs/css/print.css
similarity index 100%
rename from subprojects/gradle-docs/src/docs/css/print.css
rename to subprojects/docs/src/docs/css/print.css
diff --git a/subprojects/gradle-docs/src/docs/css/style.css b/subprojects/docs/src/docs/css/style.css
similarity index 100%
rename from subprojects/gradle-docs/src/docs/css/style.css
rename to subprojects/docs/src/docs/css/style.css
diff --git a/subprojects/gradle-docs/src/docs/css/userguide.css b/subprojects/docs/src/docs/css/userguide.css
similarity index 100%
rename from subprojects/gradle-docs/src/docs/css/userguide.css
rename to subprojects/docs/src/docs/css/userguide.css
diff --git a/subprojects/gradle-docs/src/docs/dsl/dsl.xml b/subprojects/docs/src/docs/dsl/dsl.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/dsl.xml
rename to subprojects/docs/src/docs/dsl/dsl.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.DefaultTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.DefaultTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.DefaultTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.DefaultTask.xml
diff --git a/subprojects/docs/src/docs/dsl/org.gradle.api.Project.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.Project.xml
new file mode 100644
index 0000000..52e0ecb
--- /dev/null
+++ b/subprojects/docs/src/docs/dsl/org.gradle.api.Project.xml
@@ -0,0 +1,238 @@
+<section>
+    <section>
+        <title>Properties</title>
+        <table>
+            <thead>
+                <tr>
+                    <td>Name</td>
+                </tr>
+            </thead>
+            <tr>
+                <td>allprojects</td>
+            </tr>
+            <tr>
+                <td>artifacts</td>
+            </tr>
+            <tr>
+                <td>ant</td>
+            </tr>
+            <tr>
+                <td>buildDir</td>
+            </tr>
+            <tr>
+                <td>buildFile</td>
+            </tr>
+            <tr>
+                <td>buildscript</td>
+            </tr>
+            <tr>
+                <td>childProjects</td>
+            </tr>
+            <tr>
+                <td>configurations</td>
+            </tr>
+            <tr>
+                <td>convention</td>
+            </tr>
+            <tr>
+                <td>dependencies</td>
+            </tr>
+            <tr>
+                <td>dependsOnProjects</td>
+            </tr>
+            <tr>
+                <td>defaultTasks</td>
+            </tr>
+            <tr>
+                <td>description</td>
+            </tr>
+            <tr>
+                <td>gradle</td>
+            </tr>
+            <tr>
+                <td>group</td>
+            </tr>
+            <tr>
+                <td>logger</td>
+            </tr>
+            <tr>
+                <td>logging</td>
+            </tr>
+            <tr>
+                <td>name</td>
+            </tr>
+            <tr>
+                <td>parent</td>
+            </tr>
+            <tr>
+                <td>path</td>
+            </tr>
+            <tr>
+                <td>plugins</td>
+            </tr>
+            <tr>
+                <td>project</td>
+            </tr>
+            <tr>
+                <td>projectDir</td>
+            </tr>
+            <tr>
+                <td>properties</td>
+            </tr>
+            <tr>
+                <td>repositories</td>
+            </tr>
+            <tr>
+                <td>rootDir</td>
+            </tr>
+            <tr>
+                <td>rootProject</td>
+            </tr>
+            <tr>
+                <td>state</td>
+            </tr>
+            <tr>
+                <td>status</td>
+            </tr>
+            <tr>
+                <td>subprojects</td>
+            </tr>
+            <tr>
+                <td>tasks</td>
+            </tr>
+            <tr>
+                <td>version</td>
+            </tr>
+        </table>
+    </section>
+    <section>
+        <title>Methods</title>
+        <table>
+            <thead>
+                <tr>
+                    <td>Name</td>
+                </tr>
+            </thead>
+            <tr>
+                <td>ant</td>
+            </tr>
+            <tr>
+                <td>repositories</td>
+            </tr>
+            <tr>
+                <td>configurations</td>
+            </tr>
+            <tr>
+                <td>dependencies</td>
+            </tr>
+            <tr>
+                <td>artifacts</td>
+            </tr>
+            <tr>
+                <td>allprojects</td>
+            </tr>
+            <tr>
+                <td>subprojects</td>
+            </tr>
+            <tr>
+                <td>configure</td>
+            </tr>
+            <tr>
+                <td>buildscript</td>
+            </tr>
+            <tr>
+                <td>apply</td>
+            </tr>
+            <tr>
+                <td>file</td>
+            </tr>
+            <tr>
+                <td>files</td>
+            </tr>
+            <tr>
+                <td>fileTree</td>
+            </tr>
+            <tr>
+                <td>zipTree</td>
+            </tr>
+            <tr>
+                <td>tarTree</td>
+            </tr>
+            <tr>
+                <td>uri</td>
+            </tr>
+            <tr>
+                <td>relativePath</td>
+            </tr>
+            <tr>
+                <td>mkdir</td>
+            </tr>
+            <tr>
+                <td>delete</td>
+            </tr>
+            <tr>
+                <td>copy</td>
+            </tr>
+            <tr>
+                <td>copySpec</td>
+            </tr>
+            <tr>
+                <td>javaexec</td>
+            </tr>
+            <tr>
+                <td>exec</td>
+            </tr>
+            <tr>
+                <td>setProperty</td>
+            </tr>
+            <tr>
+                <td>property</td>
+            </tr>
+            <tr>
+                <td>hasProperty</td>
+            </tr>
+            <tr>
+                <td>task</td>
+            </tr>
+            <tr>
+                <td>dependsOn</td>
+            </tr>
+            <tr>
+                <td>evaluationDependsOn</td>
+            </tr>
+            <tr>
+                <td>childrenDependOnMe</td>
+            </tr>
+            <tr>
+                <td>dependsOnChildren</td>
+            </tr>
+            <tr>
+                <td>findProject</td>
+            </tr>
+            <tr>
+                <td>project</td>
+            </tr>
+            <tr>
+                <td>absoluteProjectPath</td>
+            </tr>
+            <tr>
+                <td>relativeProjectPath</td>
+            </tr>
+            <tr>
+                <td>getAllTasks</td>
+            </tr>
+            <tr>
+                <td>getTasksByName</td>
+            </tr>
+            <tr>
+                <td>beforeEvaluate</td>
+            </tr>
+            <tr>
+                <td>afterEvaluate</td>
+            </tr>
+            <tr>
+                <td>container</td>
+            </tr>
+        </table>
+    </section>
+</section>
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Script.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.Script.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Script.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.Script.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Task.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.Task.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Task.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.Task.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.artifacts.Configuration.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.artifacts.Configuration.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.artifacts.Configuration.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.artifacts.Configuration.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.initialization.Settings.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.initialization.Settings.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.initialization.Settings.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.initialization.Settings.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.internal.AbstractTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.internal.AbstractTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.internal.AbstractTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.internal.AbstractTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.internal.ConventionTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.internal.ConventionTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.internal.ConventionTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.internal.ConventionTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.invocation.Gradle.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.invocation.Gradle.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.invocation.Gradle.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.invocation.Gradle.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.BasePluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.BasePluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.BasePluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.BasePluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.JavaPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.JavaPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.JavaPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.JavaPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.MavenPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.MavenPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.MavenPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.MavenPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.ProjectReportsPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.ProjectReportsPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.ProjectReportsPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.ProjectReportsPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.ReportingBasePluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.ReportingBasePluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.ReportingBasePluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.ReportingBasePluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.WarPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.WarPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.WarPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.WarPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.announce.AnnouncePluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.announce.AnnouncePluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.announce.AnnouncePluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.announce.AnnouncePluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrSourceVirtualDirectory.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrSourceVirtualDirectory.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrSourceVirtualDirectory.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrSourceVirtualDirectory.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.antlr.AntlrTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.AbstractJettyRunTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.AbstractJettyRunTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.AbstractJettyRunTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.AbstractJettyRunTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRun.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRun.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRun.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRun.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRunWar.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRunWar.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRunWar.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyRunWar.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyStop.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyStop.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyStop.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.jetty.JettyStop.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.osgi.OsgiPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.osgi.OsgiPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.osgi.OsgiPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.osgi.OsgiPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.Checkstyle.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.Checkstyle.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.Checkstyle.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.Checkstyle.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.CodeNarc.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.CodeNarc.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.CodeNarc.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.CodeNarc.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.GroovyCodeQualityPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.GroovyCodeQualityPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.GroovyCodeQualityPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.GroovyCodeQualityPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.JavaCodeQualityPluginConvention.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.JavaCodeQualityPluginConvention.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.plugins.quality.JavaCodeQualityPluginConvention.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.plugins.quality.JavaCodeQualityPluginConvention.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.AbstractCopyTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.AbstractCopyTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.AbstractCopyTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.AbstractCopyTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Copy.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Copy.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Copy.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Copy.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Delete.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Delete.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Delete.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Delete.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Directory.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Directory.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Directory.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Directory.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Exec.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Exec.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Exec.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Exec.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.GeneratorTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.GeneratorTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.GeneratorTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.GeneratorTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.GradleBuild.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.GradleBuild.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.GradleBuild.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.GradleBuild.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.GroovySourceSet.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.GroovySourceSet.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.GroovySourceSet.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.GroovySourceSet.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.JavaExec.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.JavaExec.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.JavaExec.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.JavaExec.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.ScalaSourceSet.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.ScalaSourceSet.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.ScalaSourceSet.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.ScalaSourceSet.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.SourceSet.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.SourceSet.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.SourceSet.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.SourceSet.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.SourceTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.SourceTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.SourceTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.SourceTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Sync.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Sync.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Sync.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Sync.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Upload.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Upload.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.Upload.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.Upload.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.XmlGeneratorTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.XmlGeneratorTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.XmlGeneratorTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.XmlGeneratorTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.AbstractArchiveTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.Jar.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.Jar.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.Jar.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.Jar.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.Tar.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.Tar.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.Tar.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.Tar.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.War.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.War.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.War.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.War.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.Zip.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.Zip.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.bundling.Zip.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.bundling.Zip.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.compile.AbstractCompile.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.compile.AbstractCompile.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.compile.AbstractCompile.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.compile.AbstractCompile.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.compile.Compile.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.compile.Compile.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.compile.Compile.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.compile.Compile.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.compile.GroovyCompile.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.compile.GroovyCompile.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.compile.GroovyCompile.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.compile.GroovyCompile.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.AbstractReportTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.AbstractReportTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.AbstractReportTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.AbstractReportTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.DependencyReportTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.DependencyReportTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.DependencyReportTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.DependencyReportTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.ProjectReportTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.ProjectReportTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.ProjectReportTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.ProjectReportTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.PropertyReportTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.PropertyReportTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.PropertyReportTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.PropertyReportTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.TaskReportTask.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.TaskReportTask.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.TaskReportTask.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.diagnostics.TaskReportTask.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Groovydoc.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Groovydoc.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Groovydoc.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Groovydoc.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Javadoc.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Javadoc.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Javadoc.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.javadoc.Javadoc.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaCompile.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaCompile.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaCompile.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaCompile.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaDoc.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaDoc.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaDoc.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.scala.ScalaDoc.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.testing.Test.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.testing.Test.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.testing.Test.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.testing.Test.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.wrapper.Wrapper.xml b/subprojects/docs/src/docs/dsl/org.gradle.api.tasks.wrapper.Wrapper.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.api.tasks.wrapper.Wrapper.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.api.tasks.wrapper.Wrapper.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseClasspath.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseClasspath.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseClasspath.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseClasspath.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseJdt.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseJdt.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseJdt.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseJdt.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseProject.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseProject.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseProject.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseProject.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseWtp.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseWtp.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseWtp.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.eclipse.EclipseWtp.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.idea.IdeaModule.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.idea.IdeaModule.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.idea.IdeaModule.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.idea.IdeaModule.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.idea.IdeaProject.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.idea.IdeaProject.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.idea.IdeaProject.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.idea.IdeaProject.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.idea.IdeaWorkspace.xml b/subprojects/docs/src/docs/dsl/org.gradle.plugins.idea.IdeaWorkspace.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/org.gradle.plugins.idea.IdeaWorkspace.xml
rename to subprojects/docs/src/docs/dsl/org.gradle.plugins.idea.IdeaWorkspace.xml
diff --git a/subprojects/gradle-docs/src/docs/dsl/plugins.xml b/subprojects/docs/src/docs/dsl/plugins.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/dsl/plugins.xml
rename to subprojects/docs/src/docs/dsl/plugins.xml
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/src/dist/bin/start.sh b/subprojects/docs/src/docs/dsl/sidebar.js
similarity index 100%
copy from subprojects/gradle-docs/src/samples/customBuildLanguage/src/dist/bin/start.sh
copy to subprojects/docs/src/docs/dsl/sidebar.js
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/dslHtml.xsl b/subprojects/docs/src/docs/stylesheets/dslHtml.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/dslHtml.xsl
rename to subprojects/docs/src/docs/stylesheets/dslHtml.xsl
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/standaloneHtml.xsl b/subprojects/docs/src/docs/stylesheets/standaloneHtml.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/standaloneHtml.xsl
rename to subprojects/docs/src/docs/stylesheets/standaloneHtml.xsl
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/userGuideHtml.xsl b/subprojects/docs/src/docs/stylesheets/userGuideHtml.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/userGuideHtml.xsl
rename to subprojects/docs/src/docs/stylesheets/userGuideHtml.xsl
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/userGuideHtmlCommon.xsl b/subprojects/docs/src/docs/stylesheets/userGuideHtmlCommon.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/userGuideHtmlCommon.xsl
rename to subprojects/docs/src/docs/stylesheets/userGuideHtmlCommon.xsl
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/userGuidePdf.xsl b/subprojects/docs/src/docs/stylesheets/userGuidePdf.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/userGuidePdf.xsl
rename to subprojects/docs/src/docs/stylesheets/userGuidePdf.xsl
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/userGuideSingleHtml.xsl b/subprojects/docs/src/docs/stylesheets/userGuideSingleHtml.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/userGuideSingleHtml.xsl
rename to subprojects/docs/src/docs/stylesheets/userGuideSingleHtml.xsl
diff --git a/subprojects/gradle-docs/src/docs/stylesheets/websiteHtml.xsl b/subprojects/docs/src/docs/stylesheets/websiteHtml.xsl
similarity index 100%
rename from subprojects/gradle-docs/src/docs/stylesheets/websiteHtml.xsl
rename to subprojects/docs/src/docs/stylesheets/websiteHtml.xsl
diff --git a/subprojects/gradle-docs/src/docs/userguide/announcePlugin.xml b/subprojects/docs/src/docs/userguide/announcePlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/announcePlugin.xml
rename to subprojects/docs/src/docs/userguide/announcePlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/ant.xml b/subprojects/docs/src/docs/userguide/ant.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/ant.xml
rename to subprojects/docs/src/docs/userguide/ant.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/antlrPlugin.xml b/subprojects/docs/src/docs/userguide/antlrPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/antlrPlugin.xml
rename to subprojects/docs/src/docs/userguide/antlrPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/artifactDependenciesTutorial.xml b/subprojects/docs/src/docs/userguide/artifactDependenciesTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/artifactDependenciesTutorial.xml
rename to subprojects/docs/src/docs/userguide/artifactDependenciesTutorial.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/artifactMngmt.xml b/subprojects/docs/src/docs/userguide/artifactMngmt.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/artifactMngmt.xml
rename to subprojects/docs/src/docs/userguide/artifactMngmt.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/buildLifecycle.xml b/subprojects/docs/src/docs/userguide/buildLifecycle.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/buildLifecycle.xml
rename to subprojects/docs/src/docs/userguide/buildLifecycle.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/buildScriptsTutorial.xml b/subprojects/docs/src/docs/userguide/buildScriptsTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/buildScriptsTutorial.xml
rename to subprojects/docs/src/docs/userguide/buildScriptsTutorial.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/codeQualityPlugin.xml b/subprojects/docs/src/docs/userguide/codeQualityPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/codeQualityPlugin.xml
rename to subprojects/docs/src/docs/userguide/codeQualityPlugin.xml
diff --git a/subprojects/docs/src/docs/userguide/commandLine.xml b/subprojects/docs/src/docs/userguide/commandLine.xml
new file mode 100644
index 0000000..a4f7a7f
--- /dev/null
+++ b/subprojects/docs/src/docs/userguide/commandLine.xml
@@ -0,0 +1,232 @@
+<!--
+  ~ Copyright 2009 the original author or authors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<appendix id='gradle_command_line'>
+    <title>Gradle Command Line</title>
+    <para>The <command>gradle</command> command has the following usage:
+        <cmdsynopsis>
+            <command>gradle</command>
+            <arg choice="opt" rep="repeat">option</arg>
+            <arg choice="opt" rep="repeat">task</arg>
+        </cmdsynopsis>
+        The command-line options available for the <command>gradle</command> command are listed below:
+    </para>
+    <variablelist>
+        <varlistentry>
+            <term><option>-?</option>, <option>-h</option>, <option>--help</option></term>
+            <listitem><para>Shows a help message.</para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-C</option>, <option>--cache</option></term>
+            <listitem><para>Specifies how compiled build scripts should be cached. Possible values are:
+                <literal>rebuild</literal> or <literal>on</literal>. Default value is
+                <literal>on</literal>. See <xref linkend="sec:caching"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-D</option>, <option>--system-prop</option></term>
+            <listitem><para>Sets a system property of the JVM, for example <literal>-Dmyprop=myvalue</literal>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-I</option>, <option>--init-script</option></term>
+            <listitem><para>Specifies an initialization script. See <xref linkend="init_scripts"/>.</para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-P</option>, <option>--project-prop</option></term>
+            <listitem><para>Sets a project property of the root project, for example
+                <literal>-Pmyprop=myvalue</literal>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-S</option>, <option>--full-stacktrace</option></term>
+            <listitem><para>Print out the full (very verbose) stacktrace for any exceptions. See <xref linkend="logging"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-a</option>, <option>--no-rebuild</option></term>
+            <listitem><para>Do not rebuild project dependencies.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>--all</option></term>
+            <listitem><para>Shows additional detail in the task listing. See <xref linkend="sec:listing_tasks"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-b</option>, <option>--build-file</option></term>
+            <listitem><para>Specifies the build file. See <xref linkend="sec:selecting_build"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-c</option>, <option>--settings-file</option></term>
+            <listitem><para>Specifies the settings file.</para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-d</option>, <option>--debug</option></term>
+            <listitem><para>Log in debug mode (includes normal stacktrace). See <xref linkend="logging"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-e</option>, <option>--embedded</option></term>
+            <listitem><para>Specify an embedded build script.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-g</option>, <option>--gradle-user-home</option></term>
+            <listitem><para>Specifies the Gradle user home directory.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>--gui</option></term>
+            <listitem><para>Launches the Gradle GUI. See <xref linkend="tutorial_gradle_gui"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-i</option>, <option>--info</option></term>
+            <listitem><para>Set log level to info. See <xref linkend="logging"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-m</option>, <option>--dry-run</option></term>
+            <listitem><para>Runs the build with all task actions disabled.</para> </listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>--no-color</option></term>
+            <listitem><para>Do not use color in the console output.</para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-p</option>, <option>--project-dir</option></term>
+            <listitem><para>Specifies the start directory for Gradle. Defaults to current directory.
+                See <xref linkend="sec:selecting_build"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>--profile</option></term>
+            <listitem><para>Profiles build execution time and generates a report in the
+                <build_dir>/reports/profile directory.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-q</option>, <option>--quiet</option></term>
+            <listitem><para>Log errors only. See <xref linkend="logging"/>.</para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-s</option>, <option>--stacktrace</option></term>
+            <listitem><para>Print out the stacktrace also for user exceptions (e.g. compile error). See <xref linkend="logging"/>.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-u</option>, <option>--no-search-upwards</option></term>
+            <listitem><para>Don't search in parent directories for a <filename>settings.gradle</filename> file.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-v</option>, <option>--version</option></term>
+            <listitem><para>Prints version info.
+            </para></listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><option>-x</option>, <option>--exclude-task</option></term>
+            <listitem><para>Specifies a task to be excluded from execution. See <xref linkend="sec:excluding_tasks_from_the_command_line"/>.
+            </para></listitem>
+        </varlistentry>
+    </variablelist>
+    <para>The above information is printed to the console when you execute <userinput>gradle -h</userinput>.</para>
+
+    <section>
+        <title>Deprecated command-line options</title>
+        <para>The following options are deprecated and will be removed in a future version of Gradle:</para>
+        <variablelist>
+            <varlistentry>
+                <term><option>-n</option>, <option>--dependencies</option></term>
+                <listitem><para>(deprecated) Show list of all project dependencies. You should use <userinput>gradle dependencies</userinput>
+                    instead. See <xref linkend="sec:listing_dependencies"/>.
+                </para></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><option>-r</option>, <option>--properties</option></term>
+                <listitem><para>(deprecated) Show list of all available project properties. You should use <userinput>gradle properties</userinput>
+                    instead. See <xref linkend="sec:listing_properties"/>.</para></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><option>-t</option>, <option>--tasks</option></term>
+                <listitem><para>(deprecated) Show list of available tasks. You should use <userinput>gradle tasks</userinput>
+                    instead. See <xref linkend="sec:listing_tasks"/>.</para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </section>
+
+    <section>
+        <title>Experimental command-line options</title>
+        <para>The following options are experimental:</para>
+        <variablelist>
+            <varlistentry>
+                <term><option>--daemon</option></term>
+                <listitem><para>Uses the Gradle daemon to run the build. Starts the daemon if not running.</para></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><option>--foreground</option></term>
+                <listitem><para>Starts the Gradle daemon in the foreground.</para></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><option>--no-daemon</option></term>
+                <listitem><para>Do not use the Gradle daemon to run the build.</para></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><option>--stop</option></term>
+                <listitem><para>Stops the Gradle daemon if it is running.</para></listitem>
+            </varlistentry>
+        </variablelist>
+    </section>
+
+    <section>
+        <title>System properties</title>
+        <para>The following system properties are available for the <command>gradle</command> command. Note that
+            command-line options take precedence over system properties.
+        </para>
+        <varlistentry>
+            <term><literal>gradle.user.home</literal></term>
+            <listitem><para>Specifies the Gradle user home directory.</para> </listitem>
+        </varlistentry>
+        <varlistentry>
+            <term><literal>org.gradle.daemon</literal></term>
+            <listitem><para>When set to <literal>true</literal>, use the Gradle daemon to run the build.</para>
+            </listitem>
+        </varlistentry>
+    </section>
+
+    <section>
+        <title>Environment variables</title>
+        <para>The following environment variables are available for the <command>gradle</command> command. Note that
+            command-line options and system properties take precedence over environment variables.
+        </para>
+        <variablelist>
+            <varlistentry>
+                <term><literal>GRADLE_OPTS</literal></term>
+                <listitem><para>Specifies command-line arguments to use to start the JVM. This can be useful for setting
+                    the system properties to use for running Gradle. For example you could set <literal>GRADLE_OPTS="-Dorg.gradle.daemon=true"</literal>
+                    to use the Gradle daemon without needing to use the <option>--daemon</option> option every time you
+                    run Gradle.
+                </para></listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><literal>GRADLE_USER_HOME</literal></term>
+                <listitem><para>Specifies the Gradle user home directory.</para></listitem>
+            </varlistentry>
+        </variablelist>
+    </section>
+</appendix>
diff --git a/subprojects/gradle-docs/src/docs/userguide/commandLineTutorial.xml b/subprojects/docs/src/docs/userguide/commandLineTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/commandLineTutorial.xml
rename to subprojects/docs/src/docs/userguide/commandLineTutorial.xml
diff --git a/subprojects/docs/src/docs/userguide/customPlugins.xml b/subprojects/docs/src/docs/userguide/customPlugins.xml
new file mode 100644
index 0000000..617a228
--- /dev/null
+++ b/subprojects/docs/src/docs/userguide/customPlugins.xml
@@ -0,0 +1,184 @@
+<!--
+  ~ Copyright 2009 the original author or authors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<chapter id="custom_plugins">
+    <title>Writing Custom Plugins</title>
+
+    <para>A Gradle plugin packages up reusable pieces of build logic, which can be used across many different
+        projects and builds. Gradle allows you to implement your own custom plugins, so you can reuse your
+        build logic, and share it with others.
+    </para>
+
+    <para>
+        You can implement a custom plugin in any language you like, provided the implementation ends up compiled as
+        bytecode. For the examples here, we are going to use Groovy as the implementation language. You could use
+        Java or Scala instead, if you want.
+    </para>
+
+    <section>
+        <title>Packaging a plugin</title>
+        <para>There are several places where you can put the source for the plugin.
+        </para>
+        <variablelist>
+            <varlistentry>
+                <term>Build script</term>
+                <listitem>
+                    <para>You can include the source for the plugin directly in the build script. This has the benefit that the plugin is
+                        automatically compiled and included in the classpath of the build script without you having to do anything.
+                        However, the plugin is not visible outside the build script, and so you cannot reuse the plugin
+                        outside the build script it is defined in.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><filename>buildSrc</filename> project</term>
+                <listitem>
+                    <para>You can put the source for the plugin in the
+                        <filename><replaceable>rootProjectDir</replaceable>/buildSrc/src/main/groovy</filename> directory.
+                        Gradle will take care of compiling and testing the plugin and making it available on the
+                        classpath of the build script. The plugin is visible to every build script used by the build.
+                        However, it is not visible outside the build, and so you cannot reuse the plugin outside the
+                        build it is defined in.
+                    </para>
+                    <para>
+                        See <xref linkend="organizing_build_logic"/> for more details about the <filename>buildSrc</filename>
+                        project.</para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Standalone project</term>
+                <listitem>
+                    <para>You can create a separate project for your plugin. This project produces and
+                        publishes a JAR which you can then use in multiple builds and share with others. Generally, this JAR
+                        might include some custom plugins, or bundle several related task classes into a single library. Or
+                        some combination of the two.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+        <para> In our examples, we will start with the plugin in the build script, to keep things simple.
+            Then we will look at creating a standalone project.
+        </para>
+    </section>
+
+    <section>
+        <title>Writing a simple plugin</title>
+        <para>To create a custom plugin, you need to write an implementation of <apilink class="org.gradle.api.Plugin"/>.
+            Gradle instantiates the plugin and calls the plugin instance's <apilink class="org.gradle.api.Plugin" method="apply"/> method when the
+            plugin is used with a project. The project
+            object is passed as a parameter, which the plugin can use to configure the project however it needs to.
+            The following sample contains a greeting plugin, which adds a <literal>hello</literal> task to the project.
+        </para>
+
+        <sample id="customPlugin" dir="userguide/organizeBuildLogic/customPlugin" title="A custom plugin">
+            <sourcefile file="build.gradle"/>
+            <output args="-q hello"/>
+        </sample>
+
+        <para>
+            One thing to note is that a new instance of a given plugin is created for each project it is applied to.
+        </para>
+    </section>
+
+    <section>
+        <title>Getting input from the build</title>
+        <para>Most plugins need to obtain some configuration from the build script. One method for doing this is to use <firstterm>convention objects</firstterm>.
+             The Gradle <apilink class="org.gradle.api.Project"/> has a <apilink class="org.gradle.api.plugins.Convention"/> object 
+             that helps keep track of all the settings and properties being passed to plugins. You can capture user input by telling
+             the Project Convention about your plugin. To capture input, simply add a Java Bean compliant class into the Convention's list of 
+             plugins. Groovy is a good language choice for a plugin because plain old Groovy objects contain all the getter and setter methods
+             that a Java Bean requires. 
+        </para>
+
+        <para>Let's add a simple convention object to the project. Here we add a <literal>greeting</literal> property to the
+            project, which allows you to configure the greeting.
+        </para>
+
+        <sample id="customPluginWithConvention" dir="userguide/organizeBuildLogic/customPluginWithConvention" title="A custom plugin convention">
+            <sourcefile file="build.gradle"/>
+            <output args="-q hello"/>
+        </sample>
+
+        <para>In this example, <classname>GreetingPluginConvention</classname> is a plain old Groovy object with a field called <literal>greeting</literal>.
+            The convention object is added to the plugin list with the name <literal>greet</literal>. The name of the variable in
+            the build needs to match the name of the field in the convention object.  The name you choose for your plugin 
+            (<literal>greet</literal>) is arbitrary and can be whatever you choose. 
+        </para>
+
+        <para>Oftentimes, you have several related properties you need to specify on a single plugin. With Groovy plugins it is easy
+            to offer a configuration closure block to group settings together. The following example shows you how to do this. 
+        </para>
+
+        <sample id="customPluginWithAdvancedConvention" dir="userguide/organizeBuildLogic/customPluginWithAdvancedConvention" title="A custom plugin with closure convention">
+            <sourcefile file="build.gradle"/>
+            <output args="-q hello"/>
+        </sample>
+
+        <para>In this example, several convention settings can be grouped together within the <literal>greet</literal> closure. 
+            The name of the closure block in the build script (<literal>greet</literal>) needs a matching method on 
+            the convention object, and that method must take a closure as an argument. Then, when the closure is executed, 
+            the fields on the convention object will be mapped to the variables within the closure based on the standard
+            Groovy closure delegate feature. This technique is possible in other JVM languages but may not be as convenient 
+            as in Groovy. 
+        </para>
+    </section>
+
+    <section>
+        <title>A standalone project</title>
+        <para>Now we will move our plugin to a standalone project, so we can publish it and share it with others.
+            This project is simply a Groovy project that produces a JAR containing the plugin classes.
+            Here is a simple build script for the project. It applies the Groovy plugin, and adds the Gradle API
+            as a compile-time dependency.
+        </para>
+
+        <sample id="customPluginStandalone" dir="customPlugin" title="A build for a custom plugin" includeLocation="true">
+            <sourcefile file="build.gradle" snippet="use-plugin"/>
+        </sample>
+
+        <para>We just follow the convention for where the source for the plugin class should go.</para>
+
+        <section>
+            <title>Using your plugin in another project</title>
+            <para>To use a plugin in a build script, you need to add the plugin classes to the build script's classpath. To
+                do this, you use a <literal>buildscript { }</literal> block, as described in <xref linkend="sec:external_dependencies"/>.
+                The following example shows how you might do this when the JAR containing the plugin has been published
+                to a local repository:
+            </para>
+            <sample id="customPluginStandalone" dir="customPlugin" title="Using a custom plugin in another project">
+                <sourcefile file="usesCustomPlugin.gradle" snippet="use-plugin"/>
+            </sample>
+        </section>
+        <section>
+            <title>Writing tests for your plugin</title>
+            <para>You can use the <apilink class="org.gradle.testfixtures.ProjectBuilder"/> class to create
+                <apilink class="org.gradle.api.Project"/> instances to use when you test your plugin implementation.
+            </para>
+            <sample id="customPluginStandalone" dir="customPlugin" title="Testing a custom plugin">
+                <sourcefile file="src/test/groovy/org/gradle/GreetingPluginTest.groovy" snippet="test-plugin"/>
+            </sample>
+        </section>
+    </section>
+
+    <section>
+        <title>Maintaining multiple domain objects</title>
+
+        <para>Gradle provides some utility classes for maintaining collections of object, which work well with the Gradle build language.</para>
+
+        <sample id="domainObjectContainer" dir="userguide/organizeBuildLogic/customPluginWithDomainObjectContainer" title="Managing domain objects">
+            <sourcefile file="build.gradle"/>
+            <output args="-q books"/>
+        </sample>
+    </section>
+</chapter>
diff --git a/subprojects/docs/src/docs/userguide/customTasks.xml b/subprojects/docs/src/docs/userguide/customTasks.xml
new file mode 100644
index 0000000..712da01
--- /dev/null
+++ b/subprojects/docs/src/docs/userguide/customTasks.xml
@@ -0,0 +1,159 @@
+<!--
+  ~ Copyright 2009 the original author or authors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<chapter id="custom_tasks">
+    <title>Writing Custom Task Classes</title>
+
+    <para>Gradle supports two types of task. One such type is the simple task, where you define the task with an
+        action closure. We have seen these in <xref linkend="tutorial_using_tasks"/>. For this type of task, the action
+        closure determines the behaviour of the task. This type of task is good for implementing one-off tasks in your
+        build script.
+    </para>
+    <para>
+        The other type of task is the enhanced task, where the behaviour is built into the task, and the task
+        provides some properties which you can use to configure the behaviour. We have seen these in
+        <xref linkend="more_about_tasks"/>. Most Gradle plugins use enhanced tasks. With enhanced tasks, you don't need
+        to implement the task behaviour as you do with simple tasks.
+        You simply declare the task and configure the task using its properties. In this way, enhanced tasks let you reuse
+        a piece of behaviour in many different places, possibly across different builds.
+    </para>
+    <para>
+        The behaviour and properties of an enhanced task is defined by the task's class. When you declare an enhanced task, you
+        specify the type, or class of the task.
+    </para>
+    <para>
+        Implementing your own custom task class in Gradle is easy.
+        You can implement a custom task class in pretty much any language you like, provided it ends up compiled to bytecode.
+        In our examples, we are going to use Groovy as the implementation language, but you could use, for example, Java
+        or Scala. In general, using Groovy is the easiest option, because the Gradle API is designed to work well with Groovy.
+    </para>
+
+    <section>
+        <title>Packaging a task class</title>
+        <para>There are several places where you can put the source for the task class.
+        </para>
+        <variablelist>
+            <varlistentry>
+                <term>Build script</term>
+                <listitem>
+                    <para>You can include the task class directly in the build script. This has the benefit that the task class is
+                        automatically compiled and included in the classpath of the build script without you having to do anything.
+                        However, the task class is not visible outside the build script, and so you cannot reuse the task class
+                        outside the build script it is defined in.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term><filename>buildSrc</filename> project</term>
+                <listitem>
+                    <para>You can put the source for the task class in the
+                        <filename><replaceable>rootProjectDir</replaceable>/buildSrc/src/main/groovy</filename> directory.
+                        Gradle will take care of compiling and testing the task class and making it available on the
+                        classpath of the build script. The task class is visible to every build script used by the build.
+                        However, it is not visible outside the build, and so you cannot reuse the task class outside the
+                        build it is defined in.
+                        Using the <filename>buildSrc</filename> project approach keeps separate
+                        the task declaration - that is, what the task should do - from the task implementation - that is,
+                        how the task does it.</para>
+                    <para>
+                        See <xref linkend="organizing_build_logic"/> for more details about the <filename>buildSrc</filename>
+                        project.</para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>Standalone project</term>
+                <listitem>
+                    <para>You can create a separate project for your task class. This project produces and
+                        publishes a JAR which you can then use in multiple builds and share with others. Generally, this JAR
+                        might include some custom plugins, or bundle several related task classes into a single library. Or
+                        some combination of the two.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+        <para> In our examples, we will start with the task class in the build script, to keep things simple.
+            Then we will look at creating a standalone project.
+        </para>
+    </section>
+
+    <section>
+        <title>Writing a simple task class</title>
+        <para>To implement a custom task class, you extend <apilink class="org.gradle.api.DefaultTask"/>.
+        </para>
+        <sample id="customTask" dir="userguide/tasks/customTask" title="Defining a custom task">
+            <sourcefile file="build.gradle" snippet="define-task"/>
+        </sample>
+
+        <para>This task doesn't do anything useful, so let's add some behaviour. To do so, we add a method to the task
+            and mark it with the <apilink class="org.gradle.api.tasks.TaskAction"/> annotation. Gradle will call the
+            method when the task executes. You don't have to use a method to define the behaviour for the task. You
+            could, for instance, call <literal>doFirst()</literal> or <literal>doLast()</literal> with a closure in the
+            task constructor to add behaviour.
+        </para>
+        <sample id="customTaskWithAction" dir="userguide/tasks/customTask" title="A hello world task">
+            <sourcefile file="build.gradle" snippet="add-action"/>
+            <output args="-q hello"/>
+        </sample>
+
+        <para>Let's add a property to the task, so we can customize it. Tasks are simply POGOs, and when you declare a
+            task, you can set the properties or call methods on the task object. Here we add a <literal>greeting</literal>
+            property, and set the value when we declare the <literal>greeting</literal> task.
+        </para>
+        <sample id="customTaskWithProperty" dir="userguide/tasks/customTaskWithProperty" title="A customizable hello world task">
+            <sourcefile file="build.gradle" snippet="add-property"/>
+            <output args="-q hello greeting"/>
+        </sample>
+    </section>
+
+    <section>
+        <title>A standalone project</title>
+        <para>Now we will move our task to a standalone project, so we can publish it and share it with others.
+            This project is simply a Groovy project that produces a JAR containing the task class.
+            Here is a simple build script for the project. It applies the Groovy plugin, and adds the Gradle API
+            as a compile-time dependency.
+        </para>
+
+        <sample id="customTaskStandalone" dir="customPlugin" title="A build for a custom task" includeLocation="true">
+            <sourcefile file="build.gradle" snippet="use-plugin"/>
+        </sample>
+
+        <para>We just follow the convention for where the source for the task class should go.</para>
+
+        <sample id="customTaskStandalone" dir="customPlugin" title="A custom task">
+            <sourcefile file="src/main/groovy/org/gradle/GreetingTask.groovy"/>
+        </sample>
+
+        <section>
+            <title>Using your task class in another project</title>
+            <para>To use a task class in a build script, you need to add the class to the build script's classpath. To
+                do this, you use a <literal>buildscript { }</literal> block, as described in <xref linkend="sec:external_dependencies"/>.
+                The following example shows how you might do this when the JAR containing the task class has been published
+                to a local repository:
+            </para>
+            <sample id="usingCustomTask" dir="customPlugin" title="Using a custom task in another project">
+                <sourcefile file="usesCustomTask.gradle" snippet="use-task"/>
+            </sample>
+        </section>
+        <section>
+            <title>Writing tests for your task class</title>
+            <para>You can use the <apilink class="org.gradle.testfixtures.ProjectBuilder"/> class to create
+                <apilink class="org.gradle.api.Project"/> instances to use when you test your task class.
+            </para>
+            <sample id="customTaskStandalone" dir="customPlugin" title="Testing a custom task">
+                <sourcefile file="src/test/groovy/org/gradle/GreetingTaskTest.groovy" snippet="test-task"/>
+            </sample>
+        </section>
+    </section>
+</chapter>
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/docs/userguide/depMngmt.xml b/subprojects/docs/src/docs/userguide/depMngmt.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/depMngmt.xml
rename to subprojects/docs/src/docs/userguide/depMngmt.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/eclipsePlugin.xml b/subprojects/docs/src/docs/userguide/eclipsePlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/eclipsePlugin.xml
rename to subprojects/docs/src/docs/userguide/eclipsePlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/embedding.xml b/subprojects/docs/src/docs/userguide/embedding.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/embedding.xml
rename to subprojects/docs/src/docs/userguide/embedding.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/glossary.xml b/subprojects/docs/src/docs/userguide/glossary.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/glossary.xml
rename to subprojects/docs/src/docs/userguide/glossary.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/gradleWrapper.xml b/subprojects/docs/src/docs/userguide/gradleWrapper.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/gradleWrapper.xml
rename to subprojects/docs/src/docs/userguide/gradleWrapper.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/groovyPlugin.xml b/subprojects/docs/src/docs/userguide/groovyPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/groovyPlugin.xml
rename to subprojects/docs/src/docs/userguide/groovyPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/groovyTutorial.xml b/subprojects/docs/src/docs/userguide/groovyTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/groovyTutorial.xml
rename to subprojects/docs/src/docs/userguide/groovyTutorial.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/guiTutorial.xml b/subprojects/docs/src/docs/userguide/guiTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/guiTutorial.xml
rename to subprojects/docs/src/docs/userguide/guiTutorial.xml
diff --git a/subprojects/docs/src/docs/userguide/ideSupport.xml b/subprojects/docs/src/docs/userguide/ideSupport.xml
new file mode 100644
index 0000000..b1710a3
--- /dev/null
+++ b/subprojects/docs/src/docs/userguide/ideSupport.xml
@@ -0,0 +1,58 @@
+<!--
+  ~ Copyright 2009 the original author or authors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<appendix id='ide_support' xmlns:xi="http://www.w3.org/2001/XInclude">
+    <title>Existing IDE Support and how to cope without it</title>
+    <section id='sec:intellij'>
+        <title>IntelliJ</title>
+        <para>Gradle has been mainly developed with Idea IntelliJ and its very good Groovy plugin. Gradle's build script
+            <footnote>
+                <para>Gradle is built with Gradle
+                </para>
+            </footnote>
+            has also been developed with the support of this IDE. IntelliJ allows you to define any filepattern to be
+            interpreted as a Groovy script. In the case of Gradle you can define such a pattern for
+            <filename>build.gradle</filename>
+            and <filename>settings.gradle</filename>. This will already help very much. What is missing is the classpath
+            to the Gradle binaries to offer content assistance for the Gradle classes. You might add the Gradle jar
+            (which you can find in your distribution) to your project's classpath. It does not really belong there, but
+            if you do this you have a fantastic IDE support for developing Gradle scripts. Of course if you use
+            additional libraries for your build scripts they would further pollute your project classpath.
+        </para>
+        <para>We hope that in the future <filename>*.gradle</filename> files
+            get special treatment by IntelliJ and you will be able to define a specific classpath for them.
+        </para>
+    </section>
+    <section>
+        <title>Eclipse</title>
+        <para>There is a Groovy plugin for eclipse. We don't know in what state it is and how it would support Gradle.
+            In the next edition of this user guide we can hopefully write more about this.
+        </para>
+    </section>
+    <section id='sec:using_gradle_without_ide_support'>
+        <title>Using Gradle without IDE support</title>
+        <para>What we can do for you is to spare you typing things like
+            <literal>throw new org.gradle.api.tasks.StopExecutionException()</literal>
+            and just type
+            <literal>throw new StopExecutionException()</literal>
+            instead. We do this by automatically adding a set of import statements to the Gradle scripts before Gradle
+            executes them. Listed below are the imports added to each script.
+        </para>
+        <figure>
+            <title>gradle-imports</title>
+            <programlisting><xi:include href='../../../../../subprojects/core/src/main/resources/org/gradle/configuration/default-imports.txt' parse='text'/></programlisting>
+        </figure>
+    </section>
+</appendix>
diff --git a/subprojects/gradle-docs/src/docs/userguide/ideaPlugin.xml b/subprojects/docs/src/docs/userguide/ideaPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/ideaPlugin.xml
rename to subprojects/docs/src/docs/userguide/ideaPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/codeQualityPluginTasks.graphml b/subprojects/docs/src/docs/userguide/img/codeQualityPluginTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/codeQualityPluginTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/codeQualityPluginTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/codeQualityPluginTasks.png b/subprojects/docs/src/docs/userguide/img/codeQualityPluginTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/codeQualityPluginTasks.png
rename to subprojects/docs/src/docs/userguide/img/codeQualityPluginTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/commandLineTutorialTasks.graphml b/subprojects/docs/src/docs/userguide/img/commandLineTutorialTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/commandLineTutorialTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/commandLineTutorialTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/commandLineTutorialTasks.png b/subprojects/docs/src/docs/userguide/img/commandLineTutorialTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/commandLineTutorialTasks.png
rename to subprojects/docs/src/docs/userguide/img/commandLineTutorialTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/groovyPluginTasks.graphml b/subprojects/docs/src/docs/userguide/img/groovyPluginTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/groovyPluginTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/groovyPluginTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/groovyPluginTasks.png b/subprojects/docs/src/docs/userguide/img/groovyPluginTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/groovyPluginTasks.png
rename to subprojects/docs/src/docs/userguide/img/groovyPluginTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/guiSetup.png b/subprojects/docs/src/docs/userguide/img/guiSetup.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/guiSetup.png
rename to subprojects/docs/src/docs/userguide/img/guiSetup.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/guiTaskTree.png b/subprojects/docs/src/docs/userguide/img/guiTaskTree.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/guiTaskTree.png
rename to subprojects/docs/src/docs/userguide/img/guiTaskTree.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/javaPluginConfigurations.graphml b/subprojects/docs/src/docs/userguide/img/javaPluginConfigurations.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/javaPluginConfigurations.graphml
rename to subprojects/docs/src/docs/userguide/img/javaPluginConfigurations.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/javaPluginConfigurations.png b/subprojects/docs/src/docs/userguide/img/javaPluginConfigurations.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/javaPluginConfigurations.png
rename to subprojects/docs/src/docs/userguide/img/javaPluginConfigurations.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/javaPluginTasks.graphml b/subprojects/docs/src/docs/userguide/img/javaPluginTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/javaPluginTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/javaPluginTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/javaPluginTasks.png b/subprojects/docs/src/docs/userguide/img/javaPluginTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/javaPluginTasks.png
rename to subprojects/docs/src/docs/userguide/img/javaPluginTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/jettyPluginTasks.graphml b/subprojects/docs/src/docs/userguide/img/jettyPluginTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/jettyPluginTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/jettyPluginTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/jettyPluginTasks.png b/subprojects/docs/src/docs/userguide/img/jettyPluginTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/jettyPluginTasks.png
rename to subprojects/docs/src/docs/userguide/img/jettyPluginTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/profile.png b/subprojects/docs/src/docs/userguide/img/profile.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/profile.png
rename to subprojects/docs/src/docs/userguide/img/profile.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/scalaPluginTasks.graphml b/subprojects/docs/src/docs/userguide/img/scalaPluginTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/scalaPluginTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/scalaPluginTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/scalaPluginTasks.png b/subprojects/docs/src/docs/userguide/img/scalaPluginTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/scalaPluginTasks.png
rename to subprojects/docs/src/docs/userguide/img/scalaPluginTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/warPluginTasks.graphml b/subprojects/docs/src/docs/userguide/img/warPluginTasks.graphml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/warPluginTasks.graphml
rename to subprojects/docs/src/docs/userguide/img/warPluginTasks.graphml
diff --git a/subprojects/gradle-docs/src/docs/userguide/img/warPluginTasks.png b/subprojects/docs/src/docs/userguide/img/warPluginTasks.png
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/img/warPluginTasks.png
rename to subprojects/docs/src/docs/userguide/img/warPluginTasks.png
diff --git a/subprojects/gradle-docs/src/docs/userguide/initscripts.xml b/subprojects/docs/src/docs/userguide/initscripts.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/initscripts.xml
rename to subprojects/docs/src/docs/userguide/initscripts.xml
diff --git a/subprojects/docs/src/docs/userguide/installation.xml b/subprojects/docs/src/docs/userguide/installation.xml
new file mode 100644
index 0000000..1fdfdf7
--- /dev/null
+++ b/subprojects/docs/src/docs/userguide/installation.xml
@@ -0,0 +1,122 @@
+<!--
+  ~ Copyright 2010 the original author or authors.
+  ~
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<chapter id="installation">
+<title>Installing Gradle</title>
+
+<section>
+    <title>Prerequisites</title>
+
+    <para>Gradle requires a Java JDK to be installed. Gradle requires a JDK 1.5 or higher. Gradle ships with its own
+        Groovy library, therefore no Groovy needs to be installed. Any existing Groovy installation is ignored by Gradle.
+    </para>
+
+    <para>Gradle uses whichever JDK it finds in your path (to check, use <userinput>java -version</userinput>).
+        Alternatively, you can set the <envar>JAVA_HOME</envar> environment variable to point to the install directory
+        of the desired JDK.
+    </para>
+</section>
+
+<section>
+    <title>Download</title>
+    <para>You can download one of the Gradle distributions from the <ulink url="website:downloads.html">Gradle web site</ulink>.</para>
+</section>
+
+<section>
+<title>Unpacking</title>
+
+<para>The Gradle distribution comes packaged as a ZIP. The full distribution contains:</para>
+
+<itemizedlist>
+    <listitem><para>The Gradle binaries.</para></listitem>
+    <listitem><para>The user guide (HTML and PDF).</para></listitem>
+    <listitem><para>The DSL reference guide.</para></listitem>
+    <listitem><para>The API documentation (Javadoc and Groovydoc).</para></listitem>
+    <listitem>
+        <para>Extensive samples, including the examples referenced in the user guide, along with some complete and more
+            complex builds you can use the starting point for your own build.
+        </para>
+    </listitem>
+    <listitem>
+        <para>The binary sources. This is for reference only. If you want to build Gradle you need to download the source distribution
+            or checkout the sources from the source repository. See the <ulink url="website:build.html">Gradle web site</ulink> for details).
+        </para>
+    </listitem>
+</itemizedlist>
+
+<note>
+<title>For Un*x users</title>
+
+<para>You need a GNU compatible tool to unzip Gradle, if you want the file permissions to be properly set. We mention this as
+some zip front ends for Mac OS X don't restore the file permissions properly.
+</para>
+</note>
+</section>
+
+<section>
+<title>Environment variables</title>
+
+<para>For running Gradle, add <filename><replaceable>GRADLE_HOME</replaceable>/bin</filename> to your <envar>PATH</envar>
+    environment variable. Usually, this is sufficient to run Gradle.
+</para>
+</section>
+
+<section>
+<title>Running and testing your installation</title>
+
+<para>You run Gradle via the <command>gradle</command> command. To check if Gradle is properly installed just type
+<command>gradle -v</command> and you should get an output like:
+</para>
+
+<screen>
+------------------------------------------------------------
+Gradle 0.9.2
+------------------------------------------------------------
+
+Gradle build time: Sunday, 23 January 2011 01:34:21 PM EST
+Groovy: 1.7.6
+Ant: Apache Ant version 1.8.1 compiled on April 30 2010
+Ivy: 2.2.0
+JVM: 1.6.0_22 (Sun Microsystems Inc. 17.1-b03)
+OS: Linux 2.6.35-23-generic amd64
+</screen>
+
+</section>
+
+<section>
+<title>JVM options</title>
+
+<para>JVM options for running Gradle can be set via environment variables. You can use <envar>GRADLE_OPTS</envar>
+or <envar>JAVA_OPTS</envar>. Those variables can be used together. <envar>JAVA_OPTS</envar> is by convention an environment
+variable shared by many Java applications. A typical use case would be to set the HTTP proxy in <envar>JAVA_OPTS</envar>
+and the memory options in <envar>GRADLE_OPTS</envar>. Those variables can also be set at the beginning
+of the <command>gradle</command> or <command>gradlew</command> script.
+</para>
+
+</section>
+
+<section condition="standalone">
+<title>Getting help</title>
+
+<para>You might check the user guide at <filename><replaceable>GRADLE_HOME</replaceable>/docs/userguide/userguide.html</filename>.
+It is also available on the <ulink url="website:documentation.html">Gradle web site</ulink>.
+Typing <command>gradle help</command> prints the command line help. Typing <command>gradle tasks</command> shows all the
+tasks of a Gradle build.
+</para>
+
+</section>
+
+</chapter>
diff --git a/subprojects/gradle-docs/src/docs/userguide/introduction.xml b/subprojects/docs/src/docs/userguide/introduction.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/introduction.xml
rename to subprojects/docs/src/docs/userguide/introduction.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/javaPlugin.xml b/subprojects/docs/src/docs/userguide/javaPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/javaPlugin.xml
rename to subprojects/docs/src/docs/userguide/javaPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/javaProjectGenericLayout.xml b/subprojects/docs/src/docs/userguide/javaProjectGenericLayout.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/javaProjectGenericLayout.xml
rename to subprojects/docs/src/docs/userguide/javaProjectGenericLayout.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/javaProjectMainLayout.xml b/subprojects/docs/src/docs/userguide/javaProjectMainLayout.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/javaProjectMainLayout.xml
rename to subprojects/docs/src/docs/userguide/javaProjectMainLayout.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/javaProjectTestLayout.xml b/subprojects/docs/src/docs/userguide/javaProjectTestLayout.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/javaProjectTestLayout.xml
rename to subprojects/docs/src/docs/userguide/javaProjectTestLayout.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/javaTutorial.xml b/subprojects/docs/src/docs/userguide/javaTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/javaTutorial.xml
rename to subprojects/docs/src/docs/userguide/javaTutorial.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/jettyPlugin.xml b/subprojects/docs/src/docs/userguide/jettyPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/jettyPlugin.xml
rename to subprojects/docs/src/docs/userguide/jettyPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/logging.xml b/subprojects/docs/src/docs/userguide/logging.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/logging.xml
rename to subprojects/docs/src/docs/userguide/logging.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/mavenPlugin.xml b/subprojects/docs/src/docs/userguide/mavenPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/mavenPlugin.xml
rename to subprojects/docs/src/docs/userguide/mavenPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/multiproject.xml b/subprojects/docs/src/docs/userguide/multiproject.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/multiproject.xml
rename to subprojects/docs/src/docs/userguide/multiproject.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/organizeBuildLogic.xml b/subprojects/docs/src/docs/userguide/organizeBuildLogic.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/organizeBuildLogic.xml
rename to subprojects/docs/src/docs/userguide/organizeBuildLogic.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/osgi.xml b/subprojects/docs/src/docs/userguide/osgi.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/osgi.xml
rename to subprojects/docs/src/docs/userguide/osgi.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/overview.xml b/subprojects/docs/src/docs/userguide/overview.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/overview.xml
rename to subprojects/docs/src/docs/userguide/overview.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/plugins.xml b/subprojects/docs/src/docs/userguide/plugins.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/plugins.xml
rename to subprojects/docs/src/docs/userguide/plugins.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/potentialTraps.xml b/subprojects/docs/src/docs/userguide/potentialTraps.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/potentialTraps.xml
rename to subprojects/docs/src/docs/userguide/potentialTraps.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/projectReports.xml b/subprojects/docs/src/docs/userguide/projectReports.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/projectReports.xml
rename to subprojects/docs/src/docs/userguide/projectReports.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/reportingBasePluginProperties.xml b/subprojects/docs/src/docs/userguide/reportingBasePluginProperties.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/reportingBasePluginProperties.xml
rename to subprojects/docs/src/docs/userguide/reportingBasePluginProperties.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/scalaPlugin.xml b/subprojects/docs/src/docs/userguide/scalaPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/scalaPlugin.xml
rename to subprojects/docs/src/docs/userguide/scalaPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/standardPlugins.xml b/subprojects/docs/src/docs/userguide/standardPlugins.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/standardPlugins.xml
rename to subprojects/docs/src/docs/userguide/standardPlugins.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/tasks.xml b/subprojects/docs/src/docs/userguide/tasks.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/tasks.xml
rename to subprojects/docs/src/docs/userguide/tasks.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/thisAndThat.xml b/subprojects/docs/src/docs/userguide/thisAndThat.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/thisAndThat.xml
rename to subprojects/docs/src/docs/userguide/thisAndThat.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/tutorials.xml b/subprojects/docs/src/docs/userguide/tutorials.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/tutorials.xml
rename to subprojects/docs/src/docs/userguide/tutorials.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/userguide.xml b/subprojects/docs/src/docs/userguide/userguide.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/userguide.xml
rename to subprojects/docs/src/docs/userguide/userguide.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/warPlugin.xml b/subprojects/docs/src/docs/userguide/warPlugin.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/warPlugin.xml
rename to subprojects/docs/src/docs/userguide/warPlugin.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/webTutorial.xml b/subprojects/docs/src/docs/userguide/webTutorial.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/webTutorial.xml
rename to subprojects/docs/src/docs/userguide/webTutorial.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/workingWithFiles.xml b/subprojects/docs/src/docs/userguide/workingWithFiles.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/workingWithFiles.xml
rename to subprojects/docs/src/docs/userguide/workingWithFiles.xml
diff --git a/subprojects/gradle-docs/src/docs/userguide/writingBuildScripts.xml b/subprojects/docs/src/docs/userguide/writingBuildScripts.xml
similarity index 100%
rename from subprojects/gradle-docs/src/docs/userguide/writingBuildScripts.xml
rename to subprojects/docs/src/docs/userguide/writingBuildScripts.xml
diff --git a/subprojects/gradle-docs/src/samples/announce/build.gradle b/subprojects/docs/src/samples/announce/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/announce/build.gradle
rename to subprojects/docs/src/samples/announce/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/announce/readme.xml b/subprojects/docs/src/samples/announce/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/announce/readme.xml
rename to subprojects/docs/src/samples/announce/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/antlr/build.gradle b/subprojects/docs/src/samples/antlr/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/antlr/build.gradle
rename to subprojects/docs/src/samples/antlr/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/antlr/src/main/antlr/org/gradle/Calculator.g b/subprojects/docs/src/samples/antlr/src/main/antlr/org/gradle/Calculator.g
similarity index 100%
rename from subprojects/gradle-docs/src/samples/antlr/src/main/antlr/org/gradle/Calculator.g
rename to subprojects/docs/src/samples/antlr/src/main/antlr/org/gradle/Calculator.g
diff --git a/subprojects/gradle-docs/src/samples/antlr/src/test/java/org/gradle/GrammarTest.java b/subprojects/docs/src/samples/antlr/src/test/java/org/gradle/GrammarTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/antlr/src/test/java/org/gradle/GrammarTest.java
rename to subprojects/docs/src/samples/antlr/src/test/java/org/gradle/GrammarTest.java
diff --git a/subprojects/gradle-docs/src/samples/clientModuleDependencies/api/build.gradle b/subprojects/docs/src/samples/clientModuleDependencies/api/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/clientModuleDependencies/api/build.gradle
rename to subprojects/docs/src/samples/clientModuleDependencies/api/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/clientModuleDependencies/build.gradle b/subprojects/docs/src/samples/clientModuleDependencies/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/clientModuleDependencies/build.gradle
rename to subprojects/docs/src/samples/clientModuleDependencies/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/clientModuleDependencies/settings.gradle b/subprojects/docs/src/samples/clientModuleDependencies/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/clientModuleDependencies/settings.gradle
rename to subprojects/docs/src/samples/clientModuleDependencies/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/clientModuleDependencies/shared/build.gradle b/subprojects/docs/src/samples/clientModuleDependencies/shared/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/clientModuleDependencies/shared/build.gradle
rename to subprojects/docs/src/samples/clientModuleDependencies/shared/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/clientModuleDependencies/shared/src/main/java/SomeClass.java b/subprojects/docs/src/samples/clientModuleDependencies/shared/src/main/java/SomeClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/clientModuleDependencies/shared/src/main/java/SomeClass.java
rename to subprojects/docs/src/samples/clientModuleDependencies/shared/src/main/java/SomeClass.java
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/build.gradle b/subprojects/docs/src/samples/codeQuality/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/build.gradle
rename to subprojects/docs/src/samples/codeQuality/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/config/checkstyle/checkstyle.xml b/subprojects/docs/src/samples/codeQuality/config/checkstyle/checkstyle.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/config/checkstyle/checkstyle.xml
rename to subprojects/docs/src/samples/codeQuality/config/checkstyle/checkstyle.xml
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/config/codenarc/codenarc.xml b/subprojects/docs/src/samples/codeQuality/config/codenarc/codenarc.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/config/codenarc/codenarc.xml
rename to subprojects/docs/src/samples/codeQuality/config/codenarc/codenarc.xml
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/readme.xml b/subprojects/docs/src/samples/codeQuality/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/readme.xml
rename to subprojects/docs/src/samples/codeQuality/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/src/main/groovy/org/gradle/sample/GroovyPerson.groovy b/subprojects/docs/src/samples/codeQuality/src/main/groovy/org/gradle/sample/GroovyPerson.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/src/main/groovy/org/gradle/sample/GroovyPerson.groovy
rename to subprojects/docs/src/samples/codeQuality/src/main/groovy/org/gradle/sample/GroovyPerson.groovy
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/src/main/java/org/gradle/sample/Person.java b/subprojects/docs/src/samples/codeQuality/src/main/java/org/gradle/sample/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/src/main/java/org/gradle/sample/Person.java
rename to subprojects/docs/src/samples/codeQuality/src/main/java/org/gradle/sample/Person.java
diff --git a/subprojects/gradle-docs/src/samples/codeQuality/src/test/groovy/org/gradle/sample/PersonTest.groovy b/subprojects/docs/src/samples/codeQuality/src/test/groovy/org/gradle/sample/PersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/codeQuality/src/test/groovy/org/gradle/sample/PersonTest.groovy
rename to subprojects/docs/src/samples/codeQuality/src/test/groovy/org/gradle/sample/PersonTest.groovy
diff --git a/subprojects/docs/src/samples/customBuildLanguage/basicEdition/build.gradle b/subprojects/docs/src/samples/customBuildLanguage/basicEdition/build.gradle
new file mode 100644
index 0000000..eb9a4e7
--- /dev/null
+++ b/subprojects/docs/src/samples/customBuildLanguage/basicEdition/build.gradle
@@ -0,0 +1,9 @@
+apply plugin: 'product'
+
+// A custom build element. This defines the product to build
+product {
+    displayName 'Basic Edition'
+    // Which modules to include in this product?
+    module project(':identityManagement')
+    module project(':billing')
+}
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/basicEdition/src/dist/end-user-license-agreement.txt b/subprojects/docs/src/samples/customBuildLanguage/basicEdition/src/dist/end-user-license-agreement.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/basicEdition/src/dist/end-user-license-agreement.txt
rename to subprojects/docs/src/samples/customBuildLanguage/basicEdition/src/dist/end-user-license-agreement.txt
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/billing/build.gradle b/subprojects/docs/src/samples/customBuildLanguage/billing/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/billing/build.gradle
rename to subprojects/docs/src/samples/customBuildLanguage/billing/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/build.gradle b/subprojects/docs/src/samples/customBuildLanguage/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/build.gradle
rename to subprojects/docs/src/samples/customBuildLanguage/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductDefinition.groovy b/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductDefinition.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductDefinition.groovy
rename to subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductDefinition.groovy
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductModulePlugin.groovy b/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductModulePlugin.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductModulePlugin.groovy
rename to subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductModulePlugin.groovy
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPlugin.groovy b/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPlugin.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPlugin.groovy
rename to subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPlugin.groovy
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPluginConvention.groovy b/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPluginConvention.groovy
rename to subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/groovy/org/gradle/samples/ProductPluginConvention.groovy
diff --git a/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/resources/META-INF/gradle-plugins/product.properties b/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/resources/META-INF/gradle-plugins/product.properties
new file mode 100644
index 0000000..c9bcff1
--- /dev/null
+++ b/subprojects/docs/src/samples/customBuildLanguage/buildSrc/src/main/resources/META-INF/gradle-plugins/product.properties
@@ -0,0 +1 @@
+implementation-class=org.gradle.samples.ProductPlugin
\ No newline at end of file
diff --git a/subprojects/docs/src/samples/customBuildLanguage/enterpriseEdition/build.gradle b/subprojects/docs/src/samples/customBuildLanguage/enterpriseEdition/build.gradle
new file mode 100644
index 0000000..66caa50
--- /dev/null
+++ b/subprojects/docs/src/samples/customBuildLanguage/enterpriseEdition/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'product'
+
+// A custom build element. This defines the product to build
+product {
+    displayName 'Enterprise Edition'
+    // Which modules to include in this product?
+    module project(':identityManagement')
+    module project(':billing')
+    module project(':reporting')
+}
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/enterpriseEdition/src/dist/end-user-license-agreement.txt b/subprojects/docs/src/samples/customBuildLanguage/enterpriseEdition/src/dist/end-user-license-agreement.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/enterpriseEdition/src/dist/end-user-license-agreement.txt
rename to subprojects/docs/src/samples/customBuildLanguage/enterpriseEdition/src/dist/end-user-license-agreement.txt
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/identityManagement/build.gradle b/subprojects/docs/src/samples/customBuildLanguage/identityManagement/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/identityManagement/build.gradle
rename to subprojects/docs/src/samples/customBuildLanguage/identityManagement/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/readme.xml b/subprojects/docs/src/samples/customBuildLanguage/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/readme.xml
rename to subprojects/docs/src/samples/customBuildLanguage/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/reporting/build.gradle b/subprojects/docs/src/samples/customBuildLanguage/reporting/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/reporting/build.gradle
rename to subprojects/docs/src/samples/customBuildLanguage/reporting/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/settings.gradle b/subprojects/docs/src/samples/customBuildLanguage/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/settings.gradle
rename to subprojects/docs/src/samples/customBuildLanguage/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/src/dist/bin/start.sh b/subprojects/docs/src/samples/customBuildLanguage/src/dist/bin/start.sh
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/src/dist/bin/start.sh
rename to subprojects/docs/src/samples/customBuildLanguage/src/dist/bin/start.sh
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/src/dist/readme.txt b/subprojects/docs/src/samples/customBuildLanguage/src/dist/readme.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customBuildLanguage/src/dist/readme.txt
rename to subprojects/docs/src/samples/customBuildLanguage/src/dist/readme.txt
diff --git a/subprojects/docs/src/samples/customPlugin/build.gradle b/subprojects/docs/src/samples/customPlugin/build.gradle
new file mode 100644
index 0000000..9b93b92
--- /dev/null
+++ b/subprojects/docs/src/samples/customPlugin/build.gradle
@@ -0,0 +1,29 @@
+// START SNIPPET use-plugin
+apply plugin: 'groovy'
+
+dependencies {
+    compile gradleApi()
+}
+// END SNIPPET use-plugin
+
+apply plugin: 'maven'
+
+repositories {
+    mavenCentral()
+}
+
+dependencies {
+    groovy localGroovy()
+    testCompile 'junit:junit:4.7'
+}
+
+group = 'org.gradle'
+version = '1.0-SNAPSHOT'
+
+uploadArchives {
+    repositories {
+        mavenDeployer {
+            repository(url: uri('repo'))
+        }
+    }
+}
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/readme.xml b/subprojects/docs/src/samples/customPlugin/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customPlugin/readme.xml
rename to subprojects/docs/src/samples/customPlugin/readme.xml
diff --git a/subprojects/docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingPlugin.groovy b/subprojects/docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingPlugin.groovy
new file mode 100644
index 0000000..a5cc9ec
--- /dev/null
+++ b/subprojects/docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingPlugin.groovy
@@ -0,0 +1,10 @@
+package org.gradle
+
+import org.gradle.api.Project
+import org.gradle.api.Plugin
+
+class GreetingPlugin implements Plugin<Project> {
+    void apply(Project target) {
+        target.task('hello', type: GreetingTask)
+    }
+}
diff --git a/subprojects/docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingTask.groovy b/subprojects/docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingTask.groovy
new file mode 100644
index 0000000..4f8ebd5
--- /dev/null
+++ b/subprojects/docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingTask.groovy
@@ -0,0 +1,13 @@
+package org.gradle
+
+import org.gradle.api.DefaultTask
+import org.gradle.api.tasks.TaskAction
+
+class GreetingTask extends DefaultTask {
+    String greeting = 'hello from GreetingTask'
+
+    @TaskAction
+    def greet() {
+        println greeting
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/src/main/resources/META-INF/gradle-plugins/greeting.properties b/subprojects/docs/src/samples/customPlugin/src/main/resources/META-INF/gradle-plugins/greeting.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customPlugin/src/main/resources/META-INF/gradle-plugins/greeting.properties
rename to subprojects/docs/src/samples/customPlugin/src/main/resources/META-INF/gradle-plugins/greeting.properties
diff --git a/subprojects/docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingPluginTest.groovy b/subprojects/docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingPluginTest.groovy
new file mode 100644
index 0000000..ab87279
--- /dev/null
+++ b/subprojects/docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingPluginTest.groovy
@@ -0,0 +1,18 @@
+package org.gradle
+
+import org.junit.Test
+import org.gradle.testfixtures.ProjectBuilder
+import org.gradle.api.Project
+import static org.junit.Assert.*
+
+// START SNIPPET test-plugin
+class GreetingPluginTest {
+    @Test
+    public void greeterPluginAddsGreetingTaskToProject() {
+        Project project = ProjectBuilder.builder().build()
+        project.apply plugin: 'greeting'
+
+        assertTrue(project.tasks.hello instanceof GreetingTask)
+    }
+}
+// END SNIPPET test-plugin
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingTaskTest.groovy b/subprojects/docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingTaskTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingTaskTest.groovy
rename to subprojects/docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingTaskTest.groovy
diff --git a/subprojects/docs/src/samples/customPlugin/usesCustomPlugin.gradle b/subprojects/docs/src/samples/customPlugin/usesCustomPlugin.gradle
new file mode 100644
index 0000000..d600e09
--- /dev/null
+++ b/subprojects/docs/src/samples/customPlugin/usesCustomPlugin.gradle
@@ -0,0 +1,12 @@
+// START SNIPPET use-plugin
+buildscript {
+    repositories {
+        mavenRepo urls: uri('repo')
+    }
+    dependencies {
+        classpath group: 'org.gradle', name: 'customPlugin', version: '1.0-SNAPSHOT'
+    }
+}
+
+apply plugin: 'greeting'
+// END SNIPPET use-plugin
diff --git a/subprojects/docs/src/samples/customPlugin/usesCustomTask.gradle b/subprojects/docs/src/samples/customPlugin/usesCustomTask.gradle
new file mode 100644
index 0000000..c062c12
--- /dev/null
+++ b/subprojects/docs/src/samples/customPlugin/usesCustomTask.gradle
@@ -0,0 +1,14 @@
+// START SNIPPET use-task
+buildscript {
+    repositories {
+        mavenRepo urls: uri('repo')
+    }
+    dependencies {
+        classpath group: 'org.gradle', name: 'customPlugin', version: '1.0-SNAPSHOT'
+    }
+}
+
+task greeting(type: org.gradle.GreetingTask) {
+    greeting = 'howdy!'
+}
+// END SNIPPET use-task
diff --git a/subprojects/gradle-docs/src/samples/dependencies/build.gradle b/subprojects/docs/src/samples/dependencies/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/dependencies/build.gradle
rename to subprojects/docs/src/samples/dependencies/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/dependencies/repo/sea.fish/ivy-billfish-1.0.xml b/subprojects/docs/src/samples/dependencies/repo/sea.fish/ivy-billfish-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/dependencies/repo/sea.fish/ivy-billfish-1.0.xml
rename to subprojects/docs/src/samples/dependencies/repo/sea.fish/ivy-billfish-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/dependencies/repo/sea.fish/ivy-shark-1.0.xml b/subprojects/docs/src/samples/dependencies/repo/sea.fish/ivy-shark-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/dependencies/repo/sea.fish/ivy-shark-1.0.xml
rename to subprojects/docs/src/samples/dependencies/repo/sea.fish/ivy-shark-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/dependencies/repo/sea.fish/ivy-tuna-1.0.xml b/subprojects/docs/src/samples/dependencies/repo/sea.fish/ivy-tuna-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/dependencies/repo/sea.fish/ivy-tuna-1.0.xml
rename to subprojects/docs/src/samples/dependencies/repo/sea.fish/ivy-tuna-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/dependencies/repo/sea.mammals/ivy-orca-1.0.xml b/subprojects/docs/src/samples/dependencies/repo/sea.mammals/ivy-orca-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/dependencies/repo/sea.mammals/ivy-orca-1.0.xml
rename to subprojects/docs/src/samples/dependencies/repo/sea.mammals/ivy-orca-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/dependencies/settings.gradle b/subprojects/docs/src/samples/dependencies/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/dependencies/settings.gradle
rename to subprojects/docs/src/samples/dependencies/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/eclipse/build.gradle b/subprojects/docs/src/samples/eclipse/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/eclipse/build.gradle
rename to subprojects/docs/src/samples/eclipse/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/customizedLayout/build.gradle b/subprojects/docs/src/samples/groovy/customizedLayout/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/customizedLayout/build.gradle
rename to subprojects/docs/src/samples/groovy/customizedLayout/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/customizedLayout/readme.xml b/subprojects/docs/src/samples/groovy/customizedLayout/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/customizedLayout/readme.xml
rename to subprojects/docs/src/samples/groovy/customizedLayout/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/groovy/customizedLayout/src/groovy/org/gradle/Person.groovy b/subprojects/docs/src/samples/groovy/customizedLayout/src/groovy/org/gradle/Person.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/customizedLayout/src/groovy/org/gradle/Person.groovy
rename to subprojects/docs/src/samples/groovy/customizedLayout/src/groovy/org/gradle/Person.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/customizedLayout/test/groovy/org/gradle/PersonTest.groovy b/subprojects/docs/src/samples/groovy/customizedLayout/test/groovy/org/gradle/PersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/customizedLayout/test/groovy/org/gradle/PersonTest.groovy
rename to subprojects/docs/src/samples/groovy/customizedLayout/test/groovy/org/gradle/PersonTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/build.gradle b/subprojects/docs/src/samples/groovy/groovy-1.5.6/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/build.gradle
rename to subprojects/docs/src/samples/groovy/groovy-1.5.6/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/readme.xml b/subprojects/docs/src/samples/groovy/groovy-1.5.6/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/readme.xml
rename to subprojects/docs/src/samples/groovy/groovy-1.5.6/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/src/main/groovy/org/gradle/Person.groovy b/subprojects/docs/src/samples/groovy/groovy-1.5.6/src/main/groovy/org/gradle/Person.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/src/main/groovy/org/gradle/Person.groovy
rename to subprojects/docs/src/samples/groovy/groovy-1.5.6/src/main/groovy/org/gradle/Person.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/src/test/groovy/org/gradle/PersonTest.groovy b/subprojects/docs/src/samples/groovy/groovy-1.5.6/src/test/groovy/org/gradle/PersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.5.6/src/test/groovy/org/gradle/PersonTest.groovy
rename to subprojects/docs/src/samples/groovy/groovy-1.5.6/src/test/groovy/org/gradle/PersonTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/build.gradle b/subprojects/docs/src/samples/groovy/groovy-1.6.7/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/build.gradle
rename to subprojects/docs/src/samples/groovy/groovy-1.6.7/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/readme.xml b/subprojects/docs/src/samples/groovy/groovy-1.6.7/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/readme.xml
rename to subprojects/docs/src/samples/groovy/groovy-1.6.7/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/src/main/groovy/org/gradle/Person.groovy b/subprojects/docs/src/samples/groovy/groovy-1.6.7/src/main/groovy/org/gradle/Person.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/src/main/groovy/org/gradle/Person.groovy
rename to subprojects/docs/src/samples/groovy/groovy-1.6.7/src/main/groovy/org/gradle/Person.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/src/test/groovy/org/gradle/PersonTest.groovy b/subprojects/docs/src/samples/groovy/groovy-1.6.7/src/test/groovy/org/gradle/PersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/groovy-1.6.7/src/test/groovy/org/gradle/PersonTest.groovy
rename to subprojects/docs/src/samples/groovy/groovy-1.6.7/src/test/groovy/org/gradle/PersonTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/build.gradle b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/build.gradle
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/readme.xml b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/readme.xml
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/GroovyPerson.groovy b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/GroovyPerson.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/GroovyPerson.groovy
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/GroovyPerson.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/JavaPerson.java b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/JavaPerson.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/JavaPerson.java
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/JavaPerson.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/PersonList.groovy b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/PersonList.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/PersonList.groovy
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/groovy/org/gradle/PersonList.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/java/org/gradle/Person.java b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/main/java/org/gradle/Person.java
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/test/groovy/org/gradle/PersonTest.groovy b/subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/test/groovy/org/gradle/PersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/mixedJavaAndGroovy/src/test/groovy/org/gradle/PersonTest.groovy
rename to subprojects/docs/src/samples/groovy/mixedJavaAndGroovy/src/test/groovy/org/gradle/PersonTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/build.gradle b/subprojects/docs/src/samples/groovy/multiproject/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/build.gradle
rename to subprojects/docs/src/samples/groovy/multiproject/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/buildSrc/src/main/groovy/org/gradle/buildsrc/BuildSrcClass.java b/subprojects/docs/src/samples/groovy/multiproject/buildSrc/src/main/groovy/org/gradle/buildsrc/BuildSrcClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/buildSrc/src/main/groovy/org/gradle/buildsrc/BuildSrcClass.java
rename to subprojects/docs/src/samples/groovy/multiproject/buildSrc/src/main/groovy/org/gradle/buildsrc/BuildSrcClass.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/groovycDetector/build.gradle b/subprojects/docs/src/samples/groovy/multiproject/groovycDetector/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/groovycDetector/build.gradle
rename to subprojects/docs/src/samples/groovy/multiproject/groovycDetector/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/groovycDetector/src/main/java/org/gradle/test/DetectorTransform.java b/subprojects/docs/src/samples/groovy/multiproject/groovycDetector/src/main/java/org/gradle/test/DetectorTransform.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/groovycDetector/src/main/java/org/gradle/test/DetectorTransform.java
rename to subprojects/docs/src/samples/groovy/multiproject/groovycDetector/src/main/java/org/gradle/test/DetectorTransform.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/groovycDetector/src/main/resources/META-INF/services/org.codehaus.groovy.transform.ASTTransformation b/subprojects/docs/src/samples/groovy/multiproject/groovycDetector/src/main/resources/META-INF/services/org.codehaus.groovy.transform.ASTTransformation
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/groovycDetector/src/main/resources/META-INF/services/org.codehaus.groovy.transform.ASTTransformation
rename to subprojects/docs/src/samples/groovy/multiproject/groovycDetector/src/main/resources/META-INF/services/org.codehaus.groovy.transform.ASTTransformation
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/readme.xml b/subprojects/docs/src/samples/groovy/multiproject/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/readme.xml
rename to subprojects/docs/src/samples/groovy/multiproject/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/settings.gradle b/subprojects/docs/src/samples/groovy/multiproject/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/settings.gradle
rename to subprojects/docs/src/samples/groovy/multiproject/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/build.gradle b/subprojects/docs/src/samples/groovy/multiproject/testproject/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/build.gradle
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovy.groovy b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovy.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovy.groovy
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovy.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovyJava.java b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovyJava.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovyJava.java
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/ExcludeGroovyJava.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyJavaPerson.java b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyJavaPerson.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyJavaPerson.java
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyJavaPerson.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyPerson.groovy b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyPerson.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyPerson.groovy
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/groovy/org/gradle/GroovyPerson.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/ExcludeJava.java b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/ExcludeJava.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/ExcludeJava.java
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/ExcludeJava.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/JavaPerson.java b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/JavaPerson.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/JavaPerson.java
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/java/org/gradle/JavaPerson.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/resources/org/gradle/main.properties b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/resources/org/gradle/main.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/main/resources/org/gradle/main.properties
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/main/resources/org/gradle/main.properties
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/metaInfFiles/myfile b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/metaInfFiles/myfile
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/metaInfFiles/myfile
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/metaInfFiles/myfile
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyJavaPersonTest.java b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyJavaPersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyJavaPersonTest.java
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyJavaPersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyPersonTest.groovy b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyPersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyPersonTest.groovy
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/GroovyPersonTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/VersionTest.groovy b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/VersionTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/VersionTest.groovy
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/groovy/org/gradle/VersionTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/java/org/gradle/JavaPersonTest.java b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/java/org/gradle/JavaPersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/java/org/gradle/JavaPersonTest.java
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/java/org/gradle/JavaPersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/resources/org/gradle/test.properties b/subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/resources/org/gradle/test.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/multiproject/testproject/src/test/resources/org/gradle/test.properties
rename to subprojects/docs/src/samples/groovy/multiproject/testproject/src/test/resources/org/gradle/test.properties
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/build.gradle b/subprojects/docs/src/samples/groovy/quickstart/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/build.gradle
rename to subprojects/docs/src/samples/groovy/quickstart/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/readme.xml b/subprojects/docs/src/samples/groovy/quickstart/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/readme.xml
rename to subprojects/docs/src/samples/groovy/quickstart/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/src/main/groovy/org/gradle/Person.groovy b/subprojects/docs/src/samples/groovy/quickstart/src/main/groovy/org/gradle/Person.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/src/main/groovy/org/gradle/Person.groovy
rename to subprojects/docs/src/samples/groovy/quickstart/src/main/groovy/org/gradle/Person.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/src/main/resources/resource.txt b/subprojects/docs/src/samples/groovy/quickstart/src/main/resources/resource.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/src/main/resources/resource.txt
rename to subprojects/docs/src/samples/groovy/quickstart/src/main/resources/resource.txt
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/src/main/resources/script.groovy b/subprojects/docs/src/samples/groovy/quickstart/src/main/resources/script.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/src/main/resources/script.groovy
rename to subprojects/docs/src/samples/groovy/quickstart/src/main/resources/script.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/src/test/groovy/org/gradle/PersonTest.groovy b/subprojects/docs/src/samples/groovy/quickstart/src/test/groovy/org/gradle/PersonTest.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/src/test/groovy/org/gradle/PersonTest.groovy
rename to subprojects/docs/src/samples/groovy/quickstart/src/test/groovy/org/gradle/PersonTest.groovy
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/src/test/resources/testResource.txt b/subprojects/docs/src/samples/groovy/quickstart/src/test/resources/testResource.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/src/test/resources/testResource.txt
rename to subprojects/docs/src/samples/groovy/quickstart/src/test/resources/testResource.txt
diff --git a/subprojects/gradle-docs/src/samples/groovy/quickstart/src/test/resources/testScript.groovy b/subprojects/docs/src/samples/groovy/quickstart/src/test/resources/testScript.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/groovy/quickstart/src/test/resources/testScript.groovy
rename to subprojects/docs/src/samples/groovy/quickstart/src/test/resources/testScript.groovy
diff --git a/subprojects/gradle-docs/src/samples/idea/build.gradle b/subprojects/docs/src/samples/idea/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/idea/build.gradle
rename to subprojects/docs/src/samples/idea/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/build.gradle b/subprojects/docs/src/samples/ivypublish/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/build.gradle
rename to subprojects/docs/src/samples/ivypublish/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/build.xml b/subprojects/docs/src/samples/ivypublish/build.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/build.xml
rename to subprojects/docs/src/samples/ivypublish/build.xml
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/ivy.xml b/subprojects/docs/src/samples/ivypublish/ivy.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/ivy.xml
rename to subprojects/docs/src/samples/ivypublish/ivy.xml
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/ivysettings.xml b/subprojects/docs/src/samples/ivypublish/ivysettings.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/ivysettings.xml
rename to subprojects/docs/src/samples/ivypublish/ivysettings.xml
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/settings.gradle b/subprojects/docs/src/samples/ivypublish/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/settings.gradle
rename to subprojects/docs/src/samples/ivypublish/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/src/main/java/org/gradle/SomeClass.java b/subprojects/docs/src/samples/ivypublish/src/main/java/org/gradle/SomeClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/src/main/java/org/gradle/SomeClass.java
rename to subprojects/docs/src/samples/ivypublish/src/main/java/org/gradle/SomeClass.java
diff --git a/subprojects/gradle-docs/src/samples/ivypublish/subproject/src/main/java/org/gradle/shared/Person.java b/subprojects/docs/src/samples/ivypublish/subproject/src/main/java/org/gradle/shared/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/ivypublish/subproject/src/main/java/org/gradle/shared/Person.java
rename to subprojects/docs/src/samples/ivypublish/subproject/src/main/java/org/gradle/shared/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/base/build.gradle b/subprojects/docs/src/samples/java/base/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/build.gradle
rename to subprojects/docs/src/samples/java/base/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/base/prod/build.gradle b/subprojects/docs/src/samples/java/base/prod/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/prod/build.gradle
rename to subprojects/docs/src/samples/java/base/prod/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/base/prod/java/org/gradle/Person.java b/subprojects/docs/src/samples/java/base/prod/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/prod/java/org/gradle/Person.java
rename to subprojects/docs/src/samples/java/base/prod/java/org/gradle/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/base/readme.xml b/subprojects/docs/src/samples/java/base/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/readme.xml
rename to subprojects/docs/src/samples/java/base/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/java/base/settings.gradle b/subprojects/docs/src/samples/java/base/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/settings.gradle
rename to subprojects/docs/src/samples/java/base/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/base/test/build.gradle b/subprojects/docs/src/samples/java/base/test/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/test/build.gradle
rename to subprojects/docs/src/samples/java/base/test/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/base/test/java/org/gradle/PersonTest.java b/subprojects/docs/src/samples/java/base/test/java/org/gradle/PersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/base/test/java/org/gradle/PersonTest.java
rename to subprojects/docs/src/samples/java/base/test/java/org/gradle/PersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/customizedLayout/build.gradle b/subprojects/docs/src/samples/java/customizedLayout/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/customizedLayout/build.gradle
rename to subprojects/docs/src/samples/java/customizedLayout/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/customizedLayout/readme.xml b/subprojects/docs/src/samples/java/customizedLayout/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/customizedLayout/readme.xml
rename to subprojects/docs/src/samples/java/customizedLayout/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/java/customizedLayout/src/java/org/gradle/Person.java b/subprojects/docs/src/samples/java/customizedLayout/src/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/customizedLayout/src/java/org/gradle/Person.java
rename to subprojects/docs/src/samples/java/customizedLayout/src/java/org/gradle/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/customizedLayout/test/java/org/gradle/PersonTest.java b/subprojects/docs/src/samples/java/customizedLayout/test/java/org/gradle/PersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/customizedLayout/test/java/org/gradle/PersonTest.java
rename to subprojects/docs/src/samples/java/customizedLayout/test/java/org/gradle/PersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/api/build.gradle b/subprojects/docs/src/samples/java/multiproject/api/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/api/build.gradle
rename to subprojects/docs/src/samples/java/multiproject/api/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/api/src/dist/README.txt b/subprojects/docs/src/samples/java/multiproject/api/src/dist/README.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/api/src/dist/README.txt
rename to subprojects/docs/src/samples/java/multiproject/api/src/dist/README.txt
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/PersonList.java b/subprojects/docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/PersonList.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/PersonList.java
rename to subprojects/docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/PersonList.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/package.html b/subprojects/docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/package.html
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/package.html
rename to subprojects/docs/src/samples/java/multiproject/api/src/main/java/org/gradle/api/package.html
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/api/src/main/java/org/gradle/apiImpl/Impl.java b/subprojects/docs/src/samples/java/multiproject/api/src/main/java/org/gradle/apiImpl/Impl.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/api/src/main/java/org/gradle/apiImpl/Impl.java
rename to subprojects/docs/src/samples/java/multiproject/api/src/main/java/org/gradle/apiImpl/Impl.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/build.gradle b/subprojects/docs/src/samples/java/multiproject/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/build.gradle
rename to subprojects/docs/src/samples/java/multiproject/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/buildSrc/build.gradle b/subprojects/docs/src/samples/java/multiproject/buildSrc/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/buildSrc/build.gradle
rename to subprojects/docs/src/samples/java/multiproject/buildSrc/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/buildSrc/src/main/java/org/gradle/buildsrc/BuildSrcClass.java b/subprojects/docs/src/samples/java/multiproject/buildSrc/src/main/java/org/gradle/buildsrc/BuildSrcClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/buildSrc/src/main/java/org/gradle/buildsrc/BuildSrcClass.java
rename to subprojects/docs/src/samples/java/multiproject/buildSrc/src/main/java/org/gradle/buildsrc/BuildSrcClass.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/buildSrc/src/test/java/org/gradle/buildsrc/BuildSrcClassTest.java b/subprojects/docs/src/samples/java/multiproject/buildSrc/src/test/java/org/gradle/buildsrc/BuildSrcClassTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/buildSrc/src/test/java/org/gradle/buildsrc/BuildSrcClassTest.java
rename to subprojects/docs/src/samples/java/multiproject/buildSrc/src/test/java/org/gradle/buildsrc/BuildSrcClassTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/readme.xml b/subprojects/docs/src/samples/java/multiproject/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/readme.xml
rename to subprojects/docs/src/samples/java/multiproject/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/services/shared/build.gradle b/subprojects/docs/src/samples/java/multiproject/services/shared/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/services/shared/build.gradle
rename to subprojects/docs/src/samples/java/multiproject/services/shared/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/services/shared/src/main/java/org/gradle/services/shared/TestTest.java b/subprojects/docs/src/samples/java/multiproject/services/shared/src/main/java/org/gradle/services/shared/TestTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/services/shared/src/main/java/org/gradle/services/shared/TestTest.java
rename to subprojects/docs/src/samples/java/multiproject/services/shared/src/main/java/org/gradle/services/shared/TestTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/services/webservice/build.gradle b/subprojects/docs/src/samples/java/multiproject/services/webservice/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/services/webservice/build.gradle
rename to subprojects/docs/src/samples/java/multiproject/services/webservice/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/services/webservice/src/main/java/org/gradle/webservice/TestTest.java b/subprojects/docs/src/samples/java/multiproject/services/webservice/src/main/java/org/gradle/webservice/TestTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/services/webservice/src/main/java/org/gradle/webservice/TestTest.java
rename to subprojects/docs/src/samples/java/multiproject/services/webservice/src/main/java/org/gradle/webservice/TestTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/services/webservice/src/test/java/org/gradle/webservice/TestTestTest.java b/subprojects/docs/src/samples/java/multiproject/services/webservice/src/test/java/org/gradle/webservice/TestTestTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/services/webservice/src/test/java/org/gradle/webservice/TestTestTest.java
rename to subprojects/docs/src/samples/java/multiproject/services/webservice/src/test/java/org/gradle/webservice/TestTestTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/settings.gradle b/subprojects/docs/src/samples/java/multiproject/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/settings.gradle
rename to subprojects/docs/src/samples/java/multiproject/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/Person.java b/subprojects/docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/Person.java
rename to subprojects/docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/package-info.java b/subprojects/docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/package-info.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/package-info.java
rename to subprojects/docs/src/samples/java/multiproject/shared/src/main/java/org/gradle/shared/package-info.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/shared/src/main/resources/org/gradle/shared/main.properties b/subprojects/docs/src/samples/java/multiproject/shared/src/main/resources/org/gradle/shared/main.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/shared/src/main/resources/org/gradle/shared/main.properties
rename to subprojects/docs/src/samples/java/multiproject/shared/src/main/resources/org/gradle/shared/main.properties
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/shared/src/test/java/org/gradle/shared/PersonTest.java b/subprojects/docs/src/samples/java/multiproject/shared/src/test/java/org/gradle/shared/PersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/shared/src/test/java/org/gradle/shared/PersonTest.java
rename to subprojects/docs/src/samples/java/multiproject/shared/src/test/java/org/gradle/shared/PersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/multiproject/shared/src/test/resources/org/gradle/shared/test.properties b/subprojects/docs/src/samples/java/multiproject/shared/src/test/resources/org/gradle/shared/test.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/multiproject/shared/src/test/resources/org/gradle/shared/test.properties
rename to subprojects/docs/src/samples/java/multiproject/shared/src/test/resources/org/gradle/shared/test.properties
diff --git a/subprojects/gradle-docs/src/samples/java/onlyif/build.gradle b/subprojects/docs/src/samples/java/onlyif/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/onlyif/build.gradle
rename to subprojects/docs/src/samples/java/onlyif/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/onlyif/src/main/java/org/gradle/Person.java b/subprojects/docs/src/samples/java/onlyif/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/onlyif/src/main/java/org/gradle/Person.java
rename to subprojects/docs/src/samples/java/onlyif/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/onlyif/src/test/java/org/gradle/PersonTest.java b/subprojects/docs/src/samples/java/onlyif/src/test/java/org/gradle/PersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/onlyif/src/test/java/org/gradle/PersonTest.java
rename to subprojects/docs/src/samples/java/onlyif/src/test/java/org/gradle/PersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/quickstart/build.gradle b/subprojects/docs/src/samples/java/quickstart/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/quickstart/build.gradle
rename to subprojects/docs/src/samples/java/quickstart/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/quickstart/readme.xml b/subprojects/docs/src/samples/java/quickstart/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/quickstart/readme.xml
rename to subprojects/docs/src/samples/java/quickstart/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/java/quickstart/src/main/java/org/gradle/Person.java b/subprojects/docs/src/samples/java/quickstart/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/quickstart/src/main/java/org/gradle/Person.java
rename to subprojects/docs/src/samples/java/quickstart/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/quickstart/src/test/java/org/gradle/PersonTest.java b/subprojects/docs/src/samples/java/quickstart/src/test/java/org/gradle/PersonTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/quickstart/src/test/java/org/gradle/PersonTest.java
rename to subprojects/docs/src/samples/java/quickstart/src/test/java/org/gradle/PersonTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/testListener/build.gradle b/subprojects/docs/src/samples/java/testListener/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/testListener/build.gradle
rename to subprojects/docs/src/samples/java/testListener/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/testListener/src/test/java/org/gradle/DoNothingTest.java b/subprojects/docs/src/samples/java/testListener/src/test/java/org/gradle/DoNothingTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/testListener/src/test/java/org/gradle/DoNothingTest.java
rename to subprojects/docs/src/samples/java/testListener/src/test/java/org/gradle/DoNothingTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/withIntegrationTests/build.gradle b/subprojects/docs/src/samples/java/withIntegrationTests/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/withIntegrationTests/build.gradle
rename to subprojects/docs/src/samples/java/withIntegrationTests/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/java/withIntegrationTests/readme.xml b/subprojects/docs/src/samples/java/withIntegrationTests/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/withIntegrationTests/readme.xml
rename to subprojects/docs/src/samples/java/withIntegrationTests/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/integration-test/java/org/gradle/PersonIntegrationTest.java b/subprojects/docs/src/samples/java/withIntegrationTests/src/integration-test/java/org/gradle/PersonIntegrationTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/integration-test/java/org/gradle/PersonIntegrationTest.java
rename to subprojects/docs/src/samples/java/withIntegrationTests/src/integration-test/java/org/gradle/PersonIntegrationTest.java
diff --git a/subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/integration-test/resources/org/gradle/inttest.properties b/subprojects/docs/src/samples/java/withIntegrationTests/src/integration-test/resources/org/gradle/inttest.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/integration-test/resources/org/gradle/inttest.properties
rename to subprojects/docs/src/samples/java/withIntegrationTests/src/integration-test/resources/org/gradle/inttest.properties
diff --git a/subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/main/java/org/gradle/Person.java b/subprojects/docs/src/samples/java/withIntegrationTests/src/main/java/org/gradle/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/main/java/org/gradle/Person.java
rename to subprojects/docs/src/samples/java/withIntegrationTests/src/main/java/org/gradle/Person.java
diff --git a/subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/test/java/org/gradle/PersonTestFixture.java b/subprojects/docs/src/samples/java/withIntegrationTests/src/test/java/org/gradle/PersonTestFixture.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/java/withIntegrationTests/src/test/java/org/gradle/PersonTestFixture.java
rename to subprojects/docs/src/samples/java/withIntegrationTests/src/test/java/org/gradle/PersonTestFixture.java
diff --git a/subprojects/docs/src/samples/maven/pomGeneration/build.gradle b/subprojects/docs/src/samples/maven/pomGeneration/build.gradle
new file mode 100644
index 0000000..5b16955
--- /dev/null
+++ b/subprojects/docs/src/samples/maven/pomGeneration/build.gradle
@@ -0,0 +1,109 @@
+import org.apache.maven.settings.Settings
+
+apply plugin: 'war'
+// START SNIPPET use-plugin
+apply plugin: 'maven'
+// END SNIPPET use-plugin
+
+group = 'gradle'
+version = '1.0'
+archivesBaseName = 'mywar'
+buildDir = 'target'
+
+repositories {
+    flatDir(dirs: "$projectDir/lib")
+}
+
+configurations {
+  runtime.exclude group: 'excludeGroup2', module: 'excludeArtifact2'
+}
+
+dependencies {
+    compile("group1:compile:1.0") {
+        exclude(group: 'excludeGroup', module: 'excludeArtifact')
+    }
+    providedCompile "group2:providedCompile:1.0 at jar"
+    runtime "group3:runtime:1.0"
+    providedRuntime("group4:providedRuntime:1.0 at zip") {
+        artifact {
+            name = 'providedRuntime-util'
+            type = 'war'
+        }
+    }
+    testCompile "group5:testCompile:1.0"
+    testRuntime "group6:testRuntime:1.0"
+}
+
+// Include a javadoc zip
+
+task javadocZip(type: Zip, dependsOn: javadoc) {
+    classifier = 'javadoc'
+    from javadoc.destinationDir
+}
+
+artifacts {
+    archives javadocZip
+}
+
+// Configure the release and snapshot repositories
+
+def deployer = null
+uploadArchives {
+    repositories {
+        deployer = mavenDeployer {
+            repository(url: uri("pomRepo"))
+            snapshotRepository(url: uri("snapshotRepo"))
+        }
+    }
+}
+
+// Customize the contents of the pom
+
+installer = install.repositories.mavenInstaller
+
+if (hasProperty('customVersion')) {
+    [installer, deployer]*.pom*.version = customVersion
+    installer.pom.project {
+        groupId 'installGroup'
+    }
+    deployer.pom.groupId = 'deployGroup'
+}
+
+// START SNIPPET new-pom
+task writeNewPom << {
+    pom {
+        project {
+            inceptionYear '2008'
+            licenses {
+                license {
+                    name 'The Apache Software License, Version 2.0'
+                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+                    distribution 'repo'
+                }
+            }
+        }
+    }.writeTo("$buildDir/newpom.xml")
+}
+// END SNIPPET new-pom
+
+// START SNIPPET when-configured
+[installer, deployer]*.pom*.whenConfigured {pom ->
+    pom.dependencies.find {dep -> dep.groupId == 'group3' && dep.artifactId == 'runtime' }.optional = true
+}
+// END SNIPPET when-configured
+
+task writeDeployerPom(dependsOn: uploadArchives) << {
+    deployer.pom.writeTo("$buildDir/deployerpom.xml")
+}
+
+// For our integration tests
+
+install.doLast {
+    Settings settings = installer.settings
+    new File(buildDir, "localRepoPath.txt").write(settings.localRepository)
+}
+
+clean {
+    delete 'pomRepo'
+    delete 'snapshotRepo'
+}
diff --git a/subprojects/gradle-docs/src/samples/maven/pomGeneration/readme.xml b/subprojects/docs/src/samples/maven/pomGeneration/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/maven/pomGeneration/readme.xml
rename to subprojects/docs/src/samples/maven/pomGeneration/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/maven/pomGeneration/src/main/java/org/MyClass.java b/subprojects/docs/src/samples/maven/pomGeneration/src/main/java/org/MyClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/maven/pomGeneration/src/main/java/org/MyClass.java
rename to subprojects/docs/src/samples/maven/pomGeneration/src/main/java/org/MyClass.java
diff --git a/subprojects/gradle-docs/src/samples/maven/pomGeneration/src/main/webapp/WEB-INF/web.xml b/subprojects/docs/src/samples/maven/pomGeneration/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/maven/pomGeneration/src/main/webapp/WEB-INF/web.xml
rename to subprojects/docs/src/samples/maven/pomGeneration/src/main/webapp/WEB-INF/web.xml
diff --git a/subprojects/docs/src/samples/maven/quickstart/build.gradle b/subprojects/docs/src/samples/maven/quickstart/build.gradle
new file mode 100644
index 0000000..e2f966a
--- /dev/null
+++ b/subprojects/docs/src/samples/maven/quickstart/build.gradle
@@ -0,0 +1,30 @@
+import org.apache.maven.settings.Settings
+
+apply plugin: 'java'
+// START SNIPPET use-plugin
+apply plugin: 'maven'
+// END SNIPPET use-plugin
+
+group = 'gradle'
+version = '1.0'
+
+// Configure the repository
+
+uploadArchives {
+    repositories {
+        mavenDeployer {
+            repository(url: uri("pomRepo"))
+        }
+    }
+}
+
+// For our integration tests
+
+install.doLast {
+    Settings settings = repositories.mavenInstaller.settings
+    new File(buildDir, "localRepoPath.txt").write(settings.localRepository)
+}
+
+clean {
+    delete 'pomRepo'
+}
diff --git a/subprojects/gradle-docs/src/samples/maven/quickstart/readme.xml b/subprojects/docs/src/samples/maven/quickstart/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/maven/quickstart/readme.xml
rename to subprojects/docs/src/samples/maven/quickstart/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/maven/quickstart/src/main/java/org/MyClass.java b/subprojects/docs/src/samples/maven/quickstart/src/main/java/org/MyClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/maven/quickstart/src/main/java/org/MyClass.java
rename to subprojects/docs/src/samples/maven/quickstart/src/main/java/org/MyClass.java
diff --git a/subprojects/gradle-docs/src/samples/mavenRepo/build.gradle b/subprojects/docs/src/samples/mavenRepo/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/mavenRepo/build.gradle
rename to subprojects/docs/src/samples/mavenRepo/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/osgi/build.gradle b/subprojects/docs/src/samples/osgi/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/osgi/build.gradle
rename to subprojects/docs/src/samples/osgi/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/osgi/readme.xml b/subprojects/docs/src/samples/osgi/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/osgi/readme.xml
rename to subprojects/docs/src/samples/osgi/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/osgi/src/main/groovy/org/gradle/GradleActivator.groovy b/subprojects/docs/src/samples/osgi/src/main/groovy/org/gradle/GradleActivator.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/osgi/src/main/groovy/org/gradle/GradleActivator.groovy
rename to subprojects/docs/src/samples/osgi/src/main/groovy/org/gradle/GradleActivator.groovy
diff --git a/subprojects/gradle-docs/src/samples/scala/customizedLayout/build.gradle b/subprojects/docs/src/samples/scala/customizedLayout/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/customizedLayout/build.gradle
rename to subprojects/docs/src/samples/scala/customizedLayout/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/scala/customizedLayout/readme.xml b/subprojects/docs/src/samples/scala/customizedLayout/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/customizedLayout/readme.xml
rename to subprojects/docs/src/samples/scala/customizedLayout/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/api/Person.scala b/subprojects/docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/api/Person.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/api/Person.scala
rename to subprojects/docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/api/Person.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/impl/PersonImpl.scala b/subprojects/docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/impl/PersonImpl.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/impl/PersonImpl.scala
rename to subprojects/docs/src/samples/scala/customizedLayout/src/scala/org/gradle/sample/impl/PersonImpl.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/customizedLayout/test/scala/org/gradle/sample/impl/PersonImplTest.scala b/subprojects/docs/src/samples/scala/customizedLayout/test/scala/org/gradle/sample/impl/PersonImplTest.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/customizedLayout/test/scala/org/gradle/sample/impl/PersonImplTest.scala
rename to subprojects/docs/src/samples/scala/customizedLayout/test/scala/org/gradle/sample/impl/PersonImplTest.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/build.gradle b/subprojects/docs/src/samples/scala/mixedJavaAndScala/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/build.gradle
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/readme.xml b/subprojects/docs/src/samples/scala/mixedJavaAndScala/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/readme.xml
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/java/org/gradle/sample/Person.java b/subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/java/org/gradle/sample/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/java/org/gradle/sample/Person.java
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/java/org/gradle/sample/Person.java
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/JavaPerson.java b/subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/JavaPerson.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/JavaPerson.java
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/JavaPerson.java
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonImpl.scala b/subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonImpl.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonImpl.scala
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonImpl.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonList.scala b/subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonList.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonList.scala
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/src/main/scala/org/gradle/sample/impl/PersonList.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/test/scala/org/gradle/sample/PersonTest.scala b/subprojects/docs/src/samples/scala/mixedJavaAndScala/src/test/scala/org/gradle/sample/PersonTest.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/mixedJavaAndScala/src/test/scala/org/gradle/sample/PersonTest.scala
rename to subprojects/docs/src/samples/scala/mixedJavaAndScala/src/test/scala/org/gradle/sample/PersonTest.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/quickstart/build.gradle b/subprojects/docs/src/samples/scala/quickstart/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/quickstart/build.gradle
rename to subprojects/docs/src/samples/scala/quickstart/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/scala/quickstart/readme.xml b/subprojects/docs/src/samples/scala/quickstart/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/quickstart/readme.xml
rename to subprojects/docs/src/samples/scala/quickstart/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/api/Person.scala b/subprojects/docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/api/Person.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/api/Person.scala
rename to subprojects/docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/api/Person.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/impl/PersonImpl.scala b/subprojects/docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/impl/PersonImpl.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/impl/PersonImpl.scala
rename to subprojects/docs/src/samples/scala/quickstart/src/main/scala/org/gradle/sample/impl/PersonImpl.scala
diff --git a/subprojects/gradle-docs/src/samples/scala/quickstart/src/test/scala/org/gradle/sample/impl/PersonImplTest.scala b/subprojects/docs/src/samples/scala/quickstart/src/test/scala/org/gradle/sample/impl/PersonImplTest.scala
similarity index 100%
rename from subprojects/gradle-docs/src/samples/scala/quickstart/src/test/scala/org/gradle/sample/impl/PersonImplTest.scala
rename to subprojects/docs/src/samples/scala/quickstart/src/test/scala/org/gradle/sample/impl/PersonImplTest.scala
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk14-passing/build.gradle b/subprojects/docs/src/samples/testng/java-jdk14-passing/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk14-passing/build.gradle
rename to subprojects/docs/src/samples/testng/java-jdk14-passing/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk14-passing/src/main/java/org/gradle/Ok.java b/subprojects/docs/src/samples/testng/java-jdk14-passing/src/main/java/org/gradle/Ok.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk14-passing/src/main/java/org/gradle/Ok.java
rename to subprojects/docs/src/samples/testng/java-jdk14-passing/src/main/java/org/gradle/Ok.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk14-passing/src/test/java/org/gradle/OkTest.java b/subprojects/docs/src/samples/testng/java-jdk14-passing/src/test/java/org/gradle/OkTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk14-passing/src/test/java/org/gradle/OkTest.java
rename to subprojects/docs/src/samples/testng/java-jdk14-passing/src/test/java/org/gradle/OkTest.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/build.gradle b/subprojects/docs/src/samples/testng/java-jdk15-passing/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/build.gradle
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/main/java/org/gradle/Ok.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/main/java/org/gradle/Ok.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/main/java/org/gradle/Ok.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/main/java/org/gradle/Ok.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/AbstractTest.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/AbstractTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/AbstractTest.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/AbstractTest.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/ConcreteTest.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/ConcreteTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/ConcreteTest.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/ConcreteTest.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/OkTest.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/OkTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/OkTest.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/OkTest.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteCleanup.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteCleanup.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteCleanup.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteCleanup.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteSetup.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteSetup.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteSetup.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/SuiteSetup.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestCleanup.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestCleanup.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestCleanup.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestCleanup.java
diff --git a/subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestSetup.java b/subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestSetup.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestSetup.java
rename to subprojects/docs/src/samples/testng/java-jdk15-passing/src/test/java/org/gradle/TestSetup.java
diff --git a/subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/build.gradle b/subprojects/docs/src/samples/testng/suitexmlbuilder/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/build.gradle
rename to subprojects/docs/src/samples/testng/suitexmlbuilder/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/User.java b/subprojects/docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/User.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/User.java
rename to subprojects/docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/User.java
diff --git a/subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/UserImpl.java b/subprojects/docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/UserImpl.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/UserImpl.java
rename to subprojects/docs/src/samples/testng/suitexmlbuilder/src/main/java/org/gradle/testng/UserImpl.java
diff --git a/subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/src/test/java/org/gradle/testng/UserImplTest.java b/subprojects/docs/src/samples/testng/suitexmlbuilder/src/test/java/org/gradle/testng/UserImplTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/testng/suitexmlbuilder/src/test/java/org/gradle/testng/UserImplTest.java
rename to subprojects/docs/src/samples/testng/suitexmlbuilder/src/test/java/org/gradle/testng/UserImplTest.java
diff --git a/subprojects/docs/src/samples/toolingApi/build.gradle b/subprojects/docs/src/samples/toolingApi/build.gradle
new file mode 100644
index 0000000..c184937
--- /dev/null
+++ b/subprojects/docs/src/samples/toolingApi/build.gradle
@@ -0,0 +1,26 @@
+apply plugin: 'java'
+
+if (!hasProperty('toolingApiVersion')) {
+    toolingApiVersion = gradle.gradleVersion
+}
+if (!hasProperty('toolingApiRepo')) {
+    toolingApiRepo = 'http://gradle.artifactoryonline.com/gradle/libs-releases-local'
+}
+
+repositories {
+    mavenRepo urls: toolingApiRepo
+    mavenCentral()
+}
+
+dependencies {
+    compile "org.gradle:gradle-tooling-api:${toolingApiVersion}"
+}
+
+task run(type: JavaExec) {
+    dependsOn sourceSets.main.runtimeClasspath.buildDependencies
+    main = 'org.gradle.sample.Main'
+    classpath = sourceSets.main.runtimeClasspath
+    if (project.hasProperty('gradleDistribution')) {
+        args = [gradleDistribution]
+    }
+}
\ No newline at end of file
diff --git a/subprojects/docs/src/samples/toolingApi/src/main/java/org/gradle/sample/Main.java b/subprojects/docs/src/samples/toolingApi/src/main/java/org/gradle/sample/Main.java
new file mode 100644
index 0000000..d6eafd6
--- /dev/null
+++ b/subprojects/docs/src/samples/toolingApi/src/main/java/org/gradle/sample/Main.java
@@ -0,0 +1,32 @@
+package org.gradle.sample;
+
+import org.gradle.tooling.GradleConnector;
+import org.gradle.tooling.BuildConnection;
+import org.gradle.tooling.model.ExternalDependency;
+import org.gradle.tooling.model.eclipse.EclipseBuild;
+
+import java.io.File;
+
+public class Main {
+    public static void main(String[] args) {
+        GradleConnector connector = GradleConnector.newConnector();
+        try {
+            // Configure the connector and create the connection
+            connector.forProjectDirectory(new File("."));
+            if (args.length > 0) {
+                connector.useInstallation(new File(args[0]));
+            }
+            BuildConnection connection = connector.connect();
+
+            // Load the Eclipse model for the project
+            EclipseBuild build = connection.getModel(EclipseBuild.class);
+            System.out.println("Project classpath:");
+            for (ExternalDependency externalDependency : build.getRootProject().getClasspath()) {
+                System.out.println(externalDependency.getFile().getName());
+            }
+        } finally {
+            // Clean up
+            connector.close();
+        }
+    }
+}
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.gradle b/subprojects/docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.xml b/subprojects/docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.xml
rename to subprojects/docs/src/samples/userguide/ant/addBehaviourToAntTarget/build.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/dependsOnAntTarget/build.gradle b/subprojects/docs/src/samples/userguide/ant/dependsOnAntTarget/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/dependsOnAntTarget/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/dependsOnAntTarget/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/dependsOnAntTarget/build.xml b/subprojects/docs/src/samples/userguide/ant/dependsOnAntTarget/build.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/dependsOnAntTarget/build.xml
rename to subprojects/docs/src/samples/userguide/ant/dependsOnAntTarget/build.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/dependsOnTask/build.gradle b/subprojects/docs/src/samples/userguide/ant/dependsOnTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/dependsOnTask/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/dependsOnTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/dependsOnTask/build.xml b/subprojects/docs/src/samples/userguide/ant/dependsOnTask/build.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/dependsOnTask/build.xml
rename to subprojects/docs/src/samples/userguide/ant/dependsOnTask/build.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/hello/build.gradle b/subprojects/docs/src/samples/userguide/ant/hello/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/hello/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/hello/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/hello/build.xml b/subprojects/docs/src/samples/userguide/ant/hello/build.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/hello/build.xml
rename to subprojects/docs/src/samples/userguide/ant/hello/build.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/properties/build.gradle b/subprojects/docs/src/samples/userguide/ant/properties/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/properties/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/properties/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/properties/build.xml b/subprojects/docs/src/samples/userguide/ant/properties/build.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/properties/build.xml
rename to subprojects/docs/src/samples/userguide/ant/properties/build.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/taskWithNestedElements/build.gradle b/subprojects/docs/src/samples/userguide/ant/taskWithNestedElements/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/taskWithNestedElements/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/taskWithNestedElements/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/taskWithNestedElements/src/test.xml b/subprojects/docs/src/samples/userguide/ant/taskWithNestedElements/src/test.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/taskWithNestedElements/src/test.xml
rename to subprojects/docs/src/samples/userguide/ant/taskWithNestedElements/src/test.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/taskWithNestedText/build.gradle b/subprojects/docs/src/samples/userguide/ant/taskWithNestedText/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/taskWithNestedText/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/taskWithNestedText/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/useAntTask/build.gradle b/subprojects/docs/src/samples/userguide/ant/useAntTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/useAntTask/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/useAntTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/useAntType/build.gradle b/subprojects/docs/src/samples/userguide/ant/useAntType/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/useAntType/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/useAntType/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTask/build.gradle b/subprojects/docs/src/samples/userguide/ant/useExternalAntTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTask/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/useExternalAntTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/build.gradle b/subprojects/docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/build.gradle
rename to subprojects/docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/pmd-rules.xml b/subprojects/docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/pmd-rules.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/pmd-rules.xml
rename to subprojects/docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/pmd-rules.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/src/Source.java b/subprojects/docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/src/Source.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/src/Source.java
rename to subprojects/docs/src/samples/userguide/ant/useExternalAntTaskWithConfig/src/Source.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/configurationHandling/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/configurationHandling/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-shark-1.0.xml b/subprojects/docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-shark-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-shark-1.0.xml
rename to subprojects/docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-shark-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-tuna-1.0.xml b/subprojects/docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-tuna-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-tuna-1.0.xml
rename to subprojects/docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.fish/ivy-tuna-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.mammals/ivy-orca-1.0.xml b/subprojects/docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.mammals/ivy-orca-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.mammals/ivy-orca-1.0.xml
rename to subprojects/docs/src/samples/userguide/artifacts/configurationHandling/repo/sea.mammals/ivy-orca-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/defineConfiguration/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/defineConfiguration/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/defineConfiguration/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/defineConfiguration/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/defineRepository/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/defineRepository/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/defineRepository/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/defineRepository/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/excludesAndClassifiers/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/excludesAndClassifiers/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/excludesAndClassifiers/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/excludesAndClassifiers/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/api-ivy-1.0.xml b/subprojects/docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/api-ivy-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/api-ivy-1.0.xml
rename to subprojects/docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/api-ivy-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/other-api-ivy-1.0.xml b/subprojects/docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/other-api-ivy-1.0.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/other-api-ivy-1.0.xml
rename to subprojects/docs/src/samples/userguide/artifacts/excludesAndClassifiers/repo/org.gradle.test.excludes/other-api-ivy-1.0.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/externalDependencies/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/externalDependencies/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/externalDependencies/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/externalDependencies/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/generatedFileDependencies/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/generatedFileDependencies/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/generatedFileDependencies/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/generatedFileDependencies/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/maven/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/maven/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/maven/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/maven/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/artifacts/uploading/build.gradle b/subprojects/docs/src/samples/userguide/artifacts/uploading/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/artifacts/uploading/build.gradle
rename to subprojects/docs/src/samples/userguide/artifacts/uploading/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/basic/build.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/basic/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/basic/build.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/basic/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/basic/settings.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/basic/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/basic/settings.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/basic/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/build.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/build.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/projectB.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/projectB.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/projectB.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/projectB.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/settings.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/settings.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/buildProjectEvaluateEvents/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/build.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/build.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/projectA.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/projectA.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/projectA.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/projectA.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/settings.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/settings.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/projectEvaluateEvents/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/taskCreationEvents/build.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/taskCreationEvents/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/taskCreationEvents/build.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/taskCreationEvents/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/buildlifecycle/taskExecutionEvents/build.gradle b/subprojects/docs/src/samples/userguide/buildlifecycle/taskExecutionEvents/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/buildlifecycle/taskExecutionEvents/build.gradle
rename to subprojects/docs/src/samples/userguide/buildlifecycle/taskExecutionEvents/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/archiveNaming/build.gradle b/subprojects/docs/src/samples/userguide/files/archiveNaming/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/archiveNaming/build.gradle
rename to subprojects/docs/src/samples/userguide/files/archiveNaming/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/archiveNaming/settings.gradle b/subprojects/docs/src/samples/userguide/files/archiveNaming/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/archiveNaming/settings.gradle
rename to subprojects/docs/src/samples/userguide/files/archiveNaming/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/archiveNaming/somedir/file.txt b/subprojects/docs/src/samples/userguide/files/archiveNaming/somedir/file.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/archiveNaming/somedir/file.txt
rename to subprojects/docs/src/samples/userguide/files/archiveNaming/somedir/file.txt
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/archives/build.gradle b/subprojects/docs/src/samples/userguide/files/archives/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/archives/build.gradle
rename to subprojects/docs/src/samples/userguide/files/archives/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/copy/build.gradle b/subprojects/docs/src/samples/userguide/files/copy/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/copy/build.gradle
rename to subprojects/docs/src/samples/userguide/files/copy/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/file/build.gradle b/subprojects/docs/src/samples/userguide/files/file/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/file/build.gradle
rename to subprojects/docs/src/samples/userguide/files/file/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/fileCollections/build.gradle b/subprojects/docs/src/samples/userguide/files/fileCollections/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/fileCollections/build.gradle
rename to subprojects/docs/src/samples/userguide/files/fileCollections/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/fileTrees/build.gradle b/subprojects/docs/src/samples/userguide/files/fileTrees/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/fileTrees/build.gradle
rename to subprojects/docs/src/samples/userguide/files/fileTrees/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/inputFiles/build.gradle b/subprojects/docs/src/samples/userguide/files/inputFiles/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/inputFiles/build.gradle
rename to subprojects/docs/src/samples/userguide/files/inputFiles/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/files/sync/build.gradle b/subprojects/docs/src/samples/userguide/files/sync/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/files/sync/build.gradle
rename to subprojects/docs/src/samples/userguide/files/sync/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/initScripts/customLogger/build.gradle b/subprojects/docs/src/samples/userguide/initScripts/customLogger/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/initScripts/customLogger/build.gradle
rename to subprojects/docs/src/samples/userguide/initScripts/customLogger/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/initScripts/customLogger/init.gradle b/subprojects/docs/src/samples/userguide/initScripts/customLogger/init.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/initScripts/customLogger/init.gradle
rename to subprojects/docs/src/samples/userguide/initScripts/customLogger/init.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/initScripts/externalDependency/build.gradle b/subprojects/docs/src/samples/userguide/initScripts/externalDependency/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/initScripts/externalDependency/build.gradle
rename to subprojects/docs/src/samples/userguide/initScripts/externalDependency/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/initScripts/externalDependency/init.gradle b/subprojects/docs/src/samples/userguide/initScripts/externalDependency/init.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/initScripts/externalDependency/init.gradle
rename to subprojects/docs/src/samples/userguide/initScripts/externalDependency/init.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/java/sourceSets/build.gradle b/subprojects/docs/src/samples/userguide/java/sourceSets/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/java/sourceSets/build.gradle
rename to subprojects/docs/src/samples/userguide/java/sourceSets/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/bluewhale/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/addKrill/water/bluewhale/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/bluewhale/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/addKrill/water/bluewhale/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/addKrill/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addKrill/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/krill/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/addKrill/water/krill/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/krill/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/addKrill/water/krill/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/addKrill/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addKrill/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addKrill/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/bluewhale/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/bluewhale/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/bluewhale/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/bluewhale/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/krill/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/krill/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/krill/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/krill/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addSpecifics/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addSpecifics/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/bluewhale/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/addTropical/water/bluewhale/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/bluewhale/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addTropical/water/bluewhale/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/addTropical/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addTropical/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/krill/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/addTropical/water/krill/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/krill/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addTropical/water/krill/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/addTropical/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/addTropical/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/tropicalFish/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/addTropical/water/tropicalFish/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/addTropical/water/tropicalFish/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/addTropical/water/tropicalFish/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/customLayout/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/customLayout/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/customLayout/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/customLayout/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/firstMessages/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/api/Person.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/api/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/api/Person.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/api/Person.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/main/java/org/gradle/sample/services/PersonService.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/main/java/org/gradle/sample/services/PersonService.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/main/java/org/gradle/sample/services/PersonService.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/main/java/org/gradle/sample/services/PersonService.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/shared/src/main/java/org/gradle/sample/shared/Helper.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/java/shared/src/main/java/org/gradle/sample/shared/Helper.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/java/shared/src/main/java/org/gradle/sample/shared/Helper.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/java/shared/src/main/java/org/gradle/sample/shared/Helper.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/api/Person.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/api/Person.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/api/Person.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/api/Person.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/api/src/main/java/org/gradle/sample/apiImpl/PersonImpl.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/main/java/org/gradle/sample/services/PersonService.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/main/java/org/gradle/sample/services/PersonService.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/main/java/org/gradle/sample/services/PersonService.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/main/java/org/gradle/sample/services/PersonService.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/services/personService/src/test/java/org/gradle/sample/services/PersonServiceTest.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/shared/src/main/java/org/gradle/sample/shared/Helper.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/shared/src/main/java/org/gradle/sample/shared/Helper.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/shared/src/main/java/org/gradle/sample/shared/Helper.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/javaWithCustomConf/shared/src/main/java/org/gradle/sample/shared/Helper.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependencies/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesAltSolution/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesConfigDependenciesBroken/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesDifferentTaskNames/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/aProducer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/aProducer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/aProducer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/aProducer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesHack/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesTaskDependencies/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/consumer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/consumer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/consumer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/consumer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/producer/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/producer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/producer/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/producer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/messagesWithDependencies/messages/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/java/org/gradle/sample/DateServlet.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/java/org/gradle/sample/DateServlet.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/java/org/gradle/sample/DateServlet.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/java/org/gradle/sample/DateServlet.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/webapp/web.xml b/subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/webapp/web.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/webapp/web.xml
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/date/src/main/webapp/web.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/java/org/gradle/sample/HelloServlet.java b/subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/java/org/gradle/sample/HelloServlet.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/java/org/gradle/sample/HelloServlet.java
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/java/org/gradle/sample/HelloServlet.java
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/webapp/web.xml b/subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/webapp/web.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/webapp/web.xml
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/hello/src/main/webapp/web.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/dependencies/webDist/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/dependencies/webDist/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/firstExample/water/bluewhale/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/firstExample/water/bluewhale/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/firstExample/water/bluewhale/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/firstExample/water/bluewhale/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/firstExample/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/firstExample/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/firstExample/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/firstExample/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/firstExample/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/firstExample/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/firstExample/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/firstExample/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flat/dolphin/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/flat/dolphin/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flat/dolphin/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/flat/dolphin/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flat/master/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/flat/master/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flat/master/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/flat/master/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flat/master/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/flat/master/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flat/master/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/flat/master/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flat/shark/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/flat/shark/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flat/shark/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/flat/shark/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/dolphin/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/dolphin/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/dolphin/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/dolphin/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/shark/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/shark/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/shark/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/shark/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/flatWithNoDefaultMaster/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/bluewhale/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/bluewhale/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/bluewhale/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/bluewhale/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/krill/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/krill/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/krill/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/krill/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/tropicalFish/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/tropicalFish/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/partialTasks/water/tropicalFish/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/partialTasks/water/tropicalFish/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/bluewhale/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/bluewhale/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/bluewhale/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/bluewhale/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/krill/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/krill/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/krill/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/krill/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/spreadSpecifics/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/spreadSpecifics/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/standardLayouts/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/standardLayouts/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/standardLayouts/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/standardLayouts/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/bluewhale/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/bluewhale/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/bluewhale/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/bluewhale/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/krill/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/krill/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/krill/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/krill/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/subprojectsAddFromTop/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/bluewhale/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/bluewhale/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/bluewhale/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/bluewhale/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/krill/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/krill/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/krill/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/krill/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/tropicalFish/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/tropicalFish/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/tropicalWithProperties/water/tropicalFish/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/tropicalWithProperties/water/tropicalFish/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/bluewhale/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/bluewhale/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/bluewhale/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/bluewhale/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/build.gradle b/subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/build.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/krill/.gitignore b/subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/krill/.gitignore
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/krill/.gitignore
rename to subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/krill/.gitignore
diff --git a/subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/settings.gradle b/subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/multiproject/useSubprojects/water/settings.gradle
rename to subprojects/docs/src/samples/userguide/multiproject/useSubprojects/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/customPlugin/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/customPlugin/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/customPlugin/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/customPlugin/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/customPluginWithAdvancedConvention/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithAdvancedConvention/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/customPluginWithAdvancedConvention/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithAdvancedConvention/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/customPluginWithConvention/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithConvention/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/customPluginWithConvention/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithConvention/build.gradle
diff --git a/subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithDomainObjectContainer/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithDomainObjectContainer/build.gradle
new file mode 100644
index 0000000..8bb5185
--- /dev/null
+++ b/subprojects/docs/src/samples/userguide/organizeBuildLogic/customPluginWithDomainObjectContainer/build.gradle
@@ -0,0 +1,50 @@
+apply plugin: DocumentationPlugin
+
+books {
+    quickStart {
+        sourceFile = file('src/docs/quick-start')
+    }
+    userGuide {
+
+    }
+    developerGuide {
+
+    }
+}
+
+task books << {
+    books.each { book ->
+        println "$book.name -> $book.sourceFile"
+    }
+}
+
+class DocumentationPlugin implements Plugin<Project> {
+    def void apply(Project project) {
+        def books = project.container(Book) { name -> new Book(name) }
+        books.all {
+            sourceFile = project.file("src/docs/$name")
+        }
+        project.convention.plugins.documentation = new DocumentationPluginConvention(books)
+    }
+}
+
+class Book {
+    final String name
+    File sourceFile
+
+    Book(String name) {
+        this.name = name
+    }
+}
+
+class DocumentationPluginConvention {
+    final NamedDomainObjectContainer<Book> books
+
+    DocumentationPluginConvention(NamedDomainObjectContainer<Book> books) {
+        this.books = books
+    }
+
+    def books(Closure cl) {
+        books.configure(cl)
+    }
+}
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/externalDependency/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/externalDependency/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/externalDependency/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/externalDependency/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/inherited/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/inherited/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/inherited/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/inherited/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/inherited/child/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/inherited/child/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/inherited/child/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/inherited/child/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/inherited/settings.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/inherited/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/inherited/settings.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/inherited/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/child1/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/child1/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/child1/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/child1/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/child2/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/child2/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/child2/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/child2/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/settings.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/injected/settings.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/injected/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/nestedBuild/build.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/nestedBuild/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/nestedBuild/build.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/nestedBuild/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/nestedBuild/other.gradle b/subprojects/docs/src/samples/userguide/organizeBuildLogic/nestedBuild/other.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/organizeBuildLogic/nestedBuild/other.gradle
rename to subprojects/docs/src/samples/userguide/organizeBuildLogic/nestedBuild/other.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/accessAsProperty/build.gradle b/subprojects/docs/src/samples/userguide/tasks/accessAsProperty/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/accessAsProperty/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/accessAsProperty/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/accessFromTaskContainer/build.gradle b/subprojects/docs/src/samples/userguide/tasks/accessFromTaskContainer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/accessFromTaskContainer/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/accessFromTaskContainer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/accessUsingPath/build.gradle b/subprojects/docs/src/samples/userguide/tasks/accessUsingPath/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/accessUsingPath/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/accessUsingPath/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/accessUsingPath/settings.gradle b/subprojects/docs/src/samples/userguide/tasks/accessUsingPath/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/accessUsingPath/settings.gradle
rename to subprojects/docs/src/samples/userguide/tasks/accessUsingPath/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingClosure/build.gradle b/subprojects/docs/src/samples/userguide/tasks/addDependencyUsingClosure/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingClosure/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/addDependencyUsingClosure/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingPath/build.gradle b/subprojects/docs/src/samples/userguide/tasks/addDependencyUsingPath/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingPath/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/addDependencyUsingPath/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingPath/settings.gradle b/subprojects/docs/src/samples/userguide/tasks/addDependencyUsingPath/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingPath/settings.gradle
rename to subprojects/docs/src/samples/userguide/tasks/addDependencyUsingPath/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingTask/build.gradle b/subprojects/docs/src/samples/userguide/tasks/addDependencyUsingTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/addDependencyUsingTask/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/addDependencyUsingTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/addRules/build.gradle b/subprojects/docs/src/samples/userguide/tasks/addRules/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/addRules/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/addRules/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/addToTaskContainer/build.gradle b/subprojects/docs/src/samples/userguide/tasks/addToTaskContainer/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/addToTaskContainer/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/addToTaskContainer/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingClosure/build.gradle b/subprojects/docs/src/samples/userguide/tasks/configureUsingClosure/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingClosure/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/configureUsingClosure/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingConfigure/build.gradle b/subprojects/docs/src/samples/userguide/tasks/configureUsingConfigure/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingConfigure/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/configureUsingConfigure/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingLiterateStyle/build.gradle b/subprojects/docs/src/samples/userguide/tasks/configureUsingLiterateStyle/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingLiterateStyle/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/configureUsingLiterateStyle/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingVar/build.gradle b/subprojects/docs/src/samples/userguide/tasks/configureUsingVar/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/configureUsingVar/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/configureUsingVar/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/customTask/build.gradle b/subprojects/docs/src/samples/userguide/tasks/customTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/customTask/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/customTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/customTaskWithProperty/build.gradle b/subprojects/docs/src/samples/userguide/tasks/customTaskWithProperty/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/customTaskWithProperty/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/customTaskWithProperty/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/defineAndConfigure/build.gradle b/subprojects/docs/src/samples/userguide/tasks/defineAndConfigure/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/defineAndConfigure/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/defineAndConfigure/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/defineAsExpression/build.gradle b/subprojects/docs/src/samples/userguide/tasks/defineAsExpression/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/defineAsExpression/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/defineAsExpression/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/defineUsingStringTaskNames/build.gradle b/subprojects/docs/src/samples/userguide/tasks/defineUsingStringTaskNames/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/defineUsingStringTaskNames/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/defineUsingStringTaskNames/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/build.gradle b/subprojects/docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/mountains.xml b/subprojects/docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/mountains.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/mountains.xml
rename to subprojects/docs/src/samples/userguide/tasks/incrementalBuild/inputsAndOutputs/mountains.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/build.gradle b/subprojects/docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/build.gradle
rename to subprojects/docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/mountains.xml b/subprojects/docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/mountains.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/mountains.xml
rename to subprojects/docs/src/samples/userguide/tasks/incrementalBuild/noInputsAndOutputs/mountains.xml
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/announce/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/announce/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/announce/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/announce/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksum/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/antChecksum/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksum/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/antChecksum/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumFiles/agile_manifesto.html b/subprojects/docs/src/samples/userguide/tutorial/antChecksumFiles/agile_manifesto.html
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumFiles/agile_manifesto.html
rename to subprojects/docs/src/samples/userguide/tutorial/antChecksumFiles/agile_manifesto.html
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumFiles/agile_principles.html b/subprojects/docs/src/samples/userguide/tutorial/antChecksumFiles/agile_principles.html
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumFiles/agile_principles.html
rename to subprojects/docs/src/samples/userguide/tutorial/antChecksumFiles/agile_principles.html
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumFiles/dylan_thomas.txt b/subprojects/docs/src/samples/userguide/tutorial/antChecksumFiles/dylan_thomas.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumFiles/dylan_thomas.txt
rename to subprojects/docs/src/samples/userguide/tutorial/antChecksumFiles/dylan_thomas.txt
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumWithMethod/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/antChecksumWithMethod/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/antChecksumWithMethod/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/antChecksumWithMethod/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/archiveContent/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/archiveContent/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/archiveContent/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/archiveContent/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/configByDag/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/configByDag/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/configByDag/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/configByDag/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/configureObject/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/configureObject/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/configureObject/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/configureObject/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/configureObjectUsingScript/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/configureObjectUsingScript/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/configureObjectUsingScript/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/configureObjectUsingScript/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/configureObjectUsingScript/other.gradle b/subprojects/docs/src/samples/userguide/tutorial/configureObjectUsingScript/other.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/configureObjectUsingScript/other.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/configureObjectUsingScript/other.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/configureProjectUsingScript/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/configureProjectUsingScript/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/configureProjectUsingScript/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/configureProjectUsingScript/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/configureProjectUsingScript/other.gradle b/subprojects/docs/src/samples/userguide/tutorial/configureProjectUsingScript/other.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/configureProjectUsingScript/other.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/configureProjectUsingScript/other.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/count/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/count/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/count/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/count/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/defaultTasks/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/defaultTasks/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/defaultTasks/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/defaultTasks/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/directoryTask/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/directoryTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/directoryTask/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/directoryTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/disableTask/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/disableTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/disableTask/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/disableTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/dynamic/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/dynamic/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/dynamic/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/dynamic/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/dynamicDepends/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/dynamicDepends/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/dynamicDepends/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/dynamicDepends/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/dynamicProperties/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/dynamicProperties/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/dynamicProperties/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/dynamicProperties/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/excludeTasks/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/excludeTasks/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/excludeTasks/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/excludeTasks/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/groovy/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/groovy/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/groovy/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/groovy/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/groovyWithFlatDir/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/groovyWithFlatDir/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/groovyWithFlatDir/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/groovyWithFlatDir/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/hello/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/hello/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/hello/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/hello/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/helloEnhanced/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/helloEnhanced/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/helloEnhanced/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/helloEnhanced/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/helloShortcut/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/helloShortcut/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/helloShortcut/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/helloShortcut/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/helloWithShortCut/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/helloWithShortCut/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/helloWithShortCut/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/helloWithShortCut/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/intro/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/intro/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/intro/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/intro/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/lazyDependsOn/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/lazyDependsOn/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/lazyDependsOn/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/lazyDependsOn/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/logging/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/logging/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/logging/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/logging/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/makeDirectory/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/makeDirectory/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/makeDirectory/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/makeDirectory/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/manifest/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/manifest/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/manifest/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/manifest/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/mkdirTrap/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/mkdirTrap/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/mkdirTrap/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/mkdirTrap/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/osgi/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/osgi/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/osgi/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/osgi/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/pluginAccessConvention/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/pluginAccessConvention/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/pluginAccessConvention/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/pluginAccessConvention/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/pluginConfig/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/pluginConfig/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/pluginConfig/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/pluginConfig/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/pluginConvention/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/pluginConvention/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/pluginConvention/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/pluginConvention/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/pluginIntro/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/pluginIntro/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/pluginIntro/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/pluginIntro/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/projectApi/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/projectApi/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/projectApi/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/projectApi/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/projectReports/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/projectReports/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/projectReports/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/projectReports/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/projectReports/settings.gradle b/subprojects/docs/src/samples/userguide/tutorial/projectReports/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/projectReports/settings.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/projectReports/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/properties/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/properties/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/properties/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/properties/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/properties/gradle.properties b/subprojects/docs/src/samples/userguide/tutorial/properties/gradle.properties
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/properties/gradle.properties
rename to subprojects/docs/src/samples/userguide/tutorial/properties/gradle.properties
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/replaceTask/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/replaceTask/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/replaceTask/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/replaceTask/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/scope.groovy b/subprojects/docs/src/samples/userguide/tutorial/scope.groovy
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/scope.groovy
rename to subprojects/docs/src/samples/userguide/tutorial/scope.groovy
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/selectProject/subdir/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/selectProject/subdir/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/selectProject/subdir/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/selectProject/subdir/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/selectProject/subdir/myproject.gradle b/subprojects/docs/src/samples/userguide/tutorial/selectProject/subdir/myproject.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/selectProject/subdir/myproject.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/selectProject/subdir/myproject.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/stopExecutionException/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/stopExecutionException/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/stopExecutionException/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/stopExecutionException/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/taskOnlyIf/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/taskOnlyIf/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/taskOnlyIf/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/taskOnlyIf/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/upper/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/upper/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/upper/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/upper/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithArguments/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/zipWithArguments/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithArguments/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/zipWithArguments/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithArguments/somedir/file.txt b/subprojects/docs/src/samples/userguide/tutorial/zipWithArguments/somedir/file.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithArguments/somedir/file.txt
rename to subprojects/docs/src/samples/userguide/tutorial/zipWithArguments/somedir/file.txt
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithCustomName/build.gradle b/subprojects/docs/src/samples/userguide/tutorial/zipWithCustomName/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithCustomName/build.gradle
rename to subprojects/docs/src/samples/userguide/tutorial/zipWithCustomName/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithCustomName/somedir/file.txt b/subprojects/docs/src/samples/userguide/tutorial/zipWithCustomName/somedir/file.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/tutorial/zipWithCustomName/somedir/file.txt
rename to subprojects/docs/src/samples/userguide/tutorial/zipWithCustomName/somedir/file.txt
diff --git a/subprojects/gradle-docs/src/samples/userguide/wrapper/customized/build.gradle b/subprojects/docs/src/samples/userguide/wrapper/customized/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/wrapper/customized/build.gradle
rename to subprojects/docs/src/samples/userguide/wrapper/customized/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguide/wrapper/simple/build.gradle b/subprojects/docs/src/samples/userguide/wrapper/simple/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguide/wrapper/simple/build.gradle
rename to subprojects/docs/src/samples/userguide/wrapper/simple/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/abbreviateCamelCaseTaskName.out b/subprojects/docs/src/samples/userguideOutput/abbreviateCamelCaseTaskName.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/abbreviateCamelCaseTaskName.out
rename to subprojects/docs/src/samples/userguideOutput/abbreviateCamelCaseTaskName.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/abbreviateTaskName.out b/subprojects/docs/src/samples/userguideOutput/abbreviateTaskName.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/abbreviateTaskName.out
rename to subprojects/docs/src/samples/userguideOutput/abbreviateTaskName.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/accessUsingPath.out b/subprojects/docs/src/samples/userguideOutput/accessUsingPath.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/accessUsingPath.out
rename to subprojects/docs/src/samples/userguideOutput/accessUsingPath.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/addBehaviourToAntTarget.out b/subprojects/docs/src/samples/userguideOutput/addBehaviourToAntTarget.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/addBehaviourToAntTarget.out
rename to subprojects/docs/src/samples/userguideOutput/addBehaviourToAntTarget.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/addDependencyUsingClosure.out b/subprojects/docs/src/samples/userguideOutput/addDependencyUsingClosure.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/addDependencyUsingClosure.out
rename to subprojects/docs/src/samples/userguideOutput/addDependencyUsingClosure.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/addDependencyUsingPath.out b/subprojects/docs/src/samples/userguideOutput/addDependencyUsingPath.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/addDependencyUsingPath.out
rename to subprojects/docs/src/samples/userguideOutput/addDependencyUsingPath.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/addDependencyUsingTask.out b/subprojects/docs/src/samples/userguideOutput/addDependencyUsingTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/addDependencyUsingTask.out
rename to subprojects/docs/src/samples/userguideOutput/addDependencyUsingTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/antChecksum.out b/subprojects/docs/src/samples/userguideOutput/antChecksum.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/antChecksum.out
rename to subprojects/docs/src/samples/userguideOutput/antChecksum.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/antChecksumWithMethod.out b/subprojects/docs/src/samples/userguideOutput/antChecksumWithMethod.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/antChecksumWithMethod.out
rename to subprojects/docs/src/samples/userguideOutput/antChecksumWithMethod.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/antHello.out b/subprojects/docs/src/samples/userguideOutput/antHello.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/antHello.out
rename to subprojects/docs/src/samples/userguideOutput/antHello.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/archiveNaming.out b/subprojects/docs/src/samples/userguideOutput/archiveNaming.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/archiveNaming.out
rename to subprojects/docs/src/samples/userguideOutput/archiveNaming.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/buildProjectEvaluateEvents.out b/subprojects/docs/src/samples/userguideOutput/buildProjectEvaluateEvents.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/buildProjectEvaluateEvents.out
rename to subprojects/docs/src/samples/userguideOutput/buildProjectEvaluateEvents.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/buildlifecycle.out b/subprojects/docs/src/samples/userguideOutput/buildlifecycle.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/buildlifecycle.out
rename to subprojects/docs/src/samples/userguideOutput/buildlifecycle.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configByDag.out b/subprojects/docs/src/samples/userguideOutput/configByDag.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configByDag.out
rename to subprojects/docs/src/samples/userguideOutput/configByDag.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configByDagNoRelease.out b/subprojects/docs/src/samples/userguideOutput/configByDagNoRelease.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configByDagNoRelease.out
rename to subprojects/docs/src/samples/userguideOutput/configByDagNoRelease.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingAllFiles.out b/subprojects/docs/src/samples/userguideOutput/configurationHandlingAllFiles.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingAllFiles.out
rename to subprojects/docs/src/samples/userguideOutput/configurationHandlingAllFiles.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingCopy.out b/subprojects/docs/src/samples/userguideOutput/configurationHandlingCopy.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingCopy.out
rename to subprojects/docs/src/samples/userguideOutput/configurationHandlingCopy.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingCopyVsFiles.out b/subprojects/docs/src/samples/userguideOutput/configurationHandlingCopyVsFiles.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingCopyVsFiles.out
rename to subprojects/docs/src/samples/userguideOutput/configurationHandlingCopyVsFiles.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingDependencies.out b/subprojects/docs/src/samples/userguideOutput/configurationHandlingDependencies.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingDependencies.out
rename to subprojects/docs/src/samples/userguideOutput/configurationHandlingDependencies.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingFiles.out b/subprojects/docs/src/samples/userguideOutput/configurationHandlingFiles.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configurationHandlingFiles.out
rename to subprojects/docs/src/samples/userguideOutput/configurationHandlingFiles.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configureObject.out b/subprojects/docs/src/samples/userguideOutput/configureObject.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configureObject.out
rename to subprojects/docs/src/samples/userguideOutput/configureObject.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configureObjectUsingScript.out b/subprojects/docs/src/samples/userguideOutput/configureObjectUsingScript.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configureObjectUsingScript.out
rename to subprojects/docs/src/samples/userguideOutput/configureObjectUsingScript.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/configureProjectUsingScript.out b/subprojects/docs/src/samples/userguideOutput/configureProjectUsingScript.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/configureProjectUsingScript.out
rename to subprojects/docs/src/samples/userguideOutput/configureProjectUsingScript.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/count.out b/subprojects/docs/src/samples/userguideOutput/count.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/count.out
rename to subprojects/docs/src/samples/userguideOutput/count.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/customPlugin.out b/subprojects/docs/src/samples/userguideOutput/customPlugin.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/customPlugin.out
rename to subprojects/docs/src/samples/userguideOutput/customPlugin.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/customPluginWithAdvancedConvention.out b/subprojects/docs/src/samples/userguideOutput/customPluginWithAdvancedConvention.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/customPluginWithAdvancedConvention.out
rename to subprojects/docs/src/samples/userguideOutput/customPluginWithAdvancedConvention.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/customPluginWithConvention.out b/subprojects/docs/src/samples/userguideOutput/customPluginWithConvention.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/customPluginWithConvention.out
rename to subprojects/docs/src/samples/userguideOutput/customPluginWithConvention.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/customTaskWithAction.out b/subprojects/docs/src/samples/userguideOutput/customTaskWithAction.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/customTaskWithAction.out
rename to subprojects/docs/src/samples/userguideOutput/customTaskWithAction.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/customTaskWithProperty.out b/subprojects/docs/src/samples/userguideOutput/customTaskWithProperty.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/customTaskWithProperty.out
rename to subprojects/docs/src/samples/userguideOutput/customTaskWithProperty.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/custom_logging_ui.out b/subprojects/docs/src/samples/userguideOutput/custom_logging_ui.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/custom_logging_ui.out
rename to subprojects/docs/src/samples/userguideOutput/custom_logging_ui.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/defaultTasks.out b/subprojects/docs/src/samples/userguideOutput/defaultTasks.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/defaultTasks.out
rename to subprojects/docs/src/samples/userguideOutput/defaultTasks.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/dependencyListReport.out b/subprojects/docs/src/samples/userguideOutput/dependencyListReport.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/dependencyListReport.out
rename to subprojects/docs/src/samples/userguideOutput/dependencyListReport.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/dependsOnAntTarget.out b/subprojects/docs/src/samples/userguideOutput/dependsOnAntTarget.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/dependsOnAntTarget.out
rename to subprojects/docs/src/samples/userguideOutput/dependsOnAntTarget.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/dependsOnTask.out b/subprojects/docs/src/samples/userguideOutput/dependsOnTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/dependsOnTask.out
rename to subprojects/docs/src/samples/userguideOutput/dependsOnTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/directoryTask.out b/subprojects/docs/src/samples/userguideOutput/directoryTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/directoryTask.out
rename to subprojects/docs/src/samples/userguideOutput/directoryTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/disableTask.out b/subprojects/docs/src/samples/userguideOutput/disableTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/disableTask.out
rename to subprojects/docs/src/samples/userguideOutput/disableTask.out
diff --git a/subprojects/docs/src/samples/userguideOutput/domainObjectContainer.out b/subprojects/docs/src/samples/userguideOutput/domainObjectContainer.out
new file mode 100644
index 0000000..fb7a894
--- /dev/null
+++ b/subprojects/docs/src/samples/userguideOutput/domainObjectContainer.out
@@ -0,0 +1,3 @@
+developerGuide -> /home/user/gradle/samples/userguide/organizeBuildLogic/customPluginWithDomainObjectContainer/src/docs/developerGuide
+quickStart -> /home/user/gradle/samples/userguide/organizeBuildLogic/customPluginWithDomainObjectContainer/src/docs/quick-start
+userGuide -> /home/user/gradle/samples/userguide/organizeBuildLogic/customPluginWithDomainObjectContainer/src/docs/userGuide
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/dynamic.out b/subprojects/docs/src/samples/userguideOutput/dynamic.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/dynamic.out
rename to subprojects/docs/src/samples/userguideOutput/dynamic.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/dynamicDepends.out b/subprojects/docs/src/samples/userguideOutput/dynamicDepends.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/dynamicDepends.out
rename to subprojects/docs/src/samples/userguideOutput/dynamicDepends.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/dynamicProperties.out b/subprojects/docs/src/samples/userguideOutput/dynamicProperties.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/dynamicProperties.out
rename to subprojects/docs/src/samples/userguideOutput/dynamicProperties.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/excludeTask.out b/subprojects/docs/src/samples/userguideOutput/excludeTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/excludeTask.out
rename to subprojects/docs/src/samples/userguideOutput/excludeTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/externalBuildDependency.out b/subprojects/docs/src/samples/userguideOutput/externalBuildDependency.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/externalBuildDependency.out
rename to subprojects/docs/src/samples/userguideOutput/externalBuildDependency.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/externalDependencies.out b/subprojects/docs/src/samples/userguideOutput/externalDependencies.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/externalDependencies.out
rename to subprojects/docs/src/samples/userguideOutput/externalDependencies.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/externalInitDependency.out b/subprojects/docs/src/samples/userguideOutput/externalInitDependency.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/externalInitDependency.out
rename to subprojects/docs/src/samples/userguideOutput/externalInitDependency.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/fileCollections.out b/subprojects/docs/src/samples/userguideOutput/fileCollections.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/fileCollections.out
rename to subprojects/docs/src/samples/userguideOutput/fileCollections.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/generatedFileDependencies.out b/subprojects/docs/src/samples/userguideOutput/generatedFileDependencies.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/generatedFileDependencies.out
rename to subprojects/docs/src/samples/userguideOutput/generatedFileDependencies.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/generatorTask.out b/subprojects/docs/src/samples/userguideOutput/generatorTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/generatorTask.out
rename to subprojects/docs/src/samples/userguideOutput/generatorTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/hello.out b/subprojects/docs/src/samples/userguideOutput/hello.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/hello.out
rename to subprojects/docs/src/samples/userguideOutput/hello.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/helloEnhanced.out b/subprojects/docs/src/samples/userguideOutput/helloEnhanced.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/helloEnhanced.out
rename to subprojects/docs/src/samples/userguideOutput/helloEnhanced.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/helloWithShortCut.out b/subprojects/docs/src/samples/userguideOutput/helloWithShortCut.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/helloWithShortCut.out
rename to subprojects/docs/src/samples/userguideOutput/helloWithShortCut.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/incrementalTask.out b/subprojects/docs/src/samples/userguideOutput/incrementalTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/incrementalTask.out
rename to subprojects/docs/src/samples/userguideOutput/incrementalTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/inheritedBuildLogic.out b/subprojects/docs/src/samples/userguideOutput/inheritedBuildLogic.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/inheritedBuildLogic.out
rename to subprojects/docs/src/samples/userguideOutput/inheritedBuildLogic.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/injectedBuildLogic.out b/subprojects/docs/src/samples/userguideOutput/injectedBuildLogic.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/injectedBuildLogic.out
rename to subprojects/docs/src/samples/userguideOutput/injectedBuildLogic.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/intro.out b/subprojects/docs/src/samples/userguideOutput/intro.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/intro.out
rename to subprojects/docs/src/samples/userguideOutput/intro.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/javaQuickstart.out b/subprojects/docs/src/samples/userguideOutput/javaQuickstart.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/javaQuickstart.out
rename to subprojects/docs/src/samples/userguideOutput/javaQuickstart.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/lazyDependsOn.out b/subprojects/docs/src/samples/userguideOutput/lazyDependsOn.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/lazyDependsOn.out
rename to subprojects/docs/src/samples/userguideOutput/lazyDependsOn.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/makeDirectory.out b/subprojects/docs/src/samples/userguideOutput/makeDirectory.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/makeDirectory.out
rename to subprojects/docs/src/samples/userguideOutput/makeDirectory.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/mkdirTrap.out b/subprojects/docs/src/samples/userguideOutput/mkdirTrap.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/mkdirTrap.out
rename to subprojects/docs/src/samples/userguideOutput/mkdirTrap.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multipleTasksFromCommandLine.out b/subprojects/docs/src/samples/userguideOutput/multipleTasksFromCommandLine.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multipleTasksFromCommandLine.out
rename to subprojects/docs/src/samples/userguideOutput/multipleTasksFromCommandLine.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectAbsoluteTaskPaths.out b/subprojects/docs/src/samples/userguideOutput/multiprojectAbsoluteTaskPaths.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectAbsoluteTaskPaths.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectAbsoluteTaskPaths.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectAddKrill.out b/subprojects/docs/src/samples/userguideOutput/multiprojectAddKrill.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectAddKrill.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectAddKrill.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectAddTropical.out b/subprojects/docs/src/samples/userguideOutput/multiprojectAddTropical.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectAddTropical.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectAddTropical.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFirstExample.out b/subprojects/docs/src/samples/userguideOutput/multiprojectFirstExample.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFirstExample.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectFirstExample.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFirstMessages.out b/subprojects/docs/src/samples/userguideOutput/multiprojectFirstMessages.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFirstMessages.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectFirstMessages.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFlat.out b/subprojects/docs/src/samples/userguideOutput/multiprojectFlat.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFlat.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectFlat.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFlatPartial.out b/subprojects/docs/src/samples/userguideOutput/multiprojectFlatPartial.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFlatPartial.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectFlatPartial.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFlatPartialWithNoDefaultMaster.out b/subprojects/docs/src/samples/userguideOutput/multiprojectFlatPartialWithNoDefaultMaster.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectFlatPartialWithNoDefaultMaster.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectFlatPartialWithNoDefaultMaster.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesConfigDependencies.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesConfigDependencies.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesConfigDependencies.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesConfigDependencies.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesAltSolution.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesAltSolution.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesAltSolution.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesAltSolution.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesBroken.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesBroken.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesBroken.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesConfigDependenciesBroken.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesDependencies.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesDependencies.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesDependencies.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesDependencies.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesDependenciesSubBuild.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesDependenciesSubBuild.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesDependenciesSubBuild.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesDependenciesSubBuild.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesDifferentTaskNames.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesDifferentTaskNames.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesDifferentTaskNames.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesDifferentTaskNames.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesHack.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesHack.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesHack.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesHack.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesHackBroken.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesHackBroken.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesHackBroken.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesHackBroken.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesTaskDependencies.out b/subprojects/docs/src/samples/userguideOutput/multiprojectMessagesTaskDependencies.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectMessagesTaskDependencies.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectMessagesTaskDependencies.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectPartialTasks.out b/subprojects/docs/src/samples/userguideOutput/multiprojectPartialTasks.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectPartialTasks.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectPartialTasks.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectPartialTasksNotQuiet.out b/subprojects/docs/src/samples/userguideOutput/multiprojectPartialTasksNotQuiet.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectPartialTasksNotQuiet.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectPartialTasksNotQuiet.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectSpreadSpecifics.out b/subprojects/docs/src/samples/userguideOutput/multiprojectSpreadSpecifics.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectSpreadSpecifics.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectSpreadSpecifics.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectSubBuild.out b/subprojects/docs/src/samples/userguideOutput/multiprojectSubBuild.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectSubBuild.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectSubBuild.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectSubprojectsAddFromTop.out b/subprojects/docs/src/samples/userguideOutput/multiprojectSubprojectsAddFromTop.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectSubprojectsAddFromTop.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectSubprojectsAddFromTop.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectTropicalWithProperties.out b/subprojects/docs/src/samples/userguideOutput/multiprojectTropicalWithProperties.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectTropicalWithProperties.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectTropicalWithProperties.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multiprojectUseSubprojects.out b/subprojects/docs/src/samples/userguideOutput/multiprojectUseSubprojects.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multiprojectUseSubprojects.out
rename to subprojects/docs/src/samples/userguideOutput/multiprojectUseSubprojects.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuild.out b/subprojects/docs/src/samples/userguideOutput/multitestingBuild.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuild.out
rename to subprojects/docs/src/samples/userguideOutput/multitestingBuild.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuildDashA.out b/subprojects/docs/src/samples/userguideOutput/multitestingBuildDashA.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuildDashA.out
rename to subprojects/docs/src/samples/userguideOutput/multitestingBuildDashA.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuildDependents.out b/subprojects/docs/src/samples/userguideOutput/multitestingBuildDependents.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuildDependents.out
rename to subprojects/docs/src/samples/userguideOutput/multitestingBuildDependents.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuildNeeded.out b/subprojects/docs/src/samples/userguideOutput/multitestingBuildNeeded.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/multitestingBuildNeeded.out
rename to subprojects/docs/src/samples/userguideOutput/multitestingBuildNeeded.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/nestedBuild.out b/subprojects/docs/src/samples/userguideOutput/nestedBuild.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/nestedBuild.out
rename to subprojects/docs/src/samples/userguideOutput/nestedBuild.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/pluginAccessConvention.out b/subprojects/docs/src/samples/userguideOutput/pluginAccessConvention.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/pluginAccessConvention.out
rename to subprojects/docs/src/samples/userguideOutput/pluginAccessConvention.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/pluginConfig.out b/subprojects/docs/src/samples/userguideOutput/pluginConfig.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/pluginConfig.out
rename to subprojects/docs/src/samples/userguideOutput/pluginConfig.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/pluginConvention.out b/subprojects/docs/src/samples/userguideOutput/pluginConvention.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/pluginConvention.out
rename to subprojects/docs/src/samples/userguideOutput/pluginConvention.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/pluginIntro.out b/subprojects/docs/src/samples/userguideOutput/pluginIntro.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/pluginIntro.out
rename to subprojects/docs/src/samples/userguideOutput/pluginIntro.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/projectApi.out b/subprojects/docs/src/samples/userguideOutput/projectApi.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/projectApi.out
rename to subprojects/docs/src/samples/userguideOutput/projectApi.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/projectEvaluateEvents.out b/subprojects/docs/src/samples/userguideOutput/projectEvaluateEvents.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/projectEvaluateEvents.out
rename to subprojects/docs/src/samples/userguideOutput/projectEvaluateEvents.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/projectListReport.out b/subprojects/docs/src/samples/userguideOutput/projectListReport.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/projectListReport.out
rename to subprojects/docs/src/samples/userguideOutput/projectListReport.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/properties.out b/subprojects/docs/src/samples/userguideOutput/properties.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/properties.out
rename to subprojects/docs/src/samples/userguideOutput/properties.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/propertyListReport.out b/subprojects/docs/src/samples/userguideOutput/propertyListReport.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/propertyListReport.out
rename to subprojects/docs/src/samples/userguideOutput/propertyListReport.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/replaceTask.out b/subprojects/docs/src/samples/userguideOutput/replaceTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/replaceTask.out
rename to subprojects/docs/src/samples/userguideOutput/replaceTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/scope.out b/subprojects/docs/src/samples/userguideOutput/scope.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/scope.out
rename to subprojects/docs/src/samples/userguideOutput/scope.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/selectProjectUsingBuildFile.out b/subprojects/docs/src/samples/userguideOutput/selectProjectUsingBuildFile.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/selectProjectUsingBuildFile.out
rename to subprojects/docs/src/samples/userguideOutput/selectProjectUsingBuildFile.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/selectProjectUsingProjectDir.out b/subprojects/docs/src/samples/userguideOutput/selectProjectUsingProjectDir.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/selectProjectUsingProjectDir.out
rename to subprojects/docs/src/samples/userguideOutput/selectProjectUsingProjectDir.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/stopExecutionException.out b/subprojects/docs/src/samples/userguideOutput/stopExecutionException.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/stopExecutionException.out
rename to subprojects/docs/src/samples/userguideOutput/stopExecutionException.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskCreationEvents.out b/subprojects/docs/src/samples/userguideOutput/taskCreationEvents.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskCreationEvents.out
rename to subprojects/docs/src/samples/userguideOutput/taskCreationEvents.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskExecutionEvents.out b/subprojects/docs/src/samples/userguideOutput/taskExecutionEvents.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskExecutionEvents.out
rename to subprojects/docs/src/samples/userguideOutput/taskExecutionEvents.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskListAllReport.out b/subprojects/docs/src/samples/userguideOutput/taskListAllReport.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskListAllReport.out
rename to subprojects/docs/src/samples/userguideOutput/taskListAllReport.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskListReport.out b/subprojects/docs/src/samples/userguideOutput/taskListReport.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskListReport.out
rename to subprojects/docs/src/samples/userguideOutput/taskListReport.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskOnlyIf.out b/subprojects/docs/src/samples/userguideOutput/taskOnlyIf.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskOnlyIf.out
rename to subprojects/docs/src/samples/userguideOutput/taskOnlyIf.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskRule.out b/subprojects/docs/src/samples/userguideOutput/taskRule.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskRule.out
rename to subprojects/docs/src/samples/userguideOutput/taskRule.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskRuleDependsOn.out b/subprojects/docs/src/samples/userguideOutput/taskRuleDependsOn.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskRuleDependsOn.out
rename to subprojects/docs/src/samples/userguideOutput/taskRuleDependsOn.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/taskWithNestedText.out b/subprojects/docs/src/samples/userguideOutput/taskWithNestedText.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/taskWithNestedText.out
rename to subprojects/docs/src/samples/userguideOutput/taskWithNestedText.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/upper.out b/subprojects/docs/src/samples/userguideOutput/upper.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/upper.out
rename to subprojects/docs/src/samples/userguideOutput/upper.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/useAntTask.out b/subprojects/docs/src/samples/userguideOutput/useAntTask.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/useAntTask.out
rename to subprojects/docs/src/samples/userguideOutput/useAntTask.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/zipWithArguments.out b/subprojects/docs/src/samples/userguideOutput/zipWithArguments.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/zipWithArguments.out
rename to subprojects/docs/src/samples/userguideOutput/zipWithArguments.out
diff --git a/subprojects/gradle-docs/src/samples/userguideOutput/zipWithCustomName.out b/subprojects/docs/src/samples/userguideOutput/zipWithCustomName.out
similarity index 100%
rename from subprojects/gradle-docs/src/samples/userguideOutput/zipWithCustomName.out
rename to subprojects/docs/src/samples/userguideOutput/zipWithCustomName.out
diff --git a/subprojects/gradle-docs/src/samples/water/bluewhale/build.gradle b/subprojects/docs/src/samples/water/bluewhale/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/water/bluewhale/build.gradle
rename to subprojects/docs/src/samples/water/bluewhale/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/water/build.gradle b/subprojects/docs/src/samples/water/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/water/build.gradle
rename to subprojects/docs/src/samples/water/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/water/krill/build.gradle b/subprojects/docs/src/samples/water/krill/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/water/krill/build.gradle
rename to subprojects/docs/src/samples/water/krill/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/water/phytoplankton/build.gradle b/subprojects/docs/src/samples/water/phytoplankton/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/water/phytoplankton/build.gradle
rename to subprojects/docs/src/samples/water/phytoplankton/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/water/settings.gradle b/subprojects/docs/src/samples/water/settings.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/water/settings.gradle
rename to subprojects/docs/src/samples/water/settings.gradle
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/build.gradle b/subprojects/docs/src/samples/webApplication/customised/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/build.gradle
rename to subprojects/docs/src/samples/webApplication/customised/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/readme.xml b/subprojects/docs/src/samples/webApplication/customised/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/readme.xml
rename to subprojects/docs/src/samples/webApplication/customised/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/additionalWebInf/additional.xml b/subprojects/docs/src/samples/webApplication/customised/src/additionalWebInf/additional.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/additionalWebInf/additional.xml
rename to subprojects/docs/src/samples/webApplication/customised/src/additionalWebInf/additional.xml
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/main/java/org/gradle/HelloServlet.java b/subprojects/docs/src/samples/webApplication/customised/src/main/java/org/gradle/HelloServlet.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/main/java/org/gradle/HelloServlet.java
rename to subprojects/docs/src/samples/webApplication/customised/src/main/java/org/gradle/HelloServlet.java
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/main/java/org/gradle/MyClass.java b/subprojects/docs/src/samples/webApplication/customised/src/main/java/org/gradle/MyClass.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/main/java/org/gradle/MyClass.java
rename to subprojects/docs/src/samples/webApplication/customised/src/main/java/org/gradle/MyClass.java
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/main/webapp/WEB-INF/webapp.xml b/subprojects/docs/src/samples/webApplication/customised/src/main/webapp/WEB-INF/webapp.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/main/webapp/WEB-INF/webapp.xml
rename to subprojects/docs/src/samples/webApplication/customised/src/main/webapp/WEB-INF/webapp.xml
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/main/webapp/webapp.html b/subprojects/docs/src/samples/webApplication/customised/src/main/webapp/webapp.html
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/main/webapp/webapp.html
rename to subprojects/docs/src/samples/webApplication/customised/src/main/webapp/webapp.html
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/rootContent/root.txt b/subprojects/docs/src/samples/webApplication/customised/src/rootContent/root.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/rootContent/root.txt
rename to subprojects/docs/src/samples/webApplication/customised/src/rootContent/root.txt
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/someWeb.xml b/subprojects/docs/src/samples/webApplication/customised/src/someWeb.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/someWeb.xml
rename to subprojects/docs/src/samples/webApplication/customised/src/someWeb.xml
diff --git a/subprojects/gradle-docs/src/samples/webApplication/customised/src/test/java/org/MyClassTest.java b/subprojects/docs/src/samples/webApplication/customised/src/test/java/org/MyClassTest.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/customised/src/test/java/org/MyClassTest.java
rename to subprojects/docs/src/samples/webApplication/customised/src/test/java/org/MyClassTest.java
diff --git a/subprojects/gradle-docs/src/samples/webApplication/quickstart/build.gradle b/subprojects/docs/src/samples/webApplication/quickstart/build.gradle
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/quickstart/build.gradle
rename to subprojects/docs/src/samples/webApplication/quickstart/build.gradle
diff --git a/subprojects/gradle-docs/src/samples/webApplication/quickstart/readme.xml b/subprojects/docs/src/samples/webApplication/quickstart/readme.xml
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/quickstart/readme.xml
rename to subprojects/docs/src/samples/webApplication/quickstart/readme.xml
diff --git a/subprojects/gradle-docs/src/samples/webApplication/quickstart/src/main/java/org/gradle/sample/Greeter.java b/subprojects/docs/src/samples/webApplication/quickstart/src/main/java/org/gradle/sample/Greeter.java
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/quickstart/src/main/java/org/gradle/sample/Greeter.java
rename to subprojects/docs/src/samples/webApplication/quickstart/src/main/java/org/gradle/sample/Greeter.java
diff --git a/subprojects/gradle-docs/src/samples/webApplication/quickstart/src/main/resources/greeting.txt b/subprojects/docs/src/samples/webApplication/quickstart/src/main/resources/greeting.txt
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/quickstart/src/main/resources/greeting.txt
rename to subprojects/docs/src/samples/webApplication/quickstart/src/main/resources/greeting.txt
diff --git a/subprojects/gradle-docs/src/samples/webApplication/quickstart/src/main/webapp/index.jsp b/subprojects/docs/src/samples/webApplication/quickstart/src/main/webapp/index.jsp
similarity index 100%
rename from subprojects/gradle-docs/src/samples/webApplication/quickstart/src/main/webapp/index.jsp
rename to subprojects/docs/src/samples/webApplication/quickstart/src/main/webapp/index.jsp
diff --git a/subprojects/gradle-eclipse/eclipse.gradle b/subprojects/eclipse/eclipse.gradle
similarity index 100%
rename from subprojects/gradle-eclipse/eclipse.gradle
rename to subprojects/eclipse/eclipse.gradle
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseClasspath.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseClasspath.groovy
new file mode 100644
index 0000000..7f59d77
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseClasspath.groovy
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse
+
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.tasks.SourceSet
+import org.gradle.api.tasks.XmlGeneratorTask
+import org.gradle.plugins.eclipse.model.Classpath
+import org.gradle.plugins.eclipse.model.Container
+import org.gradle.plugins.eclipse.model.internal.ClasspathFactory
+
+/**
+ * Generates an Eclipse <code>.classpath</code> file.
+ *
+ * @author Hans Dockter
+ */
+class EclipseClasspath extends XmlGeneratorTask<Classpath> {
+    /**
+     * The source sets to be added to the classpath.
+     */
+    Iterable<SourceSet> sourceSets
+
+    /**
+     * The configurations which files are to be transformed into classpath entries.
+     */
+    Set<Configuration> plusConfigurations = new LinkedHashSet<Configuration>()
+
+    /**
+     * The configurations which files are to be excluded from the classpath entries.
+     */
+    Set<Configuration> minusConfigurations = new LinkedHashSet<Configuration>()
+
+    /**
+     * The variables to be used for replacing absolute paths in classpath entries.
+     */
+    Map<String, File> variables = [:]
+
+    /**
+     * Containers to be added to the classpath
+     */
+    Set<Container> containers = new LinkedHashSet<Container>()
+
+    /**
+     * The default output directory for eclipse generated files, eg classes.
+     */
+    File defaultOutputDir
+
+    /**
+     * Whether to download and add sources associated with the dependency jars. Defaults to true.
+     */
+    boolean downloadSources = true
+
+    /**
+     * Whether to download and add javadocs associated with the dependency jars. Defaults to false.
+     */
+    boolean downloadJavadoc = false
+
+    protected ClasspathFactory modelFactory = new ClasspathFactory()
+
+    EclipseClasspath() {
+        xmlTransformer.indentation = "\t"
+    }
+
+    @Override protected Classpath create() {
+        return new Classpath(xmlTransformer)
+    }
+
+    @Override protected void configure(Classpath object) {
+        modelFactory.configure(this, object)
+    }
+
+    /**
+     * Adds containers to the .classpath.
+     *
+     * @param containers the container names to be added to the .classpath.
+     */
+    void containers(String... containers) {
+        assert containers != null
+        this.containers.addAll(containers as List)
+    }
+
+    /**
+     * Adds variables to be used for replacing absolute paths in classpath entries.
+     *
+     * @param variables A map where the keys are the variable names and the values are the variable values.
+     */
+    void variables(Map<String, File> variables) {
+        assert variables != null
+        this.variables.putAll variables
+    }
+}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseJdt.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseJdt.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseJdt.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseJdt.groovy
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipsePlugin.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipsePlugin.groovy
new file mode 100644
index 0000000..6486202
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipsePlugin.groovy
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse
+
+import org.gradle.api.Project
+import org.gradle.api.internal.plugins.IdePlugin
+import org.gradle.api.plugins.GroovyBasePlugin
+import org.gradle.api.plugins.JavaBasePlugin
+import org.gradle.api.plugins.JavaPlugin
+import org.gradle.api.plugins.WarPlugin
+import org.gradle.api.plugins.scala.ScalaBasePlugin
+import org.gradle.plugins.eclipse.model.BuildCommand
+import org.gradle.plugins.eclipse.model.Facet
+import org.gradle.api.JavaVersion
+
+/**
+ * <p>A plugin which generates Eclipse files.</p>
+ *
+ * @author Hans Dockter
+ */
+class EclipsePlugin extends IdePlugin {
+    static final String ECLIPSE_TASK_NAME = "eclipse"
+    static final String CLEAN_ECLIPSE_TASK_NAME = "cleanEclipse"
+    static final String ECLIPSE_PROJECT_TASK_NAME = "eclipseProject"
+    static final String ECLIPSE_WTP_TASK_NAME = "eclipseWtp"
+    static final String ECLIPSE_CP_TASK_NAME = "eclipseClasspath"
+    static final String ECLIPSE_JDT_TASK_NAME = "eclipseJdt"
+
+    @Override protected String getLifecycleTaskName() {
+        return 'eclipse'
+    }
+
+    @Override protected void onApply(Project project) {
+        lifecycleTask.description = 'Generates the Eclipse files.'
+        cleanTask.description = 'Cleans the generated eclipse files.'
+        configureEclipseProject(project)
+        configureEclipseClasspath(project)
+        configureEclipseJdt(project)
+        configureEclipseWtpModuleForWarProjects(project);
+    }
+
+    private void configureEclipseProject(Project project) {
+        EclipseProject eclipseProject = project.tasks.add(ECLIPSE_PROJECT_TASK_NAME, EclipseProject.class);
+        eclipseProject.projectName = project.name
+        eclipseProject.description = "Generates the Eclipse .project file."
+        eclipseProject.inputFile = project.file('.project')
+        eclipseProject.outputFile = project.file('.project')
+        eclipseProject.conventionMapping.comment = { project.description }
+
+        project.plugins.withType(JavaBasePlugin.class) {
+            project.configure(project.eclipseProject) {
+                buildCommands = [new BuildCommand("org.eclipse.jdt.core.javabuilder")]
+                natures = ["org.eclipse.jdt.core.javanature"]
+            }
+        }
+        project.plugins.withType(GroovyBasePlugin.class) {
+            project.configure(project.eclipseProject) {
+                natures.add(natures.indexOf("org.eclipse.jdt.core.javanature"), "org.eclipse.jdt.groovy.core.groovyNature")
+            }
+        }
+        project.plugins.withType(ScalaBasePlugin.class) {
+            project.configure(project.eclipseProject) {
+                buildCommands = buildCommands.collect { command ->
+                    command.name == "org.eclipse.jdt.core.javabuilder" ? new BuildCommand("ch.epfl.lamp.sdt.core.scalabuilder") : command
+                }
+                natures.add(natures.indexOf("org.eclipse.jdt.core.javanature"), "ch.epfl.lamp.sdt.core.scalanature")
+            }
+        }
+        project.plugins.withType(WarPlugin.class) {
+            project.configure(project.eclipseProject) {
+                buildCommand 'org.eclipse.wst.common.project.facet.core.builder'
+                buildCommand 'org.eclipse.wst.validation.validationbuilder'
+                natures 'org.eclipse.wst.common.project.facet.core.nature', 'org.eclipse.wst.common.modulecore.ModuleCoreNature'
+            }
+        }
+
+        addWorker(eclipseProject)
+    }
+
+    private void configureEclipseClasspath(final Project project) {
+        project.plugins.withType(JavaBasePlugin.class) {
+            EclipseClasspath eclipseClasspath = project.tasks.add(ECLIPSE_CP_TASK_NAME, EclipseClasspath.class)
+            project.configure(eclipseClasspath) {
+                description = "Generates the Eclipse .classpath file."
+                containers 'org.eclipse.jdt.launching.JRE_CONTAINER'
+                sourceSets = project.sourceSets
+                inputFile = project.file('.classpath')
+                outputFile = project.file('.classpath')
+                conventionMapping.defaultOutputDir = { new File(project.projectDir, 'bin') }
+            }
+            addWorker(eclipseClasspath)
+        }
+        project.plugins.withType(JavaPlugin.class) {
+            project.configure(project.eclipseClasspath) {
+                plusConfigurations = [project.configurations.testRuntime]
+            }
+        }
+    }
+
+    private void configureEclipseJdt(final Project project) {
+        project.plugins.withType(JavaBasePlugin.class) {
+            EclipseJdt eclipseJdt = project.tasks.add(ECLIPSE_JDT_TASK_NAME, EclipseJdt.class)
+            project.configure(eclipseJdt) {
+                description = "Generates the Eclipse JDT settings file."
+                outputFile = project.file('.settings/org.eclipse.jdt.core.prefs')
+                inputFile = project.file('.settings/org.eclipse.jdt.core.prefs')
+                conventionMapping.sourceCompatibility = { project.sourceCompatibility }
+                conventionMapping.targetCompatibility = { project.targetCompatibility }
+            }
+            addWorker(eclipseJdt)
+        }
+    }
+
+    private void configureEclipseWtpModuleForWarProjects(final Project project) {
+        project.plugins.withType(WarPlugin.class) {
+            final EclipseWtp eclipseWtp = project.tasks.add(ECLIPSE_WTP_TASK_NAME, EclipseWtp.class);
+
+            project.configure(eclipseWtp) {
+                description = 'Generate the Eclipse WTP settings files.'
+                deployName = project.name
+                conventionMapping.contextPath = { project.war.baseName }
+                conventionMapping.facets = { [new Facet("jst.web", "2.4"), new Facet("jst.java", toJavaFacetVersion(project.sourceCompatibility))]}
+                sourceSets = project.sourceSets.matching { sourceSet -> sourceSet.name == 'main' }
+                plusConfigurations = [project.configurations.runtime]
+                minusConfigurations = [project.configurations.providedRuntime]
+                resource deployPath: '/', sourcePath: project.convention.plugins.war.webAppDirName
+                orgEclipseWstCommonComponentInputFile = project.file('.settings/org.eclipse.wst.common.component')
+                orgEclipseWstCommonComponentOutputFile = project.file('.settings/org.eclipse.wst.common.component')
+                orgEclipseWstCommonProjectFacetCoreInputFile = project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
+                orgEclipseWstCommonProjectFacetCoreOutputFile = project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
+            }
+
+            addWorker(eclipseWtp)
+        }
+    }
+
+    private String toJavaFacetVersion(JavaVersion version) {
+        if (version == JavaVersion.VERSION_1_5) {
+            return '5.0'
+        }
+        if (version == JavaVersion.VERSION_1_6) {
+            return '6.0'
+        }
+        return version.toString()
+    }
+}
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseProject.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseProject.groovy
new file mode 100644
index 0000000..709b656
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseProject.groovy
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse
+
+
+import org.gradle.api.InvalidUserDataException
+import org.gradle.api.tasks.XmlGeneratorTask
+import org.gradle.plugins.eclipse.model.BuildCommand
+import org.gradle.plugins.eclipse.model.Link
+import org.gradle.plugins.eclipse.model.Project
+
+/**
+ * Generates an Eclipse <code>.project</code> file.
+ *
+ * @author Hans Dockter
+ */
+class EclipseProject extends XmlGeneratorTask<Project> {
+    private static final LINK_ARGUMENTS = ['name', 'type', 'location', 'locationUri']
+
+    /**
+     * The name used for the name of the eclipse project
+     */
+    String projectName;
+
+    /**
+     * A comment used for the eclipse project
+     */
+    String comment;
+
+    /**
+     * The referenced projects of this Eclipse project.
+     */
+    Set<String> referencedProjects = new LinkedHashSet<String>();
+
+    /**
+     * The natures to be added to this Eclipse project.
+     */
+    List<String> natures = []
+
+    /**
+     * The build commands to be added to this Eclipse project.
+     */
+    List<BuildCommand> buildCommands = []
+
+    /**
+     * The links to be added to this Eclipse project.
+     */
+    Set<Link> links = new LinkedHashSet<Link>();
+
+    EclipseProject() {
+        xmlTransformer.indentation = "\t"
+    }
+
+    @Override protected Project create() {
+        return new Project(xmlTransformer)
+    }
+
+    @Override protected void configure(Project project) {
+        project.configure(this)
+    }
+
+    /**
+     * Adds natures entries to the eclipse project.
+     * @param natures the nature names
+     */
+    void natures(String... natures) {
+        assert natures != null
+        this.natures.addAll(natures as List)
+    }
+
+    /**
+     * Adds project references to the eclipse project.
+     *
+     * @param referencedProjects The name of the project references.
+     */
+    void referencedProjects(String... referencedProjects) {
+        assert referencedProjects != null
+        this.referencedProjects.addAll(referencedProjects as List)
+    }
+
+    /**
+     * Adds a build command with arguments to the eclipse project.
+     *
+     * @param args A map with arguments, where the key is the name of the argument and the value the value.
+     * @param buildCommand The name of the build command.
+     * @see #buildCommand(String)
+     */
+    void buildCommand(Map args, String buildCommand) {
+        assert buildCommand != null
+        this.buildCommands.add(new BuildCommand(buildCommand, args))
+    }
+
+    /**
+     * Adds a build command to the eclipse project.
+     *
+     * @param buildCommand The name of the build command
+     * @see #buildCommand(Map, String)
+     */
+    void buildCommand(String buildCommand) {
+        assert buildCommand != null
+        this.buildCommands.add(new BuildCommand(buildCommand))
+    }
+
+    /**
+     * Adds a link to the eclipse project.
+     *
+     * @param args A maps with the args for the link. Legal keys for the map are name, type, location and locationUri.
+     */
+    void link(Map<String, String> args) {
+        def illegalArgs = LINK_ARGUMENTS - args.keySet()
+        if (illegalArgs) {
+            throw new InvalidUserDataException("You provided illegal argument for a link: " + illegalArgs)
+        }
+        this.links.add(new Link(args.name, args.type, args.location, args.locationUri))
+    }
+}
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseWtp.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseWtp.groovy
new file mode 100644
index 0000000..33d11b1
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseWtp.groovy
@@ -0,0 +1,187 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse
+
+
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.internal.ConventionTask
+import org.gradle.api.tasks.OutputFile
+import org.gradle.api.tasks.SourceSet
+import org.gradle.api.tasks.TaskAction
+import org.gradle.listener.ActionBroadcast
+import org.gradle.plugins.eclipse.model.Facet
+import org.gradle.plugins.eclipse.model.WbProperty
+import org.gradle.plugins.eclipse.model.WbResource
+import org.gradle.plugins.eclipse.model.Wtp
+import org.gradle.plugins.eclipse.model.internal.WtpFactory
+import org.gradle.util.ConfigureUtil
+
+/**
+ * Generates Eclipse configuration files for Eclipse WTP.
+ *
+ * @author Hans Dockter
+ */
+class EclipseWtp extends ConventionTask {
+    /**
+     * The file that is merged into the to be produced org.eclipse.wst.common.component file. This
+     * file must not exist.
+     */
+    File orgEclipseWstCommonComponentInputFile
+
+    /**
+     * The output file for the org.eclipse.wst.common.component metadata.
+     */
+    @OutputFile
+    File orgEclipseWstCommonComponentOutputFile
+
+    /**
+     * The file that is merged into the to be produced org.eclipse.wst.common.project.facet.core file. This
+     * file must not exist.
+     */
+    File orgEclipseWstCommonProjectFacetCoreInputFile
+
+    /**
+     * The output file for the org.eclipse.wst.common.project.facet.core metadata.
+     */
+    @OutputFile
+    File orgEclipseWstCommonProjectFacetCoreOutputFile
+
+    /**
+     * The source sets to be transformed into wb-resource elements.
+     */
+    Iterable<SourceSet> sourceSets
+
+    /**
+     * The configurations which files are to be transformed into dependent-module elements of
+     * the org.eclipse.wst.common.component file.
+     */
+    Set<Configuration> plusConfigurations
+
+    /**
+     * The configurations which files are to be excluded from the dependent-module elements of
+     * the org.eclipse.wst.common.component file.
+     */
+    Set<Configuration> minusConfigurations
+
+    /**
+     * The facets to be added as installed elements to the org.eclipse.wst.common.project.facet.core file.
+     */
+    List<Facet> facets = []
+
+    /**
+     * The deploy name to be used in the org.eclipse.wst.common.component file.
+     */
+    String deployName;
+
+    /**
+     * The variables to be used for replacing absolute path in dependent-module elements of
+     * the org.eclipse.wst.common.component file.
+     */
+    Map<String, File> variables = [:]
+
+    /**
+     * Additional wb-resource elements.
+     */
+    List<WbResource> resources = []
+
+    /**
+     * Additional property elements.
+     */
+    List<WbProperty> properties = []
+
+    /**
+     * The context path for the web application
+     */
+    String contextPath
+
+    protected WtpFactory modelFactory = new WtpFactory()
+
+    ActionBroadcast<Map<String, Node>> withXmlActions = new ActionBroadcast<Map<String, Node>>()
+    ActionBroadcast<Wtp> beforeConfiguredActions = new ActionBroadcast<Wtp>()
+    ActionBroadcast<Wtp> whenConfiguredActions = new ActionBroadcast<Wtp>()
+
+    EclipseWtp() {
+        outputs.upToDateWhen { false }
+    }
+
+    @TaskAction
+    protected void generateXml() {
+        Wtp wtp = modelFactory.createWtp(this)
+        wtp.toXml(orgEclipseWstCommonComponentOutputFile, orgEclipseWstCommonProjectFacetCoreOutputFile)
+    }
+
+    /**
+     * Adds a facet for the org.eclipse.wst.common.project.facet.core file.
+     *
+     * @param args A map that must contain a name and version key with corresponding values.
+     */
+    void facet(Map<String, ?> args) {
+        setFacets(getFacets() + [ConfigureUtil.configureByMap(args, new Facet())])
+    }
+
+    /**
+     * Adds variables to be used for replacing absolute path in dependent-module elements of
+     * the org.eclipse.wst.common.component file.
+     *
+     * @param variables A map where the keys are the variable names and the values are the variable values.
+     */
+    void variables(Map<String, File> variables) {
+        assert variables != null
+        this.variables.putAll variables
+    }
+
+    /**
+     * Adds a property to be added to the org.eclipse.wst.common.component file.
+     *
+     * @param args A map that must contain a name and value key with corresponding values.
+     */
+    void property(Map<String, String> args) {
+        properties.add(new WbProperty(args.name, args.value))
+    }
+
+    /**
+     * Adds a wb-resource to be added to the org.eclipse.wst.common.component file.
+     *
+     * @param args A map that must contain a deployPath and sourcePath key with corresponding values.
+     */
+    void resource(Map<String, String> args) {
+        resources.add(new WbResource(args.deployPath, args.sourcePath))
+    }
+
+    /**
+     * Adds a closure to be called when the XML content for each file has been generated, but before the content is
+     * written to the file.
+     */
+    void withXml(Closure closure) {
+        withXmlActions.add(closure)
+    }
+
+    /**
+     * Adds a closure to be called when the model has been loaded from the input files, and before this task has
+     * configured the model.
+     */
+    void beforeConfigured(Closure closure) {
+        beforeConfiguredActions.add(closure)
+    }
+
+    /**
+     * Adds a closure to be called after this task has configured model, and before it generates the XML content for the
+     * files.
+     */
+    void whenConfigured(Closure closure) {
+        whenConfiguredActions.add(closure)
+    }
+}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractClasspathEntry.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractClasspathEntry.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractClasspathEntry.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractClasspathEntry.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractLibrary.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractLibrary.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractLibrary.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AbstractLibrary.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AccessRule.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AccessRule.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AccessRule.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/AccessRule.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/BuildCommand.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/BuildCommand.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/BuildCommand.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/BuildCommand.groovy
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Classpath.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Classpath.groovy
new file mode 100644
index 0000000..cb3ef01
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Classpath.groovy
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse.model
+
+import org.gradle.api.internal.XmlTransformer
+import org.gradle.api.internal.tasks.generator.XmlPersistableConfigurationObject
+
+/**
+ * Represents the customizable elements of an eclipse classpath file. (via XML hooks everything is customizable).
+ *
+ * @author Hans Dockter
+ */
+class Classpath extends XmlPersistableConfigurationObject {
+    List<ClasspathEntry> entries = []
+
+    Classpath(XmlTransformer xmlTransformer) {
+        super(xmlTransformer)
+    }
+
+    @Override protected String getDefaultResourceName() {
+        return 'defaultClasspath.xml'
+    }
+
+    @Override protected void load(Node xml) {
+        xml.classpathentry.each { Node entryNode ->
+            ClasspathEntry entry = null
+            switch (entryNode. at kind) {
+                case 'src':
+                    def path = entryNode. at path
+                    entry = path.startsWith('/') ? new ProjectDependency(entryNode) : new SourceFolder(entryNode)
+                    break
+                case 'var': entry = new Variable(entryNode)
+                    break
+                case 'con': entry = new Container(entryNode)
+                    break
+                case 'lib': entry = new Library(entryNode)
+                    break
+                case 'output': entry = new Output(entryNode)
+                    break
+            }
+            if (entry) {
+                entries.add(entry)
+            }
+        }
+    }
+
+    def configure(List newEntries) {
+        def entriesToBeKept = entries.findAll { !isDependency(it) }
+        entries = (entriesToBeKept + newEntries).unique()
+    }
+
+    @Override protected void store(Node xml) {
+        xml.classpathentry.each { xml.remove(it) }
+        entries.each { ClasspathEntry entry ->
+            entry.appendNode(xml)
+        }
+    }
+
+    boolean equals(o) {
+        if (this.is(o)) { return true }
+
+        if (getClass() != o.class) { return false }
+
+        Classpath classpath = (Classpath) o;
+
+        if (entries != classpath.entries) { return false }
+
+        return true
+    }
+
+    int hashCode() {
+        int result;
+
+        result = entries.hashCode();
+        return result;
+    }
+
+    public String toString() {
+        return "Classpath{" +
+                "entries=" + entries +
+                '}';
+    }
+
+    private boolean isDependency(ClasspathEntry entry) {
+        entry instanceof ProjectDependency || entry instanceof Library
+    }
+}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ClasspathEntry.java b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ClasspathEntry.java
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ClasspathEntry.java
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ClasspathEntry.java
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Container.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Container.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Container.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Container.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Facet.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Facet.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Facet.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Facet.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Jdt.java b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Jdt.java
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Jdt.java
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Jdt.java
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Library.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Library.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Library.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Library.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Link.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Link.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Link.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Link.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Output.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Output.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Output.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Output.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Project.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Project.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Project.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Project.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ProjectDependency.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ProjectDependency.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ProjectDependency.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/ProjectDependency.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/SourceFolder.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/SourceFolder.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/SourceFolder.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/SourceFolder.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Variable.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Variable.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Variable.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Variable.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbDependentModule.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbDependentModule.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbDependentModule.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbDependentModule.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbProperty.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbProperty.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbProperty.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbProperty.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbResource.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbResource.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbResource.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/WbResource.groovy
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Wtp.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Wtp.groovy
new file mode 100644
index 0000000..2a9ea14
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Wtp.groovy
@@ -0,0 +1,184 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse.model
+
+import org.gradle.api.Action
+import org.gradle.plugins.eclipse.EclipseWtp
+
+/**
+ * @author Hans Dockter
+ */
+class Wtp {
+    List wbModuleEntries = []
+
+    List facets = []
+
+    String deployName
+
+    String contextPath
+
+    private Node orgEclipseWstCommonComponentXml
+    private Node orgEclipseWstCommonProjectFacetCoreXml
+
+    private Action<Map<String, Node>> withXmlActions
+
+    Wtp(EclipseWtp eclipseWtp, List wbModuleEntries, Reader inputOrgEclipseWstCommonComponentXml,
+        Reader inputOrgEclipseWstCommonProjectFacetCoreXml) {
+        initFromXml(inputOrgEclipseWstCommonComponentXml, inputOrgEclipseWstCommonProjectFacetCoreXml)
+
+        eclipseWtp.beforeConfiguredActions.execute(this)
+
+        this.wbModuleEntries.addAll(wbModuleEntries)
+        this.wbModuleEntries.unique()
+        this.facets.addAll(eclipseWtp.facets)
+        this.facets.unique()
+        if (eclipseWtp.deployName) {
+            this.deployName = eclipseWtp.deployName
+        }
+        if (eclipseWtp.contextPath) {
+            this.contextPath = eclipseWtp.contextPath
+        }
+        this.withXmlActions = eclipseWtp.withXmlActions
+
+        eclipseWtp.whenConfiguredActions.execute(this)
+    }
+
+    private def initFromXml(Reader inputOrgEclipseWstCommonComponentXml, Reader inputOrgEclipseWstCommonProjectFacetCoreXml) {
+        if (!inputOrgEclipseWstCommonComponentXml) {
+            orgEclipseWstCommonComponentXml =
+                new Node(null, 'project-modules', [id: "moduleCoreId", 'project-version': "2.0"])
+            orgEclipseWstCommonComponentXml.appendNode('wb-module')
+            orgEclipseWstCommonProjectFacetCoreXml = new Node(null, 'faceted-project')
+            orgEclipseWstCommonProjectFacetCoreXml.appendNode('fixed', [facet: 'jst.java'])
+            orgEclipseWstCommonProjectFacetCoreXml.appendNode('fixed', [facet: 'jst.web'])
+            return
+        }
+
+        orgEclipseWstCommonComponentXml = readOrgEclipseWstCommonComponentXml(inputOrgEclipseWstCommonComponentXml)
+        orgEclipseWstCommonProjectFacetCoreXml = readOrgEclipseWstCommonProjectFacetCoreXml(inputOrgEclipseWstCommonProjectFacetCoreXml)
+    }
+
+    private def readOrgEclipseWstCommonComponentXml(Reader inputXml) {
+        def rootNode = new XmlParser().parse(inputXml)
+
+        deployName = rootNode.'wb-module'[0].@'deploy-name'
+        rootNode.'wb-module'[0].children().each { entryNode ->
+            def entry = null
+            switch (entryNode.name()) {
+                case 'property':
+                    if (entryNode. at name == 'context-root') {
+                        contextPath = entryNode. at value
+                    } else {
+                        entry = new WbProperty(entryNode)
+                    }
+                    break
+                case 'wb-resource': entry = new WbResource(entryNode)
+                    break
+                case 'dependent-module': entry = new WbDependentModule(entryNode)
+                    break
+            }
+            if (entry) {
+                wbModuleEntries.add(entry)
+            }
+        }
+        rootNode
+    }
+
+    private def readOrgEclipseWstCommonProjectFacetCoreXml(Reader inputXml) {
+        def rootNode = new XmlParser().parse(inputXml)
+
+        rootNode.installed.each { entryNode ->
+            facets.add(new Facet(entryNode))
+        }
+        rootNode
+    }
+
+    void toXml(File orgEclipseWstCommonComponentXmlFile, File orgEclipseWstCommonProjectFacetCoreXmlFile) {
+        orgEclipseWstCommonComponentXmlFile.withWriter {Writer componentWriter ->
+            orgEclipseWstCommonProjectFacetCoreXmlFile.withWriter {Writer facetWriter ->
+                toXml(componentWriter, facetWriter)
+            }
+        }
+    }
+
+    def toXml(Writer orgEclipseWstCommonComponentXmlWriter, Writer orgEclipseWstCommonProjectFacetCoreXmlWriter) {
+        removeConfigurableDataFromXml()
+        orgEclipseWstCommonComponentXml.'wb-module'[0].@'deploy-name' = deployName
+        new WbProperty('context-root', contextPath).appendNode(orgEclipseWstCommonComponentXml.'wb-module')
+        wbModuleEntries.each { entry ->
+            entry.appendNode(orgEclipseWstCommonComponentXml.'wb-module')
+        }
+        facets.each { facet ->
+            facet.appendNode(orgEclipseWstCommonProjectFacetCoreXml)
+        }
+        withXmlActions.execute([
+                'org.eclipse.wst.commons.component': orgEclipseWstCommonComponentXml,
+                'org.eclipse.wst.commons.project.facet.core': orgEclipseWstCommonProjectFacetCoreXml])
+
+        printNode(orgEclipseWstCommonComponentXml, orgEclipseWstCommonComponentXmlWriter)
+        printNode(orgEclipseWstCommonProjectFacetCoreXml, orgEclipseWstCommonProjectFacetCoreXmlWriter)
+    }
+
+    private void removeConfigurableDataFromXml() {
+        ['property', 'wb-resource', 'dependent-module'].each { elementName ->
+            orgEclipseWstCommonComponentXml.'wb-module'."$elementName".each { elementNode ->
+                orgEclipseWstCommonComponentXml.'wb-module'[0].remove(elementNode)
+            }
+        }
+        orgEclipseWstCommonProjectFacetCoreXml.installed.each { orgEclipseWstCommonProjectFacetCoreXml.remove(it) }
+    }
+
+    private void printNode(Node node, Writer writer) {
+        def printWriter = new PrintWriter(writer)
+        def nodePrinter = new XmlNodePrinter(printWriter, "\t")
+        nodePrinter.preserveWhitespace = true
+        nodePrinter.print(node)
+        printWriter.flush()
+    }
+
+    boolean equals(o) {
+        if (this.is(o)) { return true }
+
+        if (getClass() != o.class) { return false }
+
+        Wtp wtp = (Wtp) o;
+
+        if (deployName != wtp.deployName) { return false }
+        if (contextPath != wtp.contextPath) { return false }
+        if (facets != wtp.facets) { return false }
+        if (wbModuleEntries != wtp.wbModuleEntries) { return false }
+
+        return true
+    }
+
+    int hashCode() {
+        int result;
+
+        result = wbModuleEntries.hashCode();
+        result = 31 * result + facets.hashCode();
+        result = 31 * result + deployName.hashCode();
+        return result;
+    }
+
+    public String toString() {
+        return "Wtp{" +
+                "wbModuleEntries=" + wbModuleEntries +
+                ", facets=" + facets +
+                ", deployName='" + deployName + '\'' +
+                ", contextPath='" + contextPath + '\'' +
+                '}';
+    }
+}
diff --git a/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/ClasspathFactory.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/ClasspathFactory.groovy
new file mode 100644
index 0000000..55b8a27
--- /dev/null
+++ b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/ClasspathFactory.groovy
@@ -0,0 +1,207 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse.model.internal
+
+import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency
+import org.gradle.api.specs.Specs
+import org.gradle.api.tasks.SourceSet
+import org.gradle.api.artifacts.*
+import org.gradle.plugins.eclipse.model.*
+import org.gradle.plugins.eclipse.EclipseClasspath
+
+/**
+ * @author Hans Dockter
+ */
+class ClasspathFactory {
+    def configure(EclipseClasspath eclipseClasspath, Classpath classpath) {
+        List entries = []
+        entries.add(new Output(eclipseClasspath.project.relativePath(eclipseClasspath.defaultOutputDir)))
+        entries.addAll(getEntriesFromSourceSets(eclipseClasspath.sourceSets, eclipseClasspath.project))
+        entries.addAll(getEntriesFromContainers(eclipseClasspath.getContainers()))
+        entries.addAll(getEntriesFromConfigurations(eclipseClasspath))
+        classpath.configure(entries)
+    }
+
+    List getEntriesFromSourceSets(def sourceSets, def project) {
+        List entries = []
+        def sortedSourceSets = sortSourceSetsAsPerUsualConvention(sourceSets.all)
+
+        sortedSourceSets.each { SourceSet sourceSet ->
+            def sourceDirSets = sourceSet.allSource.sourceTrees
+            def sourceDirs = sourceDirSets.collect { it.srcDirs }.flatten()
+            def sortedSourceDirs = sortSourceDirsAsPerUsualConvention(sourceDirs)
+
+            sortedSourceDirs.each { dir ->
+                if (dir.isDirectory()) {
+                    def sourceDirSet = sourceDirSets.find { it.srcDirs.contains(dir) }
+                    entries.add(new SourceFolder(
+                            project.relativePath(dir),
+                            null,
+                            [] as Set,
+                            null,
+                            sourceDirSet.includes as List,
+                            sourceDirSet.excludes as List))
+                }
+            }
+        }
+        entries
+    }
+
+    List getEntriesFromContainers(Set containers) {
+        containers.collect { container ->
+            new Container(container, true, null, [] as Set)
+        }
+    }
+
+    List getEntriesFromConfigurations(EclipseClasspath eclipseClasspath) {
+        getModules(eclipseClasspath) + getLibraries(eclipseClasspath)
+    }
+
+    protected List getModules(EclipseClasspath eclipseClasspath) {
+        return getDependencies(eclipseClasspath.plusConfigurations, eclipseClasspath.minusConfigurations, { it instanceof org.gradle.api.artifacts.ProjectDependency }).collect { projectDependency ->
+            projectDependency.dependencyProject
+        }.collect { dependencyProject ->
+            new org.gradle.plugins.eclipse.model.ProjectDependency('/' + dependencyProject.name, true, null, [] as Set)
+        }
+    }
+
+    protected Set getLibraries(EclipseClasspath eclipseClasspath) {
+        Set declaredDependencies = getDependencies(eclipseClasspath.plusConfigurations, eclipseClasspath.minusConfigurations,
+                { it instanceof ExternalDependency})
+
+        ResolvedConfiguration resolvedConfiguration = eclipseClasspath.project.configurations.
+                detachedConfiguration((declaredDependencies as Dependency[])).resolvedConfiguration
+        def allResolvedDependencies = getAllDeps(resolvedConfiguration.firstLevelModuleDependencies)
+
+        Set sourceDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
+            addSourceArtifact(dependency)
+        }
+        Map sourceFiles = eclipseClasspath.downloadSources ? getFiles(eclipseClasspath.project, sourceDependencies, "sources") : [:]
+
+        Set javadocDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
+            addJavadocArtifact(dependency)
+        }
+        Map javadocFiles = eclipseClasspath.downloadJavadoc ? getFiles(eclipseClasspath.project, javadocDependencies, "javadoc") : [:]
+
+        List moduleLibraries = resolvedConfiguration.getFiles(Specs.SATISFIES_ALL).collect { File binaryFile ->
+            File sourceFile = sourceFiles[binaryFile.name]
+            File javadocFile = javadocFiles[binaryFile.name]
+            createLibraryEntry(binaryFile, sourceFile, javadocFile, eclipseClasspath.variables)
+        }
+        moduleLibraries.addAll(getSelfResolvingFiles(getDependencies(eclipseClasspath.plusConfigurations, eclipseClasspath.minusConfigurations,
+                { it instanceof SelfResolvingDependency && !(it instanceof org.gradle.api.artifacts.ProjectDependency)}), eclipseClasspath.variables))
+        moduleLibraries
+    }
+
+    private def getSelfResolvingFiles(Collection dependencies, Map<String, File> variables) {
+        dependencies.inject([] as LinkedHashSet) { result, SelfResolvingDependency selfResolvingDependency ->
+            result.addAll(selfResolvingDependency.resolve().collect { File file ->
+                createLibraryEntry(file, null, null, variables)
+            })
+            result
+        }
+    }
+
+    AbstractLibrary createLibraryEntry(File binary, File source, File javadoc, Map<String, File> variables) {
+        def usedVariableEntry = variables.find { String name, File value -> binary.canonicalPath.startsWith(value.canonicalPath) }
+        if (usedVariableEntry) {
+            String name = usedVariableEntry.key
+            String value = usedVariableEntry.value.canonicalPath
+            String binaryPath = name + binary.canonicalPath.substring(value.length())
+            String sourcePath = source ? name + source.canonicalPath.substring(value.length()) : null
+            String javadocPath = javadoc ? name + javadoc.canonicalPath.substring(value.length()) : null
+            return new Variable(binaryPath, true, null, [] as Set, sourcePath, javadocPath)
+        }
+        new Library(binary.canonicalPath, true, null, [] as Set, source ? source.canonicalPath : null, javadoc ? javadoc.canonicalPath : null)
+    }
+
+    private Set getDependencies(Set plusConfigurations, Set minusConfigurations, Closure filter) {
+        Set declaredDependencies = new LinkedHashSet()
+        plusConfigurations.each { configuration ->
+            declaredDependencies.addAll(configuration.getAllDependencies().findAll(filter))
+        }
+        minusConfigurations.each { configuration ->
+            configuration.getAllDependencies().findAll(filter).each { minusDep ->
+                declaredDependencies.remove(minusDep)
+            }
+        }
+        return declaredDependencies
+    }
+
+    private def getFiles(def project, Set dependencies, String classifier) {
+        return project.configurations.detachedConfiguration((dependencies as Dependency[])).files.inject([:]) { result, sourceFile ->
+            String key = sourceFile.name.replace("-${classifier}.jar", '.jar')
+            result[key] = sourceFile
+            result
+        }
+    }
+
+    private List getResolvableDependenciesForAllResolvedDependencies(Set allResolvedDependencies, Closure configureClosure) {
+        return allResolvedDependencies.collect { ResolvedDependency resolvedDependency ->
+            def dependency = new DefaultExternalModuleDependency(resolvedDependency.moduleGroup, resolvedDependency.moduleName, resolvedDependency.moduleVersion,
+                    resolvedDependency.configuration)
+            dependency.transitive = false
+            configureClosure.call(dependency)
+            dependency
+        }
+    }
+
+    private List<SourceSet> sortSourceSetsAsPerUsualConvention(Collection<SourceSet> sourceSets) {
+        return sourceSets.sort { sourceSet ->
+            switch(sourceSet.name) {
+                case SourceSet.MAIN_SOURCE_SET_NAME: return 0
+                case SourceSet.TEST_SOURCE_SET_NAME: return 1
+                default: return 2
+            }
+        }
+    }
+
+    private List<File> sortSourceDirsAsPerUsualConvention(Collection<File> sourceDirs) {
+        return sourceDirs.sort { sourceDir ->
+            if (sourceDir.path.endsWith("java")) { 0 }
+            else if (sourceDir.path.endsWith("resources")) { 2 }
+            else { 1 }
+        }
+    }
+
+    protected Set getAllDeps(Set deps, Set allDeps = []) {
+        deps.each { ResolvedDependency resolvedDependency ->
+            def notSeenBefore = allDeps.add(resolvedDependency)
+            if (notSeenBefore) { // defend against circular dependencies
+                getAllDeps(resolvedDependency.children, allDeps)
+            }
+        }
+        allDeps
+    }
+
+    protected void addSourceArtifact(DefaultExternalModuleDependency dependency) {
+        dependency.artifact { artifact ->
+            artifact.name = dependency.name
+            artifact.type = 'source'
+            artifact.extension = 'jar'
+            artifact.classifier = 'sources'
+        }
+    }
+
+    protected void addJavadocArtifact(DefaultExternalModuleDependency dependency) {
+        dependency.artifact { artifact ->
+            artifact.name = dependency.name
+            artifact.type = 'javadoc'
+            artifact.extension = 'jar'
+            artifact.classifier = 'javadoc'
+        }
+    }
+}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/PathUtil.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/PathUtil.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/PathUtil.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/PathUtil.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/WtpFactory.groovy b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/WtpFactory.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/WtpFactory.groovy
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/WtpFactory.groovy
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/package-info.java b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/package-info.java
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/package-info.java
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/package-info.java
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/package-info.java b/subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/package-info.java
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/package-info.java
rename to subprojects/eclipse/src/main/groovy/org/gradle/plugins/eclipse/package-info.java
diff --git a/subprojects/gradle-eclipse/src/main/resources/META-INF/gradle-plugins/eclipse.properties b/subprojects/eclipse/src/main/resources/META-INF/gradle-plugins/eclipse.properties
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/resources/META-INF/gradle-plugins/eclipse.properties
rename to subprojects/eclipse/src/main/resources/META-INF/gradle-plugins/eclipse.properties
diff --git a/subprojects/gradle-eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultClasspath.xml b/subprojects/eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultClasspath.xml
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultClasspath.xml
rename to subprojects/eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultClasspath.xml
diff --git a/subprojects/gradle-eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultJdtPrefs.properties b/subprojects/eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultJdtPrefs.properties
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultJdtPrefs.properties
rename to subprojects/eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultJdtPrefs.properties
diff --git a/subprojects/gradle-eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultProject.xml b/subprojects/eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultProject.xml
similarity index 100%
rename from subprojects/gradle-eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultProject.xml
rename to subprojects/eclipse/src/main/resources/org/gradle/plugins/eclipse/model/defaultProject.xml
diff --git a/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseClasspathTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseClasspathTest.groovy
new file mode 100644
index 0000000..592fd16
--- /dev/null
+++ b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseClasspathTest.groovy
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse;
+
+
+import org.gradle.api.internal.ConventionTask
+import org.gradle.api.tasks.AbstractSpockTaskTest
+
+/**
+ * @author Hans Dockter
+ */
+public class EclipseClasspathTest extends AbstractSpockTaskTest {
+
+    private EclipseClasspath eclipseClasspath;
+
+    ConventionTask getTask() {
+        return eclipseClasspath
+    }
+
+    def setup() {
+        eclipseClasspath = createTask(EclipseClasspath.class);
+    }
+
+    def containers_shouldAdd() {
+        when:
+        eclipseClasspath.containers "container1"
+        eclipseClasspath.containers "container2"
+
+        then:
+        eclipseClasspath.containers == ['container1', 'container2'] as Set
+    }
+
+    def variables_shouldAdd() {
+        when:
+        eclipseClasspath.variables variable1: 'value1'
+        eclipseClasspath.variables variable2: 'value2'
+
+        then:
+        eclipseClasspath.variables == [variable1: 'value1', variable2: 'value2']
+    }
+}
diff --git a/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipsePluginTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipsePluginTest.groovy
new file mode 100644
index 0000000..9d0cedd
--- /dev/null
+++ b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipsePluginTest.groovy
@@ -0,0 +1,180 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.plugins.eclipse
+
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.api.internal.project.DefaultProject
+import org.gradle.api.tasks.Delete
+import org.gradle.plugins.eclipse.model.BuildCommand
+import org.gradle.plugins.eclipse.model.Facet
+import org.gradle.util.HelperUtil
+import spock.lang.Specification
+import org.gradle.plugins.eclipse.model.WbResource
+
+/**
+ * @author Hans Dockter
+ */
+class EclipsePluginTest extends Specification {
+    private final DefaultProject project = HelperUtil.createRootProject()
+    private final EclipsePlugin eclipsePlugin = new EclipsePlugin()
+
+    def applyToBaseProject_shouldOnlyHaveEclipseProjectTask() {
+        when:
+        eclipsePlugin.apply(project)
+
+        then:
+        project.tasks.findByPath(':eclipseClasspath') == null
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
+        checkEclipseProjectTask([], [])
+    }
+
+    def applyToJavaProject_shouldOnlyHaveProjectAndClasspathTaskForJava() {
+        when:
+        project.apply(plugin: 'java-base')
+        eclipsePlugin.apply(project)
+
+        then:
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
+        checkEclipseProjectTask([new BuildCommand('org.eclipse.jdt.core.javabuilder')], ['org.eclipse.jdt.core.javanature'])
+        checkEclipseClasspath([] as Set)
+        checkEclipseJdt()
+
+        when:
+        project.apply(plugin: 'java')
+
+        then:
+        checkEclipseClasspath([project.configurations.testRuntime] as Set)
+    }
+
+    def applyToWarProject_shouldHaveProjectForWebAndClasspathTask() {
+        when:
+        project.apply(plugin: 'war')
+        eclipsePlugin.apply(project)
+
+        then:
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseWtp)
+        checkEclipseProjectTask([
+                new BuildCommand('org.eclipse.jdt.core.javabuilder'),
+                new BuildCommand('org.eclipse.wst.common.project.facet.core.builder'),
+                new BuildCommand('org.eclipse.wst.validation.validationbuilder')],
+                ['org.eclipse.jdt.core.javanature',
+                        'org.eclipse.wst.common.project.facet.core.nature',
+                        'org.eclipse.wst.common.modulecore.ModuleCoreNature'])
+        checkEclipseClasspath([project.configurations.testRuntime] as Set)
+        checkEclipseWtp()
+    }
+
+    def applyToScalaProject_shouldHaveProjectAndClasspathTaskForScala() {
+        when:
+        project.apply(plugin: 'scala-base')
+        eclipsePlugin.apply(project)
+
+        then:
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
+        checkEclipseProjectTask([new BuildCommand('ch.epfl.lamp.sdt.core.scalabuilder')],
+                ['ch.epfl.lamp.sdt.core.scalanature', 'org.eclipse.jdt.core.javanature'])
+        checkEclipseClasspath([] as Set)
+
+        when:
+        project.apply(plugin: 'scala')
+
+        then:
+        checkEclipseClasspath([project.configurations.testRuntime] as Set)
+    }
+
+    def applyToGroovyProject_shouldHaveProjectAndClasspathTaskForGroovy() {
+        when:
+        project.apply(plugin: 'groovy-base')
+        eclipsePlugin.apply(project)
+
+        then:
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
+        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
+        checkEclipseProjectTask([new BuildCommand('org.eclipse.jdt.core.javabuilder')], ['org.eclipse.jdt.groovy.core.groovyNature',
+                'org.eclipse.jdt.core.javanature'])
+        checkEclipseClasspath([] as Set)
+
+        when:
+        project.apply(plugin: 'groovy')
+
+        then:
+        checkEclipseClasspath([project.configurations.testRuntime] as Set)
+    }
+
+    private void checkEclipseProjectTask(List buildCommands, List natures) {
+        EclipseProject eclipseProjectTask = project.eclipseProject
+        assert eclipseProjectTask instanceof EclipseProject
+        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseProjectTask)
+        assert eclipseProjectTask.buildCommands == buildCommands
+        assert eclipseProjectTask.natures == natures
+        assert eclipseProjectTask.links == [] as Set
+        assert eclipseProjectTask.referencedProjects == [] as Set
+        assert eclipseProjectTask.comment == null
+        assert eclipseProjectTask.projectName == project.name
+        assert eclipseProjectTask.outputFile == project.file('.project')
+    }
+
+    private void checkEclipseClasspath(def configurations) {
+        EclipseClasspath eclipseClasspath = project.eclipseClasspath
+        assert eclipseClasspath instanceof EclipseClasspath
+        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseClasspath)
+        assert eclipseClasspath.sourceSets == project.sourceSets
+        assert eclipseClasspath.plusConfigurations == configurations
+        assert eclipseClasspath.minusConfigurations == [] as Set
+        assert eclipseClasspath.containers == ['org.eclipse.jdt.launching.JRE_CONTAINER'] as Set
+        assert eclipseClasspath.outputFile == project.file('.classpath')
+        assert eclipseClasspath.defaultOutputDir == new File(project.projectDir, 'bin')
+    }
+
+    private void checkEclipseJdt() {
+        EclipseJdt eclipseJdt = project.eclipseJdt
+        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseJdt)
+        assert eclipseJdt.sourceCompatibility == project.sourceCompatibility
+        assert eclipseJdt.targetCompatibility == project.targetCompatibility
+        assert eclipseJdt.outputFile == project.file('.settings/org.eclipse.jdt.core.prefs')
+    }
+
+    private void checkEclipseWtp() {
+        EclipseWtp eclipseWtp = project.eclipseWtp
+        assert eclipseWtp instanceof EclipseWtp
+        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseWtp)
+        assert eclipseWtp.sourceSets.all == [project.sourceSets.main] as Set
+        assert eclipseWtp.plusConfigurations == [project.configurations.runtime] as Set
+        assert eclipseWtp.minusConfigurations == [project.configurations.providedRuntime] as Set
+        assert eclipseWtp.deployName == project.name
+        assert eclipseWtp.contextPath == project.war.baseName
+        assert eclipseWtp.orgEclipseWstCommonComponentInputFile == project.file('.settings/org.eclipse.wst.common.component')
+        assert eclipseWtp.orgEclipseWstCommonComponentOutputFile == project.file('.settings/org.eclipse.wst.common.component')
+        assert eclipseWtp.orgEclipseWstCommonProjectFacetCoreInputFile == project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
+        assert eclipseWtp.orgEclipseWstCommonProjectFacetCoreOutputFile == project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
+        assert eclipseWtp.facets == [new Facet("jst.web", "2.4"), new Facet("jst.java", "5.0")]
+        assert eclipseWtp.variables == [:]
+        assert eclipseWtp.resources == [new WbResource('/', project.convention.plugins.war.webAppDirName)]
+    }
+
+    void assertThatCleanEclipseDependsOn(Project project, Task dependsOnTask) {
+        assert dependsOnTask instanceof Delete
+        assert project.cleanEclipse.taskDependencies.getDependencies(project.cleanEclipse).contains(dependsOnTask)
+    }
+}
+
diff --git a/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseProjectTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseProjectTest.groovy
new file mode 100644
index 0000000..3f493cb
--- /dev/null
+++ b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseProjectTest.groovy
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse
+
+import org.gradle.api.internal.ConventionTask
+import org.gradle.api.tasks.AbstractSpockTaskTest
+import org.gradle.plugins.eclipse.model.BuildCommand
+
+/**
+ * @author Hans Dockter
+ */
+class EclipseProjectTest extends AbstractSpockTaskTest {
+    EclipseProject eclipseProject
+
+    ConventionTask getTask() {
+        return eclipseProject
+    }
+
+    def setup() {
+        eclipseProject = createTask(EclipseProject.class);
+    }
+
+    def natures_shouldAdd() {
+        when:
+        eclipseProject.natures 'nature1'
+        eclipseProject.natures 'nature2'
+
+        then:
+        eclipseProject.natures == ['nature1', 'nature2']
+    }
+
+    def buildCommands_shouldAdd() {
+        when:
+        eclipseProject.buildCommand 'command1', key1: 'value1'
+        eclipseProject.buildCommand 'command2'
+
+        then:
+        eclipseProject.buildCommands as List == [new BuildCommand('command1', [key1: 'value1']), new BuildCommand('command2')]
+    }
+}
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseWtpTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseWtpTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseWtpTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseWtpTest.groovy
diff --git a/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ClasspathTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ClasspathTest.groovy
new file mode 100644
index 0000000..edc7cd0
--- /dev/null
+++ b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ClasspathTest.groovy
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.eclipse.model;
+
+import org.gradle.api.internal.XmlTransformer
+import org.gradle.util.TemporaryFolder
+import org.junit.Rule
+import spock.lang.Specification
+
+/**
+ * @author Hans Dockter
+ */
+public class ClasspathTest extends Specification {
+    private static final CUSTOM_ENTRIES = [
+            new ProjectDependency("/test2", false, null, [] as Set),
+            new Container("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6",
+                false, null, [] as Set),
+            new Library("/apache-ant-1.7.1/lib/ant-antlr.jar", false, null, [] as Set, null, null),
+            new SourceFolder("src", null, [] as Set, "bin2", [], []),
+            new Variable("GRADLE_CACHE/ant-1.6.5.jar", false, null, [] as Set, null, null),
+            new Container("org.eclipse.jdt.USER_LIBRARY/gradle", false, null, [] as Set),
+            new Output("bin")]
+    private static final PROJECT_DEPENDENCY = [CUSTOM_ENTRIES[0]]
+    private static final ALL_DEPENDENCIES = [CUSTOM_ENTRIES[0], CUSTOM_ENTRIES[2]]
+
+    final Classpath classpath = new Classpath(new XmlTransformer())
+
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+
+    def loadFromReader() {
+        when:
+        classpath.load(customClasspathReader)
+
+        then:
+        classpath.entries == CUSTOM_ENTRIES
+    }
+
+    def configureOverwritesDependenciesAndAppendsAllOtherEntries() {
+        def constructorEntries = [createSomeLibrary()]
+
+        when:
+        classpath.load(customClasspathReader)
+        def newEntries = constructorEntries + PROJECT_DEPENDENCY
+        classpath.configure(newEntries)
+
+        then:
+        def entriesToBeKept = CUSTOM_ENTRIES - ALL_DEPENDENCIES
+        classpath.entries ==  entriesToBeKept + newEntries
+    }
+
+    def loadDefaults() {
+        when:
+        classpath.loadDefaults()
+
+        then:
+        classpath.entries == []
+    }
+
+    def toXml_shouldContainCustomValues() {
+        def constructorEntries = [createSomeLibrary()]
+
+        when:
+        classpath.load(customClasspathReader)
+        classpath.configure(constructorEntries)
+        def xml = getToXmlReader()
+        def other = new Classpath(new XmlTransformer())
+        other.load(xml)
+
+        then:
+        classpath == other
+    }
+
+    private InputStream getCustomClasspathReader() {
+        return getClass().getResourceAsStream('customClasspath.xml')
+    }
+
+    private Library createSomeLibrary() {
+        return new Library("/somepath", true, null, [] as Set, null, null)
+    }
+
+    private InputStream getToXmlReader() {
+        ByteArrayOutputStream toXmlText = new ByteArrayOutputStream()
+        classpath.store(toXmlText)
+        return new ByteArrayInputStream(toXmlText.toByteArray())
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ContainerTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ContainerTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ContainerTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ContainerTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/FacetTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/FacetTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/FacetTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/FacetTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/JdtTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/JdtTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/JdtTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/JdtTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/LibraryTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/LibraryTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/LibraryTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/LibraryTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/OutputTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/OutputTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/OutputTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/OutputTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectDependencyTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectDependencyTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectDependencyTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectDependencyTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ProjectTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/SourceFolderTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/SourceFolderTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/SourceFolderTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/SourceFolderTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/VariableTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/VariableTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/VariableTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/VariableTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbDependentModuleTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbDependentModuleTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbDependentModuleTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbDependentModuleTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbPropertyTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbPropertyTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbPropertyTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbPropertyTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbResourceTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbResourceTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbResourceTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WbResourceTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WtpTest.groovy b/subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WtpTest.groovy
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WtpTest.groovy
rename to subprojects/eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/WtpTest.groovy
diff --git a/subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customClasspath.xml b/subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customClasspath.xml
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customClasspath.xml
rename to subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customClasspath.xml
diff --git a/subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonComponent.xml b/subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonComponent.xml
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonComponent.xml
rename to subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonComponent.xml
diff --git a/subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonProjectFacetCoreXml.xml b/subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonProjectFacetCoreXml.xml
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonProjectFacetCoreXml.xml
rename to subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customOrgEclipseWstCommonProjectFacetCoreXml.xml
diff --git a/subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customProject.xml b/subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customProject.xml
similarity index 100%
rename from subprojects/gradle-eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customProject.xml
rename to subprojects/eclipse/src/test/resources/org/gradle/plugins/eclipse/model/customProject.xml
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrPlugin.java b/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrPlugin.java
deleted file mode 100644
index a9d3bd9..0000000
--- a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/AntlrPlugin.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins.antlr;
-
-import java.io.File;
-
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.Project;
-import org.gradle.api.artifacts.Configuration;
-import org.gradle.api.internal.DynamicObjectAware;
-import org.gradle.api.internal.IConventionAware;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.internal.tasks.DefaultSourceSet;
-import org.gradle.api.plugins.Convention;
-import org.gradle.api.plugins.JavaPlugin;
-
-import static org.gradle.api.plugins.JavaPlugin.COMPILE_CONFIGURATION_NAME;
-
-import org.gradle.api.plugins.JavaPluginConvention;
-import org.gradle.api.plugins.antlr.internal.AntlrSourceVirtualDirectoryImpl;
-import org.gradle.api.tasks.ConventionValue;
-import org.gradle.api.tasks.SourceSet;
-
-/**
- * A plugin for adding Antlr support to {@link JavaPlugin java projects}.
- *
- * @author Steve Ebersole
- */
-public class AntlrPlugin implements Plugin<Project> {
-    public static final String ANTLR_CONFIGURATION_NAME = "antlr";
-
-    public void apply(final Project project) {
-        project.getPlugins().apply(JavaPlugin.class);
-
-        // set up a configuration named 'antlr' for the user to specify the antlr libs to use in case
-        // they want a specific version etc.
-        Configuration antlrConfiguration = project.getConfigurations().add(ANTLR_CONFIGURATION_NAME).setVisible(false)
-                .setTransitive(false).setDescription("The Antlr libraries to be used for this project.");
-        project.getConfigurations().getByName(COMPILE_CONFIGURATION_NAME).extendsFrom(antlrConfiguration);
-
-        final ProjectInternal projectInternal = (ProjectInternal) project;
-        project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().allObjects(
-                new Action<SourceSet>() {
-                    public void execute(SourceSet sourceSet) {
-                        // for each source set we will:
-                        // 1) Add a new 'antlr' virtual directory mapping
-                        final AntlrSourceVirtualDirectoryImpl antlrDirectoryDelegate
-                                = new AntlrSourceVirtualDirectoryImpl(((DefaultSourceSet) sourceSet).getDisplayName(),
-                                projectInternal.getFileResolver());
-                        ((DynamicObjectAware) sourceSet).getConvention().getPlugins().put(
-                                AntlrSourceVirtualDirectory.NAME, antlrDirectoryDelegate);
-                        final String srcDir = String.format("src/%s/antlr", sourceSet.getName());
-                        antlrDirectoryDelegate.getAntlr().srcDir(srcDir);
-                        sourceSet.getAllSource().add(antlrDirectoryDelegate.getAntlr());
-
-                        // 2) create an AntlrTask for this sourceSet following the gradle
-                        //    naming conventions via call to sourceSet.getTaskName()
-                        final String taskName = sourceSet.getTaskName("generate", "GrammarSource");
-                        AntlrTask antlrTask = project.getTasks().add(taskName, AntlrTask.class);
-                        antlrTask.setDescription(String.format("Processes the %s Antlr grammars.",
-                                sourceSet.getName()));
-
-                        // 3) set up convention mapping for default sources (allows user to not have to specify)
-                        antlrTask.conventionMapping("defaultSource", new ConventionValue() {
-                            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                                return antlrDirectoryDelegate.getAntlr();
-                            }
-                        });
-
-                        // 4) set up convention mapping for handling the 'antlr' dependency configuration
-                        antlrTask.getConventionMapping().map("antlrClasspath", new ConventionValue() {
-                            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                                return project.getConfigurations().getByName(ANTLR_CONFIGURATION_NAME).copy()
-                                        .setTransitive(true);
-                            }
-                        });
-
-                        // 5) Set up the Antlr output directory (adding to javac inputs!)
-                        final String outputDirectoryName = String.format("%s/generated-src/antlr/%s",
-                                project.getBuildDir(), sourceSet.getName());
-                        final File outputDirectory = new File(outputDirectoryName);
-                        antlrTask.setOutputDirectory(outputDirectory);
-                        sourceSet.getJava().srcDir(outputDirectory);
-
-                        // 6) register fact that antlr should be run before compiling
-                        project.getTasks().getByName(sourceSet.getCompileJavaTaskName()).dependsOn(taskName);
-                    }
-                });
-    }
-}
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarDelegate.java b/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarDelegate.java
deleted file mode 100644
index c4f90c6..0000000
--- a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/GrammarDelegate.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.antlr.internal;
-
-import java.lang.reflect.Method;
-import java.util.Enumeration;
-import java.util.ArrayList;
-import java.util.List;
-
-import antlr.collections.impl.IndexedVector;
-import antlr.preprocessor.GrammarFile;
-
-/**
- * Antlr defines its {@link antlr.preprocessor.Grammar} class as package-protected for some unfortunate reason. So this
- * class acts as a delegate to the Antlr {@link antlr.preprocessor.Grammar} class, hiding all the ugly necessary
- * reflection code.
- *
- * @author Steve Ebersole
- */
-public class GrammarDelegate {
-    public static List<GrammarDelegate> extractGrammarDelegates(GrammarFile antlrGrammarFile) {
-        List<GrammarDelegate> grammarDelegates = new ArrayList<GrammarDelegate>();
-        Enumeration grammarFileGramars = antlrGrammarFile.getGrammars().elements();
-        while (grammarFileGramars.hasMoreElements()) {
-            grammarDelegates.add(new GrammarDelegate(grammarFileGramars.nextElement()));
-        }
-        return grammarDelegates;
-    }
-
-    private final String className;
-    private final String importVocab;
-    private final String exportVocab;
-    private final GrammarDelegate superGrammarDelegate;
-
-    public GrammarDelegate(Object antlrGrammarMetadata) {
-        try {
-            final Method getNameMethod = ANTLR_GRAMMAR_CLASS.getDeclaredMethod("getName", NO_ARG_SIGNATURE);
-            getNameMethod.setAccessible(true);
-            this.className = (String) getNameMethod.invoke(antlrGrammarMetadata, NO_ARGS);
-
-            final Method getSuperGrammarMethod = ANTLR_GRAMMAR_CLASS.getMethod("getSuperGrammar", NO_ARG_SIGNATURE);
-            getSuperGrammarMethod.setAccessible(true);
-            final Object antlrSuperGrammarGrammarMetadata = getSuperGrammarMethod.invoke(antlrGrammarMetadata, NO_ARGS);
-            this.superGrammarDelegate = antlrSuperGrammarGrammarMetadata == null ? null : new GrammarDelegate(
-                    antlrSuperGrammarGrammarMetadata);
-
-            Method getOptionsMethod = ANTLR_GRAMMAR_CLASS.getMethod("getOptions", NO_ARG_SIGNATURE);
-            getOptionsMethod.setAccessible(true);
-            IndexedVector options = (IndexedVector) getOptionsMethod.invoke(antlrGrammarMetadata, NO_ARGS);
-
-            Method getRHSMethod = ANTLR_OPTION_CLASS.getMethod("getRHS", NO_ARG_SIGNATURE);
-            getRHSMethod.setAccessible(true);
-
-            final Object importVocabOption = options == null ? null : options.getElement("importVocab");
-            this.importVocab = importVocabOption == null ? null : vocabName((String) getRHSMethod.invoke(
-                    importVocabOption, NO_ARGS));
-
-            final Object exportVocabOption = options == null ? null : options.getElement("exportVocab");
-            this.exportVocab = exportVocabOption == null ? null : vocabName((String) getRHSMethod.invoke(
-                    exportVocabOption, NO_ARGS));
-        } catch (Throwable t) {
-            throw new IllegalStateException("Error accessing  Antlr grammar metadata", t);
-        }
-    }
-
-    /**
-     * Retrieves the unqualified name of the lexer/parser class.
-     *
-     * @return The unqualified lexer/parser class name.
-     */
-    public String getClassName() {
-        return className;
-    }
-
-    /**
-     * Retrieves the name of this vocabulary imported by this grammar.
-     *
-     * @return The gammar's imported vocabulary name.
-     */
-    public String getImportVocab() {
-        return importVocab;
-    }
-
-    /**
-     * Retrieves the name of this vocabulary exported by this grammar.
-     *
-     * @return The gammar's exported vocabulary name.
-     */
-    public String getExportVocab() {
-        return exportVocab;
-    }
-
-    /**
-     * Retrieves the grammar delegate associated with this grammars super grammar deduced during preprocessing from its
-     * extends clause.
-     *
-     * @return The super-grammar grammar delegate
-     */
-    public GrammarDelegate getSuperGrammarDelegate() {
-        return superGrammarDelegate;
-    }
-
-    private GrammarMetadata associatedGrammarMetadata;
-
-    public void associateWith(GrammarMetadata associatedGrammarMetadata) {
-        this.associatedGrammarMetadata = associatedGrammarMetadata;
-    }
-
-    public GrammarMetadata getAssociatedGrammarMetadata() {
-        return associatedGrammarMetadata;
-    }
-
-    private String vocabName(String vocabName) {
-        if (vocabName == null) {
-            return null;
-        }
-        vocabName = vocabName.trim();
-        if (vocabName.endsWith(";")) {
-            vocabName = vocabName.substring(0, vocabName.length() - 1);
-        }
-        return vocabName;
-    }
-
-    private static final Class ANTLR_GRAMMAR_CLASS;
-    private static final Class ANTLR_OPTION_CLASS;
-
-    static {
-        ANTLR_GRAMMAR_CLASS = loadAntlrClass("antlr.preprocessor.Grammar");
-        ANTLR_OPTION_CLASS = loadAntlrClass("antlr.preprocessor.Option");
-    }
-
-    public static final Class[] NO_ARG_SIGNATURE = new Class[0];
-    public static final Object[] NO_ARGS = new Object[0];
-
-    private static Class loadAntlrClass(String className) {
-        try {
-            return Class.forName(className, true, GrammarDelegate.class.getClassLoader());
-        } catch (ClassNotFoundException e) {
-            throw new IllegalStateException("Unable to locate Antlr class [" + className + "]", e );
-        }
-    }
-}
diff --git a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/XRef.java b/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/XRef.java
deleted file mode 100644
index b502211..0000000
--- a/subprojects/gradle-antlr/src/main/groovy/org/gradle/api/plugins/antlr/internal/XRef.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.antlr.internal;
-
-import java.util.LinkedHashMap;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import antlr.preprocessor.Hierarchy;
-
-/**
- * Models cross-reference (x-ref) info about {@link GrammarFileMetadata grammar files} such as {@link #filesByPath},
- * {@link #filesByExportVocab} and {@link #filesByClassName}.
- *
- * @author Steve Ebersole
- */
-public class XRef {
-    private final Hierarchy antlrHierarchy;
-
-    private LinkedHashMap<String, GrammarFileMetadata> filesByPath = new LinkedHashMap<String, GrammarFileMetadata>();
-    private HashMap<String, GrammarFileMetadata> filesByExportVocab = new HashMap<String, GrammarFileMetadata>();
-    private HashMap<String, GrammarFileMetadata> filesByClassName = new HashMap<String, GrammarFileMetadata>();
-
-    public XRef(Hierarchy antlrHierarchy) {
-        this.antlrHierarchy = antlrHierarchy;
-    }
-
-    public Object getAntlrHierarchy() {
-        return antlrHierarchy;
-    }
-
-    /**
-     * Adds a grammar file to this cross-reference.
-     *
-     * @param grammarFileMetadata The grammar file to add (and to be cross referenced).
-     */
-    void addGrammarFile(GrammarFileMetadata grammarFileMetadata) {
-        filesByPath.put(grammarFileMetadata.getFilePath().getPath(), grammarFileMetadata);
-        for (GrammarMetadata grammarMetadata : grammarFileMetadata.getGrammars()) {
-            filesByClassName.put(grammarMetadata.getClassName(), grammarFileMetadata);
-            if (grammarMetadata.getExportVocab() != null) {
-                GrammarFileMetadata old = filesByExportVocab.put(grammarMetadata.getExportVocab(), grammarFileMetadata);
-                if (old != null && old != grammarFileMetadata) {
-                    System.out.println("[WARNING] : multiple grammars defined the same exportVocab : " + grammarMetadata
-                            .getExportVocab());
-                }
-            }
-        }
-    }
-
-    public Iterator<GrammarFileMetadata> iterateGrammarFiles() {
-        return filesByPath.values().iterator();
-    }
-
-    /**
-     * Locate the grammar file metadata by grammar file path.
-     *
-     * @param path The grammar file path.
-     * @return The grammar file metadata.  May be null if none found.
-     */
-    public GrammarFileMetadata getGrammarFileByPath(String path) {
-        return filesByPath.get(path);
-    }
-
-    /**
-     * Locate the grammar file metadata by the name of a class generated from one of its included grammars.
-     *
-     * @param className The generated class name.
-     * @return The grammar file metadata.  May be null if none found.
-     */
-    public GrammarFileMetadata getGrammarFileByClassName(String className) {
-        return filesByClassName.get(className);
-    }
-
-    /**
-     * Locate the grammar file metadata by the name of a vocabulary exported from one of its included grammars.
-     *
-     * @param vocabName The vocabulary name
-     * @return The grammar file metadata.  May be null if none found.
-     */
-    public GrammarFileMetadata getGrammarFileByExportVocab(String vocabName) {
-        return filesByExportVocab.get(vocabName );
-    }
-}
diff --git a/subprojects/gradle-antlr/src/test/groovy/org/gradle/api/plugins/antlr/AntlrPluginTest.groovy b/subprojects/gradle-antlr/src/test/groovy/org/gradle/api/plugins/antlr/AntlrPluginTest.groovy
deleted file mode 100644
index 632cd09..0000000
--- a/subprojects/gradle-antlr/src/test/groovy/org/gradle/api/plugins/antlr/AntlrPluginTest.groovy
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins.antlr
-
-import spock.lang.Specification
-import org.gradle.api.Project
-import org.gradle.util.HelperUtil
-
-class AntlrPluginTest extends Specification {
-    private final Project project = HelperUtil.createRootProject()
-    private final AntlrPlugin plugin = new AntlrPlugin()
-
-    def addsAntlrPropertiesToEachSourceSet() {
-        when:
-        plugin.apply(project)
-
-        then:
-        def sourceSet = project.sourceSets.main
-        sourceSet.antlr.srcDirs == [project.file('src/main/antlr')] as Set
-
-        sourceSet = project.sourceSets.test
-        sourceSet.antlr.srcDirs == [project.file('src/test/antlr')] as Set
-
-        when:
-        project.sourceSets.add('custom')
-
-        then:
-        sourceSet = project.sourceSets.custom
-        sourceSet.antlr.srcDirs == [project.file('src/custom/antlr')] as Set
-    }
-    
-    def addsTaskForEachSourceSet() {
-        when:
-        plugin.apply(project)
-
-        then:
-        def task = project.tasks.generateGrammarSource
-        task instanceof AntlrTask
-        project.tasks.compileJava.taskDependencies.getDependencies(null).contains(task)
-
-        task = project.tasks.generateTestGrammarSource
-        task instanceof AntlrTask
-        project.tasks.compileTestJava.taskDependencies.getDependencies(null).contains(task)
-
-        when:
-        project.sourceSets.add('custom')
-
-        then:
-        task = project.tasks.generateCustomGrammarSource
-        task instanceof AntlrTask
-        project.tasks.compileCustomJava.taskDependencies.getDependencies(null).contains(task)
-    }
-}
diff --git a/subprojects/gradle-code-quality/code-quality.gradle b/subprojects/gradle-code-quality/code-quality.gradle
deleted file mode 100644
index 6b4f755..0000000
--- a/subprojects/gradle-code-quality/code-quality.gradle
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-dependencies {
-    groovy libraries.groovy_depends
-
-    compile project(':core')
-    compile project(':plugins')
-
-    compile "org.codenarc:CodeNarc:0.11 at jar"
-    compile libraries.slf4j_api
-
-    // CodeNarc dependencies
-    runtime libraries.log4j_to_slf4j,
-            "org.gmetrics:GMetrics:0.3 at jar"
-
-    // Checkstyle dependencies
-    runtime "com.puppycrawl.tools:checkstyle:5.3 at jar",
-            libraries.google_collections,
-            libraries.antlr,
-            "commons-beanutils:commons-beanutils-core:1.8.3 at jar"
-
-    testCompile project(path: ':core', configuration: 'testFixtures')
-    testRuntime project(path: ':core', configuration: 'testFixturesRuntime')
-}
diff --git a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeQualityPlugin.groovy b/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeQualityPlugin.groovy
deleted file mode 100644
index 6c42702..0000000
--- a/subprojects/gradle-code-quality/src/main/groovy/org/gradle/api/plugins/quality/CodeQualityPlugin.groovy
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.api.plugins.quality
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Task
-import org.gradle.api.plugins.GroovyBasePlugin
-import org.gradle.api.plugins.JavaBasePlugin
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.plugins.ReportingBasePlugin
-import org.gradle.api.tasks.GroovySourceSet
-import org.gradle.api.tasks.SourceSet
-
-/**
- * A {@link Plugin} which measures and enforces code quality for Java and Groovy projects.
- */
-public class CodeQualityPlugin implements Plugin<Project> {
-    public static final String CHECKSTYLE_MAIN_TASK = "checkstyleMain";
-    public static final String CHECKSTYLE_TEST_TASK = "checkstyleTest";
-    public static final String CODE_NARC_MAIN_TASK = "codenarcMain";
-    public static final String CODE_NARC_TEST_TASK = "codenarcTest";
-
-    public void apply(final Project project) {
-        project.plugins.apply(ReportingBasePlugin.class);
-
-        JavaCodeQualityPluginConvention javaPluginConvention = new JavaCodeQualityPluginConvention(project)
-        project.convention.plugins.javaCodeQuality = javaPluginConvention;
-
-        GroovyCodeQualityPluginConvention groovyPluginConvention = new GroovyCodeQualityPluginConvention(project)
-        project.convention.plugins.groovyCodeQuality = groovyPluginConvention;
-
-        configureCheckstyleDefaults(project, javaPluginConvention)
-        configureCodeNarcDefaults(project, groovyPluginConvention)
-
-        project.plugins.withType(JavaBasePlugin.class).allPlugins {
-            configureForJavaPlugin(project, javaPluginConvention);
-        }
-        project.plugins.withType(GroovyBasePlugin.class).allPlugins {
-            configureForGroovyPlugin(project, groovyPluginConvention);
-        }
-    }
-
-    private void configureCheckstyleDefaults(Project project, JavaCodeQualityPluginConvention pluginConvention) {
-        project.tasks.withType(Checkstyle.class).allTasks {Checkstyle checkstyle ->
-            checkstyle.conventionMapping.configFile = { pluginConvention.checkstyleConfigFile }
-            checkstyle.conventionMapping.map('properties') { pluginConvention.checkstyleProperties }
-        }
-    }
-
-    private void configureCodeNarcDefaults(Project project, GroovyCodeQualityPluginConvention pluginConvention) {
-        project.tasks.withType(CodeNarc.class).allTasks {CodeNarc codenarc ->
-            codenarc.conventionMapping.configFile = { pluginConvention.codeNarcConfigFile }
-        }
-    }
-
-    private void configureCheckTask(Project project) {
-        Task task = project.tasks[JavaBasePlugin.CHECK_TASK_NAME]
-        task.setDescription("Executes all quality checks");
-        task.dependsOn { project.tasks.withType(Checkstyle.class).all; }
-        task.dependsOn { project.tasks.withType(CodeNarc.class).all; }
-    }
-
-    private void configureForJavaPlugin(Project project, JavaCodeQualityPluginConvention pluginConvention) {
-        configureCheckTask(project);
-
-        project.convention.getPlugin(JavaPluginConvention.class).sourceSets.allObjects {SourceSet set ->
-            Checkstyle checkstyle = project.tasks.add(set.getTaskName("checkstyle", null), Checkstyle.class);
-            checkstyle.description = "Runs Checkstyle against the $set.name Java source code."
-            checkstyle.conventionMapping.defaultSource = { set.allJava; }
-            checkstyle.conventionMapping.configFile = { pluginConvention.checkstyleConfigFile }
-            checkstyle.conventionMapping.resultFile = { new File(pluginConvention.checkstyleResultsDir, "${set.name}.xml") }
-            checkstyle.conventionMapping.classpath = { set.compileClasspath; }
-        }
-    }
-
-    private void configureForGroovyPlugin(Project project, GroovyCodeQualityPluginConvention pluginConvention) {
-        project.convention.getPlugin(JavaPluginConvention.class).sourceSets.allObjects {SourceSet set ->
-            GroovySourceSet groovySourceSet = set.convention.getPlugin(GroovySourceSet.class)
-            CodeNarc codeNarc = project.tasks.add(set.getTaskName("codenarc", null), CodeNarc.class);
-            codeNarc.setDescription("Runs CodeNarc against the $set.name Groovy source code.");
-            codeNarc.conventionMapping.defaultSource = { groovySourceSet.allGroovy; }
-            codeNarc.conventionMapping.configFile = { pluginConvention.codeNarcConfigFile; }
-            codeNarc.conventionMapping.reportFile = { new File(pluginConvention.codeNarcReportsDir, "${set.name}.html"); }
-        }
-    }
-}
diff --git a/subprojects/gradle-core/core.gradle b/subprojects/gradle-core/core.gradle
deleted file mode 100644
index 7505afd..0000000
--- a/subprojects/gradle-core/core.gradle
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.text.DateFormat
-import org.gradle.api.internal.artifacts.dependencies.DefaultSelfResolvingDependency
-
-apply plugin: 'groovy'
-apply from: "$rootDir/gradle/integTest.gradle"
-
-configurations {
-    testFixtures
-    testFixturesRuntime {
-        extendsFrom testFixtures, testRuntime
-    }
-    integTestFixtures {
-        extendsFrom testFixtures
-    }
-    integTestFixturesRuntime {
-        extendsFrom integTestFixtures, integTestRuntime
-    }
-}
-
-dependencies {
-    groovy libraries.groovy_depends
-
-    compile "commons-httpclient:commons-httpclient:3.0 at jar", "commons-codec:commons-codec:1.2 at jar", libraries.jcl_to_slf4j
-
-    compile libraries.ivy, "com.jcraft:jsch:0.1.42 at jar", 'com.jcraft:jzlib:1.0.7 at jar'
-
-    compile libraries.ant,
-            libraries.ant_nodeps,
-            libraries.logback_classic,
-            libraries.logback_core,
-            libraries.slf4j_api,
-            libraries.jul_to_slf4j,
-            libraries.commons_io,
-            libraries.commons_lang,
-            "commons-codec:commons-codec:1.2 at jar",
-            libraries.google_collections,
-            "commons-collections:commons-collections:3.2.1 at jar",
-            "slide:webdavlib:2.0 at jar",
-            "org.apache.maven:maven-ant-tasks:2.1.1 at jar",
-            libraries.asm_all,
-            'org.fusesource.jansi:jansi:1.2.1',
-            'org.jruby.ext.posix:jna-posix:1.0.3',
-            'org.sonatype.pmaven:pmaven-common:0.8-20100325 at jar',
-            'org.sonatype.pmaven:pmaven-groovy:0.8-20100325 at jar',
-            'org.codehaus.plexus:plexus-component-annotations:1.5.2'
-
-    runtime 'net.java.dev.jna:jna:3.2.2'
-
-    runtime libraries.log4j_to_slf4j, libraries.jcl_to_slf4j
-
-    testCompile libraries.xmlunit
-
-    compile libraries.ant_launcher
-
-    integTestCompile libraries.jetty_depends, project(':wrapper')
-
-    testFixtures sourceSets.test.classes, sourceSets.main.classes
-    integTestFixtures sourceSets.integTest.classes
-}
-
-task versionProperties(type: WriteVersionProperties) {
-    propertiesFile = new File(sourceSets.main.classesDir, GradleVersion.FILE_NAME)
-}
-
-classes.dependsOn(versionProperties)
-
-task ideVersionProperties(type: WriteVersionProperties) {
-    propertiesFile = new File(ideDir, "resources/test/$GradleVersion.FILE_NAME")
-}
-
-ide.dependsOn ideVersionProperties
-
-ideaModule {
-    dependsOn ideVersionProperties
-    scopes.COMPILE.plus.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files(new File(ideDir, "resources/test/")))))
-}
-
-eclipseClasspath {
-    dependsOn ideVersionProperties
-    plusConfigurations.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files(new File(ideDir, "resources/test/")))))
-    plusConfigurations.add(configurations.detachedConfiguration(new DefaultSelfResolvingDependency(files(project.sourceSets.integTest.resources.srcDirs))))
-	whenConfigured { classpath ->
-		classpath.entries.removeAll { entry -> entry.kind == 'src' && entry.path.startsWith('src/integTest/resources')}
-	}
-}
-
-[compileGroovy, compileTestGroovy]*.groovyOptions*.fork(memoryInitialSize: '128M', memoryMaximumSize: '1G')
-
-test {
-    jvmArgs '-Xms128m', '-Xmx512m', '-XX:MaxPermSize=128m', '-XX:+HeapDumpOnOutOfMemoryError'
-}
-
-class WriteVersionProperties extends DefaultTask {
-    @Input
-    String getVersion() { return project.version.toString() }
-
-    @Input
-    Date getBuildTime() { return project.version.buildTime }
-
-    @OutputFile
-    File propertiesFile
-
-    @TaskAction
-    def void generate() {
-        logger.info('Write version properties to: {}', propertiesFile)
-        Properties versionProperties = new Properties()
-        versionProperties.putAll([
-                (GradleVersion.VERSION): version,
-                (GradleVersion.BUILD_TIME): DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL).format(buildTime)
-        ])
-        propertiesFile.withOutputStream {
-            versionProperties.store(it, '')
-        }
-
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AbstractIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AbstractIntegrationTest.java
deleted file mode 100644
index 417a2e9..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/AbstractIntegrationTest.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import org.gradle.CacheUsage;
-import org.gradle.StartParameter;
-import org.gradle.integtests.fixtures.*;
-import org.gradle.util.TestFile;
-import org.gradle.util.TestFileContext;
-import org.junit.Rule;
-
-import java.io.File;
-
-public abstract class AbstractIntegrationTest implements TestFileContext {
-    @Rule public GradleDistribution distribution = new GradleDistribution();
-
-    public TestFile getTestDir() {
-        return distribution.getTestDir();
-    }
-
-    public TestFile file(Object... path) {
-        return getTestDir().file(path);
-    }
-
-    public TestFile testFile(String name) {
-        return file(name);
-    }
-
-    private StartParameter startParameter() {
-        StartParameter parameter = new StartParameter();
-        parameter.setGradleUserHomeDir(distribution.getUserHomeDir());
-
-        parameter.setSearchUpwards(false);
-        parameter.setCacheUsage(CacheUsage.ON);
-        parameter.setCurrentDir(getTestDir());
-
-        return parameter;
-    }
-
-    protected GradleExecuter inTestDirectory() {
-        return inDirectory(getTestDir());
-    }
-
-    protected GradleExecuter inDirectory(File directory) {
-        return new InProcessGradleExecuter(startParameter()).inDirectory(directory);
-    }
-
-    protected GradleExecuter usingBuildFile(File file) {
-        return new InProcessGradleExecuter(startParameter()).usingBuildScript(file);
-    }
-
-    protected GradleExecuter usingBuildScript(String script) {
-        return new InProcessGradleExecuter(startParameter()).usingBuildScript(script);
-    }
-
-    protected GradleExecuter usingProjectDir(File projectDir) {
-        StartParameter parameter = startParameter();
-        parameter.setProjectDir(projectDir);
-        return new InProcessGradleExecuter(parameter);
-    }
-
-    protected ArtifactBuilder artifactBuilder() {
-        return new GradleBackedArtifactBuilder(new InProcessGradleExecuter(startParameter()), getTestDir().file("artifacts"));
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BrokenTask.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BrokenTask.java
deleted file mode 100644
index 0591d51..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BrokenTask.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.gradle.api.Action;
-import org.gradle.api.DefaultTask;
-import org.gradle.api.Task;
-
-public class BrokenTask extends DefaultTask {
-    public BrokenTask() {
-        doFirst(new Action<Task>() {
-            public void execute(Task task) {
-                throw new RuntimeException("broken action");
-            }
-        });
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildAggregationIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildAggregationIntegrationTest.groovy
deleted file mode 100644
index 97e772b..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildAggregationIntegrationTest.groovy
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.ExecutionFailure
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class BuildAggregationIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    @Test
-    public void canExecuteAnotherBuildFromBuild() {
-        dist.testFile('build.gradle') << '''
-            assert gradle.parent == null
-            task build(type: GradleBuild) {
-                dir = 'other'
-                tasks = ['dostuff']
-                startParameter.searchUpwards = false
-            }
-'''
-
-        dist.testFile('other/build.gradle') << '''
-            assert gradle.parent != null
-            task dostuff << {
-                assert gradle.parent != null
-            }
-'''
-
-        executer.withTasks('build').run()
-    }
-
-    @Test
-    public void treatsBuildSrcProjectAsANestedBuild() {
-        dist.testFile('build.gradle') << '''
-            assert gradle.parent == null
-            task build
-'''
-
-        dist.testFile('buildSrc/build.gradle') << '''
-            apply plugin: 'java'
-            assert gradle.parent != null
-            classes << {
-                assert gradle.parent != null
-            }
-'''
-
-        executer.withTasks('build').run()
-    }
-
-    @Test
-    public void reportsNestedBuildFailure() {
-        TestFile other = dist.testFile('other.gradle') << '''
-            1/0
-'''
-
-        dist.testFile('build.gradle') << '''
-            task build(type: GradleBuild) {
-                buildFile = 'other.gradle'
-                startParameter.searchUpwards = false
-            }
-'''
-
-        ExecutionFailure failure = executer.withTasks('build').runWithFailure()
-        failure.assertHasFileName("Build file '${other}'")
-        failure.assertHasLineNumber(2)
-        failure.assertHasDescription('A problem occurred evaluating root project')
-        failure.assertThatCause(containsString('Division by zero'))
-    }
-
-    @Test
-    public void reportsBuildSrcFailure() {
-        dist.testFile('buildSrc/src/main/java/Broken.java') << 'broken!'
-        ExecutionFailure failure = executer.runWithFailure()
-        failure.assertHasFileName('Default buildSrc build script')
-        failure.assertHasDescription('Execution failed for task \':compileJava\'')
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptErrorIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptErrorIntegrationTest.java
deleted file mode 100644
index 784ac41..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/BuildScriptErrorIntegrationTest.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import org.gradle.integtests.fixtures.ExecutionFailure;
-import org.gradle.util.TestFile;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import java.io.File;
-
-public class BuildScriptErrorIntegrationTest extends AbstractIntegrationTest {
-    @Test
-    public void reportsProjectEvaluationFailsWithGroovyException() {
-        ExecutionFailure failure = usingBuildScript("\ncreateTakk('do-stuff')").runWithFailure();
-
-        failure.assertHasFileName("Embedded build file");
-        failure.assertHasLineNumber(2);
-        failure.assertHasDescription("A problem occurred evaluating root project 'reportsProjectEvaluationFailsWithGroovyException");
-        failure.assertHasCause("Could not find method createTakk() for arguments [do-stuff] on root project 'reportsProjectEvaluationFailsWithGroovyException");
-    }
-
-    @Test
-    public void reportsScriptCompilationException() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-            "// a comment",
-            "import org.gradle.unknown.Unknown",
-            "new Unknown()");
-        ExecutionFailure failure = inTestDirectory().runWithFailure();
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasLineNumber(2);
-        failure.assertHasDescription(String.format("Could not compile build file '%s'.", buildFile));
-    }
-
-    @Test
-    public void reportsNestedProjectEvaluationFailsWithRuntimeException() {
-        testFile("settings.gradle").write("include 'child'");
-
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "dependsOn 'child'",
-                "task t");
-
-        TestFile childBuildFile = testFile("child/build.gradle");
-        childBuildFile.writelns(
-                "def broken = { ->",
-                "    throw new RuntimeException('failure') }",
-                "broken()");
-        ExecutionFailure failure = inTestDirectory().withTasks("t").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", childBuildFile));
-        failure.assertHasLineNumber(2);
-        failure.assertHasDescription("A problem occurred evaluating project ':child'");
-        failure.assertHasCause("failure");
-    }
-
-    @Test
-    public void reportsTaskActionExecutionFailsWithError() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "task('do-stuff').doFirst",
-                "{",
-                "1/0",
-                "}");
-        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("do-stuff").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasLineNumber(3);
-        failure.assertHasDescription("Execution failed for task ':do-stuff'");
-        failure.assertHasCause("Division by zero");
-    }
-
-    @Test
-    public void reportsTaskActionExecutionFailsWithRuntimeException() {
-        File buildFile = testFile("build.gradle").writelns(
-                "task brokenClosure << {",
-                "    throw new RuntimeException('broken closure')",
-                "}");
-
-        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("brokenClosure").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasLineNumber(2);
-        failure.assertHasDescription("Execution failed for task ':brokenClosure'");
-        failure.assertHasCause("broken closure");
-    }
-
-    @Test
-    public void reportsTaskActionExecutionFailsFromJavaWithRuntimeException() {
-        File buildFile = testFile("build.gradle").write("task brokenJavaTask(type: org.gradle.integtests.BrokenTask)");
-
-        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("brokenJavaTask").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasDescription("Execution failed for task ':brokenJavaTask'");
-        failure.assertHasCause("broken action");
-    }
-
-    @Test
-    public void reportsTaskInjectedByOtherProjectFailsWithRuntimeException() {
-        testFile("settings.gradle").write("include 'a', 'b'");
-        TestFile buildFile = testFile("b/build.gradle");
-        buildFile.writelns(
-                "project(':a') {",
-                "    task a << {",
-                "        throw new RuntimeException('broken')",
-                "    }",
-                "}");
-
-        ExecutionFailure failure = inTestDirectory().withTasks("a").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasLineNumber(3);
-        failure.assertHasDescription("Execution failed for task ':a:a");
-        failure.assertHasCause("broken");
-    }
-
-    @Test
-    public void reportsTaskGraphReadyEventFailsWithRuntimeException() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "gradle.taskGraph.whenReady {",
-                "throw new RuntimeException('broken closure')",
-                "}",
-                "task a");
-
-        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("a").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasLineNumber(2);
-        failure.assertHasDescription("Failed to notify task execution graph listener");
-        failure.assertHasCause("broken closure");
-    }
-
-    @Test @Ignore
-    public void reportsTaskDependencyClosureFailsWithRuntimeException() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "task a",
-                "a.dependsOn {",
-                "throw new RuntimeException('broken')",
-                "}");
-
-        ExecutionFailure failure = usingBuildFile(buildFile).withTasks("a").runWithFailure();
-
-        failure.assertHasFileName(String.format("Build file '%s'", buildFile));
-        failure.assertHasLineNumber(3);
-        failure.assertHasDescription("??");
-        failure.assertHasCause("broken");
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CacheProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CacheProjectIntegrationTest.groovy
deleted file mode 100644
index efbe0db..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CacheProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.groovy.scripts.ScriptSource
-import org.gradle.groovy.scripts.UriScriptSource
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.GradleVersion
-import org.gradle.util.TestFile
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.junit.Assert.*
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class CacheProjectIntegrationTest {
-    static final String TEST_FILE = "build/test.txt"
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    TestFile projectDir
-    TestFile userHomeDir
-    TestFile buildFile
-    TestFile propertiesFile
-    TestFile classFile
-    TestFile artifactsCache
-
-    @Before
-    public void setUp() {
-        String version = new GradleVersion().version
-        projectDir = dist.getTestDir().file("project")
-        projectDir.mkdirs()
-        userHomeDir = dist.getUserHomeDir()
-        buildFile = projectDir.file('build.gradle')
-        ScriptSource source = new UriScriptSource("build file", buildFile)
-        propertiesFile = userHomeDir.file("caches/$version/scripts/$source.className/cache.properties")
-        classFile = userHomeDir.file("caches/$version/scripts/$source.className/no_buildscript_ProjectScript/${source.className}.class")
-        artifactsCache = projectDir.file(".gradle/$version/taskArtifacts/cache.bin")
-    }
-
-    @Test
-    public void cachesBuildScript() {
-        createLargeBuildScript()
-        testBuild("hello1", "Hello 1")
-        TestFile.Snapshot classFileSnapshot = classFile.snapshot()
-        TestFile.Snapshot artifactsCacheSnapshot = artifactsCache.snapshot()
-
-        testBuild("hello2", "Hello 2")
-        classFile.assertHasNotChangedSince(classFileSnapshot)
-        artifactsCache.assertHasNotChangedSince(artifactsCacheSnapshot)
-
-        modifyLargeBuildScript()
-        testBuild("newTask", "I am new")
-        classFile.assertHasChangedSince(classFileSnapshot)
-        artifactsCache.assertHasNotChangedSince(artifactsCacheSnapshot)
-        classFileSnapshot = classFile.snapshot()
-        artifactsCacheSnapshot = artifactsCache.snapshot()
-
-        testBuild("newTask", "I am new", "-Crebuild")
-        classFile.assertHasChangedSince(classFileSnapshot)
-        artifactsCache.assertHasChangedSince(artifactsCacheSnapshot)
-    }
-
-    private def testBuild(String taskName, String expected, String... args) {
-        executer.inDirectory(projectDir).withTasks(taskName).withArguments(args).withQuietLogging().run()
-        assertEquals(expected, projectDir.file(TEST_FILE).text)
-        classFile.assertIsFile()
-        propertiesFile.assertIsFile()
-        artifactsCache.assertIsFile()
-    }
-
-    // We once ran into a cache problem under windows, which was not reproducible with small build scripts. Therefore we
-    // create a larger one here.
-
-    def createLargeBuildScript() {
-        File buildFile = projectDir.file('build.gradle')
-        String content = ""
-        50.times {i ->
-            content += """task 'hello$i' << {
-    File file = file('$TEST_FILE')
-    file.parentFile.mkdirs()
-    file.write('Hello $i')
-}
-
-void someMethod$i() {
-    println('Some message')
-}
-
-"""
-        }
-        buildFile.write(content)
-    }
-
-    def void modifyLargeBuildScript() {
-        File buildFile = projectDir.file('build.gradle')
-        String newContent = buildFile.text + """
-task newTask << {
-    File file = file('$TEST_FILE')
-    file.parentFile.mkdirs()
-    file.write('I am new')
-}
-"""
-        buildFile.write(newContent)
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ClientModuleDependenciesResolveIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ClientModuleDependenciesResolveIntegrationTest.java
deleted file mode 100644
index 497441c..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ClientModuleDependenciesResolveIntegrationTest.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import org.gradle.integtests.fixtures.GradleDistribution;
-import org.gradle.integtests.fixtures.GradleDistributionExecuter;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-
-/**
- * @author Hans Dockter
- */
- at RunWith (DistributionIntegrationTestRunner.class)
-public class ClientModuleDependenciesResolveIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution();
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
-
-    @Test
-    public void testResolve() {
-        // the actual testing is done in the build script.
-        File projectDir = new File(dist.getSamplesDir(), "clientModuleDependencies/shared");
-        executer.inDirectory(projectDir).withTasks("testDeps").run();
-
-        projectDir = new File(dist.getSamplesDir(), "clientModuleDependencies/api");
-        executer.inDirectory(projectDir).withTasks("testDeps").run();
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CommandLineIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CommandLineIntegrationTest.groovy
deleted file mode 100644
index 5986a25..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CommandLineIntegrationTest.groovy
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.ExecutionFailure
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.OperatingSystem
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
- at RunWith(DistributionIntegrationTestRunner.class)
-public class CommandLineIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    @Test
-    public void hasNonZeroExitCodeOnBuildFailure() {
-        File javaprojectDir = new File(dist.samplesDir, 'java/quickstart')
-        ExecutionFailure failure = executer.inDirectory(javaprojectDir).withTasks('unknown').runWithFailure()
-        failure.assertHasDescription("Task 'unknown' not found in root project 'quickstart'.")
-    }
-
-    @Test
-    public void canonicalisesWorkingDirectory() {
-        File javaprojectDir;
-        if (OperatingSystem.current().isWindows()) {
-            javaprojectDir = new File(dist.samplesDir, 'java/QUICKS~1')
-        } else if (!OperatingSystem.current().isCaseSensitiveFileSystem()) {
-            javaprojectDir = new File(dist.samplesDir, 'JAVA/QuickStart')
-        } else {
-            javaprojectDir = new File(dist.samplesDir, 'java/multiproject/../quickstart')
-        }
-        executer.inDirectory(javaprojectDir).withTasks('classes').run()
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest.groovy
deleted file mode 100644
index 4632713..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/CrossVersionCompatibilityIntegrationTest.groovy
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.BasicGradleDistribution
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.util.Jvm
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class CrossVersionCompatibilityIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final TestResources resources = new TestResources()
-    private final BasicGradleDistribution gradle08 = dist.previousVersion('0.8')
-    private final BasicGradleDistribution gradle09rc1 = dist.previousVersion('0.9-rc-1')
-    private final BasicGradleDistribution gradle09rc2 = dist.previousVersion('0.9-rc-2')
-    private final BasicGradleDistribution gradle09rc3 = dist.previousVersion('0.9-rc-3')
-    private final BasicGradleDistribution gradle09 = dist.previousVersion('0.9')
-
-    @Test
-    public void canBuildJavaProject() {
-        dist.testFile('buildSrc/src/main/groovy').assertIsDir()
-
-        // Upgrade and downgrade from previous version to current version and back again
-        eachVersion([gradle08, gradle09rc1, gradle09rc2, gradle09rc3, gradle09]) { version ->
-            version.executer().inDirectory(dist.testDir).withTasks('build').run()
-            dist.executer().inDirectory(dist.testDir).withTasks('build').run()
-            version.executer().inDirectory(dist.testDir).withTasks('build').run()
-        }
-    }
-
-    @Test
-    public void canUseWrapperFromPreviousVersionToRunCurrentVersion() {
-        eachVersion([gradle09rc1, gradle09rc2, gradle09rc3, gradle09]) { version ->
-            checkWrapperWorksWith(version, dist)
-        }
-    }
-
-    @Test
-    public void canUseWrapperFromCurrentVersionToRunPreviousVersion() {
-        eachVersion([gradle09rc1, gradle09rc2, gradle09rc3, gradle09]) { version ->
-            checkWrapperWorksWith(dist, version)
-        }
-    }
-
-    def checkWrapperWorksWith(BasicGradleDistribution wrapperGenVersion, BasicGradleDistribution executionVersion) {
-        wrapperGenVersion.executer().withTasks('wrapper').withArguments("-PdistZip=$executionVersion.binDistribution.absolutePath", "-PdistVersion=$executionVersion.version").run()
-        def result = wrapperGenVersion.executer().usingExecutable('gradlew').withTasks('hello').run()
-        assert result.output.contains("hello from $executionVersion.version")
-    }
-
-    def eachVersion(Iterable<BasicGradleDistribution> versions, Closure cl) {
-        versions.each { version ->
-            if (!version.worksWith(Jvm.current())) {
-                System.out.println("skipping $version as it does not work with ${Jvm.current()}.")
-                return
-            }
-            try {
-                System.out.println("building using $version");
-                cl.call(version)
-            } catch (Throwable t) {
-                throw new RuntimeException("Could not build test project using $version.", t)
-            }
-        }
-    }
-}
-
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DependenciesResolveIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DependenciesResolveIntegrationTest.java
deleted file mode 100644
index 14dbb52..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DependenciesResolveIntegrationTest.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import org.gradle.integtests.fixtures.GradleDistribution;
-import org.gradle.integtests.fixtures.GradleDistributionExecuter;
-import org.gradle.integtests.fixtures.Sample;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-
-/**
- * @author Hans Dockter
- */
- at RunWith (DistributionIntegrationTestRunner.class)
-public class DependenciesResolveIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution();
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
-    @Rule public final Sample sample = new Sample("dependencies");
-
-    @Test
-    public void testResolve() {
-        dist.requireOwnUserHomeDir();
-
-        // the actual testing is done in the build script.
-        File projectDir = sample.getDir();
-        executer.inDirectory(projectDir).withTasks("test").run();
-    }   
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DirTransformerTask.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DirTransformerTask.java
deleted file mode 100644
index 77659dd..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DirTransformerTask.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.gradle.api.DefaultTask;
-import org.gradle.api.tasks.InputDirectory;
-import org.gradle.api.tasks.OutputDirectory;
-import org.gradle.api.tasks.TaskAction;
-import org.gradle.util.TestFile;
-
-import java.io.File;
-
-public class DirTransformerTask extends DefaultTask {
-    private File inputDir;
-    private File outputDir;
-
-    @InputDirectory
-    public File getInputDir() {
-        return inputDir;
-    }
-
-    public void setInputDir(File inputDir) {
-        this.inputDir = inputDir;
-    }
-
-    @OutputDirectory
-    public File getOutputDir() {
-        return outputDir;
-    }
-
-    public void setOutputDir(File outputDir) {
-        this.outputDir = outputDir;
-    }
-
-    @TaskAction
-    public void transform() {
-        TestFile inputDir = new TestFile(this.inputDir);
-        for (File file : inputDir.listFiles()) {
-            TestFile inputFile = new TestFile(file);
-            TestFile outputFile = new TestFile(outputDir, inputFile.getName());
-            outputFile.write(String.format("[%s]", inputFile.getText()));
-        }
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTest.groovy
deleted file mode 100644
index a66a37c..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTest.groovy
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.apache.tools.ant.taskdefs.Expand
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.AntUtil
-import org.gradle.util.GradleVersion
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-
- at RunWith(DistributionIntegrationTestRunner)
-class DistributionIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    private String version = new GradleVersion().version
-
-    @Test
-    public void binZipContents() {
-        TestFile binZip = dist.distributionsDir.file("gradle-$version-bin.zip")
-        binZip.usingNativeTools().unzipTo(dist.testDir)
-        TestFile contentsDir = dist.testDir.file("gradle-$version")
-
-        checkMinimalContents(contentsDir)
-
-        // Extra stuff
-        contentsDir.file('src').assertDoesNotExist()
-        contentsDir.file('samples').assertDoesNotExist()
-        contentsDir.file('docs').assertDoesNotExist()
-    }
-
-    @Test
-    public void allZipContents() {
-        TestFile binZip = dist.distributionsDir.file("gradle-$version-all.zip")
-        binZip.usingNativeTools().unzipTo(dist.testDir)
-        TestFile contentsDir = dist.testDir.file("gradle-$version")
-
-        checkMinimalContents(contentsDir)
-
-        // Source
-        contentsDir.file('src/org/gradle/api/Project.java').assertIsFile()
-        contentsDir.file('src/org/gradle/initialization/defaultBuildSourceScript.txt').assertIsFile()
-        contentsDir.file('src/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java').assertIsFile()
-        contentsDir.file('src/org/gradle/wrapper/Wrapper.java').assertIsFile()
-
-        // Samples
-        contentsDir.file('samples/java/quickstart/build.gradle').assertIsFile()
-
-        // Docs
-        contentsDir.file('docs/javadoc/index.html').assertIsFile()
-        contentsDir.file('docs/javadoc/org/gradle/api/Project.html').assertIsFile()
-        contentsDir.file('docs/groovydoc/index.html').assertIsFile()
-        contentsDir.file('docs/groovydoc/org/gradle/api/Project.html').assertIsFile()
-        contentsDir.file('docs/groovydoc/org/gradle/api/tasks/bundling/Zip.html').assertIsFile()
-        contentsDir.file('docs/userguide/userguide.html').assertIsFile()
-        contentsDir.file('docs/userguide/userguide_single.html').assertIsFile()
-//        contentsDir.file('docs/userguide/userguide.pdf').assertIsFile()
-    }
-
-    private def checkMinimalContents(TestFile contentsDir) {
-        // Check it can be executed
-        executer.inDirectory(contentsDir).usingExecutable('bin/gradle').withTaskList().run()
-
-        // Scripts
-        contentsDir.file('bin/gradle').assertIsFile()
-        contentsDir.file('bin/gradle.bat').assertIsFile()
-
-        // Top level files
-        contentsDir.file('LICENSE').assertIsFile()
-
-        // Libs
-        assertIsGradleJar(contentsDir.file("lib/gradle-core-${version}.jar"))
-        assertIsGradleJar(contentsDir.file("lib/gradle-ui-${version}.jar"))
-        assertIsGradleJar(contentsDir.file("lib/gradle-launcher-${version}.jar"))
-        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-code-quality-${version}.jar"))
-        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-plugins-${version}.jar"))
-        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-jetty-${version}.jar"))
-        assertIsGradleJar(contentsDir.file("lib/plugins/gradle-wrapper-${version}.jar"))
-
-        // Docs
-        contentsDir.file('getting-started.html').assertIsFile()
-    }
-
-    private def assertIsGradleJar(TestFile jar) {
-        jar.assertIsFile()
-        assertThat(jar.manifest.mainAttributes.getValue('Implementation-Version'), equalTo(version))
-        assertThat(jar.manifest.mainAttributes.getValue('Implementation-Title'), equalTo('Gradle'))
-    }
-
-    @Test
-    public void sourceZipContents() {
-        TestFile srcZip = dist.distributionsDir.file("gradle-$version-src.zip")
-        srcZip.usingNativeTools().unzipTo(dist.testDir)
-        TestFile contentsDir = dist.testDir.file("gradle-$version")
-
-        // Build self using wrapper in source distribution
-        executer.inDirectory(contentsDir).usingExecutable('gradlew').withTasks('binZip').run()
-
-        File binZip = contentsDir.file('build/distributions').listFiles()[0]
-        Expand unpack = new Expand()
-        unpack.src = binZip
-        unpack.dest = contentsDir.file('build/distributions/unzip')
-        AntUtil.execute(unpack)
-        TestFile unpackedRoot = new TestFile(contentsDir.file('build/distributions/unzip').listFiles()[0])
-
-        // Make sure the build distribution does something useful
-        unpackedRoot.file("bin/gradle").assertIsFile()
-        // todo run something with the gradle build by the source dist
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java
deleted file mode 100644
index 3e98fbd..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.junit.runner.Description;
-import org.junit.runner.notification.RunNotifier;
-import org.junit.runners.BlockJUnit4ClassRunner;
-import org.junit.runners.model.InitializationError;
-
-public class DistributionIntegrationTestRunner extends BlockJUnit4ClassRunner {
-    private static final String IGNORE_SYS_PROP = "org.gradle.integtest.ignore";
-
-    public DistributionIntegrationTestRunner(Class<?> testClass) throws InitializationError {
-        super(testClass);
-    }
-
-    @Override
-    public void run(final RunNotifier notifier) {
-        if (System.getProperty(IGNORE_SYS_PROP) != null) {
-            notifier.fireTestIgnored(Description.createTestDescription(getTestClass().getJavaClass(),
-                    "System property to ignore integration tests is set."));
-        } else {
-            super.run(notifier);
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DynamicObjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DynamicObjectIntegrationTest.groovy
deleted file mode 100644
index c392f0f..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/DynamicObjectIntegrationTest.groovy
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class DynamicObjectIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    @Test
-    public void canAddDynamicPropertiesToProject() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file("settings.gradle").writelns("include 'child'");
-        testDir.file("build.gradle").writelns(
-                "rootProperty = 'root'",
-                "sharedProperty = 'ignore me'",
-                "convention.plugins.test = new ConventionBean()",
-                "task rootTask",
-                "task testTask",
-                "class ConventionBean { def getConventionProperty() { 'convention' } }"
-        );
-        testDir.file("child/build.gradle").writelns(
-                "childProperty = 'child'",
-                "sharedProperty = 'shared'",
-                "task testTask << {",
-                "  new Reporter().checkProperties(project)",
-                "}",
-                // Use a separate class, to isolate Project from the script
-                "class Reporter {",
-                "  def checkProperties(object) {",
-                "    assert 'root' == object.rootProperty",
-                "    assert 'child' == object.childProperty",
-                "    assert 'shared' == object.sharedProperty",
-                "    assert 'convention' == object.conventionProperty",
-                "    assert ':child:testTask' == object.testTask.path",
-                "    try { object.rootTask; fail() } catch (MissingPropertyException e) { }",
-                "  }",
-                "}"
-        );
-
-        executer.inDirectory(testDir).withTasks("testTask").run();
-    }
-
-    @Test
-    public void canAddDynamicMethodsToProject() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file("settings.gradle").writelns("include 'child'");
-        testDir.file("build.gradle").writelns(
-                "def rootMethod(p) { 'root' + p }",
-                "def sharedMethod(p) { 'ignore me' }",
-                "convention.plugins.test = new ConventionBean()",
-                "task rootTask",
-                "task testTask",
-                "class ConventionBean { def conventionMethod(name) { 'convention' + name } }"
-        );
-        testDir.file("child/build.gradle").writelns(
-                "def childMethod(p) { 'child' + p }",
-                "def sharedMethod(p) { 'shared' + p }",
-                "task testTask << {",
-                "  new Reporter().checkMethods(project)",
-                "}",
-                // Use a separate class, to isolate Project from the script
-                "class Reporter {",
-                "  def checkMethods(object) {",
-                "    assert 'rootMethod' == object.rootMethod('Method')",
-                "    assert 'childMethod' == object.childMethod('Method')",
-                "    assert 'sharedMethod'== object.sharedMethod('Method')",
-                "    assert 'conventionMethod' == object.conventionMethod('Method')",
-                "    object.testTask { assert ':child:testTask' == delegate.path }",
-                "    try { object.rootTask { }; fail() } catch (MissingMethodException e) { }",
-                "  }",
-                "}"
-        );
-
-        executer.inDirectory(testDir).withTasks("testTask").run();
-    }
-
-    @Test
-    public void canAddDynamicPropertiesToCoreDomainObjects() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file('build.gradle') << '''
-            class Extension { def doStuff() { 'method' } }
-            class GroovyTask extends DefaultTask { }
-
-            task defaultTask {
-                custom = 'value'
-                convention.plugins.custom = new Extension()
-            }
-            task javaTask(type: Copy) {
-                custom = 'value'
-                convention.plugins.custom = new Extension()
-            }
-            task groovyTask(type: GroovyTask) {
-                custom = 'value'
-                convention.plugins.custom = new Extension()
-            }
-            configurations {
-                test {
-                    custom = 'value'
-                    convention.plugins.custom = new Extension()
-                }
-            }
-            dependencies {
-                test('::name:') {
-                    custom = 'value';
-                    convention.plugins.custom = new Extension()
-                }
-                test(module('::other')) {
-                    custom = 'value';
-                    convention.plugins.custom = new Extension()
-                }
-                test(project(':')) {
-                    custom = 'value';
-                    convention.plugins.custom = new Extension()
-                }
-                test(files('src')) {
-                    custom = 'value';
-                    convention.plugins.custom = new Extension()
-                }
-            }
-            repositories {
-                custom = 'repository'
-                convention.plugins.custom = new Extension()
-            }
-            defaultTask.custom = 'another value'
-            javaTask.custom = 'another value'
-            groovyTask.custom = 'another value'
-            assert !project.hasProperty('custom')
-            assert defaultTask.hasProperty('custom')
-            assert defaultTask.custom == 'another value'
-            assert defaultTask.doStuff() == 'method'
-            assert javaTask.doStuff() == 'method'
-            assert groovyTask.doStuff() == 'method'
-            assert configurations.test.hasProperty('custom')
-            assert configurations.test.custom == 'value'
-            assert configurations.test.doStuff() == 'method'
-            configurations.test.dependencies.each {
-                assert it.hasProperty('custom')
-                assert it.custom == 'value'
-                assert it.getProperty('custom') == 'value'
-            }
-            assert repositories.hasProperty('custom')
-            assert repositories.custom == 'repository'
-            assert repositories.doStuff() == 'method'
-            repositories {
-                assert custom == 'repository'
-                assert doStuff() == 'method'
-            }
-'''
-
-        executer.inDirectory(testDir).withTasks("defaultTask").run();
-    }
-
-    @Test
-    public void canInjectMethodsFromParentProject() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file("settings.gradle").writelns("include 'child'");
-        testDir.file("build.gradle").writelns(
-                "subprojects {",
-                "  injectedMethod = { project.name }",
-                "}"
-        );
-        testDir.file("child/build.gradle").writelns(
-                "task testTask << {",
-                "   assert injectedMethod() == 'child'",
-                "}"
-        );
-
-        executer.inDirectory(testDir).withTasks("testTask").run();
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/EclipseIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/EclipseIntegrationTest.groovy
deleted file mode 100644
index 319d436..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/EclipseIntegrationTest.groovy
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.TestResources
-import org.junit.Rule
-import org.junit.Test
-
-class EclipseIntegrationTest extends AbstractIntegrationTest {
-    @Rule
-    public final TestResources testResources = new TestResources()
-
-    @Test
-    public void canCreateAndDeleteMetaData() {
-        File buildFile = testFile("master/build.gradle");
-        usingBuildFile(buildFile).run();
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GradleUserHomeEnvVariableIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GradleUserHomeEnvVariableIntegrationTest.java
deleted file mode 100644
index 95b377a..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/GradleUserHomeEnvVariableIntegrationTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.gradle.integtests.fixtures.GradleDistribution;
-import org.gradle.integtests.fixtures.GradleDistributionExecuter;
-import org.gradle.util.WrapUtil;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-
- at RunWith(DistributionIntegrationTestRunner.class)
-public class GradleUserHomeEnvVariableIntegrationTest  {
-    @Rule
-    public final GradleDistribution dist = new GradleDistribution();
-    @Rule
-    public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
-
-    @Test
-    public void canDefineGradleUserHomeViaEnvVariable() {
-        // the actual testing is done in the build script.
-        File projectDir = new File(dist.getSamplesDir(), "gradleUserHome");
-        File gradleUserHomeDir = new File(dist.getSamplesDir(), "gradleUserHome/customUserHome");
-        executer.withUserHomeDir(null);
-        executer.withEnvironmentVars(WrapUtil.toMap("GRADLE_USER_HOME", gradleUserHomeDir.getAbsolutePath())).
-                inDirectory(projectDir).withTasks("checkGradleUserHomeViaSystemEnv").run();
-    }
-
-    @Test
-    public void checkDefaultGradleUserHome() {
-        // the actual testing is done in the build script.
-        File projectDir = new File(dist.getSamplesDir(), "gradleUserHome");
-        executer.withUserHomeDir(null);
-        executer.inDirectory(projectDir).withTasks("checkDefaultGradleUserHome").run();
-    }
-
-    @Ignore
-    public void systemPropGradleUserHomeHasPrecedenceOverEnvVariable() {
-        // the actual testing is done in the build script.
-        File projectDir = new File(dist.getSamplesDir(), "gradleUserHome");
-        File gradleUserHomeDir = new File(dist.getSamplesDir(), "gradleUserHome/customUserHome");
-        File systemPropGradleUserHomeDir = new File(dist.getSamplesDir(), "gradleUserHome/systemPropCustomUserHome");
-        executer.withUserHomeDir(null);
-        executer.withArguments("-Dgradle.user.home=" + systemPropGradleUserHomeDir.getAbsolutePath()).
-                withEnvironmentVars(WrapUtil.toMap("GRADLE_USER_HOME", gradleUserHomeDir.getAbsolutePath())).
-                inDirectory(projectDir).withTasks("checkSystemPropertyGradleUserHomeHasPrecedence").run();
-    }
-
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IdeaIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IdeaIntegrationTest.groovy
deleted file mode 100644
index f17b3b2..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IdeaIntegrationTest.groovy
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.integtests
-
-import org.custommonkey.xmlunit.Diff
-import org.custommonkey.xmlunit.ElementNameAndAttributeQualifier
-import org.custommonkey.xmlunit.XMLAssert
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import junit.framework.AssertionFailedError
-
- at RunWith(DistributionIntegrationTestRunner)
-class IdeaIntegrationTest {
-    @Rule
-    public final GradleDistribution dist = new GradleDistribution()
-    @Rule
-    public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule
-    public final TestResources testResources = new TestResources()
-
-    @Test
-    public void canCreateAndDeleteMetaData() {
-        executer.withTasks('idea').run()
-
-        assertHasExpectedContents('root.ipr')
-        assertHasExpectedContents('root.iws')
-        assertHasExpectedContents('root.iml')
-        assertHasExpectedContents('api/api.iml')
-        assertHasExpectedContents('webservice/webservice.iml')
-
-        executer.withTasks('cleanIdea').run()
-    }
-
-    @Test
-    public void worksWithAnEmptyProject() {
-        executer.withTasks('idea').run()
-
-        assertHasExpectedContents('root.ipr')
-        assertHasExpectedContents('root.iml')
-    }
-
-    @Test
-    public void worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied() {
-        executer.withTasks('idea').run()
-
-        assertHasExpectedContents('root.ipr')
-    }
-
-    @Test
-    public void worksWithNonStandardLayout() {
-        executer.inDirectory(dist.testDir.file('root')).withTasks('idea').run()
-
-        assertHasExpectedContents('root/root.ipr')
-        assertHasExpectedContents('root/root.iml')
-        assertHasExpectedContents('top-level.iml')
-    }
-
-    @Test
-    public void mergesModuleDependenciesIntoExistingDependencies() {
-        executer.withTasks('idea').run()
-
-        assertHasExpectedContents('root.iml')
-    }
-
-    def assertHasExpectedContents(String path) {
-        TestFile file = dist.testDir.file(path).assertIsFile()
-        TestFile expectedFile = dist.testDir.file("expectedFiles/${path}.xml").assertIsFile()
-
-        def cache = dist.userHomeDir.file("cache")
-        def cachePath = cache.absolutePath.replace(File.separator, '/')
-        def expectedXml = expectedFile.text.replace('@CACHE_DIR@', cachePath)
-
-        Diff diff = new Diff(expectedXml, file.text)
-        diff.overrideElementQualifier(new ElementNameAndAttributeQualifier())
-        try {
-            XMLAssert.assertXMLEqual(diff, true)
-        } catch (AssertionFailedError e) {
-            throw new AssertionFailedError("generated file '$path' does not contain the expected contents: ${e.message}.\nExpected:\n${expectedXml}\nActual:\n${file.text}").initCause(e)
-        }
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalBuildIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalBuildIntegrationTest.groovy
deleted file mode 100644
index 77984a8..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IncrementalBuildIntegrationTest.groovy
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-package org.gradle.integtests
-
-import org.gradle.util.TestFile
-import org.junit.Test
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-
-class IncrementalBuildIntegrationTest extends AbstractIntegrationTest {
-    @Test
-    public void skipsTaskWhenOutputFileIsUpToDate() {
-        testFile('build.gradle') << '''
-task a(type: org.gradle.integtests.TransformerTask) {
-    inputFile = file('src.txt')
-    outputFile = file('src.a.txt')
-}
-task b(type: org.gradle.integtests.TransformerTask, dependsOn: a) {
-    inputFile = a.outputFile
-    outputFile = file('src.b.txt')
-}
-'''
-        TestFile inputFile = testFile('src.txt')
-        TestFile outputFileA = testFile('src.a.txt')
-        TestFile outputFileB = testFile('src.b.txt')
-
-        inputFile.text = 'content'
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        TestFile.Snapshot aSnapshot = outputFileA.snapshot()
-        TestFile.Snapshot bSnapshot = outputFileB.snapshot()
-        assertThat(outputFileA.text, equalTo('[content]'))
-        assertThat(outputFileB.text, equalTo('[[content]]'))
-
-        // No changes
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-
-        outputFileA.assertHasNotChangedSince(aSnapshot)
-        outputFileB.assertHasNotChangedSince(bSnapshot)
-
-        // Update timestamp, no content changes
-
-        inputFile.setLastModified(inputFile.lastModified() - 10000);
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-
-        outputFileA.assertHasNotChangedSince(aSnapshot)
-        outputFileB.assertHasNotChangedSince(bSnapshot)
-
-        // Change content
-
-        inputFile.text = 'new content'
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        outputFileA.assertHasChangedSince(aSnapshot)
-        outputFileB.assertHasChangedSince(bSnapshot)
-        assertThat(outputFileA.text, equalTo('[new content]'))
-        assertThat(outputFileB.text, equalTo('[[new content]]'))
-
-        // Delete intermediate output file
-
-        outputFileA.delete()
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':b')
-
-        assertThat(outputFileA.text, equalTo('[new content]'))
-        assertThat(outputFileB.text, equalTo('[[new content]]'))
-
-        // Delete final output file
-
-        outputFileB.delete()
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
-
-        assertThat(outputFileA.text, equalTo('[new content]'))
-        assertThat(outputFileB.text, equalTo('[[new content]]'))
-
-        // Change build file in a way which does not affect the task
-
-        testFile('build.gradle').text += '''
-task c
-'''
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-
-        // Change an input property of the first task (the content format)
-
-        testFile('build.gradle').text += '''
-a.format = ' %s '
-'''
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        assertThat(outputFileA.text, equalTo(' new content '))
-        assertThat(outputFileB.text, equalTo('[ new content ]'))
-
-        // Change final output file destination
-
-        testFile('build.gradle').text += '''
-b.outputFile = file('new-output.txt')
-'''
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
-        outputFileB = testFile('new-output.txt')
-        outputFileB.assertIsFile()
-
-        // Run with --no-opt command-line options
-        inTestDirectory().withTasks('b').withArguments('--no-opt').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        // Output files already exist before using this version of Gradle
-        // delete .gradle dir to simulate this
-        testFile('.gradle').assertIsDir().deleteDir()
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        outputFileB.delete()
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-    }
-
-    @Test
-    public void skipsTaskWhenOutputDirContentsAreUpToDate() {
-        testFile('build.gradle') << '''
-task a(type: org.gradle.integtests.DirTransformerTask) {
-    inputDir = file('src')
-    outputDir = file('build/a')
-}
-task b(type: org.gradle.integtests.DirTransformerTask, dependsOn: a) {
-    inputDir = a.outputDir
-    outputDir = file('build/b')
-}
-'''
-
-        testFile('src').createDir()
-        testFile('src/file1.txt').write('content')
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        TestFile outputAFile = testFile('build/a/file1.txt')
-        TestFile outputBFile = testFile('build/b/file1.txt')
-        TestFile.Snapshot aSnapshot = outputAFile.snapshot()
-        TestFile.Snapshot bSnapshot = outputBFile.snapshot()
-
-        outputAFile.assertContents(equalTo('[content]'))
-        outputBFile.assertContents(equalTo('[[content]]'))
-
-        // No changes
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-
-        outputAFile.assertHasNotChangedSince(aSnapshot)
-        outputBFile.assertHasNotChangedSince(bSnapshot)
-
-        // Change content
-
-        testFile('src/file1.txt').write('new content')
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        outputAFile.assertHasChangedSince(aSnapshot)
-        outputBFile.assertHasChangedSince(bSnapshot)
-        outputAFile.assertContents(equalTo('[new content]'))
-        outputBFile.assertContents(equalTo('[[new content]]'))
-
-        // Add file
-
-        testFile('src/file2.txt').write('content2')
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        testFile('build/a/file2.txt').assertContents(equalTo('[content2]'))
-        testFile('build/b/file2.txt').assertContents(equalTo('[[content2]]'))
-
-        // Remove file
-
-        testFile('src/file1.txt').delete()
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':b')
-
-        // Output files already exist before using this version of Gradle
-        // delete .gradle dir to simulate this
-        testFile('.gradle').assertIsDir().deleteDir()
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        testFile('build/b').deleteDir()
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-    }
-
-    @Test
-    public void skipsTaskWhenInputPropertiesHaveNotChanged() {
-        testFile('build.gradle') << '''
-task a(type: org.gradle.integtests.GeneratorTask) {
-    text = project.text
-    outputFile = file('dest.txt')
-}
-'''
-
-        inTestDirectory().withTasks('a').withArguments('-Ptext=text').run().assertTasksExecuted(':a').assertTasksSkipped()
-
-        inTestDirectory().withTasks('a').withArguments('-Ptext=text', '-i').run().assertTasksExecuted(':a').assertTasksSkipped(':a')
-
-        inTestDirectory().withTasks('a').withArguments('-Ptext=newtext').run().assertTasksExecuted(':a').assertTasksSkipped()
-    }
-
-    @Test
-    public void multipleTasksCanGenerateIntoOverlappingOutputDirectories() {
-        testFile('build.gradle') << '''
-task a(type: org.gradle.integtests.DirTransformerTask) {
-    inputDir = file('src/a')
-    outputDir = file('build')
-}
-task b(type: org.gradle.integtests.DirTransformerTask) {
-    inputDir = file('src/b')
-    outputDir = file('build')
-}
-'''
-
-        testFile('src/a/file1.txt') << 'content'
-        testFile('src/b/file2.txt') << 'content'
-
-        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        // No changes
-
-        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-
-        // Delete an output file
-
-        testFile('build/file1.txt').delete()
-
-        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':b')
-
-        // Change an output file
-
-        testFile('build/file2.txt').write('something else')
-
-        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a')
-
-        // Change to new version of Gradle
-        // Simulate this by removing the .gradle dir
-        testFile('.gradle').assertIsDir().deleteDir()
-
-        inTestDirectory().withTasks('a', 'b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-
-        testFile('build').deleteDir()
-
-        inTestDirectory().withTasks('a').run().assertTasksExecuted(':a').assertTasksSkipped()
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':b').assertTasksSkipped()
-    }
-
-    @Test
-    public void canUseUpToDatePredicateToForceTaskToExecute() {
-        testFile('build.gradle') << '''
-task inputsAndOutputs {
-    inputs.files 'src.txt'
-    outputs.files 'src.a.txt'
-    outputs.upToDateWhen { project.hasProperty('uptodate') }
-    doFirst {
-        outputs.files.singleFile.text = "[${inputs.files.singleFile.text}]"
-    }
-}
-task noOutputs {
-    inputs.files 'src.txt'
-    outputs.upToDateWhen { project.hasProperty('uptodate') }
-    doFirst { }
-}
-task nothing {
-    outputs.upToDateWhen { project.hasProperty('uptodate') }
-    doFirst { }
-}
-'''
-        TestFile srcFile = testFile('src.txt')
-        srcFile.text = 'content'
-
-        // Task with input files, output files and a predicate
-        inTestDirectory().withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped()
-
-        // Is up to date
-        inTestDirectory().withArguments('-Puptodate').withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped(':inputsAndOutputs')
-
-        // Changed input file
-        srcFile.text = 'different'
-        inTestDirectory().withArguments('-Puptodate').withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped()
-
-        // Predicate is false
-        inTestDirectory().withTasks('inputsAndOutputs').run().assertTasksExecuted(':inputsAndOutputs').assertTasksSkipped()
-
-        // Task with input files and a predicate
-        inTestDirectory().withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped()
-
-        // Is up to date
-        inTestDirectory().withArguments('-Puptodate').withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped(':noOutputs')
-
-        // Changed input file
-        srcFile.text = 'different again'
-        inTestDirectory().withArguments('-Puptodate').withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped()
-
-        // Predicate is false
-        inTestDirectory().withTasks('noOutputs').run().assertTasksExecuted(':noOutputs').assertTasksSkipped()
-
-        // Task a predicate only
-        inTestDirectory().withTasks('nothing').run().assertTasksExecuted(':nothing').assertTasksSkipped()
-
-        // Is up to date
-        inTestDirectory().withArguments('-Puptodate').withTasks('nothing').run().assertTasksExecuted(':nothing').assertTasksSkipped(':nothing')
-
-        // Predicate is false
-        inTestDirectory().withTasks('nothing').run().assertTasksExecuted(':nothing').assertTasksSkipped()
-    }
-
-    @Test
-    public void lifecycleTaskIsUpToDateWhenAllDependenciesAreSkipped() {
-        testFile('build.gradle') << '''
-task a(type: org.gradle.integtests.TransformerTask) {
-    inputFile = file('src.txt')
-    outputFile = file('out.txt')
-}
-task b(dependsOn: a)
-'''
-
-        testFile('src.txt').text = 'content'
-
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped()
-        inTestDirectory().withTasks('b').run().assertTasksExecuted(':a', ':b').assertTasksSkipped(':a', ':b')
-    }
-
-    @Test
-    public void canShareArtifactsBetweenBuilds() {
-        testFile('build.gradle') << '''
-task otherBuild(type: GradleBuild) {
-    buildFile = 'other.gradle'
-    tasks = ['generate']
-    startParameter.searchUpwards = false
-}
-task transform(type: org.gradle.integtests.TransformerTask) {
-    dependsOn otherBuild
-    inputFile = file('generated.txt')
-    outputFile = file('out.txt')
-}
-'''
-        testFile('other.gradle') << '''
-task generate(type: org.gradle.integtests.TransformerTask) {
-    inputFile = file('src.txt')
-    outputFile = file('generated.txt')
-}
-'''
-        testFile('src.txt').text = 'content'     
-        inTestDirectory().withTasks('transform').run().assertTasksExecuted(':otherBuild', ':transform').assertTasksSkipped()
-        inTestDirectory().withTasks('transform').run().assertTasksExecuted(':otherBuild', ':transform').assertTasksSkipped(':transform')
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IvyPublishIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IvyPublishIntegrationTest.java
deleted file mode 100644
index ef4e6cf..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/IvyPublishIntegrationTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import org.gradle.integtests.fixtures.GradleDistribution;
-import org.gradle.integtests.fixtures.GradleDistributionExecuter;
-import org.gradle.integtests.fixtures.Sample;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-public class IvyPublishIntegrationTest {
-    @Rule
-    public final GradleDistribution dist = new GradleDistribution();
-    @Rule
-    public final GradleDistributionExecuter executer = new GradleDistributionExecuter();
-    @Rule
-    public final Sample sample = new Sample("ivypublish");
-
-    @Test
-    public void testResolve() {
-        // the actual testing is done in the build script.
-        File projectDir = sample.getDir();
-        executer.inDirectory(projectDir).withTasks("clean", "uploadArchives").run();
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JUnitIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JUnitIntegrationTest.groovy
deleted file mode 100644
index a678bd8..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/JUnitIntegrationTest.groovy
+++ /dev/null
@@ -1,378 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.*
-import static org.gradle.util.Matchers.*
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-
- at RunWith(DistributionIntegrationTestRunner.class)
-public class JUnitIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final TestResources resources = new TestResources()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    @Test
-    public void executesTestsInCorrectEnvironment() {
-        TestFile testDir = dist.testDir;
-        executer.withTasks('build').run();
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir)
-        result.assertTestClassesExecuted('org.gradle.OkTest', 'org.gradle.OtherTest')
-        result.testClass('org.gradle.OkTest').assertTestPassed('ok')
-        result.testClass('org.gradle.OkTest').assertStdout(containsString('This is test stdout'))
-        result.testClass('org.gradle.OkTest').assertStdout(containsString('no EOL'))
-        result.testClass('org.gradle.OkTest').assertStdout(containsString('class loaded'))
-        result.testClass('org.gradle.OkTest').assertStdout(containsString('test constructed'))
-        result.testClass('org.gradle.OkTest').assertStdout(containsString('stdout from another thread'))
-        result.testClass('org.gradle.OkTest').assertStderr(containsString('This is test stderr'))
-        result.testClass('org.gradle.OkTest').assertStderr(containsString('this is a warning'))
-        result.testClass('org.gradle.OtherTest').assertTestPassed('ok')
-        result.testClass('org.gradle.OtherTest').assertStdout(containsString('This is other stdout'))
-        result.testClass('org.gradle.OtherTest').assertStdout(containsString('other class loaded'))
-        result.testClass('org.gradle.OtherTest').assertStdout(containsString('other test constructed'))
-        result.testClass('org.gradle.OtherTest').assertStderr(containsString('This is other stderr'))
-        result.testClass('org.gradle.OtherTest').assertStderr(containsString('this is another warning'))
-    }
-
-    @Test
-    public void canRunJunit3Tests() {
-        executer.withTasks('check').withArguments('-PjunitVersion=4.8.1').run()
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.Test1')
-        result.testClass('org.gradle.Test1').assertTestPassed('testRenamesItself')
-
-        executer.withTasks('clean', 'check').withArguments('-PjunitVersion=3.8').run()
-
-        result = new JUnitTestExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.Test1')
-        result.testClass('org.gradle.Test1').assertTestPassed('testRenamesItself')
-    }
-
-    @Test
-    public void reportsAndBreaksBuildWhenTestFails() {
-        TestFile testDir = dist.getTestDir();
-        TestFile buildFile = testDir.file('build.gradle');
-        ExecutionFailure failure = executer.withTasks('build').runWithFailure();
-
-        failure.assertHasFileName("Build file '${buildFile}'");
-        failure.assertHasDescription("Execution failed for task ':test'.");
-        failure.assertThatCause(startsWith('There were failing tests.'));
-
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenTest FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenBefore FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenAfter FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenBeforeAndAfter FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenBeforeClass FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenAfterClass FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenConstructor FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.BrokenException FAILED'));
-        assertThat(failure.getError(), containsLine('Test org.gradle.Unloadable FAILED'));
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir)
-        result.assertTestClassesExecuted(
-                'org.gradle.BrokenTest',
-                'org.gradle.BrokenBefore',
-                'org.gradle.BrokenAfter',
-                'org.gradle.BrokenBeforeClass',
-                'org.gradle.BrokenAfterClass',
-                'org.gradle.BrokenBeforeAndAfter',
-                'org.gradle.BrokenConstructor',
-                'org.gradle.BrokenException',
-                'org.gradle.Unloadable')
-        result.testClass('org.gradle.BrokenTest').assertTestFailed('failure', equalTo('java.lang.AssertionError: failed'))
-        result.testClass('org.gradle.BrokenTest').assertTestFailed('broken', equalTo('java.lang.IllegalStateException'))
-        result.testClass('org.gradle.BrokenBeforeClass').assertTestFailed('classMethod', equalTo('java.lang.AssertionError: failed'))
-        result.testClass('org.gradle.BrokenAfterClass').assertTestFailed('classMethod', equalTo('java.lang.AssertionError: failed'))
-        result.testClass('org.gradle.BrokenBefore').assertTestFailed('ok', equalTo('java.lang.AssertionError: failed'))
-        result.testClass('org.gradle.BrokenAfter').assertTestFailed('ok', equalTo('java.lang.AssertionError: failed'))
-        result.testClass('org.gradle.BrokenBeforeAndAfter').assertTestFailed('ok', equalTo('java.lang.AssertionError: before failed'), equalTo('java.lang.AssertionError: after failed'))
-        result.testClass('org.gradle.BrokenConstructor').assertTestFailed('ok', equalTo('java.lang.AssertionError: failed'))
-        result.testClass('org.gradle.BrokenException').assertTestFailed('broken', startsWith('Could not determine failure message for exception of type org.gradle.BrokenException$BrokenRuntimeException: '))
-        result.testClass('org.gradle.Unloadable').assertTestFailed('initializationError', equalTo('java.lang.AssertionError: failed'))
-    }
-
-    @Test
-    public void canRunSingleTests() {
-        executer.withTasks('test').withArguments('-Dtest.single=Ok2').run()
-        def result = new JUnitTestExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('Ok2')
-
-        executer.withTasks('cleanTest', 'test').withArguments('-Dtest.single=Ok').run()
-        result.assertTestClassesExecuted('Ok', 'Ok2')
-
-        def failure = executer.withTasks('test').withArguments('-Dtest.single=DoesNotMatchAClass').runWithFailure()
-        failure.assertHasCause('Could not find matching test for pattern: DoesNotMatchAClass')
-
-        failure = executer.withTasks('test').withArguments('-Dtest.single=NotATest').runWithFailure()
-        failure.assertHasCause('Could not find matching test for pattern: NotATest')
-    }
-
-    @Test
-    public void canUseTestSuperClassesFromAnotherProject() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file('settings.gradle').write("include 'a', 'b'");
-        testDir.file('b/build.gradle') << '''
-            apply plugin: 'java'
-            repositories { mavenCentral() }
-            dependencies { compile 'junit:junit:4.7' }
-        '''
-        testDir.file('b/src/main/java/org/gradle/AbstractTest.java') << '''
-            package org.gradle;
-            public abstract class AbstractTest {
-                @org.junit.Test public void ok() { }
-            }
-        '''
-        TestFile buildFile = testDir.file('a/build.gradle');
-        buildFile << '''
-            apply plugin: 'java'
-            repositories { mavenCentral() }
-            dependencies { testCompile project(':b') }
-        '''
-        testDir.file('a/src/test/java/org/gradle/SomeTest.java') << '''
-            package org.gradle;
-            public class SomeTest extends AbstractTest {
-            }
-        '''
-
-        executer.withTasks('a:test').run();
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir.file('a'))
-        result.assertTestClassesExecuted('org.gradle.SomeTest')
-        result.testClass('org.gradle.SomeTest').assertTestPassed('ok')
-    }
-
-    @Test
-    public void canExcludeSuperClassesFromExecution() {
-        TestFile testDir = dist.getTestDir();
-        TestFile buildFile = testDir.file('build.gradle');
-        buildFile << '''
-            apply plugin: 'java'
-            repositories { mavenCentral() }
-            dependencies { testCompile 'junit:junit:4.7' }
-            test { exclude '**/BaseTest.*' }
-        '''
-        testDir.file('src/test/java/org/gradle/BaseTest.java') << '''
-            package org.gradle;
-            public class BaseTest {
-                @org.junit.Test public void ok() { }
-            }
-        '''
-        testDir.file('src/test/java/org/gradle/SomeTest.java') << '''
-            package org.gradle;
-            public class SomeTest extends BaseTest {
-            }
-        '''
-
-        executer.withTasks('test').run();
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(testDir)
-        result.assertTestClassesExecuted('org.gradle.SomeTest')
-        result.testClass('org.gradle.SomeTest').assertTestPassed('ok')
-    }
-
-    @Test
-    public void detectsTestClasses() {
-        executer.withTasks('test').run()
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.EmptyRunWithSubclass', 'org.gradle.TestsOnInner', 'org.gradle.TestsOnInner$SomeInner')
-        result.testClass('org.gradle.EmptyRunWithSubclass').assertTestsExecuted('ok')
-        result.testClass('org.gradle.EmptyRunWithSubclass').assertTestPassed('ok')
-        result.testClass('org.gradle.TestsOnInner').assertTestPassed('ok')
-        result.testClass('org.gradle.TestsOnInner$SomeInner').assertTestPassed('ok')
-    }
-
-    @Test
-    public void runsAllTestsInTheSameForkedJvm() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file('build.gradle').writelns(
-                "apply plugin: 'java'",
-                "repositories { mavenCentral() }",
-                "dependencies { compile 'junit:junit:4.7' }"
-        );
-        testDir.file('src/test/java/org/gradle/AbstractTest.java').writelns(
-                "package org.gradle;",
-                "public abstract class AbstractTest {",
-                "    @org.junit.Test public void ok() {",
-                "        long time = java.lang.management.ManagementFactory.getRuntimeMXBean().getStartTime();",
-                "        System.out.println(String.format(\"VM START TIME = %s\", time));",
-                "    }",
-                "}");
-        testDir.file('src/test/java/org/gradle/SomeTest.java').writelns(
-                "package org.gradle;",
-                "public class SomeTest extends AbstractTest {",
-                "}");
-        testDir.file('src/test/java/org/gradle/SomeTest2.java').writelns(
-                "package org.gradle;",
-                "public class SomeTest2 extends AbstractTest {",
-                "}");
-
-        executer.withTasks('test').run();
-
-        TestFile results1 = testDir.file('build/test-results/TEST-org.gradle.SomeTest.xml');
-        TestFile results2 = testDir.file('build/test-results/TEST-org.gradle.SomeTest2.xml');
-        results1.assertIsFile();
-        results2.assertIsFile();
-        assertThat(results1.linesThat(containsString('VM START TIME =')).get(0), equalTo(results2.linesThat(containsString('VM START TIME =')).get(0)));
-    }
-
-    @Test
-    public void canSpecifyMaximumNumberOfTestClassesToExecuteInAForkedJvm() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file('build.gradle').writelns(
-                "apply plugin: 'java'",
-                "repositories { mavenCentral() }",
-                "dependencies { compile 'junit:junit:4.7' }",
-                "test.forkEvery = 1"
-        );
-        testDir.file('src/test/java/org/gradle/AbstractTest.java').writelns(
-                "package org.gradle;",
-                "public abstract class AbstractTest {",
-                "    @org.junit.Test public void ok() {",
-                "        long time = java.lang.management.ManagementFactory.getRuntimeMXBean().getStartTime();",
-                "        System.out.println(String.format(\"VM START TIME = %s\", time));",
-                "    }",
-                "}");
-        testDir.file('src/test/java/org/gradle/SomeTest.java').writelns(
-                "package org.gradle;",
-                "public class SomeTest extends AbstractTest {",
-                "}");
-        testDir.file('src/test/java/org/gradle/SomeTest2.java').writelns(
-                "package org.gradle;",
-                "public class SomeTest2 extends AbstractTest {",
-                "}");
-
-        executer.withTasks('test').run();
-
-        TestFile results1 = testDir.file('build/test-results/TEST-org.gradle.SomeTest.xml');
-        TestFile results2 = testDir.file('build/test-results/TEST-org.gradle.SomeTest2.xml');
-        results1.assertIsFile();
-        results2.assertIsFile();
-        assertThat(results1.linesThat(containsString('VM START TIME =')).get(0), not(equalTo(results2.linesThat(
-                containsString('VM START TIME =')).get(0))));
-    }
-
-    @Test
-    public void canListenForTestResults() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file('src/main/java/AppException.java').writelns(
-                "public class AppException extends Exception { }"
-        );
-
-        testDir.file('src/test/java/SomeTest.java').writelns(
-                "public class SomeTest {",
-                "@org.junit.Test public void fail() { org.junit.Assert.fail(\"message\"); }",
-                "@org.junit.Test public void knownError() { throw new RuntimeException(\"message\"); }",
-                "@org.junit.Test public void unknownError() throws AppException { throw new AppException(); }",
-                "}"
-        );
-        testDir.file('src/test/java/SomeOtherTest.java').writelns(
-                "public class SomeOtherTest {",
-                "@org.junit.Test public void pass() { }",
-                "}"
-        );
-
-        testDir.file('build.gradle') << '''
-            apply plugin: 'java'
-            repositories { mavenCentral() }
-            dependencies { testCompile 'junit:junit:4.7' }
-            def listener = new TestListenerImpl()
-            test.addTestListener(listener)
-            test.ignoreFailures = true
-            class TestListenerImpl implements TestListener {
-                void beforeSuite(TestDescriptor suite) { println "START [$suite] [$suite.name]" }
-                void afterSuite(TestDescriptor suite, TestResult result) { println "FINISH [$suite] [$suite.name] [$result.resultType] [$result.testCount]" }
-                void beforeTest(TestDescriptor test) { println "START [$test] [$test.name]" }
-                void afterTest(TestDescriptor test, TestResult result) { println "FINISH [$test] [$test.name] [$result.resultType] [$result.testCount] [$result.exception]" }
-            }
-        '''
-
-        ExecutionResult result = executer.withTasks("test").run();
-        assertThat(result.getOutput(), containsLine("START [tests] []"));
-        assertThat(result.getOutput(), containsLine("FINISH [tests] [] [FAILURE] [4]"));
-
-        assertThat(result.getOutput(), containsLine("START [test process 'Gradle Worker 1'] [Gradle Worker 1]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test process 'Gradle Worker 1'] [Gradle Worker 1] [FAILURE] [4]"));
-
-        assertThat(result.getOutput(), containsLine("START [test class SomeOtherTest] [SomeOtherTest]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test class SomeOtherTest] [SomeOtherTest] [SUCCESS] [1]"));
-        assertThat(result.getOutput(), containsLine("START [test pass(SomeOtherTest)] [pass]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test pass(SomeOtherTest)] [pass] [SUCCESS] [1] [null]"));
-
-        assertThat(result.getOutput(), containsLine("START [test class SomeTest] [SomeTest]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test class SomeTest] [SomeTest] [FAILURE] [3]"));
-        assertThat(result.getOutput(), containsLine("START [test fail(SomeTest)] [fail]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test fail(SomeTest)] [fail] [FAILURE] [1] [java.lang.AssertionError: message]"));
-        assertThat(result.getOutput(), containsLine("START [test knownError(SomeTest)] [knownError]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test knownError(SomeTest)] [knownError] [FAILURE] [1] [java.lang.RuntimeException: message]"));
-        assertThat(result.getOutput(), containsLine("START [test unknownError(SomeTest)] [unknownError]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test unknownError(SomeTest)] [unknownError] [FAILURE] [1] [org.gradle.messaging.remote.internal.PlaceholderException: AppException: null]"));
-    }
-
-    @Test
-    public void canListenForTestResultsWhenJUnit3IsUsed() {
-        TestFile testDir = dist.getTestDir();
-        testDir.file('src/test/java/SomeTest.java').writelns(
-                "public class SomeTest extends junit.framework.TestCase {",
-                "public void testPass() { }",
-                "public void testFail() { junit.framework.Assert.fail(\"message\"); }",
-                "public void testError() { throw new RuntimeException(\"message\"); }",
-                "}"
-        );
-
-        testDir.file('build.gradle') << '''
-            apply plugin: 'java'
-            repositories { mavenCentral() }
-            dependencies { testCompile 'junit:junit:3.8' }
-            def listener = new TestListenerImpl()
-            test.addTestListener(listener)
-            test.ignoreFailures = true
-            class TestListenerImpl implements TestListener {
-                void beforeSuite(TestDescriptor suite) { println "START [$suite] [$suite.name]" }
-                void afterSuite(TestDescriptor suite, TestResult result) { println "FINISH [$suite] [$suite.name]" }
-                void beforeTest(TestDescriptor test) { println "START [$test] [$test.name]" }
-                void afterTest(TestDescriptor test, TestResult result) { println "FINISH [$test] [$test.name] [$result.exception]" }
-            }
-        '''
-
-        ExecutionResult result = executer.withTasks("test").run();
-        assertThat(result.getOutput(), containsLine("START [test class SomeTest] [SomeTest]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test class SomeTest] [SomeTest]"));
-        assertThat(result.getOutput(), containsLine("START [test testPass(SomeTest)] [testPass]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test testPass(SomeTest)] [testPass] [null]"));
-        assertThat(result.getOutput(), containsLine("START [test testFail(SomeTest)] [testFail]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test testFail(SomeTest)] [testFail] [junit.framework.AssertionFailedError: message]"));
-        assertThat(result.getOutput(), containsLine("START [test testError(SomeTest)] [testError]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test testError(SomeTest)] [testError] [java.lang.RuntimeException: message]"));
-    }
-
-    @Test
-    public void canHaveMultipleTestTaskInstances() {
-        executer.withTasks('check').run()
-
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.Test1', 'org.gradle.Test2')
-        result.testClass('org.gradle.Test1').assertTestPassed('ok')
-        result.testClass('org.gradle.Test2').assertTestPassed('ok')
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/LoggingIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/LoggingIntegrationTest.groovy
deleted file mode 100644
index 168873f..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/LoggingIntegrationTest.groovy
+++ /dev/null
@@ -1,345 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import junit.framework.AssertionFailedError
-import org.gradle.integtests.fixtures.ExecutionResult
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.integtests.fixtures.UsesSample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class LoggingIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final TestResources resources = new TestResources()
-    @Rule public final Sample sampleResources = new Sample()
-
-    private final LogOutput logOutput = new LogOutput() {{
-        quiet(
-                'An info log message which is always logged.',
-                'A message which is logged at QUIET level',
-                'Text which is logged at QUIET level',
-                'A task message which is logged at QUIET level',
-                'quietProject2ScriptClassPathOut',
-                'quietProject2CallbackOut',
-                'settings quiet out',
-                'init QUIET out',
-                'init callback quiet out',
-                'buildSrc quiet',
-                'nestedBuild/buildSrc quiet',
-                'nestedBuild quiet',
-                'nestedBuild task quiet',
-                'external QUIET message')
-        error(
-                'An error log message.',
-                'An error message which is logged at ERROR level',
-                'external ERROR error message',
-                '[ant:echo] An error message logged from Ant',
-                'A severe log message logged using JUL',
-                'init ERROR err'
-        )
-        warning(
-                'A warning log message.',
-                'A task error message which is logged at WARN level',
-                '[ant:echo] A warn message logged from Ant',
-                'A warning log message logged using JUL'
-        )
-        lifecycle(
-                'A lifecycle info log message.',
-                'An error message which is logged at LIFECYCLE level',
-                'A task message which is logged at LIFECYCLE level',
-                'settings lifecycle log',
-                'init lifecycle log',
-                'external LIFECYCLE error message',
-                'external LIFECYCLE log message',
-                'LOGGER: evaluating :',
-                'LOGGER: evaluating :project1',
-                'LOGGER: evaluating :project2',
-                'LOGGER: executing :project1:logInfo',
-                'LOGGER: executing :project1:logLifecycle',
-                'LOGGER: executing :project1:nestedBuildLog',
-                'LOGGER: executing :project1:log',
-                ':buildSrc:classes',
-                ':nestedBuild:log'
-        )
-        info(
-                'An info log message.',
-                'A message which is logged at INFO level',
-                'Text which is logged at INFO level',
-                'A task message which is logged at INFO level',
-                '[ant:echo] An info message logged from Ant',
-                'An info log message logged using SLF4j',
-                'An info log message logged using JCL',
-                'An info log message logged using Log4j',
-                'An info log message logged using JUL',
-                'A config log message logged using JUL',
-                'infoProject2Out',
-                'infoProject2ScriptClassPathOut',
-                'settings info out',
-                'settings info log',
-                'init INFO out',
-                'init INFO err',
-                'init info log',
-                'LOGGER: build finished',
-                'LOGGER: evaluated project',
-                'LOGGER: executed task',
-                'LOGGER: task starting work',
-                'LOGGER: task completed work',
-                'buildSrc info',
-                'nestedBuild/buildSrc info',
-                'nestedBuild info',
-                'external INFO message'
-        )
-        debug(
-                'A debug log message.',
-                '[ant:echo] A debug message logged from Ant',
-                'A fine log message logged using JUL'
-        )
-        trace(
-                'A trace log message.'
-        )
-        forbidden(
-                // the default message generated by JUL
-                'INFO: An info log message logged using JUL',
-                // the custom logger should override this
-                'BUILD SUCCESSFUL'
-        )
-    }}
-
-    private final LogOutput sample = new LogOutput() {{
-        error('An error log message.')
-        quiet('An info log message which is always logged.')
-        quiet('A message which is logged at QUIET level')
-        warning('A warning log message.')
-        lifecycle('A lifecycle info log message.')
-        info('An info log message.')
-        info('A message which is logged at INFO level')
-        info('A task message which is logged at INFO level')
-        info('An info log message logged using SLF4j')
-        debug('A debug log message.')
-        forbidden('A trace log message.')
-    }}
-
-    private final LogOutput multiThreaded = new LogOutput() {{
-        (1..10).each { thread ->
-            (1..100).each { iteration ->
-                lifecycle("log message from thread $thread iteration $iteration")
-                quiet("stdout message from thread $thread iteration $iteration")
-                quiet("styled text message from thread $thread iteration $iteration")
-            }
-        }
-    }}
-
-    @Test
-    public void quietLogging() {
-        checkOutput(this.&run, logOutput.quiet)
-    }
-
-    @Test
-    public void lifecycleLogging() {
-        checkOutput(this.&run, logOutput.lifecycle)
-    }
-
-    @Test
-    public void infoLogging() {
-        checkOutput(this.&run, logOutput.info)
-    }
-
-    @Test
-    public void debugLogging() {
-        checkOutput(this.&run, logOutput.debug)
-    }
-
-    @Test @UsesSample('userguide/tutorial/logging')
-    public void sampleQuietLogging() {
-        checkOutput(this.&runSample, sample.quiet)
-    }
-
-    @Test @UsesSample('userguide/tutorial/logging')
-    public void sampleLifecycleLogging() {
-        checkOutput(this.&runSample, sample.lifecycle)
-    }
-
-    @Test @UsesSample('userguide/tutorial/logging')
-    public void sampleInfoLogging() {
-        checkOutput(this.&runSample, sample.info)
-    }
-
-    @Test @UsesSample('userguide/tutorial/logging')
-    public void sampleDebugLogging() {
-        checkOutput(this.&runSample, sample.debug)
-    }
-
-    @Test
-    public void multiThreadedQuietLogging() {
-        checkOutput(this.&runMultiThreaded, multiThreaded.quiet)
-    }
-
-    @Test
-    public void multiThreadedlifecycleLogging() {
-        checkOutput(this.&runMultiThreaded, multiThreaded.lifecycle)
-    }
-
-    @Test
-    public void multiThreadedDebugLogging() {
-        checkOutput(this.&runMultiThreaded, multiThreaded.debug)
-    }
-
-    def run(LogLevel level) {
-        resources.maybeCopy('LoggingIntegrationTest/logging')
-        TestFile loggingDir = dist.testDir
-        loggingDir.file("buildSrc/build/.gradle").deleteDir()
-        loggingDir.file("nestedBuild/buildSrc/.gradle").deleteDir()
-
-        String initScript = new File(loggingDir, 'init.gradle').absolutePath
-        String[] allArgs = level.args + ['-I', initScript]
-        return executer.inDirectory(loggingDir).withArguments(allArgs).withTasks('log').run()
-    }
-
-    def runMultiThreaded(LogLevel level) {
-        resources.maybeCopy('LoggingIntegrationTest/multiThreaded')
-        return executer.withArguments(level.args).withTasks('log').run()
-    }
-    
-    def runSample(LogLevel level) {
-        return executer.inDirectory(sampleResources.dir).withArguments(level.args).withTasks('log').run()
-    }
-
-    void checkOutput(Closure run, LogLevel level) {
-        ExecutionResult result = run.call(level)
-        level.checkOuts(result)
-    }
-}
-
-class LogLevel {
-    List args
-    List infoMessages
-    List errorMessages
-    List allMessages
-    Closure matchPartialLine = {expected, actual -> expected == actual }
-
-    def getForbiddenMessages() {
-        allMessages - (infoMessages + errorMessages)
-    }
-
-    def checkOuts(ExecutionResult result) {
-        infoMessages.each {List messages ->
-            checkOuts(true, result.output, messages, matchPartialLine)
-        }
-        errorMessages.each {List messages ->
-            checkOuts(true, result.error, messages, matchPartialLine)
-        }
-        forbiddenMessages.each {List messages ->
-            checkOuts(false, result.output, messages) {expected, actual-> actual.contains(expected)}
-            checkOuts(false, result.error, messages) {expected, actual-> actual.contains(expected)}
-        }
-    }
-
-    def checkOuts(boolean shouldContain, String result, List outs, Closure partialLine) {
-        outs.each {String expectedOut ->
-            boolean found = result.readLines().find {partialLine.call(expectedOut, it)}
-            if (!found && shouldContain) {
-                throw new AssertionFailedError("Could not find expected line '$expectedOut' in output:\n$result")
-            }
-            if (found && !shouldContain) {
-                throw new AssertionFailedError("Found unexpected line '$expectedOut' in output:\n$result")
-            }
-        }
-    }
-}
-
-class LogOutput {
-    final List quietMessages = []
-    final List errorMessages = []
-    final List warningMessages = []
-    final List lifecycleMessages = []
-    final List infoMessages = []
-    final List debugMessages = []
-    final List traceMessages = []
-    final List forbiddenMessages = []
-    final List allOuts = [
-            errorMessages,
-            quietMessages,
-            warningMessages,
-            lifecycleMessages,
-            infoMessages,
-            debugMessages,
-            traceMessages,
-            forbiddenMessages
-    ]
-
-    def quiet(String... msgs) {
-        quietMessages.addAll(msgs)
-    }
-    def error(String... msgs) {
-        errorMessages.addAll(msgs)
-    }
-    def warning(String... msgs) {
-        warningMessages.addAll(msgs)
-    }
-    def lifecycle(String... msgs) {
-        warningMessages.addAll(msgs)
-    }
-    def info(String... msgs) {
-        infoMessages.addAll(msgs)
-    }
-    def debug(String... msgs) {
-        debugMessages.addAll(msgs)
-    }
-    def trace(String... msgs) {
-        traceMessages.addAll(msgs)
-    }
-    def forbidden(String... msgs) {
-        forbiddenMessages.addAll(msgs)
-    }
-
-    final LogLevel quiet = new LogLevel(
-            args: ['-q'],
-            infoMessages: [quietMessages],
-            errorMessages: [errorMessages],
-            allMessages: allOuts
-    )
-    final LogLevel lifecycle = new LogLevel(
-            args: [],
-            infoMessages: [quietMessages, warningMessages, lifecycleMessages],
-            errorMessages: [errorMessages],
-            allMessages: allOuts
-    )
-    final LogLevel info = new LogLevel(
-            args: ['-i'],
-            infoMessages: [quietMessages, warningMessages, lifecycleMessages, infoMessages],
-            errorMessages: [errorMessages],
-            allMessages: allOuts
-    )
-    final LogLevel debug = new LogLevel(
-            args: ['-d'],
-            infoMessages: [quietMessages, warningMessages, lifecycleMessages, infoMessages, debugMessages],
-            errorMessages: [errorMessages],
-            allMessages: allOuts,
-            matchPartialLine: {expected, actual -> actual.endsWith(expected) /*&& actual =~ /\[.+?\] \[.+?\] .+/ */}
-    )
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/OsgiProjectSampleIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/OsgiProjectSampleIntegrationTest.groovy
deleted file mode 100644
index 43ec6cd..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/OsgiProjectSampleIntegrationTest.groovy
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import java.util.jar.Manifest
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.util.GradleVersion
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class OsgiProjectSampleIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('osgi')
-
-    @Test
-    public void osgiProjectSamples() {
-        long start = System.currentTimeMillis()
-        TestFile osgiProjectDir = sample.dir
-        executer.inDirectory(osgiProjectDir).withTasks('clean', 'assemble').run()
-        TestFile tmpDir = dist.testDir
-        osgiProjectDir.file('build/libs/osgi-1.0.jar').unzipTo(tmpDir)
-        tmpDir.file('META-INF/MANIFEST.MF').withInputStream { InputStream instr ->
-            Manifest manifest = new Manifest(instr)
-            checkManifest(manifest, start)
-        }
-    }
-
-    static void checkManifest(Manifest manifest, start) {
-        assertEquals('Example Gradle Activator', manifest.mainAttributes.getValue('Bundle-Name'))
-        assertEquals('2', manifest.mainAttributes.getValue('Bundle-ManifestVersion'))
-        assertEquals('Bnd-0.0.384', manifest.mainAttributes.getValue('Tool'))
-        assertTrue(start <= Long.parseLong(manifest.mainAttributes.getValue('Bnd-LastModified')))
-        assertEquals('1.0', manifest.mainAttributes.getValue('Bundle-Version'))
-        assertEquals('gradle_tooling.osgi', manifest.mainAttributes.getValue('Bundle-SymbolicName'))
-        assertEquals( new GradleVersion().version, manifest.mainAttributes.getValue('Built-By'))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ProjectLayoutIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ProjectLayoutIntegrationTest.groovy
deleted file mode 100644
index dcc11d2..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/ProjectLayoutIntegrationTest.groovy
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class ProjectLayoutIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final TestResources resources = new TestResources()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    @Test
-    public void canHaveSomeSourceAndResourcesInSameDirectoryAndSomeInDifferentDirectories() {
-        dist.testFile('settings.gradle') << 'rootProject.name = "sharedSource"'
-        dist.testFile('build.gradle') << '''
-apply plugin: 'java'
-apply plugin: 'groovy'
-apply plugin: 'scala'
-
-repositories {
-    mavenRepo urls: 'http://scala-tools.org/repo-releases/'
-    mavenCentral()
-}
-dependencies {
-    groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.6.0'
-    scalaTools group: 'org.scala-lang', name: 'scala-compiler', version: '2.8.1'
-    scalaTools group: 'org.scala-lang', name: 'scala-library', version: '2.8.1'
-
-    compile group: 'org.scala-lang', name: 'scala-library', version: '2.8.1'
-}
-
-sourceSets.each {
-    configure(it) {
-        resources.srcDir 'src'
-        resources.srcDir 'src/resources'
-        resources.include "org/gradle/$name/**"
-        java.srcDir 'src'
-        java.srcDir 'src/java'
-        java.include "org/gradle/$name/**"
-        groovy.srcDir 'src'
-        groovy.srcDir 'src/groovy'
-        groovy.include "org/gradle/$name/**"
-        scala.srcDir 'src'
-        scala.srcDir 'src/scala'
-        scala.include "org/gradle/$name/**"
-    }
-}
-'''
-        dist.testFile('src/org/gradle/main/resource.txt') << 'some text'
-        dist.testFile('src/org/gradle/test/resource.txt') << 'some text'
-        dist.testFile('src/resources/org/gradle/main/resource2.txt') << 'some text'
-        dist.testFile('src/resources/org/gradle/test/resource2.txt') << 'some text'
-        dist.testFile('src/org/gradle/main/JavaClass.java') << 'package org.gradle; public class JavaClass { }'
-        dist.testFile('src/org/gradle/test/JavaClassTest.java') << 'package org.gradle; class JavaClassTest { JavaClass c = new JavaClass(); }'
-        dist.testFile('src/java/org/gradle/main/JavaClass2.java') << 'package org.gradle; class JavaClass2 { }'
-        dist.testFile('src/java/org/gradle/test/JavaClassTest2.java') << 'package org.gradle; class JavaClassTest2 { JavaClass c = new JavaClass(); }'
-        dist.testFile('src/org/gradle/main/GroovyClass.groovy') << 'package org.gradle; class GroovyClass { }'
-        dist.testFile('src/org/gradle/test/GroovyClassTest.groovy') << 'package org.gradle; class GroovyClassTest { GroovyClass c = new GroovyClass() }'
-        dist.testFile('src/groovy/org/gradle/main/GroovyClass2.groovy') << 'package org.gradle; class GroovyClass2 { }'
-        dist.testFile('src/groovy/org/gradle/test/GroovyClassTest2.groovy') << 'package org.gradle; class GroovyClassTest2 { GroovyClass c = new GroovyClass() }'
-        dist.testFile('src/org/gradle/main/ScalaClass.scala') << 'package org.gradle; class ScalaClass { }'
-        dist.testFile('src/org/gradle/test/ScalaClassTest.scala') << 'package org.gradle; class ScalaClassTest { val c: ScalaClass = new ScalaClass() }'
-        dist.testFile('src/scala/org/gradle/main/ScalaClass2.scala') << 'package org.gradle; class ScalaClass2 { }'
-        dist.testFile('src/scala/org/gradle/test/ScalaClassTest2.scala') << 'package org.gradle; class ScalaClassTest2 { val c: ScalaClass = new ScalaClass() }'
-
-        executer.withTasks('build').run()
-
-        File buildDir = dist.testFile('build')
-
-        buildDir.file('classes/main').assertHasDescendants(
-                'org/gradle/main/resource.txt',
-                'org/gradle/main/resource2.txt',
-                'org/gradle/JavaClass.class',
-                'org/gradle/JavaClass2.class',
-                'org/gradle/GroovyClass.class',
-                'org/gradle/GroovyClass2.class',
-                'org/gradle/ScalaClass.class',
-                'org/gradle/ScalaClass2.class'
-        )
-
-        buildDir.file('classes/test').assertHasDescendants(
-                'org/gradle/test/resource.txt',
-                'org/gradle/test/resource2.txt',
-                'org/gradle/JavaClassTest.class',
-                'org/gradle/JavaClassTest2.class',
-                'org/gradle/GroovyClassTest.class',
-                'org/gradle/GroovyClassTest2.class',
-                'org/gradle/ScalaClassTest.class',
-                'org/gradle/ScalaClassTest2.class'
-        )
-
-        TestFile tmpDir = dist.testFile('jarContents')
-        buildDir.file('libs/sharedSource.jar').unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/main/resource.txt',
-                'org/gradle/main/resource2.txt',
-                'org/gradle/JavaClass.class',
-                'org/gradle/JavaClass2.class',
-                'org/gradle/GroovyClass.class',
-                'org/gradle/GroovyClass2.class',
-                'org/gradle/ScalaClass.class',
-                'org/gradle/ScalaClass2.class'
-        )
-
-        executer.withTasks('javadoc', 'groovydoc', 'scaladoc').run()
-
-        buildDir.file('docs/javadoc/index.html').assertIsFile()
-        buildDir.file('docs/groovydoc/index.html').assertIsFile()
-        buildDir.file('docs/scaladoc/index.html').assertIsFile()
-    }
-
-    @Test
-    public void multipleProjectsCanShareTheSameSourceDirectory() {
-        dist.testFile('settings.gradle') << 'include "a", "b"'
-        dist.testFile('a/build.gradle') << '''
-apply plugin: 'java'
-sourceSets.main.java {
-    srcDirs '../src'
-    include 'org/gradle/a/**'
-}
-'''
-        dist.testFile('b/build.gradle') << '''
-apply plugin: 'java'
-dependencies { compile project(':a') }
-sourceSets.main.java {
-    srcDirs '../src'
-    include 'org/gradle/b/**'
-}
-'''
-
-        dist.testFile('src/org/gradle/a/ClassA.java') << 'package org.gradle.a; public class ClassA { }'
-        dist.testFile('src/org/gradle/b/ClassB.java') << 'package org.gradle.b; public class ClassB { private org.gradle.a.ClassA field; }'
-
-        executer.withTasks('clean', 'assemble').run()
-
-        dist.testFile('a/build/classes/main').assertHasDescendants(
-                'org/gradle/a/ClassA.class'
-        )
-        dist.testFile('b/build/classes/main').assertHasDescendants(
-                'org/gradle/b/ClassB.class'
-        )
-    }
-
-    @Test
-    public void canUseANonStandardBuildDir() {
-        executer.withTasks('build').withArguments('-i').run()
-
-        dist.testFile('build').assertDoesNotExist()
-
-        JUnitTestExecutionResult results = new JUnitTestExecutionResult(dist.testFile(), 'target')
-        results.assertTestClassesExecuted('PersonTest')
-        results.testClass('PersonTest').assertTestsExecuted('ok')
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesAntlrIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesAntlrIntegrationTest.groovy
deleted file mode 100644
index e046060..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesAntlrIntegrationTest.groovy
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesAntlrIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('antlr')
-
-    @Test
-    public void canBuild() {
-        TestFile projectDir = sample.dir
-
-        // Build and test projects
-        executer.inDirectory(projectDir).withTasks('clean', 'build').withArguments("--no-opt").run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
-        result.assertTestClassesExecuted('org.gradle.GrammarTest')
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCodeQualityIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCodeQualityIntegrationTest.groovy
deleted file mode 100644
index dc4e1b6..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCodeQualityIntegrationTest.groovy
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesCodeQualityIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('codeQuality')
-
-    @Test
-    public void checkReportsGenerated() {
-        TestFile projectDir = sample.dir
-        TestFile buildDir = projectDir.file('build')
-
-        executer.inDirectory(projectDir).withTasks('check').run()
-
-        buildDir.file('checkstyle/main.xml').assertIsFile()
-        buildDir.file('reports/codenarc/main.html').assertIsFile()
-        buildDir.file('reports/codenarc/test.html').assertIsFile()
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCustomBuildLanguageIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCustomBuildLanguageIntegrationTest.groovy
deleted file mode 100644
index db8339b..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCustomBuildLanguageIntegrationTest.groovy
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesCustomBuildLanguageIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('customBuildLanguage')
-
-    @Test
-    public void testBuildProductDistributions() {
-        TestFile rootDir = sample.dir
-        executer.inDirectory(rootDir).withTasks('clean', 'dist').run()
-
-        TestFile expandDir = dist.testFile('expand-basic')
-        rootDir.file('basicEdition/build/distributions/some-company-basic-edition-1.0.zip').unzipTo(expandDir)
-        expandDir.assertHasDescendants(
-                'readme.txt',
-                'end-user-license-agreement.txt',
-                'bin/start.sh',
-                'lib/some-company-identity-management-1.0.jar',
-                'lib/some-company-billing-1.0.jar',
-                'lib/commons-lang-2.4.jar'
-        )
-
-        expandDir = dist.testFile('expand-enterprise')
-        rootDir.file('enterpriseEdition/build/distributions/some-company-enterprise-edition-1.0.zip').unzipTo(expandDir)
-        expandDir.assertHasDescendants(
-                'readme.txt',
-                'end-user-license-agreement.txt',
-                'bin/start.sh',
-                'lib/some-company-identity-management-1.0.jar',
-                'lib/some-company-billing-1.0.jar',
-                'lib/some-company-reporting-1.0.jar',
-                'lib/commons-lang-2.4.jar',
-                'lib/commons-io-1.2.jar'
-        )
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCustomPluginIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCustomPluginIntegrationTest.groovy
deleted file mode 100644
index 9904cfc..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesCustomPluginIntegrationTest.groovy
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.junit.runner.RunWith
-import org.junit.Rule
-import org.junit.Test
-import org.gradle.util.TestFile
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesCustomPluginIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('customPlugin')
-
-    @Test
-    public void canTestPluginAndTaskImplementation() {
-        TestFile projectDir = sample.dir
-
-        executer.inDirectory(projectDir).withTasks('check').run()
-
-        def result = new JUnitTestExecutionResult(projectDir)
-        result.assertTestClassesExecuted('org.gradle.GreetingTaskTest', 'org.gradle.GreetingPluginTest')
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesExcludesAndClassifiersIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesExcludesAndClassifiersIntegrationTest.groovy
deleted file mode 100644
index 43d9649..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesExcludesAndClassifiersIntegrationTest.groovy
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesExcludesAndClassifiersIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('userguide/artifacts/excludesAndClassifiers')
-
-    @Test
-    public void checkExcludeAndClassifier() {
-        File projectDir = sample.dir
-        String outputCompile = executer.inDirectory(projectDir).withTasks('clean', 'resolveCompile').run().getOutput()
-        String outputRuntime = executer.inDirectory(projectDir).withTasks('clean', 'resolveRuntime').run().getOutput()
-        assertThat(outputCompile, not(containsString("commons")))
-        assertThat(outputRuntime, not(containsString("commons")))
-        assertThat(outputCompile, not(containsString("reports")))
-        assertThat(outputRuntime, not(containsString("reports")))
-        assertThat(outputCompile, not(containsString("shared")))
-        assertThat(outputRuntime, containsString("shared"))
-
-        assertThat(outputCompile, containsString("service-1.0-jdk15"))
-        assertThat(outputCompile, containsString("service-1.0-jdk14"))
-    }
-
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyCustomizedLayoutIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyCustomizedLayoutIntegrationTest.groovy
deleted file mode 100644
index 709a1d3..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyCustomizedLayoutIntegrationTest.groovy
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesGroovyCustomizedLayoutIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('groovy/customizedLayout')
-
-    @Test
-    public void groovyProjectQuickstartSample() {
-        TestFile groovyProjectDir = sample.dir
-        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check contents of jar
-        TestFile tmpDir = dist.testDir.file('jarContents')
-        groovyProjectDir.file('build/libs/customizedLayout.jar').unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/Person.class'
-        )
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyMultiProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyMultiProjectIntegrationTest.groovy
deleted file mode 100644
index 4e9bc5e..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyMultiProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesGroovyMultiProjectIntegrationTest {
-    static final String TEST_PROJECT_NAME = 'testproject'
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('groovy/multiproject')
-
-    private List mainFiles = ['JavaPerson', 'GroovyPerson', 'GroovyJavaPerson']
-    private List excludedFiles = ['ExcludeJava', 'ExcludeGroovy', 'ExcludeGroovyJava']
-    private List testFiles = ['JavaPersonTest', 'GroovyPersonTest', 'GroovyJavaPersonTest']
-
-    @Test
-    public void groovyProjectSamples() {
-        String packagePrefix = 'build/classes/main/org/gradle'
-        String testPackagePrefix = 'build/classes/test/org/gradle'
-
-
-        TestFile groovyProjectDir = sample.dir
-        TestFile testProjectDir = groovyProjectDir.file(TEST_PROJECT_NAME)
-
-        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
-
-        // Check compilation
-        mainFiles.each { testProjectDir.file(packagePrefix, it + ".class").assertIsFile() }
-        excludedFiles.each { testProjectDir.file(packagePrefix, it + ".class").assertDoesNotExist() }
-        testFiles.each { testProjectDir.file(testPackagePrefix, it + ".class").assertIsFile() }
-
-        // The test produce marker files with the name of the test class
-        testFiles.each { testProjectDir.file('build', it).assertIsFile() }
-
-        // Check contents of jar
-        TestFile tmpDir = dist.testDir.file('jarContents')
-        testProjectDir.file("build/libs/$TEST_PROJECT_NAME-1.0.jar").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'META-INF/myfile',
-                'org/gradle/main.properties',
-                'org/gradle/JavaPerson.class',
-                'org/gradle/GroovyPerson.class',
-                'org/gradle/GroovyJavaPerson.class'
-        )
-        tmpDir.file('META-INF/MANIFEST.MF').assertContents(containsString('myprop: myvalue'))
-
-        // Build docs
-        executer.inDirectory(groovyProjectDir).withTasks('clean', 'javadoc', 'groovydoc').run()
-        testProjectDir.file('build/docs/javadoc/index.html').assertIsFile()
-        testProjectDir.file('build/docs/groovydoc/index.html').assertIsFile()
-        testProjectDir.file('build/docs/groovydoc/org/gradle/GroovyPerson.html').assertIsFile()
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyOldVersionsIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyOldVersionsIntegrationTest.groovy
deleted file mode 100644
index d4393f0..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyOldVersionsIntegrationTest.groovy
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesGroovyOldVersionsIntegrationTest {
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    @Test
-    public void groovy156() {
-        TestFile groovyProjectDir = dist.samplesDir.file('groovy/groovy-1.5.6')
-        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check jar exists
-        groovyProjectDir.file("build/libs/groovy-1.5.6.jar").assertIsFile()
-    }
-
-    @Test
-    public void groovy167() {
-        TestFile groovyProjectDir = dist.samplesDir.file('groovy/groovy-1.6.7')
-        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check jar exists
-        groovyProjectDir.file("build/libs/groovy-1.6.7.jar").assertIsFile()
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyQuickstartIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyQuickstartIntegrationTest.groovy
deleted file mode 100644
index e633f9d..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesGroovyQuickstartIntegrationTest.groovy
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesGroovyQuickstartIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('groovy/quickstart')
-
-    @Test
-    public void groovyProjectQuickstartSample() {
-        TestFile groovyProjectDir = sample.dir
-        executer.inDirectory(groovyProjectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(groovyProjectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check contents of jar
-        TestFile tmpDir = dist.testDir.file('jarContents')
-        groovyProjectDir.file('build/libs/quickstart.jar').unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/Person.class',
-                'org/gradle/Person$_closure1.class',
-                'org/gradle/Person$_closure2.class',
-                'resource.txt',
-                'script.groovy'
-        )
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaBaseIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaBaseIntegrationTest.groovy
deleted file mode 100644
index e12cdf5..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaBaseIntegrationTest.groovy
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
-
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesJavaBaseIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/base')
-
-    @Test
-    public void canBuildAndUploadJar() {
-        TestFile javaprojectDir = sample.dir
-
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir.file('test'))
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check jar exists
-        javaprojectDir.file("prod/build/libs/prod-1.0.jar").assertIsFile()
-        
-        // Check contents of Jar
-        TestFile jarContents = dist.testDir.file('jar')
-        javaprojectDir.file('prod/build/libs/prod-1.0.jar').unzipTo(jarContents)
-        jarContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/Person.class'
-        )
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaCustomizedLayoutIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaCustomizedLayoutIntegrationTest.groovy
deleted file mode 100644
index dd989ee..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaCustomizedLayoutIntegrationTest.groovy
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
-
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesJavaCustomizedLayoutIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/customizedLayout')
-
-    @Test
-    public void canBuildAndUploadJar() {
-        TestFile javaprojectDir = sample.dir
-                                                      
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('clean', 'build', 'uploadArchives').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check jar exists
-        javaprojectDir.file('build/libs/customizedLayout.jar').assertIsFile()
-
-        // Check contents of Jar
-        TestFile jarContents = dist.testDir.file('jar')
-        javaprojectDir.file('build/libs/customizedLayout.jar').unzipTo(jarContents)
-        jarContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/Person.class'
-        )
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaMultiProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaMultiProjectIntegrationTest.groovy
deleted file mode 100644
index 489b1c8..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaMultiProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.util.TestFile
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesJavaMultiProjectIntegrationTest {
-
-    static final String JAVA_PROJECT_NAME = 'java/multiproject'
-    static final String SHARED_NAME = 'shared'
-    static final String API_NAME = 'api'
-    static final String WEBAPP_NAME = 'webservice'
-    static final String SERVICES_NAME = 'services'
-    static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
-
-    private TestFile javaprojectDir
-    private List projects;
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/multiproject')
-
-    @Before
-    void setUp() {
-        javaprojectDir = sample.dir
-        projects = [SHARED_NAME, API_NAME, WEBAPP_PATH].collect {"$JAVA_PROJECT_NAME/$it"} + JAVA_PROJECT_NAME
-    }
-
-    @Test
-    public void multiProjectJavaProjectSample() {
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('build').run()
-
-        assertBuildSrcBuilt()
-        assertEverythingBuilt()
-    }
-
-    private void assertBuildSrcBuilt() {
-        TestFile buildSrcDir = javaprojectDir.file('buildSrc')
-
-        buildSrcDir.file('build/libs/buildSrc.jar').assertIsFile()
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(buildSrcDir)
-        result.assertTestClassesExecuted('org.gradle.buildsrc.BuildSrcClassTest')
-    }
-
-    private void assertEverythingBuilt() {
-        String packagePrefix = 'build/classes/main/org/gradle'
-        String testPackagePrefix = 'build/classes/test/org/gradle'
-
-        // Check classes and resources
-        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'Person.class')
-        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'main.properties')
-
-        // Check test classes and resources
-        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'PersonTest.class')
-        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'test.properties')
-        assertExists(javaprojectDir, API_NAME, packagePrefix, API_NAME, 'PersonList.class')
-        assertExists(javaprojectDir, WEBAPP_PATH, packagePrefix, WEBAPP_NAME, 'TestTest.class')
-
-        // Check test results and report
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir.file(SHARED_NAME))
-        result.assertTestClassesExecuted('org.gradle.shared.PersonTest')
-
-        result = new JUnitTestExecutionResult(javaprojectDir.file(WEBAPP_PATH))
-        result.assertTestClassesExecuted('org.gradle.webservice.TestTestTest')
-
-        // Check contents of shared jar
-        TestFile tmpDir = dist.testDir.file("$SHARED_NAME-1.0.jar")
-        javaprojectDir.file(SHARED_NAME, "build/libs/$SHARED_NAME-1.0.jar").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/shared/Person.class',
-                'org/gradle/shared/package-info.class',
-                'org/gradle/shared/main.properties'
-        )
-
-        // Check contents of API jar
-        tmpDir = dist.testDir.file("$API_NAME-1.0.jar")
-        javaprojectDir.file(API_NAME, "build/libs/$API_NAME-1.0.jar").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/api/PersonList.class',
-                'org/gradle/apiImpl/Impl.class')
-
-        // Check contents of API jar
-        tmpDir = dist.testDir.file("$API_NAME-spi-1.0.jar")
-        javaprojectDir.file(API_NAME, "build/libs/$API_NAME-spi-1.0.jar").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/api/PersonList.class')
-
-        // Check contents of War
-        tmpDir = dist.testDir.file("$WEBAPP_NAME-2.5.war")
-        javaprojectDir.file(WEBAPP_PATH, "build/libs/$WEBAPP_NAME-2.5.war").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'WEB-INF/classes/org/gradle/webservice/TestTest.class',
-                "WEB-INF/lib/$SHARED_NAME-1.0.jar".toString(),
-                "WEB-INF/lib/$API_NAME-1.0.jar".toString(),
-                "WEB-INF/lib/$API_NAME-spi-1.0.jar".toString(),
-                'WEB-INF/lib/commons-collections-3.2.jar',
-                'WEB-INF/lib/commons-io-1.2.jar',
-                'WEB-INF/lib/commons-lang-2.4.jar'
-        )
-
-        // Check contents of dist zip
-        tmpDir = dist.testDir.file("$API_NAME-1.0.zip")
-        javaprojectDir.file(API_NAME, "build/distributions/$API_NAME-1.0.zip").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'README.txt',
-                "libs/$API_NAME-spi-1.0.jar".toString(),
-                "libs/$SHARED_NAME-1.0.jar".toString(),
-                'libs/commons-io-1.2.jar',
-                'libs/commons-lang-2.4.jar'
-        )
-    }
-
-    @Test
-    public void multiProjectJavaDoc() {
-        executer.inDirectory(javaprojectDir).withTasks('clean', 'javadoc').run()
-        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/index.html').assertIsFile()
-        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/index.html').assertContents(containsString("shared 1.0 API"))
-        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/org/gradle/shared/Person.html').assertIsFile()
-        javaprojectDir.file(SHARED_NAME, 'build/docs/javadoc/org/gradle/shared/package-summary.html').assertContents(containsString("These are the shared classes."))
-        javaprojectDir.file(API_NAME, 'build/docs/javadoc/index.html').assertIsFile()
-        javaprojectDir.file(API_NAME, 'build/docs/javadoc/org/gradle/api/PersonList.html').assertIsFile()
-        javaprojectDir.file(API_NAME, 'build/docs/javadoc/org/gradle/api/package-summary.html').assertContents(containsString("These are the API classes"))
-        javaprojectDir.file(WEBAPP_PATH, 'build/docs/javadoc/index.html').assertIsFile()
-    }
-
-    @Test
-    public void multiProjectPartialBuild() {
-        String packagePrefix = 'build/classes/main/org/gradle'
-        String testPackagePrefix = 'build/classes/test/org/gradle'
-
-        // Partial build using current directory
-        executer.inDirectory(javaprojectDir.file("$SERVICES_NAME/$WEBAPP_NAME")).withTasks('buildNeeded').run()
-        checkPartialWebAppBuild(packagePrefix, javaprojectDir, testPackagePrefix)
-
-        // Partial build using task path
-        executer.inDirectory(javaprojectDir).withTasks('clean', "$SHARED_NAME:classes".toString()).run()
-        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'Person.class')
-        assertDoesNotExist(javaprojectDir, false, API_NAME, packagePrefix, API_NAME, 'PersonList.class')
-    }
-
-
-    @Test
-    public void buildDependents() {
-        executer.inDirectory(javaprojectDir).withTasks('clean', "$SHARED_NAME:buildDependents".toString()).run()
-        assertEverythingBuilt()
-    }
-
-    @Test
-    public void clean() {
-        executer.inDirectory(javaprojectDir).withTasks('classes').run()
-        executer.inDirectory(javaprojectDir).withTasks('clean').run()
-        projects.each { javaprojectDir.file("$it/build").assertDoesNotExist() }
-    }
-
-    @Test
-    public void noRebuildOfProjectDependencies() {
-        TestFile apiDir = javaprojectDir.file(API_NAME)
-        executer.inDirectory(apiDir).withTasks('classes').run()
-        TestFile sharedJar = javaprojectDir.file("shared/build/libs/shared-1.0.jar")
-        TestFile.Snapshot snapshot = sharedJar.snapshot()
-        executer.inDirectory(apiDir).withTasks('clean', 'classes').withArguments("-a").run()
-        sharedJar.assertHasNotChangedSince(snapshot)
-    }
-
-    @Test
-    public void additionalProjectDependenciesTasks() {
-        TestFile apiDir = javaprojectDir.file(API_NAME)
-        executer.inDirectory(apiDir).withTasks('classes').withArguments("-Ajavadoc").run()
-        assertExists(javaprojectDir, SHARED_NAME, 'build/docs/javadoc/index.html')
-    }
-
-    @Test
-    public void shouldNotUseCacheForProjectDependencies() {
-        TestFile apiDir = javaprojectDir.file(API_NAME)
-        executer.inDirectory(apiDir).withTasks('checkProjectDependency').run()
-    }
-           
-    private static def checkPartialWebAppBuild(String packagePrefix, TestFile javaprojectDir, String testPackagePrefix) {
-        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'Person.class')
-        assertExists(javaprojectDir, SHARED_NAME, packagePrefix, SHARED_NAME, 'main.properties')
-        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'PersonTest.class')
-        assertExists(javaprojectDir, SHARED_NAME, testPackagePrefix, SHARED_NAME, 'test.properties')
-        assertExists(javaprojectDir, "$SERVICES_NAME/$WEBAPP_NAME" as String, packagePrefix, WEBAPP_NAME, 'TestTest.class')
-        assertExists(javaprojectDir, "$SERVICES_NAME/$WEBAPP_NAME" as String, 'build', 'libs', 'webservice-2.5.war')
-        assertDoesNotExist(javaprojectDir, false, "$SERVICES_NAME/$WEBAPP_NAME" as String, 'build', 'libs', 'webservice-2.5.jar')
-    }
-
-    private static void assertExists(TestFile baseDir, Object... path) {
-        baseDir.file(path).assertExists()
-    }
-
-    static void assertDoesNotExist(TestFile baseDir, boolean shouldExists, Object... path) {
-        baseDir.file(path).assertDoesNotExist()
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaOnlyIfIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaOnlyIfIntegrationTest.groovy
deleted file mode 100644
index 67d3b9a..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaOnlyIfIntegrationTest.groovy
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith (DistributionIntegrationTestRunner.class)
-public class SamplesJavaOnlyIfIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/onlyif')
-
-    /**
-     * runs a build 3 times.
-     * execute clean dists
-     * check worked correctly
-     *
-     * remove test results
-     * execute dists
-     * check didn't re-run tests
-     *
-     * remove class file
-     * execute dists
-     * check that it re-ran tests 
-     */
-    @Test public void testOptimizedBuild() {
-        TestFile javaprojectDir = sample.dir
-
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        assertExists(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
-        assertExists(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
-
-        // Check jar exists
-        assertExists(javaprojectDir, "build/libs/onlyif.jar")
-
-        // remove test results
-        removeFile(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
-        removeFile(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
-
-        executer.inDirectory(javaprojectDir).withTasks('test').run()
-
-        // assert that tests did not run
-        // (since neither compile nor compileTests should have done anything)
-        assertDoesNotExist(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
-        assertDoesNotExist(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
-
-        // remove a compiled class file
-        removeFile(javaprojectDir, 'build/classes/main/org/gradle/Person.class')
-
-        executer.inDirectory(javaprojectDir).withTasks('test').run()
-
-        // Check tests have run
-        assertExists(javaprojectDir, 'build/test-results/TEST-org.gradle.PersonTest.xml')
-        assertExists(javaprojectDir, 'build/test-results/TESTS-TestSuites.xml')
-    }
-
-    private static void assertExists(File baseDir, String path) {
-        new TestFile(baseDir).file(path).assertExists()
-    }
-
-    private static void assertDoesNotExist(File baseDir, String path) {
-        new TestFile(baseDir).file(path).assertDoesNotExist()
-    }
-
-    private static void removeFile(File baseDir, String path) {
-        TestFile file = new TestFile(baseDir).file(path)
-        file.assertExists()
-        file.delete()
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaProjectWithIntTestsIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaProjectWithIntTestsIntegrationTest.groovy
deleted file mode 100644
index a4629d0..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaProjectWithIntTestsIntegrationTest.groovy
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesJavaProjectWithIntTestsIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/withIntegrationTests')
-
-    @Test
-    public void canRunIntegrationTests() {
-        TestFile javaprojectDir = sample.dir
-        
-        // Run int tests
-        executer.inDirectory(javaprojectDir).withTasks('clean', 'integrationTest').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonIntegrationTest')
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaQuickstartIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaQuickstartIntegrationTest.groovy
deleted file mode 100644
index 6c5a5d2..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesJavaQuickstartIntegrationTest.groovy
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import java.util.jar.Manifest
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesJavaQuickstartIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/quickstart')
-
-    @Test
-    public void canBuildAndUploadJar() {
-        TestFile javaprojectDir = sample.dir
-
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('clean', 'build', 'uploadArchives').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(javaprojectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check jar exists
-        javaprojectDir.file("build/libs/quickstart-1.0.jar").assertIsFile()
-
-        // Check jar uploaded
-        javaprojectDir.file('repos/quickstart-1.0.jar').assertIsFile()
-
-        // Check contents of Jar
-        TestFile jarContents = dist.testDir.file('jar')
-        javaprojectDir.file('repos/quickstart-1.0.jar').unzipTo(jarContents)
-        jarContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/Person.class'
-        )
-
-        // Check contents of manifest
-        Manifest manifest = new Manifest()
-        jarContents.file('META-INF/MANIFEST.MF').withInputStream { manifest.read(it) }
-        assertThat(manifest.mainAttributes.size(), equalTo(3))
-        assertThat(manifest.mainAttributes.getValue('Manifest-Version'), equalTo('1.0'))
-        assertThat(manifest.mainAttributes.getValue('Implementation-Title'), equalTo('Gradle Quickstart'))
-        assertThat(manifest.mainAttributes.getValue('Implementation-Version'), equalTo('1.0'))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndGroovyIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndGroovyIntegrationTest.groovy
deleted file mode 100644
index 79a1455..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndGroovyIntegrationTest.groovy
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesMixedJavaAndGroovyIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('groovy/mixedJavaAndGroovy')
-
-    @Test
-    public void canBuildJar() {
-        TestFile projectDir = sample.dir
-        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
-        result.assertTestClassesExecuted('org.gradle.PersonTest')
-
-        // Check contents of jar
-        TestFile tmpDir = dist.testDir.file('jarContents')
-        projectDir.file('build/libs/mixedJavaAndGroovy-1.0.jar').unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/Person.class',
-                'org/gradle/GroovyPerson.class',
-                'org/gradle/JavaPerson.class',
-                'org/gradle/PersonList.class'
-        )
-    }
-
-    @Test
-    public void canBuildDocs() {
-        TestFile projectDir = sample.dir
-        executer.inDirectory(projectDir).withTasks('clean', 'javadoc', 'groovydoc').run()
-
-        TestFile javadocsDir = projectDir.file("build/docs/javadoc")
-        javadocsDir.file("index.html").assertIsFile()
-        javadocsDir.file("index.html").assertContents(containsString('mixedJavaAndGroovy 1.0 API'))
-        javadocsDir.file("org/gradle/Person.html").assertIsFile()
-        javadocsDir.file("org/gradle/JavaPerson.html").assertIsFile()
-
-        TestFile groovydocsDir = projectDir.file("build/docs/groovydoc")
-        groovydocsDir.file("index.html").assertIsFile()
-        groovydocsDir.file("overview-summary.html").assertContents(containsString('mixedJavaAndGroovy 1.0 API'))
-        groovydocsDir.file("org/gradle/JavaPerson.html").assertIsFile()
-        groovydocsDir.file("org/gradle/GroovyPerson.html").assertIsFile()
-        groovydocsDir.file("org/gradle/PersonList.html").assertIsFile()
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndScalaIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndScalaIntegrationTest.groovy
deleted file mode 100644
index 90e0d20..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesMixedJavaAndScalaIntegrationTest.groovy
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesMixedJavaAndScalaIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('scala/mixedJavaAndScala')
-
-    @Test
-    public void canBuildJar() {
-        TestFile projectDir = sample.dir
-
-        // Build and test projects
-        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
-        result.assertTestClassesExecuted('org.gradle.sample.PersonTest')
-
-        // Check contents of Jar
-        TestFile jarContents = dist.testDir.file('jar')
-        projectDir.file("build/libs/mixedJavaAndScala-1.0.jar").unzipTo(jarContents)
-        jarContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/sample/Person.class',
-                'org/gradle/sample/impl/JavaPerson.class',
-                'org/gradle/sample/impl/PersonImpl.class',
-                'org/gradle/sample/impl/PersonList.class'
-        )
-    }
-
-    @Test
-    public void canBuildDocs() {
-        TestFile projectDir = sample.dir
-        executer.inDirectory(projectDir).withTasks('clean', 'javadoc', 'scaladoc').run()
-
-        TestFile javadocsDir = projectDir.file("build/docs/javadoc")
-        javadocsDir.file("index.html").assertIsFile()
-        javadocsDir.file("index.html").assertContents(containsString('mixedJavaAndScala 1.0 API'))
-        javadocsDir.file("org/gradle/sample/Person.html").assertIsFile()
-        javadocsDir.file("org/gradle/sample/impl/JavaPerson.html").assertIsFile()
-
-        TestFile scaladocsDir = projectDir.file("build/docs/scaladoc")
-        scaladocsDir.file("index.html").assertIsFile()
-        scaladocsDir.file("index.html").assertContents(containsString('mixedJavaAndScala 1.0 API'))
-        scaladocsDir.file("org/gradle/sample/impl/PersonImpl.html").assertIsFile()
-        scaladocsDir.file("org/gradle/sample/impl/JavaPerson.html").assertIsFile()
-        scaladocsDir.file("org/gradle/sample/impl/PersonList.html").assertIsFile()
-    }
-
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesRepositoriesIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesRepositoriesIntegrationTest.groovy
deleted file mode 100644
index a17ac6f..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesRepositoriesIntegrationTest.groovy
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesRepositoriesIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('userguide/artifacts/defineRepository')
-
-    @Test
-    public void repositoryNotations() {
-        // This test is not very strong. Its main purpose is to the for the correct syntax as we use many
-        // code snippets from this build script in the user's guide.
-        File projectDir = sample.dir
-        String output = executer.inDirectory(projectDir).withQuietLogging().withTasks('lookup').run().getOutput()
-        assertThat(output, equalTo(String.format("localRepository%nlocalRepository%n")))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesScalaCustomizedLayoutIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesScalaCustomizedLayoutIntegrationTest.groovy
deleted file mode 100644
index a96bb79..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesScalaCustomizedLayoutIntegrationTest.groovy
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesScalaCustomizedLayoutIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('scala/customizedLayout')
-
-    @Test
-    public void canBuildJar() {
-        TestFile projectDir = sample.dir
-
-        // Build and test projects
-        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
-        result.assertTestClassesExecuted('org.gradle.sample.impl.PersonImplTest')
-
-        // Check contents of Jar
-        TestFile jarContents = dist.testDir.file('jar')
-        projectDir.file("build/libs/customizedLayout.jar").unzipTo(jarContents)
-        jarContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/sample/api/Person.class',
-                'org/gradle/sample/impl/PersonImpl.class'
-        )
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesScalaQuickstartIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesScalaQuickstartIntegrationTest.groovy
deleted file mode 100644
index 03cde4f..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesScalaQuickstartIntegrationTest.groovy
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import org.gradle.integtests.fixtures.Sample
-
- at RunWith (DistributionIntegrationTestRunner.class)
-class SamplesScalaQuickstartIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('scala/quickstart')
-
-    private TestFile projectDir
-
-    @Before
-    void setUp() {
-        projectDir = sample.dir
-    }
-
-    @Test
-    public void canBuildJar() {
-        // Build and test projects
-        executer.inDirectory(projectDir).withTasks('clean', 'build').run()
-
-        // Check tests have run
-        JUnitTestExecutionResult result = new JUnitTestExecutionResult(projectDir)
-        result.assertTestClassesExecuted('org.gradle.sample.impl.PersonImplTest')
-
-        // Check contents of Jar
-        TestFile jarContents = dist.testDir.file('jar')
-        projectDir.file("build/libs/quickstart.jar").unzipTo(jarContents)
-        jarContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'org/gradle/sample/api/Person.class',
-                'org/gradle/sample/impl/PersonImpl.class'
-        )
-    }
-
-    @Test
-    public void canBuildScalaDoc() {
-        executer.inDirectory(projectDir).withTasks('clean', 'scaladoc').run()
-
-        projectDir.file('build/docs/scaladoc/index.html').assertExists()
-        projectDir.file('build/docs/scaladoc/org/gradle/sample/api/Person.html').assertContents(containsString("Defines the interface for a person."))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesWebProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesWebProjectIntegrationTest.groovy
deleted file mode 100644
index 26e73ce..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesWebProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Assert
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesWebProjectIntegrationTest {
-    static final String WEB_PROJECT_NAME = 'customised'
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('webApplication/customised')
-
-    @Test
-    public void webProjectSamples() {
-        TestFile webProjectDir = sample.dir
-        executer.inDirectory(webProjectDir).withTasks('clean', 'assemble').run()
-        TestFile tmpDir = dist.testDir.file('unjar')
-        webProjectDir.file("build/libs/customised-1.0.war").unzipTo(tmpDir)
-        tmpDir.assertHasDescendants(
-                'root.txt',
-                'META-INF/MANIFEST.MF',
-                'WEB-INF/classes/org/gradle/HelloServlet.class',
-                'WEB-INF/classes/org/gradle/MyClass.class',
-                'WEB-INF/lib/compile-1.0.jar',
-                'WEB-INF/lib/compile-transitive-1.0.jar',
-                'WEB-INF/lib/runtime-1.0.jar',
-                'WEB-INF/lib/additional-1.0.jar',
-                'WEB-INF/lib/otherLib-1.0.jar',
-                'WEB-INF/additional.xml',
-                'WEB-INF/webapp.xml',
-                'WEB-INF/web.xml',
-                'webapp.html')
-    }
-
-    @Test
-    public void checkJettyPlugin() {
-        TestFile webProjectDir = sample.dir
-        executer.inDirectory(webProjectDir).withTasks('clean', 'runTest').run()
-        checkServletOutput(webProjectDir)
-        executer.inDirectory(webProjectDir).withTasks('clean', 'runWarTest').run()
-        checkServletOutput(webProjectDir)
-    }
-
-    static void checkServletOutput(TestFile webProjectDir) {
-        Assert.assertEquals('Hello Gradle', webProjectDir.file("build/servlet-out.txt").text)
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesWebQuickstartIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesWebQuickstartIntegrationTest.groovy
deleted file mode 100644
index 63e6fa2..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/SamplesWebQuickstartIntegrationTest.groovy
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.ExecutionResult
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesWebQuickstartIntegrationTest {
-    static final String WEB_PROJECT_NAME = 'web-project'
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('webApplication/quickstart')
-
-    @Test
-    public void webProjectSamples() {
-        TestFile webProjectDir = sample.dir
-        executer.inDirectory(webProjectDir).withTasks('clean', 'build').run()
-
-        // Check contents of War
-        TestFile warContents = dist.testDir.file('jar')
-        webProjectDir.file("build/libs/quickstart.war").unzipTo(warContents)
-        warContents.assertHasDescendants(
-                'META-INF/MANIFEST.MF',
-                'index.jsp',
-                'WEB-INF/classes/org/gradle/sample/Greeter.class',
-                'WEB-INF/classes/greeting.txt',
-                'WEB-INF/lib/log4j-1.2.15.jar',
-                'WEB-INF/lib/commons-io-1.4.jar',
-        )
-        
-        ExecutionResult result = executer.inDirectory(webProjectDir).withTasks('clean', 'runTest').run()
-        checkServletOutput(result)
-        result = executer.inDirectory(webProjectDir).withTasks('clean', 'runWarTest').run()
-        checkServletOutput(result)
-    }
-
-    static void checkServletOutput(ExecutionResult result) {
-        assertThat(result.output, containsString('hello Gradle'))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskDefinitionIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskDefinitionIntegrationTest.java
deleted file mode 100644
index e46c6d6..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskDefinitionIntegrationTest.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.junit.Test;
-
-public class TaskDefinitionIntegrationTest extends AbstractIntegrationTest {
-    @Test
-    public void canDefineTasksUsingTaskKeywordAndIdentifier() {
-        testFile("build.gradle").writelns(
-                "task nothing",
-                "task withAction << { }",
-                "task emptyOptions()",
-                "task task",
-                "task withOptions(dependsOn: [nothing, withAction, emptyOptions, task])",
-                "task withOptionsAndAction(dependsOn: withOptions) << { }");
-        inTestDirectory().withTasks("withOptionsAndAction").run().assertTasksExecuted(":emptyOptions", ":nothing",
-                ":task", ":withAction", ":withOptions", ":withOptionsAndAction");
-    }
-
-    @Test
-    public void canDefineTasksUsingTaskKeywordAndGString() {
-        testFile("build.gradle").writelns(
-                "v = 'Task'",
-                "task \"nothing$v\"",
-                "task \"withAction$v\" << { }",
-                "task \"emptyOptions$v\"()",
-                "task \"withOptions$v\"(dependsOn: [nothingTask, withActionTask, emptyOptionsTask])",
-                "task \"withOptionsAndAction$v\"(dependsOn: withOptionsTask) << { }");
-        inTestDirectory().withTasks("withOptionsAndActionTask").run().assertTasksExecuted(":emptyOptionsTask",
-                ":nothingTask", ":withActionTask", ":withOptionsTask", ":withOptionsAndActionTask");
-    }
-
-    @Test
-    public void canDefineTasksUsingTaskKeywordAndString() {
-        testFile("build.gradle").writelns(
-                "task 'nothing'",
-                "task 'withAction' << { }",
-                "task 'emptyOptions'()",
-                "task 'withOptions'(dependsOn: [nothing, withAction, emptyOptions])",
-                "task 'withOptionsAndAction'(dependsOn: withOptions) << { }");
-        inTestDirectory().withTasks("withOptionsAndAction").run().assertTasksExecuted(":emptyOptions", ":nothing",
-                ":withAction", ":withOptions", ":withOptionsAndAction");
-    }
-
-    @Test
-    public void canDefineTasksInNestedBlocks() {
-        testFile("build.gradle").writelns(
-                "2.times { task \"dynamic$it\" << { } }",
-                "if (dynamic0) { task inBlock }",
-                "def task() { task inMethod }",
-                "task()", "def cl = { -> task inClosure }",
-                "cl()",
-                "task all(dependsOn: [dynamic0, dynamic1, inBlock, inMethod, inClosure])");
-        inTestDirectory().withTasks("all").run().assertTasksExecuted(":dynamic0", ":dynamic1", ":inBlock", ":inClosure",
-                ":inMethod", ":all");
-    }
-
-    @Test
-    public void canDefineTasksUsingTaskMethodExpression() {
-        testFile("build.gradle").writelns(
-                "a = 'a' == 'b' ? null: task(withAction) << { }",
-                "a = task(nothing)",
-                "a = task(emptyOptions())", "taskName = 'dynamic'",
-                "a = task(\"$taskName\") << { }",
-                "a = task('string')",
-                "a = task('stringWithAction') << { }",
-                "a = task('stringWithOptions', description: 'description')",
-                "a = task('stringWithOptionsAndAction', description: 'description') << { }",
-                "a = task(withOptions, description: 'description')",
-                "a = task(withOptionsAndAction, description: 'description') << { }",
-                "a = task(anotherWithAction).doFirst\n{}", "task all(dependsOn: tasks.all)");
-        inTestDirectory().withTasks("all").run().assertTasksExecuted(":anotherWithAction", ":dynamic", ":emptyOptions",
-                ":nothing", ":string", ":stringWithAction", ":stringWithOptions", ":stringWithOptionsAndAction",
-                ":withAction", ":withOptions", ":withOptionsAndAction", ":all");
-    }
-
-    @Test
-    public void canConfigureTasksWhenTheyAreDefined() {
-        testFile("build.gradle").writelns(
-                "import org.gradle.integtests.TestTask",
-                "task withDescription { description = 'value' }",
-                "task(asMethod)\n{ description = 'value' }",
-                "task asStatement(type: TestTask) { property = 'value' }",
-                "task \"dynamic\"(type: TestTask) { property = 'value' }",
-                "v = task(asExpression, type: TestTask) { property = 'value' }",
-                "task(postConfigure, type: TestTask).configure { property = 'value' }",
-                "[asStatement, dynamic, asExpression, postConfigure].each { ",
-                "    assert 'value' == it.property",
-                "}",
-                "[withDescription, asMethod].each {",
-                "    assert 'value' == it.description",
-                "}",
-                "task all(dependsOn: tasks.all)");
-        inTestDirectory().withTasks("all").run();
-    }
-
-    @Test
-    public void doesNotHideLocalMethodsAndVariables() {
-        testFile("build.gradle").writelns(
-                "String name = 'a'; task name",
-//                "taskNameVar = 'b'; task taskNameVar",
-                "def taskNameMethod(String name = 'c') { name } ",
-//                "task taskNameMethod",
-                "task taskNameMethod('d')",
-                "def addTaskMethod(String methodParam) { task methodParam }",
-                "addTaskMethod('e')",
-                "def addTaskWithClosure(String methodParam) { task(methodParam) { property = 'value' } }",
-                "addTaskWithClosure('f')",
-                "def addTaskWithMap(String methodParam) { task(methodParam, description: 'description') }",
-                "addTaskWithMap('g')",
-                "cl = { String taskNameParam -> task taskNameParam }",
-                "cl.call('h')",
-                "cl = { String taskNameParam -> task(taskNameParam) { property = 'value' } }",
-                "cl.call('i')",
-                "assert 'value' == f.property",
-                "assert 'value' == i.property",
-                "task all(dependsOn: tasks.all)");
-        inTestDirectory().withTasks("all").run().assertTasksExecuted(":a", ":d", ":e", ":f", ":g", ":h", ":i", ":all");
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskExecutionIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskExecutionIntegrationTest.java
deleted file mode 100644
index d81a0d4..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TaskExecutionIntegrationTest.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.gradle.util.TestFile;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-public class TaskExecutionIntegrationTest extends AbstractIntegrationTest {
-    public static boolean graphListenerNotified;
-
-    @Before
-    public void setUp() {
-        graphListenerNotified = false;
-    }
-
-    @Test
-    public void taskCanAccessTaskGraph() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns("import org.gradle.integtests.TaskExecutionIntegrationTest",
-                "task a(dependsOn: 'b') << { task ->",
-                "    assert gradle.taskGraph.hasTask(task)",
-                "    assert gradle.taskGraph.hasTask(':a')",
-                "    assert gradle.taskGraph.hasTask(a)",
-                "    assert gradle.taskGraph.hasTask(':b')",
-                "    assert gradle.taskGraph.hasTask(b)",
-                "    assert gradle.taskGraph.allTasks.contains(task)",
-                "    assert gradle.taskGraph.allTasks.contains(tasks.getByName('b'))",
-                "}",
-                "task b",
-                "gradle.taskGraph.whenReady { graph ->",
-                "    assert graph.hasTask(':a')",
-                "    assert graph.hasTask(a)",
-                "    assert graph.hasTask(':b')",
-                "    assert graph.hasTask(b)",
-                "    assert graph.allTasks.contains(a)",
-                "    assert graph.allTasks.contains(b)",
-                "    TaskExecutionIntegrationTest.graphListenerNotified = true", "}");
-        usingBuildFile(buildFile).withTasks("a").run().assertTasksExecuted(":b", ":a");
-
-        assertTrue(graphListenerNotified);
-    }
-
-    @Test
-    public void executesAllTasksInASingleBuildAndEachTaskAtMostOnce() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "gradle.taskGraph.whenReady { assert !project.hasProperty('graphReady'); graphReady = true }",
-                "task a << { task -> project.executedA = task }",
-                "task b << { ",
-                "    assert a == project.executedA",
-                "    assert gradle.taskGraph.hasTask(':a')",
-                "}",
-                "task c(dependsOn: a)",
-                "task d(dependsOn: a)",
-                "task e(dependsOn: [a, d])");
-        usingBuildFile(buildFile).withTasks("a", "b").run().assertTasksExecuted(":a", ":b");
-        usingBuildFile(buildFile).withTasks("a", "a").run().assertTasksExecuted(":a");
-        usingBuildFile(buildFile).withTasks("c", "a").run().assertTasksExecuted(":a", ":c");
-        usingBuildFile(buildFile).withTasks("c", "e").run().assertTasksExecuted(":a", ":c", ":d", ":e");
-    }
-
-    @Test
-    public void executesMultiProjectsTasksInASingleBuildAndEachTaskAtMostOnce() {
-        testFile("settings.gradle").writelns("include 'child1', 'child2'");
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "task a",
-                "allprojects {",
-                "    task b",
-                "    task c(dependsOn: ['b', ':a'])",
-                "}");
-        usingBuildFile(buildFile).withTasks("a", "c").run().assertTasksExecuted(":a", ":b", ":c", ":child1:b",
-                ":child1:c", ":child2:b", ":child2:c");
-        usingBuildFile(buildFile).withTasks("b", ":child2:c").run().assertTasksExecuted(":b", ":child1:b", ":child2:b",
-                ":a", ":child2:c");
-    }
-
-    @Test
-    public void executesMultiProjectDefaultTasksInASingleBuildAndEachTaskAtMostOnce() {
-        testFile("settings.gradle").writelns("include 'child1', 'child2'");
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns("defaultTasks 'a', 'b'", "task a", "subprojects {", "    task a(dependsOn: ':a')",
-                "    task b(dependsOn: ':a')", "}");
-        usingBuildFile(buildFile).run().assertTasksExecuted(":a", ":child1:a", ":child2:a", ":child1:b", ":child2:b");
-    }
-
-    @Test
-    public void executesProjectDefaultTasksWhenNoneSpecified() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "task a",
-                "task b(dependsOn: a)",
-                "defaultTasks 'b'"
-        );
-        usingBuildFile(buildFile).withTasks().run().assertTasksExecuted(":a", ":b");
-    }
-    
-    @Test
-    public void doesNotExecuteTaskActionsWhenDryRunSpecified() {
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "task a << { fail() }",
-                "task b(dependsOn: a) << { fail() }",
-                "defaultTasks 'b'"
-        );
-
-        // project defaults
-        usingBuildFile(buildFile).withArguments("-m").run().assertTasksExecuted(":a", ":b");
-        // named tasks
-        usingBuildFile(buildFile).withArguments("-m").withTasks("b").run().assertTasksExecuted(":a", ":b");
-    }
-
-    @Test
-    public void excludesTasksWhenExcludePatternSpecified() {
-        testFile("settings.gradle").write("include 'sub'");
-        TestFile buildFile = testFile("build.gradle");
-        buildFile.writelns(
-                "task a",
-                "task b(dependsOn: a)",
-                "task c(dependsOn: [a, b])",
-                "task d(dependsOn: c)",
-                "defaultTasks 'd'"
-        );
-        testFile("sub/build.gradle").writelns(
-                "task c",
-                "task d(dependsOn: c)"
-        );
-
-        // Exclude entire branch
-        usingBuildFile(buildFile).withTasks(":d").withArguments("-x", "c").run().assertTasksExecuted(":d");
-        // Exclude direct dependency
-        usingBuildFile(buildFile).withTasks(":d").withArguments("-x", "b").run().assertTasksExecuted(":a", ":c", ":d");
-        // Exclude using paths and multi-project
-        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "c").run().assertTasksExecuted(":d", ":sub:d");
-        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "sub:c").run().assertTasksExecuted(":a", ":b", ":c", ":d", ":sub:d");
-        usingBuildFile(buildFile).withTasks("d").withArguments("-x", ":sub:c").run().assertTasksExecuted(":a", ":b", ":c", ":d", ":sub:d");
-        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "d").run().assertTasksExecuted();
-        // Project defaults
-        usingBuildFile(buildFile).withArguments("-x", "b").run().assertTasksExecuted(":a", ":c", ":d", ":sub:c", ":sub:d");
-        // Unknown task
-        usingBuildFile(buildFile).withTasks("d").withArguments("-x", "unknown").runWithFailure().assertThatDescription(startsWith("Task 'unknown' not found in root project"));
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TestTask.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TestTask.java
deleted file mode 100644
index 84b180f..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TestTask.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import org.gradle.api.DefaultTask;
-
-public class TestTask extends DefaultTask {
-    private String property;
-    
-    public String getProperty() {
-        return property;
-    }
-
-    public void setProperty(String property) {
-        this.property = property;
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TransformerTask.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TransformerTask.java
deleted file mode 100644
index 44a4028..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/TransformerTask.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.gradle.api.DefaultTask;
-import org.gradle.api.tasks.Input;
-import org.gradle.api.tasks.InputFile;
-import org.gradle.api.tasks.OutputFile;
-import org.gradle.api.tasks.TaskAction;
-import org.gradle.util.TestFile;
-
-import java.io.File;
-
-public class TransformerTask extends DefaultTask {
-    private File inputFile;
-    private File outputFile;
-    private String format = "[%s]";
-
-    @InputFile
-    public File getInputFile() {
-        return inputFile;
-    }
-
-    public void setInputFile(File inputFile) {
-        this.inputFile = inputFile;
-    }
-
-    @OutputFile
-    public File getOutputFile() {
-        return outputFile;
-    }
-
-    public void setOutputFile(File outputFile) {
-        this.outputFile = outputFile;
-    }
-
-    @Input
-    public String getFormat() {
-        return format;
-    }
-
-    public void setFormat(String format) {
-        this.format = format;
-    }
-
-    @TaskAction
-    public void transform() {
-        TestFile inputFile = new TestFile(this.inputFile);
-        TestFile outputFile = new TestFile(this.outputFile);
-        outputFile.write(String.format(format, inputFile.getText()));
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WaterProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WaterProjectIntegrationTest.groovy
deleted file mode 100644
index d0008b9..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WaterProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.ExecutionResult
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class WaterProjectIntegrationTest {
-    final static String NL = System.properties['line.separator']
-
-    final static String HELLO_CLAUSE = "Hello, I'm "
-    final static String CHILDREN_TEXT = 'I love water.'
-    final static String WATER_INFO = 'As you all know, I cover three quarters of this planet!'
-    final static String BLUE_WHALE_INFO = "I'm the largets animal which has ever lived on this planet!"
-    final static String KRILL_INFO = "The weight of my species in summer is twice as heavy as all human beings!"
-    final static String PHYTOPLANKTON_INFO = "I produce as much oxygen as all the other plants on earth together!"
-
-    final static String WATER_NAME = 'water'
-    final static String BLUE_WHALE_NAME = 'bluewhale'
-    final static String KRILL_NAME = 'krill'
-    final static String PHYTOPLANKTON_NAME = 'phytoplankton'
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample(WATER_NAME)
-
-    @Test
-    public void waterProject() {
-        File waterDir = sample.dir
-        ExecutionResult result = executer.inDirectory(waterDir).withTasks('hello').withQuietLogging().run()
-        assertEquals(result.output, list2text([intro(WATER_NAME), WATER_INFO,
-                intro(PHYTOPLANKTON_NAME), CHILDREN_TEXT, PHYTOPLANKTON_INFO,
-                intro(KRILL_NAME), CHILDREN_TEXT, KRILL_INFO,
-                intro(BLUE_WHALE_NAME), CHILDREN_TEXT, BLUE_WHALE_INFO]))
-
-        result = executer.inDirectory(new File(waterDir, BLUE_WHALE_NAME)).withTasks('hello').withQuietLogging().run()
-        assertEquals(result.output, list2text([intro(WATER_NAME), WATER_INFO,
-                intro(PHYTOPLANKTON_NAME), CHILDREN_TEXT, PHYTOPLANKTON_INFO,
-                intro(KRILL_NAME), CHILDREN_TEXT, KRILL_INFO,
-                intro(BLUE_WHALE_NAME), CHILDREN_TEXT, BLUE_WHALE_INFO]))
-
-        result = executer.inDirectory(new File(waterDir, PHYTOPLANKTON_NAME)).withTasks('hello').withQuietLogging().run()
-        assertEquals(result.output, list2text([intro(WATER_NAME), WATER_INFO,
-                intro(PHYTOPLANKTON_NAME), CHILDREN_TEXT, PHYTOPLANKTON_INFO]))
-    }
-
-    static String intro(String projectName) {
-        HELLO_CLAUSE + projectName
-    }
-
-    static String list2text(List list) {
-        list.join(NL) + NL
-    }
-
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WorkerProcessIntegrationTest.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WorkerProcessIntegrationTest.java
deleted file mode 100644
index 086ff72..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WorkerProcessIntegrationTest.java
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests;
-
-import org.apache.tools.ant.Project;
-import org.gradle.CacheUsage;
-import org.gradle.api.Action;
-import org.gradle.api.internal.ClassPathRegistry;
-import org.gradle.api.internal.DefaultClassPathRegistry;
-import org.gradle.api.internal.file.IdentityFileResolver;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.cache.DefaultCacheFactory;
-import org.gradle.cache.DefaultCacheRepository;
-import org.gradle.listener.ListenerBroadcast;
-import org.gradle.messaging.remote.ObjectConnection;
-import org.gradle.messaging.remote.internal.TcpMessagingServer;
-import org.gradle.messaging.dispatch.Dispatch;
-import org.gradle.messaging.dispatch.MethodInvocation;
-import org.gradle.process.internal.*;
-import org.gradle.process.internal.child.WorkerProcessClassPathProvider;
-import org.gradle.util.LongIdGenerator;
-import org.gradle.util.TemporaryFolder;
-import org.jmock.Expectations;
-import org.jmock.Sequence;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.ObjectInputStream;
-import java.io.Serializable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
- at RunWith(JMock.class)
-public class WorkerProcessIntegrationTest {
-    private final JUnit4Mockery context = new JUnit4Mockery();
-    private final TestListenerInterface listenerMock = context.mock(TestListenerInterface.class);
-    private final TcpMessagingServer server = new TcpMessagingServer(getClass().getClassLoader());
-    @Rule public final TemporaryFolder tmpDir = new TemporaryFolder();
-    private final ClassPathRegistry classPathRegistry = new DefaultClassPathRegistry(new WorkerProcessClassPathProvider(new DefaultCacheRepository(tmpDir.getDir(), CacheUsage.ON, new DefaultCacheFactory())));
-    private final DefaultWorkerProcessFactory workerFactory = new DefaultWorkerProcessFactory(LogLevel.INFO, server, classPathRegistry, new IdentityFileResolver(), new LongIdGenerator());
-    private final ListenerBroadcast<TestListenerInterface> broadcast = new ListenerBroadcast<TestListenerInterface>(
-            TestListenerInterface.class);
-    private final RemoteExceptionListener exceptionListener = new RemoteExceptionListener(broadcast);
-
-    @Before
-    public void setUp() {
-        broadcast.add(listenerMock);
-    }
-
-    @Test
-    public void workerProcessCanSendMessagesToThisProcess() throws Throwable {
-        context.checking(new Expectations() {{
-            Sequence sequence = context.sequence("sequence");
-            one(listenerMock).send("message 1", 1);
-            inSequence(sequence);
-            one(listenerMock).send("message 2", 2);
-            inSequence(sequence);
-        }});
-
-        execute(worker(new RemoteProcess()));
-    }
-
-    @Test
-    public void thisProcessCanSendEventsToWorkerProcess() throws Throwable {
-        execute(worker(new PingRemoteProcess()).onServer(new Action<ObjectConnection>() {
-            public void execute(ObjectConnection objectConnection) {
-                TestListenerInterface listener = objectConnection.addOutgoing(TestListenerInterface.class);
-                listener.send("1", 0);
-                listener.send("1", 1);
-                listener.send("1", 2);
-                listener.send("stop", 3);
-            }
-        }));
-    }
-
-    @Test
-    public void multipleWorkerProcessesCanSendMessagesToThisProcess() throws Throwable {
-        context.checking(new Expectations() {{
-            Sequence process1 = context.sequence("sequence1");
-            one(listenerMock).send("message 1", 1);
-            inSequence(process1);
-            one(listenerMock).send("message 2", 2);
-            inSequence(process1);
-            Sequence process2 = context.sequence("sequence2");
-            one(listenerMock).send("other 1", 1);
-            inSequence(process2);
-            one(listenerMock).send("other 2", 2);
-            inSequence(process2);
-        }});
-
-        execute(worker(new RemoteProcess()), worker(new OtherRemoteProcess()));
-    }
-
-    @Test
-    public void handlesWorkerProcessWhichCrashes() throws Throwable {
-        context.checking(new Expectations() {{
-            atMost(1).of(listenerMock).send("message 1", 1);
-            atMost(1).of(listenerMock).send("message 2", 2);
-        }});
-
-        execute(worker(new CrashingRemoteProcess()).expectStopFailure());
-    }
-
-    @Test
-    public void handlesWorkerActionWhichThrowsException() throws Throwable {
-        execute(worker(new BrokenRemoteProcess()).expectStopFailure());
-    }
-
-    @Test
-    public void handlesWorkerActionThatLeavesThreadsRunning() throws Throwable {
-        context.checking(new Expectations() {{
-            one(listenerMock).send("message 1", 1);
-            one(listenerMock).send("message 2", 2);
-        }});
-
-        execute(worker(new NoCleanUpRemoteProcess()));
-    }
-
-    @Test
-    public void handlesWorkerProcessWhichNeverConnects() throws Throwable {
-        execute(worker(new NoConnectRemoteProcess()).expectStartFailure());
-    }
-
-    @Test
-    public void handlesWorkerProcessWhenJvmFailsToStart() throws Throwable {
-        execute(mainClass("no-such-class").expectStartFailure());
-    }
-
-    private ChildProcess worker(Action<WorkerProcessContext> action) {
-        return new ChildProcess(action);
-    }
-
-    private ChildProcess mainClass(String mainClass) {
-        return new ChildProcess(new NoOpAction()).mainClass(mainClass);
-    }
-
-    void execute(ChildProcess... processes) throws Throwable {
-        for (ChildProcess process : processes) {
-            process.start();
-        }
-        for (ChildProcess process : processes) {
-            process.waitForStop();
-        }
-        server.stop();
-        exceptionListener.rethrow();
-    }
-
-    private class ChildProcess {
-        private boolean stopFails;
-        private boolean startFails;
-        private WorkerProcess proc;
-        private Action<WorkerProcessContext> action;
-        private String mainClass;
-        private Action<ObjectConnection> serverAction;
-
-        public ChildProcess(Action<WorkerProcessContext> action) {
-            this.action = action;
-        }
-
-        ChildProcess expectStopFailure() {
-            stopFails = true;
-            return this;
-        }
-
-        ChildProcess expectStartFailure() {
-            startFails = true;
-            return this;
-        }
-
-        public void start() {
-            WorkerProcessBuilder builder = workerFactory.create();
-            builder.applicationClasspath(classPathRegistry.getClassPathFiles("ANT"));
-            builder.sharedPackages("org.apache.tools.ant");
-            builder.getJavaCommand().systemProperty("test.system.property", "value");
-            builder.getJavaCommand().environment("TEST_ENV_VAR", "value");
-            builder.worker(action);
-
-            if (mainClass != null) {
-                builder.getJavaCommand().setMain(mainClass);
-            }
-
-            proc = builder.build();
-            try {
-                proc.start();
-                assertFalse(startFails);
-            } catch (ExecException e) {
-                assertTrue(startFails);
-                return;
-            }
-            proc.getConnection().addIncoming(TestListenerInterface.class, exceptionListener);
-            if (serverAction != null) {
-                serverAction.execute(proc.getConnection());
-            }
-        }
-
-        public void waitForStop() {
-            if (startFails) {
-                return;
-            }
-            try {
-                proc.waitForStop();
-                assertFalse("Expected process to fail", stopFails);
-            } catch (ExecException e) {
-                assertTrue("Unexpected failure in worker process", stopFails);
-            }
-        }
-
-        public ChildProcess mainClass(String mainClass) {
-            this.mainClass = mainClass;
-            return this;
-        }
-
-        public ChildProcess onServer(Action<ObjectConnection> action) {
-            this.serverAction = action;
-            return this;
-        }
-    }
-
-    public static class RemoteExceptionListener implements Dispatch<MethodInvocation> {
-        Throwable ex;
-        final Dispatch<MethodInvocation> dispatch;
-
-        public RemoteExceptionListener(Dispatch<MethodInvocation> dispatch) {
-            this.dispatch = dispatch;
-        }
-
-        public void dispatch(MethodInvocation message) {
-            try {
-                dispatch.dispatch(message);
-            } catch (Throwable e) {
-                ex = e;
-            }
-        }
-
-        public void rethrow() throws Throwable {
-            if (ex != null) {
-                throw ex;
-            }
-        }
-    }
-
-    public static class RemoteProcess implements Action<WorkerProcessContext>, Serializable {
-        public void execute(WorkerProcessContext workerProcessContext) {
-            // Check environment
-            assertThat(System.getProperty("test.system.property"), equalTo("value"));
-            assertThat(System.getenv().get("TEST_ENV_VAR"), equalTo("value"));
-
-            // Check ClassLoaders
-            ClassLoader antClassLoader = Project.class.getClassLoader();
-            ClassLoader thisClassLoader = getClass().getClassLoader();
-            ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
-
-            assertThat(antClassLoader, not(sameInstance(systemClassLoader)));
-            assertThat(thisClassLoader, not(sameInstance(systemClassLoader)));
-            assertThat(antClassLoader.getParent(), equalTo(systemClassLoader.getParent()));
-            assertThat(thisClassLoader.getParent().getParent().getParent(), sameInstance(antClassLoader));
-
-            // Send some messages
-            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(
-                    TestListenerInterface.class);
-            sender.send("message 1", 1);
-            sender.send("message 2", 2);
-        }
-    }
-
-    public static class OtherRemoteProcess implements Action<WorkerProcessContext>, Serializable {
-        public void execute(WorkerProcessContext workerProcessContext) {
-            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(TestListenerInterface.class);
-            sender.send("other 1", 1);
-            sender.send("other 2", 2);
-        }
-    }
-
-    public static class NoCleanUpRemoteProcess implements Action<WorkerProcessContext>, Serializable {
-        public void execute(WorkerProcessContext workerProcessContext) {
-            final Lock lock = new ReentrantLock();
-            lock.lock();
-            new Thread(new Runnable() {
-                public void run() {
-                    lock.lock();
-                }
-            }).start();
-
-            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(
-                    TestListenerInterface.class);
-            sender.send("message 1", 1);
-            sender.send("message 2", 2);
-        }
-    }
-
-    public static class PingRemoteProcess implements Action<WorkerProcessContext>, Serializable, TestListenerInterface {
-        CountDownLatch stopReceived;
-        int count;
-
-        public void send(String message, int count) {
-            assertEquals(this.count, count);
-            this.count++;
-            if (message.equals("stop")) {
-                assertEquals(4, this.count);
-                stopReceived.countDown();
-            }
-        }
-
-        public void execute(WorkerProcessContext workerProcessContext) {
-            stopReceived = new CountDownLatch(1);
-            workerProcessContext.getServerConnection().addIncoming(TestListenerInterface.class, this);
-            try {
-                stopReceived.await();
-            } catch (InterruptedException e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
-
-    public static class CrashingRemoteProcess implements Action<WorkerProcessContext>, Serializable {
-        public void execute(WorkerProcessContext workerProcessContext) {
-            TestListenerInterface sender = workerProcessContext.getServerConnection().addOutgoing(TestListenerInterface.class);
-            sender.send("message 1", 1);
-            sender.send("message 2", 2);
-            // crash
-            Runtime.getRuntime().halt(1);
-        }
-    }
-
-    public static class BrokenRemoteProcess implements Action<WorkerProcessContext>, Serializable {
-        public void execute(WorkerProcessContext workerProcessContext) {
-            throw new RuntimeException("broken");
-        }
-    }
-
-    public static class NoOpAction implements Action<WorkerProcessContext>, Serializable {
-        public void execute(WorkerProcessContext workerProcessContext) {
-        }
-    }
-
-    public static class NoConnectRemoteProcess implements Action<WorkerProcessContext>, Serializable {
-        private void readObject(ObjectInputStream instr) {
-            System.exit(0);
-        }
-        
-        public void execute(WorkerProcessContext workerProcessContext) {
-            throw new UnsupportedOperationException();
-        }
-    }
-    
-    public interface TestListenerInterface {
-        public void send(String message, int count);
-    }
-}
-
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy
deleted file mode 100644
index 4ba13af..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/WrapperProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests
-
-import org.gradle.integtests.fixtures.ExecutionResult
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class WrapperProjectIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('wrapper-project')
-
-    @Test
-    public void wrapperSample() {
-        File wrapperSampleDir = sample.dir
-
-        executer.inDirectory(wrapperSampleDir).withTasks('wrapper').run()
-
-        ExecutionResult result = executer.usingExecutable('gradlew').inDirectory(wrapperSampleDir).withTasks('hello').run()
-        assertThat(result.output, containsString('hello'))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractGradleExecuter.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractGradleExecuter.java
deleted file mode 100644
index ca5840c..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/AbstractGradleExecuter.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.fixtures;
-
-import org.gradle.util.Jvm;
-
-import java.io.File;
-import java.util.*;
-
-public abstract class AbstractGradleExecuter implements GradleExecuter {
-    private final List<String> args = new ArrayList<String>();
-    private final List<String> tasks = new ArrayList<String>();
-    private File workingDir;
-    private boolean quiet;
-    private boolean taskList;
-    private boolean searchUpwards;
-    private Map<String, String> environmentVars = new HashMap<String, String>();
-    private String executable;
-    private File userHomeDir;
-    private File buildScript;
-
-    public GradleExecuter reset() {
-        args.clear();
-        tasks.clear();
-        workingDir = null;
-        buildScript = null;
-        quiet = false;
-        taskList = false;
-        searchUpwards = false;
-        executable = null;
-        userHomeDir = null;
-        environmentVars.clear();
-        return this;
-    }
-
-    public boolean worksWith(Jvm jvm) {
-        return jvm.isJava5Compatible();
-    }
-
-    public GradleExecuter inDirectory(File directory) {
-        workingDir = directory;
-        return this;
-    }
-
-    public File getWorkingDir() {
-        return workingDir;
-    }
-
-    protected void copyTo(GradleExecuter executer) {
-        if (workingDir != null) {
-            executer.inDirectory(workingDir);
-        }
-        if (buildScript != null) {
-            executer.usingBuildScript(buildScript);
-        }
-        executer.withTasks(tasks);
-        executer.withArguments(args);
-        executer.withEnvironmentVars(environmentVars);
-        executer.usingExecutable(executable);
-        if (quiet) {
-            executer.withQuietLogging();
-        }
-        if (taskList) {
-            executer.withTaskList();
-        }
-        executer.withUserHomeDir(userHomeDir);
-    }
-
-    public GradleExecuter usingBuildScript(File buildScript) {
-        this.buildScript = buildScript;
-        return this;
-    }
-
-    public GradleExecuter usingBuildScript(String scriptText) {
-        throw new UnsupportedOperationException();
-    }
-
-    public GradleExecuter usingSettingsFile(File settingsFile) {
-        throw new UnsupportedOperationException();
-    }
-
-    public GradleExecuter usingInitScript(File initScript) {
-        throw new UnsupportedOperationException();
-    }
-
-    public File getUserHomeDir() {
-        return userHomeDir;
-    }
-
-    public GradleExecuter withUserHomeDir(File userHomeDir) {
-        this.userHomeDir = userHomeDir;
-        return this;
-    }
-
-    public GradleExecuter usingExecutable(String script) {
-        this.executable = script;
-        return this;
-    }
-
-    public String getExecutable() {
-        return executable;
-    }
-
-    public GradleExecuter withSearchUpwards() {
-        searchUpwards = true;
-        return this;
-    }
-
-    public boolean isQuiet() {
-        return quiet;
-    }
-
-    public GradleExecuter withQuietLogging() {
-        quiet = true;
-        return this;
-    }
-
-    public GradleExecuter withTaskList() {
-        taskList = true;
-        return this;
-    }
-
-    public GradleExecuter withDependencyList() {
-        throw new UnsupportedOperationException();
-    }
-
-    public GradleExecuter withArguments(String... args) {
-        return withArguments(Arrays.asList(args));
-    }
-
-    public GradleExecuter withArguments(List<String> args) {
-        this.args.clear();
-        this.args.addAll(args);
-        return this;
-    }
-
-    public GradleExecuter withEnvironmentVars(Map<String, ?> environment) {
-        environmentVars.clear();
-        for (Map.Entry<String, ?> entry : environment.entrySet()) {
-            environmentVars.put(entry.getKey(), entry.getValue().toString());
-        }
-        return this;
-    }
-
-    public Map<String, String> getEnvironmentVars() {
-        return environmentVars;
-    }
-
-    public GradleExecuter withTasks(String... names) {
-        return withTasks(Arrays.asList(names));
-    }
-
-    public GradleExecuter withTasks(List<String> names) {
-        tasks.clear();
-        tasks.addAll(names);
-        return this;
-    }
-
-    protected List<String> getAllArgs() {
-        List<String> allArgs = new ArrayList<String>();
-        if (buildScript != null) {
-            allArgs.add("--build-file");
-            allArgs.add(buildScript.getAbsolutePath());
-        }
-        if (quiet) {
-            allArgs.add("--quiet");
-        }
-        if (taskList) {
-            allArgs.add("tasks");
-        }
-        if (!searchUpwards) {
-            allArgs.add("--no-search-upward");
-        }
-        if (userHomeDir != null) {
-            args.add("--gradle-user-home");
-            args.add(userHomeDir.getAbsolutePath());
-        }
-        allArgs.addAll(args);
-        allArgs.addAll(tasks);
-        return allArgs;
-    }
-
-    public final ExecutionResult run() {
-        try {
-            return doRun();
-        } finally {
-            reset();
-        }
-    }
-
-    public final ExecutionFailure runWithFailure() {
-        try {
-            return doRunWithFailure();
-        } finally {
-            reset();
-        }
-    }
-
-    protected abstract ExecutionResult doRun();
-
-    protected abstract ExecutionFailure doRunWithFailure();
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionResult.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionResult.java
deleted file mode 100644
index 219dd38..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ExecutionResult.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.fixtures;
-
-public interface ExecutionResult {
-    String getOutput();
-
-    String getError();
-
-    void assertOutputHasNoStackTraces();
-
-    void assertErrorHasNoStackTraces();
-
-    /**
-     * Asserts that exactly the given set of tasks have been executed
-     */
-    ExecutionResult assertTasksExecuted(String... taskPaths);
-
-    /**
-     * Asserts that exactly the given set of tasks have been skipped
-     */
-    ExecutionResult assertTasksSkipped(String... taskPaths);
-
-    /**
-     * Asserts that exactly the given set of tasks have not been skipped 
-     */
-    ExecutionResult assertTasksNotSkipped(String... taskPaths);
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ForkingGradleExecuter.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ForkingGradleExecuter.java
deleted file mode 100644
index 1a2b7f8..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/ForkingGradleExecuter.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests.fixtures;
-
-import org.gradle.process.internal.ExecHandle;
-import org.gradle.process.internal.ExecHandleBuilder;
-import org.gradle.util.GUtil;
-import org.gradle.util.OperatingSystem;
-import org.gradle.util.TestFile;
-import org.hamcrest.BaseMatcher;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Pattern;
-
-import static org.gradle.util.Matchers.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-public class ForkingGradleExecuter extends AbstractGradleExecuter {
-    private static final Logger LOG = LoggerFactory.getLogger(ForkingGradleExecuter.class);
-    private final TestFile gradleHomeDir;
-
-    public ForkingGradleExecuter(TestFile gradleHomeDir) {
-        this.gradleHomeDir = gradleHomeDir;
-    }
-
-    public TestFile getGradleHomeDir() {
-        return gradleHomeDir;
-    }
-
-    @Override
-    protected ExecutionResult doRun() {
-        Map result = doRun(false);
-        return new ForkedExecutionResult(result);
-    }
-
-    @Override
-    protected ExecutionFailure doRunWithFailure() {
-        Map result = doRun(true);
-        return new ForkedExecutionFailure(result);
-    }
-
-    protected Map doRun(boolean expectFailure) {
-        gradleHomeDir.assertIsDir();
-
-        CommandBuilder commandBuilder = OperatingSystem.current().isWindows() ? new WindowsCommandBuilder()
-                : new UnixCommandBuilder();
-
-        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
-        ByteArrayOutputStream errStream = new ByteArrayOutputStream();
-
-        ExecHandleBuilder builder = new ExecHandleBuilder() {
-            @Override
-            public File getWorkingDir() {
-                // Override this, so that the working directory is not canonicalised. Some int tests require that
-                // the working directory is not canonicalised
-                return ForkingGradleExecuter.this.getWorkingDir();
-            }
-        };
-        builder.setStandardOutput(outStream);
-        builder.setErrorOutput(errStream);
-        builder.environment("GRADLE_HOME", "");
-        builder.environment("JAVA_HOME", System.getProperty("java.home"));
-        builder.environment("GRADLE_OPTS", "-ea");
-        builder.environment(getEnvironmentVars());
-        builder.workingDir(getWorkingDir());
-
-        commandBuilder.build(builder);
-
-        builder.args(getAllArgs());
-
-        LOG.info(String.format("Execute in %s with: %s %s", builder.getWorkingDir(), builder.getExecutable(),
-                builder.getArgs()));
-
-        ExecHandle proc = builder.build();
-        int exitValue = proc.start().waitForFinish().getExitValue();
-
-        String output = outStream.toString();
-        String error = errStream.toString();
-        boolean failed = exitValue != 0;
-
-        LOG.info("OUTPUT: " + output);
-        LOG.info("ERROR: " + error);
-
-        if (failed != expectFailure) {
-            String message = String.format("Gradle execution %s in %s with: %s %s%nOutput:%n%s%nError:%n%s%n-----%n",
-                    expectFailure ? "did not fail" : "failed", builder.getWorkingDir(), builder.getExecutable(),
-                    builder.getArgs(), output, error);
-            System.out.println(message);
-            throw new RuntimeException(message);
-        }
-        return GUtil.map("output", output, "error", error);
-    }
-
-    private interface CommandBuilder {
-        void build(ExecHandleBuilder builder);
-    }
-
-    private class WindowsCommandBuilder implements CommandBuilder {
-        public void build(ExecHandleBuilder builder) {
-            String cmd;
-            if (getExecutable() != null) {
-                cmd = getExecutable().replace('/', File.separatorChar);
-            } else {
-                cmd = "gradle";
-            }
-            builder.executable("cmd");
-            builder.args("/c", cmd);
-            String gradleHome = gradleHomeDir.getAbsolutePath();
-            builder.environment("Path", String.format("%s\\bin;%s", gradleHome, System.getenv("Path")));
-            builder.environment("GRADLE_EXIT_CONSOLE", "true");
-        }
-    }
-
-    private class UnixCommandBuilder implements CommandBuilder {
-        public void build(ExecHandleBuilder builder) {
-            if (getExecutable() != null) {
-                builder.executable(String.format("%s/%s", getWorkingDir().getAbsolutePath(), getExecutable()));
-            } else {
-                builder.executable(String.format("%s/bin/gradle", gradleHomeDir.getAbsolutePath()));
-            }
-        }
-    }
-
-    private static class ForkedExecutionResult extends AbstractExecutionResult {
-        private final Map result;
-        private final Pattern skippedTaskPattern = Pattern.compile("(:\\w+(:\\w+)*)\\s+((SKIPPED)|(UP-TO-DATE))");
-        private final Pattern notSkippedTaskPattern = Pattern.compile("(:\\w+(:\\w+)*)");
-
-        public ForkedExecutionResult(Map result) {
-            this.result = result;
-        }
-
-        public String getOutput() {
-            return result.get("output").toString();
-        }
-
-        public String getError() {
-            return result.get("error").toString();
-        }
-
-        public ExecutionResult assertTasksExecuted(String... taskPaths) {
-            throw new UnsupportedOperationException();
-        }
-
-        public ExecutionResult assertTasksSkipped(String... taskPaths) {
-            List<String> tasks = findTasks(skippedTaskPattern);
-            assertThat(tasks, equalTo(Arrays.asList(taskPaths)));
-            return this;
-        }
-
-        public ExecutionResult assertTasksNotSkipped(String... taskPaths) {
-            List<String> tasks = findTasks(notSkippedTaskPattern);
-            assertThat(tasks, equalTo(Arrays.asList(taskPaths)));
-            return this;
-        }
-
-        private List<String> findTasks(Pattern pattern) {
-            List<String> tasks = new ArrayList<String>();
-            BufferedReader reader = new BufferedReader(new StringReader(getOutput()));
-            String line;
-            try {
-                while ((line = reader.readLine()) != null) {
-                    java.util.regex.Matcher matcher = pattern.matcher(line);
-                    if (matcher.matches()) {
-                        tasks.add(matcher.group(1));
-                    }
-                }
-            } catch (IOException e) {
-                throw new RuntimeException(e);
-            }
-            return tasks;
-        }
-    }
-
-    private static class ForkedExecutionFailure extends ForkedExecutionResult implements ExecutionFailure {
-        public ForkedExecutionFailure(Map result) {
-            super(result);
-        }
-
-        public ExecutionFailure assertHasLineNumber(int lineNumber) {
-            assertThat(getError(), containsString(String.format(" line: %d", lineNumber)));
-            return this;
-        }
-
-        public ExecutionFailure assertHasFileName(String filename) {
-            assertThat(getError(), containsLine(startsWith(filename)));
-            return this;
-        }
-
-        public ExecutionFailure assertHasCause(String description) {
-            assertThatCause(startsWith(description));
-            return this;
-        }
-
-        public ExecutionFailure assertThatCause(final Matcher<String> matcher) {
-            assertThat(getError(), containsLine(new BaseMatcher<String>() {
-                public boolean matches(Object o) {
-                    String str = (String) o;
-                    String prefix = "Cause: ";
-                    return str.startsWith(prefix) && matcher.matches(str.substring(prefix.length()));
-                }
-
-                public void describeTo(Description description) {
-                    matcher.describeTo(description);
-                }
-            }));
-            return this;
-        }
-
-        public ExecutionFailure assertHasDescription(String context) {
-            assertThatDescription(startsWith(context));
-            return this;
-        }
-
-        public ExecutionFailure assertThatDescription(Matcher<String> matcher) {
-            assertThat(getError(), containsLine(matcher));
-            return this;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistribution.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistribution.java
deleted file mode 100644
index 551ded7..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistribution.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests.fixtures;
-
-import org.gradle.util.*;
-import org.junit.rules.MethodRule;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.Statement;
-
-import java.io.File;
-
-/**
- * Provides access to a Gradle distribution for integration testing.
- */
-public class GradleDistribution implements MethodRule, TestFileContext, BasicGradleDistribution {
-    private static final TestFile USER_HOME_DIR;
-    private static final TestFile GRADLE_HOME_DIR;
-    private static final TestFile SAMPLES_DIR;
-    private static final TestFile USER_GUIDE_OUTPUT_DIR;
-    private static final TestFile USER_GUIDE_INFO_DIR;
-    private static final TestFile DISTS_DIR;
-    private final TemporaryFolder temporaryFolder = new TemporaryFolder();
-    private TestFile userHome;
-
-    static {
-        String workerId = System.getProperty("org.gradle.test.worker", "1");
-        USER_HOME_DIR = file("integTest.gradleUserHomeDir", "intTestHomeDir").file(String.format("worker-%s", workerId));
-        GRADLE_HOME_DIR = file("integTest.gradleHomeDir", null);
-        SAMPLES_DIR = file("integTest.samplesdir", new File(GRADLE_HOME_DIR, "samples").getAbsolutePath());
-        USER_GUIDE_OUTPUT_DIR = file("integTest.userGuideOutputDir",
-                "subprojects/gradle-docs/src/samples/userguideOutput");
-        USER_GUIDE_INFO_DIR = file("integTest.userGuideInfoDir", "subprojects/gradle-docs/build/src");
-        DISTS_DIR = file("integTest.distsDir", "build/distributions");
-    }
-
-    public GradleDistribution() {
-        this.userHome = USER_HOME_DIR;
-    }
-
-    @Override
-    public String toString() {
-        return String.format("Gradle %s", new GradleVersion().getVersion());
-    }
-
-    public boolean worksWith(Jvm jvm) {
-        return jvm.isJava5Compatible();
-    }
-
-    public void requireOwnUserHomeDir() {
-        userHome = getTestDir().file("user-home");
-    }
-
-    public Statement apply(Statement base, FrameworkMethod method, Object target) {
-        return temporaryFolder.apply(base, method, target);
-    }
-
-    private static TestFile file(String propertyName, String defaultFile) {
-        String path = System.getProperty(propertyName, defaultFile);
-        if (path == null) {
-            throw new RuntimeException(String.format("You must set the '%s' property to run the integration tests.",
-                    propertyName));
-        }
-        return new TestFile(new File(path));
-    }
-
-    /**
-     * The user home dir used for the current test. This is usually shared with other tests unless
-     * {@link #requireOwnUserHomeDir()} is called.
-     */
-    public TestFile getUserHomeDir() {
-        return userHome;
-    }
-
-    /**
-     * The distribution for the current test. This is usually shared with other tests.
-     */
-    public TestFile getGradleHomeDir() {
-        return GRADLE_HOME_DIR;
-    }
-
-    public String getVersion() {
-        return new GradleVersion().getVersion();
-    }
-
-    public TestFile getBinDistribution() {
-        return getDistributionsDir().file(String.format("gradle-%s-bin.zip", getVersion()));
-    }
-
-    /**
-     * The samples from the distribution. These are usually shared with other tests.
-     */
-    public TestFile getSamplesDir() {
-        return SAMPLES_DIR;
-    }
-
-    public TestFile getUserGuideInfoDir() {
-        return USER_GUIDE_INFO_DIR;
-    }
-
-    public TestFile getUserGuideOutputDir() {
-        return USER_GUIDE_OUTPUT_DIR;
-    }
-
-    /**
-     * The directory containing the distribution Zips
-     */
-    public TestFile getDistributionsDir() {
-        return DISTS_DIR;
-    }
-
-    /**
-     * Returns true if the given file is either part of the distributions, samples, or test files.
-     */
-    public boolean isFileUnderTest(File file) {
-        return GRADLE_HOME_DIR.isSelfOrDescendent(file)
-                || SAMPLES_DIR.isSelfOrDescendent(file)
-                || getTestDir().isSelfOrDescendent(file)
-                || getUserHomeDir().isSelfOrDescendent(file);
-    }
-
-    /**
-     * Returns a scratch-pad directory for the current test. This directory is not shared with any other tests.
-     */
-    public TestFile getTestDir() {
-        return temporaryFolder.getDir();
-    }
-
-    public TemporaryFolder getTemporaryFolder() {
-        return temporaryFolder;
-    }
-
-    /**
-     * Returns a previous version of Gradle.
-     *
-     * @param version The Gradle version
-     * @return An executer
-     */
-    public BasicGradleDistribution previousVersion(String version) {
-        return new PreviousGradleVersionExecuter(this, version);
-    }
-
-    public GradleExecuter executer() {
-        return new GradleDistributionExecuter(this);
-    }
-
-    /**
-     * Returns a scratch-pad file for the current test. Equivalent to getTestDir().file(path)
-     */
-    public TestFile file(Object... path) {
-        return getTestDir().file(path);
-    }
-
-    /**
-     * Returns a scratch-pad file for the current test. Equivalent to getTestDir().file(path)
-     */
-    public TestFile testFile(Object... path) {
-        return getTestDir().file(path);
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistributionExecuter.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistributionExecuter.java
deleted file mode 100644
index 50321e4..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleDistributionExecuter.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.fixtures;
-
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.util.TestFile;
-import org.junit.rules.MethodRule;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.Statement;
-
-import java.io.File;
-
-/**
- * A Junit rule which provides a {@link GradleExecuter} implementation that executes Gradle using a given {@link
- * GradleDistribution}. If not supplied in the constructor, this rule locates a field on the test object with type
- * {@link GradleDistribution}.
- *
- * By default, this executer will execute Gradle in a forked process. There is a system property which enables executing
- * Gradle in the current process.
- */
-public class GradleDistributionExecuter extends AbstractGradleExecuter implements MethodRule {
-    private static final String EXECUTER_SYS_PROP = "org.gradle.integtest.executer";
-    private static final Executer EXECUTER;
-    private GradleDistribution dist;
-    private boolean workingDirSet;
-    private boolean userHomeSet;
-
-    private enum Executer {
-        forking, embedded, daemon
-    }
-
-    static {
-        EXECUTER = Executer.valueOf(System.getProperty(EXECUTER_SYS_PROP, Executer.forking.toString()).toLowerCase());
-    }
-
-    public GradleDistributionExecuter(GradleDistribution dist) {
-        this.dist = dist;
-        reset();
-    }
-
-    public GradleDistributionExecuter() {
-    }
-
-    public Statement apply(Statement base, FrameworkMethod method, Object target) {
-        if (dist == null) {
-            dist = RuleHelper.getField(target, GradleDistribution.class);
-        }
-        reset();
-        return base;
-    }
-
-    @Override
-    public GradleExecuter reset() {
-        super.reset();
-        workingDirSet = false;
-        userHomeSet = false;
-        return this;
-    }
-
-    @Override
-    public GradleExecuter inDirectory(File directory) {
-        super.inDirectory(directory);
-        workingDirSet = true;
-        return this;
-    }
-
-    @Override
-    public GradleExecuter withUserHomeDir(File userHomeDir) {
-        super.withUserHomeDir(userHomeDir);
-        userHomeSet = true;
-        return this;
-    }
-
-    @Override
-    protected ExecutionResult doRun() {
-        return checkResult(configureExecuter().run());
-    }
-
-    @Override
-    protected ExecutionFailure doRunWithFailure() {
-        return checkResult(configureExecuter().runWithFailure());
-    }
-
-    private <T extends ExecutionResult> T checkResult(T result) {
-        result.assertOutputHasNoStackTraces();
-        result.assertErrorHasNoStackTraces();
-        return result;
-    }
-
-    private GradleExecuter configureExecuter() {
-        if (!workingDirSet) {
-            inDirectory(dist.getTestDir());
-        }
-        if (!userHomeSet) {
-            withUserHomeDir(dist.getUserHomeDir());
-        }
-
-        if (!getClass().desiredAssertionStatus()) {
-            throw new RuntimeException("Assertions must be enabled when running integration tests.");
-        }
-
-        StartParameter parameter = new StartParameter();
-        parameter.setLogLevel(LogLevel.INFO);
-        parameter.setSearchUpwards(false);
-
-        InProcessGradleExecuter inProcessGradleExecuter = new InProcessGradleExecuter(parameter);
-        copyTo(inProcessGradleExecuter);
-
-        GradleExecuter returnedExecuter = inProcessGradleExecuter;
-
-        if (EXECUTER != Executer.embedded || !inProcessGradleExecuter.canExecute()) {
-            boolean useDaemon = EXECUTER == Executer.daemon && getExecutable() == null;
-            ForkingGradleExecuter forkingGradleExecuter = useDaemon ? new DaemonGradleExecuter(dist.getGradleHomeDir()) : new ForkingGradleExecuter(dist.getGradleHomeDir());
-            copyTo(forkingGradleExecuter);
-            returnedExecuter = forkingGradleExecuter;
-        }
-
-        boolean settingsFound = false;
-        for (
-                File dir = new TestFile(getWorkingDir()); dir != null && dist.isFileUnderTest(dir) && !settingsFound;
-                dir = dir.getParentFile()) {
-            if (new File(dir, "settings.gradle").isFile()) {
-                settingsFound = true;
-            }
-        }
-        if (settingsFound) {
-            returnedExecuter.withSearchUpwards();
-        }
-
-        return returnedExecuter;
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleExecuter.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleExecuter.java
deleted file mode 100644
index 3ab09c6..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/GradleExecuter.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.fixtures;
-
-import org.gradle.util.Jvm;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-public interface GradleExecuter {
-    GradleExecuter inDirectory(File directory);
-
-    /**
-     * Enables search upwards. Defaults to false.
-     */
-    GradleExecuter withSearchUpwards();
-
-    /**
-     * Sets the task names to execute. Defaults to an empty list.
-     */
-    GradleExecuter withTasks(String... names);
-
-    /**
-     * Sets the task names to execute. Defaults to an empty list.
-     */
-    GradleExecuter withTasks(List<String> names);
-
-    GradleExecuter withTaskList();
-
-    GradleExecuter withDependencyList();
-
-    GradleExecuter withQuietLogging();
-
-    /**
-     * Sets the additional command-line arguments to use when executing the build. Defaults to an empty list.
-     */
-    GradleExecuter withArguments(String... args);
-
-    /**
-     * Sets the additional command-line arguments to use when executing the build. Defaults to an empty list.
-     */
-    GradleExecuter withArguments(List<String> args);
-
-    GradleExecuter withEnvironmentVars(Map<String, ?> environment);
-
-    GradleExecuter usingSettingsFile(File settingsFile);
-
-    GradleExecuter usingInitScript(File initScript);
-
-    /**
-     * Uses the given build script
-     */
-    GradleExecuter usingBuildScript(File buildScript);
-
-    /**
-     * Uses the given build script
-     *
-     * @param scriptText The script text.
-     */
-    GradleExecuter usingBuildScript(String scriptText);
-
-    /**
-     * Sets the user home dir. Set to null to use the default user home dir.
-     */
-    GradleExecuter withUserHomeDir(File userHomeDir);
-
-    /**
-     * Sets the executable to use. Set to null to use the default executable (if any)
-     */
-    GradleExecuter usingExecutable(String script);
-
-    /**
-     * Executes the requested build, asserting that the build succeeds. Resets the configuration of this executer.
-     *
-     * @return The result.
-     */
-    ExecutionResult run();
-
-    /**
-     * Executes the requested build, asserting that the build fails. Resets the configuration of this executer.
-     *
-     * @return The result.
-     */
-    ExecutionFailure runWithFailure();
-
-    boolean worksWith(Jvm jvm);
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/InProcessGradleExecuter.java b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/InProcessGradleExecuter.java
deleted file mode 100644
index 8e9e9ef..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/InProcessGradleExecuter.java
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.integtests.fixtures;
-
-import junit.framework.AssertionFailedError;
-import org.gradle.BuildResult;
-import org.gradle.GradleLauncher;
-import org.gradle.StartParameter;
-import org.gradle.api.GradleException;
-import org.gradle.api.LocationAwareException;
-import org.gradle.api.Task;
-import org.gradle.api.execution.TaskExecutionGraph;
-import org.gradle.api.execution.TaskExecutionGraphListener;
-import org.gradle.api.execution.TaskExecutionListener;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.StandardOutputListener;
-import org.gradle.api.tasks.TaskState;
-import org.gradle.initialization.CommandLineParser;
-import org.gradle.initialization.DefaultCommandLineConverter;
-import org.hamcrest.Matcher;
-
-import java.io.File;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import static org.gradle.util.Matchers.containsLine;
-import static org.gradle.util.Matchers.hasMessage;
-import static org.gradle.util.WrapUtil.toList;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-public class InProcessGradleExecuter extends AbstractGradleExecuter {
-    private StartParameter parameter;
-
-    public InProcessGradleExecuter(StartParameter parameter) {
-        this.parameter = parameter;
-    }
-
-    @Override
-    public GradleExecuter reset() {
-        super.reset();
-        parameter = new StartParameter();
-        return this;
-    }
-
-    public StartParameter getParameter() {
-        return parameter;
-    }
-
-    @Override
-    public GradleExecuter inDirectory(File directory) {
-        parameter.setCurrentDir(directory);
-        return this;
-    }
-
-    @Override
-    public InProcessGradleExecuter withSearchUpwards() {
-        parameter.setSearchUpwards(true);
-        return this;
-    }
-
-    @Override
-    public GradleExecuter withTasks(List<String> names) {
-        parameter.setTaskNames(names);
-        return this;
-    }
-
-    @Override
-    public InProcessGradleExecuter withTaskList() {
-        parameter.setTaskNames(toList("tasks"));
-        return this;
-    }
-
-    @Override
-    public InProcessGradleExecuter withDependencyList() {
-        parameter.setTaskNames(toList("dependencies"));
-        return this;
-    }
-
-    @Override
-    public InProcessGradleExecuter usingSettingsFile(File settingsFile) {
-        parameter.setSettingsFile(settingsFile);
-        return this;
-    }
-
-    @Override
-    public GradleExecuter usingInitScript(File initScript) {
-        parameter.addInitScript(initScript);
-        return this;
-    }
-
-    @Override
-    public GradleExecuter usingBuildScript(File buildScript) {
-        parameter.setBuildFile(buildScript);
-        return this;
-    }
-
-    @Override
-    public GradleExecuter usingBuildScript(String scriptText) {
-        parameter.useEmbeddedBuildFile(scriptText);
-        return this;
-    }
-
-    @Override
-    public GradleExecuter withArguments(List<String> args) {
-        CommandLineParser parser = new CommandLineParser();
-        DefaultCommandLineConverter converter = new DefaultCommandLineConverter();
-        converter.configure(parser);
-        converter.convert(parser.parse(args), parameter);
-        return this;
-    }
-
-    @Override
-    public GradleExecuter withUserHomeDir(File userHomeDir) {
-        parameter.setGradleUserHomeDir(userHomeDir);
-        return this;
-    }
-
-    @Override
-    protected ExecutionResult doRun() {
-        OutputListenerImpl outputListener = new OutputListenerImpl();
-        OutputListenerImpl errorListener = new OutputListenerImpl();
-        BuildListenerImpl buildListener = new BuildListenerImpl();
-        BuildResult result = doRun(outputListener, errorListener, buildListener);
-        result.rethrowFailure();
-        return new InProcessExecutionResult(buildListener.executedTasks, buildListener.skippedTasks,
-                outputListener.toString(), errorListener.toString());
-    }
-
-    @Override
-    protected ExecutionFailure doRunWithFailure() {
-        OutputListenerImpl outputListener = new OutputListenerImpl();
-        OutputListenerImpl errorListener = new OutputListenerImpl();
-        BuildListenerImpl buildListener = new BuildListenerImpl();
-        try {
-            doRun(outputListener, errorListener, buildListener).rethrowFailure();
-            throw new AssertionFailedError("expected build to fail but it did not.");
-        } catch (GradleException e) {
-            return new InProcessExecutionFailure(buildListener.executedTasks, buildListener.skippedTasks,
-                    outputListener.writer.toString(), errorListener.writer.toString(), e);
-        }
-    }
-
-    private BuildResult doRun(final OutputListenerImpl outputListener, OutputListenerImpl errorListener,
-                              BuildListenerImpl listener) {
-        assertCanExecute();
-        if (isQuiet()) {
-            parameter.setLogLevel(LogLevel.QUIET);
-        }
-        GradleLauncher gradleLauncher = GradleLauncher.newInstance(parameter);
-        gradleLauncher.addListener(listener);
-        gradleLauncher.addStandardOutputListener(outputListener);
-        gradleLauncher.addStandardErrorListener(errorListener);
-        try {
-            return gradleLauncher.run();
-        } finally {
-            System.clearProperty("test.single");
-        }
-    }
-
-    public void assertCanExecute() {
-        assertNull(getExecutable());
-        assertTrue(getEnvironmentVars().isEmpty());
-    }
-
-    public boolean canExecute() {
-        try {
-            assertCanExecute();
-        } catch (AssertionError e) {
-            return false;
-        }
-        return true;
-    }
-
-    private static class BuildListenerImpl implements TaskExecutionGraphListener {
-        private final List<String> executedTasks = new ArrayList<String>();
-        private final List<String> skippedTasks = new ArrayList<String>();
-
-        public void graphPopulated(TaskExecutionGraph graph) {
-            List<Task> planned = new ArrayList<Task>(graph.getAllTasks());
-            graph.addTaskExecutionListener(new TaskListenerImpl(planned, executedTasks, skippedTasks));
-        }
-    }
-
-    private static class OutputListenerImpl implements StandardOutputListener {
-        private StringWriter writer = new StringWriter();
-
-        @Override
-        public String toString() {
-            return writer.toString();
-        }
-
-        public void onOutput(CharSequence output) {
-            writer.append(output);
-        }
-    }
-
-    private static class TaskListenerImpl implements TaskExecutionListener {
-        private final List<Task> planned;
-        private final List<String> executedTasks;
-        private final List<String> skippedTasks;
-        private Task current;
-
-        public TaskListenerImpl(List<Task> planned, List<String> executedTasks, List<String> skippedTasks) {
-            this.planned = planned;
-            this.executedTasks = executedTasks;
-            this.skippedTasks = skippedTasks;
-        }
-
-        public void beforeExecute(Task task) {
-            assertThat(current, nullValue());
-            assertTrue(planned.contains(task));
-            current = task;
-        }
-
-        public void afterExecute(Task task, TaskState state) {
-            assertThat(task, sameInstance(current));
-            current = null;
-            executedTasks.add(task.getPath());
-            if (state.getSkipped()) {
-                skippedTasks.add(task.getPath());
-            }
-        }
-    }
-
-    public static class InProcessExecutionResult extends AbstractExecutionResult {
-        private final List<String> plannedTasks;
-        private final List<String> skippedTasks;
-        private final String output;
-        private final String error;
-
-        public InProcessExecutionResult(List<String> plannedTasks, List<String> skippedTasks, String output,
-                                        String error) {
-            this.plannedTasks = plannedTasks;
-            this.skippedTasks = skippedTasks;
-            this.output = output;
-            this.error = error;
-        }
-
-        public String getOutput() {
-            return output;
-        }
-
-        public String getError() {
-            return error;
-        }
-
-        public ExecutionResult assertTasksExecuted(String... taskPaths) {
-            List<String> expected = Arrays.asList(taskPaths);
-            assertThat(plannedTasks, equalTo(expected));
-            return this;
-        }
-
-        public ExecutionResult assertTasksSkipped(String... taskPaths) {
-            List<String> expected = Arrays.asList(taskPaths);
-            assertThat(skippedTasks, equalTo(expected));
-            return this;
-        }
-
-        public ExecutionResult assertTasksNotSkipped(String... taskPaths) {
-            List<String> expected = Arrays.asList(taskPaths);
-            List<String> notSkipped = new ArrayList<String>(plannedTasks);
-            notSkipped.removeAll(skippedTasks);
-            assertThat(notSkipped, equalTo(expected));
-            return this;
-        }
-    }
-
-    private static class InProcessExecutionFailure extends InProcessExecutionResult implements ExecutionFailure {
-        private final GradleException failure;
-
-        public InProcessExecutionFailure(List<String> tasks, List<String> skippedTasks, String output, String error,
-                                         GradleException failure) {
-            super(tasks, skippedTasks, output, error);
-            this.failure = failure;
-        }
-
-        public ExecutionFailure assertHasLineNumber(int lineNumber) {
-            assertThat(failure.getMessage(), containsString(String.format(" line: %d", lineNumber)));
-            return this;
-
-        }
-
-        public ExecutionFailure assertHasFileName(String filename) {
-            assertThat(failure.getMessage(), startsWith(String.format("%s", filename)));
-            return this;
-        }
-
-        public ExecutionFailure assertHasCause(String description) {
-            assertThatCause(startsWith(description));
-            return this;
-        }
-
-        public ExecutionFailure assertThatCause(final Matcher<String> matcher) {
-            if (failure instanceof LocationAwareException) {
-                LocationAwareException exception = (LocationAwareException) failure;
-                assertThat(exception.getReportableCauses(), hasItem(hasMessage(matcher)));
-            } else {
-                assertThat(failure.getCause(), notNullValue());
-                assertThat(failure.getCause().getMessage(), matcher);
-            }
-            return this;
-        }
-
-        public ExecutionFailure assertHasDescription(String context) {
-            assertThatDescription(startsWith(context));
-            return this;
-        }
-
-        public ExecutionFailure assertThatDescription(Matcher<String> matcher) {
-            assertThat(failure.getMessage(), containsLine(matcher));
-            return this;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/PreviousGradleVersionExecuter.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/PreviousGradleVersionExecuter.groovy
deleted file mode 100644
index c805fc7..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/fixtures/PreviousGradleVersionExecuter.groovy
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.fixtures
-
-import org.gradle.util.Jvm
-import org.gradle.util.TestFile
-import org.gradle.util.GradleVersion
-import org.gradle.api.tasks.wrapper.internal.DistributionLocator
-
-public class PreviousGradleVersionExecuter extends AbstractGradleExecuter implements BasicGradleDistribution {
-    private final GradleDistribution dist
-    def final GradleVersion version
-
-    PreviousGradleVersionExecuter(GradleDistribution dist, String version) {
-        this.dist = dist
-        this.version = new GradleVersion(version)
-    }
-
-    def String toString() {
-        version.toString()
-    }
-
-    String getVersion() {
-        return version.version
-    }
-
-    @Override
-    boolean worksWith(Jvm jvm) {
-        return version == new GradleVersion('0.9-rc-1') ? jvm.isJava6Compatible() : jvm.isJava5Compatible()
-    }
-
-    protected ExecutionResult doRun() {
-        ForkingGradleExecuter executer = new ForkingGradleExecuter(gradleHomeDir)
-        executer.inDirectory(dist.testDir)
-        copyTo(executer)
-        return executer.run()
-    }
-
-    GradleExecuter executer() {
-        this
-    }
-
-    TestFile getBinDistribution() {
-        def zipFile = dist.userHomeDir.parentFile.file("gradle-$version.version-bin.zip")
-        if (!zipFile.isFile()) {
-            try {
-                URL url = binDistributionUrl
-                System.out.println("downloading $url");
-                zipFile.copyFrom(url)
-            } catch (Throwable t) {
-                zipFile.delete()
-                throw t
-            }
-        }
-        return zipFile
-    }
-
-    private URL getBinDistributionUrl() {
-        return new URL(new DistributionLocator().getDistributionFor(version))
-    }
-
-    def TestFile getGradleHomeDir() {
-        return findGradleHome()
-    }
-
-    private TestFile findGradleHome() {
-        // maybe download and unzip distribution
-        TestFile versionsDir = dist.distributionsDir.parentFile.file('previousVersions')
-        TestFile gradleHome = versionsDir.file("gradle-$version.version")
-        TestFile markerFile = gradleHome.file('ok.txt')
-        if (!markerFile.isFile()) {
-            TestFile zipFile = binDistribution
-            zipFile.usingNativeTools().unzipTo(versionsDir)
-            markerFile.touch()
-        }
-        return gradleHome
-    }
-
-    protected ExecutionFailure doRunWithFailure() {
-        throw new UnsupportedOperationException();
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenProjectIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenProjectIntegrationTest.groovy
deleted file mode 100644
index c3586f3..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenProjectIntegrationTest.groovy
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.maven
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.TestResources
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class MavenProjectIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final TestResources testResources = new TestResources()
-
-    @Test
-    public void handlesSubProjectsWithoutTheMavenPluginApplied() {
-        dist.testFile("settings.gradle").write("include 'subProject'");
-        dist.testFile("build.gradle") << '''
-            apply plugin: 'java'
-            apply plugin: 'maven'
-        '''
-        executer.withTaskList().run();
-    }
-
-    @Test
-    public void canDeployAProjectWithDependencyInMappedAndUnMappedConfiguration() {
-        executer.withTasks('uploadArchives').run()
-        def module = repo().module('group', 'root', 1.0)
-        module.assertArtifactsDeployed('root-1.0.jar')
-    }
-
-    @Test
-    public void canDeployAProjectWithNoMainArtifact() {
-        executer.withTasks('uploadArchives').run()
-        def module = repo().module('group', 'root', 1.0)
-        module.assertArtifactsDeployed('root-1.0-source.jar')
-    }
-
-    @Test
-    public void canDeployAProjectWithMetadataArtifacts() {
-        executer.withTasks('uploadArchives').run()
-        def module = repo().module('group', 'root', 1.0)
-        module.assertArtifactsDeployed('root-1.0.jar', 'root-1.0.jar.sig', 'root-1.0.pom', 'root-1.0.pom.sig')
-    }
-
-    def MavenRepository repo() {
-        new MavenRepository(dist.testFile('mavenRepo'))
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepoIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepoIntegrationTest.groovy
deleted file mode 100644
index 3d5c900..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/MavenRepoIntegrationTest.groovy
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-package org.gradle.integtests.maven
-
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.TestFile
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.integtests.DistributionIntegrationTestRunner
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class MavenRepoIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('mavenRepo')
-
-    @Test
-    public void mavenRepoSample() {
-        List expectedFiles = ['sillyexceptions-1.0.1.jar', 'repotest-1.0.jar', 'testdep-1.0.jar', 'testdep2-1.0.jar',
-                'classifier-1.0-jdk15.jar', 'classifier-dep-1.0.jar', 'jaronly-1.0.jar']
-
-        File projectDir = sample.dir
-        executer.inDirectory(projectDir).withTasks('retrieve').run()
-        expectedFiles.each { new TestFile(projectDir, 'build', it).assertExists() }
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenPomGenerationIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenPomGenerationIntegrationTest.groovy
deleted file mode 100644
index cddacb3..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenPomGenerationIntegrationTest.groovy
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.maven
-
-import groovy.text.SimpleTemplateEngine
-import org.custommonkey.xmlunit.Diff
-import org.custommonkey.xmlunit.XMLAssert
-import org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.Resources
-import org.gradle.util.TestFile
-import org.hamcrest.Matchers
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.integtests.DistributionIntegrationTestRunner
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesMavenPomGenerationIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    private TestFile pomProjectDir
-    private TestFile repoDir
-    private TestFile snapshotRepoDir
-
-    @Rule public Resources resources = new Resources();
-    @Rule public final Sample sample = new Sample('maven/pomGeneration')
-
-    @Before
-    public void setUp() {
-        pomProjectDir = sample.dir
-        repoDir = pomProjectDir.file('pomRepo');
-        snapshotRepoDir = pomProjectDir.file('snapshotRepo');
-    }
-    
-    @Test
-    public void checkWithNoCustomVersion() {
-        String version = '1.0'
-        String groupId = "gradle"
-        long start = System.currentTimeMillis();
-        executer.inDirectory(pomProjectDir).withTasks('clean', 'uploadArchives', 'install').run()
-        String repoPath = repoPath(groupId, version)
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId),
-                pomFile(repoDir, repoPath, version).text)
-        repoDir.file("$repoPath/mywar-${version}.war").assertIsFile()
-        pomProjectDir.file('build').assertDoesNotExist()
-        pomProjectDir.file('target').assertIsDir()
-        checkInstall(start, pomProjectDir, version, groupId)
-    }
-
-    @Test
-    public void checkWithCustomVersion() {
-        long start = System.currentTimeMillis();
-        String version = "1.0MVN"
-        String groupId = "deployGroup"
-        executer.inDirectory(pomProjectDir).withArguments("-PcustomVersion=${version}").withTasks('clean', 'uploadArchives', 'install').run()
-        String repoPath = repoPath(groupId, version)
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId),
-                pomFile(repoDir, repoPath, version).text)
-        repoDir.file("$repoPath/mywar-${version}.war").assertIsFile()
-        repoDir.file("$repoPath/mywar-${version}-javadoc.zip").assertIsFile()
-        pomProjectDir.file('build').assertDoesNotExist()
-        pomProjectDir.file('target').assertIsDir()
-        checkInstall(start, pomProjectDir, version, 'installGroup')
-    }
-
-    @Test
-    public void checkWithSnapshotVersion() {
-        String version = '1.0-SNAPSHOT'
-        String groupId = "deployGroup"
-        long start = System.currentTimeMillis();
-        executer.inDirectory(pomProjectDir).withArguments("-PcustomVersion=${version}").withTasks('clean', 'uploadArchives', 'install').run()
-        String repoPath = repoPath(groupId, version)
-        File pomFile = pomFile(snapshotRepoDir, repoPath, version)
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId), pomFile.text)
-        new TestFile(new File(pomFile.absolutePath.replace(".pom", ".war"))).assertIsFile()
-        pomProjectDir.file('build').assertDoesNotExist()
-        pomProjectDir.file('target').assertIsDir()
-        checkInstall(start, pomProjectDir, version, 'installGroup')
-    }
-
-    @Test
-    public void writeNewPom() {
-        executer.inDirectory(pomProjectDir).withTasks('clean', 'writeNewPom').run()
-        compareXmlWithIgnoringOrder(expectedPom(null, null, 'pomGeneration/expectedNewPom.txt'),
-                pomProjectDir.file("target/newpom.xml").text)
-    }
-
-    @Test
-    public void writeDeployerPom() {
-        String version = '1.0'
-        String groupId = "gradle"
-        executer.inDirectory(pomProjectDir).withTasks('clean', 'writeDeployerPom').run()
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId), pomProjectDir.file("target/deployerpom.xml").text)
-    }
-    
-    static String repoPath(String group, String version) {
-        "$group/mywar/$version"
-    }
-
-    static File pomFile(TestFile repoDir, String repoPath, String version) {
-        TestFile versionDir = repoDir.file(repoPath)
-        List matches = versionDir.listFiles().findAll { it.name.endsWith('.pom') }
-        assertEquals(1, matches.size())
-        matches[0]
-    }
-
-    void checkInstall(long start, TestFile pomProjectDir, String version, String groupId) {
-        TestFile localMavenRepo = new TestFile(pomProjectDir.file("target/localRepoPath.txt").text as File)
-        TestFile installedFile = localMavenRepo.file("$groupId/mywar/$version/mywar-${version}.war")
-        TestFile installedJavadocFile = localMavenRepo.file("$groupId/mywar/$version/mywar-${version}-javadoc.zip")
-        TestFile installedPom = localMavenRepo.file("$groupId/mywar/$version/mywar-${version}.pom")
-        installedFile.assertIsFile()
-        installedJavadocFile.assertIsFile()
-        installedPom.assertIsFile()
-        Assert.assertTrue(start <= installedFile.lastModified());
-        Assert.assertTrue(start <= installedJavadocFile.lastModified());
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId), installedPom.text)
-    }
-    
-    private String expectedPom(String version, String groupId, String path = 'pomGeneration/expectedPom.txt') {
-        SimpleTemplateEngine templateEngine = new SimpleTemplateEngine();
-        String text = resources.getResource(path).text
-        return templateEngine.createTemplate(text).make(version: version, groupId: groupId)
-    }
-
-    private static void compareXmlWithIgnoringOrder(String expectedXml, String actualXml) {
-        Diff diff = new Diff(expectedXml, actualXml)
-        diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier())
-        XMLAssert.assertXMLEqual(diff, true);
-        Assert.assertThat(actualXml, Matchers.startsWith(String.format('<?xml version="1.0" encoding="UTF-8"?>')))
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenQuickstartIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenQuickstartIntegrationTest.groovy
deleted file mode 100644
index 9d3f2b4..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/maven/SamplesMavenQuickstartIntegrationTest.groovy
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.maven
-
-import groovy.text.SimpleTemplateEngine
-import org.custommonkey.xmlunit.Diff
-import org.custommonkey.xmlunit.XMLAssert
-import org.custommonkey.xmlunit.examples.RecursiveElementNameAndTextQualifier
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.util.Resources
-import org.gradle.util.TestFile
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.junit.Assert.*
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.integtests.DistributionIntegrationTestRunner
-
-/**
- * @author Hans Dockter
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class SamplesMavenQuickstartIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-
-    private TestFile pomProjectDir
-    private TestFile repoDir
-
-    @Rule public Resources resources = new Resources();
-    @Rule public final Sample sample = new Sample('maven/quickstart')
-
-    @Before
-    public void setUp() {
-        pomProjectDir = sample.dir
-        repoDir = pomProjectDir.file('pomRepo');
-    }
-
-    @Test
-    public void checkDeployAndInstall() {
-        String version = '1.0'
-        String groupId = "gradle"
-        long start = System.currentTimeMillis();
-        executer.inDirectory(pomProjectDir).withTasks('clean', 'uploadArchives', 'install').run()
-        String repoPath = repoPath(groupId, version)
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId),
-                pomFile(repoDir, repoPath, version).text)
-        repoDir.file("$repoPath/quickstart-${version}.jar").assertIsFile()
-        checkInstall(start, pomProjectDir, version, groupId)
-    }
-
-    static String repoPath(String group, String version) {
-        "$group/quickstart/$version"
-    }
-
-    static File pomFile(TestFile repoDir, String repoPath, String version) {
-        TestFile versionDir = repoDir.file(repoPath)
-        List matches = versionDir.listFiles().findAll { it.name.endsWith('.pom') }
-        assertEquals(1, matches.size())
-        matches[0]
-    }
-
-    void checkInstall(long start, TestFile pomProjectDir, String version, String groupId) {
-        TestFile localMavenRepo = new TestFile(pomProjectDir.file("build/localRepoPath.txt").text as File)
-        TestFile installedFile = localMavenRepo.file("$groupId/quickstart/$version/quickstart-${version}.jar")
-        TestFile installedPom = localMavenRepo.file("$groupId/quickstart/$version/quickstart-${version}.pom")
-        installedFile.assertIsFile()
-        installedPom.assertIsFile()
-        Assert.assertTrue(start <= installedFile.lastModified());
-        compareXmlWithIgnoringOrder(expectedPom(version, groupId), installedPom.text)
-    }
-
-    private String expectedPom(String version, String groupId) {
-        SimpleTemplateEngine templateEngine = new SimpleTemplateEngine();
-        String text = resources.getResource('pomGeneration/expectedQuickstartPom.txt').text
-        return templateEngine.createTemplate(text).make(version: version, groupId: groupId)
-    }
-
-    private static void compareXmlWithIgnoringOrder(String expectedXml, String actualXml) {
-        Diff diff = new Diff(expectedXml, actualXml)
-        diff.overrideElementQualifier(new RecursiveElementNameAndTextQualifier())
-        XMLAssert.assertXMLEqual(diff, true);
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/SampleTestNGIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/SampleTestNGIntegrationTest.groovy
deleted file mode 100644
index aae10a7..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/SampleTestNGIntegrationTest.groovy
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.integtests.testng
-
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.integtests.fixtures.UsesSample
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
-/**
- * @author Tom Eyckmans
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-public class SampleTestNGIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample()
-
-    @Test @UsesSample('testng/suitexmlbuilder')
-    public void suiteXmlBuilder() {
-        executer.inDirectory(sample.dir).withTasks('clean', 'test').run()
-
-        def result = new TestNGExecutionResult(sample.dir)
-        result.assertTestClassesExecuted('org.gradle.testng.UserImplTest')
-        result.testClass('org.gradle.testng.UserImplTest').assertTestsExecuted('testOkFirstName')
-        result.testClass('org.gradle.testng.UserImplTest').assertTestPassed('testOkFirstName')
-    }
-
-    @Test @UsesSample('testng/java-jdk14-passing')
-    public void javaJdk14Passing() {
-        executer.inDirectory(sample.dir).withTasks('clean', 'test').run()
-
-        def result = new TestNGExecutionResult(sample.dir)
-        result.assertTestClassesExecuted('org.gradle.OkTest')
-        result.testClass('org.gradle.OkTest').assertTestPassed('passingTest')
-    }
-    
-    @Test @UsesSample('testng/java-jdk15-passing')
-    public void javaJdk15Passing() {
-        executer.inDirectory(sample.dir).withTasks('clean', 'test').run()
-
-        def result = new TestNGExecutionResult(sample.dir)
-        result.assertTestClassesExecuted('org.gradle.OkTest', 'org.gradle.ConcreteTest', 'org.gradle.SuiteSetup', 'org.gradle.SuiteCleanup', 'org.gradle.TestSetup', 'org.gradle.TestCleanup')
-        result.testClass('org.gradle.OkTest').assertTestsExecuted('passingTest', 'expectedFailTest')
-        result.testClass('org.gradle.OkTest').assertTestPassed('passingTest')
-        result.testClass('org.gradle.OkTest').assertTestPassed('expectedFailTest')
-        result.testClass('org.gradle.ConcreteTest').assertTestsExecuted('ok', 'alsoOk')
-        result.testClass('org.gradle.ConcreteTest').assertTestPassed('ok')
-        result.testClass('org.gradle.ConcreteTest').assertTestPassed('alsoOk')
-        result.testClass('org.gradle.SuiteSetup').assertConfigMethodPassed('setupSuite')
-        result.testClass('org.gradle.SuiteCleanup').assertConfigMethodPassed('cleanupSuite')
-        result.testClass('org.gradle.TestSetup').assertConfigMethodPassed('setupTest')
-        result.testClass('org.gradle.TestCleanup').assertConfigMethodPassed('cleanupTest')
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationTest.groovy b/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationTest.groovy
deleted file mode 100644
index 4fcd9a6..0000000
--- a/subprojects/gradle-core/src/integTest/groovy/org/gradle/integtests/testng/TestNGIntegrationTest.groovy
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.integtests.testng
-
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.ExecutionResult
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.TestResources
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.gradle.util.Matchers.containsLine
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.assertThat
-
-/**
- * @author Tom Eyckmans
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-public class TestNGIntegrationTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final TestResources resources = new TestResources()
-
-    @Test
-    public void executesTestsInCorrectEnvironment() {
-        ExecutionResult result = executer.withTasks('test').run();
-
-        assertThat(result.output, not(containsString('stdout')))
-        assertThat(result.error, not(containsString('stderr')))
-        assertThat(result.error, not(containsString('a warning')))
-
-        new TestNGExecutionResult(dist.testDir).testClass('org.gradle.OkTest').assertTestPassed('ok')
-    }
-
-    @Test
-    public void canListenForTestResults() {
-        ExecutionResult result = executer.withTasks("test").run();
-
-        assertThat(result.getOutput(), containsLine("START [tests] []"));
-        assertThat(result.getOutput(), containsLine("FINISH [tests] []"));
-        assertThat(result.getOutput(), containsLine("START [test process 'Gradle Worker 1'] [Gradle Worker 1]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test process 'Gradle Worker 1'] [Gradle Worker 1]"));
-        assertThat(result.getOutput(), containsLine("START [test 'Gradle test'] [Gradle test]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test 'Gradle test'] [Gradle test]"));
-        assertThat(result.getOutput(), containsLine("START [test method pass(SomeTest)] [pass]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test method pass(SomeTest)] [pass] [null]"));
-        assertThat(result.getOutput(), containsLine("START [test method fail(SomeTest)] [fail]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test method fail(SomeTest)] [fail] [java.lang.AssertionError]"));
-        assertThat(result.getOutput(), containsLine("START [test method knownError(SomeTest)] [knownError]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test method knownError(SomeTest)] [knownError] [java.lang.RuntimeException: message]"));
-        assertThat(result.getOutput(), containsLine("START [test method unknownError(SomeTest)] [unknownError]"));
-        assertThat(result.getOutput(), containsLine("FINISH [test method unknownError(SomeTest)] [unknownError] [org.gradle.messaging.remote.internal.PlaceholderException: AppException: null]"));
-    }
-
-    @Test
-    public void groovyJdk15Failing() {
-        executer.withTasks("test").runWithFailure().assertThatCause(startsWith('There were failing tests'))
-
-        def result = new TestNGExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.BadTest')
-        result.testClass('org.gradle.BadTest').assertTestFailed('failingTest', equalTo('broken'))
-    }
-
-    @Test
-    public void groovyJdk15Passing() {
-        executer.withTasks("test").run()
-
-        def result = new TestNGExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.OkTest')
-        result.testClass('org.gradle.OkTest').assertTestPassed('passingTest')
-    }
-
-    @Test
-    public void javaJdk14Failing() {
-        executer.withTasks("test").runWithFailure().assertThatCause(startsWith('There were failing tests'))
-
-        def result = new TestNGExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.BadTest')
-        result.testClass('org.gradle.BadTest').assertTestFailed('failingTest', equalTo('broken'))
-    }
-
-    @Test
-    public void javaJdk15Failing() {
-        def execution = executer.withTasks("test").runWithFailure().assertThatCause(startsWith('There were failing tests'))
-
-        def result = new TestNGExecutionResult(dist.testDir)
-        result.assertTestClassesExecuted('org.gradle.BadTest', 'org.gradle.TestWithBrokenSetup', 'org.gradle.BrokenAfterSuite', 'org.gradle.TestWithBrokenMethodDependency')
-        result.testClass('org.gradle.BadTest').assertTestFailed('failingTest', equalTo('broken'))
-        result.testClass('org.gradle.TestWithBrokenSetup').assertConfigMethodFailed('setup')
-        result.testClass('org.gradle.BrokenAfterSuite').assertConfigMethodFailed('cleanup')
-        result.testClass('org.gradle.TestWithBrokenMethodDependency').assertTestFailed('broken', equalTo('broken'))
-        result.testClass('org.gradle.TestWithBrokenMethodDependency').assertTestSkipped('okTest')
-        assertThat(execution.error, containsString('Test org.gradle.BadTest FAILED'))
-        assertThat(execution.error, containsString('Test org.gradle.TestWithBrokenSetup FAILED'))
-        assertThat(execution.error, containsString('Test org.gradle.BrokenAfterSuite FAILED'))
-        assertThat(execution.error, containsString('Test org.gradle.TestWithBrokenMethodDependency FAILED'))
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiClasspath.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiClasspath.xml
deleted file mode 100644
index 8379abf..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiClasspath.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<classpath>
-  <classpathentry kind="output" path="build/classes/main"/>
-  <classpathentry output="build/classes/integTest" kind="src" path="src/integTest/java"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/resources"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
-  <classpathentry output="build/classes/test" kind="src" path="src/test/resources"/>
-  <classpathentry output="build/classes/test" kind="src" path="src/test/java"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
-  <classpathentry sourcepath="@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar" kind="lib" path="@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar" exported="true"/>
-  <classpathentry sourcepath="@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar" kind="lib" path="@CACHE_DIR@/junit/junit/jars/junit-4.7.jar" exported="true"/>
-</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiProject.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiProject.xml
deleted file mode 100644
index dc51005..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/apiProject.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<projectDescription>
-  <name>
-    api
-  </name>
-  <comment/>
-  <projects/>
-  <natures>
-    <nature>
-      org.eclipse.jdt.core.javanature
-    </nature>
-  </natures>
-  <buildSpec>
-    <buildCommand>
-      <name>
-        org.eclipse.jdt.core.javabuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectClasspath.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectClasspath.xml
deleted file mode 100644
index 0cd7c47..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectClasspath.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<classpath>
-  <classpathentry kind="output" path="build/classes/main"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/resources"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/groovy"/>
-  <classpathentry output="build/classes/test" kind="src" path="src/test/resources"/>
-  <classpathentry output="build/classes/test" kind="src" path="src/test/java"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
-  <classpathentry sourcepath="@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar" kind="lib" path="@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar" exported="true"/>
-  <classpathentry sourcepath="@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar" kind="lib" path="@CACHE_DIR@/junit/junit/jars/junit-4.7.jar" exported="true"/>
-</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectProject.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectProject.xml
deleted file mode 100644
index 536a6ba..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/groovyprojectProject.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<projectDescription>
-  <name>
-    groovyproject
-  </name>
-  <comment/>
-  <projects/>
-  <natures>
-    <nature>
-      org.eclipse.jdt.groovy.core.groovyNature
-    </nature>
-    <nature>
-      org.eclipse.jdt.core.javanature
-    </nature>
-  </natures>
-  <buildSpec>
-    <buildCommand>
-      <name>
-        org.eclipse.jdt.core.javabuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectClasspath.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectClasspath.xml
deleted file mode 100644
index 16ab909..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectClasspath.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<classpath>
-  <classpathentry kind="output" path="build/eclipse"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
-</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectProject.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectProject.xml
deleted file mode 100644
index 35e4b3f..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/javabaseprojectProject.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<projectDescription>
-  <name>
-    javabaseproject
-  </name>
-  <comment/>
-  <projects/>
-  <natures>
-    <nature>
-      org.eclipse.jdt.core.javanature
-    </nature>
-  </natures>
-  <buildSpec>
-    <buildCommand>
-      <name>
-        org.eclipse.jdt.core.javabuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/masterProject.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/masterProject.xml
deleted file mode 100644
index a072ffa..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/masterProject.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<projectDescription>
-  <name>
-    master
-  </name>
-  <comment/>
-  <projects/>
-  <natures/>
-  <buildSpec/>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Classpath.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Classpath.xml
deleted file mode 100644
index 515fd4a..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Classpath.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<classpath>
-  <classpathentry kind="output" path="build/classes/main"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
-</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Project.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Project.xml
deleted file mode 100644
index 5c77ba6..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6Project.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<projectDescription>
-  <name>
-    webAppJava6
-  </name>
-  <comment/>
-  <projects/>
-  <natures>
-    <nature>
-      org.eclipse.jdt.core.javanature
-    </nature>
-    <nature>
-      org.eclipse.wst.common.project.facet.core.nature
-    </nature>
-    <nature>
-      org.eclipse.wst.common.modulecore.ModuleCoreNature
-    </nature>
-  </natures>
-  <buildSpec>
-    <buildCommand>
-      <name>
-        org.eclipse.jdt.core.javabuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-    <buildCommand>
-      <name>
-        org.eclipse.wst.common.project.facet.core.builder
-      </name>
-      <arguments/>
-    </buildCommand>
-    <buildCommand>
-      <name>
-        org.eclipse.wst.validation.validationbuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpComponent.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpComponent.xml
deleted file mode 100644
index ecbfcc9..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpComponent.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<project-modules id="moduleCoreId" project-version="2.0">
-  <wb-module deploy-name="webAppJava6">
-    <property name="java-output-path" value="build/classes/main"/>
-    <property name="context-root" value="webAppJava6"/>
-    <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
-    <wb-resource deploy-path="/" source-path="src/main/webapp"/>
-  </wb-module>
-</project-modules>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpFacet.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpFacet.xml
deleted file mode 100644
index f5458de..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppJava6WtpFacet.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<faceted-project>
-  <fixed facet="jst.java"/>
-  <fixed facet="jst.web"/>
-  <installed facet="jst.web" version="2.4"/>
-  <installed facet="jst.java" version="6.0"/>
-</faceted-project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsClasspath.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsClasspath.xml
deleted file mode 100644
index 530e2ba..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsClasspath.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<classpath>
-  <classpathentry kind="output" path="build/classes/main"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
-  <classpathentry sourcepath="GRADLE_USER_HOME/cache/commons-lang/commons-lang/sources/commons-lang-2.5-sources.jar" kind="var" path="GRADLE_USER_HOME/cache/commons-lang/commons-lang/jars/commons-lang-2.5.jar" exported="true">
-    <attributes>
-      <attribute name="javadoc_location" value="GRADLE_USER_HOME/cache/commons-lang/commons-lang/javadocs/commons-lang-2.5-javadoc.jar"/>
-    </attributes>
-  </classpathentry>
-  <classpathentry sourcepath="GRADLE_USER_HOME/cache/junit/junit/sources/junit-4.7-sources.jar" kind="var" path="GRADLE_USER_HOME/cache/junit/junit/jars/junit-4.7.jar" exported="true"/>
-</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsProject.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsProject.xml
deleted file mode 100644
index def9ae5..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsProject.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<projectDescription>
-  <name>
-    webAppWithVars
-  </name>
-  <comment/>
-  <projects/>
-  <natures>
-    <nature>
-      org.eclipse.jdt.core.javanature
-    </nature>
-    <nature>
-      org.eclipse.wst.common.project.facet.core.nature
-    </nature>
-    <nature>
-      org.eclipse.wst.common.modulecore.ModuleCoreNature
-    </nature>
-  </natures>
-  <buildSpec>
-    <buildCommand>
-      <name>
-        org.eclipse.jdt.core.javabuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-    <buildCommand>
-      <name>
-        org.eclipse.wst.common.project.facet.core.builder
-      </name>
-      <arguments/>
-    </buildCommand>
-    <buildCommand>
-      <name>
-        org.eclipse.wst.validation.validationbuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpComponent.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpComponent.xml
deleted file mode 100644
index 4414d7f..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpComponent.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<project-modules id="moduleCoreId" project-version="2.0">
-  <wb-module deploy-name="webAppWithVars">
-    <property name="java-output-path" value="build/classes/main"/>
-    <property name="context-root" value="webAppWithVars"/>
-    <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
-    <wb-resource deploy-path="/" source-path="src/main/webapp"/>
-    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/GRADLE_USER_HOME//cache/commons-lang/commons-lang/jars/commons-lang-2.5.jar">
-      <dependency-type>
-        uses
-      </dependency-type>
-    </dependent-module>
-  </wb-module>
-</project-modules>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpFacet.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpFacet.xml
deleted file mode 100644
index b5a7e31..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webAppWithVarsWtpFacet.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<faceted-project>
-  <fixed facet="jst.java"/>
-  <fixed facet="jst.web"/>
-  <installed facet="jst.web" version="2.4"/>
-  <installed facet="jst.java" version="5.0"/>
-</faceted-project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceClasspath.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceClasspath.xml
deleted file mode 100644
index 85049f1..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceClasspath.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<classpath>
-  <classpathentry kind="output" path="build/classes/main"/>
-  <classpathentry output="build/classes/main" kind="src" path="src/main/java"/>
-  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
-  <classpathentry kind="src" path="/api" exported="true"/>
-  <classpathentry sourcepath="@CACHE_DIR@/commons-lang/commons-lang/sources/commons-lang-2.5-sources.jar" kind="lib" path="@CACHE_DIR@/commons-lang/commons-lang/jars/commons-lang-2.5.jar" exported="true">
-    <attributes>
-      <attribute name="javadoc_location" value="@CACHE_DIR@/commons-lang/commons-lang/javadocs/commons-lang-2.5-javadoc.jar"/>
-    </attributes>
-  </classpathentry>
-  <classpathentry sourcepath="@CACHE_DIR@/commons-io/commons-io/sources/commons-io-1.2-sources.jar" kind="lib" path="@CACHE_DIR@/commons-io/commons-io/jars/commons-io-1.2.jar" exported="true">
-    <attributes>
-      <attribute name="javadoc_location" value="@CACHE_DIR@/commons-io/commons-io/javadocs/commons-io-1.2-javadoc.jar"/>
-    </attributes>
-  </classpathentry>
-  <classpathentry sourcepath="@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar" kind="lib" path="@CACHE_DIR@/junit/junit/jars/junit-4.7.jar" exported="true"/>
-  <classpathentry sourcepath="@CACHE_DIR@/org.slf4j/slf4j-api/sources/slf4j-api-1.5.8-sources.jar" kind="lib" path="@CACHE_DIR@/org.slf4j/slf4j-api/jars/slf4j-api-1.5.8.jar" exported="true"/>
-</classpath>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceProject.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceProject.xml
deleted file mode 100644
index ce3f506..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceProject.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<projectDescription>
-  <name>
-    webservice
-  </name>
-  <comment/>
-  <projects/>
-  <natures>
-    <nature>
-      org.eclipse.jdt.core.javanature
-    </nature>
-    <nature>
-      org.eclipse.wst.common.project.facet.core.nature
-    </nature>
-    <nature>
-      org.eclipse.wst.common.modulecore.ModuleCoreNature
-    </nature>
-  </natures>
-  <buildSpec>
-    <buildCommand>
-      <name>
-        org.eclipse.jdt.core.javabuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-    <buildCommand>
-      <name>
-        org.eclipse.wst.common.project.facet.core.builder
-      </name>
-      <arguments/>
-    </buildCommand>
-    <buildCommand>
-      <name>
-        org.eclipse.wst.validation.validationbuilder
-      </name>
-      <arguments/>
-    </buildCommand>
-  </buildSpec>
-  <links/>
-</projectDescription>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpComponent.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpComponent.xml
deleted file mode 100644
index 5cb8a4e..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpComponent.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<project-modules id="moduleCoreId" project-version="2.0">
-  <wb-module deploy-name="webservice">
-    <property name="context-root" value="webservice"/>
-    <property name="java-output-path" value="build/classes/main"/>
-    <wb-resource deploy-path="/WEB-INF/classes" source-path="src/main/java"/>
-    <wb-resource deploy-path="/" source-path="src/main/webapp"/>
-    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/resource/api/api">
-      <dependency-type>
-        uses
-      </dependency-type>
-    </dependent-module>
-    <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/@CACHE_DIR@/commons-lang/commons-lang/jars/commons-lang-2.5.jar">
-      <dependency-type>
-        uses
-      </dependency-type>
-    </dependent-module>
-  </wb-module>
-</project-modules>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpFacet.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpFacet.xml
deleted file mode 100644
index b5a7e31..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/EclipseIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webserviceWtpFacet.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<faceted-project>
-  <fixed facet="jst.java"/>
-  <fixed facet="jst.web"/>
-  <installed facet="jst.web" version="2.4"/>
-  <installed facet="jst.java" version="5.0"/>
-</faceted-project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/canExecuteCommands.gradle b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/canExecuteCommands.gradle
deleted file mode 100644
index f5c6f01..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/canExecuteCommands.gradle
+++ /dev/null
@@ -1,33 +0,0 @@
-apply plugin: 'java'
-
-defaultTasks 'execTask', 'execByMethod'
-
-task execTask(type: Exec) {
-    dependsOn sourceSets.main.runtimeClasspath
-    testFile = file("$buildDir/$name")
-    executable = Jvm.current().getJavaExecutable()
-    workingDir = buildDir
-    args '-cp', sourceSets.main.runtimeClasspath.asPath, 'org.gradle.TestMain', testFile.name
-    doFirst {
-        mkdir buildDir
-    }
-    doLast {
-        assert testFile.exists()
-    }
-}
-
-task execByMethod {
-    dependsOn sourceSets.main.runtimeClasspath
-    testFile = file("$buildDir/$name")
-    doFirst {
-        mkdir buildDir
-        exec {
-            executable = Jvm.current().getJavaExecutable()
-            workingDir = buildDir
-            args '-cp', sourceSets.main.runtimeClasspath.asPath, 'org.gradle.TestMain', testFile.name
-        }
-    }
-    doLast {
-        assert testFile.exists()
-    }
-}
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/src/main/java/org/gradle/TestMain.java b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/src/main/java/org/gradle/TestMain.java
deleted file mode 100644
index 40778ca..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteCommands/src/main/java/org/gradle/TestMain.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.gradle;
-
-import java.io.File;
-
-public class TestMain {
-    public static void main(String[] args) throws Exception {
-        new File(args[0]).createNewFile();
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/canExecuteJava.gradle b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/canExecuteJava.gradle
deleted file mode 100644
index 04ab680..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/canExecuteJava.gradle
+++ /dev/null
@@ -1,27 +0,0 @@
-apply plugin: 'java'
-
-defaultTasks 'javaexecTask', 'javaexecByMethod'
-
-task javaexecTask(type: JavaExec, dependsOn: classes) {
-    testFile = file("$buildDir/$name")
-    classpath(sourceSets.main.classesDir)
-    main = 'org.gradle.TestMain'
-    args testFile.absolutePath
-    doLast {
-        assert testFile.exists()
-    }
-}
-
-task javaexecByMethod(dependsOn: classes) {
-    testFile = file("$buildDir/$name")
-    doFirst {
-        javaexec {
-            classpath(sourceSets.main.classesDir)
-            main = 'org.gradle.TestMain'
-            args testFile.absolutePath
-        }
-    }
-    doLast {
-        assert testFile.exists()
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/src/main/java/org/gradle/TestMain.java b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/src/main/java/org/gradle/TestMain.java
deleted file mode 100644
index 40778ca..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/ExecIntegrationTest/canExecuteJava/src/main/java/org/gradle/TestMain.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.gradle;
-
-import java.io.File;
-
-public class TestMain {
-    public static void main(String[] args) throws Exception {
-        new File(args[0]).createNewFile();
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/api/api.iml.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/api/api.iml.xml
deleted file mode 100644
index a5fe291..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/api/api.iml.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <exclude-output/>
-    <orderEntry type="inheritedJdk"/>
-    <content url="file://$MODULE_DIR$/">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
-      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
-      <excludeFolder url="file://$MODULE_DIR$/build"/>
-    </content>
-    <orderEntry type="sourceFolder" forTests="false"/>
-    <output url="file://$MODULE_DIR$/build/classes/main"/>
-    <output-test url="file://$MODULE_DIR$/build/classes/test"/>
-    <orderEntry type="module-library" exported="" scope="RUNTIME">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" scope="TEST">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/junit/junit/jars/junit-4.7.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-  </component>
-  <component name="ModuleRootManager"/>
-</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.ipr.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.ipr.xml
deleted file mode 100644
index 5de2103..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.ipr.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<project version="4">
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac"/>
-    <resourceExtensions>
-      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
-      <entry name=".+\.(gif|png|jpeg|jpg)"/>
-    </resourceExtensions>
-    <annotationProcessing enabled="false" useClasspath="true"/>
-    <wildcardResourcePatterns>
-      <entry name="!?*.groovy"/>
-      <entry name="!?*.java"/>
-    </wildcardResourcePatterns>
-  </component>
-  <component name="CopyrightManager" default="">
-    <module2copyright/>
-  </component>
-  <component name="DependencyValidationManager">
-    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
-  </component>
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
-  <component name="GradleUISettings">
-    <setting name="root"/>
-  </component>
-  <component name="GradleUISettings2">
-    <setting name="root"/>
-  </component>
-  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
-  <component name="JavadocGenerationManager">
-    <option name="OUTPUT_DIRECTORY"/>
-    <option name="OPTION_SCOPE" value="protected"/>
-    <option name="OPTION_HIERARCHY" value="true"/>
-    <option name="OPTION_NAVIGATOR" value="true"/>
-    <option name="OPTION_INDEX" value="true"/>
-    <option name="OPTION_SEPARATE_INDEX" value="true"/>
-    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
-    <option name="OPTION_DEPRECATED_LIST" value="true"/>
-    <option name="OTHER_OPTIONS" value=""/>
-    <option name="HEAP_SIZE"/>
-    <option name="LOCALE"/>
-    <option name="OPEN_IN_BROWSER" value="true"/>
-  </component>
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
-      <module fileurl="file://$PROJECT_DIR$/api/api.iml" filepath="$PROJECT_DIR$/api/api.iml"/>
-      <module fileurl="file://$PROJECT_DIR$/webservice/webservice.iml" filepath="$PROJECT_DIR$/webservice/webservice.iml"/>
-    </modules>
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.6">
-    <output url="file://$PROJECT_DIR$/out"/>
-  </component>
-  <component name="SvnBranchConfigurationManager">
-    <option name="mySupportsUserInfoFilter" value="true"/>
-  </component>
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs=""/>
-  </component>
-  <component name="masterDetails">
-    <states>
-      <state key="ArtifactsStructureConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-      <state key="Copyright.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-        </UIState>
-      </state>
-      <state key="ProjectJDKs.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl>
-              <option name="proportions">
-                <list>
-                  <option value="0.2"/>
-                </list>
-              </option>
-            </SplitterProportionsDataImpl>
-          </splitter-proportions>
-          <last-edited>
-            1.6
-          </last-edited>
-        </UIState>
-      </state>
-      <state key="ScopeChooserConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-    </states>
-  </component>
-</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iws.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iws.xml
deleted file mode 100644
index 6e4b035..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/root.iws.xml
+++ /dev/null
@@ -1,212 +0,0 @@
-<project version="4">
-  <component name="ChangeListManager">
-    <option name="TRACKING_ENABLED" value="true"/>
-    <option name="SHOW_DIALOG" value="false"/>
-    <option name="HIGHLIGHT_CONFLICTS" value="true"/>
-    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false"/>
-    <option name="LAST_RESOLUTION" value="IGNORE"/>
-  </component>
-  <component name="ChangesViewManager" flattened_view="true" show_ignored="false"/>
-  <component name="CreatePatchCommitExecutor">
-    <option name="PATCH_PATH" value=""/>
-    <option name="REVERSE_PATCH" value="false"/>
-  </component>
-  <component name="DaemonCodeAnalyzer">
-    <disable_hints/>
-  </component>
-  <component name="DebuggerManager">
-    <breakpoint_any>
-      <breakpoint>
-        <option name="NOTIFY_CAUGHT" value="true"/>
-        <option name="NOTIFY_UNCAUGHT" value="true"/>
-        <option name="ENABLED" value="false"/>
-        <option name="LOG_ENABLED" value="false"/>
-        <option name="LOG_EXPRESSION_ENABLED" value="false"/>
-        <option name="SUSPEND_POLICY" value="SuspendAll"/>
-        <option name="COUNT_FILTER_ENABLED" value="false"/>
-        <option name="COUNT_FILTER" value="0"/>
-        <option name="CONDITION_ENABLED" value="false"/>
-        <option name="CLASS_FILTERS_ENABLED" value="false"/>
-        <option name="INSTANCE_FILTERS_ENABLED" value="false"/>
-        <option name="CONDITION" value=""/>
-        <option name="LOG_MESSAGE" value=""/>
-      </breakpoint>
-      <breakpoint>
-        <option name="NOTIFY_CAUGHT" value="true"/>
-        <option name="NOTIFY_UNCAUGHT" value="true"/>
-        <option name="ENABLED" value="false"/>
-        <option name="LOG_ENABLED" value="false"/>
-        <option name="LOG_EXPRESSION_ENABLED" value="false"/>
-        <option name="SUSPEND_POLICY" value="SuspendAll"/>
-        <option name="COUNT_FILTER_ENABLED" value="false"/>
-        <option name="COUNT_FILTER" value="0"/>
-        <option name="CONDITION_ENABLED" value="false"/>
-        <option name="CLASS_FILTERS_ENABLED" value="false"/>
-        <option name="INSTANCE_FILTERS_ENABLED" value="false"/>
-        <option name="CONDITION" value=""/>
-        <option name="LOG_MESSAGE" value=""/>
-      </breakpoint>
-    </breakpoint_any>
-    <breakpoint_rules/>
-    <ui_properties/>
-  </component>
-  <component name="ModuleEditorState">
-    <option name="LAST_EDITED_MODULE_NAME"/>
-    <option name="LAST_EDITED_TAB_NAME"/>
-  </component>
-  <component name="ProjectInspectionProfilesVisibleTreeState">
-    <entry key="Project Default">
-      <profile-state/>
-    </entry>
-  </component>
-  <component name="ProjectLevelVcsManager">
-    <OptionsSetting value="true" id="Add"/>
-    <OptionsSetting value="true" id="Remove"/>
-    <OptionsSetting value="true" id="Checkout"/>
-    <OptionsSetting value="true" id="Update"/>
-    <OptionsSetting value="true" id="Status"/>
-    <OptionsSetting value="true" id="Edit"/>
-    <ConfirmationsSetting value="0" id="Add"/>
-    <ConfirmationsSetting value="0" id="Remove"/>
-  </component>
-  <component name="ProjectReloadState">
-    <option name="STATE" value="0"/>
-  </component>
-  <component name="PropertiesComponent">
-    <property name="GoToFile.includeJavaFiles" value="false"/>
-    <property name="GoToClass.toSaveIncludeLibraries" value="false"/>
-    <property name="MemberChooser.sorted" value="false"/>
-    <property name="MemberChooser.showClasses" value="true"/>
-    <property name="GoToClass.includeLibraries" value="false"/>
-    <property name="MemberChooser.copyJavadoc" value="false"/>
-  </component>
-  <component name="RunManager">
-    <configuration default="true" type="Remote" factoryName="Remote">
-      <option name="USE_SOCKET_TRANSPORT" value="true"/>
-      <option name="SERVER_MODE" value="false"/>
-      <option name="SHMEM_ADDRESS" value="javadebug"/>
-      <option name="HOST" value="localhost"/>
-      <option name="PORT" value="5005"/>
-      <method>
-        <option name="BuildArtifacts" enabled="false"/>
-      </method>
-    </configuration>
-    <configuration default="true" type="Applet" factoryName="Applet">
-      <module name=""/>
-      <option name="MAIN_CLASS_NAME"/>
-      <option name="HTML_FILE_NAME"/>
-      <option name="HTML_USED" value="false"/>
-      <option name="WIDTH" value="400"/>
-      <option name="HEIGHT" value="300"/>
-      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy"/>
-      <option name="VM_PARAMETERS"/>
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
-      <option name="ALTERNATIVE_JRE_PATH"/>
-      <method>
-        <option name="BuildArtifacts" enabled="false"/>
-        <option name="Make" enabled="true"/>
-      </method>
-    </configuration>
-    <configuration default="true" type="Application" factoryName="Application">
-      <extension name="coverage" enabled="false" merge="false"/>
-      <option name="MAIN_CLASS_NAME"/>
-      <option name="VM_PARAMETERS"/>
-      <option name="PROGRAM_PARAMETERS"/>
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"/>
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
-      <option name="ALTERNATIVE_JRE_PATH"/>
-      <option name="ENABLE_SWING_INSPECTOR" value="false"/>
-      <option name="ENV_VARIABLES"/>
-      <option name="PASS_PARENT_ENVS" value="true"/>
-      <module name=""/>
-      <envs/>
-      <method>
-        <option name="BuildArtifacts" enabled="false"/>
-        <option name="Make" enabled="true"/>
-      </method>
-    </configuration>
-    <configuration default="true" type="JUnit" factoryName="JUnit">
-      <extension name="coverage" enabled="false" merge="false"/>
-      <module name=""/>
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"/>
-      <option name="ALTERNATIVE_JRE_PATH"/>
-      <option name="PACKAGE_NAME"/>
-      <option name="MAIN_CLASS_NAME"/>
-      <option name="METHOD_NAME"/>
-      <option name="TEST_OBJECT" value="class"/>
-      <option name="VM_PARAMETERS"/>
-      <option name="PARAMETERS"/>
-      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$"/>
-      <option name="ENV_VARIABLES"/>
-      <option name="PASS_PARENT_ENVS" value="true"/>
-      <option name="TEST_SEARCH_SCOPE">
-        <value defaultName="moduleWithDependencies"/>
-      </option>
-      <envs/>
-      <method>
-        <option name="BuildArtifacts" enabled="false"/>
-        <option name="Make" enabled="true"/>
-      </method>
-    </configuration>
-    <list size="0"/>
-    <configuration name="<template>" type="WebApp" default="true" selected="false">
-      <Host>
-        localhost
-      </Host>
-      <Port>
-        5050
-      </Port>
-    </configuration>
-  </component>
-  <component name="ShelveChangesManager" show_recycled="false"/>
-  <component name="SvnConfiguration" maxAnnotateRevisions="500">
-    <option name="USER" value=""/>
-    <option name="PASSWORD" value=""/>
-    <option name="LAST_MERGED_REVISION"/>
-    <option name="UPDATE_RUN_STATUS" value="false"/>
-    <option name="MERGE_DRY_RUN" value="false"/>
-    <option name="MERGE_DIFF_USE_ANCESTRY" value="true"/>
-    <option name="UPDATE_LOCK_ON_DEMAND" value="false"/>
-    <option name="IGNORE_SPACES_IN_MERGE" value="false"/>
-    <option name="DETECT_NESTED_COPIES" value="true"/>
-    <option name="IGNORE_SPACES_IN_ANNOTATE" value="true"/>
-    <option name="SHOW_MERGE_SOURCES_IN_ANNOTATE" value="true"/>
-    <myIsUseDefaultProxy>
-      false
-    </myIsUseDefaultProxy>
-  </component>
-  <component name="TaskManager">
-    <task active="true" id="Default" summary="Default task"/>
-    <servers/>
-  </component>
-  <component name="VcsManagerConfiguration">
-    <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true"/>
-    <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true"/>
-    <option name="PERFORM_UPDATE_IN_BACKGROUND" value="true"/>
-    <option name="PERFORM_COMMIT_IN_BACKGROUND" value="true"/>
-    <option name="PERFORM_EDIT_IN_BACKGROUND" value="true"/>
-    <option name="PERFORM_CHECKOUT_IN_BACKGROUND" value="true"/>
-    <option name="PERFORM_ADD_REMOVE_IN_BACKGROUND" value="true"/>
-    <option name="PERFORM_ROLLBACK_IN_BACKGROUND" value="false"/>
-    <option name="CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND" value="false"/>
-    <option name="ENABLE_BACKGROUND_PROCESSES" value="false"/>
-    <option name="CHANGED_ON_SERVER_INTERVAL" value="60"/>
-    <option name="FORCE_NON_EMPTY_COMMENT" value="false"/>
-    <option name="LAST_COMMIT_MESSAGE"/>
-    <option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true"/>
-    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false"/>
-    <option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false"/>
-    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false"/>
-    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false"/>
-    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8"/>
-    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5"/>
-    <option name="ACTIVE_VCS_NAME"/>
-    <option name="UPDATE_GROUP_BY_PACKAGES" value="false"/>
-    <option name="UPDATE_GROUP_BY_CHANGELIST" value="false"/>
-    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false"/>
-    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6"/>
-  </component>
-  <component name="XDebuggerManager">
-    <breakpoint-manager/>
-  </component>
-</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webservice/webservice.iml.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webservice/webservice.iml.xml
deleted file mode 100644
index 6932e66..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/canCreateAndDeleteMetaData/expectedFiles/webservice/webservice.iml.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <exclude-output/>
-    <orderEntry type="inheritedJdk"/>
-    <content url="file://$MODULE_DIR$/">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
-      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
-      <excludeFolder url="file://$MODULE_DIR$/build"/>
-    </content>
-    <orderEntry type="sourceFolder" forTests="false"/>
-    <output url="file://$MODULE_DIR$/build/classes/main"/>
-    <output-test url="file://$MODULE_DIR$/build/classes/test"/>
-    <orderEntry type="module-library" exported="">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/org.slf4j/slf4j-api/jars/slf4j-api-1.5.8.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/org.slf4j/slf4j-api/sources/slf4j-api-1.5.8-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="">
-      <library>
-        <CLASSES>
-          <root url="jar://$MODULE_DIR$/lib/compile-1.0.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES/>
-      </library>
-    </orderEntry>
-    <orderEntry type="module" module-name="api" exported=""/>
-    <orderEntry type="module-library" exported="" scope="RUNTIME">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/commons-lang/commons-lang/jars/commons-lang-2.4.jar!/"/>
-        </CLASSES>
-        <JAVADOC>
-          <root url="jar://@CACHE_DIR@/commons-lang/commons-lang/javadocs/commons-lang-2.4-javadoc.jar!/"/>
-        </JAVADOC>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/commons-lang/commons-lang/sources/commons-lang-2.4-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="" scope="RUNTIME">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/commons-io/commons-io/jars/commons-io-1.2.jar!/"/>
-        </CLASSES>
-        <JAVADOC>
-          <root url="jar://@CACHE_DIR@/commons-io/commons-io/javadocs/commons-io-1.2-javadoc.jar!/"/>
-        </JAVADOC>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/commons-io/commons-io/sources/commons-io-1.2-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" scope="TEST">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/junit/junit/jars/junit-4.7.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/junit/junit/sources/junit-4.7-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-  </component>
-  <component name="ModuleRootManager"/>
-</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/expectedFiles/root.iml.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/expectedFiles/root.iml.xml
deleted file mode 100644
index a50cf87..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/mergesModuleDependenciesIntoExistingDependencies/expectedFiles/root.iml.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
-    <exclude-output/>
-    <content url="file://$MODULE_DIR$/">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
-      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
-      <excludeFolder url="file://$MODULE_DIR$/build"/>
-    </content>
-    <orderEntry type="inheritedJdk"/>
-    <orderEntry type="sourceFolder" forTests="false"/>
-    <output url="file://$MODULE_DIR$/build/classes/main"/>
-    <output-test url="file://$MODULE_DIR$/build/classes/test"/>
-    <orderEntry type="module-library" exported="" scope="RUNTIME">
-      <library>
-        <CLASSES>
-          <root url="jar://$CUSTOM_DIR$/../cache/junit/junit/jars/junit-4.7.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES>
-          <root url="jar://$CUSTOM_DIR$/../cache/junit/junit/sources/junit-4.7-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library" exported="" scope="RUNTIME">
-      <library>
-        <CLASSES>
-          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/jars/commons-collections-3.2.jar!/"/>
-        </CLASSES>
-        <JAVADOC/>
-        <SOURCES>
-          <root url="jar://@CACHE_DIR@/commons-collections/commons-collections/sources/commons-collections-3.2-sources.jar!/"/>
-        </SOURCES>
-      </library>
-    </orderEntry>
-  </component>
-</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/expectedFiles/root.ipr.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/expectedFiles/root.ipr.xml
deleted file mode 100644
index e62560c..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithASubProjectThatDoesNotHaveTheIdeaPluginApplied/expectedFiles/root.ipr.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<project version="4">
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac"/>
-    <resourceExtensions>
-      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
-      <entry name=".+\.(gif|png|jpeg|jpg)"/>
-    </resourceExtensions>
-    <annotationProcessing enabled="false" useClasspath="true"/>
-    <wildcardResourcePatterns>
-      <entry name="!?*.groovy"/>
-      <entry name="!?*.java"/>
-    </wildcardResourcePatterns>
-  </component>
-  <component name="CopyrightManager" default="">
-    <module2copyright/>
-  </component>
-  <component name="DependencyValidationManager">
-    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
-  </component>
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
-  <component name="GradleUISettings">
-    <setting name="root"/>
-  </component>
-  <component name="GradleUISettings2">
-    <setting name="root"/>
-  </component>
-  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
-  <component name="JavadocGenerationManager">
-    <option name="OUTPUT_DIRECTORY"/>
-    <option name="OPTION_SCOPE" value="protected"/>
-    <option name="OPTION_HIERARCHY" value="true"/>
-    <option name="OPTION_NAVIGATOR" value="true"/>
-    <option name="OPTION_INDEX" value="true"/>
-    <option name="OPTION_SEPARATE_INDEX" value="true"/>
-    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
-    <option name="OPTION_DEPRECATED_LIST" value="true"/>
-    <option name="OTHER_OPTIONS" value=""/>
-    <option name="HEAP_SIZE"/>
-    <option name="LOCALE"/>
-    <option name="OPEN_IN_BROWSER" value="true"/>
-  </component>
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
-      <module fileurl="file://$PROJECT_DIR$/a/a.iml" filepath="$PROJECT_DIR$/a/a.iml"/>
-    </modules>
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.6">
-    <output url="file://$PROJECT_DIR$/out"/>
-  </component>
-  <component name="SvnBranchConfigurationManager">
-    <option name="mySupportsUserInfoFilter" value="true"/>
-  </component>
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs=""/>
-  </component>
-  <component name="masterDetails">
-    <states>
-      <state key="ArtifactsStructureConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-      <state key="Copyright.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-        </UIState>
-      </state>
-      <state key="ProjectJDKs.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl>
-              <option name="proportions">
-                <list>
-                  <option value="0.2"/>
-                </list>
-              </option>
-            </SplitterProportionsDataImpl>
-          </splitter-proportions>
-          <last-edited>
-            1.6
-          </last-edited>
-        </UIState>
-      </state>
-      <state key="ScopeChooserConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-    </states>
-  </component>
-</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.ipr.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.ipr.xml
deleted file mode 100644
index aa1d7b1..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithAnEmptyProject/expectedFiles/root.ipr.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<project version="4">
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac"/>
-    <resourceExtensions>
-      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
-      <entry name=".+\.(gif|png|jpeg|jpg)"/>
-    </resourceExtensions>
-    <annotationProcessing enabled="false" useClasspath="true"/>
-    <wildcardResourcePatterns>
-      <entry name="!?*.groovy"/>
-      <entry name="!?*.java"/>
-    </wildcardResourcePatterns>
-  </component>
-  <component name="CopyrightManager" default="">
-    <module2copyright/>
-  </component>
-  <component name="DependencyValidationManager">
-    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
-  </component>
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
-  <component name="GradleUISettings">
-    <setting name="root"/>
-  </component>
-  <component name="GradleUISettings2">
-    <setting name="root"/>
-  </component>
-  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
-  <component name="JavadocGenerationManager">
-    <option name="OUTPUT_DIRECTORY"/>
-    <option name="OPTION_SCOPE" value="protected"/>
-    <option name="OPTION_HIERARCHY" value="true"/>
-    <option name="OPTION_NAVIGATOR" value="true"/>
-    <option name="OPTION_INDEX" value="true"/>
-    <option name="OPTION_SEPARATE_INDEX" value="true"/>
-    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
-    <option name="OPTION_DEPRECATED_LIST" value="true"/>
-    <option name="OTHER_OPTIONS" value=""/>
-    <option name="HEAP_SIZE"/>
-    <option name="LOCALE"/>
-    <option name="OPEN_IN_BROWSER" value="true"/>
-  </component>
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
-    </modules>
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.6">
-    <output url="file://$PROJECT_DIR$/out"/>
-  </component>
-  <component name="SvnBranchConfigurationManager">
-    <option name="mySupportsUserInfoFilter" value="true"/>
-  </component>
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs=""/>
-  </component>
-  <component name="masterDetails">
-    <states>
-      <state key="ArtifactsStructureConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-      <state key="Copyright.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-        </UIState>
-      </state>
-      <state key="ProjectJDKs.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl>
-              <option name="proportions">
-                <list>
-                  <option value="0.2"/>
-                </list>
-              </option>
-            </SplitterProportionsDataImpl>
-          </splitter-proportions>
-          <last-edited>
-            1.6
-          </last-edited>
-        </UIState>
-      </state>
-      <state key="ScopeChooserConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-    </states>
-  </component>
-</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.iml.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.iml.xml
deleted file mode 100644
index 3576ff1..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.iml.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <exclude-output/>
-    <orderEntry type="inheritedJdk"/>
-    <content url="file://$MODULE_DIR$/">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
-      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
-      <excludeFolder url="file://$MODULE_DIR$/build"/>
-    </content>
-    <orderEntry type="sourceFolder" forTests="false"/>
-    <output url="file://$MODULE_DIR$/build/classes/main"/>
-    <output-test url="file://$MODULE_DIR$/build/classes/test"/>
-  </component>
-  <component name="ModuleRootManager"/>
-</module>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.ipr.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.ipr.xml
deleted file mode 100644
index dadf9fb..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/root/root.ipr.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<project version="4">
-  <component name="CompilerConfiguration">
-    <option name="DEFAULT_COMPILER" value="Javac"/>
-    <resourceExtensions>
-      <entry name=".+\.(properties|xml|html|dtd|tld)"/>
-      <entry name=".+\.(gif|png|jpeg|jpg)"/>
-    </resourceExtensions>
-    <annotationProcessing enabled="false" useClasspath="true"/>
-    <wildcardResourcePatterns>
-      <entry name="!?*.groovy"/>
-      <entry name="!?*.java"/>
-    </wildcardResourcePatterns>
-  </component>
-  <component name="CopyrightManager" default="">
-    <module2copyright/>
-  </component>
-  <component name="DependencyValidationManager">
-    <option name="SKIP_IMPORT_STATEMENTS" value="false"/>
-  </component>
-  <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false"/>
-  <component name="GradleUISettings">
-    <setting name="root"/>
-  </component>
-  <component name="GradleUISettings2">
-    <setting name="root"/>
-  </component>
-  <component name="IdProvider" IDEtalkID="11DA1DB66DD62DDA1ED602B7079FE97C"/>
-  <component name="JavadocGenerationManager">
-    <option name="OUTPUT_DIRECTORY"/>
-    <option name="OPTION_SCOPE" value="protected"/>
-    <option name="OPTION_HIERARCHY" value="true"/>
-    <option name="OPTION_NAVIGATOR" value="true"/>
-    <option name="OPTION_INDEX" value="true"/>
-    <option name="OPTION_SEPARATE_INDEX" value="true"/>
-    <option name="OPTION_DOCUMENT_TAG_USE" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false"/>
-    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true"/>
-    <option name="OPTION_DEPRECATED_LIST" value="true"/>
-    <option name="OTHER_OPTIONS" value=""/>
-    <option name="HEAP_SIZE"/>
-    <option name="LOCALE"/>
-    <option name="OPEN_IN_BROWSER" value="true"/>
-  </component>
-  <component name="ProjectModuleManager">
-    <modules>
-      <module fileurl="file://$PROJECT_DIR$/../top-level.iml" filepath="$PROJECT_DIR$/../top-level.iml"/>
-      <module fileurl="file://$PROJECT_DIR$/root.iml" filepath="$PROJECT_DIR$/root.iml"/>
-      <module fileurl="file://$PROJECT_DIR$/../a child project/a child.iml" filepath="$PROJECT_DIR$/../a child project/a child.iml"/>
-    </modules>
-  </component>
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-type="JavaSDK" assert-jdk-15="true" project-jdk-name="1.5">
-    <output url="file://$PROJECT_DIR$/out"/>
-  </component>
-  <component name="SvnBranchConfigurationManager">
-    <option name="mySupportsUserInfoFilter" value="true"/>
-  </component>
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs=""/>
-  </component>
-  <component name="masterDetails">
-    <states>
-      <state key="ArtifactsStructureConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-      <state key="Copyright.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-        </UIState>
-      </state>
-      <state key="ProjectJDKs.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl>
-              <option name="proportions">
-                <list>
-                  <option value="0.2"/>
-                </list>
-              </option>
-            </SplitterProportionsDataImpl>
-          </splitter-proportions>
-          <last-edited>
-            1.6
-          </last-edited>
-        </UIState>
-      </state>
-      <state key="ScopeChooserConfigurable.UI">
-        <UIState>
-          <splitter-proportions>
-            <SplitterProportionsDataImpl/>
-          </splitter-proportions>
-          <settings/>
-        </UIState>
-      </state>
-    </states>
-  </component>
-</project>
diff --git a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/top-level.iml.xml b/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/top-level.iml.xml
deleted file mode 100644
index 3576ff1..0000000
--- a/subprojects/gradle-core/src/integTest/resources/org/gradle/integtests/IdeaIntegrationTest/worksWithNonStandardLayout/expectedFiles/top-level.iml.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<module relativePaths="true" type="JAVA_MODULE" version="4">
-  <component name="NewModuleRootManager">
-    <exclude-output/>
-    <orderEntry type="inheritedJdk"/>
-    <content url="file://$MODULE_DIR$/">
-      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true"/>
-      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true"/>
-      <excludeFolder url="file://$MODULE_DIR$/.gradle"/>
-      <excludeFolder url="file://$MODULE_DIR$/build"/>
-    </content>
-    <orderEntry type="sourceFolder" forTests="false"/>
-    <output url="file://$MODULE_DIR$/build/classes/main"/>
-    <output-test url="file://$MODULE_DIR$/build/classes/test"/>
-  </component>
-  <component name="ModuleRootManager"/>
-</module>
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildAdapter.java b/subprojects/gradle-core/src/main/groovy/org/gradle/BuildAdapter.java
deleted file mode 100644
index b06e4d6..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildAdapter.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle;
-
-import org.gradle.api.initialization.Settings;
-import org.gradle.api.invocation.Gradle;
-
-/**
- * A {@link BuildListener} adapter class for receiving build events. The methods in this class are empty.
- * This class exists as convenience for creating listener objects.
- */
-public class BuildAdapter implements BuildListener
-{
-    public void buildStarted(Gradle gradle) {
-    }
-
-    public void settingsEvaluated(Settings settings) {
-    }
-
-    public void projectsLoaded(Gradle gradle) {
-    }
-
-    public void projectsEvaluated(Gradle gradle) {
-    }
-
-    public void buildFinished(BuildResult result) {
-    }
-}
-
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildExceptionReporter.java b/subprojects/gradle-core/src/main/groovy/org/gradle/BuildExceptionReporter.java
deleted file mode 100644
index f5feadc..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/BuildExceptionReporter.java
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle;
-
-import org.codehaus.groovy.runtime.StackTraceUtils;
-import org.gradle.api.Action;
-import org.gradle.api.GradleException;
-import org.gradle.api.LocationAwareException;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.configuration.ImplicitTasksConfigurer;
-import org.gradle.execution.TaskSelectionException;
-import org.gradle.initialization.BuildClientMetaData;
-import org.gradle.initialization.DefaultCommandLineConverter;
-import org.gradle.logging.StyledTextOutput;
-import org.gradle.logging.StyledTextOutputFactory;
-import org.gradle.logging.internal.AbstractStyledTextOutput;
-import org.gradle.logging.internal.LoggingCommandLineConverter;
-import org.gradle.util.GUtil;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.gradle.logging.StyledTextOutput.Style.Failure;
-import static org.gradle.logging.StyledTextOutput.Style.UserInput;
-
-/**
- * A {@link BuildListener} which reports the build exception, if any.
- */
-public class BuildExceptionReporter extends BuildAdapter {
-    public final BuildClientMetaData clientMetaData;
-
-    private enum ExceptionStyle {
-        None, Sanitized, Full
-    }
-
-    private final StyledTextOutputFactory textOutputFactory;
-    private final StartParameter startParameter;
-
-    public BuildExceptionReporter(StyledTextOutputFactory textOutputFactory, StartParameter startParameter, BuildClientMetaData clientMetaData) {
-        this.textOutputFactory = textOutputFactory;
-        this.startParameter = startParameter;
-        this.clientMetaData = clientMetaData;
-    }
-
-    public void buildFinished(BuildResult result) {
-        Throwable failure = result.getFailure();
-        if (failure == null) {
-            return;
-        }
-
-        reportException(failure);
-    }
-
-    public void reportException(Throwable failure) {
-        FailureDetails details = new FailureDetails(failure);
-        if (failure instanceof GradleException) {
-            reportBuildFailure((GradleException) failure, details);
-        } else {
-            reportInternalError(details);
-        }
-
-        write(details);
-    }
-
-    protected void write(FailureDetails details) {
-        StyledTextOutput output = textOutputFactory.create(BuildExceptionReporter.class, LogLevel.ERROR);
-
-        output.println();
-        output.withStyle(Failure).text("FAILURE: ");
-        details.summary.replay(output.withStyle(Failure));
-
-        if (details.location.hasContent) {
-            output.println().println();
-            output.println("* Where:");
-            details.location.replay(output);
-        }
-
-        if (details.details.hasContent) {
-            output.println().println();
-            output.println("* What went wrong:");
-            details.details.replay(output);
-        }
-
-        if (details.resolution.hasContent) {
-            output.println().println();
-            output.println("* Try:");
-            details.resolution.replay(output);
-        }
-
-        Throwable exception = null;
-        switch (details.exception) {
-            case None:
-                break;
-            case Sanitized:
-                exception = StackTraceUtils.deepSanitize(details.failure);
-                break;
-            case Full:
-                exception = details.failure;
-                break;
-        }
-
-        if (exception != null) {
-            output.println().println();
-            output.println("* Exception is:");
-            output.exception(exception);
-        }
-
-        output.println();
-    }
-
-    public void reportInternalError(FailureDetails details) {
-        details.summary.text("Build aborted because of an internal error.");
-        details.details.text("Build aborted because of an unexpected internal error. Please file an issue at: http://www.gradle.org.");
-        details.resolution.text("Run with ");
-        details.resolution.withStyle(UserInput).format("-%s", LoggingCommandLineConverter.DEBUG);
-        details.resolution.text(" option to get additional debug info.");
-        details.exception = ExceptionStyle.Full;
-    }
-
-    private void reportBuildFailure(GradleException failure, FailureDetails details) {
-        boolean debug = startParameter.getLogLevel() == LogLevel.DEBUG;
-        boolean stacktrace = startParameter != null
-                && (startParameter.getShowStacktrace() != StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS
-                        || debug);
-        if (stacktrace) {
-            details.exception = ExceptionStyle.Sanitized;
-        }
-        boolean fullStacktrace = startParameter != null
-                && (startParameter.getShowStacktrace() == StartParameter.ShowStacktrace.ALWAYS_FULL);
-        if (fullStacktrace) {
-            details.exception = ExceptionStyle.Full;
-        }
-
-        if (failure instanceof TaskSelectionException) {
-            formatTaskSelectionFailure((TaskSelectionException) failure, details);
-        } else {
-            formatGenericFailure(failure, debug, stacktrace, fullStacktrace, details);
-        }
-    }
-
-    private void formatTaskSelectionFailure(TaskSelectionException failure, FailureDetails details) {
-        assert failure.getCause() == null;
-        details.summary.text("Could not determine which tasks to execute.");
-        details.details.text(getMessage(failure));
-        details.resolution.text("Run ");
-        clientMetaData.describeCommand(details.resolution.withStyle(UserInput), ImplicitTasksConfigurer.TASKS_TASK);
-        details.resolution.text(" to get a list of available tasks.");
-    }
-
-    private void formatGenericFailure(GradleException failure, boolean debug, boolean stacktrace, boolean fullStacktrace,
-                                      FailureDetails details) {
-        details.summary.text("Build failed with an exception.");
-        if (!debug) {
-            if (!stacktrace && !fullStacktrace) {
-                details.resolution.text("Run with ");
-                details.resolution.withStyle(UserInput).format("-%s", DefaultCommandLineConverter.STACKTRACE);
-                details.resolution.text(" or ");
-                details.resolution.withStyle(UserInput).format("-%s", LoggingCommandLineConverter.DEBUG);
-                details.resolution.text(" option to get more details. ");
-            }
-            else {
-                details.resolution.text("Run with ");
-                details.resolution.withStyle(UserInput).format("-%s", LoggingCommandLineConverter.DEBUG);
-                details.resolution.text(" option to get more details. ");
-            }
-            if (!fullStacktrace) {
-                details.resolution.text("Run with ");
-                details.resolution.withStyle(UserInput).format("-%s", DefaultCommandLineConverter.FULL_STACKTRACE);
-                details.resolution.text(" option to get the full (very verbose) stacktrace.");
-            }
-        }
-
-        if (failure instanceof LocationAwareException) {
-            LocationAwareException scriptException = (LocationAwareException) failure;
-            if (scriptException.getLocation() != null) {
-                details.location.text(scriptException.getLocation());
-            }
-            details.details.text(scriptException.getOriginalMessage());
-            for (Throwable cause : scriptException.getReportableCauses()) {
-                details.details.format("%nCause: %s", getMessage(cause));
-            }
-        } else {
-            details.details.text(getMessage(failure));
-        }
-    }
-
-    private String getMessage(Throwable throwable) {
-        String message = throwable.getMessage();
-        if (GUtil.isTrue(message)) {
-            return message;
-        }
-        return String.format("%s (no error message)", throwable.getClass().getName());
-    }
-
-    private static class FailureDetails {
-        private ExceptionStyle exception = ExceptionStyle.None;
-        private final RecordingStyledTextOutput summary = new RecordingStyledTextOutput();
-        private final RecordingStyledTextOutput details = new RecordingStyledTextOutput();
-        private final RecordingStyledTextOutput location = new RecordingStyledTextOutput();
-        private final RecordingStyledTextOutput resolution = new RecordingStyledTextOutput();
-        private final Throwable failure;
-
-        public FailureDetails(Throwable failure) {
-            this.failure = failure;
-        }
-    }
-
-    private static class RecordingStyledTextOutput extends AbstractStyledTextOutput {
-        private final List<Action<StyledTextOutput>> events = new ArrayList<Action<StyledTextOutput>>();
-        private boolean hasContent;
-
-        void replay(StyledTextOutput output) {
-            for (Action<StyledTextOutput> event : events) {
-                event.execute(output);
-            }
-            events.clear();
-        }
-
-        @Override
-        protected void doStyleChange(final Style style) {
-            if (!events.isEmpty() && (events.get(events.size() - 1) instanceof ChangeStyleAction)) {
-                events.remove(events.size() - 1);
-            }
-            events.add(new ChangeStyleAction(style));
-        }
-
-        @Override
-        protected void doAppend(final String text) {
-            if (text.length() == 0) {
-                return;
-            }
-            hasContent = true;
-            events.add(new Action<StyledTextOutput>() {
-                public void execute(StyledTextOutput styledTextOutput) {
-                    styledTextOutput.text(text);
-                }
-            });
-        }
-
-        private static class ChangeStyleAction implements Action<StyledTextOutput> {
-            private final Style style;
-
-            public ChangeStyleAction(Style style) {
-                this.style = style;
-            }
-
-            public void execute(StyledTextOutput styledTextOutput) {
-                styledTextOutput.style(style);
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/GradleLauncher.java b/subprojects/gradle-core/src/main/groovy/org/gradle/GradleLauncher.java
deleted file mode 100644
index 7c73cf4..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/GradleLauncher.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle;
-
-import org.gradle.api.logging.StandardOutputListener;
-import org.gradle.initialization.DefaultGradleLauncherFactory;
-import org.gradle.initialization.GradleLauncherFactory;
-
-/**
- * <p>{@code GradleLauncher} is the main entry point for embedding Gradle. You use this class to manage a Gradle build,
- * as follows:</p>
- *
- * <ol>
- *
- * <li>Optionally create a {@link StartParameter} instance and configure it with the desired properties. The properties
- * of {@code StartParameter} generally correspond to the command-line options of Gradle. You can use {@link
- * #createStartParameter(String...)} to create a {@link StartParameter} from a set of command-line options.</li>
- *
- * <li>Obtain a {@code GradleLauncher} instance by calling {@link #newInstance}, passing in the {@code StartParameter},
- * or an array of Strings that will be treated as command line arguments.</li>
- *
- * <li>Optionally add one or more listeners to the {@code GradleLauncher}.</li>
- *
- * <li>Call {@link #run} to execute the build. This will return a {@link BuildResult}. Note that if the build fails, the
- * resulting exception will be contained in the {@code BuildResult}.</li>
- *
- * <li>Query the build result. You might want to call {@link BuildResult#rethrowFailure()} to rethrow any build
- * failure.</li>
- *
- * </ol>
- *
- * @author Hans Dockter
- */
-public abstract class GradleLauncher {
-
-    private static GradleLauncherFactory factory;
-
-    /**
-     * <p>Executes the build for this {@code GradleLauncher} instance and returns the result. Note that when the build
-     * fails, the exception is available using {@link org.gradle.BuildResult#getFailure()}.</p>
-     *
-     * @return The result. Never returns null.
-     */
-    public abstract BuildResult run();
-
-    /**
-     * Evaluates the settings and all the projects. The information about available tasks and projects is accessible via
-     * the {@link org.gradle.api.invocation.Gradle#getRootProject()} object.
-     *
-     * @return The result. Never returns null.
-     */
-    public abstract BuildResult getBuildAnalysis();
-
-    /**
-     * Evaluates the settings and all the projects. The information about available tasks and projects is accessible via
-     * the {@link org.gradle.api.invocation.Gradle#getRootProject()} object. Fills the execution plan without running
-     * the build. The tasks to be executed tasks are available via {@link org.gradle.api.invocation.Gradle#getTaskGraph()}.
-     *
-     * @return The result. Never returns null.
-     */
-    public abstract BuildResult getBuildAndRunAnalysis();
-
-    /**
-     * Returns a {@code GradleLauncher} instance based on the passed start parameter.
-     *
-     * @param startParameter The start parameter object the GradleLauncher instance is initialized with
-     * @return The {@code GradleLauncher}. Never returns null.
-     */
-    public static GradleLauncher newInstance(final StartParameter startParameter) {
-        return getFactory().newInstance(startParameter);
-    }
-
-    private static synchronized GradleLauncherFactory getFactory() {
-        if (factory == null) {
-            factory = new DefaultGradleLauncherFactory();
-        }
-        return factory;
-    }
-
-    /**
-     * Returns a {@code GradleLauncher} instance based on the passed command line syntax arguments.
-     *
-     * @param commandLineArgs A String array where each element denotes an entry of the Gradle command line syntax
-     * @return The {@code GradleLauncher}. Never returns null.
-     */
-    public static GradleLauncher newInstance(String... commandLineArgs) {
-        return newInstance(createStartParameter(commandLineArgs));
-    }
-
-    /**
-     * Returns a {@code StartParameter} object out of command line syntax arguments. Each command line option has an
-     * associated field in the {@code StartParameter} object.
-     *
-     * @param commandLineArgs A String array where each element denotes an entry of the Gradle command line syntax
-     * @return The {@code GradleLauncher}. Never returns null.
-     */
-    public static StartParameter createStartParameter(final String... commandLineArgs) {
-        return getFactory().createStartParameter(commandLineArgs);
-    }
-
-    public static synchronized void injectCustomFactory(GradleLauncherFactory gradleLauncherFactory) {
-        factory = gradleLauncherFactory;
-    }
-
-    /**
-     * <p>Adds a listener to this build instance. The listener is notified of events which occur during the execution of
-     * the build. See {@link org.gradle.api.invocation.Gradle#addListener(Object)} for supported listener types.</p>
-     *
-     * @param listener The listener to add. Has no effect if the listener has already been added.
-     */
-    public abstract void addListener(Object listener);
-
-    /**
-     * Use the given listener. See {@link org.gradle.api.invocation.Gradle#useLogger(Object)} for details.
-     *
-     * @param logger The logger to use.
-     */
-    public abstract void useLogger(Object logger);
-
-    /**
-     * <p>Adds a {@link StandardOutputListener} to this build instance. The listener is notified of any text written to
-     * standard output by Gradle's logging system
-     *
-     * @param listener The listener to add. Has no effect if the listener has already been added.
-     */
-    public abstract void addStandardOutputListener(StandardOutputListener listener);
-
-    /**
-     * <p>Adds a {@link StandardOutputListener} to this build instance. The listener is notified of any text written to
-     * standard error by Gradle's logging system
-     *
-     * @param listener The listener to add. Has no effect if the listener has already been added.
-     */
-    public abstract void addStandardErrorListener(StandardOutputListener listener);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/StartParameter.java b/subprojects/gradle-core/src/main/groovy/org/gradle/StartParameter.java
deleted file mode 100644
index 80164a9..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/StartParameter.java
+++ /dev/null
@@ -1,552 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle;
-
-import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.commons.lang.builder.HashCodeBuilder;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.execution.*;
-import org.gradle.groovy.scripts.UriScriptSource;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.gradle.groovy.scripts.StringScriptSource;
-import org.gradle.initialization.*;
-import org.gradle.util.GFileUtils;
-import org.gradle.util.GUtil;
-
-import java.io.File;
-import java.util.*;
-
-/**
- * <p>{@code StartParameter} defines the configuration used by a {@link GradleLauncher} instance to execute a build. The
- * properties of {@code StartParameter} generally correspond to the command-line options of Gradle. You pass a {@code
- * StartParameter} instance to {@link GradleLauncher#newInstance(StartParameter)} when you create a new {@code Gradle}
- * instance.</p>
- *
- * <p>You can obtain an instance of a {@code StartParameter} by either creating a new one, or duplicating an existing
- * one using {@link #newInstance} or {@link #newBuild}.</p>
- *
- * @author Hans Dockter
- * @see GradleLauncher
- */
-public class StartParameter {
-    public static final String GRADLE_USER_HOME_PROPERTY_KEY = "gradle.user.home";
-    /**
-     * The default user home directory.
-     */
-    public static final File DEFAULT_GRADLE_USER_HOME = new File(System.getProperty("user.home") + "/.gradle");
-
-    /**
-     * Specifies the detail to include in stacktraces.
-     */
-    public enum ShowStacktrace {
-        INTERNAL_EXCEPTIONS, ALWAYS, ALWAYS_FULL
-    }
-
-    private List<String> taskNames = new ArrayList<String>();
-    private Set<String> excludedTaskNames = new HashSet<String>();
-    private ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction
-            = new ProjectDependenciesBuildInstruction(Collections.<String>emptyList());
-    private File currentDir;
-    private boolean searchUpwards = true;
-    private Map<String, String> projectProperties = new HashMap<String, String>();
-    private Map<String, String> systemPropertiesArgs = new HashMap<String, String>();
-    private File gradleUserHomeDir;
-    private CacheUsage cacheUsage = CacheUsage.ON;
-    private ScriptSource buildScriptSource;
-    private ScriptSource settingsScriptSource;
-    private BuildExecuter buildExecuter;
-    private ProjectSpec defaultProjectSelector;
-    private LogLevel logLevel = LogLevel.LIFECYCLE;
-    private ShowStacktrace showStacktrace = ShowStacktrace.INTERNAL_EXCEPTIONS;
-    private File buildFile;
-    private List<File> initScripts = new ArrayList<File>();
-    private boolean dryRun;
-    private boolean noOpt;
-    private boolean colorOutput = true;
-    private boolean profile;
-
-    /**
-     * Creates a {@code StartParameter} with default values. This is roughly equivalent to running Gradle on the
-     * command-line with no arguments.
-     */
-    public StartParameter() {
-        String gradleUserHome = System.getProperty(GRADLE_USER_HOME_PROPERTY_KEY);
-        if (gradleUserHome == null) {
-            gradleUserHome = System.getenv("GRADLE_USER_HOME");
-            if (gradleUserHome == null) {
-                gradleUserHome = DEFAULT_GRADLE_USER_HOME.getAbsolutePath();
-            }
-        }
-
-        gradleUserHomeDir = GFileUtils.canonicalise(new File(gradleUserHome));
-        setCurrentDir(null);
-    }
-
-    /**
-     * Duplicates this {@code StartParameter} instance.
-     *
-     * @return the new parameters.
-     */
-    public StartParameter newInstance() {
-        StartParameter startParameter = new StartParameter();
-        startParameter.buildFile = buildFile;
-        startParameter.taskNames = taskNames;
-        startParameter.projectDependenciesBuildInstruction = projectDependenciesBuildInstruction;
-        startParameter.currentDir = currentDir;
-        startParameter.searchUpwards = searchUpwards;
-        startParameter.projectProperties = projectProperties;
-        startParameter.systemPropertiesArgs = systemPropertiesArgs;
-        startParameter.gradleUserHomeDir = gradleUserHomeDir;
-        startParameter.cacheUsage = cacheUsage;
-        startParameter.buildScriptSource = buildScriptSource;
-        startParameter.settingsScriptSource = settingsScriptSource;
-        startParameter.initScripts = new ArrayList<File>(initScripts); 
-        startParameter.buildExecuter = buildExecuter;
-        startParameter.defaultProjectSelector = defaultProjectSelector;
-        startParameter.logLevel = logLevel;
-        startParameter.colorOutput = colorOutput;
-        startParameter.showStacktrace = showStacktrace;
-        startParameter.dryRun = dryRun;
-        startParameter.noOpt = noOpt;
-        startParameter.profile = profile;
-        return startParameter;
-    }
-
-    /**
-     * <p>Creates the parameters for a new build, using these parameters as a template. Copies the environmental
-     * properties from this parameter (eg gradle user home dir, etc), but does not copy the build specific properties
-     * (eg task names).</p>
-     *
-     * @return The new parameters.
-     */
-    public StartParameter newBuild() {
-        StartParameter startParameter = new StartParameter();
-        startParameter.gradleUserHomeDir = gradleUserHomeDir;
-        startParameter.cacheUsage = cacheUsage;
-        startParameter.logLevel = logLevel;
-        startParameter.colorOutput = colorOutput;
-        startParameter.profile = profile;
-        return startParameter;
-    }
-
-    public boolean equals(Object obj) {
-        return EqualsBuilder.reflectionEquals(this, obj);
-    }
-
-    public int hashCode() {
-        return HashCodeBuilder.reflectionHashCode(this);
-    }
-
-    /**
-     * Returns the build file to use to select the default project. Returns null when the build file is not used to
-     * select the default project.
-     *
-     * @return The build file. May be null.
-     */
-    public File getBuildFile() {
-        return buildFile;
-    }
-
-    /**
-     * Sets the build file to use to select the default project. Use null to disable selecting the default project using
-     * the build file.
-     *
-     * @param buildFile The build file. May be null.
-     */
-    public void setBuildFile(File buildFile) {
-        if (buildFile == null) {
-            this.buildFile = null;
-            setCurrentDir(null);
-        } else {
-            this.buildFile = GFileUtils.canonicalise(buildFile);
-            currentDir = this.buildFile.getParentFile();
-            defaultProjectSelector = new BuildFileProjectSpec(this.buildFile);
-        }
-    }
-
-    /**
-     * <p>Returns the {@link ScriptSource} to use for the build file for this build. Returns null when the default build
-     * file(s) are to be used. This source is used for <em>all</em> projects included in the build.</p>
-     *
-     * @return The build file source, or null to use the defaults.
-     */
-    public ScriptSource getBuildScriptSource() {
-        return buildScriptSource;
-    }
-
-    /**
-     * <p>Returns the {@link ScriptSource} to use for the settings script for this build. Returns null when the default
-     * settings script is to be used.</p>
-     *
-     * @return The settings script source, or null to use the default.
-     */
-    public ScriptSource getSettingsScriptSource() {
-        return settingsScriptSource;
-    }
-
-    /**
-     * <p>Sets the {@link ScriptSource} to use for the settings script. Set to null to use the default settings
-     * script.</p>
-     *
-     * @param settingsScriptSource The settings script source.
-     */
-    public void setSettingsScriptSource(ScriptSource settingsScriptSource) {
-        this.settingsScriptSource = settingsScriptSource;
-    }
-
-    /**
-     * <p>Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
-     * </p>
-     *
-     * @param buildScriptText The script to use as the build file.
-     * @return this
-     */
-    public StartParameter useEmbeddedBuildFile(String buildScriptText) {
-        return setBuildScriptSource(new StringScriptSource("embedded build file", buildScriptText));
-    }
-    
-    /**
-     * <p>Specifies that the given script should be used as the build file for this build. Uses an empty settings file.
-     * </p>
-     *
-     * @param buildScript The script to use as the build file.
-     * @return this
-     */
-    public StartParameter setBuildScriptSource(ScriptSource buildScript) {
-        buildScriptSource = buildScript;
-        settingsScriptSource = new StringScriptSource("empty settings file", "");
-        searchUpwards = false;
-        return this;
-    }
-
-    /**
-     * <p>Returns the {@link BuildExecuter} to use for the build.</p>
-     *
-     * @return The {@link BuildExecuter}. Never returns null.
-     */
-    public BuildExecuter getBuildExecuter() {
-        BuildExecuter executer = buildExecuter;
-        if (executer == null) {
-            executer = new DefaultBuildExecuter(taskNames, excludedTaskNames);
-        }
-        if (dryRun) {
-            executer = new DryRunBuildExecuter(executer);
-        }
-        return executer;
-    }
-
-    /**
-     * <p>Sets the {@link BuildExecuter} to use for the build. You can use the method to change the algorithm used to
-     * execute the build, by providing your own {@code BuildExecuter} implementation.</p>
-     *
-     * <p> Set to null to use the default executer. When this property is set to a non-null value, the taskNames and
-     * mergedBuild properties are ignored.</p>
-     *
-     * @param buildExecuter The executer to use, or null to use the default executer.
-     */
-    public void setBuildExecuter(BuildExecuter buildExecuter) {
-        this.buildExecuter = buildExecuter;
-    }
-
-    /**
-     * Returns the names of the tasks to execute in this build. When empty, the default tasks for the project will be
-     * executed.
-     *
-     * @return the names of the tasks to execute in this build. Never returns null.
-     */
-    public List<String> getTaskNames() {
-        return taskNames;
-    }
-
-    /**
-     * <p>Sets the tasks to execute in this build. Set to an empty list, or null, to execute the default tasks for the
-     * project. The tasks are executed in the order provided, subject to dependency between the tasks.</p>
-     *
-     * @param taskNames the names of the tasks to execute in this build.
-     */
-    public void setTaskNames(Collection<String> taskNames) {
-        this.taskNames = !GUtil.isTrue(taskNames) ? new ArrayList<String>() : new ArrayList<String>(taskNames);
-        buildExecuter = null;
-    }
-
-    /**
-     * Returns the names of the tasks to be excluded from this build. When empty, no tasks are excluded from the build.
-     *
-     * @return The names of the excluded tasks. Returns an empty set if there are no such tasks.
-     */
-    public Set<String> getExcludedTaskNames() {
-        return excludedTaskNames;
-    }
-
-    /**
-     * Sets the tasks to exclude from this build.
-     *
-     * @param excludedTaskNames The task names. Can be null.
-     */
-    public void setExcludedTaskNames(Collection<String> excludedTaskNames) {
-        this.excludedTaskNames = !GUtil.isTrue(excludedTaskNames) ? new HashSet<String>() : new HashSet<String>(excludedTaskNames);
-    }
-
-    /**
-     * Returns the directory to use to select the default project, and to search for the settings file.
-     *
-     * @return The current directory. Never returns null.
-     */
-    public File getCurrentDir() {
-        return currentDir;
-    }
-
-    /**
-     * Sets the directory to use to select the default project, and to search for the settings file. Set to null to use
-     * the default current directory.
-     *
-     * @param currentDir The directory. Should not be null.
-     */
-    public void setCurrentDir(File currentDir) {
-        if (currentDir != null) {
-            this.currentDir = GFileUtils.canonicalise(currentDir);
-        } else {
-            this.currentDir = GFileUtils.canonicalise(new File(System.getProperty("user.dir")));
-        }
-        defaultProjectSelector = null;
-    }
-
-    public boolean isSearchUpwards() {
-        return searchUpwards;
-    }
-
-    public void setSearchUpwards(boolean searchUpwards) {
-        this.searchUpwards = searchUpwards;
-    }
-
-    public Map<String, String> getProjectProperties() {
-        return projectProperties;
-    }
-
-    public void setProjectProperties(Map<String, String> projectProperties) {
-        this.projectProperties = projectProperties;
-    }
-
-    public Map<String, String> getSystemPropertiesArgs() {
-        return systemPropertiesArgs;
-    }
-
-    public void setSystemPropertiesArgs(Map<String, String> systemPropertiesArgs) {
-        this.systemPropertiesArgs = systemPropertiesArgs;
-    }
-
-    /**
-     * Returns the directory to use as the user home directory.
-     *
-     * @return The home directory.
-     */
-    public File getGradleUserHomeDir() {
-        return gradleUserHomeDir;
-    }
-
-    /**
-     * Sets the directory to use as the user home directory. Set to null to use the default directory.
-     *
-     * @param gradleUserHomeDir The home directory. May be null.
-     */
-    public void setGradleUserHomeDir(File gradleUserHomeDir) {
-        this.gradleUserHomeDir = gradleUserHomeDir == null ? DEFAULT_GRADLE_USER_HOME : GFileUtils.canonicalise(gradleUserHomeDir);
-    }
-
-    public ProjectDependenciesBuildInstruction getProjectDependenciesBuildInstruction() {
-        return projectDependenciesBuildInstruction;
-    }
-
-    public void setProjectDependenciesBuildInstruction(
-            ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction) {
-        this.projectDependenciesBuildInstruction = projectDependenciesBuildInstruction;
-    }
-
-    public CacheUsage getCacheUsage() {
-        return cacheUsage;
-    }
-
-    public void setCacheUsage(CacheUsage cacheUsage) {
-        this.cacheUsage = cacheUsage;
-    }
-
-    public boolean isDryRun() {
-        return dryRun;
-    }
-
-    public void setDryRun(boolean dryRun) {
-        this.dryRun = dryRun;
-    }
-
-    public boolean isNoOpt() {
-        return noOpt;
-    }
-
-    public void setNoOpt(boolean noOpt) {
-        this.noOpt = noOpt;
-    }
-
-    /**
-     * Sets the settings file to use for the build. Use null to use the default settings file.
-     *
-     * @param settingsFile The settings file to use. May be null.
-     */
-    public void setSettingsFile(File settingsFile) {
-        if (settingsFile == null) {
-            settingsScriptSource = null;
-        } else {
-            File canonicalFile = GFileUtils.canonicalise(settingsFile);
-            currentDir = canonicalFile.getParentFile();
-            settingsScriptSource = new UriScriptSource("settings file", canonicalFile);
-        }
-    }
-
-    /**
-     * Adds the given file to the list of init scripts that are run before the build starts.  This list is in
-     * addition to the user init script located in ${user.home}/.gradle/init.gradle.
-     * @param initScriptFile The init script to be run during the Gradle invocation.
-     */
-    public void addInitScript(File initScriptFile)
-    {
-        initScripts.add(initScriptFile);
-    }
-
-    public void setInitScripts(List<File> initScripts) {
-        this.initScripts = initScripts;
-    }
-
-    /**
-     * Returns all explicitly added init scripts that will be run before the build starts.  This list does not
-     * contain the user init script located in ${user.home}/.gradle/init.gradle, even though that init script
-     * will also be run.
-     * @return list of all explicitly added init scripts.
-     */
-    public List<File> getInitScripts() {
-        return Collections.unmodifiableList(initScripts);
-    }
-
-    public LogLevel getLogLevel() {
-        return logLevel;
-    }
-
-    public void setLogLevel(LogLevel logLevel) {
-        this.logLevel = logLevel;
-    }
-
-    public ShowStacktrace getShowStacktrace() {
-        return showStacktrace;
-    }
-
-    public void setShowStacktrace(ShowStacktrace showStacktrace) {
-        this.showStacktrace = showStacktrace;
-    }
-
-    /**
-     * Returns the selector used to choose the default project of the build. This is the project used as the starting
-     * point for resolving task names, and for determining the default tasks.
-     *
-     * @return The default project. Never returns null.
-     */
-    public ProjectSpec getDefaultProjectSelector() {
-        return defaultProjectSelector != null ? defaultProjectSelector : new DefaultProjectSpec(currentDir);
-    }
-
-    /**
-     * Sets the selector used to choose the default project of the build.
-     *
-     * @param defaultProjectSelector The selector. Should not be null.
-     */
-    public void setDefaultProjectSelector(ProjectSpec defaultProjectSelector) {
-        this.defaultProjectSelector = defaultProjectSelector;
-    }
-
-    /**
-     * Sets the project directory to use to select the default project. Use null to use the default criteria for
-     * selecting the default project.
-     *
-     * @param projectDir The project directory. May be null.
-     */
-    public void setProjectDir(File projectDir) {
-        if (projectDir == null) {
-            setCurrentDir(null);
-        } else {
-            File canonicalFile = GFileUtils.canonicalise(projectDir);
-            currentDir = canonicalFile;
-            defaultProjectSelector = new ProjectDirectoryProjectSpec(canonicalFile);
-        }
-    }
-
-    /**
-     * Returns true if logging output should be displayed in color when Gradle is running in a terminal which supports
-     * color output. The default value is true.
-     *
-     * @return true if logging output should be displayed in color.
-     */
-    public boolean isColorOutput() {
-        return colorOutput;
-    }
-
-    /**
-     * Specifies whether logging output should be displayed in color.
-     *
-     * @param colorOutput true if logging output should be displayed in color.
-     */
-    public void setColorOutput(boolean colorOutput) {
-        this.colorOutput = colorOutput;
-    }
-
-    /**
-     * Specifies if a profile report should be generated.
-     * @param profile true if a profile report should be generated
-     */
-    public void setProfile(boolean profile) {
-        this.profile = profile;
-    }
-
-    /**
-     * Returns true if a profile report will be generated.
-     */
-    public boolean isProfile() {
-        return profile;
-    }
-
-    @Override
-    public String toString() {
-        return "StartParameter{" +
-                "taskNames=" + taskNames +
-                ", excludedTaskNames=" + excludedTaskNames +
-                ", currentDir=" + currentDir +
-                ", searchUpwards=" + searchUpwards +
-                ", projectProperties=" + projectProperties +
-                ", systemPropertiesArgs=" + systemPropertiesArgs +
-                ", gradleUserHomeDir=" + gradleUserHomeDir +
-                ", cacheUsage=" + cacheUsage +
-                ", buildScriptSource=" + buildScriptSource +
-                ", settingsScriptSource=" + settingsScriptSource +
-                ", buildExecuter=" + buildExecuter +
-                ", defaultProjectSelector=" + defaultProjectSelector +
-                ", logLevel=" + logLevel +
-                ", showStacktrace=" + showStacktrace +
-                ", buildFile=" + buildFile +
-                ", initScripts=" + initScripts +
-                ", dryRun=" + dryRun +
-                ", noOpt=" + noOpt +
-                ", profile=" + profile +
-                '}';
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/DomainObjectCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/DomainObjectCollection.java
deleted file mode 100644
index 75e5da3..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/DomainObjectCollection.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api;
-
-import groovy.lang.Closure;
-import org.gradle.api.specs.Spec;
-
-import java.util.Set;
-
-/**
- * <p>A {@code DomainObjectCollection} represents a read-only set of domain objects of type {@code T}.</p>
- *
- * <p>You can use the methods of this interface to query the elements of the collection. You can also add actions
- * which are executed as elements are added to this collection.</p>
- *
- * @param <T> The type of domain objects in this collection.
- */
-public interface DomainObjectCollection<T> extends Iterable<T> {
-    /**
-     * Returns the objects in this collection.
-     *
-     * @return The objects. Returns an empty set if this collection is empty.
-     */
-    Set<T> getAll();
-
-    /**
-     * Returns the objects in this collection which meet the given specification.
-     *
-     * @param spec The specification to use.
-     * @return The matching objects. Returns an empty set if there are no such objects in this collection.
-     */
-    Set<T> findAll(Spec<? super T> spec);
-
-    /**
-     * Returns a collection containing the objects in this collection of the given type.  The returned collection is
-     * live, so that when matching objects are later added to this collection, they are also visible in the filtered
-     * collection.
-     *
-     * @param type The type of objects to find.
-     * @return The matching objects. Returns an empty set if there are no such objects in this collection.
-     */
-    <S extends T> DomainObjectCollection<S> withType(Class<S> type);
-
-    /**
-     * Returns a collection which contains the objects in this collection which meet the given specification. The
-     * returned collection is live, so that when matching objects are added to this collection, they are also visible in
-     * the filtered collection.
-     *
-     * @param spec The specification to use.
-     * @return The collection of matching objects. Returns an empty collection if there are no such objects in this
-     *         collection.
-     */
-    DomainObjectCollection<T> matching(Spec<? super T> spec);
-
-    /**
-     * Returns a collection which contains the objects in this collection which meet the given closure specification. The
-     * returned collection is live, so that when matching objects are added to this collection, they are also visible in
-     * the filtered collection.
-     *
-     * @param spec The specification to use. The closure gets a collection element as an argument.
-     * @return The collection of matching objects. Returns an empty collection if there are no such objects in this
-     *         collection.
-     */
-    DomainObjectCollection<T> matching(Closure spec);
-
-    /**
-     * Adds an {@code Action} to be executed when an object is added to this collection.
-     *
-     * @param action The action to be executed
-     * @return the supplied action
-     */
-    Action<? super T> whenObjectAdded(Action<? super T> action);
-
-    /**
-     * Adds a closure to be called when an object is added to this collection. The newly added object is passed to the
-     * closure as the parameter.
-     *
-     * @param action The closure to be called
-     */
-    void whenObjectAdded(Closure action);
-
-    /**
-     * Adds an {@code Action} to be executed when an object is removed from this collection.
-     *
-     * @param action The action to be executed
-     * @return the supplied action
-     */
-    Action<? super T> whenObjectRemoved(Action<? super T> action);
-
-    /**
-     * Executes the given action against all objects in this collection, and any objects subsequently added to this
-     * collection.
-     *
-     * @param action The action to be executed
-     */
-    void allObjects(Action<? super T> action);
-
-    /**
-     * Executes the given closure against all objects in this collection, and any objects subsequently added to this
-     * collection.
-     *
-     * @param action The closure to be called
-     */
-    void allObjects(Closure action);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Project.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/Project.java
deleted file mode 100644
index 47b6df9..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/Project.java
+++ /dev/null
@@ -1,1453 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api;
-
-import groovy.lang.Closure;
-import groovy.lang.MissingPropertyException;
-import org.gradle.api.file.ConfigurableFileTree;
-import org.gradle.api.file.ConfigurableFileCollection;
-import org.gradle.api.file.CopySpec;
-import org.gradle.api.file.FileTree;
-import org.gradle.api.artifacts.dsl.*;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.initialization.dsl.ScriptHandler;
-import org.gradle.api.invocation.Gradle;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.LoggingManager;
-import org.gradle.api.plugins.Convention;
-import org.gradle.api.plugins.PluginContainer;
-import org.gradle.api.tasks.TaskContainer;
-import org.gradle.api.tasks.WorkResult;
-import org.gradle.process.ExecResult;
-
-import java.io.File;
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * <p>This interface is the main API you use to interact with Gradle from your build file. From a <code>Project</code>,
- * you have programmatic access to all of Gradle's features.</p>
- *
- * <h3>Lifecycle</h3>
- *
- * <p>There is a one-to-one relationship between a <code>Project</code> and a <code>{@value #DEFAULT_BUILD_FILE}</code>
- * file. During build initialisation, Gradle assembles a <code>Project</code> object for each project which is to
- * participate in the build, as follows:</p>
- *
- * <ul>
- *
- * <li>Create a {@link org.gradle.api.initialization.Settings} instance for the build.</li>
- *
- * <li>Evaluate the <code>{@value org.gradle.api.initialization.Settings#DEFAULT_SETTINGS_FILE}</code> script, if
- * present, against the {@link org.gradle.api.initialization.Settings} object to configure it.</li>
- *
- * <li>Use the configured {@link org.gradle.api.initialization.Settings} object to create the hierarchy of
- * <code>Project</code> instances.</li>
- *
- * <li>Finally, evaluate each <code>Project</code> by executing its <code>{@value #DEFAULT_BUILD_FILE}</code> file, if
- * present, against the project. The project are evaulated in breadth-wise order, such that a project is evaulated
- * before its child projects. This order can be overridden by adding an evaluation dependency.</li>
- *
- * </ul>
- *
- * <h3>Tasks</h3>
- *
- * <p>A project is essentially a collection of {@link Task} objects. Each task performs some basic piece of work, such
- * as compiling classes, or running unit tests, or zipping up a WAR file. You add tasks to a project using one of the
- * {@code add()} methods on {@link TaskContainer}, such as {@link TaskContainer#add(String)}.  You can locate existing
- * tasks using one of the lookup methods on {@link TaskContainer}, such as {@link org.gradle.api.tasks.TaskCollection#getByName(String)}.</p>
- *
- * <h3>Dependencies</h3>
- *
- * <p>A project generally has a number of dependencies it needs in order to do its work.  Also, a project generally
- * produces a number of artifacts, which other projects can use. Those dependencies are grouped in configurations, and
- * can be retrieved and uploaded from repositories. You use the {@link org.gradle.api.artifacts.ConfigurationContainer}
- * returned by {@link #getConfigurations()} method to manage the configurations. The {@link
- * org.gradle.api.artifacts.dsl.DependencyHandler} returned by {@link #getDependencies()} method to manage the
- * dependencies. The {@link org.gradle.api.artifacts.dsl.ArtifactHandler} returned by {@link #getArtifacts()} method to
- * manage the artifacts. The {@link org.gradle.api.artifacts.dsl.RepositoryHandler} returned by {@link
- * #getRepositories()} method to manage the repositories.</p>
- *
- * <h3>Multi-project Builds</h3>
- *
- * <p>Projects are arranged into a hierarchy of projects. A project has a name, and a fully qualified path which
- * uniquely identifies it in the hierarchy.</p>
- *
- * <h3>Build scripts</h3>
- *
- * <p>Gradle executes the project's build file against the <code>Project</code> instance to configure the project. Any
- * property or method which your script uses which is not defined in the script is delegated through to the associated
- * <code>Project</code> object.  This means, that you can use any of the methods and properties on the
- * <code>Project</code> interface directly in your script.</p><p>For example:
- * <pre>
- * defaultTasks('some-task')  // Delegates to Project.defaultTasks()
- * reportDir = file('reports') // Delegates to Project.file() and Project.setProperty()
- * </pre>
- * <p>You can also access the <code>Project</code> instance using the <code>project</code> property. This can make the
- * script clearer in some cases. For example, you could use <code>project.name</code> rather than <code>name</code> to
- * access the project's name.</p>
- *
- * <a name="properties"/> <h4>Dynamic Properties</h4>
- *
- * <p>A project has 5 property 'scopes', which it searches for properties. You can access these properties by name in
- * your build file, or by calling the project's {@link #property(String)} method. The scopes are:</p>
- *
- * <ul>
- *
- * <li>The <code>Project</code> object itself. This scope includes any property getters and setters declared by the
- * <code>Project</code> implementation class.  For example, {@link #getRootProject()} is accessible as the
- * <code>rootProject</code> property.  The properties of this scope are readable or writable depending on the presence
- * of the corresponding getter or setter method.</li>
- *
- * <li>The <em>additional</em> properties of the project.  Each project maintains a map of additional properties, which
- * can contain any arbitrary name -> value pair.  The properties of this scope are readable and writable.</li>
- *
- * <li>The <em>convention</em> properties added to the project by each {@link Plugin} applied to the project. A {@link
- * Plugin} can add properties and methods to a project through the project's {@link Convention} object.  The properties
- * of this scope may be readable or writable, depending on the convention objects.</li>
- *
- * <li>The tasks of the project.  A task is accessible by using its name as a property name.  The properties of this
- * scope are read-only. For example, a task called <code>compile</code> is accessible as the <code>compile</code>
- * property.</li>
- *
- * <li>The additional properties and convention properties of the project's parent project, recursively up to the root
- * project. The properties of this scope are read-only.</li>
- *
- * </ul>
- *
- * <p>When reading a property, the project searches the above scopes in order, and returns the value from the first
- * scope it finds the property in.  See {@link #property(String)} for more details.</p>
- *
- * <p>When writing a property, the project searches the above scopes in order, and sets the property in the first scope
- * it finds the property in. If not found, the project adds the property to its map of additional properties. See {@link
- * #setProperty(String, Object)} for more details.</p>
- *
- * <h4>Dynamic Methods</h4>
- *
- * <p>A project has 5 method 'scopes', which it searches for methods:</p>
- *
- * <ul>
- *
- * <li>The <code>Project</code> object itself.</li>
- *
- * <li>The build file. The project searches for a matching method declared in the build file.</li>
- *
- * <li>The <em>convention</em> methods added to the project by each {@link Plugin} applied to the project. A {@link
- * Plugin} can add properties and method to a project through the project's {@link Convention} object.</li>
- *
- * <li>The tasks of the project. A method is added for each task, using the name of the task as the method name and
- * taking a single closure parameter. The method calls the {@link Task#configure(groovy.lang.Closure)} method for the
- * associated task with the provided closure. For example, if the project has a task called <code>compile</code>, then a
- * method is added with the following signature: <code>void compile(Closure configureClosure)</code>.</li>
- *
- * <li>The parent project, recursively up to the root project.</li>
- *
- * </ul>
- *
- * @author Hans Dockter
- */
-public interface Project extends Comparable<Project> {
-    /**
-     * The default project build file name.
-     */
-    public static final String DEFAULT_BUILD_FILE = "build.gradle";
-
-    /**
-     * The hierarchy separator for project and task path names.
-     */
-    public static final String PATH_SEPARATOR = ":";
-
-    /**
-     * The default build directory name.
-     */
-    public static final String DEFAULT_BUILD_DIR_NAME = "build";
-
-    public static final String GRADLE_PROPERTIES = "gradle.properties";
-
-    public static final String SYSTEM_PROP_PREFIX = "systemProp";
-
-    public static final String TMP_DIR_NAME = ".gradle";
-
-    public static final String DEFAULT_VERSION = "unspecified";
-
-    public static final String DEFAULT_STATUS = "release";
-
-    /**
-     * <p>Returns the root project for the hierarchy that this project belongs to.  In the case of a single-project
-     * build, this method returns this project.</p>
-     *
-     * @return The root project. Never returns null.
-     */
-    Project getRootProject();
-
-    /**
-     * <p>Returns the root directory of this project. The root directory is the project directory of the root
-     * project.</p>
-     *
-     * @return The root directory. Never returns null.
-     */
-    File getRootDir();
-
-    /**
-     * <p>Returns the build directory of this project.  The build directory is the directory which all artifacts are
-     * generated into.  The default value for the build directory is <code><i>projectDir</i>/build</code></p>
-     *
-     * @return The build directory. Never returns null.
-     */
-    File getBuildDir();
-
-    /**
-     * <p>Sets the build directory of this project. The build directory is the directory which all artifacts are
-     * generated into. The path parameter is evaluated as described for {@link #file(Object)}. This mean you can use,
-     * amongst other things, a relative or absolute path or File object to specify the build directory.</p>
-     *
-     * @param path The build directory. This is evaluated as for {@link #file(Object)}
-     */
-    void setBuildDir(Object path);
-
-    /**
-     * <p>Returns the name of the build directory of this project. It is resolved relative to the project directory of
-     * this project to determine the build directory. The default value is {@value #DEFAULT_BUILD_DIR_NAME}.</p>
-     *
-     * @return The build dir name. Never returns null.
-     */
-    @Deprecated
-    String getBuildDirName();
-
-    /**
-     * <p>Sets the build directory name of this project.</p>
-     *
-     * @param buildDirName The build dir name. Should not be null.
-     * @deprecated Use {@link #setBuildDir(Object)} instead.
-     */
-    @Deprecated
-    void setBuildDirName(String buildDirName);
-
-    /**
-     * <p>Returns the build file Gradle will evaluate against this project object. The default is <code> {@value
-     * #DEFAULT_BUILD_FILE}</code>. If an embedded script is provided the build file will be null. </p>
-     *
-     * @return Current build file. May return null.
-     */
-    File getBuildFile();
-
-    /**
-     * <p>Returns the parent project of this project, if any.</p>
-     *
-     * @return The parent project, or null if this is the root project.
-     */
-    Project getParent();
-
-    /**
-     * <p>Returns the name of this project. The project's name is not necessarily unique within a project hierarchy. You
-     * should use the {@link #getPath()} method for a unique identifier for the project.</p>
-     *
-     * @return The name of this project. Never return null.
-     */
-    String getName();
-
-    /**
-     * Returns the description of this project.
-     *
-     * @return the description. May return null.
-     */
-    String getDescription();
-
-    /**
-     * Sets a description for this project.
-     *
-     * @param description The description of the project. Might be null.
-     */
-    void setDescription(String description);
-
-    /**
-     * <p>Returns the group of this project. Gradle always uses the {@code toString()} value of the group. The group
-     * defaults to the path with dots a separators.</p>
-     *
-     * @return The group of this project. Never returns null.
-     */
-    Object getGroup();
-
-    /**
-     * <p>Sets the group of this project.</p>
-     *
-     * @param group The group of this project. Must not be null.
-     */
-    void setGroup(Object group);
-
-    /**
-     * <p>Returns the version of this project. Gradle always uses the {@code toString()} value of the version. The
-     * version defaults to {@value #DEFAULT_VERSION}.</p>
-     *
-     * @return The version of this project. Never returns null.
-     */
-    Object getVersion();
-
-    /**
-     * <p>Sets the version of this project.</p>
-     *
-     * @param version The version of this project. Must not be null.
-     */
-    void setVersion(Object version);
-
-    /**
-     * <p>Returns the status of this project. Gradle always uses the {@code toString()} value of the status. The status
-     * defaults to {@value #DEFAULT_STATUS}.</p>
-     *
-     * <p>The status of the project is only relevant, if you upload libraries together with a module descriptor. The
-     * status specified here, will be part of this module descriptor.</p>
-     *
-     * @return The status of this project. Never returns null.
-     */
-    Object getStatus();
-
-    /**
-     * Sets the status of this project.
-     *
-     * @param status The status. Must not be null.
-     */
-    void setStatus(Object status);
-
-    /**
-     * <p>Returns the direct children of this project.</p>
-     *
-     * @return A map from child project name to child project. Returns an empty map if this this project does not have
-     *         any children.
-     */
-    Map<String, Project> getChildProjects();
-
-    /**
-     * <p>Returns the set of projects which this project depends on.</p>
-     *
-     * @return The set of projects. Returns an empty set if this project depends on no projects.
-     */
-    Set<Project> getDependsOnProjects();
-
-    /**
-     * <p>Sets a property of this project.  This method searches for a property with the given name in the following
-     * locations, and sets the property on the first location where it finds the property.</p>
-     *
-     * <ol>
-     *
-     * <li>The project object itself.  For example, the <code>rootDir</code> project property.</li>
-     *
-     * <li>The project's {@link Convention} object.  For example, the <code>srcRootName</code> java plugin
-     * property.</li>
-     *
-     * <li>The project's additional properties.</li>
-     *
-     * </ol>
-     *
-     * <p>If the property is not found in any of these locations, it is added to the project's additional
-     * properties.</p>
-     *
-     * @param name The name of the property
-     * @param value The value of the property
-     */
-    void setProperty(String name, Object value);
-
-    /**
-     * <p>Returns this project. This method is useful in build files to explicitly access project properties and
-     * methods. For example, using <code>project.name</code> can express your intent better than using
-     * <code>name</code>. This method also allows you to access project properties from a scope where the property may
-     * be hidden, such as, for example, from a method or closure. </p>
-     *
-     * @return This project. Never returns null.
-     */
-    Project getProject();
-
-    /**
-     * <p>Returns the set containing this project and its subprojects.</p>
-     *
-     * @return The set of projects.
-     */
-    Set<Project> getAllprojects();
-
-    /**
-     * <p>Returns the set containing the subprojects of this project.</p>
-     *
-     * @return The set of projects.  Returns an empty set if this project has no subprojects.
-     */
-    Set<Project> getSubprojects();
-
-    /**
-     * <p>Applies a {@link Plugin} to this project.</p>
-     *
-     * @param pluginId The id of the plugin.
-     * @return This project.
-     * @deprecated You should use the {@link #apply(java.util.Map)} or {@link #apply(groovy.lang.Closure)} method
-     *             instead.
-     */
-    @Deprecated
-    Project usePlugin(String pluginId);
-
-    /**
-     * <p>Applies a {@link Plugin} to this project.</p>
-     *
-     * @param pluginClass The class of the plugin.  This class must implement the {@link Plugin} interface.
-     * @return This project.
-     * @deprecated You should use the {@link #apply(java.util.Map)} or {@link #apply(groovy.lang.Closure)} method
-     *             instead.
-     */
-    @Deprecated
-    Project usePlugin(Class<? extends Plugin> pluginClass);
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Calling this method is equivalent to
-     * calling {@link #task(java.util.Map, String)} with an empty options map.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
-     *
-     * @param name The name of the task to be created
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     */
-    Task task(String name) throws InvalidUserDataException;
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. A map of creation options can be
-     * passed to this method to control how the task is created. The following options are available:</p>
-     *
-     * <table>
-     *
-     * <tr><th>Option</th><th>Description</th><th>Default Value</th></tr>
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_TYPE}</code></td><td>The class of the task to
-     * create.</td><td>{@link org.gradle.api.DefaultTask}</td></tr>
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_OVERWRITE}</code></td><td>Replace an existing
-     * task?</td><td><code>false</code></td></tr>
-     *
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_DEPENDS_ON}</code></td><td>A task name or set of task names which
-     * this task depends on</td><td><code>[]</code></td></tr>
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_ACTION}</code></td><td>A closure or {@link Action} to add to the
-     * task.</td><td><code>null</code></td></tr>
-     *
-     * </table>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
-     * to true, an exception is thrown.</p>
-     *
-     * @param args The task creation options.
-     * @param name The name of the task to be created
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     */
-    Task task(Map<String, ?> args, String name) throws InvalidUserDataException;
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
-     * closure is executed to configure the task. A map of creation options can be passed to this method to control how
-     * the task is created. See {@link #task(java.util.Map, String)} for the available options.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
-     * to true, an exception is thrown.</p>
-     *
-     * @param args The task creation options.
-     * @param name The name of the task to be created
-     * @param configureClosure The closure to use to configure the created task.
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     */
-    Task task(Map<String, ?> args, String name, Closure configureClosure);
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
-     * closure is executed to configure the task.</p> <p/> <p>After the task is added to the project, it is made
-     * available as a property of the project, so that you can reference the task by name in your build file.  See <a
-     * href="#properties">here</a> for more details</p>
-     *
-     * @param name The name of the task to be created
-     * @param configureClosure The closure to use to configure the created task.
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     */
-    Task task(String name, Closure configureClosure);
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Calling this method is equivalent to
-     * calling {@link #createTask(java.util.Map, String)} with an empty options map.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
-     *
-     * @param name The name of the task to be created
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     * @deprecated You should use {@link #task(String)} instead.
-     */
-    @Deprecated
-    Task createTask(String name) throws InvalidUserDataException;
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
-     * action is passed to the task's {@link Task#doFirst(Action)} method. Calling this method is equivalent to calling
-     * {@link #createTask(java.util.Map, String, Action)} with an empty options map.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
-     *
-     * @param name The name of the task to be created
-     * @param action The action to be passed to the {@link Task#doFirst(Action)} method of the created task.
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
-     */
-    @Deprecated
-    Task createTask(String name, Action<? super Task> action) throws InvalidUserDataException;
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. A map of creation options can be
-     * passed to this method to control how the task is created. The following options are available:</p>
-     *
-     * <table>
-     *
-     * <tr><th>Option</th><th>Description</th><th>Default Value</th></tr>
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_TYPE}</code></td><td>The class of the task to
-     * create.</td><td>{@link org.gradle.api.DefaultTask}</td></tr>
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_OVERWRITE}</code></td><td>Replace an existing
-     * task?</td><td><code>false</code></td></tr>
-     *
-     * <tr><td><code>{@value org.gradle.api.Task#TASK_DEPENDS_ON}</code></td><td>A task name or set of task names which
-     * this task depends on</td><td><code>[]</code></td></tr>
-     *
-     * </table>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
-     * to true, an exception is thrown.</p>
-     *
-     * @param args The task creation options.
-     * @param name The name of the task to be created
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
-     */
-    @Deprecated
-    Task createTask(Map<String, ?> args, String name) throws InvalidUserDataException;
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
-     * action is passed to the task's {@link Task#doFirst(Action)} method. A map of creation options can be passed to
-     * this method to control how the task is created. See {@link #createTask(java.util.Map, String)} for the available
-     * options.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
-     * to true, an exception is thrown.</p>
-     *
-     * @param args The task creation options.
-     * @param name The name of the task to be created
-     * @param action The action to be passed to the {@link Task#doFirst(Action)} method of the created task.
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
-     */
-    @Deprecated
-    Task createTask(Map<String, ?> args, String name, Action<? super Task> action) throws InvalidUserDataException;
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
-     * action closure is passed to the task's {@link Task#doFirst(Closure)} method. Calling this method is equivalent to
-     * calling {@link #createTask(java.util.Map, String, Closure)} with an empty options map.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project, an exception is thrown.</p>
-     *
-     * @param name The name of the task to be created
-     * @param action The closure to be passed to the {@link Task#doFirst(Closure)} method of the created task.
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
-     */
-    @Deprecated
-    Task createTask(String name, Closure action);
-
-    /**
-     * <p>Creates a {@link Task} with the given name and adds it to this project. Before the task is returned, the given
-     * action closure is passed to the task's {@link Task#doFirst(Closure)} method. A map of creation options can be
-     * passed to this method to control how the task is created. See {@link #createTask(java.util.Map, String)} for the
-     * available options.</p>
-     *
-     * <p>After the task is added to the project, it is made available as a property of the project, so that you can
-     * reference the task by name in your build file.  See <a href="#properties">here</a> for more details</p>
-     *
-     * <p>If a task with the given name already exists in this project and the <code>override</code> option is not set
-     * to true, an exception is thrown.</p>
-     *
-     * @param args The task creation options.
-     * @param name The name of the task to be created
-     * @param action The closure to be passed to the {@link Task#doFirst(Closure)} method of the created task.
-     * @return The newly created task object
-     * @throws InvalidUserDataException If a task with the given name already exists in this project.
-     * @deprecated You should use {@link #task(java.util.Map, String)} instead.
-     */
-    @Deprecated
-    Task createTask(Map<String, ?> args, String name, Closure action);
-
-    /**
-     * <p>Returns the path of this project.  The path is the fully qualified name of the project.</p>
-     *
-     * @return The path. Never returns null.
-     */
-    String getPath();
-
-    /**
-     * <p>Returns the names of the default tasks of this project. These are used when no tasks names are provided when
-     * starting the build.</p>
-     *
-     * @return The default task names. Returns an empty list if this project has no default tasks.
-     */
-    List<String> getDefaultTasks();
-
-    /**
-     * <p>Sets the names of the default tasks of this project. These are used when no tasks names are provided when
-     * starting the build.</p>
-     *
-     * @param defaultTasks The default task names.
-     */
-    void setDefaultTasks(List<String> defaultTasks);
-
-    /**
-     * <p>Sets the names of the default tasks of this project. These are used when no tasks names are provided when
-     * starting the build.</p>
-     *
-     * @param defaultTasks The default task names.
-     */
-    void defaultTasks(String... defaultTasks);
-
-    /**
-     * <p>Declares that this project has an execution dependency on the project with the given path.</p>
-     *
-     * @param path The path of the project which this project depends on.
-     * @throws UnknownProjectException If no project with the given path exists.
-     */
-    void dependsOn(String path) throws UnknownProjectException;
-
-    /**
-     * <p>Declares that this project has an execution dependency on the project with the given path.</p>
-     *
-     * @param path The path of the project which this project depends on.
-     * @param evaluateDependsOnProject If true, adds an evaluation dependency.
-     * @throws UnknownProjectException If no project with the given path exists.
-     */
-    void dependsOn(String path, boolean evaluateDependsOnProject) throws UnknownProjectException;
-
-    /**
-     * <p>Declares that this project has an evaulation dependency on the project with the given path.</p>
-     *
-     * @param path The path of the project which this project depends on.
-     * @return The project which this project depends on.
-     * @throws UnknownProjectException If no project with the given path exists.
-     */
-    Project evaluationDependsOn(String path) throws UnknownProjectException;
-
-    /**
-     * <p>Declares that all child projects of this project have an execution dependency on this project.</p>
-     *
-     * @return this project.
-     */
-    Project childrenDependOnMe();
-
-    /**
-     * <p>Declares that this project have an execution dependency on each of its child projects.</p>
-     *
-     * @return this project.
-     */
-    Project dependsOnChildren();
-
-    /**
-     * <p>Declares that this project have an execution dependency on each of its child projects.</p>
-     *
-     * @param evaluateDependsOnProject If true, adds an evaluation dependency.
-     * @return this project.
-     */
-    Project dependsOnChildren(boolean evaluateDependsOnProject);
-
-    /**
-     * <p>Locates a project by path. If the path is relative, it is interpreted relative to this project.</p>
-     *
-     * @param path The path.
-     * @return The project with the given path. Returns null if no such project exists.
-     */
-    Project findProject(String path);
-
-    /**
-     * <p>Locates a project by path. If the path is relative, it is interpreted relative to this project.</p>
-     *
-     * @param path The path.
-     * @return The project with the given path. Never returns null.
-     * @throws UnknownProjectException If no project with the given path exists.
-     */
-    Project project(String path) throws UnknownProjectException;
-
-    /**
-     * <p>Locates a project by path and configures it using the given closure. If the path is relative, it is
-     * interpreted relative to this project. The target project is passed to the closure as the closure's delegate.</p>
-     *
-     * @param path The path.
-     * @param configureClosure The closure to use to configure the project.
-     * @return The project with the given path. Never returns null.
-     * @throws UnknownProjectException If no project with the given path exists.
-     */
-    Project project(String path, Closure configureClosure);
-
-    /**
-     * <p>Returns a map of the tasks contained in this project, and optionally its subprojects.</p>
-     *
-     * @param recursive If true, returns the tasks of this project and its subprojects.  If false, returns the tasks of
-     * just this project.
-     * @return A map from project to a set of tasks.
-     */
-    Map<Project, Set<Task>> getAllTasks(boolean recursive);
-
-    /**
-     * <p>Returns the set of tasks with the given name contained in this project, and optionally its subprojects.</p>
-     *
-     * @param name The name of the task to locate.
-     * @param recursive If true, returns the tasks of this project and its subprojects. If false, returns the tasks of
-     * just this project.
-     * @return The set of tasks. Returns an empty set if no such tasks exist in this project.
-     */
-    Set<Task> getTasksByName(String name, boolean recursive);
-
-    /**
-     * <p>The directory containing the project build file.</p>
-     *
-     * @return The project directory. Never returns null.
-     */
-    File getProjectDir();
-
-    /**
-     * <p>Resolves a file path relative to the project directory of this project. This method converts the supplied path
-     * based on its type:</p>
-     *
-     * <ul>
-     *
-     * <li>{@link File}. If the file is an absolute file, it is returned as is. Otherwise, the file's path is
-     * interpreted relative to the project directory.</li>
-     *
-     * <li>{@link java.net.URI} or {@link java.net.URL}. The URL's path is interpreted as the file path. Currently, only
-     * {@code file:} URLs are supported.
-     *
-     * <li>{@link Closure}. The closure's return value is resolved recursively.</li>
-     *
-     * <li>{@link java.util.concurrent.Callable}. The callable's return value is resolved recursively.</li>
-     *
-     * <li>{@link Object}. The object's {@code toString()} value is interpreted as a path. If the path is a relative
-     * path, the project directory will be used as a base directory. A String starting with {@code file:} is treated as
-     * a file URL.</li>
-     *
-     * </ul>
-     *
-     * @param path The object to resolve as a File.
-     * @return The resolved file. Never returns null.
-     */
-    File file(Object path);
-
-    /**
-     * <p>Resolves a file path relative to the project directory of this project and validates it using the given
-     * scheme. See {@link PathValidation} for the list of possible validations.</p>
-     *
-     * @param path An object which toString method value is interpreted as a relative path to the project directory.
-     * @param validation The validation to perform on the file.
-     * @return The resolved file. Never returns null.
-     * @throws InvalidUserDataException When the file does not meet the given validation constraint.
-     */
-    File file(Object path, PathValidation validation) throws InvalidUserDataException;
-
-    /**
-     * <p>Resolves a file path to a URI, relative to the project directory of this project. Evaluates the provided path
-     * object as described for {@link #file(Object)}, with the exception that any URI scheme is supported, not just
-     * 'file:' URIs.</p>
-     *
-     * @param path The object to resolve as a URI.
-     * @return The resolved URI. Never returns null.
-     */
-    URI uri(Object path);
-
-    /**
-     * <p>Returns the relative path from the project directory to the given path. The given path object is (logically)
-     * resolved as described for {@link #file(Object)}, from which a relative path is calculated.</p>
-     *
-     * @param path The path to convert to a relative path.
-     * @return The relative path. Never returns null.
-     */
-    String relativePath(Object path);
-
-    /**
-     * <p>Returns a {@link ConfigurableFileCollection} containing the given files. You can pass any of the following
-     * types to this method:</p>
-     *
-     * <ul> <li>A {@code String}. Interpreted relative to the project directory, as for {@link #file(Object)}. A string
-     * that starts with {@code file:} is treated as a file URL.</li>
-     *
-     * <li>A {@code File}. Interpreted relative to the project directory, as for {@link #file(Object)}.</li>
-     *
-     * <li>{@link java.net.URI} or {@link java.net.URL}. The URL's path is interpreted as a file path. Currently, only
-     * {@code file:} URLs are supported.
-     *
-     * <li>A {@code Collection} or an array. May contain any of the types listed here. The elements of the collection
-     * are recursively converted to files.</li>
-     *
-     * <li>A {@link org.gradle.api.file.FileCollection}. The contents of the collection are included in the returned
-     * collection.</li>
-     *
-     * <li>A {@link java.util.concurrent.Callable}. The {@code call()} method may return any of the types listed here.
-     * The return value of the {@code call()} method is recursively converted to files. A {@code null} return value is
-     * treated as an empty collection.</li>
-     *
-     * <li>A Closure. May return any of the types listed here. The return value of the closure is recursively converted
-     * to files. A {@code null} return value is treated as an empty collection.</li>
-     *
-     * <li>An Object. Its {@code toString()} value is treated the same way as a String, as for {@link
-     * #file(Object)}.</li> </ul>
-     *
-     * <p>The returned file collection is lazy, so that the paths are evaluated only when the contents of the file
-     * collection are queried. The file collection is also live, so that it evaluates the above each time the contents
-     * of the collection is queried.</p>
-     *
-     * <p>The returned file collection maintains the iteration order of the supplied paths.</p>
-     *
-     * @param paths The paths to the files. May be empty.
-     * @return The file collection. Never returns null.
-     */
-    ConfigurableFileCollection files(Object... paths);
-
-    /**
-     * <p>Creates a new {@code ConfigurableFileCollection} using the given paths. The paths are evaluated as for {@link
-     * #files(Object...)}. The file collection is configured using the given closure. The file collection is passed to
-     * the closure as its delegate. Example:</p>
-     * <pre>
-     * files "$buildDir/classes" {
-     *     builtBy 'compile'
-     * }
-     * </pre>
-     * <p>The returned file collection is lazy, so that the paths are evaluated only when the contents of the file
-     * collection are queried. The file collection is also live, so that it evaluates the above each time the contents
-     * of the collection is queried.</p>
-     *
-     * @param paths The contents of the file collection. Evaluated as for {@link #files(Object...)}.
-     * @param configureClosure The closure to use to configure the file collection.
-     * @return the configured file tree. Never returns null.
-     */
-    ConfigurableFileCollection files(Object paths, Closure configureClosure);
-
-    /**
-     * <p>Creates a new {@code ConfigurableFileTree} using the given base directory. The given baseDir path is evaluated
-     * as for {@link #file(Object)}.</p>
-     *
-     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
-     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
-     * queried.</p>
-     *
-     * @param baseDir The base directory of the file tree. Evaluated as for {@link #file(Object)}.
-     * @return the file tree. Never returns null.
-     */
-    ConfigurableFileTree fileTree(Object baseDir);
-
-    /**
-     * <p>Creates a new {@code ConfigurableFileTree} using the provided map of arguments.  The map will be applied as
-     * properties on the new file tree.  Example:</p>
-     *
-     * <pre>
-     * fileTree(dir:'src', excludes:['**/ignore/**','**/.svn/**'])
-     * </pre>
-     *
-     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
-     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
-     * queried.</p>
-     *
-     * @param args map of property assignments to {@code ConfigurableFileTree} object
-     * @return the configured file tree. Never returns null.
-     */
-    ConfigurableFileTree fileTree(Map<String, ?> args);
-
-    /**
-     * <p>Creates a new {@code ConfigurableFileTree} using the provided closure.  The closure will be used to configure
-     * the new file tree. The file tree is passed to the closure as its delegate.  Example:</p>
-     *
-     * <pre>
-     * fileTree {
-     *    from 'src'
-     *    exclude '**/.svn/**'
-     * }.copy { into 'dest'}
-     * </pre>
-     *
-     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
-     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
-     * queried.</p>
-     *
-     * @param closure Closure to configure the {@code ConfigurableFileTree} object
-     * @return the configured file tree. Never returns null.
-     */
-    ConfigurableFileTree fileTree(Closure closure);
-
-    /**
-     * <p>Creates a new {@code FileTree} which contains the contents of the given ZIP file. The given zipPath path is
-     * evaluated as for {@link #file(Object)}. You can combine this method with the {@link #copy(groovy.lang.Closure)}
-     * method to unzip a ZIP file.</p>
-     *
-     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
-     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
-     * queried.</p>
-     *
-     * @param zipPath The ZIP file. Evaluated as for {@link #file(Object)}.
-     * @return the file tree. Never returns null.
-     */
-    FileTree zipTree(Object zipPath);
-
-    /**
-     * <p>Creates a new {@code FileTree} which contains the contents of the given TAR file. The given tarPath path is
-     * evaluated as for {@link #file(Object)}. You can combine this method with the {@link #copy(groovy.lang.Closure)}
-     * method to untar a TAR file.</p>
-     *
-     * <p>The returned file tree is lazy, so that it scans for files only when the contents of the file tree are
-     * queried. The file tree is also live, so that it scans for files each time the contents of the file tree are
-     * queried.</p>
-     *
-     * @param tarPath The TAR file. Evaluated as for {@link #file(Object)}.
-     * @return the file tree. Never returns null.
-     */
-    FileTree tarTree(Object tarPath);
-
-    /**
-     * Creates a directory and returns a file pointing to it.
-     *
-     * @param path The path for the directory to be created. Evaluated as for {@link #file(Object)}.
-     * @return the created directory
-     * @throws org.gradle.api.InvalidUserDataException If the path points to an existing file.
-     */
-    File mkdir(Object path);
-
-    /**
-     * Deletes files and directories.
-     *
-     * @param paths Any type of object accepted by {@link org.gradle.api.Project#files(Object...)}
-     * @return true if anything got deleted, false otherwise
-     */
-    boolean delete(Object... paths);
-
-    /**
-     * Executes a Java main class. The closure configures a {@link org.gradle.process.JavaExecSpec}.
-     *
-     * @param closure The closure for configuring the execution.
-     * @return the result of the execution
-     */
-    ExecResult javaexec(Closure closure);
-
-    /**
-     * Executes an external command. The closure configures a {@link org.gradle.process.ExecSpec}.
-     *
-     * @param closure The closure for configuring the execution.
-     * @return the result of the execution
-     */
-    ExecResult exec(Closure closure);
-
-    /**
-     * <p>Converts a name to an absolute project path, resolving names relative to this project.</p>
-     *
-     * @param path The path to convert.
-     * @return The absolute path.
-     * @deprecated Use {@link #absoluteProjectPath(String)} instead.
-     */
-    @Deprecated
-    String absolutePath(String path);
-
-    /**
-     * <p>Converts a name to an absolute project path, resolving names relative to this project.</p>
-     *
-     * @param path The path to convert.
-     * @return The absolute path.
-     */
-    String absoluteProjectPath(String path);
-
-    /**
-     * <p>Converts a name to a project path relative to this project.</p>
-     *
-     * @param path The path to convert.
-     * @return The relative path.
-     */
-    String relativeProjectPath(String path);
-
-    /**
-     * <p>Returns the <code>AntBuilder</code> for this project. You can use this in your build file to execute ant
-     * tasks.</p>
-     *
-     * @return The <code>AntBuilder</code> for this project. Never returns null.
-     */
-    AntBuilder getAnt();
-
-    /**
-     * <p>Creates an additional <code>AntBuilder</code> for this project. You can use this in your build file to execute
-     * ant tasks.</p>
-     *
-     * @return Creates an <code>AntBuilder</code> for this project. Never returns null.
-     * @see #getAnt()
-     */
-    AntBuilder createAntBuilder();
-
-    /**
-     * <p>Executes the given closure against the <code>AntBuilder</code> for this project. You can use this in your
-     * build file to execute ant tasks. The <code>AntBuild</code> is passed to the closure as the closure's
-     * delegate.</p>
-     *
-     * @param configureClosure The closure to execute against the <code>AntBuilder</code>.
-     * @return The <code>AntBuilder</code>. Never returns null.
-     */
-    AntBuilder ant(Closure configureClosure);
-
-    /**
-     * Returns the configurations of this project.
-     *
-     * @return The configuration of this project.
-     */
-    ConfigurationContainer getConfigurations();
-
-    /**
-     * <p>Configures the dependency configurations for this project.
-     *
-     * <p>This method executes the given closure against the {@link ConfigurationContainer} for this project. The {@link
-     * ConfigurationContainer} is passed to the closure as the closure's delegate.
-     *
-     * @param configureClosure the closure to use to configure the dependency configurations.
-     */
-    void configurations(Closure configureClosure);
-
-    /**
-     * Returns a handler for assigning artifacts produced by the project to configurations.
-     */
-    ArtifactHandler getArtifacts();
-
-    /**
-     * <p>Configures the published artifacts for this project.
-     *
-     * <p>This method executes the given closure against the {@link ArtifactHandler} for this project. The {@link
-     * ArtifactHandler} is passed to the closure as the closure's delegate.
-     *
-     * @param configureClosure the closure to use to configure the published artifacts.
-     */
-    void artifacts(Closure configureClosure);
-
-    /**
-     * <p>Returns the {@link Convention} for this project.</p> <p/> <p>You can access this property in your build file
-     * using <code>convention</code>. You can also can also access the properties and methods of the convention object
-     * as if they were properties and methods of this project. See <a href="#properties">here</a> for more details</p>
-     *
-     * @return The <code>Convention</code>. Never returns null.
-     */
-    Convention getConvention();
-
-    /**
-     * <p>Compares the nesting level of this project with another project of the multi-project hierarchy.</p>
-     *
-     * @param otherProject The project to compare the nesting level with.
-     * @return a negative integer, zero, or a positive integer as this project has a nesting level less than, equal to,
-     *         or greater than the specified object.
-     * @see #getDepth()
-     */
-    int depthCompare(Project otherProject);
-
-    /**
-     * <p>Returns the nesting level of a project in a multi-project hierarchy. For single project builds this is always
-     * 0. In a multi-project hierarchy 0 is returned for the root project.</p>
-     */
-    int getDepth();
-
-    /**
-     * <p>Returns the tasks of this project.</p>
-     *
-     * @return the tasks of this project.
-     */
-    TaskContainer getTasks();
-
-    /**
-     * <p>Configures the sub-projects of this project</p>
-     *
-     * <p>This method executes the given {@link Action} against the sub-projects of this project.</p>
-     *
-     * @param action The action to execute.
-     */
-    void subprojects(Action<? super Project> action);
-
-    /**
-     * <p>Configures the sub-projects of this project.</p>
-     *
-     * <p>This method executes the given closure against each of the sub-projects of this project. The target {@link
-     * Project} is passed to the closure as the closure's delegate.</p>
-     *
-     * @param configureClosure The closure to execute.
-     */
-    void subprojects(Closure configureClosure);
-
-    /**
-     * <p>Configures this project and each of its sub-projects.</p>
-     *
-     * <p>This method executes the given {@link Action} against this project and each of its sub-projects.</p>
-     *
-     * @param action The action to execute.
-     */
-    void allprojects(Action<? super Project> action);
-
-    /**
-     * <p>Configures this project and each of its sub-projects.</p>
-     *
-     * <p>This method executes the given closure against this project and its sub-projects. The target {@link Project}
-     * is passed to the closure as the closure's delegate.</p>
-     *
-     * @param configureClosure The closure to execute.
-     */
-    void allprojects(Closure configureClosure);
-
-    /**
-     * Adds an action to execute immediately before this project is evaluated.
-     *
-     * @param action the action to execute.
-     */
-    void beforeEvaluate(Action<? super Project> action);
-
-    /**
-     * Adds an action to execute immediately after this project is evaluated.
-     *
-     * @param action the action to execute.
-     */
-    void afterEvaluate(Action<? super Project> action);
-
-    /**
-     * <p>Adds a closure to be called immediately before this project is evaluated. The project is passed to the closure
-     * as a parameter.</p>
-     *
-     * @param closure The closure to call.
-     */
-    void beforeEvaluate(Closure closure);
-
-    /**
-     * <p>Adds a closure to be called immediately after this project has been evaluated. The project is passed to the
-     * closure as a parameter. Such a listener gets notified when the build file belonging to this project has been
-     * executed. A parent project may for example add such a listener to its child project. Such a listener can futher
-     * configure those child projects based on the state of the child projects after their build files have been
-     * run.</p>
-     *
-     * @param closure The closure to call.
-     */
-    void afterEvaluate(Closure closure);
-
-    /**
-     * <p>Determines if this project has the given property. See <a href="#properties">here</a> for details of the
-     * properties which are available for a project.</p>
-     *
-     * @param propertyName The name of the property to locate.
-     * @return True if this project has the given property, false otherwise.
-     */
-    boolean hasProperty(String propertyName);
-
-    /**
-     * <p>Returns the properties of this project. See <a href="#properties">here</a> for details of the properties which
-     * are available for a project.</p>
-     *
-     * @return A map from property name to value.
-     */
-    Map<String, ?> getProperties();
-
-    /**
-     * <p>Returns the value of the given property.  This method locates a property as follows:</p>
-     *
-     * <ol>
-     *
-     * <li>If this project object has a property with the given name, return the value of the property.</li>
-     *
-     * <li>If this project's convention object has a property with the given name, return the value of the
-     * property.</li>
-     *
-     * <li>If this project has an additional property with the given name, return the value of the property.</li>
-     *
-     * <li>If this project has a task with the given name, return the task.</li>
-     *
-     * <li>Search up through this project's ancestor projects for a convention property or additional property with the
-     * given name.</li>
-     *
-     * <li>If not found, throw {@link MissingPropertyException}</li>
-     *
-     * </ol>
-     *
-     * @param propertyName The name of the property.
-     * @return The value of the property, possibly null.
-     * @throws MissingPropertyException When the given property is unknown.
-     */
-    Object property(String propertyName) throws MissingPropertyException;
-
-    /**
-     * <p>Returns the logger for this project. You can use this in your build file to write log messages.</p>
-     *
-     * @return The logger. Never returns null.
-     */
-    Logger getLogger();
-
-    /**
-     * <p>Returns the {@link org.gradle.api.invocation.Gradle} invocation which this project belongs to.</p>
-     *
-     * @return The Gradle object. Never returns null.
-     */
-    Gradle getGradle();
-
-    /**
-     * Returns the {@link org.gradle.api.logging.LoggingManager} which can be used to control the logging level and
-     * standard output/error capture for this project's build script. By default, System.out is redirected to the Gradle
-     * logging system at the QUIET log level, and System.err is redirected at the ERROR log level.
-     *
-     * @return the LoggingManager. Never returns null.
-     */
-    LoggingManager getLogging();
-
-    /**
-     * Disables redirection of standard output during project evaluation. By default redirection is enabled.
-     *
-     * @see #captureStandardOutput(org.gradle.api.logging.LogLevel)
-     */
-    @Deprecated
-    void disableStandardOutputCapture();
-
-    /**
-     * <p>Starts redirection of standard output during to the logging system during project evaluation. By default
-     * redirection is enabled and the output is redirected to the QUIET level. System.err is always redirected to the
-     * ERROR level. Redirection of output at execution time can be configured via the tasks.</p>
-     *
-     * <p>In a multi-project this is a per-project setting.</p>
-     *
-     * @param level The level standard out should be logged to.
-     * @see #disableStandardOutputCapture()
-     * @see Task#captureStandardOutput(org.gradle.api.logging.LogLevel)
-     * @see org.gradle.api.Task#disableStandardOutputCapture()
-     * @deprecated Use the {@link org.gradle.api.logging.LoggingManager} returned by {@link #getLogging()} instead
-     */
-    @Deprecated
-    void captureStandardOutput(LogLevel level);
-
-    /**
-     * <p>Configures an object via a closure, with the closure's delegate set to the supplied object. This way you don't
-     * have to specify the context of a configuration statement multiple times. <p/> Instead of:</p>
-     * <pre>
-     * MyType myType = new MyType()
-     * myType.doThis()
-     * myType.doThat()
-     * </pre>
-     * <p/> you can do:
-     * <pre>
-     * MyType myType = configure(new MyType()) {
-     *     doThis()
-     *     doThat()
-     * }
-     * </pre>
-     *
-     * <p>The object being configured is also passed to the closure as a parameter, so you can access it explicitly if
-     * required:</p>
-     * <pre>
-     * configure(someObj) { obj -> obj.doThis() }
-     * </pre>
-     *
-     * @param object The object to configure
-     * @param configureClosure The closure with configure statements
-     * @return The configured object
-     */
-    Object configure(Object object, Closure configureClosure);
-
-    /**
-     * Configures a collection of objects via a closure. This is equivalent to calling {@link #configure(Object,
-     * groovy.lang.Closure)} for each of the given objects.
-     *
-     * @param objects The objects to configure
-     * @param configureClosure The closure with configure statements
-     * @return The configured objects.
-     */
-    Iterable<?> configure(Iterable<?> objects, Closure configureClosure);
-
-    /**
-     * Configures a collection of objects via an action.
-     *
-     * @param objects The objects to configure
-     * @param configureAction The action to apply to each object
-     * @return The configured objects.
-     */
-    <T> Iterable<T> configure(Iterable<T> objects, Action<? super T> configureAction);
-
-    /**
-     * Returns a handler to create repositories which are used for retrieving dependencies and uploading artifacts
-     * produced by the project.
-     *
-     * @return the repository handler. Never returns null.
-     */
-    RepositoryHandler getRepositories();
-
-    /**
-     * <p>Configures the repositories for this project.
-     *
-     * <p>This method executes the given closure against the {@link RepositoryHandler} for this project. The {@link
-     * RepositoryHandler} is passed to the closure as the closure's delegate.
-     *
-     * @param configureClosure the closure to use to configure the repositories.
-     */
-    void repositories(Closure configureClosure);
-
-    /**
-     * Creates a new repository handler. <p/> Each repository handler is a factory and container for repositories. For
-     * example each instance of an upload task has its own repository handler.
-     *
-     * @return a new repository handler
-     */
-    RepositoryHandler createRepositoryHandler();
-
-    /**
-     * Returns the dependency handler of this project. The returned dependency handler instance can be used for adding
-     * new dependencies. For accessing already declared dependencies, the configurations can be used.
-     *
-     * @return the dependency handler. Never returns null.
-     * @see #getConfigurations()
-     */
-    DependencyHandler getDependencies();
-
-    /**
-     * <p>Configures the dependencies for this project.
-     *
-     * <p>This method executes the given closure against the {@link DependencyHandler} for this project. The {@link
-     * DependencyHandler} is passed to the closure as the closure's delegate.
-     *
-     * @param configureClosure the closure to use to configure the dependencies.
-     */
-    void dependencies(Closure configureClosure);
-
-    /**
-     * Returns the plugins container for this project. The returned container can be used to manage the plugins which
-     * are used by this project.
-     *
-     * @return the plugin container. Never returns null.
-     */
-    PluginContainer getPlugins();
-
-    /**
-     * Returns the build script handler for this project. You can use this handler to query details about the build
-     * script for this project, and manage the classpath used to compile and execute the project's build script.
-     *
-     * @return the classpath handler. Never returns null.
-     */
-    ScriptHandler getBuildscript();
-
-    /**
-     * <p>Configures the build script classpath for this project.
-     *
-     * <p>The given closure is executed against this project's {@link ScriptHandler}. The {@link ScriptHandler} is
-     * passed to the closure as the closure's delegate.
-     *
-     * @param configureClosure the closure to use to configure the build script classpath.
-     */
-    void buildscript(Closure configureClosure);
-
-    /**
-     * Copies the specified files.  The given closure is used to configure a {@link CopySpec}, which is then used to
-     * copy the files. Example:
-     * <pre>
-     * copy {
-     *    from configurations.runtime
-     *    into 'build/deploy/lib'
-     * }
-     * </pre>
-     * Note that CopySpecs can be nested:
-     * <pre>
-     * copy {
-     *    into 'build/webroot'
-     *    exclude '**/.svn/**'
-     *    from('src/main/webapp') {
-     *       include '**/*.jsp'
-     *       filter(ReplaceTokens, tokens:[copyright:'2009', version:'2.3.1'])
-     *    }
-     *    from('src/main/js') {
-     *       include '**/*.js'
-     *    }
-     * }
-     * </pre>
-     *
-     * @param closure Closure to configure the CopySpec
-     * @return {@link WorkResult} that can be used to check if the copy did any work.
-     */
-    WorkResult copy(Closure closure);
-
-    /**
-     * Creates a {@link CopySpec} which can later be used to copy files or create an archive. The given closure is used
-     * to configure the {@link CopySpec} before it is returned by this method.
-     *
-     * @param closure Closure to configure the CopySpec
-     * @return The CopySpec
-     */
-    CopySpec copySpec(Closure closure);
-
-    /**
-     * <p>Configures this project using plugins or scripts. The given closure is used to configure an {@link
-     * org.gradle.api.plugins.ObjectConfigurationAction} which is then used to configure this project.</p>
-     *
-     * @param closure The closure to configure the {@code ObjectConfigurationAction}.
-     */
-    void apply(Closure closure);
-
-    /**
-     * <p>Configures this project using plugins or scripts. The following options are available:</p>
-     *
-     * <ul><li>{@code from}: A script to apply to the project. Accepts any path supported by {@link #uri(Object)}.</li>
-     *
-     * <li>{@code plugin}: The id or implementation class of the plugin to apply to the project.</li>
-     *
-     * <li>{@code to}: The target delegate object or objects. Use this to configure objects other than the
-     * project.</li></ul>
-     *
-     * <p>For more detail, see {@link org.gradle.api.plugins.ObjectConfigurationAction}.</p>
-     *
-     * @param options The options to use to configure the {@code ObjectConfigurationAction}.
-     */
-    void apply(Map<String, ?> options);
-
-    /**
-     * Returns the evaluation state of this project. You can use this to access information about the evaluation of this
-     * project, such as whether it has failed.
-     *
-     * @return the project state. Never returns null.
-     */
-    ProjectState getState();
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Configuration.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Configuration.java
deleted file mode 100644
index 228b5cd..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/Configuration.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*
- * Copyright 2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.artifacts;
-
-import groovy.lang.Closure;
-import org.apache.ivy.plugins.resolver.DependencyResolver;
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.tasks.TaskDependency;
-
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * <p>A {@code Configuration} represents a group of artifacts and their dependencies.</p>
- */
-public interface Configuration extends FileCollection {
-    /**
-     * The states a configuration can be into. A configuration is only mutable as long as it is
-     * in the unresolved state.
-     */
-    enum State { UNRESOLVED, RESOLVED, RESOLVED_WITH_FAILURES }
-
-    /**
-     * Returns the state of the configuration.
-     *
-     * @see org.gradle.api.artifacts.Configuration.State
-     */
-    State getState();
-
-    /**
-     * Returns the name of this configuration.
-     *
-     * @return The configuration name, never null.
-     */
-    String getName();
-
-    /**
-     * Returns true if this is a visible configuration. A visible configuration is usable outside the project it belongs
-     * to. The default value is true.
-     *
-     * @return true if this is a visible configuration.
-     */
-    boolean isVisible();
-
-    /**
-     * Sets the visibility of this configuration. When visible is set to true, this configuration is visibile outside
-     * the project it belongs to. The default value is true.
-     *
-     * @param visible true if this is a visible configuration
-     * @return this configuration
-     */
-    Configuration setVisible(boolean visible);
-
-    /**
-     * Returns the names of the configurations which this configuration extends from. The artifacts of the super
-     * configurations are also available in this configuration.
-     *
-     * @return The super configurations. Returns an empty set when this configuration does not extend any others.
-     */
-    Set<Configuration> getExtendsFrom();
-
-    /**
-     * Sets the configurations which this configuration extends from.
-     *
-     * @param superConfigs The super configuration. Should not be null.
-     * @return this configuration
-     */
-    Configuration setExtendsFrom(Set<Configuration> superConfigs);
-
-    /**
-     * Adds the given configurations to the set of configuration which this configuration extends from.
-     *
-     * @param superConfigs The super configurations.
-     * @return this configuration
-     */
-    Configuration extendsFrom(Configuration... superConfigs);
-
-    /**
-     * Returns the transitivity of this configuration. A transitive configuration contains the transitive closure of its
-     * direct dependencies, and all their dependencies. An intransitive configuration contains only the direct
-     * dependencies. The default value is true.
-     *
-     * @return true if this is a transitive configuration, false otherwise.
-     */
-    boolean isTransitive();
-
-    /**
-     * Sets the transitivity of this configuration. When set to true, this configuration will contain the transitive
-     * closure of its dependencies and their dependencies. The default value is true.
-     *
-     * @param t true if this is a transitive configuration.
-     * @return this configuration
-     */
-    Configuration setTransitive(boolean t);
-
-    /**
-     * Returns the description for this configuration.
-     *
-     * @return the description. May be null.
-     */
-    String getDescription();
-
-    /**
-     * Sets the description for this configuration.
-     *
-     * @param description the description. May be null
-     * @return this configuration
-     */
-    Configuration setDescription(String description);
-
-    /**
-     * Gets a ordered set including this configuration and all superconfigurations
-     * recursively.
-     * @return the list of all configurations
-     */
-    Set<Configuration> getHierarchy();
-
-    /**
-     * Resolves this configuration. This locates and downloads the files which make up this configuration, and returns
-     * the resulting set of files.
-     *
-     * @return The files of this configuration.
-     */
-    Set<File> resolve();
-
-    /**
-     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as
-     * {@link #files(org.gradle.api.specs.Spec)}.
-     *
-     * @param dependencySpecClosure The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
-     * @return The files of a subset of dependencies of this configuration.
-     */
-    Set<File> files(Closure dependencySpecClosure);
-
-    /**
-     * Resolves this configuration. This locates and downloads the files which make up this configuration.
-     * But only the resulting set of files belonging to the subset of dependencies specified by the dependencySpec
-     * is returned.
-     *
-     * @param dependencySpec The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
-     * @return The files of a subset of dependencies of this configuration.
-     */
-    Set<File> files(Spec<Dependency> dependencySpec);
-
-    /**
-     * Resolves this configuration. This locates and downloads the files which make up this configuration.
-     * But only the resulting set of files belonging to the specified dependencies
-     * is returned.
-     *
-     * @param dependencies The dependences to be resolved
-     * @return The files of a subset of dependencies of this configuration.
-     */
-    Set<File> files(Dependency... dependencies);
-
-    /**
-     * Resolves this configuration lazyly. The resolve happens when the elements of the returned FileCollection get accessed the first time.
-     * This locates and downloads the files which make up this configuration. Only the resulting set of files belonging to the subset
-     * of dependencies specified by the dependencySpec is contained in the FileCollection.
-     *
-     * @param dependencySpec The spec describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
-     * @return The FileCollection with a subset of dependencies of this configuration.
-     */
-    FileCollection fileCollection(Spec<Dependency> dependencySpec);
-
-    /**
-     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as
-     * {@link #fileCollection(org.gradle.api.specs.Spec)}.
-     *
-     * @param dependencySpecClosure The closure describing a filter applied to the all the dependencies of this configuration (including dependencies from extended configurations).
-     * @return The FileCollection with a subset of dependencies of this configuration.
-     */
-    FileCollection fileCollection(Closure dependencySpecClosure);
-
-    /**
-     * Resolves this configuration lazyly. The resolve happens when the elements of the returned FileCollection get accessed the first time.
-     * This locates and downloads the files which make up this configuration. Only the resulting set of files belonging to specified
-     * dependencies is contained in the FileCollection.
-     *
-     * @param dependencies The dependencies for which the FileCollection should contain the files.
-     * @return The FileCollection with a subset of dependencies of this configuration.
-     */
-    FileCollection fileCollection(Dependency... dependencies);
-
-
-    /**
-     * Resolves this configuration. This locates and downloads the files which make up this configuration, and returns
-     * a ResolvedConfiguration that may be used to determine information about the resolve (including errors).
-     *
-     * @return The ResolvedConfiguration object
-     */
-    ResolvedConfiguration getResolvedConfiguration();
-
-    /**
-     * Returns the name of the task that upload the artifacts of this configuration to repositories
-     * declared by the user.
-     *
-     * @see org.gradle.api.tasks.Upload
-     */
-    String getUploadTaskName();
-
-    /**
-     * Returns a {@code TaskDependency} object containing all required dependencies to build the internal dependencies
-     * (e.g. project dependencies) belonging to this configuration or to one of its super configurations.
-     *
-     * @return a TaskDependency object
-     */
-    TaskDependency getBuildDependencies();
-
-    /**
-     * Returns a TaskDependency object containing dependencies on all tasks with the specified name from project
-     * dependencies related to this configuration or one of its super configurations.  These other projects may be
-     * projects this configuration depends on or projects with a similarly named configuation that depend on this one
-     * based on the useDependOn argument.
-     *
-     * @param useDependedOn if true, add tasks from project dependencies in this conifguration, otherwise use projects
-     *                      from configurations with the same name that depend on this one.
-     * @param taskName name of task to depend on
-     * @return the populated TaskDependency object
-     */
-    TaskDependency getTaskDependencyFromProjectDependency(boolean useDependedOn, final String taskName);
-
-    /**
-     * Returns a {@code TaskDependency} object containing all required dependencies to build the artifacts
-     * belonging to this configuration or to one of its super configurations.
-     *
-     * @return a task dependency object
-     */
-    TaskDependency getBuildArtifacts();
-
-    /**
-     * Publishes the artifacts of this configuration to the specified repositories. This
-     * method is usually used only internally as the users use the associated upload tasks to
-     * upload the artifacts.
-     *
-     * @param publishRepositories The repositories to publish the artifacts to.
-     * @param descriptorDestination The destination dir for the descriptor file (if null no descriptor file is written).
-     *
-     * @see org.gradle.api.tasks.Upload
-     * @see #getUploadTaskName()
-     */
-    void publish(List<DependencyResolver> publishRepositories, File descriptorDestination);
-
-    /**
-     * Gets the set of dependencies directly contained in this configuration
-     * (ignoring superconfigurations).
-     *
-     * @return the set of dependencies
-     */
-    Set<Dependency> getDependencies();
-
-    /**
-     * Gets the complete set of dependencies including those contributed by
-     * superconfigurations.
-     *
-     * @return the set of dependencies
-     */
-    Set<Dependency> getAllDependencies();
-
-    /**
-     * Gets the set of dependencies of type T directly contained in this configuration (ignoring superconfigurations).
-     *
-     * @param type the dependency type
-     * @param <T> the dependency type
-     * @return The set. Returns an empty set if there are no such dependencies.
-     */
-    <T extends Dependency> Set<T> getDependencies(Class<T> type);
-
-    /**
-     * Gets the set of dependencies of type T for this configuration including thos contributed by superconfigurations.
-     *
-     * @param type the dependency type
-     * @param <T> the dependency type
-     * @return The set. Returns an empty set if there are no such dependencies.
-     */
-    <T extends Dependency> Set<T> getAllDependencies(Class<T> type);
-
-    /**
-     * Adds a dependency to this configuration.
-     *
-     * @param dependency The dependency to be added.
-     */
-    void addDependency(Dependency dependency);
-
-    /**
-     * Returns the artifacts of this configuration excluding the artifacts of extended configurations.
-     */
-    Set<PublishArtifact> getArtifacts();
-
-    /**
-     * Returns the artifacts of this configuration including the artifacts of extended configurations.
-     */
-    Set<PublishArtifact> getAllArtifacts();
-
-    /**
-     * Returns the artifacts of this configuration as a {@link FileCollection}, including artifacts of extended
-     * configurations.
-     *
-     * @return the artifact files.
-     */
-    FileCollection getAllArtifactFiles();
-
-    /**
-     * Returns the exclude rules applied for resolving any dependency of this configuration.
-     *
-     * @see #exclude(java.util.Map)
-     */
-    Set<ExcludeRule> getExcludeRules();
-
-    /**
-     * Adds an exclude rule to exclude transitive dependencies for all dependencies of this configuration.
-     * You can also add exclude rules per-dependency. See {@link ModuleDependency#exclude(java.util.Map)}.
-     *
-     * @param excludeProperties the properties to define the exclude rule.
-     * @return this
-     */
-    Configuration exclude(Map<String, String> excludeProperties);
-
-    /**
-     * Returns all the configurations belonging to the same configuration container as this
-     * configuration (including this configuration).
-     */
-    Set<Configuration> getAll();
-
-    /**
-     * Adds an artifact to be published to this configuration.
-     *
-     * @param artifact The artifact.
-     * @return this
-     */
-    Configuration addArtifact(PublishArtifact artifact);
-
-    /**
-     * Removes an artifact from the artifacts to be published to this configuration.
-     *
-     * @param artifact The artifact.
-     * @return this
-     */
-    Configuration removeArtifact(PublishArtifact artifact);
-
-    /**
-     * Creates a copy of this configuration that only contains the dependencies directly in this configuration
-     * (without contributions from superconfigurations).  The new configuation will be in the
-     * UNRESOLVED state, but will retain all other attributes of this configuration except superconfigurations.
-     * {@link #getHierarchy()} for the copy will not include any superconfigurations.
-     * @return copy of this configuration
-     */
-    Configuration copy();
-
-    /**
-     * Creates a copy of this configuration that contains the dependencies directly in this configuration
-     * and those derived from superconfigurations.  The new configuration will be in the
-     * UNRESOLVED state, but will retain all other attributes of this configuration except superconfigurations.
-     * {@link #getHierarchy()} for the copy will not include any superconfigurations.
-     * @return copy of this configuration
-     */
-    Configuration copyRecursive();
-
-    /**
-     * Creates a copy of this configuration ignoring superconfigurations (see {@link #copy()} but filtering
-     * the dependencies using the dependencySpec.  The dependencySpec may be obtained from
-     * {@link org.gradle.api.artifacts.specs.DependencySpecs DependencySpecs.type()} like
-     * DependencySpecs.type(Type.EXTERNAL)
-     * @param dependencySpec filtering requirements
-     * @return copy of this configuration
-     */
-    Configuration copy(Spec<Dependency> dependencySpec);
-
-    /**
-     * Creates a copy of this configuration with dependencies from superconfigurations (see {@link #copyRecursive()})
-     *  but filtering the dependencies using the dependencySpec.  The dependencySpec may be obtained from
-     * {@link org.gradle.api.artifacts.specs.DependencySpecs DependencySpecs.type()} like
-     * DependencySpecs.type(Type.EXTERNAL)
-     * @param dependencySpec filtering requirements
-     * @return copy of this configuration
-     */
-    Configuration copyRecursive(Spec<Dependency> dependencySpec);
-
-    /**
-     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as {@link #copy(org.gradle.api.specs.Spec)}
-     *
-     * @param dependencySpec filtering requirements
-     * @return copy of this configuration
-     */
-    Configuration copy(Closure dependencySpec);
-
-    /**
-     * Takes a closure which gets coerced into a Spec. Behaves otherwise in the same way as {@link #copyRecursive(org.gradle.api.specs.Spec)}
-     *
-     * @param dependencySpec filtering requirements
-     * @return copy of this configuration
-     */
-    Configuration copyRecursive(Closure dependencySpec);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/RepositoryHandler.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/RepositoryHandler.java
deleted file mode 100644
index 606b505..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/dsl/RepositoryHandler.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.artifacts.dsl;
-
-import groovy.lang.Closure;
-import org.apache.ivy.plugins.resolver.DependencyResolver;
-import org.apache.ivy.plugins.resolver.FileSystemResolver;
-import org.gradle.api.artifacts.ResolverContainer;
-import org.gradle.api.artifacts.maven.GroovyMavenDeployer;
-import org.gradle.api.artifacts.maven.MavenResolver;
-import org.gradle.api.internal.artifacts.configurations.ResolverProvider;
-
-import java.util.Map;
-
-/**
- * A {@code RepositoryHandler} manages a set of repositories, allowing repositories to be defined and queried.
- *
- * @author Hans Dockter
- */
-public interface RepositoryHandler extends ResolverContainer, ResolverProvider {
-    final String DEFAULT_MAVEN_DEPLOYER_NAME = "mavenDeployer";
-    final String DEFAULT_MAVEN_INSTALLER_NAME = "mavenInstaller";
-
-    /**
-     * Adds a resolver that looks into a number of directories for artifacts. The artifacts are expected to be located in the
-     * root of the specified directories. The resolver ignores any group/organization information specified in the
-     * dependency section of your build script. If you only use this kind of resolver you might specify your
-     * dependencies like <code>":junit:4.4"</code> instead of <code>"junit:junit:4.4"</code>.
-     *
-     * The following parameter are accepted as keys for the map:
-     *
-     * <table summary="Shows property keys and associated values">
-     * <tr><th>Key</th>
-     *     <th>Description of Associated Value</th></tr>
-     * <tr><td><code>name</code></td>
-     *     <td><em>(optional)</em> The name of the repository.
-     * The default is a Hash value of the rootdir paths. The name is used in the console output,
-     * to point to information related to a particular repository. A name must be unique amongst a repository group.</td></tr>
-     * <tr><td><code>dirs</code></td>
-     *     <td>Specifies a list of rootDirs where to look for dependencies.</td></tr>
-     * </table>
-     *
-     * <p>Examples:
-     * <pre>
-     * repositories {
-     *     flatDir name: 'libs', dirs: "$projectDir/libs"
-     *     flatDir dirs: ["$projectDir/libs1", "$projectDir/libs2"]
-     * }
-     * </pre>
-     * </p>
-     *
-     * @param args
-     * @return the added resolver
-     * @throws org.gradle.api.InvalidUserDataException In the case neither rootDir nor rootDirs is specified of if both
-     * are specified.
-     */
-    FileSystemResolver flatDir(Map<String, ?> args);
-
-    /**
-     * Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is
-     * always {@link #MAVEN_CENTRAL_URL}. The behavior of this resolver
-     * is otherwise the same as the ones added by {@link #mavenRepo(java.util.Map)}.
-     *
-     * The following parameter are accepted as keys for the map:
-     *
-     * <table summary="Shows property keys and associated values">
-     * <tr><th>Key</th>
-     *     <th>Description of Associated Value</th></tr>
-     * <tr><td><code>name</code></td>
-     *     <td><em>(optional)</em> The name of the repository. The default is {@value #DEFAULT_MAVEN_CENTRAL_REPO_NAME}
-     * is used as the name. A name must be unique amongst a repository group.
-     * </td></tr>
-     * <tr><td><code>urls</code></td>
-     *     <td>A single jar repository or a collection of jar repositories. Sometimes the artifact
-     * lives in a different repository than the POM. In such a case you can specify further locations to look for an artifact.
-     * But be aware that the POM is only looked up in the root repository</td></tr>
-     * </table>
-     *
-     * <p>Examples:
-     * <pre>
-     * repositories {
-     *     mavenCentral urls: ["http://www.mycompany.com/repository1", "http://www.mycompany.com/repository2"]
-     *     mavenCentral name: "nonDefaultName", urls: ["http://www.mycompany.com/repository"]
-     * }
-     * </pre>
-     * </p>
-     *
-     * @param args A list of urls of repositories to look for artifacts only.
-     * @return the added resolver
-     * @see #mavenRepo(java.util.Map)
-     */
-    DependencyResolver mavenCentral(Map<String, ?> args);
-
-    /**
-     * Adds a repository which looks in the Maven central repository for dependencies. The URL used to access this repository is
-     * {@value #MAVEN_CENTRAL_URL}. The name of the repository is {@value #DEFAULT_MAVEN_CENTRAL_REPO_NAME}.
-     *
-     * <p>Examples:
-     * <pre>
-     * repositories {
-     *     mavenCentral()
-     * }
-     * </pre>
-     * </p>
-     *
-     * @return the added resolver
-     * @see #mavenRepo(java.util.Map)
-     * @see #mavenCentral(java.util.Map)
-     */
-    DependencyResolver mavenCentral();
-
-    /**
-     * Adds a repository which looks in the local Maven cache for dependencies. The name of the repository is
-     * {@value #DEFAULT_MAVEN_LOCAL_REPO_NAME}.
-     *
-     * <p>Examples:
-     * <pre>
-     * repositories {
-     *     mavenLocal()
-     * }
-     * </pre>
-     * </p>
-     *
-     * @return the added resolver
-     * @see #mavenRepo(java.util.Map)
-     */
-    DependencyResolver mavenLocal();
-
-    /**
-     * Adds a repository which is Maven compatible. The compatibility is in regard to layout, snapshot handling and
-     * dealing with the pom.xml. This repository can't be used for publishing in a Maven compatible way. For publishing
-     * to a Maven repository, have a look at {@link #mavenDeployer(java.util.Map)} or {@link #mavenInstaller(java.util.Map)}.
-     *
-     * By default the repository accepts to resolve artifacts without a pom. The repository always looks first for the pom
-     * in the root repository. It then looks for the artifact in the root repository. Sometimes the artifact
-     * lives in a different repository than the pom. In such a case you can specify further locations to look for an artifact.
-     * But be aware that the pom is only looked up in the root repository.
-     *
-     * The following parameter are accepted as keys for the map:
-     *
-     * <table summary="Shows property keys and associated values">
-     * <tr><th>Key</th>
-     *     <th>Description of Associated Value</th></tr>
-     * <tr><td><code>name</code></td>
-     *     <td><em>(optional)</em> The name of the repository. The default is the URL of the root repo.
-     * The name is used in the console output,
-     * to point to information related to a particular repository. A name must be unique amongst a repository group.
-     * </td></tr>
-     * <tr><td><code>urls</code></td>
-     *     <td>A single repository url or a list of urls. The first url is the the url of the root repo.
-     * Gradle always looks first for the pom in the root repository. After this it looks for the artifact in the root repository.
-     * If the artifact can't be found there, it looks for it in the other repositories.</td></tr>
-     * </table>
-     *
-     * <p>Examples:
-     * <pre>
-     * repositories {
-     *     mavenRepo urls: ["http://www.mycompany.com/repository1", "http://www.mycompany.com/repository2"]
-     *     mavenRepo name: "nonDefaultName", urls: ["http://www.mycompany.com/repository"]
-     * }
-     * </pre>
-     * </p>
-     *
-     * For Ivy related reasons, Maven Snapshot dependencies are only properly resolved if no additional jar locations
-     * are specified. This is unfortunate and we hope to improve this in a future release.
-     *
-     * @param args The argument to create the repository
-     * @return the added repository
-     * @see #mavenCentral(java.util.Map)
-     */
-    DependencyResolver mavenRepo(Map<String, ?> args);
-
-    DependencyResolver mavenRepo(Map<String, ?> args, Closure configClosure);
-
-    GroovyMavenDeployer mavenDeployer();
-
-    GroovyMavenDeployer mavenDeployer(Closure configureClosure);
-
-    /**
-     * Adds a repository for publishing to a Maven repository. This repository can not be used for reading from a Maven
-     * repository.
-     *
-     * The following parameter are accepted as keys for the map:
-     *
-     * <table summary="Shows property keys and associated values">
-     * <tr><th>Key</th>
-     *     <th>Description of Associated Value</th></tr>
-     * <tr><td><code>name</code></td>
-     *     <td><em>(optional)</em> The name of the repository. The default is <em>mavenDeployer-{SOME_ID}</em>.
-     * The name is used in the console output,
-     * to point to information related to a particular repository. A name must be unique amongst a repository group.
-     * </td></tr>
-     * </table>
-     *
-     * @param args The argument to create the repository
-     * @return The added repository
-     * @see #mavenDeployer(java.util.Map, groovy.lang.Closure)
-     */
-    GroovyMavenDeployer mavenDeployer(Map<String, ?> args);
-
-    /**
-     * Behaves the same way as {@link #mavenDeployer(java.util.Map)}. Additionally a closure can be passed to
-     * further configure the added repository.
-     *
-     * @param args The argument to create the repository
-     * @param configureClosure
-     * @return The added repository
-     */
-    GroovyMavenDeployer mavenDeployer(Map<String, ?> args, Closure configureClosure);
-
-    MavenResolver mavenInstaller();
-
-    MavenResolver mavenInstaller(Closure configureClosure);
-
-    /**
-     * Adds a repository for installing to a local Maven cache. This repository can not be used for reading.
-     *
-     * The following parameter are accepted as keys for the map:
-     *
-     * <table summary="Shows property keys and associated values">
-     * <tr><th>Key</th>
-     *     <th>Description of Associated Value</th></tr>
-     * <tr><td><code>name</code></td>
-     *     <td><em>(optional)</em> The name of the repository. The default is <em>mavenInstaller-{SOME_ID}</em>.
-     * The name is used in the console output,
-     * to point to information related to a particular repository. A name must be unique amongst a repository group.
-     * </td></tr>
-     * </table>
-     *
-     * @param args The argument to create the repository
-     * @return The added repository
-     * @see #mavenInstaller(java.util.Map, groovy.lang.Closure) (java.util.Map, groovy.lang.Closure)
-     */
-    MavenResolver mavenInstaller(Map<String, ?> args);
-
-    /**
-     * Behaves the same way as {@link #mavenInstaller(java.util.Map)}. Additionally a closure can be passed to
-     * further configure the added repository.
-     *
-     * @param args The argument to create the repository
-     * @param configureClosure
-     * @return The added repository
-     */
-    MavenResolver mavenInstaller(Map<String, ?> args, Closure configureClosure);
-
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenPom.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenPom.java
deleted file mode 100644
index 26bc0f2..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/maven/MavenPom.java
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.artifacts.maven;
-
-import groovy.lang.Closure;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-import org.gradle.api.Action;
-import org.gradle.api.artifacts.ConfigurationContainer;
-
-import java.io.Writer;
-import java.util.List;
-
-/**
- * Is used for generating a Maven pom file and customizing the generation.
- * To learn about the Maven pom see: <a href="http://maven.apache.org/pom.html">http://maven.apache.org/pom.html</a>
- *
- * @author Hans Dockter
- */
-public interface MavenPom {
-    /**
-     * Returns the scope mappings used for generating this pom.
-     */
-    Conf2ScopeMappingContainer getScopeMappings();
-
-    /**
-     * Provides a builder for the Maven pom for adding or modifying properties of the Maven {@link #getModel()}.
-     * The syntax is exactly the same as used by polyglot Maven. For example:
-     *
-     * <pre>
-     * pom.project {
-     *    inceptionYear '2008'
-     *    licenses {
-     *       license {
-     *          name 'The Apache Software License, Version 2.0'
-     *          url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-     *          distribution 'repo'
-     *       }
-     *    }
-     * }
-     * </pre>
-     *
-     * @param pom
-     * @return this
-     */
-    MavenPom project(Closure pom);
-
-    /**
-     * Returns the group id for this POM.
-     *
-     * @see org.apache.maven.model.Model#setGroupId(String)
-     */
-    String getGroupId();
-
-    /**
-     * Sets the group id for this POM.
-     *
-     * @see org.apache.maven.model.Model#getGroupId
-     * @return this
-     */
-    MavenPom setGroupId(String groupId);
-
-    /**
-     * Returns the artifact id for this POM.
-     * 
-     * @see org.apache.maven.model.Model#getArtifactId()
-     */
-    String getArtifactId();
-
-    /**
-     * Sets the artifact id for this POM.
-     *
-     * @see org.apache.maven.model.Model#setArtifactId(String)
-     * @return this
-     */
-    MavenPom setArtifactId(String artifactId);
-
-    /**
-     * Returns the version for this POM.
-     *
-     * @see org.apache.maven.model.Model#getVersion()
-     */
-    String getVersion();
-
-    /**
-     * Sets the version for this POM.
-     *
-     * @see org.apache.maven.model.Model#setVersion(String)
-     * @return this
-     */
-    MavenPom setVersion(String version);
-
-    /**
-     * Returns the packaging for this POM.
-     *
-     * @see org.apache.maven.model.Model#getPackaging()
-     */
-    String getPackaging();
-
-    /**
-     * Sets the packaging for this POM.
-     *
-     * @see org.apache.maven.model.Model#setPackaging(String)
-     * @return this
-     */
-    MavenPom setPackaging(String packaging);
-
-    /**
-     * Sets the dependencies for this POM.
-     *
-     * @see org.apache.maven.model.Model#setDependencies(java.util.List)
-     * @return this
-     */
-    MavenPom setDependencies(List<Dependency> dependencies);
-
-    /**
-     * Returns the dependencies for this POM.
-     * 
-     * @see org.apache.maven.model.Model#getDependencies()
-     */
-    List<Dependency> getDependencies();
-
-    /**
-     * Returns the underlying native Maven {@link org.apache.maven.model.Model} object. The MavenPom object
-     * delegates all the configuration information to this object. There Gradle MavenPom objects provides
-     * delegation methods just for setting the groupId, artifactId, version and packaging. For all other
-     * elements, either use the model object or {@link #project(groovy.lang.Closure)}.
-     *
-     * @return the underlying native Maven object
-     */
-    Model getModel();
-
-    /**
-     * Sets the underlying native Maven {@link org.apache.maven.model.Model} object.
-     *
-     * @param model
-     * @return this
-     * @see #getModel() 
-     */
-    MavenPom setModel(Model model);
-
-    /**
-     * Writes the {@link #getEffectivePom()} xml to a writer while applying the {@link #withXml(org.gradle.api.Action)} actions.
-     *
-     * @param writer The writer to write the pom xml.
-     * @return this
-     */
-    MavenPom writeTo(Writer writer);
-
-    /**
-     * Writes the {@link #getEffectivePom()} xml to a file while applying the {@link #withXml(org.gradle.api.Action)} actions.
-     * The path is resolved as defined by {@link org.gradle.api.Project#files(Object...)}
-     *
-     * @param path The path of the file to write the pom xml into.
-     * @return this
-     */
-    MavenPom writeTo(Object path);
-
-    /**
-     * <p>Adds a closure to be called when the pom has been configured. The pom is passed to the closure as a
-     * parameter.</p>
-     *
-     * @param closure The closure to execute when the pom has been configured.
-     * @return this
-     */
-    MavenPom whenConfigured(Closure closure);
-
-    /**
-     * <p>Adds an action to be called when the pom has been configured. The pom is passed to the action as a
-     * parameter.</p>
-     *
-     * @param action The action to execute when the pom has been configured.
-     * @return this
-     */
-    MavenPom whenConfigured(Action<MavenPom> action);
-
-    /**
-     * <p>Adds a closure to be called when the POM XML has been created. The XML is passed to the closure as a
-     * parameter in form of a {@link org.gradle.api.artifacts.maven.XmlProvider}. The action can modify the XML.</p>
-     *
-     * @param closure The closure to execute when the POM XML has been created.
-     * @return this
-     */
-    MavenPom withXml(Closure closure);
-
-    /**
-     * <p>Adds an action to be called when the POM XML has been created. The XML is passed to the action as a
-     * parameter in form of a {@link org.gradle.api.artifacts.maven.XmlProvider}. The action can modify the XML.</p>
-     *
-     * @param action The action to execute when the POM XML has been created.
-     * @return this
-     */
-    MavenPom withXml(Action<XmlProvider> action);
-
-    /**
-     * Returns the configuration container used for mapping configurations to maven scopes.
-     */
-    ConfigurationContainer getConfigurations();
-
-    /**
-     * Sets the configuration container used for mapping configurations to maven scopes.
-     * @return this
-     */
-    MavenPom setConfigurations(ConfigurationContainer configurations);
-
-    /**
-     * Returns a pom with the generated dependencies and the {@link #whenConfigured(org.gradle.api.Action)} actions applied.
-     *
-     * @return the effective pom
-     */
-    MavenPom getEffectivePom();
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/Type.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/Type.java
deleted file mode 100644
index 02bc87f..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/artifacts/specs/Type.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.artifacts.specs;
-
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.ProjectDependency;
-import org.gradle.api.artifacts.ExternalDependency;
-
-/**
- * Dependency types.
- */
-public enum Type {
-    EXTERNAL {public boolean isOf(Dependency dependency) {return dependency instanceof ExternalDependency;}},
-    PROJECT {public boolean isOf(Dependency dependency) {return dependency instanceof ProjectDependency;}};
-
-    public abstract boolean isOf(Dependency dependency);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractDomainObjectCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractDomainObjectCollection.java
deleted file mode 100644
index 74b8077..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractDomainObjectCollection.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal;
-
-import groovy.lang.Closure;
-import org.codehaus.groovy.runtime.DefaultGroovyMethods;
-import org.gradle.api.Action;
-import org.gradle.api.DomainObjectCollection;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.specs.Specs;
-
-import java.util.*;
-
-public abstract class AbstractDomainObjectCollection<T> implements DomainObjectCollection<T> {
-    private final Store<T> store;
-
-    protected AbstractDomainObjectCollection(Store<T> store) {
-        this.store = store;
-    }
-
-    public Set<T> getAll() {
-        return new LinkedHashSet<T>(store.getAll());
-    }
-
-    public Set<T> findAll(Spec<? super T> spec) {
-        return Specs.filterIterable(store.getAll(), spec);
-    }
-
-    public Iterator<T> iterator() {
-        return getAll().iterator();
-    }
-
-    public void allObjects(Action<? super T> action) {
-        whenObjectAdded(action);
-        for (T t : new ArrayList<T>(store.getAll())) {
-            action.execute(t);
-        }
-    }
-
-    public void allObjects(Closure action) {
-        allObjects(toAction(action));
-    }
-
-    public Action<? super T> whenObjectAdded(Action<? super T> action) {
-        store.objectAdded(action);
-        return action;
-    }
-
-    public Action<? super T> whenObjectRemoved(Action<? super T> action) {
-        store.objectRemoved(action);
-        return action;
-    }
-
-    public void whenObjectAdded(Closure action) {
-        whenObjectAdded(toAction(action));
-    }
-
-    private Action<? super T> toAction(Closure action) {
-        return (Action<? super T>) DefaultGroovyMethods.asType(action, Action.class);
-    }
-
-    protected interface Store<S> {
-        Collection<? extends S> getAll();
-
-        void objectAdded(Action<? super S> action);
-
-        void objectRemoved(Action<? super S> action);
-    }
-
-    protected static class FilteredStore<S> implements Store<S> {
-        private final Store<? super S> store;
-        private final Class<S> type;
-        private final Spec<? super S> spec;
-
-        public FilteredStore(Store<? super S> store, Class<S> type, Spec<? super S> spec) {
-            this.store = store;
-            this.type = type;
-            this.spec = spec;
-        }
-
-        public Collection<? extends S> getAll() {
-            List<S> values = new ArrayList<S>();
-            for (Object s : store.getAll()) {
-                S filtered = filter(s);
-                if (filtered != null) {
-                    values.add(filtered);
-                }
-            }
-            return values;
-        }
-
-        public void objectAdded(Action<? super S> action) {
-            store.objectAdded(filter(action));
-        }
-
-        public void objectRemoved(Action<? super S> action) {
-            store.objectRemoved(filter(action));
-        }
-
-        protected S filter(Object object) {
-            if (!type.isInstance(object)) {
-                return null;
-            }
-            S s = type.cast(object);
-            if (!spec.isSatisfiedBy(s)) {
-                return null;
-            }
-            return s;
-        }
-
-        protected Action<Object> filter(final Action<? super S> action) {
-            return new Action<Object>() {
-                public void execute(Object object) {
-                    S s = filter(object);
-                    if (s != null) {
-                        action.execute(s);
-                    }
-                }
-            };
-        }
-    }
-
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractTask.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractTask.java
deleted file mode 100644
index 7729cf8..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/AbstractTask.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal;
-
-import groovy.lang.Closure;
-import groovy.lang.MissingPropertyException;
-import org.codehaus.groovy.runtime.InvokerInvocationException;
-import org.gradle.api.*;
-import org.gradle.api.internal.file.TemporaryFileProvider;
-import org.gradle.api.internal.plugins.DefaultConvention;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.internal.project.ServiceRegistry;
-import org.gradle.api.internal.tasks.DefaultTaskDependency;
-import org.gradle.api.internal.tasks.TaskDependencyInternal;
-import org.gradle.api.internal.tasks.TaskExecuter;
-import org.gradle.api.internal.tasks.TaskStateInternal;
-import org.gradle.api.logging.*;
-import org.gradle.api.plugins.Convention;
-import org.gradle.api.specs.AndSpec;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.tasks.TaskDependency;
-import org.gradle.api.tasks.TaskInputs;
-import org.gradle.api.tasks.TaskState;
-import org.gradle.logging.LoggingManagerInternal;
-import org.gradle.logging.StandardOutputCapture;
-import org.gradle.util.ConfigureUtil;
-import org.gradle.util.DeprecationLogger;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-/**
- * @author Hans Dockter
- */
-public abstract class AbstractTask implements TaskInternal, DynamicObjectAware {
-    private static Logger buildLogger = Logging.getLogger(Task.class);
-    private static ThreadLocal<TaskInfo> nextInstance = new ThreadLocal<TaskInfo>();
-    private ProjectInternal project;
-
-    private String name;
-
-    private List<Action<? super Task>> actions = new ArrayList<Action<? super Task>>();
-
-    private String path;
-
-    private boolean enabled = true;
-
-    private DefaultTaskDependency dependencies;
-
-    private DynamicObjectHelper dynamicObjectHelper;
-
-    private String description;
-
-    private String group;
-
-    private AndSpec<Task> onlyIfSpec = new AndSpec<Task>(createNewOnlyIfSpec());
-
-    private final TaskOutputsInternal outputs;
-
-    private final TaskInputs inputs;
-
-    private TaskExecuter executer;
-
-    private final ServiceRegistry services;
-
-    private final TaskStateInternal state;
-
-    private final LoggingManagerInternal loggingManager;
-
-    protected AbstractTask() {
-        this(taskInfo());
-    }
-
-    private static TaskInfo taskInfo() {
-        TaskInfo taskInfo = nextInstance.get();
-        assert taskInfo != null;
-        return taskInfo;
-    }
-
-    private AbstractTask(TaskInfo taskInfo) {
-        this.project = taskInfo.project;
-        this.name = taskInfo.name;
-        assert project != null;
-        assert name != null;
-        path = project.absoluteProjectPath(name);
-        state = new TaskStateInternal(toString());
-        dynamicObjectHelper = new DynamicObjectHelper(this, new DefaultConvention());
-        dependencies = new DefaultTaskDependency(project.getTasks());
-        services = project.getServices().createFor(this);
-        outputs = services.get(TaskOutputsInternal.class);
-        inputs = services.get(TaskInputs.class);
-        executer = services.get(TaskExecuter.class);
-        loggingManager = services.get(LoggingManagerInternal.class);
-    }
-
-    public static <T extends Task> T injectIntoNewInstance(ProjectInternal project, String name, Callable<T> factory) {
-        nextInstance.set(new TaskInfo(project, name));
-        try {
-            try {
-                return factory.call();
-            } catch (RuntimeException e) {
-                throw e;
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        } finally {
-            nextInstance.set(null);
-        }
-    }
-
-    public TaskState getState() {
-        return state;
-    }
-
-    public AntBuilder getAnt() {
-        return project.getAnt();
-    }
-
-    public Project getProject() {
-        return project;
-    }
-
-    public void setProject(Project project) {
-        this.project = (ProjectInternal) project;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public List<Action<? super Task>> getActions() {
-        return actions;
-    }
-
-    public void setActions(List<Action<? super Task>> actions) {
-        this.actions = actions;
-    }
-
-    public TaskDependencyInternal getTaskDependencies() {
-        return dependencies;
-    }
-
-    public Set<Object> getDependsOn() {
-        return dependencies.getValues();
-    }
-
-    public void setDependsOn(Iterable<?> dependsOn) {
-        dependencies.setValues(dependsOn);
-    }
-
-    public void onlyIf(Closure onlyIfClosure) {
-        this.onlyIfSpec = this.onlyIfSpec.and(onlyIfClosure);
-    }
-
-    public void onlyIf(Spec<? super Task> onlyIfSpec) {
-        this.onlyIfSpec = this.onlyIfSpec.and(onlyIfSpec);
-    }
-
-    public void setOnlyIf(Spec<? super Task> spec) {
-        onlyIfSpec = createNewOnlyIfSpec().and(spec);
-    }
-
-    public void setOnlyIf(Closure onlyIfClosure) {
-        onlyIfSpec = createNewOnlyIfSpec().and(onlyIfClosure);
-    }
-
-    private AndSpec<Task> createNewOnlyIfSpec() {
-        return new AndSpec<Task>(new Spec<Task>() {
-            public boolean isSatisfiedBy(Task element) {
-                return element == AbstractTask.this && enabled;
-            }
-        });
-    }
-
-    public Spec<? super TaskInternal> getOnlyIf() {
-        return onlyIfSpec;
-    }
-
-    public boolean getDidWork() {
-        return state.getDidWork();
-    }
-
-    public void setDidWork(boolean didWork) {
-        state.setDidWork(didWork);
-    }
-
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    public boolean getEnabled() {
-        return enabled;
-    }
-
-    public void setEnabled(boolean enabled) {
-        this.enabled = enabled;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public Task deleteAllActions() {
-        actions.clear();
-        return this;
-    }
-
-    public void execute() {
-        executer.execute(this, state);
-        state.rethrowFailure();
-    }
-
-    public TaskExecuter getExecuter() {
-        return executer;
-    }
-
-    public void setExecuter(TaskExecuter executer) {
-        this.executer = executer;
-    }
-
-    public Task dependsOn(Object... paths) {
-        dependencies.add(paths);
-        return this;
-    }
-
-    public Task doFirst(Action<? super Task> action) {
-        if (action == null) {
-            throw new InvalidUserDataException("Action must not be null!");
-        }
-        actions.add(0, action);
-        return this;
-    }
-
-    public Task doLast(Action<? super Task> action) {
-        if (action == null) {
-            throw new InvalidUserDataException("Action must not be null!");
-        }
-        actions.add(action);
-        return this;
-    }
-
-    public boolean equals(Object other) {
-        if (other == this) {
-            return true;
-        }
-        if (other == null || other.getClass() != getClass()) {
-            return false;
-        }
-        AbstractTask otherTask = (AbstractTask) other;
-        return getPath().equals(otherTask.getPath());
-    }
-
-    public int hashCode() {
-        return path.hashCode();
-    }
-
-    public int compareTo(Task otherTask) {
-        int depthCompare = project.compareTo(otherTask.getProject());
-        if (depthCompare == 0) {
-            return getPath().compareTo(otherTask.getPath());
-        } else {
-            return depthCompare;
-        }
-    }
-
-    public String toString() {
-        return String.format("task '%s'", path);
-    }
-
-    public Logger getLogger() {
-        return buildLogger;
-    }
-
-    public Task disableStandardOutputCapture() {
-        DeprecationLogger.nagUser("Task.disableStandardOutputCapture()");
-        loggingManager.disableStandardOutputCapture();
-        return this;
-    }
-
-    public Task captureStandardOutput(LogLevel level) {
-        DeprecationLogger.nagUser("Task.captureStandardOutput()", "getLogging().captureStandardOutput()");
-        loggingManager.captureStandardOutput(level);
-        return this;
-    }
-
-    public LoggingManager getLogging() {
-        return loggingManager;
-    }
-
-    public StandardOutputCapture getStandardOutputCapture() {
-        return loggingManager;
-    }
-
-    public Map<String, Object> getAdditionalProperties() {
-        return dynamicObjectHelper.getAdditionalProperties();
-    }
-
-    public DynamicObjectHelper getDynamicObjectHelper() {
-        return dynamicObjectHelper;
-    }
-
-    public Object property(String propertyName) throws MissingPropertyException {
-        return dynamicObjectHelper.getProperty(propertyName);
-    }
-
-    public boolean hasProperty(String propertyName) {
-        return dynamicObjectHelper.hasProperty(propertyName);
-    }
-
-    public void setProperty(String name, Object value) {
-        dynamicObjectHelper.setProperty(name, value);
-    }
-
-    public Convention getConvention() {
-        return dynamicObjectHelper.getConvention();
-    }
-
-    public void setConvention(Convention convention) {
-        dynamicObjectHelper.setConvention(convention);
-    }
-
-    public DynamicObject getAsDynamicObject() {
-        return dynamicObjectHelper;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public String getGroup() {
-        return group;
-    }
-
-    public void setGroup(String group) {
-        this.group = group;
-    }
-
-    public TaskInputs getInputs() {
-        return inputs;
-    }
-
-    public TaskOutputsInternal getOutputs() {
-        return outputs;
-    }
-
-    protected ServiceRegistry getServices() {
-        return services;
-    }
-
-    public boolean dependsOnTaskDidWork() {
-        TaskDependency dependency = getTaskDependencies();
-        for (Task depTask : dependency.getDependencies(this)) {
-            if (depTask.getDidWork()) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public Task doFirst(Closure action) {
-        if (action == null) {
-            throw new InvalidUserDataException("Action must not be null!");
-        }
-        doFirst(convertClosureToAction(action));
-        return this;
-    }
-
-    public Task doLast(Closure action) {
-        if (action == null) {
-            throw new InvalidUserDataException("Action must not be null!");
-        }
-        doLast(convertClosureToAction(action));
-        return this;
-    }
-
-    public Task leftShift(Closure action) {
-        return doLast(action);
-    }
-
-    public Task configure(Closure closure) {
-        return ConfigureUtil.configure(closure, this);
-    }
-
-    public File getTemporaryDir() {
-        File dir = getServices().get(TemporaryFileProvider.class).newTemporaryFile(getName());
-        dir.mkdirs();
-        return dir;
-    }
-
-    private Action<Task> convertClosureToAction(Closure actionClosure) {
-        actionClosure.setDelegate(this);
-        actionClosure.setResolveStrategy(Closure.DELEGATE_FIRST);
-        return new ClosureTaskAction(actionClosure);
-    }
-
-    private static class TaskInfo {
-        private final ProjectInternal project;
-        private final String name;
-
-        private TaskInfo(ProjectInternal project, String name) {
-            this.name = name;
-            this.project = project;
-        }
-    }
-
-    private static class ClosureTaskAction implements Action<Task> {
-        private final Closure closure;
-
-        private ClosureTaskAction(Closure closure) {
-            this.closure = closure;
-        }
-
-        public void execute(Task task) {
-            try {
-                if (closure.getMaximumNumberOfParameters() == 0) {
-                    closure.call();
-                }
-                else {
-                    closure.call(task);
-                }
-            } catch (InvokerInvocationException e) {
-                Throwable cause = e.getCause();
-                if (cause instanceof RuntimeException) {
-                    throw (RuntimeException) cause;
-                }
-                throw e;
-            }
-        }
-    }
-
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GraphAggregator.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GraphAggregator.java
deleted file mode 100644
index 7657bc7..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/GraphAggregator.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal;
-
-import java.util.*;
-
-/**
- * Groups the nodes of a graph based on their reachability from a set of starting nodes.
- */
-public class GraphAggregator<N> {
-    private final CachingDirectedGraphWalker<N, N> graphWalker;
-
-    public GraphAggregator(DirectedGraph<N, ?> graph) {
-        graphWalker = new CachingDirectedGraphWalker<N,N>(new ConnectedNodesAsValuesDirectedGraph<N>(graph));
-    }
-
-    public Result<N> group(Collection<? extends N> startNodes, Collection<? extends N> allNodes) {
-        Map<N, Set<N>> reachableByNode = new HashMap<N, Set<N>>();
-        Set<N> topLevelNodes = new LinkedHashSet<N>(allNodes);
-        for (N node : allNodes) {
-            Set<N> reachableNodes = graphWalker.add(node).findValues();
-            reachableByNode.put(node, reachableNodes);
-            topLevelNodes.removeAll(reachableNodes);
-        }
-        topLevelNodes.addAll(startNodes);
-        Map<N, Set<N>> nodes = new HashMap<N, Set<N>>();
-        for (N node : topLevelNodes) {
-            nodes.put(node, calculateReachableNodes(reachableByNode, node, topLevelNodes));
-        }
-        return new Result<N>(nodes, topLevelNodes);
-    }
-
-    private Set<N> calculateReachableNodes(Map<N, Set<N>> nodes, N node, Set<N> topLevelNodes) {
-        Set<N> reachableNodes = nodes.get(node);
-        reachableNodes.add(node);
-        Set<N> reachableStartNodes = new LinkedHashSet<N>(topLevelNodes);
-        reachableStartNodes.retainAll(reachableNodes);
-        reachableStartNodes.remove(node);
-        for (N startNode : reachableStartNodes) {
-            reachableNodes.removeAll(calculateReachableNodes(nodes, startNode, topLevelNodes));
-        }
-        return reachableNodes;
-    }
-
-    public static class Result<N> {
-        private final Map<N, Set<N>> nodes;
-        private final Set<N> topLevelNodes;
-
-        public Result(Map<N, Set<N>> nodes, Set<N> topLevelNodes) {
-            this.nodes = nodes;
-            this.topLevelNodes = topLevelNodes;
-        }
-
-        public Set<N> getNodes(N startNode) {
-            return nodes.get(startNode);
-        }
-
-        public Set<N> getTopLevelNodes() {
-            return topLevelNodes;
-        }
-    }
-
-    private static class ConnectedNodesAsValuesDirectedGraph<N> implements DirectedGraph<N, N> {
-        private final DirectedGraph<N, ?> graph;
-
-        private ConnectedNodesAsValuesDirectedGraph(DirectedGraph<N, ?> graph) {
-            this.graph = graph;
-        }
-
-        public void getNodeValues(N node, Collection<N> values, Collection<N> connectedNodes) {
-            Set<N> edges = new LinkedHashSet<N>();
-            graph.getNodeValues(node, new ArrayList(), edges);
-            values.addAll(edges);
-            connectedNodes.addAll(edges);
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/XmlTransformer.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/XmlTransformer.java
deleted file mode 100644
index 1041de3..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/XmlTransformer.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal;
-
-import groovy.lang.Closure;
-import groovy.util.Node;
-import groovy.util.XmlNodePrinter;
-import groovy.util.XmlParser;
-import groovy.xml.XmlUtil;
-import org.codehaus.groovy.runtime.DefaultGroovyMethods;
-import org.gradle.api.Action;
-import org.gradle.api.Transformer;
-import org.gradle.api.artifacts.maven.XmlProvider;
-import org.gradle.util.UncheckedException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-
-public class XmlTransformer implements Transformer<String> {
-    private final List<Action<? super XmlProvider>> actions = new ArrayList<Action<? super XmlProvider>>();
-
-    public void addAction(Action<? super XmlProvider> provider) {
-        actions.add(provider);
-    }
-
-    public void addAction(Closure closure) {
-        actions.add((Action<XmlProvider>) DefaultGroovyMethods.asType(closure, Action.class));
-    }
-
-    public String transform(String original) {
-        return doTransform(original).toString();
-    }
-
-    public void transform(String original, Writer destination) {
-        doTransform(original).writeTo(destination);
-    }
-
-    public void transform(Node original, Writer destination) {
-        doTransform(original).writeTo(destination);
-    }
-
-    private XmlProviderImpl doTransform(String original) {
-        XmlProviderImpl provider = new XmlProviderImpl(original);
-        provider.apply(actions);
-        return provider;
-    }
-
-    private XmlProviderImpl doTransform(Node original) {
-        XmlProviderImpl provider = new XmlProviderImpl(original);
-        provider.apply(actions);
-        return provider;
-    }
-
-    private static class XmlProviderImpl implements XmlProvider {
-        private StringBuilder builder;
-        private Node node;
-        private String stringValue;
-        private Element element;
-
-        public XmlProviderImpl(String original) {
-            this.stringValue = original;
-        }
-
-        public XmlProviderImpl(Node original) {
-            this.node = original;
-        }
-
-        public void apply(Iterable<Action<? super XmlProvider>> actions) {
-            for (Action<? super XmlProvider> action : actions) {
-                action.execute(this);
-            }
-        }
-
-        @Override
-        public String toString() {
-            StringWriter writer = new StringWriter();
-            writeTo(writer);
-            return writer.toString();
-        }
-
-        public void writeTo(Writer writer) {
-            try {
-                if (node != null) {
-                    PrintWriter printWriter = new PrintWriter(writer);
-                    new XmlNodePrinter(printWriter).print(node);
-                    printWriter.flush();
-                } else if (element != null) {
-                    PrintWriter printWriter = new PrintWriter(writer);
-                    XmlUtil.serialize(element, printWriter);
-                    printWriter.flush();
-                } else if (builder != null) {
-                    writer.append(builder);
-                } else {
-                    writer.append(stringValue);
-                }
-            } catch (IOException e) {
-                throw UncheckedException.asUncheckedException(e);
-            }
-        }
-
-        public StringBuilder asString() {
-            if (builder == null) {
-                builder = new StringBuilder(toString());
-                node = null;
-                element = null;
-            }
-            return builder;
-        }
-
-        public Node asNode() {
-            if (node == null) {
-                try {
-                    node = new XmlParser().parseText(toString());
-                } catch (Exception e) {
-                    throw UncheckedException.asUncheckedException(e);
-                }
-                builder = null;
-                element = null;
-            }
-            return node;
-        }
-
-        public Element asElement() {
-            if (element == null) {
-                Document document;
-                try {
-                    document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(toString())));
-                } catch (Exception e) {
-                    throw UncheckedException.asUncheckedException(e);
-                }
-                element = document.getDocumentElement();
-                builder = null;
-                node = null;
-            }
-            return element;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContext.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContext.java
deleted file mode 100644
index b487c82..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/CachingDependencyResolveContext.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts;
-
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.internal.CachingDirectedGraphWalker;
-import org.gradle.api.internal.DirectedGraph;
-import org.gradle.api.internal.file.UnionFileCollection;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-public class CachingDependencyResolveContext implements DependencyResolveContext {
-    private final List<Object> queue = new ArrayList<Object>();
-    private final CachingDirectedGraphWalker<Object, FileCollection> walker
-            = new CachingDirectedGraphWalker<Object, FileCollection>(new DependencyGraph());
-    private final boolean transitive;
-
-    public CachingDependencyResolveContext(boolean transitive) {
-        this.transitive = transitive;
-    }
-
-    public boolean isTransitive() {
-        return transitive;
-    }
-
-    public FileCollection resolve() {
-        try {
-            walker.add(queue);
-            return new UnionFileCollection(walker.findValues());
-        } finally {
-            queue.clear();
-        }
-    }
-
-    public void add(Object dependency) {
-        queue.add(dependency);
-    }
-
-    private class DependencyGraph implements DirectedGraph<Object, FileCollection> {
-        public void getNodeValues(Object node, Collection<FileCollection> values, Collection<Object> connectedNodes) {
-            if (node instanceof FileCollection) {
-                FileCollection fileCollection = (FileCollection) node;
-                values.add(fileCollection);
-            }
-            else if (node instanceof DependencyInternal) {
-                DependencyInternal dependencyInternal = (DependencyInternal) node;
-                queue.clear();
-                dependencyInternal.resolve(CachingDependencyResolveContext.this);
-                connectedNodes.addAll(queue);
-                queue.clear();
-            }
-            else {
-                throw new IllegalArgumentException(String.format("Cannot resolve object of unknown type %s.", node.getClass().getSimpleName()));
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstruction.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstruction.java
deleted file mode 100644
index 6e11d80..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstruction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts;
-
-import java.util.List;
-import java.util.Collections;
-
-/**
- * @author Hans Dockter
- */
-public class ProjectDependenciesBuildInstruction {
-    private List<String> taskNames;
-
-    public ProjectDependenciesBuildInstruction(List<String> taskNames) {
-        this.taskNames = taskNames;
-    }
-
-    public List<String> getTaskNames() {
-        if (taskNames == null) {
-            return Collections.emptyList();
-        }
-        return taskNames;
-    }
-
-    public boolean isRebuild() {
-        return taskNames != null;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        ProjectDependenciesBuildInstruction that = (ProjectDependenciesBuildInstruction) o;
-
-        if (taskNames != null ? !taskNames.equals(that.taskNames) : that.taskNames != null) {
-            return false;
-        }
-
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return taskNames != null ? taskNames.hashCode() : 0;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java
deleted file mode 100644
index 6e41407..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java
+++ /dev/null
@@ -1,535 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts.configurations;
-
-import groovy.lang.Closure;
-import org.apache.ivy.plugins.resolver.DependencyResolver;
-import org.gradle.api.Action;
-import org.gradle.api.InvalidUserDataException;
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.api.artifacts.*;
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.internal.DefaultDomainObjectContainer;
-import org.gradle.api.internal.artifacts.DefaultExcludeRule;
-import org.gradle.api.internal.artifacts.IvyService;
-import org.gradle.api.internal.file.AbstractFileCollection;
-import org.gradle.api.internal.tasks.AbstractTaskDependency;
-import org.gradle.api.internal.tasks.TaskDependencyInternal;
-import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.specs.Specs;
-import org.gradle.api.tasks.TaskDependency;
-import org.gradle.util.WrapUtil;
-
-import java.io.File;
-import java.util.*;
-
-import static org.apache.ivy.core.module.descriptor.Configuration.Visibility;
-
-public class DefaultConfiguration extends AbstractFileCollection implements Configuration {
-    private final String path;
-    private final String name;
-
-    private Visibility visibility = Visibility.PUBLIC;
-    private boolean transitive = true;
-    private Set<Configuration> extendsFrom = new LinkedHashSet<Configuration>();
-    private String description;
-    private ConfigurationsProvider configurationsProvider;
-
-    private IvyService ivyService;
-
-    private DefaultDomainObjectContainer<Dependency> dependencies =
-            new DefaultDomainObjectContainer<Dependency>(Dependency.class);
-
-    private Set<PublishArtifact> artifacts = new LinkedHashSet<PublishArtifact>();
-
-    private Set<ExcludeRule> excludeRules = new LinkedHashSet<ExcludeRule>();
-
-    private final ConfigurationTaskDependency taskDependency = new ConfigurationTaskDependency();
-
-    // This lock only protects the following fields
-    private final Object lock = new Object();
-    private State state = State.UNRESOLVED;
-    private ResolvedConfiguration cachedResolvedConfiguration;
-
-    public DefaultConfiguration(String path, String name, ConfigurationsProvider configurationsProvider,
-                                IvyService ivyService) {
-        this.path = path;
-        this.name = name;
-        this.configurationsProvider = configurationsProvider;
-        this.ivyService = ivyService;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public State getState() {
-        synchronized (lock) {
-            return state;
-        }
-    }
-
-    public boolean isVisible() {
-        return visibility == Visibility.PUBLIC;
-    }
-
-    public Configuration setVisible(boolean visible) {
-        throwExceptionIfNotInUnresolvedState();
-        this.visibility = visible ? Visibility.PUBLIC : Visibility.PRIVATE;
-        return this;
-    }
-
-    public Set<Configuration> getExtendsFrom() {
-        return Collections.unmodifiableSet(extendsFrom);
-    }
-
-    public Configuration setExtendsFrom(Set<Configuration> extendsFrom) {
-        throwExceptionIfNotInUnresolvedState();
-        this.extendsFrom = new HashSet<Configuration>();
-        for (Configuration configuration : extendsFrom) {
-            extendsFrom(configuration);
-        }
-        return this;
-    }
-
-    public Configuration extendsFrom(Configuration... extendsFrom) {
-        throwExceptionIfNotInUnresolvedState();
-        for (Configuration configuration : extendsFrom) {
-            if (configuration.getHierarchy().contains(this)) {
-                throw new InvalidUserDataException(String.format(
-                        "Cyclic extendsFrom from %s and %s is not allowed. See existing hierarchy: %s", this,
-                        configuration, configuration.getHierarchy()));
-            }
-            this.extendsFrom.add(configuration);
-        }
-        return this;
-    }
-
-    public boolean isTransitive() {
-        return transitive;
-    }
-
-    public Configuration setTransitive(boolean transitive) {
-        throwExceptionIfNotInUnresolvedState();
-        this.transitive = transitive;
-        return this;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public Configuration setDescription(String description) {
-        throwExceptionIfNotInUnresolvedState();
-        this.description = description;
-        return this;
-    }
-
-    public Set<Configuration> getHierarchy() {
-        Set<Configuration> result = WrapUtil.<Configuration>toLinkedSet(this);
-        collectSuperConfigs(this, result);
-        return result;
-    }
-
-    private void collectSuperConfigs(Configuration configuration, Set<Configuration> result) {
-        for (Configuration superConfig : configuration.getExtendsFrom()) {
-            if (result.contains(superConfig)) {
-                result.remove(superConfig);
-            }
-            result.add(superConfig);
-            collectSuperConfigs(superConfig, result);
-        }
-    }
-
-    public Set<Configuration> getAll() {
-        return configurationsProvider.getAll();
-    }
-
-    public Set<File> resolve() {
-        return getFiles();
-    }
-
-    public Set<File> getFiles() {
-        return fileCollection(Specs.SATISFIES_ALL).getFiles();
-    }
-
-    public Set<File> files(Dependency... dependencies) {
-        return fileCollection(dependencies).getFiles();
-    }
-
-    public Set<File> files(Closure dependencySpecClosure) {
-        return fileCollection(dependencySpecClosure).getFiles();
-    }
-
-    public Set<File> files(Spec<Dependency> dependencySpec) {
-        return fileCollection(dependencySpec).getFiles();
-    }
-
-    public FileCollection fileCollection(Spec<Dependency> dependencySpec) {
-        return new ConfigurationFileCollection(dependencySpec);
-    }
-
-    public FileCollection fileCollection(Closure dependencySpecClosure) {
-        return new ConfigurationFileCollection(dependencySpecClosure);
-    }
-
-    public FileCollection fileCollection(Dependency... dependencies) {
-        return new ConfigurationFileCollection(WrapUtil.toLinkedSet(dependencies));
-    }
-
-    public ResolvedConfiguration getResolvedConfiguration() {
-        synchronized (lock) {
-            if (state == State.UNRESOLVED) {
-                cachedResolvedConfiguration = ivyService.resolve(this);
-                if (cachedResolvedConfiguration.hasError()) {
-                    state = State.RESOLVED_WITH_FAILURES;
-                } else {
-                    state = State.RESOLVED;
-                }
-            }
-            return cachedResolvedConfiguration;
-        }
-    }
-
-    public void publish(List<DependencyResolver> publishResolvers, File descriptorDestination) {
-        ivyService.publish(getHierarchy(), descriptorDestination, publishResolvers);
-    }
-
-    public TaskDependency getBuildDependencies() {
-        return taskDependency;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public TaskDependency getTaskDependencyFromProjectDependency(final boolean useDependedOn, final String taskName) {
-        return new AbstractTaskDependency() {
-            public void resolve(TaskDependencyResolveContext context) {
-                if (useDependedOn) {
-                    addTaskDependenciesFromProjectsIDependOn(taskName, context);
-                } else {
-                    Project thisProject = context.getTask().getProject();
-                    addTaskDependenciesFromProjectsDependingOnMe(thisProject, taskName, context);
-                }
-            }
-
-            private void addTaskDependenciesFromProjectsIDependOn(final String taskName,
-                                                                  final TaskDependencyResolveContext context) {
-                Set<ProjectDependency> projectDependencies = getAllDependencies(ProjectDependency.class);
-                for (ProjectDependency projectDependency : projectDependencies) {
-                    Task nextTask = projectDependency.getDependencyProject().getTasks().findByName(taskName);
-                    if (nextTask != null) {
-                        context.add(nextTask);
-                    }
-                }
-            }
-
-            private void addTaskDependenciesFromProjectsDependingOnMe(final Project thisProject, final String taskName,
-                                                                      final TaskDependencyResolveContext context) {
-                Set<Task> tasksWithName = thisProject.getRootProject().getTasksByName(taskName, true);
-                for (Task nextTask : tasksWithName) {
-                    Configuration configuration = nextTask.getProject().getConfigurations().findByName(getName());
-                    if (configuration != null && doesConfigurationDependOnProject(configuration, thisProject)) {
-                        context.add(nextTask);
-                    }
-                }
-            }
-        };
-    }
-
-    private static boolean doesConfigurationDependOnProject(Configuration configuration, Project project) {
-        Set<ProjectDependency> projectDependencies = configuration.getAllDependencies(ProjectDependency.class);
-        for (ProjectDependency projectDependency : projectDependencies) {
-            if (projectDependency.getDependencyProject().equals(project)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    public TaskDependency getBuildArtifacts() {
-        return getAllArtifactFiles().getBuildDependencies();
-    }
-
-    public Set<Dependency> getDependencies() {
-        return dependencies.getAll();
-    }
-
-    public Set<Dependency> getAllDependencies() {
-        return Configurations.getDependencies(getHierarchy(), Specs.<Dependency>satisfyAll());
-    }
-
-    public <T extends Dependency> Set<T> getDependencies(Class<T> type) {
-        return filter(type, getDependencies());
-    }
-
-    private <T extends Dependency> Set<T> filter(Class<T> type, Set<Dependency> dependencySet) {
-        Set<T> matches = new LinkedHashSet<T>();
-        for (Dependency dependency : dependencySet) {
-            if (type.isInstance(dependency)) {
-                matches.add(type.cast(dependency));
-            }
-        }
-        return matches;
-    }
-
-    public <T extends Dependency> Set<T> getAllDependencies(Class<T> type) {
-        return filter(type, getAllDependencies());
-    }
-
-    public void addDependency(Dependency dependency) {
-        throwExceptionIfNotInUnresolvedState();
-        dependencies.addObject(dependency);
-    }
-
-    public Configuration addArtifact(PublishArtifact artifact) {
-        throwExceptionIfNotInUnresolvedState();
-        artifacts.add(artifact);
-        return this;
-    }
-
-    public Configuration removeArtifact(PublishArtifact artifact) {
-        throwExceptionIfNotInUnresolvedState();
-        artifacts.remove(artifact);
-        return this;
-    }
-
-    public Set<PublishArtifact> getArtifacts() {
-        return Collections.unmodifiableSet(artifacts);
-    }
-
-    public Set<PublishArtifact> getAllArtifacts() {
-        return Configurations.getArtifacts(this.getHierarchy(), Specs.SATISFIES_ALL);
-    }
-
-    public FileCollection getAllArtifactFiles() {
-        return new ArtifactsFileCollection();
-    }
-
-    public Set<ExcludeRule> getExcludeRules() {
-        return Collections.unmodifiableSet(excludeRules);
-    }
-
-    public void setExcludeRules(Set<ExcludeRule> excludeRules) {
-        throwExceptionIfNotInUnresolvedState();
-        this.excludeRules = excludeRules;
-    }
-
-    public DefaultConfiguration exclude(Map<String, String> excludeRuleArgs) {
-        throwExceptionIfNotInUnresolvedState();
-        excludeRules.add(new DefaultExcludeRule(excludeRuleArgs));
-        return this;
-    }
-
-    public String getUploadTaskName() {
-        return Configurations.uploadTaskName(getName());
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        DefaultConfiguration that = (DefaultConfiguration) o;
-        return path.equals(that.path);
-    }
-
-    @Override
-    public int hashCode() {
-        return path.hashCode();
-    }
-
-    public String getDisplayName() {
-        return String.format("configuration '%s'", path);
-    }
-
-    public Configuration getConfiguration(Dependency dependency) {
-        for (Configuration configuration : getHierarchy()) {
-            if (configuration.getDependencies().contains(dependency)) {
-                return configuration;
-            }
-        }
-        return null;
-    }
-
-    public Configuration copy() {
-        return createCopy(getDependencies());
-    }
-
-    public Configuration copyRecursive() {
-        return createCopy(getAllDependencies());
-    }
-
-    public Configuration copy(Spec<Dependency> dependencySpec) {
-        return createCopy(Specs.filterIterable(getDependencies(), dependencySpec));
-    }
-
-    public Configuration copyRecursive(Spec<Dependency> dependencySpec) {
-        return createCopy(Specs.filterIterable(getAllDependencies(), dependencySpec));
-    }
-
-    private DefaultConfiguration createCopy(Set<Dependency> dependencies) {
-        DetachedConfigurationsProvider configurationsProvider = new DetachedConfigurationsProvider();
-        DefaultConfiguration copiedConfiguration = new DefaultConfiguration(path + "Copy", name + "Copy",
-                configurationsProvider, ivyService);
-        configurationsProvider.setTheOnlyConfiguration(copiedConfiguration);
-        // state, cachedResolvedConfiguration, and extendsFrom intentionally not copied - must re-resolve copy
-        // copying extendsFrom could mess up dependencies when copy was re-resolved
-
-        copiedConfiguration.visibility = visibility;
-        copiedConfiguration.transitive = transitive;
-        copiedConfiguration.description = description;
-
-        for (PublishArtifact artifact : getAllArtifacts()) {
-            copiedConfiguration.addArtifact(artifact);
-        }
-
-        // todo An ExcludeRule is a value object but we don't enforce immutability for DefaultExcludeRule as strong as we
-        // should (we expose the Map). We should provide a better API for ExcludeRule (I don't want to use unmodifiable Map).
-        // As soon as DefaultExcludeRule is truly immutable, we don't need to create a new instance of DefaultExcludeRule. 
-        for (ExcludeRule excludeRule : getExcludeRules()) {
-            copiedConfiguration.excludeRules.add(new DefaultExcludeRule(excludeRule.getExcludeArgs()));
-        }
-
-        for (Dependency dependency : dependencies) {
-            copiedConfiguration.addDependency(dependency.copy());
-        }
-        return copiedConfiguration;
-    }
-
-    public Configuration copy(Closure dependencySpec) {
-        return copy(Specs.<Dependency>convertClosureToSpec(dependencySpec));
-    }
-
-    public Configuration copyRecursive(Closure dependencySpec) {
-        return copyRecursive(Specs.<Dependency>convertClosureToSpec(dependencySpec));
-    }
-
-    private void throwExceptionIfNotInUnresolvedState() {
-        if (getState() != State.UNRESOLVED) {
-            throw new InvalidUserDataException("You can't change a configuration which is not in unresolved state!");
-        }
-    }
-
-    class ArtifactsFileCollection extends AbstractFileCollection {
-        private final TaskDependencyInternal taskDependency = new AbstractTaskDependency() {
-            public void resolve(TaskDependencyResolveContext context) {
-                for (Configuration configuration : getExtendsFrom()) {
-                    context.add(configuration.getBuildArtifacts());
-                }
-                for (PublishArtifact publishArtifact : getArtifacts()) {
-                    context.add(publishArtifact);
-                }
-            }
-        };
-
-        public String getDisplayName() {
-            return String.format("%s artifacts", DefaultConfiguration.this);
-        }
-
-        @Override
-        public TaskDependency getBuildDependencies() {
-            return taskDependency;
-        }
-
-        public Set<File> getFiles() {
-            Set<File> files = new LinkedHashSet<File>();
-            for (PublishArtifact artifact : getAllArtifacts()) {
-                files.add(artifact.getFile());
-            }
-            return files;
-        }
-    }
-
-    class ConfigurationFileCollection extends AbstractFileCollection {
-        private Spec<Dependency> dependencySpec;
-
-        private ConfigurationFileCollection(Spec<Dependency> dependencySpec) {
-            this.dependencySpec = dependencySpec;
-        }
-
-        public ConfigurationFileCollection(Closure dependencySpecClosure) {
-            this.dependencySpec = Specs.convertClosureToSpec(dependencySpecClosure);
-        }
-
-        public ConfigurationFileCollection(final Set<Dependency> dependencies) {
-            this.dependencySpec = new Spec<Dependency>() {
-                public boolean isSatisfiedBy(Dependency element) {
-                    return dependencies.contains(element);
-                }
-            };
-        }
-
-        public Spec<Dependency> getDependencySpec() {
-            return dependencySpec;
-        }
-
-        public String getDisplayName() {
-            return String.format("%s dependencies", DefaultConfiguration.this);
-        }
-
-        public Set<File> getFiles() {
-            synchronized (lock) {
-                ResolvedConfiguration resolvedConfiguration = getResolvedConfiguration();
-                if (getState() == State.RESOLVED_WITH_FAILURES) {
-                    resolvedConfiguration.rethrowFailure();
-                }
-                return resolvedConfiguration.getFiles(dependencySpec);
-            }
-        }
-    }
-
-    public Action<? super Dependency> whenDependencyAdded(Action<? super Dependency> action) {
-        return dependencies.whenObjectAdded(action);
-    }
-
-    public void whenDependencyAdded(Closure closure) {
-        dependencies.whenObjectAdded(closure);
-    }
-
-    public void allDependencies(Action<? super Dependency> action) {
-        dependencies.allObjects(action);
-    }
-
-    public void allDependencies(Closure action) {
-        dependencies.allObjects(action);
-    }
-
-    private class ConfigurationTaskDependency extends AbstractTaskDependency {
-        @Override
-        public String toString() {
-            return String.format("build dependencies %s", DefaultConfiguration.this);
-        }
-
-        public void resolve(TaskDependencyResolveContext context) {
-            for (Configuration configuration : getExtendsFrom()) {
-                context.add(configuration);
-            }
-            for (SelfResolvingDependency dependency : DefaultConfiguration.this.getDependencies(
-                    SelfResolvingDependency.class)) {
-                context.add(dependency);
-            }
-        }
-    }
-}
-
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java
deleted file mode 100644
index f937356..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependency.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts.dependencies;
-
-import org.gradle.api.Project;
-import org.gradle.api.artifacts.Configuration;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.artifacts.ProjectDependency;
-import org.gradle.api.internal.artifacts.CachingDependencyResolveContext;
-import org.gradle.api.internal.artifacts.DependencyResolveContext;
-import org.gradle.api.internal.tasks.AbstractTaskDependency;
-import org.gradle.api.internal.tasks.TaskDependencyResolveContext;
-import org.gradle.api.tasks.TaskDependency;
-
-import java.io.File;
-import java.util.Set;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultProjectDependency extends AbstractModuleDependency implements ProjectDependency {
-    private Project dependencyProject;
-    private final ProjectDependenciesBuildInstruction instruction;
-    private final TaskDependencyImpl taskDependency = new TaskDependencyImpl();
-
-    public DefaultProjectDependency(Project dependencyProject, ProjectDependenciesBuildInstruction instruction) {
-        this(dependencyProject, null, instruction);
-    }
-
-    public DefaultProjectDependency(Project dependencyProject, String configuration,
-                                    ProjectDependenciesBuildInstruction instruction) {
-        super(configuration);
-        this.dependencyProject = dependencyProject;
-        this.instruction = instruction;
-    }
-
-    public Project getDependencyProject() {
-        return dependencyProject;
-    }
-
-    public String getGroup() {
-        return dependencyProject.getGroup().toString();
-    }
-
-    public String getName() {
-        return dependencyProject.getName();
-    }
-
-    public String getVersion() {
-        return dependencyProject.getVersion().toString();
-    }
-
-    public Configuration getProjectConfiguration() {
-        return dependencyProject.getConfigurations().getByName(getConfiguration());
-    }
-
-    public ProjectDependency copy() {
-        DefaultProjectDependency copiedProjectDependency = new DefaultProjectDependency(dependencyProject,
-                getConfiguration(), instruction);
-        copyTo(copiedProjectDependency);
-        return copiedProjectDependency;
-    }
-
-    public Set<File> resolve() {
-        return resolve(true);
-    }
-
-    public Set<File> resolve(boolean transitive) {
-        CachingDependencyResolveContext context = new CachingDependencyResolveContext(transitive);
-        context.add(this);
-        return context.resolve().getFiles();
-    }
-
-    @Override
-    public void resolve(DependencyResolveContext context) {
-        boolean transitive = isTransitive() && context.isTransitive();
-        for (Dependency dependency : getProjectConfiguration().getAllDependencies()) {
-            if (!(dependency instanceof ProjectDependency)) {
-                context.add(dependency);
-            } else if (transitive) {
-                context.add(dependency);
-            }
-            // else project dep and non-transitive, so skip
-        }
-    }
-
-    public TaskDependency getBuildDependencies() {
-        return taskDependency;
-    }
-
-    public boolean contentEquals(Dependency dependency) {
-        if (this == dependency) {
-            return true;
-        }
-        if (dependency == null || getClass() != dependency.getClass()) {
-            return false;
-        }
-
-        ProjectDependency that = (ProjectDependency) dependency;
-        if (!isCommonContentEquals(that)) {
-            return false;
-        }
-
-        return dependencyProject.equals(that.getDependencyProject());
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        DefaultProjectDependency that = (DefaultProjectDependency) o;
-        if (!this.getDependencyProject().equals(that.getDependencyProject())) {
-            return false;
-        }
-        if (!this.getConfiguration().equals(that.getConfiguration())) {
-            return false;
-        }
-        if (!this.instruction.equals(that.instruction)) {
-            return false;
-        }
-        return true;
-    }
-
-    @Override
-    public int hashCode() {
-        return getDependencyProject().hashCode() ^ getConfiguration().hashCode() ^ instruction.hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return "DefaultProjectDependency{" + "dependencyProject='" + dependencyProject + '\'' + ", configuration='"
-                + getConfiguration() + '\'' + '}';
-    }
-
-    private class TaskDependencyImpl extends AbstractTaskDependency {
-        public void resolve(TaskDependencyResolveContext context) {
-            if (!instruction.isRebuild()) {
-                return;
-            }
-            Configuration configuration = getProjectConfiguration();
-            context.add(configuration);
-            context.add(configuration.getBuildArtifacts());
-            for (String taskName : instruction.getTaskNames()) {
-                context.add(dependencyProject.getTasks().getByName(taskName));
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/TaskDefinitionScriptTransformer.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/TaskDefinitionScriptTransformer.java
deleted file mode 100644
index 63d236e..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/TaskDefinitionScriptTransformer.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts.dsl;
-
-import org.codehaus.groovy.ast.CodeVisitorSupport;
-import org.codehaus.groovy.ast.DynamicVariable;
-import org.codehaus.groovy.ast.expr.*;
-import org.codehaus.groovy.control.CompilationFailedException;
-import org.codehaus.groovy.control.Phases;
-import org.codehaus.groovy.control.SourceUnit;
-
-import java.util.Collections;
-import java.util.List;
-
-public class TaskDefinitionScriptTransformer extends AbstractScriptTransformer {
-    protected int getPhase() {
-        return Phases.CANONICALIZATION;
-    }
-
-    public String getId() {
-        return "tasks";
-    }
-
-    public void call(SourceUnit source) throws CompilationFailedException {
-        visitScriptCode(source, new TaskDefinitionTransformer());
-    }
-
-    private class TaskDefinitionTransformer extends CodeVisitorSupport {
-        @Override
-        public void visitMethodCallExpression(MethodCallExpression call) {
-            doVisitMethodCallExpression(call);
-            super.visitMethodCallExpression(call);
-        }
-
-        private void doVisitMethodCallExpression(MethodCallExpression call) {
-            if (!isInstanceMethod(call, "task")) {
-                return;
-            }
-
-            ArgumentListExpression args = (ArgumentListExpression) call.getArguments();
-            if (args.getExpressions().size() == 0 || args.getExpressions().size() > 3) {
-                return;
-            }
-
-            // Matches: task <arg>{1, 3}
-
-            if (args.getExpressions().size() > 1) {
-                if (args.getExpression(0) instanceof MapExpression && args.getExpression(1) instanceof VariableExpression) {
-                    // Matches: task <name-value-pairs>, <identifier>, <arg>?
-                    // Map to: task(<name-value-pairs>, '<identifier>', <arg>?)
-                    transformVariableExpression(call, 1);
-                }
-                else if (args.getExpression(0) instanceof VariableExpression) {
-                    // Matches: task <identifier>, <arg>?
-                    transformVariableExpression(call, 0);
-                }
-                return;
-            }
-
-            // Matches: task <arg> or task(<arg>)
-
-            Expression arg = args.getExpression(0);
-            if (arg instanceof VariableExpression) {
-                // Matches: task <identifier> or task(<identifier>)
-                transformVariableExpression(call, 0);
-            }
-            else if (arg instanceof BinaryExpression) {
-                // Matches: task <expression> <operator> <expression>
-                transformBinaryExpression(call, (BinaryExpression) arg);
-            }
-            else if (arg instanceof MethodCallExpression) {
-                // Matches: task <method-call>
-                maybeTransformNestedMethodCall((MethodCallExpression) arg, call);
-            }
-        }
-
-        private void transformVariableExpression(MethodCallExpression call, int index) {
-            ArgumentListExpression args = (ArgumentListExpression) call.getArguments();
-            VariableExpression arg = (VariableExpression) args.getExpression(index);
-            if (!isDynamicVar(arg)) {
-                return;
-            }
-            
-            // Matches: task args?, <identifier>, args? or task(args?, <identifier>, args?)
-            // Map to: task(args?, '<identifier>', args?)
-            String taskName = arg.getText();
-            call.setMethod(new ConstantExpression("task"));
-            args.getExpressions().set(index, new ConstantExpression(taskName));
-        }
-
-        private void transformBinaryExpression(MethodCallExpression call, BinaryExpression expression) {
-
-            // Matches: task <expression> <operator> <expression>
-
-            if (expression.getLeftExpression() instanceof VariableExpression
-                    || expression.getLeftExpression() instanceof GStringExpression
-                    || expression.getLeftExpression() instanceof ConstantExpression) {
-                // Matches: task <identifier> <operator> <expression> | task <string> <operator> <expression>
-                // Map to: passThrough(task('<identifier>') <operator> <expression>) | passThrough(task(<string>) <operator> <expression>)
-                call.setMethod(new ConstantExpression("passThrough"));
-                Expression argument;
-                if (expression.getLeftExpression() instanceof VariableExpression) {
-                    argument = new ConstantExpression(expression.getLeftExpression().getText());
-                } else {
-                    argument = expression.getLeftExpression();
-                }
-                expression.setLeftExpression(new MethodCallExpression(call.getObjectExpression(), "task", argument));
-            }
-            else if (expression.getLeftExpression() instanceof MethodCallExpression) {
-                // Matches: task <method-call> <operator> <expression>
-                MethodCallExpression transformedCall = new MethodCallExpression(call.getObjectExpression(),
-                        "task", new ArgumentListExpression());
-                boolean transformed = maybeTransformNestedMethodCall(
-                        (MethodCallExpression) expression.getLeftExpression(), transformedCall);
-                if (transformed) {
-                    // Matches: task <identifier> <arg-list> <operator> <expression>
-                    // Map to: passThrough(task('<identifier>', <arg-list>) <operator> <expression>)
-                    call.setMethod(new ConstantExpression("passThrough"));
-                    expression.setLeftExpression(transformedCall);
-                }
-            }
-        }
-
-        private boolean maybeTransformNestedMethodCall(MethodCallExpression nestedMethod, MethodCallExpression target) {
-            if (!(isTaskIdentifier(nestedMethod.getMethod()) && targetIsThis(nestedMethod))) {
-                return false;
-            }
-
-            // Matches: task <identifier> <arg-list> | task <string> <arg-list>
-            // Map to: task("<identifier>", <arg-list>) | task(<string>, <arg-list>)
-
-            Expression taskName = nestedMethod.getMethod();
-            Expression mapArg = null;
-            List<Expression> extraArgs = Collections.emptyList();
-
-            if (nestedMethod.getArguments() instanceof TupleExpression) {
-                TupleExpression nestedArgs = (TupleExpression) nestedMethod.getArguments();
-                if (nestedArgs.getExpressions().size() == 2
-                        && nestedArgs.getExpression(0) instanceof MapExpression
-                        && nestedArgs.getExpression(1) instanceof ClosureExpression) {
-                    // Matches: task <identifier>(<options-map>) <closure>
-                    mapArg = nestedArgs.getExpression(0);
-                    extraArgs = nestedArgs.getExpressions().subList(1, nestedArgs.getExpressions().size());
-                } else if (nestedArgs.getExpressions().size() == 1 && nestedArgs.getExpression(0) instanceof ClosureExpression) {
-                    // Matches: task <identifier> <closure>
-                    extraArgs = nestedArgs.getExpressions();
-                } else if (nestedArgs.getExpressions().size() == 1 && nestedArgs.getExpression(0) instanceof NamedArgumentListExpression) {
-                    // Matches: task <identifier>(<options-map>)
-                    mapArg = nestedArgs.getExpression(0);
-                }
-                else if (nestedArgs.getExpressions().size() != 0) {
-                    return false;
-                }
-            }
-
-            target.setMethod(new ConstantExpression("task"));
-            ArgumentListExpression args = (ArgumentListExpression) target.getArguments();
-            args.getExpressions().clear();
-            if (mapArg != null) {
-                args.addExpression(mapArg);
-            }
-            args.addExpression(taskName);
-            for (Expression extraArg : extraArgs) {
-                args.addExpression(extraArg);
-            }
-            return true;
-        }
-
-        private boolean isInstanceMethod(MethodCallExpression call, String name) {
-            boolean isTaskMethod = isMethodOnThis(call, name);
-            if (!isTaskMethod) {
-                return false;
-            }
-
-            return call.getArguments() instanceof ArgumentListExpression;
-        }
-
-        private boolean isTaskIdentifier(Expression expression) {
-            return expression instanceof ConstantExpression || expression instanceof GStringExpression;
-        }
-
-        private boolean isDynamicVar(Expression expression) {
-            if (!(expression instanceof VariableExpression)) {
-                return false;
-            }
-            VariableExpression variableExpression = (VariableExpression) expression;
-            return variableExpression.getAccessedVariable() instanceof DynamicVariable;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactory.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactory.java
deleted file mode 100644
index 2111a1a..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactory.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts.dsl.dependencies;
-
-import groovy.lang.Closure;
-import org.gradle.api.GradleException;
-import org.gradle.api.IllegalDependencyNotation;
-import org.gradle.api.InvalidUserDataException;
-import org.gradle.api.artifacts.ClientModule;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.ProjectDependency;
-
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultDependencyFactory implements DependencyFactory {
-    private Set<IDependencyImplementationFactory> dependencyFactories;
-    private IDependencyImplementationFactory clientModuleFactory;
-    private ProjectDependencyFactory projectDependencyFactory;
-
-    public DefaultDependencyFactory(Set<IDependencyImplementationFactory> dependencyFactories,
-                                    IDependencyImplementationFactory clientModuleFactory,
-                                    ProjectDependencyFactory projectDependencyFactory) {
-        this.dependencyFactories = dependencyFactories;
-        this.clientModuleFactory = clientModuleFactory;
-        this.projectDependencyFactory = projectDependencyFactory;
-    }
-
-    public Dependency createDependency(Object dependencyNotation) {
-        if (dependencyNotation instanceof Dependency) {
-            return (Dependency) dependencyNotation;
-        }
-        
-        Dependency dependency = null;
-        for (IDependencyImplementationFactory factory : dependencyFactories) {
-            try {
-                dependency = factory.createDependency(Dependency.class, dependencyNotation);
-                break;
-            }
-            catch (IllegalDependencyNotation e) {
-                // ignore
-            }
-            catch (Exception e) {
-                throw new GradleException(String.format("Could not create a dependency using notation: %s", dependencyNotation), e);
-            }
-        }
-
-        if (dependency == null) {
-            throw new InvalidUserDataException(String.format("The dependency notation: %s is invalid.",
-                    dependencyNotation));
-        }
-        return dependency;
-    }
-
-    public ClientModule createModule(Object dependencyNotation, Closure configureClosure) {
-        ClientModule clientModule = clientModuleFactory.createDependency(ClientModule.class, dependencyNotation);
-        ModuleFactoryDelegate moduleFactoryDelegate = new ModuleFactoryDelegate(clientModule, this);
-        moduleFactoryDelegate.prepareDelegation(configureClosure);
-        if (configureClosure != null) {
-            configureClosure.call();
-        }
-        return clientModule;
-    }
-
-    public ProjectDependency createProjectDependencyFromMap(ProjectFinder projectFinder, Map<? extends String, ? extends Object> map) {
-        return projectDependencyFactory.createProjectDependencyFromMap(projectFinder, map);
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPom.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPom.java
deleted file mode 100644
index 40b6e3e..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPom.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.publish.maven;
-
-import groovy.lang.Closure;
-import org.apache.commons.io.IOUtils;
-import org.apache.maven.model.Dependency;
-import org.apache.maven.model.Model;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.groovy.runtime.InvokerHelper;
-import org.gradle.api.Action;
-import org.gradle.api.UncheckedIOException;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer;
-import org.gradle.api.artifacts.maven.MavenPom;
-import org.gradle.api.artifacts.maven.XmlProvider;
-import org.gradle.api.internal.XmlTransformer;
-import org.gradle.api.internal.artifacts.publish.maven.dependencies.PomDependenciesConverter;
-import org.gradle.api.internal.artifacts.publish.maven.pombuilder.CustomModelBuilder;
-import org.gradle.api.internal.file.FileResolver;
-import org.gradle.listener.ActionBroadcast;
-
-import java.io.*;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultMavenPom implements MavenPom {
-    private PomDependenciesConverter pomDependenciesConverter;
-    private FileResolver fileResolver;
-    private MavenProject mavenProject = new MavenProject();
-    private Conf2ScopeMappingContainer scopeMappings;
-    private ActionBroadcast<MavenPom> whenConfiguredActions = new ActionBroadcast<MavenPom>();
-    private XmlTransformer withXmlActions = new XmlTransformer();
-    private ConfigurationContainer configurations;
-
-    public DefaultMavenPom(ConfigurationContainer configurationContainer, Conf2ScopeMappingContainer scopeMappings, PomDependenciesConverter pomDependenciesConverter,
-                           FileResolver fileResolver) {
-        this.configurations = configurationContainer;
-        this.scopeMappings = scopeMappings;
-        this.pomDependenciesConverter = pomDependenciesConverter;
-        this.fileResolver = fileResolver;
-        mavenProject.setModelVersion("4.0.0");
-    }
-
-    public Conf2ScopeMappingContainer getScopeMappings() {
-        return scopeMappings;
-    }
-
-    public ConfigurationContainer getConfigurations() {
-        return configurations;
-    }
-
-    public DefaultMavenPom setConfigurations(ConfigurationContainer configurations) {
-        this.configurations = configurations;
-        return this;
-    }
-    
-    public DefaultMavenPom setGroupId(String groupId) {
-        getModel().setGroupId(groupId);
-        return this;
-    }
-
-    public String getGroupId() {
-        return getModel().getGroupId();
-    }
-
-    public DefaultMavenPom setArtifactId(String artifactId) {
-        getModel().setArtifactId(artifactId);
-        return this;
-    }
-
-    public String getArtifactId() {
-        return getModel().getArtifactId();
-    }
-
-    public DefaultMavenPom setDependencies(List<Dependency> dependencies) {
-        getModel().setDependencies(dependencies);
-        return this;
-    }
-
-    public List<Dependency> getDependencies() {
-        return getModel().getDependencies();
-    }
-
-    public DefaultMavenPom setName(String name) {
-        getModel().setName(name);
-        return this;
-    }
-
-    public String getName() {
-        return getModel().getName();
-    }
-
-    public DefaultMavenPom setVersion(String version) {
-        getModel().setVersion(version);
-        return this;
-    }
-
-    public String getVersion() {
-        return getModel().getVersion();
-    }
-
-    public String getPackaging() {
-        return getModel().getPackaging();
-    }
-
-    public DefaultMavenPom setPackaging(String packaging) {
-        getModel().setPackaging(packaging);
-        return this;
-    }
-
-    public DefaultMavenPom project(Closure cl) {
-        CustomModelBuilder pomBuilder = new CustomModelBuilder(getModel());
-        InvokerHelper.invokeMethod(pomBuilder, "project", cl);
-        return this;
-    }
-
-    public Model getModel() {
-        return mavenProject.getModel();
-    }
-
-    public DefaultMavenPom setModel(Model model) {
-        this.mavenProject = new MavenProject(model);
-        return this;
-    }
-
-    public MavenProject getMavenProject() {
-        return mavenProject;
-    }
-
-    public DefaultMavenPom setMavenProject(MavenProject mavenProject) {
-        this.mavenProject = mavenProject;
-        return this;
-    }
-
-    public List<Dependency> getGeneratedDependencies() {
-        if (configurations == null) {
-            return Collections.emptyList();
-        }
-        return pomDependenciesConverter.convert(getScopeMappings(), configurations.getAll());
-    }
-
-    public DefaultMavenPom getEffectivePom() {
-        DefaultMavenPom effectivePom = new DefaultMavenPom(null, this.scopeMappings, pomDependenciesConverter, fileResolver);
-        try {
-            effectivePom.setMavenProject((MavenProject) mavenProject.clone());
-        } catch (CloneNotSupportedException e) {
-            throw new RuntimeException(e);
-        }
-        effectivePom.getDependencies().addAll(getGeneratedDependencies());
-        effectivePom.withXmlActions = withXmlActions;
-        whenConfiguredActions.execute(effectivePom);
-        return effectivePom;
-    }
-
-    public PomDependenciesConverter getPomDependenciesConverter() {
-        return pomDependenciesConverter;
-    }
-
-    public FileResolver getFileResolver() {
-        return fileResolver;
-    }
-
-    public DefaultMavenPom setFileResolver(FileResolver fileResolver) {
-        this.fileResolver = fileResolver;
-        return this;
-    }
-
-    public DefaultMavenPom writeTo(final Writer pomWriter) {
-        getEffectivePom().writeNonEffectivePom(pomWriter);
-        return this;
-    }
-
-    public DefaultMavenPom writeTo(Object path) {
-        try {
-            File file = fileResolver.resolve(path);
-            if (file.getParentFile() != null) {
-                file.getParentFile().mkdirs();
-            }
-            FileWriter writer = new FileWriter(file);
-            try {
-                return writeTo(writer);
-            } finally {
-                writer.close();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    private void writeNonEffectivePom(final Writer pomWriter) {
-        try {
-            final StringWriter stringWriter = new StringWriter();
-            mavenProject.writeModel(stringWriter);
-            withXmlActions.transform(stringWriter.toString(), pomWriter);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        } finally {
-            IOUtils.closeQuietly(pomWriter);
-        }
-    }
-
-    public DefaultMavenPom whenConfigured(final Closure closure) {
-        whenConfiguredActions.add(closure);
-        return this;
-    }
-
-    public DefaultMavenPom whenConfigured(final Action<MavenPom> action) {
-        whenConfiguredActions.add(action);
-        return this;
-    }
-
-    public DefaultMavenPom withXml(final Closure closure) {
-        withXmlActions.addAction(closure);
-        return this;
-    }
-
-    public DefaultMavenPom withXml(final Action<XmlProvider> action) {
-        withXmlActions.addAction(action);
-        return this;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPom.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPom.java
deleted file mode 100644
index 4bdd9ca..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPom.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.publish.maven.deploy;
-
-import com.google.common.collect.Sets;
-import org.apache.commons.lang.ObjectUtils;
-import org.apache.ivy.core.module.descriptor.Artifact;
-import org.apache.maven.project.MavenProject;
-import org.gradle.api.InvalidUserDataException;
-import org.gradle.api.UncheckedIOException;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.PublishArtifact;
-import org.gradle.api.artifacts.maven.MavenPom;
-import org.gradle.api.internal.artifacts.publish.AbstractPublishArtifact;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.util.*;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultArtifactPom implements ArtifactPom {
-    private static final Set<String> PACKAGING_TYPES = Sets.newHashSet("war", "jar", "ear");
-    private final MavenPom pom;
-    private final Map<ArtifactKey, PublishArtifact> artifacts = new HashMap<ArtifactKey, PublishArtifact>();
-
-    private PublishArtifact artifact;
-
-    private final Set<PublishArtifact> classifiers = new HashSet<PublishArtifact>();
-
-    public DefaultArtifactPom(MavenPom pom) {
-        this.pom = pom;
-    }
-
-    public MavenPom getPom() {
-        return pom;
-    }
-
-    public PublishArtifact getArtifact() {
-        return artifact;
-    }
-
-    public Set<PublishArtifact> getAttachedArtifacts() {
-        return Collections.unmodifiableSet(classifiers);
-    }
-
-    public PublishArtifact writePom(final File pomFile) {
-        try {
-            pomFile.getParentFile().mkdirs();
-            FileWriter writer = new FileWriter(pomFile);
-            try {
-                getPom().writeTo(writer);
-            } finally {
-                writer.close();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-
-        return new PomArtifact(pomFile);
-    }
-
-    public void addArtifact(Artifact artifact, File src) {
-        throwExceptionIfArtifactOrSrcIsNull(artifact, src);
-        PublishArtifact publishArtifact = new MavenArtifact(artifact, src);
-        ArtifactKey artifactKey = new ArtifactKey(publishArtifact);
-        if (this.artifacts.containsKey(artifactKey)) {
-            throw new InvalidUserDataException(String.format("A POM cannot have multiple artifacts with the same type and classifier. Already have %s, trying to add %s.",
-                    this.artifacts.get(artifactKey), publishArtifact));
-        }
-
-        if (publishArtifact.getClassifier() != null) {
-            addArtifact(publishArtifact);
-            assignArtifactValuesToPom(artifact, pom, false);
-            return;
-        }
-
-        if (this.artifact != null) {
-            // Choose the 'main' artifact based on its type.
-            if (!PACKAGING_TYPES.contains(artifact.getType())) {
-                addArtifact(publishArtifact);
-                return;
-            }
-            if (PACKAGING_TYPES.contains(this.artifact.getType())) {
-                throw new InvalidUserDataException("A POM can not have multiple main artifacts. " +
-                        "Already have " + this.artifact + ", trying to add " + publishArtifact);
-            }
-            addArtifact(this.artifact);
-        }
-
-        this.artifact = publishArtifact;
-        this.artifacts.put(artifactKey, publishArtifact);
-        assignArtifactValuesToPom(artifact, pom, true);
-    }
-
-    private void addArtifact(PublishArtifact artifact) {
-        classifiers.add(artifact);
-        artifacts.put(new ArtifactKey(artifact), artifact);
-    }
-
-    private String getClassifier(Artifact artifact) {
-        return artifact.getExtraAttribute(Dependency.CLASSIFIER);
-    }
-
-    private void assignArtifactValuesToPom(Artifact artifact, MavenPom pom, boolean setType) {
-        if (pom.getGroupId().equals(MavenProject.EMPTY_PROJECT_GROUP_ID)) {
-            pom.setGroupId(artifact.getModuleRevisionId().getOrganisation());
-        }
-        if (pom.getArtifactId().equals(MavenProject.EMPTY_PROJECT_ARTIFACT_ID)) {
-            pom.setArtifactId(artifact.getName());
-        }
-        if (pom.getVersion().equals(MavenProject.EMPTY_PROJECT_VERSION)) {
-            pom.setVersion(artifact.getModuleRevisionId().getRevision());
-        }
-        if (setType) {
-            pom.setPackaging(artifact.getType());
-        }
-    }
-
-    private void throwExceptionIfArtifactOrSrcIsNull(Artifact artifact, File src) {
-        if (artifact == null) {
-            throw new InvalidUserDataException("Artifact must not be null.");
-        }
-        if (src == null) {
-            throw new InvalidUserDataException("Src file must not be null.");
-        }
-    }
-
-    private static class ArtifactKey {
-        private final String type;
-        private final String classifier;
-
-        private ArtifactKey(PublishArtifact artifact) {
-            this.type = artifact.getType();
-            this.classifier = artifact.getClassifier();
-        }
-
-        @Override
-        public boolean equals(Object o) {
-            ArtifactKey other = (ArtifactKey) o;
-            return ObjectUtils.equals(type, other.type) && ObjectUtils.equals(classifier, other.classifier);
-        }
-
-        @Override
-        public int hashCode() {
-            return ObjectUtils.hashCode(type) ^ ObjectUtils.hashCode(classifier);
-        }
-    }
-
-    private abstract class AbstractMavenArtifact extends AbstractPublishArtifact {
-        private final File file;
-
-        protected AbstractMavenArtifact(File file) {
-            this.file = file;
-        }
-
-        public File getFile() {
-            return file;
-        }
-
-        public String getName() {
-            return pom.getArtifactId();
-        }
-
-        public Date getDate() {
-            return null;
-        }
-    }
-
-    private class MavenArtifact extends AbstractMavenArtifact {
-        private final Artifact artifact;
-
-        private MavenArtifact(Artifact artifact, File file) {
-            super(file);
-            this.artifact = artifact;
-        }
-
-        public String getClassifier() {
-            return DefaultArtifactPom.this.getClassifier(artifact);
-        }
-
-        public String getExtension() {
-            return artifact.getExt();
-        }
-
-        public String getType() {
-            return artifact.getType();
-        }
-    }
-
-    private class PomArtifact extends AbstractMavenArtifact {
-        public PomArtifact(File pomFile) {
-            super(pomFile);
-        }
-
-        public String getExtension() {
-            return "pom";
-        }
-
-        public String getType() {
-            return "pom";
-        }
-
-        public String getClassifier() {
-            return null;
-        }
-
-        public Date getDate() {
-            return null;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileCollection.java
deleted file mode 100644
index 931bbea..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/AbstractFileCollection.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file;
-
-import groovy.lang.Closure;
-import org.apache.commons.lang.StringUtils;
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.file.FileTree;
-import org.gradle.api.internal.tasks.DefaultTaskDependency;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.specs.Specs;
-import org.gradle.api.tasks.StopExecutionException;
-import org.gradle.api.tasks.TaskDependency;
-import org.gradle.util.GUtil;
-
-import java.io.File;
-import java.util.*;
-
-public abstract class AbstractFileCollection implements FileCollection {
-    /**
-     * Returns the display name of this file collection. Used in log and error messages.
-     *
-     * @return the display name
-     */
-    public abstract String getDisplayName();
-
-    @Override
-    public String toString() {
-        return getDisplayName();
-    }
-
-    public File getSingleFile() throws IllegalStateException {
-        Collection<File> files = getFiles();
-        if (files.isEmpty()) {
-            throw new IllegalStateException(String.format(
-                    "Expected %s to contain exactly one file, however, it contains no files.", getDisplayName()));
-        }
-        if (files.size() != 1) {
-            throw new IllegalStateException(String.format(
-                    "Expected %s to contain exactly one file, however, it contains %d files.", getDisplayName(),
-                    files.size()));
-        }
-        return files.iterator().next();
-    }
-
-    public Iterator<File> iterator() {
-        return getFiles().iterator();
-    }
-
-    public String getAsPath() {
-        return GUtil.join(getFiles(), File.pathSeparator);
-    }
-
-    public boolean contains(File file) {
-        return getFiles().contains(file);
-    }
-
-    public FileCollection plus(FileCollection collection) {
-        return new UnionFileCollection(this, collection);
-    }
-
-    public FileCollection minus(final FileCollection collection) {
-        return new AbstractFileCollection() {
-            @Override
-            public String getDisplayName() {
-                return AbstractFileCollection.this.getDisplayName();
-            }
-
-            @Override
-            public TaskDependency getBuildDependencies() {
-                return AbstractFileCollection.this.getBuildDependencies();
-            }
-
-            public Set<File> getFiles() {
-                Set<File> files = new LinkedHashSet<File>(AbstractFileCollection.this.getFiles());
-                files.removeAll(collection.getFiles());
-                return files;
-            }
-        };
-    }
-
-    public FileCollection add(FileCollection collection) throws UnsupportedOperationException {
-        throw new UnsupportedOperationException(String.format("%s does not allow modification.", getCapDisplayName()));
-    }
-
-    public void addToAntBuilder(Object builder, String nodeName, AntType type) {
-        if (type == AntType.ResourceCollection) {
-            addAsResourceCollection(builder, nodeName);
-        }
-        else if (type == AntType.FileSet) {
-            addAsFileSet(builder, nodeName);
-        }
-        else {
-            addAsMatchingTask(builder, nodeName);
-        }
-    }
-
-    protected void addAsMatchingTask(Object builder, String nodeName) {
-        new AntFileCollectionMatchingTaskBuilder(getAsFileTrees()).addToAntBuilder(builder, nodeName);
-    }
-
-    protected void addAsFileSet(Object builder, String nodeName) {
-        for (DefaultConfigurableFileTree fileTree : getAsFileTrees()) {
-            fileTree.addToAntBuilder(builder, nodeName, AntType.FileSet);
-        }
-    }
-
-    protected void addAsResourceCollection(Object builder, String nodeName) {
-        new AntFileCollectionBuilder(this).addToAntBuilder(builder, nodeName);
-    }
-
-    /**
-     * Returns this collection as a set of {@link DefaultConfigurableFileTree} instances.
-     */
-    protected Collection<DefaultConfigurableFileTree> getAsFileTrees() {
-        List<DefaultConfigurableFileTree> fileTrees = new ArrayList<DefaultConfigurableFileTree>();
-        for (File file : getFiles()) {
-            if (file.isFile()) {
-                DefaultConfigurableFileTree fileTree = new DefaultConfigurableFileTree(file.getParentFile(), null, null);
-                fileTree.include(new String[]{file.getName()});
-                fileTrees.add(fileTree);
-            }
-        }
-        return fileTrees;
-    }
-
-    public Object addToAntBuilder(Object node, String childNodeName) {
-        addToAntBuilder(node, childNodeName, AntType.ResourceCollection);
-        return this;
-    }
-
-    public boolean isEmpty() {
-        return getFiles().isEmpty();
-    }
-
-    public FileCollection stopExecutionIfEmpty() {
-        if (isEmpty()) {
-            throw new StopExecutionException(String.format("%s does not contain any files.", getCapDisplayName()));
-        }
-        return this;
-    }
-
-    public Object asType(Class<?> type) throws UnsupportedOperationException {
-        if (type.isAssignableFrom(Set.class)) {
-            return getFiles();
-        }
-        if (type.isAssignableFrom(List.class)) {
-            return new ArrayList<File>(getFiles());
-        }
-        if (type.isAssignableFrom(File[].class)) {
-            Set<File> files = getFiles();
-            return files.toArray(new File[files.size()]);
-        }
-        if (type.isAssignableFrom(File.class)) {
-            return getSingleFile();
-        }
-        if (type.isAssignableFrom(FileCollection.class)) {
-            return this;
-        }
-        if (type.isAssignableFrom(FileTree.class)) {
-            return getAsFileTree();
-        }
-        throw new UnsupportedOperationException(String.format(
-                "Cannot convert %s to type %s, as this type is not supported.", getDisplayName(),
-                type.getSimpleName()));
-    }
-
-    public TaskDependency getBuildDependencies() {
-        return new DefaultTaskDependency();
-    }
-
-    public FileTree getAsFileTree() {
-        return new CompositeFileTree() {
-            @Override
-            public TaskDependency getBuildDependencies() {
-                return AbstractFileCollection.this.getBuildDependencies();
-            }
-
-            @Override
-            protected void addSourceCollections(Collection<FileCollection> sources) {
-                TaskDependency taskDependency = AbstractFileCollection.this.getBuildDependencies();
-                for (File file : AbstractFileCollection.this.getFiles()) {
-                    sources.add(new SingletonFileTree(file, taskDependency));
-                }
-            }
-
-            @Override
-            public String getDisplayName() {
-                return AbstractFileCollection.this.getDisplayName();
-            }
-        };
-    }
-
-    public FileCollection filter(Closure filterClosure) {
-        return filter(Specs.convertClosureToSpec(filterClosure));
-    }
-
-    public FileCollection filter(final Spec<? super File> filterSpec) {
-        return new AbstractFileCollection() {
-            @Override
-            public String getDisplayName() {
-                return AbstractFileCollection.this.getDisplayName();
-            }
-
-            @Override
-            public TaskDependency getBuildDependencies() {
-                return AbstractFileCollection.this.getBuildDependencies();
-            }
-
-            public Set<File> getFiles() {
-                return Specs.filterIterable(AbstractFileCollection.this, filterSpec);
-            }
-        };
-    }
-
-    protected String getCapDisplayName() {
-        return StringUtils.capitalize(getDisplayName());
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SingletonFileTree.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SingletonFileTree.java
deleted file mode 100644
index 0a9a5ad..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/SingletonFileTree.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file;
-
-import org.gradle.api.file.*;
-import org.gradle.api.tasks.TaskDependency;
-
-import java.io.File;
-import java.util.Collection;
-
-class SingletonFileTree extends CompositeFileTree {
-    private final File file;
-    private final TaskDependency builtBy;
-
-    public SingletonFileTree(File file, TaskDependency builtBy) {
-        this.file = file;
-        this.builtBy = builtBy;
-    }
-
-    @Override
-    public String getDisplayName() {
-        return String.format("file '%s'", file);
-    }
-
-    @Override
-    public TaskDependency getBuildDependencies() {
-        return builtBy;
-    }
-
-    protected void addSourceCollections(Collection<FileCollection> sources) {
-        if (file.isDirectory()) {
-            sources.add(new DefaultConfigurableFileTree(file, null, null));
-        }
-        else if (file.isFile()) {
-            sources.add(new FileFileTree());
-        }
-    }
-
-    private class FileVisitDetailsImpl extends DefaultFileTreeElement implements FileVisitDetails {
-        private FileVisitDetailsImpl() {
-            super(file, new RelativePath(true, file.getName()));
-        }
-
-        public void stopVisiting() {
-        }
-    }
-
-    private class FileFileTree extends AbstractFileTree {
-        public String getDisplayName() {
-            return SingletonFileTree.this.getDisplayName();
-        }
-
-        public FileTree visit(FileVisitor visitor) {
-            visitor.visitFile(new FileVisitDetailsImpl());
-            return this;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/LineFilter.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/LineFilter.java
deleted file mode 100644
index 0f67959..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/LineFilter.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file.copy;
-
-import groovy.lang.Closure;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.Reader;
-
-public class LineFilter extends Reader {
-    private final Closure closure;
-    private String transformedLine;
-    private int transformedIndex;
-    private final BufferedReader bufferedIn;
-    private final String lineTerminator;
-    private final Reader in;
-
-    /**
-     * Creates a new filtered reader.
-     *
-     * @param closure a Closure to filter each line
-     * @throws NullPointerException if <code>in</code> is <code>null</code>
-     */
-    public LineFilter(Reader in, Closure closure) {
-        this.in = in;
-        this.bufferedIn = new BufferedReader(in);
-        this.closure = closure;
-        lineTerminator = System.getProperty("line.separator");
-    }
-
-    private String getTransformedLine() throws IOException {
-        StringBuilder line = new StringBuilder();
-        boolean eol = false;
-        int ch;
-        while (!eol && (ch = bufferedIn.read()) >= 0) {
-            if (ch == '\n') {
-                eol = true;
-            }
-            else if (ch == '\r') {
-                eol = true;
-                bufferedIn.mark(1);
-                if (bufferedIn.read() != '\n') {
-                    bufferedIn.reset();
-                }
-            }
-            else {
-                line.append((char) ch);
-            }
-        }
-        if (line.length() == 0 && !eol) {
-            return null;
-        }
-
-        StringBuilder result = new StringBuilder();
-        result.append(closure.call(line.toString()).toString());
-        if (eol) {
-            result.append(lineTerminator);
-        }
-        return result.toString();
-    }
-
-    private void ensureData() throws IOException {
-        if (transformedLine == null || transformedIndex >= transformedLine.length()) {
-            transformedLine = getTransformedLine();
-            transformedIndex = 0;
-        }
-    }
-
-    @Override
-    public int read() throws IOException {
-        ensureData();
-        if (transformedLine == null) {
-            return -1;
-        }
-        return transformedLine.charAt(transformedIndex++);
-    }
-
-    @Override
-    public int read(char[] cbuf, int off, int len) throws IOException {
-        for (int i = 0; i < len; i++) {
-            final int c = read();
-            if (c == -1) {
-                if (i == 0) {
-                    return -1;
-                }
-                else {
-                    return i;
-                }
-            }
-            cbuf[off + i] = (char) c;
-        }
-        return len;
-    }
-
-    public void close() throws IOException {
-        in.close();
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitor.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitor.java
deleted file mode 100644
index 07268ec..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/copy/MappingCopySpecVisitor.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file.copy;
-
-import groovy.lang.Closure;
-import org.gradle.api.Action;
-import org.gradle.api.file.*;
-import org.gradle.api.internal.file.AbstractFileTreeElement;
-
-import java.io.*;
-import java.util.Map;
-
-public class MappingCopySpecVisitor extends DelegatingCopySpecVisitor {
-    private ReadableCopySpec spec;
-
-    public MappingCopySpecVisitor(CopySpecVisitor visitor) {
-        super(visitor);
-    }
-
-    public void visitSpec(ReadableCopySpec spec) {
-        this.spec = spec;
-        getVisitor().visitSpec(spec);
-    }
-
-    public void visitDir(FileVisitDetails dirDetails) {
-        getVisitor().visitDir(new FileVisitDetailsImpl(dirDetails, spec));
-    }
-
-    public void visitFile(final FileVisitDetails fileDetails) {
-        FileVisitDetailsImpl details = new FileVisitDetailsImpl(fileDetails, spec);
-        for (Action<? super FileCopyDetails> action : spec.getAllCopyActions()) {
-            action.execute(details);
-            if (details.excluded) {
-                return;
-            }
-        }
-        getVisitor().visitFile(details);
-    }
-
-    private static class FileVisitDetailsImpl extends AbstractFileTreeElement implements FileVisitDetails, FileCopyDetails {
-        private final FileVisitDetails fileDetails;
-        private final ReadableCopySpec spec;
-        private final FilterChain filterChain = new FilterChain();
-        private RelativePath relativePath;
-        private boolean excluded;
-
-        public FileVisitDetailsImpl(FileVisitDetails fileDetails, ReadableCopySpec spec) {
-            this.fileDetails = fileDetails;
-            this.spec = spec;
-        }
-
-        public String getDisplayName() {
-            return fileDetails.toString();
-        }
-
-        public void stopVisiting() {
-            fileDetails.stopVisiting();
-        }
-
-        public File getFile() {
-            if (filterChain.hasFilters()) {
-                throw new UnsupportedOperationException();
-            } else {
-                return fileDetails.getFile();
-            }
-        }
-
-        public boolean isDirectory() {
-            return fileDetails.isDirectory();
-        }
-
-        public long getLastModified() {
-            return fileDetails.getLastModified();
-        }
-
-        public long getSize() {
-            if (filterChain.hasFilters()) {
-                ByteCountingOutputStream outputStream = new ByteCountingOutputStream();
-                copyTo(outputStream);
-                return outputStream.size;
-            } else {
-                return fileDetails.getSize();
-            }
-        }
-
-        public InputStream open() {
-            if (filterChain.hasFilters()) {
-                return filterChain.transform(fileDetails.open());
-            } else {
-                return fileDetails.open();
-            }
-        }
-
-        public void copyTo(OutputStream outstr) {
-            if (filterChain.hasFilters()) {
-                super.copyTo(outstr);
-            } else {
-                fileDetails.copyTo(outstr);
-            }
-        }
-
-        public boolean copyTo(File target) {
-            if (filterChain.hasFilters()) {
-                return super.copyTo(target);
-            }
-            else {
-                return fileDetails.copyTo(target);
-            }
-        }
-
-        public RelativePath getRelativePath() {
-            if (relativePath == null) {
-                RelativePath path = fileDetails.getRelativePath();
-                relativePath = spec.getDestPath().append(path.isFile(), path.getSegments());
-            }
-            return relativePath;
-        }
-
-        public void setRelativePath(RelativePath path) {
-            this.relativePath = path;
-        }
-
-        public void setName(String name) {
-            relativePath = getRelativePath().replaceLastName(name);
-        }
-
-        public void setPath(String path) {
-            relativePath = RelativePath.parse(getRelativePath().isFile(), path);
-        }
-
-        public void exclude() {
-            excluded = true;
-        }
-
-        public ContentFilterable filter(Closure closure) {
-            filterChain.add(closure);
-            return this;
-        }
-
-        public ContentFilterable filter(Map<String, ?> properties, Class<? extends FilterReader> filterType) {
-            filterChain.add(filterType, properties);
-            return this;
-        }
-
-        public ContentFilterable filter(Class<? extends FilterReader> filterType) {
-            filterChain.add(filterType);
-            return this;
-        }
-
-        public ContentFilterable expand(Map<String, ?> properties) {
-            filterChain.expand(properties);
-            return this;
-        }
-    }
-
-    private static class ByteCountingOutputStream extends OutputStream {
-        long size;
-
-        @Override
-        public void write(int b) throws IOException {
-            size++;
-        }
-
-        @Override
-        public void write(byte[] b) throws IOException {
-            size += b.length;
-        }
-
-        @Override
-        public void write(byte[] b, int off, int len) throws IOException {
-            size += len;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactory.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactory.java
deleted file mode 100644
index aa66c7c..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/file/pattern/PatternMatcherFactory.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file.pattern;
-
-import org.gradle.api.file.RelativePath;
-import org.gradle.api.specs.Spec;
-
-/**
- * @author Steve Appling
- */
-public class PatternMatcherFactory {
-    public static Spec<RelativePath> getPatternMatcher(boolean partialMatchDirs, boolean caseSensitive, String pattern) {
-        // trailing / or \ assumes **
-        if (  pattern.endsWith("/") ||
-              pattern.endsWith("\\") ) {
-            pattern = pattern + "**";
-        }
-
-        if (pattern.length() == 0) {
-            return new DefaultPatternMatcher(partialMatchDirs, true);
-        } else {
-            String[] parts = pattern.split("\\\\|/");
-            if (parts.length == 2) {
-                if ("**".equals(parts[0])) {
-                    if ("**".equals(parts[1])) {
-                        // don't need second **
-                        return new DefaultPatternMatcher(partialMatchDirs, caseSensitive, "**");
-                    } else {
-                        // common name only case
-                        return new NameOnlyPatternMatcher(partialMatchDirs, caseSensitive, parts[1]);
-                    }
-                }
-            }
-            return new DefaultPatternMatcher(partialMatchDirs, caseSensitive, parts);
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginCollection.java
deleted file mode 100644
index ec061d4..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/plugins/DefaultPluginCollection.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.plugins;
-
-import groovy.lang.Closure;
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.internal.DefaultDomainObjectContainer;
-import org.gradle.api.plugins.PluginCollection;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.specs.Specs;
-
-public class DefaultPluginCollection<T extends Plugin> extends DefaultDomainObjectContainer<T>
-        implements PluginCollection<T> {
-    public DefaultPluginCollection(Class<T> type) {
-        super(type);
-    }
-
-    protected DefaultPluginCollection(Class<T> type, ObjectStore<T> store) {
-        super(type, store);
-    }
-
-    public PluginCollection<T> matching(Spec<? super T> spec) {
-        return new DefaultPluginCollection<T>(getType(), storeWithSpec(spec));
-    }
-
-    @Override
-    public PluginCollection<T> matching(Closure spec) {
-        return matching(Specs.convertClosureToSpec(spec));
-    }
-
-    public <S extends T> PluginCollection<S> withType(Class<S> type) {
-        return new DefaultPluginCollection<S>(type, storeWithType(type));
-    }
-
-    public Action<? super T> whenPluginAdded(Action<? super T> action) {
-        return whenObjectAdded(action);
-    }
-
-    public void whenPluginAdded(Closure closure) {
-        whenObjectAdded(closure);
-    }
-
-    public void allPlugins(Action<? super T> action) {
-        allObjects(action);
-    }
-
-    public void allPlugins(Closure closure) {
-        allObjects(closure);
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/AbstractProject.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/AbstractProject.java
deleted file mode 100644
index 4a1b311..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/AbstractProject.java
+++ /dev/null
@@ -1,962 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.project;
-
-import groovy.lang.Closure;
-import groovy.lang.MissingPropertyException;
-import groovy.lang.Script;
-import org.gradle.api.*;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.artifacts.Module;
-import org.gradle.api.artifacts.dsl.ArtifactHandler;
-import org.gradle.api.artifacts.dsl.DependencyHandler;
-import org.gradle.api.artifacts.dsl.RepositoryHandler;
-import org.gradle.api.file.ConfigurableFileCollection;
-import org.gradle.api.file.ConfigurableFileTree;
-import org.gradle.api.file.CopySpec;
-import org.gradle.api.file.FileTree;
-import org.gradle.api.initialization.dsl.ScriptHandler;
-import org.gradle.api.internal.*;
-import org.gradle.api.internal.artifacts.configurations.DependencyMetaDataProvider;
-import org.gradle.api.internal.file.FileOperations;
-import org.gradle.api.internal.file.FileResolver;
-import org.gradle.api.internal.initialization.ScriptClassLoaderProvider;
-import org.gradle.api.internal.plugins.DefaultObjectConfigurationAction;
-import org.gradle.api.internal.tasks.TaskContainerInternal;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.api.logging.LoggingManager;
-import org.gradle.api.plugins.Convention;
-import org.gradle.api.plugins.PluginContainer;
-import org.gradle.api.tasks.Directory;
-import org.gradle.api.tasks.WorkResult;
-import org.gradle.configuration.ProjectEvaluator;
-import org.gradle.configuration.ScriptPlugin;
-import org.gradle.configuration.ScriptPluginFactory;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.gradle.listener.ListenerBroadcast;
-import org.gradle.logging.LoggingManagerInternal;
-import org.gradle.logging.StandardOutputCapture;
-import org.gradle.process.ExecResult;
-import org.gradle.util.Configurable;
-import org.gradle.util.ConfigureUtil;
-import org.gradle.util.DeprecationLogger;
-import org.gradle.util.Path;
-
-import java.io.File;
-import java.net.URI;
-import java.util.*;
-
-import static java.util.Collections.*;
-import static org.gradle.util.GUtil.*;
-
-/**
- * @author Hans Dockter
- */
-public abstract class AbstractProject implements ProjectInternal, DynamicObjectAware {
-    private static Logger buildLogger = Logging.getLogger(Project.class);
-    private ServiceRegistryFactory services;
-
-    private final ProjectInternal rootProject;
-
-    private final GradleInternal gradle;
-
-    private ProjectEvaluator projectEvaluator;
-
-    private ScriptSource buildScriptSource;
-
-    private final File projectDir;
-
-    private final ProjectInternal parent;
-
-    private final String name;
-
-    private Object group;
-
-    private Object version;
-
-    private Object status;
-
-    private final Map<String, Project> childProjects = new HashMap<String, Project>();
-
-    private List<String> defaultTasks = new ArrayList<String>();
-
-    private Set<Project> dependsOnProjects = new HashSet<Project>();
-
-    private ProjectStateInternal state;
-
-    private FileResolver fileResolver;
-    private FileOperations fileOperations;
-
-    private Factory<? extends AntBuilder> antBuilderFactory;
-
-    private AntBuilder ant;
-
-    private Object buildDir = Project.DEFAULT_BUILD_DIR_NAME;
-
-    private PluginContainer pluginContainer;
-
-    private final int depth;
-
-    private TaskContainerInternal taskContainer;
-
-    private TaskContainerInternal implicitTasksContainer;
-
-    private IProjectRegistry<ProjectInternal> projectRegistry;
-
-    private DependencyHandler dependencyHandler;
-
-    private ConfigurationContainer configurationContainer;
-
-    private ArtifactHandler artifactHandler;
-
-    private Factory<? extends RepositoryHandler> repositoryHandlerFactory;
-
-    private RepositoryHandler repositoryHandler;
-
-    private ScriptHandler scriptHandler;
-
-    private ScriptClassLoaderProvider scriptClassLoaderProvider;
-
-    private ListenerBroadcast<ProjectEvaluationListener> evaluationListener = new ListenerBroadcast<ProjectEvaluationListener>(ProjectEvaluationListener.class);
-
-    private LoggingManagerInternal loggingManager;
-
-    private DynamicObjectHelper dynamicObjectHelper;
-
-    private String description;
-
-    private final Path path;
-
-    public AbstractProject(String name,
-                           ProjectInternal parent,
-                           File projectDir,
-                           ScriptSource buildScriptSource,
-                           GradleInternal gradle,
-                           ServiceRegistryFactory serviceRegistryFactory) {
-        assert name != null;
-        this.rootProject = parent != null ? parent.getRootProject() : this;
-        this.projectDir = projectDir;
-        this.parent = parent;
-        this.name = name;
-        this.state = new ProjectStateInternal();
-        this.buildScriptSource = buildScriptSource;
-        this.gradle = gradle;
-
-        if (parent == null) {
-            path = Path.ROOT;
-            depth = 0;
-        } else {
-            String path = parent.absoluteProjectPath(name);
-            depth = parent.getDepth() + 1;
-            this.path = Path.path(path);
-        }
-
-        services = serviceRegistryFactory.createFor(this);
-        fileResolver = services.get(FileResolver.class);
-        antBuilderFactory = services.getFactory(AntBuilder.class);
-        taskContainer = services.newInstance(TaskContainerInternal.class);
-        implicitTasksContainer = services.newInstance(TaskContainerInternal.class);
-        fileOperations = services.get(FileOperations.class);
-        repositoryHandlerFactory = services.getFactory(RepositoryHandler.class);
-        projectEvaluator = services.get(ProjectEvaluator.class);
-        repositoryHandler = repositoryHandlerFactory.create();
-        configurationContainer = services.get(ConfigurationContainer.class);
-        pluginContainer = services.get(PluginContainer.class);
-        artifactHandler = services.get(ArtifactHandler.class);
-        dependencyHandler = services.get(DependencyHandler.class);
-        scriptHandler = services.get(ScriptHandler.class);
-        scriptClassLoaderProvider = services.get(ScriptClassLoaderProvider.class);
-        projectRegistry = services.get(IProjectRegistry.class);
-        loggingManager = services.get(LoggingManagerInternal.class);
-
-        dynamicObjectHelper = new DynamicObjectHelper(this);
-        dynamicObjectHelper.setConvention(services.get(Convention.class));
-        if (parent != null) {
-            dynamicObjectHelper.setParent(parent.getInheritedScope());
-        }
-        dynamicObjectHelper.addObject(taskContainer.getAsDynamicObject(), DynamicObjectHelper.Location.AfterConvention);
-
-        evaluationListener.add(gradle.getProjectEvaluationBroadcaster());
-    }
-
-    public RepositoryHandler createRepositoryHandler() {
-        return repositoryHandlerFactory.create();
-    }
-
-    public ProjectInternal getRootProject() {
-        return rootProject;
-    }
-
-    public GradleInternal getGradle() {
-        return gradle;
-    }
-
-    public PluginContainer getPlugins() {
-        return pluginContainer;
-    }
-
-    public ProjectEvaluator getProjectEvaluator() {
-        return projectEvaluator;
-    }
-
-    public void setProjectEvaluator(ProjectEvaluator projectEvaluator) {
-        this.projectEvaluator = projectEvaluator;
-    }
-
-    public ScriptHandler getBuildscript() {
-        return scriptHandler;
-    }
-
-    public void beforeCompile(ScriptPlugin configurer) {
-        if (configurer.getSource() != buildScriptSource) {
-            return;
-        }
-        configurer.setScriptBaseClass(ProjectScript.class);
-        configurer.setClassLoaderProvider(scriptClassLoaderProvider);
-    }
-
-    public void afterCompile(ScriptPlugin configurer, org.gradle.groovy.scripts.Script script) {
-        if (configurer.getSource() != buildScriptSource) {
-            return;
-        }
-        setScript(script);
-    }
-
-    public File getBuildFile() {
-        return getBuildscript().getSourceFile();
-    }
-
-    public void setScript(Script buildScript) {
-        dynamicObjectHelper.addObject(new BeanDynamicObject(buildScript).withNoProperties(),
-                DynamicObjectHelper.Location.BeforeConvention);
-    }
-
-    public ScriptSource getBuildScriptSource() {
-        return buildScriptSource;
-    }
-
-    public File getRootDir() {
-        return rootProject.getProjectDir();
-    }
-
-    public ProjectInternal getParent() {
-        return parent;
-    }
-
-    public ProjectIdentifier getParentIdentifier() {
-        return parent;
-    }
-
-    public DynamicObject getAsDynamicObject() {
-        return dynamicObjectHelper;
-    }
-
-    public DynamicObject getInheritedScope() {
-        return dynamicObjectHelper.getInheritable();
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public void setDescription(String description) {
-        this.description = description;
-    }
-
-    public Object getGroup() {
-        if (group != null) {
-            return group;
-        } else if (this == rootProject) {
-            return "";
-        }
-        return rootProject.getName() + ( getParent() == rootProject ? "" : "." + getParent().getPath().substring(1).replace(':', '.'));
-    }
-
-    public void setGroup(Object group) {
-        this.group = group;
-    }
-
-    public Object getVersion() {
-        return version == null ? DEFAULT_VERSION : version;
-    }
-
-    public void setVersion(Object version) {
-        this.version = version;
-    }
-
-    public Object getStatus() {
-        return status == null ? DEFAULT_STATUS : status;
-    }
-
-    public void setStatus(Object status) {
-        this.status = status;
-    }
-
-    public Map<String, Project> getChildProjects() {
-        return childProjects;
-    }
-
-    public List<String> getDefaultTasks() {
-        return defaultTasks;
-    }
-
-    public void setDefaultTasks(List<String> defaultTasks) {
-        this.defaultTasks = defaultTasks;
-    }
-
-    public Set<Project> getDependsOnProjects() {
-        return dependsOnProjects;
-    }
-
-    public Map<String, Object> getAdditionalProperties() {
-        return dynamicObjectHelper.getAdditionalProperties();
-    }
-
-    public ProjectStateInternal getState() {
-        return state;
-    }
-
-    public FileResolver getFileResolver() {
-        return fileResolver;
-    }
-
-    public void setFileResolver(FileResolver fileResolver) {
-        this.fileResolver = fileResolver;
-    }
-
-    public void setAnt(AntBuilder ant) {
-        this.ant = ant;
-    }
-
-    public ArtifactHandler getArtifacts() {
-        return artifactHandler;
-    }
-
-    public void setArtifactHandler(ArtifactHandler artifactHandler) {
-        this.artifactHandler = artifactHandler;
-    }
-
-    public RepositoryHandler getRepositories() {
-        return repositoryHandler;
-    }
-
-    public Factory<? extends RepositoryHandler> getRepositoryHandlerFactory() {
-        return repositoryHandlerFactory;
-    }
-
-    public ConfigurationContainer getConfigurations() {
-        return configurationContainer;
-    }
-
-    public void setConfigurationContainer(ConfigurationContainer configurationContainer) {
-        this.configurationContainer = configurationContainer;
-    }
-
-    public String getBuildDirName() {
-        return buildDir.toString();
-    }
-
-    public void setBuildDirName(String buildDirName) {
-        DeprecationLogger.nagUser("Project.setBuildDirName()", "setBuildDir()");
-        this.buildDir = buildDirName;
-    }
-
-    public Convention getConvention() {
-        return dynamicObjectHelper.getConvention();
-    }
-
-    public void setConvention(Convention convention) {
-        dynamicObjectHelper.setConvention(convention);
-    }
-
-    public String getPath() {
-        return path.toString();
-    }
-
-    public int getDepth() {
-        return depth;
-    }
-
-    public IProjectRegistry<ProjectInternal> getProjectRegistry() {
-        return projectRegistry;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) {
-            return true;
-        }
-        if (o == null || getClass() != o.getClass()) {
-            return false;
-        }
-
-        AbstractProject that = (AbstractProject) o;
-
-        return path.equals(that.path);
-    }
-
-    @Override
-    public int hashCode() {
-        return path.hashCode();
-    }
-
-    public int depthCompare(Project otherProject) {
-        return new Integer(getDepth()).compareTo(otherProject.getDepth());
-    }
-
-    public int compareTo(Project otherProject) {
-        int depthCompare = depthCompare(otherProject);
-        if (depthCompare == 0) {
-            return getPath().compareTo(otherProject.getPath());
-        } else {
-            return depthCompare;
-        }
-    }
-
-    public String absolutePath(String path) {
-        DeprecationLogger.nagUser("Project.absolutePath()", "Project.absoluteProjectPath()");
-        return absoluteProjectPath(path);
-    }
-
-    public String absoluteProjectPath(String path) {
-        return this.path.absolutePath(path);
-    }
-
-    public String relativeProjectPath(String path) {
-        return this.path.relativePath(path);
-    }
-
-    public Project project(String path) {
-        Project project = findProject(path);
-        if (project == null) {
-            throw new UnknownProjectException(String.format("Project with path '%s' could not be found in %s.", path, this));
-        }
-        return project;
-    }
-
-    public Project findProject(String path) {
-        if (!isTrue(path)) {
-            throw new InvalidUserDataException("A path must be specified!");
-        }
-        return projectRegistry.getProject(absoluteProjectPath(path));
-    }
-
-    public Set<Project> getAllprojects() {
-        return new TreeSet<Project>(projectRegistry.getAllProjects(getPath()));
-    }
-
-    public Set<Project> getSubprojects() {
-        return new TreeSet<Project>(projectRegistry.getSubProjects(getPath()));
-    }
-
-    public void subprojects(Action<? super Project> action) {
-        configure(getSubprojects(), action);
-    }
-
-    public void allprojects(Action<? super Project> action) {
-        configure(getAllprojects(), action);
-    }
-
-    public <T> Iterable<T> configure(Iterable<T> objects, Action<? super T> configureAction) {
-        for (T object : objects) {
-            configureAction.execute(object);
-        }
-        return objects;
-    }
-
-    public AntBuilder getAnt() {
-        if (ant == null) {
-            ant = createAntBuilder();
-        }
-        return ant;
-    }
-
-    public AntBuilder createAntBuilder() {
-        return antBuilderFactory.create();
-    }
-
-    /**
-     * This method is used when scripts access the project via project.x
-     */
-    public Project getProject() {
-        return this;
-    }
-
-    public AbstractProject evaluate() {
-        projectEvaluator.evaluate(this, state);
-        state.rethrowFailure();
-        return this;
-    }
-
-    public Project usePlugin(String pluginId) {
-        warnUsePluginDeprecated();
-        pluginContainer.apply(pluginId);
-        return this;
-    }
-
-    public Project usePlugin(Class<? extends Plugin> pluginClass) {
-        warnUsePluginDeprecated();
-        pluginContainer.apply(pluginClass);
-        return this;
-    }
-
-    public TaskContainerInternal getTasks() {
-        return taskContainer;
-    }
-
-    public TaskContainerInternal getImplicitTasks() {
-        return implicitTasksContainer;
-    }
-
-    public void defaultTasks(String... defaultTasks) {
-        if (defaultTasks == null) {
-            throw new InvalidUserDataException("Default tasks must not be null!");
-        }
-        this.defaultTasks = new ArrayList<String>();
-        for (String defaultTask : defaultTasks) {
-            if (defaultTask == null) {
-                throw new InvalidUserDataException("Default tasks must not be null!");
-            }
-            this.defaultTasks.add(defaultTask);
-        }
-    }
-
-    public Task createTask(String name) {
-        return createTask(new HashMap<String, Object>(), name, (Action) null);
-    }
-
-    public Task createTask(Map<String, ?> args, String name) {
-        return createTask(args, name, (Action) null);
-    }
-
-    public Task createTask(String name, Action<? super Task> action) {
-        return createTask(new HashMap<String, Object>(), name, action);
-    }
-
-    public Task createTask(String name, Closure action) {
-        return createTask(new HashMap<String, Object>(), name, action);
-    }
-
-    public Task createTask(Map args, String name, Closure action) {
-        warnCreateTaskDeprecated();
-        Map<String, Object> allArgs = new HashMap<String, Object>(args);
-        allArgs.put(Task.TASK_NAME, name);
-        allArgs.put(Task.TASK_ACTION, action);
-        return taskContainer.add(allArgs);
-    }
-
-    public Task createTask(Map<String, ?> args, String name, Action<? super Task> action) {
-        warnCreateTaskDeprecated();
-        Map<String, Object> allArgs = new HashMap<String, Object>(args);
-        allArgs.put(Task.TASK_NAME, name);
-        if (action != null) {
-            allArgs.put(Task.TASK_ACTION, action);
-        }
-        return taskContainer.add(allArgs);
-    }
-
-    private void warnCreateTaskDeprecated() {
-        DeprecationLogger.nagUser("Project.createTask()", "task()");
-    }
-
-    private void warnUsePluginDeprecated() {
-        DeprecationLogger.nagUser("Project.usePlugin()", "apply()");
-    }
-
-    public void addChildProject(ProjectInternal childProject) {
-        childProjects.put(childProject.getName(), childProject);
-    }
-
-    public File getProjectDir() {
-        return projectDir;
-    }
-
-    public File getBuildDir() {
-        return file(buildDir);
-    }
-
-    public void setBuildDir(Object path) {
-        buildDir = path;
-    }
-
-    public void dependsOn(String path) {
-        dependsOn(path, true);
-    }
-
-    public void dependsOn(String path, boolean evaluateDependsOnProject) {
-        if (!isTrue(path)) {
-            throw new InvalidUserDataException("You must specify a project!");
-        }
-        dependsOnProjects.add(project(path));
-        if (evaluateDependsOnProject) {
-            evaluationDependsOn(path);
-        }
-    }
-
-    public Project evaluationDependsOn(String path) {
-        if (!isTrue(path)) {
-            throw new InvalidUserDataException("You must specify a project!");
-        }
-        DefaultProject projectToEvaluate = (DefaultProject) project(path);
-        if (projectToEvaluate.getState().getExecuting()) {
-            throw new CircularReferenceException(String.format("Circular referencing during evaluation for %s.",
-                    projectToEvaluate));
-        }
-        return projectToEvaluate.evaluate();
-    }
-
-    public Project childrenDependOnMe() {
-        for (Project project : childProjects.values()) {
-            project.dependsOn(getPath(), false);
-        }
-        return this;
-    }
-
-    public Project dependsOnChildren() {
-        return dependsOnChildren(false);
-    }
-
-    public Project dependsOnChildren(boolean evaluateDependsOnProject) {
-        for (Project project : childProjects.values()) {
-            dependsOn(project.getPath(), evaluateDependsOnProject);
-        }
-        return this;
-    }
-
-    public String toString() {
-        if (parent != null) {
-            return String.format("project '%s'", path);
-        } else {
-            return String.format("root project '%s'", name);
-        }
-    }
-
-    public Map<Project, Set<Task>> getAllTasks(boolean recursive) {
-        final Map<Project, Set<Task>> foundTargets = new TreeMap<Project, Set<Task>>();
-        Action<Project> action = new Action<Project>() {
-            public void execute(Project project) {
-                foundTargets.put(project, new TreeSet<Task>(project.getTasks().getAll()));
-            }
-        };
-        if (recursive) {
-            allprojects(action);
-        } else {
-            action.execute(this);
-        }
-        return foundTargets;
-    }
-
-    public Set<Task> getTasksByName(final String name, boolean recursive) {
-        if (!isTrue(name)) {
-            throw new InvalidUserDataException("Name is not specified!");
-        }
-        final Set<Task> foundTasks = new HashSet<Task>();
-        Action<Project> action = new Action<Project>() {
-            public void execute(Project project) {
-                Task task = project.getTasks().findByName(name);
-                if (task != null) {
-                    foundTasks.add(task);
-                }
-            }
-        };
-        if (recursive) {
-            allprojects(action);
-        } else {
-            action.execute(this);
-        }
-        return foundTasks;
-    }
-
-    public File file(Object path) {
-        return fileOperations.file(path);
-    }
-
-    public File file(Object path, PathValidation validation) {
-        return fileOperations.file(path, validation);
-    }
-
-    public URI uri(Object path) {
-        return fileOperations.uri(path);
-    }
-
-    public ConfigurableFileCollection files(Object... paths) {
-        return fileOperations.files(paths);
-    }
-
-    public ConfigurableFileCollection files(Object paths, Closure closure) {
-        return fileOperations.files(paths, closure);
-    }
-
-    public ConfigurableFileTree fileTree(Object baseDir) {
-        return fileOperations.fileTree(baseDir);
-    }
-
-    public ConfigurableFileTree fileTree(Map<String, ?> args) {
-        return fileOperations.fileTree(args);
-    }
-
-    public ConfigurableFileTree fileTree(Closure closure) {
-        return fileOperations.fileTree(closure);
-    }
-
-    public FileTree zipTree(Object zipPath) {
-        return fileOperations.zipTree(zipPath);
-    }
-
-    public FileTree tarTree(Object tarPath) {
-        return fileOperations.tarTree(tarPath);
-    }
-
-    public String relativePath(Object path) {
-        return fileOperations.relativePath(path);
-    }
-
-    public File mkdir(Object path) {
-        return fileOperations.mkdir(path);
-    }
-
-    public boolean delete(Object... paths) {
-        return fileOperations.delete(paths);
-    }
-
-    public Directory dir(String path) {
-        String[] pathElements = path.split("/");
-        String name = "";
-        Directory dirTask = null;
-        for (String pathElement : pathElements) {
-            name += name.length() != 0 ? "/" + pathElement : pathElement;
-            Task task = taskContainer.findByName(name);
-            if (task instanceof Directory) {
-                dirTask = (Directory) task;
-            } else if (task != null) {
-                throw new InvalidUserDataException(String.format("Cannot add directory task '%s' as a non-directory task with this name already exists.", name));
-            } else {
-                dirTask = taskContainer.add(name, Directory.class);
-            }
-        }
-        return dirTask;
-    }
-
-    public void setTaskContainer(TaskContainerInternal taskContainer) {
-        this.taskContainer = taskContainer;
-    }
-
-    public Factory<? extends AntBuilder> getAntBuilderFactory() {
-        return antBuilderFactory;
-    }
-
-    public void setAntBuilderFactory(Factory<? extends AntBuilder> antBuilderFactory) {
-        this.antBuilderFactory = antBuilderFactory;
-    }
-
-    public DependencyHandler getDependencies() {
-        return dependencyHandler;
-    }
-
-    public void setDependencyHandler(DependencyHandler dependencyHandler) {
-        this.dependencyHandler = dependencyHandler;
-    }
-
-    public ProjectEvaluationListener getProjectEvaluationBroadcaster() {
-        return evaluationListener.getSource();
-    }
-
-    public void beforeEvaluate(Action<? super Project> action) {
-        evaluationListener.add("beforeEvaluate", action);
-    }
-
-    public void afterEvaluate(Action<? super Project> action) {
-        evaluationListener.add("afterEvaluate", action);
-    }
-
-    public void beforeEvaluate(Closure closure) {
-        evaluationListener.add("beforeEvaluate", closure);
-    }
-
-    public void afterEvaluate(Closure closure) {
-        evaluationListener.add("afterEvaluate", closure);
-    }
-
-    public Logger getLogger() {
-        return buildLogger;
-    }
-
-    public StandardOutputCapture getStandardOutputCapture() {
-        return loggingManager;
-    }
-
-    public LoggingManager getLogging() {
-        return loggingManager;
-    }
-
-    public void disableStandardOutputCapture() {
-        DeprecationLogger.nagUser("Project.disableStandardOutputCapture()");
-        loggingManager.disableStandardOutputCapture();
-    }
-
-    public void captureStandardOutput(LogLevel level) {
-        DeprecationLogger.nagUser("Project.captureStandardOutput()", "getLogging().captureStandardOutput()");
-        loggingManager.captureStandardOutput(level);
-    }
-
-    public Object property(String propertyName) throws MissingPropertyException {
-        return dynamicObjectHelper.getProperty(propertyName);
-    }
-
-    public void setProperty(String name, Object value) {
-        dynamicObjectHelper.setProperty(name, value);
-    }
-
-    public boolean hasProperty(String propertyName) {
-        return dynamicObjectHelper.hasProperty(propertyName);
-    }
-
-    public Map<String, ?> getProperties() {
-        return dynamicObjectHelper.getProperties();
-    }
-
-    public WorkResult copy(Closure closure) {
-        return fileOperations.copy(closure);
-    }
-
-    public CopySpec copySpec(Closure closure) {
-        return fileOperations.copySpec(closure);
-    }
-
-    public ExecResult javaexec(Closure closure) {
-        return fileOperations.javaexec(closure);
-    }
-
-    public ExecResult exec(Closure closure) {
-        return fileOperations.exec(closure);
-    }
-
-    public ServiceRegistryFactory getServices() {
-        return services;
-    }
-
-    public Module getModule() {
-        return getServices().get(DependencyMetaDataProvider.class).getModule();
-    }
-
-    public void apply(Closure closure) {
-        DefaultObjectConfigurationAction action = new DefaultObjectConfigurationAction(fileResolver, services.get(
-                ScriptPluginFactory.class), this);
-        configure(action, closure);
-        action.execute();
-    }
-
-    public void apply(Map<String, ?> options) {
-        DefaultObjectConfigurationAction action = new DefaultObjectConfigurationAction(fileResolver, services.get(
-                ScriptPluginFactory.class), this);
-        ConfigureUtil.configureByMap(options, action);
-        action.execute();
-    }
-
-    public AntBuilder ant(Closure configureClosure) {
-        return ConfigureUtil.configure(configureClosure, getAnt());
-    }
-
-    public void subprojects(Closure configureClosure) {
-        configure(getSubprojects(), configureClosure);
-    }
-
-    public void allprojects(Closure configureClosure) {
-        configure(getAllprojects(), configureClosure);
-    }
-
-    public Project project(String path, Closure configureClosure) {
-        return ConfigureUtil.configure(configureClosure, project(path));
-    }
-
-    public Object configure(Object object, Closure configureClosure) {
-        return ConfigureUtil.configure(configureClosure, object);
-    }
-
-    public Iterable<?> configure(Iterable<?> objects, Closure configureClosure) {
-        for (Object object : objects) {
-            configure(object, configureClosure);
-        }
-        return objects;
-    }
-
-    public void configurations(Closure configureClosure) {
-        ((Configurable<?>) getConfigurations()).configure(configureClosure);
-    }
-
-    public void repositories(Closure configureClosure) {
-        ConfigureUtil.configure(configureClosure, getRepositories());
-    }
-
-    public void dependencies(Closure configureClosure) {
-        ConfigureUtil.configure(configureClosure, getDependencies());
-    }
-
-    public void artifacts(Closure configureClosure) {
-        ConfigureUtil.configure(configureClosure, getArtifacts());
-    }
-
-    public void buildscript(Closure configureClosure) {
-        ConfigureUtil.configure(configureClosure, getBuildscript());
-    }
-
-    public Task task(String task) {
-        return taskContainer.add(task);
-    }
-
-    public Task task(Object task) {
-        return taskContainer.add(task.toString());
-    }
-
-    public Task task(String task, Closure configureClosure) {
-        return taskContainer.add(task).configure(configureClosure);
-    }
-
-    public Task task(Object task, Closure configureClosure) {
-        return task(task.toString(), configureClosure);
-    }
-
-    public Task task(Map options, String task) {
-        return taskContainer.add(addMaps(options, singletonMap(Task.TASK_NAME, task)));
-    }
-
-    public Task task(Map options, Object task) {
-        return task(options, task.toString());
-    }
-
-    public Task task(Map options, String task, Closure configureClosure) {
-        return taskContainer.add(addMaps(options, singletonMap(Task.TASK_NAME, task))).configure(configureClosure);
-    }
-
-    public Task task(Map options, Object task, Closure configureClosure) {
-        return task(options, task.toString(), configureClosure);
-    }
-
-    /**
-     * This is called by the task creation DSL. Need to find a cleaner way to do this...
-     */
-    public Object passThrough(Object object) {
-        return object;
-    }
-
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuter.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuter.java
deleted file mode 100644
index 4472e89..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/project/taskfactory/PostExecutionAnalysisTaskExecuter.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.project.taskfactory;
-
-import org.gradle.api.Task;
-import org.gradle.api.internal.TaskInternal;
-import org.gradle.api.internal.tasks.TaskExecuter;
-import org.gradle.api.internal.tasks.TaskStateInternal;
-
-public class PostExecutionAnalysisTaskExecuter implements TaskExecuter {
-    private final TaskExecuter executer;
-
-    public PostExecutionAnalysisTaskExecuter(TaskExecuter executer) {
-        this.executer = executer;
-    }
-
-    public void execute(TaskInternal task, TaskStateInternal state) {
-        executer.execute(task, state);
-        if (task.getActions().isEmpty()) {
-            boolean upToDate = true;
-            for (Task dependency : task.getTaskDependencies().getDependencies(task)) {
-                if (!dependency.getState().getSkipped()) {
-                    upToDate = false;
-                    break;
-                }
-            }
-            if (upToDate) {
-                state.upToDate();
-            }
-        }
-        else if (!state.getDidWork()) {
-            state.upToDate();
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java
deleted file mode 100644
index a0a7215..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/resource/UriResource.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.resource;
-
-import org.apache.commons.io.IOUtils;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.InputStream;
-import java.net.URI;
-
-import static org.gradle.util.GFileUtils.*;
-
-public class UriResource implements Resource {
-    private final File sourceFile;
-    private final URI sourceUri;
-    private final String description;
-
-    public UriResource(String description, File sourceFile) {
-        this.description = description;
-        this.sourceFile = canonicalise(sourceFile);
-        this.sourceUri = sourceFile.toURI();
-    }
-
-    public UriResource(String description, URI sourceUri) {
-        this.description = description;
-        this.sourceFile = sourceUri.getScheme().equals("file") ? canonicalise(new File(sourceUri.getPath())) : null;
-        this.sourceUri = sourceUri;
-    }
-
-    public String getDisplayName() {
-        return String.format("%s '%s'", description, sourceFile != null ? sourceFile.getAbsolutePath() : sourceUri);
-    }
-
-    public String getText() {
-        if (sourceFile != null && sourceFile.isDirectory()) {
-            throw new ResourceException(String.format("Could not read %s as it is a directory.", getDisplayName()));
-        }
-        try {
-            InputStream inputStream = sourceUri.toURL().openStream();
-            try {
-                return IOUtils.toString(inputStream);
-            } finally {
-                inputStream.close();
-            }
-        } catch (FileNotFoundException e) {
-            throw new ResourceNotFoundException(String.format(String.format("Could not read %s as it does not exist.",
-                    getDisplayName())));
-        } catch (Exception e) {
-            throw new ResourceException(String.format("Could not read %s.", getDisplayName()), e);
-        }
-    }
-
-    public boolean getExists() {
-        try {
-            InputStream inputStream = sourceUri.toURL().openStream();
-            try {
-                return true;
-            } finally {
-                inputStream.close();
-            }
-        } catch (FileNotFoundException e ) {
-            return false;
-        } catch (Exception e) {
-            throw new ResourceException(String.format("Could not determine if %s exists.", getDisplayName()), e);
-        }
-    }
-
-    public File getFile() {
-        return sourceFile;
-    }
-
-    public URI getURI() {
-        return sourceUri;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskCollection.java
deleted file mode 100644
index 1718370..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/DefaultTaskCollection.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.tasks;
-
-import groovy.lang.Closure;
-import org.gradle.api.*;
-import org.gradle.api.internal.ClassGenerator;
-import org.gradle.api.internal.DefaultNamedDomainObjectContainer;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.specs.Specs;
-import org.gradle.api.tasks.TaskCollection;
-
-public class DefaultTaskCollection<T extends Task> extends DefaultNamedDomainObjectContainer<T> implements TaskCollection<T> {
-    protected final ProjectInternal project;
-
-    public DefaultTaskCollection(Class<T> type, ClassGenerator classGenerator, ProjectInternal project) {
-        super(type, classGenerator);
-        this.project = project;
-    }
-
-    public DefaultTaskCollection(Class<T> type, ClassGenerator classGenerator, ProjectInternal project, NamedObjectStore<T> store) {
-        super(type, classGenerator, store);
-        this.project = project;
-    }
-
-    @Override
-    public TaskCollection<T> matching(Spec<? super T> spec) {
-        return getClassGenerator().newInstance(DefaultTaskCollection.class, getType(), getClassGenerator(), project, storeWithSpec(spec));
-    }
-
-    @Override
-    public TaskCollection<T> matching(Closure spec) {
-        return matching(Specs.convertClosureToSpec(spec));
-    }
-
-    @Override
-    public <S extends T> TaskCollection<S> withType(Class<S> type) {
-        return getClassGenerator().newInstance(DefaultTaskCollection.class, type, getClassGenerator(), project, storeWithType(type));
-    }
-
-    public Action<? super T> whenTaskAdded(Action<? super T> action) {
-        return whenObjectAdded(action);
-    }
-
-    public void whenTaskAdded(Closure closure) {
-        whenObjectAdded(closure);
-    }
-
-    public void allTasks(Action<? super T> action) {
-        allObjects(action);
-    }
-
-    public void allTasks(Closure action) {
-        allObjects(action);
-    }
-
-    @Override
-    public String getTypeDisplayName() {
-        return "task";
-    }
-
-    @Override
-    protected UnknownDomainObjectException createNotFoundException(String name) {
-        return new UnknownTaskException(String.format("Task with name '%s' not found in %s.", name, project));
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObject.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObject.java
deleted file mode 100644
index a0db86d..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObject.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.tasks.generator;
-
-import groovy.util.Node;
-import groovy.util.XmlParser;
-import org.gradle.api.internal.XmlTransformer;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-
-/**
- * A {@link PersistableConfigurationObject} which is stored in an XML file.
- */
-public abstract class XmlPersistableConfigurationObject extends AbstractPersistableConfigurationObject {
-    private final XmlTransformer xmlTransformer;
-    private Node xml;
-
-    protected XmlPersistableConfigurationObject(XmlTransformer xmlTransformer) {
-        this.xmlTransformer = xmlTransformer;
-    }
-
-    public Node getXml() {
-        return xml;
-    }
-
-    @Override
-    public void load(InputStream inputStream) throws Exception {
-        xml = new XmlParser().parse(inputStream);
-        load(xml);
-    }
-
-    @Override
-    public void store(OutputStream outputStream) {
-        store(xml);
-        xmlTransformer.transform(xml, new OutputStreamWriter(outputStream));
-    }
-
-    /**
-     * Called immediately after the XML file has been read.
-     */
-    protected abstract void load(Node xml);
-
-    /**
-     * Called immediately before the XML file is to be written.
-     */
-    protected abstract void store(Node xml);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/invocation/Gradle.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/invocation/Gradle.java
deleted file mode 100644
index 39deb07..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/invocation/Gradle.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.invocation;
-
-import groovy.lang.Closure;
-import org.gradle.BuildListener;
-import org.gradle.StartParameter;
-import org.gradle.api.Project;
-import org.gradle.api.ProjectEvaluationListener;
-import org.gradle.api.execution.TaskExecutionGraph;
-
-import java.io.File;
-
-/**
- * <p>Represents an invocation of Gradle.</p>
- *
- * <p>You can obtain a {@code Gradle} instance by calling {@link Project#getGradle()}.</p>
- */
-public interface Gradle {
-    /**
-     * <p>Returns the current Gradle version.</p>
-     *
-     * @return The Gradle version. Never returns null.
-     */
-    String getGradleVersion();
-
-    /**
-     * <p>Returns the Gradle user home directory. This directory is used to cache downloaded resources.</p>
-     *
-     * @return The user home directory. Never returns null.
-     */
-    File getGradleUserHomeDir();
-
-    /**
-     * <p>Returns the Gradle home directory, if any. This directory is the directory containing the Gradle distribution
-     * executing this build.</p>
-     *
-     * @return The home directory. May return null.
-     * @deprecated No replacement
-     */
-    @Deprecated
-    File getGradleHomeDir();
-
-    /**
-     * <p>Returns the parent build of this build, if any.</p>
-     *
-     * @return The parent build. May return null.
-     */
-    Gradle getParent();
-
-    /**
-     * <p>Returns the root project of this build.</p>
-     *
-     * @return The root project. Never returns null.
-     */
-    Project getRootProject();
-
-    /**
-     * <p>Returns the {@link TaskExecutionGraph} for this build.</p>
-     *
-     * @return The task graph. Never returns null.
-     */
-    TaskExecutionGraph getTaskGraph();
-
-    /**
-     * Returns the {@link StartParameter} used to start this build.
-     *
-     * @return The start parameter. Never returns null.
-     */
-    StartParameter getStartParameter();
-
-    /**
-     * Adds a listener to this build, to receive notifications as projects are evaluated.
-     *
-     * @param listener The listener to add. Does nothing if this listener has already been added.
-     * @return The added listener.
-     */
-    ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener);
-
-    /**
-     * Removes the given listener from this build.
-     *
-     * @param listener The listener to remove. Does nothing if this listener has not been added.
-     */
-    void removeProjectEvaluationListener(ProjectEvaluationListener listener);
-
-    /**
-     * Adds a closure to be called immediately before a project is evaluated. The project is passed to the closure as a
-     * parameter.
-     *
-     * @param closure The closure to execute.
-     */
-    void beforeProject(Closure closure);
-
-    /**
-     * Adds a closure to be called immediately after a project is evaluated. The project is passed to the closure as the
-     * first parameter. The project evaluation failure, if any, is passed as the second parameter. Both parameters are
-     * optional.
-     *
-     * @param closure The closure to execute.
-     */
-    void afterProject(Closure closure);
-
-    /**
-     * Adds a closure to be called when the build is started. This {@code Gradle} instance is passed to the closure as
-     * the first parameter.
-     *
-     * @param closure The closure to execute.
-     */
-    void buildStarted(Closure closure);
-
-    /**
-     * Adds a closure to be called when the build settings have been loaded and evaluated. The settings object is
-     * fully configured and is ready to use to load the build projects. The
-     * {@link org.gradle.api.initialization.Settings} object is passed to the closure as a parameter.
-     *
-     * @param closure The closure to execute.
-     */
-    void settingsEvaluated(Closure closure);
-
-    /**
-     * Adds a closure to be called when the projects for the build have been created from the settings.
-     * None of the projects have been evaluated. This {@code Gradle} instance is passed to the closure as a parameter.
-     *
-     * @param closure The closure to execute.
-     */
-    void projectsLoaded(Closure closure);
-
-    /**
-     * Adds a closure to be called when all projects for the build have been evaluated. The project objects are fully
-     * configured and are ready to use to populate the task graph. This {@code Gradle} instance is passed to
-     * the closure as a parameter.
-     *
-     * @param closure The closure to execute.
-     */
-    void projectsEvaluated(Closure closure);
-
-    /**
-     * Adds a closure to be called when the build is completed. All selected tasks have been executed.
-     * A {@link org.gradle.BuildResult} instance is passed to the closure as a parameter.
-     *
-     * @param closure The closure to execute.
-     */
-    void buildFinished(Closure closure);
-
-    /**
-     * <p>Adds a {@link BuildListener} to this Build instance. The listener is notified of events which occur during the
-     * execution of the build.</p>
-     *
-     * @param buildListener The listener to add.
-     */
-    void addBuildListener(BuildListener buildListener);
-
-    /**
-     * Adds the given listener to this build. The listener may implement any of the given listener interfaces:
-     *
-     * <ul>
-     *
-     * <li>{@link org.gradle.BuildListener}
-     *
-     * <li>{@link org.gradle.api.execution.TaskExecutionGraphListener}
-     *
-     * <li>{@link org.gradle.api.ProjectEvaluationListener}
-     *
-     * <li>{@link org.gradle.api.execution.TaskExecutionListener}
-     *
-     * <li>{@link org.gradle.api.execution.TaskActionListener}
-     *
-     * <li>{@link org.gradle.api.logging.StandardOutputListener}
-     *
-     * <li>{@link org.gradle.api.tasks.testing.TestListener}
-     *
-     * </ul>
-     *
-     * @param listener The listener to add. Does nothing if this listener has already been added.
-     */
-    public void addListener(Object listener);
-
-    /**
-     * Removes the given listener from this build.
-     *
-     * @param listener The listener to remove. Does nothing if this listener has not been added.
-     */
-    public void removeListener(Object listener);
-
-    /**
-     * Uses the given object as a logger. The logger object may implement any of the listener interfaces supported by
-     * {@link #addListener(Object)}. Each listener interface has exactly one associated logger. When you call this
-     * method with a logger of a given listener type, the new logger will replace whichever logger is currently
-     * associated with the listener type. This allows you to selectively replace the standard logging which Gradle
-     * provides with your own implementation, for certain types of events.
-     *
-     * @param logger The logger to use.
-     */
-    public void useLogger(Object logger);
-
-    /**
-     * Returns this {@code Gradle} instance. This method is useful in init scripts to explicitly access Gradle
-     * properties and methods. For example, using <code>gradle.parent</code> can express your intent better than using
-     * <code>parent</code>. This property also allows you to access Gradle properties from a scope where the property
-     * may be hidden, such as, for example, from a method or closure.
-     *
-     * @return this. Never returns null.
-     */
-    Gradle getGradle();
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginCollection.java
deleted file mode 100644
index ff9f550..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/plugins/PluginCollection.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins;
-
-import org.gradle.api.DomainObjectCollection;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-
-import groovy.lang.Closure;
-
-/**
- * <p>A {@code PluginCollection} represents a collection of {@link org.gradle.api.Plugin} instances.</p>
- * 
- * @author Hans Dockter
- * @param <T> The type of plugins which this collection contains.
- */
-public interface PluginCollection<T extends Plugin> extends DomainObjectCollection<T> {
-    /**
-     * {@inheritDoc}
-     */
-    PluginCollection<T> matching(Spec<? super T> spec);
-
-    /**
-     * {@inheritDoc}
-     */
-    PluginCollection<T> matching(Closure closure);
-
-    /**
-     * {@inheritDoc}
-     */
-    <S extends T> PluginCollection<S> withType(Class<S> type);
-
-    /**
-     * Adds an {@code Action} to be executed when a plugin is added to this collection.
-     *
-     * @param action The action to be executed
-     * @return the supplied action
-     */
-    Action<? super T> whenPluginAdded(Action<? super T> action);
-
-    /**
-     * Adds a closure to be called when a plugin is added to this collection. The plugin is passed to the closure as the
-     * parameter.
-     *
-     * @param closure The closure to be called
-     */
-    void whenPluginAdded(Closure closure);
-
-    /**
-     * Executes the given action against all plugins in this collection, and any plugins subsequently added to this
-     * collection.
-     *
-     * @param action The action to be executed
-     */
-    void allPlugins(Action<? super T> action);
-
-    /**
-     * Executes the given closure against all plugins in this collection, and any plugins subsequently added to this
-     * collection.
-     *
-     * @param closure The closure to be called
-     */
-    void allPlugins(Closure closure);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskCollection.java b/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskCollection.java
deleted file mode 100644
index 9bf42c4..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/api/tasks/TaskCollection.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.tasks;
-
-import groovy.lang.Closure;
-import org.gradle.api.*;
-import org.gradle.api.specs.Spec;
-
-/**
- * A {@code TaskCollection} contains a set of {@link Task} instances, and provides a number of query methods.
- *
- * @param <T> The type of tasks which this collection contains.
- */
-public interface TaskCollection<T extends Task> extends NamedDomainObjectCollection<T> {
-
-    /**
-     * {@inheritDoc}
-     */
-    TaskCollection<T> matching(Spec<? super T> spec);
-
-    /**
-     * {@inheritDoc}
-     */
-    TaskCollection<T> matching(Closure closure);
-
-    /**
-     * {@inheritDoc}
-     */
-    T getByName(String name, Closure configureClosure) throws UnknownTaskException;
-
-    /**
-     * {@inheritDoc}
-     */
-    T getByName(String name) throws UnknownTaskException;
-
-    /**
-     * {@inheritDoc}
-     */
-    <S extends T> TaskCollection<S> withType(Class<S> type);
-
-    /**
-     * Adds an {@code Action} to be executed when a task is added to this collection.
-     *
-     * @param action The action to be executed
-     * @return the supplied action
-     */
-    Action<? super T> whenTaskAdded(Action<? super T> action);
-
-    /**
-     * Adds a closure to be called when a task is added to this collection. The task is passed to the closure as the
-     * parameter.
-     *
-     * @param closure The closure to be called
-     */
-    void whenTaskAdded(Closure closure);
-
-    /**
-     * Executes the given action against all tasks in this collection, and any tasks subsequently added to this
-     * collection.
-     *
-     * @param action The action to be executed
-     */
-    void allTasks(Action<? super T> action);
-
-    /**
-     * Executes the given closure against all tasks in this collection, and any tasks subsequently added to this
-     * collection.
-     *
-     * @param closure The closure to be called
-     */
-    void allTasks(Closure closure);
-
-    /**
-     * {@inheritDoc}
-     */
-    T getAt(String name) throws UnknownTaskException;
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/AutoCloseCacheFactory.java b/subprojects/gradle-core/src/main/groovy/org/gradle/cache/AutoCloseCacheFactory.java
deleted file mode 100644
index b362f6f..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/AutoCloseCacheFactory.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.cache;
-
-import org.gradle.CacheUsage;
-import org.gradle.util.GFileUtils;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-public class AutoCloseCacheFactory implements CacheFactory {
-    private final CacheFactory cacheFactory;
-    private final Map<File, CacheInfo> openCaches = new HashMap<File, CacheInfo>();
-
-    public AutoCloseCacheFactory(CacheFactory cacheFactory) {
-        this.cacheFactory = cacheFactory;
-    }
-
-    public PersistentCache open(File cacheDir, CacheUsage usage, Map<String, ?> properties) {
-        File canonicalDir = GFileUtils.canonicalise(cacheDir);
-        CacheInfo cacheInfo = openCaches.get(canonicalDir);
-        if (cacheInfo == null) {
-            PersistentCache cache = cacheFactory.open(cacheDir, usage, properties);
-            cacheInfo = new CacheInfo(cache, properties);
-            openCaches.put(canonicalDir, cacheInfo);
-        }
-        else {
-            if (!properties.equals(cacheInfo.properties)) {
-                throw new UnsupportedOperationException(String.format(
-                        "Cache '%s' is already open with different state.", cacheDir));
-            }
-        }
-        cacheInfo.addReference();
-        return cacheInfo.cache;
-    }
-
-    public void close(PersistentCache cache) {
-        for (CacheInfo cacheInfo : openCaches.values()) {
-            if (cacheInfo.cache == cache) {
-                if (cacheInfo.removeReference()) {
-                    openCaches.values().remove(cacheInfo);
-                    cacheFactory.close(cacheInfo.cache);
-                }
-                return;
-            }
-        }
-        throw new IllegalArgumentException("Attempting to close unknown cache " + cache);
-    }
-
-    public void close() {
-        try {
-            for (CacheInfo cacheInfo : openCaches.values()) {
-                cacheFactory.close(cacheInfo.cache);
-            }
-        } finally {
-            openCaches.clear();
-        }
-    }
-
-    private static class CacheInfo {
-        int count;
-        final Map<String, ?> properties;
-        final PersistentCache cache;
-
-        private CacheInfo(PersistentCache cache, Map<String, ?> properties) {
-            this.cache = cache;
-            this.properties = new HashMap<String, Object>(properties);
-        }
-
-        public void addReference() {
-            count++;
-        }
-
-        public boolean removeReference() {
-            count--;
-            return count == 0;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultPersistentDirectoryCache.java b/subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultPersistentDirectoryCache.java
deleted file mode 100644
index ac3ccc7..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/cache/DefaultPersistentDirectoryCache.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.cache;
-
-import org.gradle.CacheUsage;
-import org.gradle.cache.btree.BTreePersistentIndexedCache;
-import org.gradle.util.GFileUtils;
-import org.gradle.util.GUtil;
-
-import java.io.File;
-import java.util.Map;
-import java.util.Properties;
-
-public class DefaultPersistentDirectoryCache implements PersistentCache {
-    private final File dir;
-    private final File propertiesFile;
-    private final Properties properties = new Properties();
-    private boolean valid;
-    private BTreePersistentIndexedCache indexedCache;
-    private SimpleStateCache stateCache;
-
-    public DefaultPersistentDirectoryCache(File dir, CacheUsage cacheUsage, Map<String, ?> properties) {
-        this.dir = dir;
-        propertiesFile = new File(dir, "cache.properties");
-        this.properties.putAll(properties);
-        determineIfCacheIsValid(cacheUsage, properties);
-        buildCacheDir();
-    }
-
-    @Override
-    public String toString() {
-        return String.format("Cache %s", dir);
-    }
-
-    private void buildCacheDir() {
-        if (!valid) {
-            GFileUtils.deleteDirectory(dir);
-        }
-        if (!dir.isDirectory()) {
-            dir.mkdirs();
-        }
-    }
-
-    private void determineIfCacheIsValid(CacheUsage cacheUsage, Map<String, ?> properties) {
-        valid = false;
-
-        if (cacheUsage != CacheUsage.ON) {
-            return;
-        }
-
-        if (!propertiesFile.isFile()) {
-            return;
-        }
-
-        Properties currentProperties = GUtil.loadProperties(propertiesFile);
-        for (Map.Entry<String, ?> entry : properties.entrySet()) {
-            if (!entry.getValue().toString().equals(currentProperties.getProperty(entry.getKey()))) {
-                return;
-            }
-        }
-        valid = true;
-    }
-
-    public <K, V> BTreePersistentIndexedCache<K, V> openIndexedCache(Serializer<V> serializer) {
-        if (indexedCache == null) {
-            indexedCache = new BTreePersistentIndexedCache<K,V>(this, serializer);
-        }
-        return indexedCache;
-    }
-
-    public <K, V> BTreePersistentIndexedCache<K, V> openIndexedCache() {
-        return openIndexedCache(new DefaultSerializer<V>());
-    }
-
-    public <T> SimpleStateCache<T> openStateCache() {
-        if (stateCache == null) {
-            stateCache = new SimpleStateCache<T>(this, new DefaultSerializer<T>());
-        }
-        return stateCache;
-    }
-
-    public Properties getProperties() {
-        return properties;
-    }
-
-    public File getBaseDir() {
-        return dir;
-    }
-
-    public boolean isValid() {
-        return valid;
-    }
-
-    public void markValid() {
-        GUtil.saveProperties(properties, propertiesFile);
-        valid = true;
-    }
-
-    public void close() {
-        if (indexedCache != null) {
-            indexedCache.close();
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskSelector.java b/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskSelector.java
deleted file mode 100644
index 1e73abc..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/execution/TaskSelector.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.execution;
-
-import com.google.common.collect.SetMultimap;
-import org.apache.commons.lang.StringUtils;
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.util.NameMatcher;
-
-import java.util.Map;
-import java.util.Set;
-
-public class TaskSelector {
-    private final TaskNameResolver taskNameResolver;
-    private Set<Task> tasks;
-    private String taskName;
-
-    public TaskSelector() {
-        this(new TaskNameResolver());
-    }
-
-    public TaskSelector(TaskNameResolver taskNameResolver) {
-        this.taskNameResolver = taskNameResolver;
-    }
-
-    public void selectTasks(GradleInternal gradle, String path) {
-        SetMultimap<String, Task> tasksByName;
-        String baseName;
-        String prefix;
-
-        ProjectInternal project = gradle.getDefaultProject();
-
-        if (path.contains(Project.PATH_SEPARATOR)) {
-            String projectPath = StringUtils.substringBeforeLast(path, Project.PATH_SEPARATOR);
-            projectPath = projectPath.length() == 0 ? Project.PATH_SEPARATOR : projectPath;
-            project = findProject(project, projectPath);
-            baseName = StringUtils.substringAfterLast(path, Project.PATH_SEPARATOR);
-            prefix = project.getPath() + Project.PATH_SEPARATOR;
-
-            tasksByName = taskNameResolver.select(baseName, project);
-        }
-        else {
-            baseName = path;
-            prefix = "";
-
-            tasksByName = taskNameResolver.selectAll(path, project);
-        }
-
-        Set<Task> tasks = tasksByName.get(baseName);
-        if (!tasks.isEmpty()) {
-            // An exact match
-            this.tasks = tasks;
-            this.taskName = path;
-            return;
-        }
-
-        NameMatcher matcher = new NameMatcher();
-        String actualName = matcher.find(baseName, tasksByName.keySet());
-
-        if (actualName != null) {
-            // A partial match
-            this.tasks = tasksByName.get(actualName);
-            this.taskName = prefix + actualName;
-            return;
-        }
-
-        throw new TaskSelectionException(matcher.formatErrorMessage("task", project));
-    }
-
-    public String getTaskName() {
-        return taskName;
-    }
-
-    public Set<Task> getTasks() {
-        return tasks;
-    }
-
-    private static ProjectInternal findProject(ProjectInternal startFrom, String path) {
-        if (path.equals(Project.PATH_SEPARATOR)) {
-            return startFrom.getRootProject();
-        }
-        Project current = startFrom;
-        if (path.startsWith(Project.PATH_SEPARATOR)) {
-            current = current.getRootProject();
-            path = path.substring(1);
-        }
-        for (String pattern : path.split(Project.PATH_SEPARATOR)) {
-            Map<String, Project> children = current.getChildProjects();
-
-            NameMatcher matcher = new NameMatcher();
-            Project child = matcher.find(pattern, children);
-            if (child != null) {
-                current = child;
-                continue;
-            }
-
-            throw new TaskSelectionException(matcher.formatErrorMessage("project", current));
-        }
-
-        return (ProjectInternal) current;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildSourceBuilder.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildSourceBuilder.java
deleted file mode 100644
index ff013e0..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/BuildSourceBuilder.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.initialization;
-
-import org.apache.commons.io.IOUtils;
-import org.gradle.*;
-import org.gradle.api.Project;
-import org.gradle.api.UncheckedIOException;
-import org.gradle.api.internal.plugins.EmbeddableJavaProject;
-import org.gradle.api.invocation.Gradle;
-import org.gradle.cache.CacheRepository;
-import org.gradle.cache.PersistentStateCache;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.gradle.groovy.scripts.StringScriptSource;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.*;
-
-/**
- * @author Hans Dockter
- */
-public class BuildSourceBuilder {
-    private static final Logger LOGGER = LoggerFactory.getLogger(BuildSourceBuilder.class);
-
-    private final GradleLauncherFactory gradleLauncherFactory;
-    private final ClassLoaderFactory classLoaderFactory;
-    private final CacheRepository cacheRepository;
-
-    private static final String DEFAULT_BUILD_SOURCE_SCRIPT_RESOURCE = "defaultBuildSourceScript.txt";
-
-    public BuildSourceBuilder(GradleLauncherFactory gradleLauncherFactory, ClassLoaderFactory classLoaderFactory, CacheRepository cacheRepository) {
-        this.gradleLauncherFactory = gradleLauncherFactory;
-        this.classLoaderFactory = classLoaderFactory;
-        this.cacheRepository = cacheRepository;
-    }
-
-    public URLClassLoader buildAndCreateClassLoader(StartParameter startParameter)
-    {
-        Set<File> classpath = createBuildSourceClasspath(startParameter);
-        Iterator<File> classpathIterator = classpath.iterator();
-        URL[] urls = new URL[classpath.size()];
-        for (int i = 0; i < urls.length; i++)
-        {
-            try
-            {
-                urls[i] = classpathIterator.next().toURI().toURL();
-            }
-            catch (MalformedURLException e)
-            {
-                throw new UncheckedIOException(e);
-            }
-        }
-        return new URLClassLoader(urls, classLoaderFactory.getRootClassLoader());
-    }
-
-    public Set<File> createBuildSourceClasspath(StartParameter startParameter) {
-        assert startParameter.getCurrentDir() != null && startParameter.getBuildFile() == null;
-
-        LOGGER.debug("Starting to build the build sources.");
-        if (!startParameter.getCurrentDir().isDirectory()) {
-            LOGGER.debug("Gradle source dir does not exist. We leave.");
-            return new HashSet<File>();
-        }
-        LOGGER.info("================================================" + " Start building buildSrc");
-        StartParameter startParameterArg = startParameter.newInstance();
-        startParameterArg.setProjectProperties(startParameter.getProjectProperties());
-        startParameterArg.setSearchUpwards(false);
-        startParameterArg.setProfile(startParameter.isProfile());
-
-        // If we were not the most recent version of Gradle to build the buildSrc dir, then do a clean build
-        // Otherwise, just to a regular build
-        PersistentStateCache<Boolean> stateCache = cacheRepository.cache("buildSrc").forObject(
-                startParameter.getCurrentDir()).invalidateOnVersionChange().open().openStateCache();
-        boolean rebuild = stateCache.get() == null;
-
-        if (!new File(startParameter.getCurrentDir(), Project.DEFAULT_BUILD_FILE).isFile()) {
-            LOGGER.debug("Gradle script file does not exist. Using default one.");
-            ScriptSource source = new StringScriptSource("default buildSrc build script", getDefaultScript());
-            startParameterArg.setBuildScriptSource(source);
-        }
-
-        GradleLauncher gradleLauncher = gradleLauncherFactory.newInstance(startParameterArg);
-        BuildSrcBuildListener listener = new BuildSrcBuildListener(rebuild);
-        gradleLauncher.addListener(listener);
-        gradleLauncher.run().rethrowFailure();
-
-        stateCache.set(true);
-
-        Set<File> buildSourceClasspath = new LinkedHashSet<File>();
-        buildSourceClasspath.addAll(listener.getRuntimeClasspath());
-        LOGGER.debug("Gradle source classpath is: {}", buildSourceClasspath);
-        LOGGER.info("================================================" + " Finished building buildSrc");
-
-        return buildSourceClasspath;
-    }
-
-    static String getDefaultScript() {
-        try {
-            return IOUtils.toString(BuildSourceBuilder.class.getResourceAsStream(DEFAULT_BUILD_SOURCE_SCRIPT_RESOURCE));
-        } catch (IOException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private static class BuildSrcBuildListener extends BuildAdapter {
-        private EmbeddableJavaProject projectInfo;
-        private Set<File> classpath;
-        private final boolean rebuild;
-
-        public BuildSrcBuildListener(boolean rebuild) {
-            this.rebuild = rebuild;
-        }
-
-        @Override
-        public void projectsEvaluated(Gradle gradle) {
-            projectInfo = gradle.getRootProject().getConvention().getPlugin(
-                    EmbeddableJavaProject.class);
-            gradle.getStartParameter().setTaskNames(rebuild ? projectInfo.getRebuildTasks() : projectInfo.getBuildTasks());
-            classpath = projectInfo.getRuntimeClasspath().getFiles();
-        }
-
-        public Collection<File> getRuntimeClasspath() {
-            return classpath;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultCommandLineConverter.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultCommandLineConverter.java
deleted file mode 100644
index 1b638bd..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultCommandLineConverter.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import com.google.common.collect.BiMap;
-import com.google.common.collect.HashBiMap;
-import org.gradle.CacheUsage;
-import org.gradle.CommandLineArgumentException;
-import org.gradle.StartParameter;
-import org.gradle.api.InvalidUserDataException;
-import org.gradle.api.initialization.Settings;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.internal.file.BaseDirConverter;
-import org.gradle.api.internal.file.FileResolver;
-import org.gradle.configuration.ImplicitTasksConfigurer;
-import org.gradle.logging.LoggingConfiguration;
-import org.gradle.logging.internal.LoggingCommandLineConverter;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultCommandLineConverter extends AbstractCommandLineConverter<StartParameter> {
-    private static final String NO_SEARCH_UPWARDS = "u";
-    private static final String PROJECT_DIR = "p";
-    private static final String PROJECT_DEPENDENCY_TASK_NAMES = "A";
-    private static final String NO_PROJECT_DEPENDENCY_REBUILD = "a";
-    private static final String BUILD_FILE = "b";
-    public static final String INIT_SCRIPT = "I";
-    private static final String SETTINGS_FILE = "c";
-    private static final String TASKS = "t";
-    private static final String PROPERTIES = "r";
-    private static final String DEPENDENCIES = "n";
-    public static final String FULL_STACKTRACE = "S";
-    public static final String STACKTRACE = "s";
-    private static final String SYSTEM_PROP = "D";
-    private static final String PROJECT_PROP = "P";
-    public static final String GRADLE_USER_HOME = "g";
-    private static final String EMBEDDED_SCRIPT = "e";
-    private static final String CACHE = "C";
-    private static final String DRY_RUN = "m";
-    private static final String NO_OPT = "no-opt";
-    private static final String EXCLUDE_TASK = "x";
-    private static final String PROFILE = "profile";
-
-    private static BiMap<String, StartParameter.ShowStacktrace> showStacktraceMap = HashBiMap.create();
-    private final CommandLineConverter<LoggingConfiguration> loggingConfigurationCommandLineConverter = new LoggingCommandLineConverter();
-
-    //Initialize bi-directional maps so you can convert these back and forth from their command line options to their
-    //object representation.
-
-    static {
-        showStacktraceMap.put(FULL_STACKTRACE, StartParameter.ShowStacktrace.ALWAYS_FULL);
-        showStacktraceMap.put(STACKTRACE, StartParameter.ShowStacktrace.ALWAYS);
-        //showStacktraceMap.put( , StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS ); there is no command argument for this. Rather, the lack of an argument means 'default to this'.
-    }
-
-    public void configure(CommandLineParser parser) {
-        loggingConfigurationCommandLineConverter.configure(parser);
-        parser.allowMixedSubcommandsAndOptions();
-        parser.option(NO_SEARCH_UPWARDS, "no-search-upward").hasDescription(String.format("Don't search in parent folders for a %s file.", Settings.DEFAULT_SETTINGS_FILE));
-        parser.option(CACHE, "cache").hasArgument().hasDescription("Specifies how compiled build scripts should be cached. Possible values are: 'rebuild' and 'on'. Default value is 'on'");
-        parser.option(DRY_RUN, "dry-run").hasDescription("Runs the builds with all task actions disabled.");
-        parser.option(STACKTRACE, "stacktrace").hasDescription("Print out the stacktrace also for user exceptions (e.g. compile error).");
-        parser.option(FULL_STACKTRACE, "full-stacktrace").hasDescription("Print out the full (very verbose) stacktrace for any exceptions.");
-        parser.option(TASKS, "tasks").mapsToSubcommand(ImplicitTasksConfigurer.TASKS_TASK).hasDescription("Show list of available tasks [deprecated - use 'gradle tasks' instead].");
-        parser.option(PROPERTIES, "properties").mapsToSubcommand(ImplicitTasksConfigurer.PROPERTIES_TASK).hasDescription("Show list of all available project properties [deprecated - use 'gradle properties' instead].");
-        parser.option(DEPENDENCIES, "dependencies").mapsToSubcommand(ImplicitTasksConfigurer.DEPENDENCIES_TASK).hasDescription("Show list of all project dependencies [deprecated - use 'gradle dependencies' instead].");
-        parser.option(PROJECT_DIR, "project-dir").hasArgument().hasDescription("Specifies the start directory for Gradle. Defaults to current directory.");
-        parser.option(GRADLE_USER_HOME, "gradle-user-home").hasArgument().hasDescription("Specifies the gradle user home directory.");
-        parser.option(INIT_SCRIPT, "init-script").hasArguments().hasDescription("Specifies an initialization script.");
-        parser.option(SETTINGS_FILE, "settings-file").hasArgument().hasDescription("Specifies the settings file.");
-        parser.option(BUILD_FILE, "build-file").hasArgument().hasDescription("Specifies the build file.");
-        parser.option(SYSTEM_PROP, "system-prop").hasArguments().hasDescription("Set system property of the JVM (e.g. -Dmyprop=myvalue).");
-        parser.option(PROJECT_PROP, "project-prop").hasArguments().hasDescription("Set project property for the build script (e.g. -Pmyprop=myvalue).");
-        parser.option(EMBEDDED_SCRIPT, "embedded").hasArgument().hasDescription("Specify an embedded build script.");
-        parser.option(PROJECT_DEPENDENCY_TASK_NAMES, "dep-tasks").hasArguments().hasDescription("Specify additional tasks for building project dependencies.");
-        parser.option(NO_PROJECT_DEPENDENCY_REBUILD, "no-rebuild").hasDescription("Do not rebuild project dependencies.");
-        parser.option(NO_OPT).hasDescription("Ignore any task optimization.");
-        parser.option(EXCLUDE_TASK, "exclude-task").hasArguments().hasDescription("Specify a task to be excluded from execution.");
-        parser.option(PROFILE).hasDescription("Profiles build execution time and generates a report in the <build_dir>/reports/profile directory.");
-    }
-
-    @Override
-    protected StartParameter newInstance() {
-        return new StartParameter();
-    }
-
-    public StartParameter convert(ParsedCommandLine options, StartParameter startParameter) throws CommandLineArgumentException {
-        LoggingConfiguration loggingConfiguration = loggingConfigurationCommandLineConverter.convert(options);
-        startParameter.setLogLevel(loggingConfiguration.getLogLevel());
-        startParameter.setColorOutput(loggingConfiguration.isColorOutput());
-        FileResolver resolver = new BaseDirConverter(startParameter.getCurrentDir());
-
-        for (String keyValueExpression : options.option(SYSTEM_PROP).getValues()) {
-            String[] elements = keyValueExpression.split("=");
-            startParameter.getSystemPropertiesArgs().put(elements[0], elements.length == 1 ? "" : elements[1]);
-        }
-
-        for (String keyValueExpression : options.option(PROJECT_PROP).getValues()) {
-            String[] elements = keyValueExpression.split("=");
-            startParameter.getProjectProperties().put(elements[0], elements.length == 1 ? "" : elements[1]);
-        }
-
-        if (options.hasOption(NO_SEARCH_UPWARDS)) {
-            startParameter.setSearchUpwards(false);
-        }
-
-        if (options.hasOption(PROJECT_DIR)) {
-            startParameter.setProjectDir(resolver.resolve(options.option(PROJECT_DIR).getValue()));
-        }
-        if (options.hasOption(GRADLE_USER_HOME)) {
-            startParameter.setGradleUserHomeDir(resolver.resolve(options.option(GRADLE_USER_HOME).getValue()));
-        }
-        if (options.hasOption(BUILD_FILE)) {
-            startParameter.setBuildFile(resolver.resolve(options.option(BUILD_FILE).getValue()));
-        }
-        if (options.hasOption(SETTINGS_FILE)) {
-            startParameter.setSettingsFile(resolver.resolve(options.option(SETTINGS_FILE).getValue()));
-        }
-
-        for (String script : options.option(INIT_SCRIPT).getValues()) {
-            startParameter.addInitScript(resolver.resolve(script));
-        }
-
-        if (options.hasOption(CACHE)) {
-            try {
-                startParameter.setCacheUsage(CacheUsage.fromString(options.option(CACHE).getValue()));
-            } catch (InvalidUserDataException e) {
-                throw new CommandLineArgumentException(e.getMessage());
-            }
-        }
-
-        if (options.hasOption(EMBEDDED_SCRIPT)) {
-            if (options.hasOption(BUILD_FILE) || options.hasOption(NO_SEARCH_UPWARDS) || options.hasOption(SETTINGS_FILE)) {
-                System.err.println(String.format(
-                        "Error: The -%s option can't be used together with the -%s, -%s or -%s options.",
-                        EMBEDDED_SCRIPT, BUILD_FILE, SETTINGS_FILE, NO_SEARCH_UPWARDS));
-                throw new CommandLineArgumentException(String.format(
-                        "Error: The -%s option can't be used together with the -%s, -%s or -%s options.",
-                        EMBEDDED_SCRIPT, BUILD_FILE, SETTINGS_FILE, NO_SEARCH_UPWARDS));
-            }
-            startParameter.useEmbeddedBuildFile(options.option(EMBEDDED_SCRIPT).getValue());
-        }
-
-        if (options.hasOption(FULL_STACKTRACE)) {
-            if (options.hasOption(STACKTRACE)) {
-                throw new CommandLineArgumentException(String.format(
-                        "Error: The -%s option can't be used together with the -%s option.", FULL_STACKTRACE,
-                        STACKTRACE));
-            }
-            startParameter.setShowStacktrace(StartParameter.ShowStacktrace.ALWAYS_FULL);
-        } else if (options.hasOption(STACKTRACE)) {
-            startParameter.setShowStacktrace(StartParameter.ShowStacktrace.ALWAYS);
-        }
-
-        if (options.hasOption(PROJECT_DEPENDENCY_TASK_NAMES) && options.hasOption(NO_PROJECT_DEPENDENCY_REBUILD)) {
-            throw new CommandLineArgumentException(String.format(
-                    "Error: The -%s and -%s options cannot be used together.", PROJECT_DEPENDENCY_TASK_NAMES,
-                    NO_PROJECT_DEPENDENCY_REBUILD));
-        } else if (options.hasOption(NO_PROJECT_DEPENDENCY_REBUILD)) {
-            startParameter.setProjectDependenciesBuildInstruction(new ProjectDependenciesBuildInstruction(null));
-        } else if (options.hasOption(PROJECT_DEPENDENCY_TASK_NAMES)) {
-            List<String> normalizedTaskNames = new ArrayList<String>();
-            for (String taskName : options.option(PROJECT_DEPENDENCY_TASK_NAMES).getValues()) {
-                normalizedTaskNames.add(taskName);
-            }
-            startParameter.setProjectDependenciesBuildInstruction(new ProjectDependenciesBuildInstruction(
-                    normalizedTaskNames));
-        }
-
-        if (!options.getExtraArguments().isEmpty()) {
-            startParameter.setTaskNames(options.getExtraArguments());
-        }
-
-        if (options.hasOption(DRY_RUN)) {
-            startParameter.setDryRun(true);
-        }
-
-        if (options.hasOption(NO_OPT)) {
-            startParameter.setNoOpt(true);
-        }
-
-        if (options.hasOption(EXCLUDE_TASK)) {
-            startParameter.setExcludedTaskNames(options.option(EXCLUDE_TASK).getValues());
-        }
-
-        if (options.hasOption(PROFILE)) {
-            startParameter.setProfile(true);
-        }
-
-        return startParameter;
-    }
-
-    /**
-     * This returns the stack trace level object represented by the command line argument
-     *
-     * @param commandLineArgument a single command line argument (with no '-')
-     * @return the corresponding stack trace level or null if it doesn't match any.
-     * @author mhunsicker
-     */
-    public StartParameter.ShowStacktrace getShowStacktrace(String commandLineArgument) {
-        StartParameter.ShowStacktrace showStacktrace = showStacktraceMap.get(commandLineArgument);
-        if (showStacktrace == null) {
-            return null;
-        }
-
-        return showStacktrace;
-    }
-
-    /**
-     * This returns the command line argument that represents the specified stack trace level.
-     *
-     * @param showStacktrace the stack trace level.
-     * @return the command line argument or null if this level cannot be represented on the command line.
-     * @author mhunsicker
-     */
-    public String getShowStacktraceCommandLine(StartParameter.ShowStacktrace showStacktrace) {
-        String commandLine = showStacktraceMap.inverse().get(showStacktrace);
-        if (commandLine == null) {
-            return null;
-        }
-
-        return commandLine;
-    }
-
-    /**
-     * This returns the ShowStacktrace levels that are supported on the command line.
-     *
-     * @return a collection of available ShowStacktrace levels
-     * @author mhunsicker
-     */
-    public Collection<StartParameter.ShowStacktrace> getShowStacktrace() {
-        return Collections.unmodifiableCollection(showStacktraceMap.values());
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncherFactory.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncherFactory.java
deleted file mode 100644
index 9f0ee94..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradleLauncherFactory.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.initialization;
-
-import org.gradle.*;
-import org.gradle.api.internal.ExceptionAnalyser;
-import org.gradle.api.internal.project.GlobalServicesRegistry;
-import org.gradle.api.internal.project.IProjectFactory;
-import org.gradle.api.internal.project.ServiceRegistry;
-import org.gradle.api.internal.project.TopLevelBuildServiceRegistry;
-import org.gradle.api.logging.Logging;
-import org.gradle.api.logging.StandardOutputListener;
-import org.gradle.cache.CacheRepository;
-import org.gradle.configuration.BuildConfigurer;
-import org.gradle.invocation.DefaultGradle;
-import org.gradle.listener.ListenerManager;
-import org.gradle.logging.LoggingManagerInternal;
-import org.gradle.logging.ProgressLoggerFactory;
-import org.gradle.logging.StyledTextOutputFactory;
-import org.gradle.profile.ProfileListener;
-import org.gradle.util.WrapUtil;
-
-import java.util.Arrays;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultGradleLauncherFactory implements GradleLauncherFactory {
-    private final ServiceRegistry sharedServices;
-    private final NestedBuildTracker tracker;
-    private CommandLineConverter<StartParameter> commandLineConverter;
-
-    public DefaultGradleLauncherFactory(ServiceRegistry loggingServices) {
-        this(new GlobalServicesRegistry(loggingServices));
-    }
-    
-    public DefaultGradleLauncherFactory() {
-        this(new GlobalServicesRegistry());
-    }
-
-    private DefaultGradleLauncherFactory(GlobalServicesRegistry globalServices) {
-        sharedServices = globalServices;
-
-        // Start logging system
-//        sharedServices.newInstance(LoggingManagerInternal.class).setLevel(LogLevel.LIFECYCLE).start();
-
-        commandLineConverter = sharedServices.get(CommandLineConverter.class);
-        tracker = new NestedBuildTracker();
-
-        // Register default loggers 
-        ListenerManager listenerManager = sharedServices.get(ListenerManager.class);
-        listenerManager.addListener(new BuildProgressLogger(sharedServices.get(ProgressLoggerFactory.class)));
-
-        GradleLauncher.injectCustomFactory(this);
-    }
-
-    public StartParameter createStartParameter(String... commandLineArgs) {
-        return commandLineConverter.convert(Arrays.asList(commandLineArgs));
-    }
-
-    public DefaultGradleLauncher newInstance(StartParameter startParameter) {
-        BuildRequestMetaData requestMetaData;
-        if (tracker.getCurrentBuild() != null) {
-            requestMetaData = new DefaultBuildRequestMetaData(tracker.getCurrentBuild().getServices().get(BuildClientMetaData.class), System.currentTimeMillis());
-        } else {
-            requestMetaData = new DefaultBuildRequestMetaData(System.currentTimeMillis());
-        }
-        return doNewInstance(startParameter, requestMetaData);
-    }
-
-    public DefaultGradleLauncher newInstance(StartParameter startParameter, BuildRequestMetaData requestMetaData) {
-        // This should only be used for top-level builds
-        assert tracker.getCurrentBuild() == null;
-        return doNewInstance(startParameter, requestMetaData);
-    }
-
-    private DefaultGradleLauncher doNewInstance(StartParameter startParameter, BuildRequestMetaData requestMetaData) {
-        TopLevelBuildServiceRegistry serviceRegistry = new TopLevelBuildServiceRegistry(sharedServices, startParameter);
-        serviceRegistry.add(BuildRequestMetaData.class, requestMetaData);
-        serviceRegistry.add(BuildClientMetaData.class, requestMetaData.getClient());
-        ListenerManager listenerManager = serviceRegistry.get(ListenerManager.class);
-        LoggingManagerInternal loggingManager = serviceRegistry.newInstance(LoggingManagerInternal.class);
-        loggingManager.setLevel(startParameter.getLogLevel());
-        loggingManager.colorStdOutAndStdErr(startParameter.isColorOutput());
-
-        //this hooks up the ListenerManager and LoggingConfigurer so you can call Gradle.addListener() with a StandardOutputListener.
-        loggingManager.addStandardOutputListener(listenerManager.getBroadcaster(StandardOutputListener.class));
-        loggingManager.addStandardErrorListener(listenerManager.getBroadcaster(StandardOutputListener.class));
-
-        listenerManager.useLogger(new TaskExecutionLogger(serviceRegistry.get(ProgressLoggerFactory.class)));
-        if (tracker.getCurrentBuild() == null) {
-            listenerManager.useLogger(new BuildLogger(Logging.getLogger(BuildLogger.class), serviceRegistry.get(StyledTextOutputFactory.class), startParameter, requestMetaData));
-        }
-        listenerManager.addListener(tracker);
-        listenerManager.addListener(new BuildCleanupListener(serviceRegistry));
-
-        if (startParameter.isProfile()) {
-            listenerManager.addListener(new ProfileListener(requestMetaData.getBuildTimeClock().getStartTime()));
-        }
-
-        DefaultGradle gradle = new DefaultGradle(
-                tracker.getCurrentBuild(),
-                startParameter, serviceRegistry);
-        return new DefaultGradleLauncher(
-                gradle,
-                serviceRegistry.get(InitScriptHandler.class),
-                new SettingsHandler(
-                        new EmbeddedScriptSettingsFinder(
-                                new DefaultSettingsFinder(WrapUtil.<ISettingsFileSearchStrategy>toList(
-                                        new MasterDirSettingsFinderStrategy(),
-                                        new ParentDirSettingsFinderStrategy()))),
-                        serviceRegistry.get(SettingsProcessor.class),
-                        new BuildSourceBuilder(
-                                this,
-                                serviceRegistry.get(ClassLoaderFactory.class),
-                                serviceRegistry.get(CacheRepository.class))),
-                new DefaultGradlePropertiesLoader(),
-                new BuildLoader(
-                        serviceRegistry.get(IProjectFactory.class)
-                ),
-                serviceRegistry.get(BuildConfigurer.class),
-                gradle.getBuildListenerBroadcaster(),
-                serviceRegistry.get(ExceptionAnalyser.class),
-                loggingManager);
-    }
-
-    public void setCommandLineConverter(
-            CommandLineConverter<StartParameter> commandLineConverter) {
-        this.commandLineConverter = commandLineConverter;
-    }
-
-    private static class BuildCleanupListener extends BuildAdapter {
-        private final TopLevelBuildServiceRegistry services;
-
-        private BuildCleanupListener(TopLevelBuildServiceRegistry services) {
-            this.services = services;
-        }
-
-        @Override
-        public void buildFinished(BuildResult result) {
-            services.close();
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradlePropertiesLoader.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradlePropertiesLoader.java
deleted file mode 100644
index 53a9237..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultGradlePropertiesLoader.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import org.gradle.StartParameter;
-import org.gradle.util.GUtil;
-import org.gradle.api.Project;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultGradlePropertiesLoader implements IGradlePropertiesLoader {
-    private static Logger logger = LoggerFactory.getLogger(DefaultGradlePropertiesLoader.class);
-
-    private Map<String, String> gradleProperties = new HashMap<String, String>();
-
-    public void loadProperties(File settingsDir, StartParameter startParameter) {
-        loadProperties(settingsDir, startParameter, getAllSystemProperties(), getAllEnvProperties());
-    }
-
-    void loadProperties(File settingsDir, StartParameter startParameter, Map<String, String> systemProperties,
-                        Map<String, String> envProperties) {
-        gradleProperties.clear();
-        addGradleProperties(
-                new File(settingsDir, Project.GRADLE_PROPERTIES),
-                new File(startParameter.getGradleUserHomeDir(), Project.GRADLE_PROPERTIES));
-        setSystemProperties(startParameter.getSystemPropertiesArgs());
-        gradleProperties.putAll(getEnvProjectProperties(envProperties));
-        gradleProperties.putAll(getSystemProjectProperties(systemProperties));
-        gradleProperties.putAll(startParameter.getProjectProperties());
-    }
-
-    Map getAllSystemProperties() {
-        return System.getProperties();
-    }
-
-    Map<String, String> getAllEnvProperties() {
-        // The reason why we have an try-catch block here is for JDK 1.4 compatibility. We use the retrotranslator to produce
-        // a 1.4 compatible version. But the retrotranslator is not capable of translating System.getenv to 1.4.
-        // The System.getenv call is only available in 1.5. In fact 1.4 does not offer any API to read
-        // environment variables. Therefore this call leads to an exception when used with 1.4. We ignore the exception in this
-        // case and simply return an empty hashmap.
-        try {
-            return System.getenv();
-        } catch (Throwable e) {
-            logger.debug("The System.getenv() call has lead to an exception. Probably you are running on Java 1.4.", e);
-            return Collections.emptyMap();
-        }
-    }
-
-    private void addGradleProperties(File... files) {
-        for (File propertyFile : files) {
-            if (propertyFile.isFile()) {
-                Properties properties = GUtil.loadProperties(propertyFile);
-                gradleProperties.putAll(new HashMap(properties));
-            }
-        }
-    }
-
-    public Map<String, String> getGradleProperties() {
-        return gradleProperties;
-    }
-
-    public void setGradleProperties(Map<String, String> gradleProperties) {
-        this.gradleProperties = gradleProperties;
-    }
-
-    private Map<String, String> getSystemProjectProperties(Map<String, String> systemProperties) {
-        Map<String, String> systemProjectProperties = new HashMap<String, String>();
-        for (Map.Entry<String, String> entry : systemProperties.entrySet()) {
-            if (entry.getKey().startsWith(SYSTEM_PROJECT_PROPERTIES_PREFIX) &&
-                    entry.getKey().length() > SYSTEM_PROJECT_PROPERTIES_PREFIX.length()) {
-                systemProjectProperties.put(entry.getKey().substring(SYSTEM_PROJECT_PROPERTIES_PREFIX.length()),
-                        entry.getValue());
-            }
-        }
-        logger.debug("Found system project properties: {}", systemProjectProperties.keySet());
-        return systemProjectProperties;
-    }
-
-    private Map<String, String> getEnvProjectProperties(Map<String, String> envProperties) {
-        Map<String, String> envProjectProperties = new HashMap<String, String>();
-        for (Map.Entry<String, String> entry : envProperties.entrySet()) {
-            if (entry.getKey().startsWith(ENV_PROJECT_PROPERTIES_PREFIX) &&
-                    entry.getKey().length() > ENV_PROJECT_PROPERTIES_PREFIX.length()) {
-                envProjectProperties.put(entry.getKey().substring(ENV_PROJECT_PROPERTIES_PREFIX.length()),
-                        entry.getValue());
-            }
-        }
-        logger.debug("Found env project properties: {}", envProjectProperties.keySet());
-        return envProjectProperties;
-    }
-
-    private void setSystemProperties(Map<String, String> properties) {
-        System.getProperties().putAll(properties);
-        addSystemPropertiesFromGradleProperties();
-    }
-
-    private void addSystemPropertiesFromGradleProperties() {
-        for (String key : gradleProperties.keySet()) {
-            if (key.startsWith(Project.SYSTEM_PROP_PREFIX + '.')) {
-                System.setProperty(key.substring((Project.SYSTEM_PROP_PREFIX + '.').length()), gradleProperties.get(
-                        key));
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultInitScriptFinder.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultInitScriptFinder.java
deleted file mode 100644
index 5ae15ed..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/DefaultInitScriptFinder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.initialization;
-
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.gradle.groovy.scripts.UriScriptSource;
-
-import java.io.File;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * Simple finder that "finds" all the init scripts that were explicitly added
- * to the start parameters.
- */
-public class DefaultInitScriptFinder implements InitScriptFinder
-{
-    public List<ScriptSource> findScripts(GradleInternal gradle) {
-        List<File> scriptFiles = gradle.getStartParameter().getInitScripts();
-        List<ScriptSource> scripts = new ArrayList<ScriptSource>(scriptFiles.size());
-        for (File file : scriptFiles) {
-            scripts.add(new UriScriptSource("initialization script", file));
-        }
-
-        return scripts;
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScriptFinder.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScriptFinder.java
deleted file mode 100644
index 1ccc78f..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScriptFinder.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.groovy.scripts.ScriptSource;
-
-import java.util.List;
-
-/**
- * Interface for objects that can find init scripts for a given build.
- */
-public interface InitScriptFinder
-{
-    public List<ScriptSource> findScripts(GradleInternal gradle);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScriptHandler.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScriptHandler.java
deleted file mode 100644
index 960453f..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/InitScriptHandler.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.gradle.configuration.InitScriptProcessor;
-
-import java.util.List;
-
-/**
- * Finds and executes all init scripts for a given build.
- */
-public class InitScriptHandler
-{
-    private final InitScriptFinder finder;
-    private final InitScriptProcessor processor;
-
-    public InitScriptHandler(InitScriptFinder finder, InitScriptProcessor processor) {
-        this.finder = finder;
-        this.processor = processor;
-    }
-
-    public void executeScripts(GradleInternal gradle) {
-        List<ScriptSource> scriptSources = finder.findScripts(gradle);
-        for (ScriptSource source : scriptSources) {
-            processor.process(source, gradle);
-        }
-    }
-}
-
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsLocation.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsLocation.java
deleted file mode 100644
index 3519a6d..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/SettingsLocation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import org.gradle.groovy.scripts.ScriptSource;
-
-import java.io.File;
-
-public class SettingsLocation
-{
-    private File settingsDir;
-    private ScriptSource settingsScriptSource;
-
-    public SettingsLocation(File settingsDir, ScriptSource settingsScriptSource) {
-        this.settingsDir = settingsDir;
-        this.settingsScriptSource = settingsScriptSource;
-    }
-
-    public File getSettingsDir() { return settingsDir; }
-    public ScriptSource getSettingsScriptSource() { return settingsScriptSource; }
-}
-
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/UserHomeInitScriptFinder.java b/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/UserHomeInitScriptFinder.java
deleted file mode 100644
index 679c72d..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/initialization/UserHomeInitScriptFinder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.gradle.groovy.scripts.UriScriptSource;
-
-import java.io.File;
-import java.util.List;
-
-public class UserHomeInitScriptFinder implements InitScriptFinder
-{
-    public static final String DEFAULT_INIT_SCRIPT_NAME = "init.gradle";
-
-    private final InitScriptFinder finder;
-
-    public UserHomeInitScriptFinder(InitScriptFinder finder) {
-        this.finder = finder;
-    }
-
-    public List<ScriptSource> findScripts(GradleInternal gradle) {
-        List<ScriptSource> scripts = finder.findScripts(gradle);
-
-        File userHomeDir = gradle.getStartParameter().getGradleUserHomeDir();
-        File userInitScript = new File(userHomeDir, DEFAULT_INIT_SCRIPT_NAME);
-        if (userInitScript.isFile()) {
-            scripts.add(new UriScriptSource("initialization script", userInitScript));
-        }
-
-        return scripts;
-    }
-}
-
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/invocation/DefaultGradle.java b/subprojects/gradle-core/src/main/groovy/org/gradle/invocation/DefaultGradle.java
deleted file mode 100644
index bfc1d12..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/invocation/DefaultGradle.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.invocation;
-
-import groovy.lang.Closure;
-import org.gradle.BuildListener;
-import org.gradle.StartParameter;
-import org.gradle.api.ProjectEvaluationListener;
-import org.gradle.api.internal.GradleDistributionLocator;
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.api.internal.project.IProjectRegistry;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.internal.project.ServiceRegistryFactory;
-import org.gradle.api.invocation.Gradle;
-import org.gradle.execution.TaskGraphExecuter;
-import org.gradle.listener.ListenerManager;
-import org.gradle.util.DeprecationLogger;
-import org.gradle.util.GradleVersion;
-import org.gradle.util.MultiParentClassLoader;
-
-import java.io.File;
-
-public class DefaultGradle implements GradleInternal {
-    private ProjectInternal rootProject;
-    private ProjectInternal defaultProject;
-    private TaskGraphExecuter taskGraph;
-    private final Gradle parent;
-    private StartParameter startParameter;
-    private MultiParentClassLoader scriptClassLoader;
-    private IProjectRegistry<ProjectInternal> projectRegistry;
-    private final ListenerManager listenerManager;
-    private final ServiceRegistryFactory services;
-    private final GradleDistributionLocator distributionLocator;
-
-    public DefaultGradle(Gradle parent, StartParameter startParameter, ServiceRegistryFactory parentRegistry) {
-        this.parent = parent;
-        this.startParameter = startParameter;
-        this.services = parentRegistry.createFor(this);
-        this.listenerManager = services.get(ListenerManager.class);
-        projectRegistry = services.get(IProjectRegistry.class);
-        taskGraph = services.get(TaskGraphExecuter.class);
-        scriptClassLoader = services.get(MultiParentClassLoader.class);
-        distributionLocator = services.get(GradleDistributionLocator.class);
-    }
-
-    @Override
-    public String toString() {
-        return rootProject == null ? "build" : String.format("build '%s'", rootProject.getName());
-    }
-
-    public Gradle getParent() {
-        return parent;
-    }
-
-    public String getGradleVersion() {
-        return new GradleVersion().getVersion();
-    }
-
-    public File getGradleHomeDir() {
-        DeprecationLogger.nagUser("Gradle.getGradleHomeDir()");
-        return distributionLocator.getGradleHome();
-    }
-
-    public File getGradleUserHomeDir() {
-        return startParameter.getGradleUserHomeDir();
-    }
-
-    public StartParameter getStartParameter() {
-        return startParameter;
-    }
-
-    public ProjectInternal getRootProject() {
-        return rootProject;
-    }
-
-    public void setRootProject(ProjectInternal rootProject) {
-        this.rootProject = rootProject;
-    }
-
-    public ProjectInternal getDefaultProject() {
-        return defaultProject;
-    }
-
-    public void setDefaultProject(ProjectInternal defaultProject) {
-        this.defaultProject = defaultProject;
-    }
-
-    public TaskGraphExecuter getTaskGraph() {
-        return taskGraph;
-    }
-
-    public void setTaskGraph(TaskGraphExecuter taskGraph) {
-        this.taskGraph = taskGraph;
-    }
-
-    public IProjectRegistry<ProjectInternal> getProjectRegistry() {
-        return projectRegistry;
-    }
-
-    public MultiParentClassLoader getScriptClassLoader() {
-        return scriptClassLoader;
-    }
-
-    public ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener) {
-        addListener(listener);
-        return listener;
-    }
-
-    public void removeProjectEvaluationListener(ProjectEvaluationListener listener) {
-        removeListener(listener);
-    }
-
-    public void beforeProject(Closure closure) {
-        listenerManager.addListener(ProjectEvaluationListener.class, "beforeEvaluate", closure);
-    }
-
-    public void afterProject(Closure closure) {
-        listenerManager.addListener(ProjectEvaluationListener.class, "afterEvaluate", closure);
-    }
-
-    public void buildStarted(Closure closure) {
-        listenerManager.addListener(BuildListener.class, "buildStarted", closure);
-    }
-
-    public void settingsEvaluated(Closure closure) {
-        listenerManager.addListener(BuildListener.class, "settingsEvaluated", closure);
-    }
-
-    public void projectsLoaded(Closure closure) {
-        listenerManager.addListener(BuildListener.class, "projectsLoaded", closure);
-    }
-
-    public void projectsEvaluated(Closure closure) {
-        listenerManager.addListener(BuildListener.class, "projectsEvaluated", closure);
-    }
-
-    public void buildFinished(Closure closure) {
-        listenerManager.addListener(BuildListener.class, "buildFinished", closure);
-    }
-
-    public void addListener(Object listener) {
-        listenerManager.addListener(listener);
-    }
-
-    public void removeListener(Object listener) {
-        listenerManager.removeListener(listener);
-    }
-
-    public void useLogger(Object logger) {
-        listenerManager.useLogger(logger);
-    }
-
-    public ProjectEvaluationListener getProjectEvaluationBroadcaster() {
-        return listenerManager.getBroadcaster(ProjectEvaluationListener.class);
-    }
-
-    public void addBuildListener(BuildListener buildListener) {
-        addListener(buildListener);
-    }
-
-    public BuildListener getBuildListenerBroadcaster() {
-        return listenerManager.getBroadcaster(BuildListener.class);
-    }
-
-    public Gradle getGradle() {
-        return this;
-    }
-
-    public ServiceRegistryFactory getServices() {
-        return services;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/ExecutorFactory.java b/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/ExecutorFactory.java
deleted file mode 100644
index 1598206..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/concurrent/ExecutorFactory.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.messaging.concurrent;
-
-public interface ExecutorFactory {
-    /**
-     * Creates an executor. It is the caller's responsibility to stop the executor.
-     *
-     * @param displayName The display name for the this executor. Used for thread names, logging and error message.
-     * @return The executor.
-     */
-    StoppableExecutor create(String displayName);
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/AsyncDispatch.java b/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/AsyncDispatch.java
deleted file mode 100644
index 3d9dde1..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/AsyncDispatch.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.messaging.dispatch;
-
-import org.gradle.messaging.concurrent.AsyncStoppable;
-import org.gradle.util.UncheckedException;
-
-import java.util.LinkedList;
-import java.util.concurrent.Executor;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-/**
- * <p>A {@link org.gradle.messaging.dispatch.Dispatch} implementation which delivers messages asynchronously. Calls to
- * {@link #dispatch} queue the message. Worker threads delivers the messages in the order they have been received to one
- * of a pool of delegate {@link org.gradle.messaging.dispatch.Dispatch} instances.</p>
- *
- * <p>One or more {@link org.gradle.messaging.dispatch.Receive} instances can use used as a source of messages.</p>
- */
-public class AsyncDispatch<T> implements StoppableDispatch<T>, AsyncStoppable {
-    private enum State {
-        Init, Stopped
-    }
-
-    private static final int MAX_QUEUE_SIZE = 200;
-    private final Lock lock = new ReentrantLock();
-    private final Condition condition = lock.newCondition();
-    private final LinkedList<T> queue = new LinkedList<T>();
-    private final Executor executor;
-    private final int maxQueueSize;
-    private int dispatchers;
-    private State state;
-
-    public AsyncDispatch(Executor executor) {
-        this(executor, null, MAX_QUEUE_SIZE);
-    }
-
-    public AsyncDispatch(Executor executor, final Dispatch<? super T> dispatch) {
-        this(executor, dispatch, MAX_QUEUE_SIZE);
-    }
-
-    public AsyncDispatch(Executor executor, final Dispatch<? super T> dispatch, int maxQueueSize) {
-        this.executor = executor;
-        this.maxQueueSize = maxQueueSize;
-        state = State.Init;
-        if (dispatch != null) {
-            dispatchTo(dispatch);
-        }
-    }
-
-    public void dispatchTo(final Dispatch<? super T> dispatch) {
-        onDispatchThreadStart();
-        executor.execute(new Runnable() {
-            public void run() {
-                try {
-                    dispatchMessages(dispatch);
-                } finally {
-                    onDispatchThreadExit();
-                }
-            }
-        });
-    }
-
-    private void onDispatchThreadStart() {
-        lock.lock();
-        try {
-            if (state != State.Init) {
-                throw new IllegalStateException("This dispatch has been stopped.");
-            }
-            dispatchers++;
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    private void onDispatchThreadExit() {
-        lock.lock();
-        try {
-            dispatchers--;
-            condition.signalAll();
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    private void setState(State state) {
-        this.state = state;
-        condition.signalAll();
-    }
-
-    private void dispatchMessages(Dispatch<? super T> dispatch) {
-        while (true) {
-            T message = null;
-            lock.lock();
-            try {
-                while (state != State.Stopped && queue.isEmpty()) {
-                    try {
-                        condition.await();
-                    } catch (InterruptedException e) {
-                        throw new UncheckedException(e);
-                    }
-                }
-                if (!queue.isEmpty()) {
-                    message = queue.remove();
-                    condition.signalAll();
-                }
-            } finally {
-                lock.unlock();
-            }
-
-            if (message == null) {
-                // Have been stopped and nothing to deliver
-                return;
-            }
-
-            dispatch.dispatch(message);
-        }
-    }
-
-    public void dispatch(final T message) {
-        lock.lock();
-        try {
-            while (state != State.Stopped && queue.size() >= maxQueueSize) {
-                try {
-                    condition.await();
-                } catch (InterruptedException e) {
-                    throw new UncheckedException(e);
-                }
-            }
-            if (state == State.Stopped) {
-                throw new IllegalStateException("This message dispatch has been stopped.");
-            }
-            queue.add(message);
-            condition.signalAll();
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    /**
-     * Commences a shutdown of this dispatch.
-     */
-    public void requestStop() {
-        lock.lock();
-        try {
-            doRequestStop();
-        } finally {
-            lock.unlock();
-        }
-    }
-
-    private void doRequestStop() {
-        setState(State.Stopped);
-    }
-
-    public void stop() {
-        lock.lock();
-        try {
-            setState(State.Stopped);
-            while (dispatchers > 0) {
-                condition.await();
-            }
-
-            if (!queue.isEmpty()) {
-                throw new IllegalStateException(
-                        "Cannot wait for messages to be dispatched, as there are no dispatch threads running.");
-            }
-        } catch (InterruptedException e) {
-            throw new UncheckedException(e);
-        } finally {
-            lock.unlock();
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatch.java b/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatch.java
deleted file mode 100644
index 8ac4129..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ContextClassLoaderDispatch.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.messaging.dispatch;
-
-public class ContextClassLoaderDispatch<T> implements Dispatch<T> {
-    private final Dispatch<? super T> dispatch;
-    private final ClassLoader contextClassLoader;
-
-    public ContextClassLoaderDispatch(Dispatch<? super T> dispatch, ClassLoader contextClassLoader) {
-        this.dispatch = dispatch;
-        this.contextClassLoader = contextClassLoader;
-    }
-
-    public void dispatch(T message) {
-        ClassLoader original = Thread.currentThread().getContextClassLoader();
-        Thread.currentThread().setContextClassLoader(contextClassLoader);
-        try {
-            dispatch.dispatch(message);
-        }
-        finally {
-            Thread.currentThread().setContextClassLoader(original);
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ReflectionDispatch.java b/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ReflectionDispatch.java
deleted file mode 100644
index cb44a7c..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/messaging/dispatch/ReflectionDispatch.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.messaging.dispatch;
-
-import org.gradle.util.UncheckedException;
-
-import java.lang.reflect.InvocationTargetException;
-
-public class ReflectionDispatch implements Dispatch<MethodInvocation> {
-    private final Object target;
-
-    public ReflectionDispatch(Object target) {
-        this.target = target;
-    }
-
-    public void dispatch(MethodInvocation message) {
-        try {
-            message.getMethod().invoke(target, message.getArguments());
-        } catch (InvocationTargetException e) {
-            throw UncheckedException.asUncheckedException(e.getCause());
-        } catch (Throwable throwable) {
-            throw UncheckedException.asUncheckedException(throwable);
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultJavaForkOptions.java b/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultJavaForkOptions.java
deleted file mode 100644
index 16b6e48..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultJavaForkOptions.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.process.internal;
-
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.internal.file.FileResolver;
-import org.gradle.api.internal.file.PathResolvingFileCollection;
-import org.gradle.process.JavaForkOptions;
-import org.gradle.util.Jvm;
-
-import java.io.File;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-public class DefaultJavaForkOptions extends DefaultProcessForkOptions implements JavaForkOptions {
-    private final Pattern sysPropPattern = Pattern.compile("-D(.+?)=(.*)");
-    private final Pattern noArgSysPropPattern = Pattern.compile("-D([^=]+)");
-    private final Pattern maxHeapPattern = Pattern.compile("-Xmx(.+)");
-    private final Pattern bootstrapPattern = Pattern.compile("-Xbootclasspath:(.+)");
-    private final List<Object> extraJvmArgs = new ArrayList<Object>();
-    private final Map<String, Object> systemProperties = new TreeMap<String, Object>();
-    private FileCollection bootstrapClasspath;
-    private String maxHeapSize;
-    private boolean assertionsEnabled;
-    private boolean debug;
-
-    public DefaultJavaForkOptions(FileResolver resolver) {
-        this(resolver, Jvm.current());
-    }
-
-    public DefaultJavaForkOptions(FileResolver resolver, Jvm jvm) {
-        super(resolver);
-        this.bootstrapClasspath = new PathResolvingFileCollection(resolver, null);
-        setExecutable(jvm.getJavaExecutable());
-    }
-
-    public List<String> getAllJvmArgs() {
-        List<String> args = new ArrayList<String>();
-        args.addAll(getJvmArgs());
-        for (Map.Entry<String, Object> entry : getSystemProperties().entrySet()) {
-            if (entry.getValue() != null) {
-                args.add(String.format("-D%s=%s", entry.getKey(), entry.getValue().toString()));
-            } else {
-                args.add(String.format("-D%s", entry.getKey()));
-            }
-        }
-        if (maxHeapSize != null) {
-            args.add(String.format("-Xmx%s", maxHeapSize));
-        }
-        FileCollection bootstrapClasspath = getBootstrapClasspath();
-        if (!bootstrapClasspath.isEmpty()) {
-            args.add(String.format("-Xbootclasspath:%s", bootstrapClasspath.getAsPath()));
-        }
-        if (assertionsEnabled) {
-            args.add("-ea");
-        }
-        if (debug) {
-            args.add("-Xdebug");
-            args.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005");
-        }
-        return args;
-    }
-
-    public void setAllJvmArgs(Iterable<?> arguments) {
-        systemProperties.clear();
-        maxHeapSize = null;
-        extraJvmArgs.clear();
-        assertionsEnabled = false;
-        jvmArgs(arguments);
-    }
-
-    public List<String> getJvmArgs() {
-        List<String> args = new ArrayList<String>();
-        for (Object extraJvmArg : extraJvmArgs) {
-            args.add(extraJvmArg.toString());
-        }
-        return args;
-    }
-
-    public void setJvmArgs(Iterable<?> arguments) {
-        extraJvmArgs.clear();
-        jvmArgs(arguments);
-    }
-
-    public JavaForkOptions jvmArgs(Iterable<?> arguments) {
-        for (Object argument : arguments) {
-            String argStr = argument.toString();
-            Matcher matcher = sysPropPattern.matcher(argStr);
-            if (matcher.matches()) {
-                systemProperties.put(matcher.group(1), matcher.group(2));
-                continue;
-            }
-            matcher = noArgSysPropPattern.matcher(argStr);
-            if (matcher.matches()) {
-                systemProperties.put(matcher.group(1), null);
-                continue;
-            }
-            matcher = maxHeapPattern.matcher(argStr);
-            if (matcher.matches()) {
-                maxHeapSize = matcher.group(1);
-                continue;
-            }
-            matcher = bootstrapPattern.matcher(argStr);
-            if (matcher.matches()) {
-                setBootstrapClasspath(getResolver().resolveFiles((Object[]) matcher.group(1).split(Pattern.quote(File.pathSeparator))));
-                continue;
-            }
-            if (argStr.equals("-ea") || argStr.equals("-enableassertions")) {
-                assertionsEnabled = true;
-                continue;
-            }
-            if (argStr.equals("-da") || argStr.equals("-disableassertions")) {
-                assertionsEnabled = false;
-                continue;
-            }
-
-            extraJvmArgs.add(argument);
-        }
-        
-        boolean xdebugFound = false;
-        boolean xrunjdwpFound = false;
-        Set<Object> matches = new HashSet<Object>();
-        for (Object extraJvmArg : extraJvmArgs) {
-            if (extraJvmArg.toString().equals("-Xdebug")) {
-                xdebugFound = true;
-                matches.add(extraJvmArg);
-            }
-            else if (extraJvmArg.toString().equals("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005")) {
-                xrunjdwpFound = true;
-                matches.add(extraJvmArg);
-            }
-        }
-        if (xdebugFound && xrunjdwpFound) {
-            debug = true;
-            extraJvmArgs.removeAll(matches);
-        }else {
-            debug = false;
-        }
-
-        return this;
-    }
-
-    public JavaForkOptions jvmArgs(Object... arguments) {
-        jvmArgs(Arrays.asList(arguments));
-        return this;
-    }
-
-    public Map<String, Object> getSystemProperties() {
-        return systemProperties;
-    }
-
-    public void setSystemProperties(Map<String, ?> properties) {
-        systemProperties.clear();
-        systemProperties.putAll(properties);
-    }
-
-    public JavaForkOptions systemProperties(Map<String, ?> properties) {
-        systemProperties.putAll(properties);
-        return this;
-    }
-
-    public JavaForkOptions systemProperty(String name, Object value) {
-        systemProperties.put(name, value);
-        return this;
-    }
-
-    public FileCollection getBootstrapClasspath() {
-        return bootstrapClasspath;
-    }
-
-    public void setBootstrapClasspath(FileCollection classpath) {
-        this.bootstrapClasspath = classpath;
-    }
-
-    public JavaForkOptions bootstrapClasspath(Object... classpath) {
-        this.bootstrapClasspath = this.bootstrapClasspath.plus(getResolver().resolveFiles(classpath));
-        return this;
-    }
-
-    public String getMaxHeapSize() {
-        return maxHeapSize;
-    }
-
-    public void setMaxHeapSize(String heapSize) {
-        this.maxHeapSize = heapSize;
-    }
-
-    public boolean getEnableAssertions() {
-        return assertionsEnabled;
-    }
-
-    public void setEnableAssertions(boolean enabled) {
-        assertionsEnabled = enabled;
-    }
-
-    public boolean getDebug() {
-        return debug;
-    }
-
-    public void setDebug(boolean enabled) {
-        debug = enabled;
-    }
-
-    public JavaForkOptions copyTo(JavaForkOptions target) {
-        super.copyTo(target);
-        target.setJvmArgs(extraJvmArgs);
-        target.setSystemProperties(systemProperties);
-        target.setMaxHeapSize(maxHeapSize);
-        target.setBootstrapClasspath(bootstrapClasspath);
-        target.setEnableAssertions(assertionsEnabled);
-        target.setDebug(debug);
-        return this;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultProcessForkOptions.java b/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultProcessForkOptions.java
deleted file mode 100644
index a7dd019..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/DefaultProcessForkOptions.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.process.internal;
-
-import org.gradle.api.internal.file.FileResolver;
-import org.gradle.api.internal.file.FileSource;
-import org.gradle.process.ProcessForkOptions;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-public class DefaultProcessForkOptions implements ProcessForkOptions {
-    private final FileResolver resolver;
-    private Object executable;
-    private FileSource workingDir;
-    private final Map<String, Object> environment = new HashMap<String, Object>(System.getenv());
-
-    public DefaultProcessForkOptions(FileResolver resolver) {
-        this.resolver = resolver;
-        workingDir = resolver.resolveLater(new File(".").getAbsoluteFile());
-    }
-
-    protected FileResolver getResolver() {
-        return resolver;
-    }
-
-    public String getExecutable() {
-        return executable == null ? null : executable.toString();
-    }
-
-    public void setExecutable(Object executable) {
-        this.executable = executable;
-    }
-
-    public ProcessForkOptions executable(Object executable) {
-        setExecutable(executable);
-        return this;
-    }
-
-    public File getWorkingDir() {
-        return workingDir.get();
-    }
-
-    public void setWorkingDir(Object dir) {
-        this.workingDir = resolver.resolveLater(dir);
-    }
-
-    public ProcessForkOptions workingDir(Object dir) {
-        setWorkingDir(dir);
-        return this;
-    }
-
-    public Map<String, Object> getEnvironment() {
-        return environment;
-    }
-
-    public Map<String, String> getActualEnvironment() {
-        Map<String, String> actual = new HashMap<String, String>();
-        for (Map.Entry<String, Object> entry : environment.entrySet()) {
-            actual.put(entry.getKey(), String.valueOf(entry.getValue().toString()));
-        }
-        return actual;
-    }
-
-    public void setEnvironment(Map<String, ?> environmentVariables) {
-        environment.clear();
-        environment.putAll(environmentVariables);
-    }
-
-    public ProcessForkOptions environment(String name, Object value) {
-        environment.put(name, value);
-        return this;
-    }
-
-    public ProcessForkOptions environment(Map<String, ?> environmentVariables) {
-        environment.putAll(environmentVariables);
-        return this;
-    }
-
-    public ProcessForkOptions copyTo(ProcessForkOptions target) {
-        target.setExecutable(executable);
-        target.setWorkingDir(workingDir);
-        target.setEnvironment(environment);
-        return this;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleShutdownHookAction.java b/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleShutdownHookAction.java
deleted file mode 100644
index 6529fbf..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/process/internal/ExecHandleShutdownHookAction.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.process.internal;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Terminates the external running 'sub' process when the Gradle process is being cancelled.
- *
- * @author Tom Eyckmans
- */
-public class ExecHandleShutdownHookAction implements Runnable {
-
-    private static final Logger LOGGER = LoggerFactory.getLogger(ExecHandleShutdownHookAction.class);
-    private final ExecHandle execHandle;
-
-    public ExecHandleShutdownHookAction(ExecHandle execHandle) {
-        if (execHandle == null) {
-            throw new IllegalArgumentException("execHandle is null!");
-        }
-
-        this.execHandle = execHandle;
-    }
-
-    public void run() {
-        try {
-            execHandle.abort();
-        }
-        catch ( Throwable t ) {
-            LOGGER.error("failed to abort " + execHandle, t);
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/ProfileListener.java b/subprojects/gradle-core/src/main/groovy/org/gradle/profile/ProfileListener.java
deleted file mode 100644
index 4df4563..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/profile/ProfileListener.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.profile;
-
-import org.gradle.BuildListener;
-import org.gradle.BuildResult;
-import org.gradle.api.*;
-import org.gradle.api.execution.TaskExecutionListener;
-import org.gradle.api.initialization.Settings;
-import org.gradle.api.invocation.Gradle;
-import org.gradle.api.tasks.TaskState;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-public class ProfileListener implements BuildListener, ProjectEvaluationListener, TaskExecutionListener {
-    private BuildProfile buildProfile;
-    private static final SimpleDateFormat FILE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
-    private long profileStarted;
-
-    public ProfileListener(long profileStarted) {
-        this.profileStarted = profileStarted;
-    }
-
-    // BuildListener
-    public void buildStarted(Gradle gradle) {
-        buildProfile = new BuildProfile(gradle);
-        buildProfile.setBuildStarted(System.currentTimeMillis());
-        buildProfile.setProfilingStarted(profileStarted);
-    }
-
-    public void settingsEvaluated(Settings settings) {
-        buildProfile.setSettingsEvaluated(System.currentTimeMillis());
-    }
-
-    public void projectsLoaded(Gradle gradle) {
-        buildProfile.setProjectsLoaded(System.currentTimeMillis());
-    }
-
-    public void projectsEvaluated(Gradle gradle) {
-        buildProfile.setProjectsEvaluated(System.currentTimeMillis());
-    }
-
-    public void buildFinished(BuildResult result) {
-        buildProfile.setBuildFinished(System.currentTimeMillis());
-
-        HTMLProfileReport report = new HTMLProfileReport(buildProfile);
-        File file = new File(result.getGradle().getRootProject().getBuildDir(), "reports/profile/profile-"+
-                FILE_DATE_FORMAT.format(new Date(profileStarted)) + ".html" );
-        file.getParentFile().mkdirs();
-        try {
-            file.createNewFile();
-            report.writeTo(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    // ProjectEvaluationListener
-    public void beforeEvaluate(Project project) {
-        buildProfile.getProjectProfile(project).setBeforeEvaluate(System.currentTimeMillis());
-    }
-
-    public void afterEvaluate(Project project, ProjectState state) {
-        ProjectProfile projectProfile = buildProfile.getProjectProfile(project);
-        projectProfile.setAfterEvaluate(System.currentTimeMillis());
-        projectProfile.setState(state);
-    }
-
-
-    // TaskExecutionListener
-    public void beforeExecute(Task task) {
-        Project project = task.getProject();
-        ProjectProfile projectProfile = buildProfile.getProjectProfile(project);
-        projectProfile.getTaskProfile(task).setStart(System.currentTimeMillis());
-    }
-
-    public void afterExecute(Task task, TaskState state) {
-        Project project = task.getProject();
-        ProjectProfile projectProfile = buildProfile.getProjectProfile(project);
-        TaskProfile taskProfile = projectProfile.getTaskProfile(task);
-        taskProfile.setFinish(System.currentTimeMillis());
-        taskProfile.setState(state);
-    }
-}
-
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ClasspathUtil.java b/subprojects/gradle-core/src/main/groovy/org/gradle/util/ClasspathUtil.java
deleted file mode 100644
index c65e8da..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/util/ClasspathUtil.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.util;
-
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @author Hans Dockter
- */
-public class ClasspathUtil {
-    public static void addUrl(URLClassLoader classLoader, Iterable<URL> classpathElements) {
-        try {
-            Method method = URLClassLoader.class.getDeclaredMethod("addURL", URL.class);
-            method.setAccessible(true);
-            for (URL classpathElement : classpathElements) {
-                method.invoke(classLoader, classpathElement);
-            }
-        }
-        catch (Throwable t) {
-            t.printStackTrace();
-            throw new RuntimeException("Error, could not add URL to system classloader", t);
-        }
-    }
-
-    public static List<URL> getClasspath(ClassLoader classLoader) {
-        List<URL> implementationClassPath = new ArrayList<URL>();
-        for ( ClassLoader cl = classLoader;
-                cl != ClassLoader.getSystemClassLoader().getParent(); cl = cl.getParent()) {
-            if (cl instanceof URLClassLoader) {
-                implementationClassPath.addAll(Arrays.asList(((URLClassLoader) cl).getURLs()));
-            }
-        }
-        return implementationClassPath;
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/GFileUtils.java b/subprojects/gradle-core/src/main/groovy/org/gradle/util/GFileUtils.java
deleted file mode 100644
index 0ab3f3a..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/util/GFileUtils.java
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.util;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.LineIterator;
-import org.apache.commons.io.filefilter.IOFileFilter;
-import org.gradle.api.UncheckedIOException;
-
-import java.io.*;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.*;
-import java.util.zip.Checksum;
-
-/**
- * @author Hans Dockter
- */
-public class GFileUtils {
-
-    public static final String FILE_SEPARATOR = System.getProperty("file.separator");
-
-    public static FileInputStream openInputStream(File file) {
-        try {
-            return FileUtils.openInputStream(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static FileOutputStream openOutputStream(File file) {
-        try {
-            return FileUtils.openOutputStream(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static String byteCountToDisplaySize(long size) {
-        return FileUtils.byteCountToDisplaySize(size);
-    }
-
-    public static void touch(File file) {
-        try {
-            FileUtils.touch(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static File[] convertFileCollectionToFileArray(Collection files) {
-        return FileUtils.convertFileCollectionToFileArray(files);
-    }
-
-    public static Collection listFiles(File directory, IOFileFilter fileFilter, IOFileFilter dirFilter) {
-        return FileUtils.listFiles(directory, fileFilter, dirFilter);
-    }
-
-    public static Iterator iterateFiles(File directory, IOFileFilter fileFilter, IOFileFilter dirFilter) {
-        return FileUtils.iterateFiles(directory, fileFilter, dirFilter);
-    }
-
-    public static Collection listFiles(File directory, String[] extensions, boolean recursive) {
-        return FileUtils.listFiles(directory, extensions, recursive);
-    }
-
-    public static Iterator iterateFiles(File directory, String[] extensions, boolean recursive) {
-        return FileUtils.iterateFiles(directory, extensions, recursive);
-    }
-
-    public static boolean contentEquals(File file1, File file2) {
-        try {
-            return FileUtils.contentEquals(file1, file2);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static File toFile(String... filePathParts) {
-        final StringWriter filePathBuffer = new StringWriter();
-
-        for (int i = 0; i < filePathParts.length; i++) {
-            filePathBuffer.write(filePathParts[i]);
-            if (i + 1 < filePathParts.length) {
-                filePathBuffer.write(FILE_SEPARATOR);
-            }
-        }
-
-        return new File(filePathBuffer.toString());
-    }
-
-    public static File toFile(URL url) {
-        return FileUtils.toFile(url);
-    }
-
-    public static File[] toFiles(URL[] urls) {
-        return FileUtils.toFiles(urls);
-    }
-
-    public static List<String> toPaths(Collection<File> files) {
-        List<String> paths = new ArrayList<String>();
-        for (File file : files) {
-            paths.add(file.getAbsolutePath());
-        }
-        return paths;
-    }
-
-    public static List<URL> toURLs(Iterable<File> files) {
-        List<URL> urls = new ArrayList<URL>();
-        for (File file : files) {
-            try {
-                urls.add(file.toURI().toURL());
-            } catch (MalformedURLException e) {
-                throw new UncheckedIOException(e);
-            }
-        }
-        return urls;
-    }
-
-    public static URL[] toURLArray(Collection<File> files) {
-        return toURLs(files.toArray(new File[files.size()]));
-    }
-
-    public static URL[] toURLs(File[] files) {
-        try {
-            return FileUtils.toURLs(files);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyFileToDirectory(File srcFile, File destDir) {
-        try {
-            FileUtils.copyFileToDirectory(srcFile, destDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) {
-        try {
-            FileUtils.copyFileToDirectory(srcFile, destDir, preserveFileDate);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyFile(File srcFile, File destFile) {
-        try {
-            FileUtils.copyFile(srcFile, destFile);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyFile(File srcFile, File destFile, boolean preserveFileDate) {
-        try {
-            FileUtils.copyFile(srcFile, destFile, preserveFileDate);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyDirectoryToDirectory(File srcDir, File destDir) {
-        try {
-            FileUtils.copyDirectoryToDirectory(srcDir, destDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyDirectory(File srcDir, File destDir) {
-        try {
-            FileUtils.copyDirectory(srcDir, destDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyDirectory(File srcDir, File destDir, boolean preserveFileDate) {
-        try {
-            FileUtils.copyDirectory(srcDir, destDir, preserveFileDate);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyDirectory(File srcDir, File destDir, FileFilter filter) {
-        try {
-            FileUtils.copyDirectory(srcDir, destDir, filter);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyDirectory(File srcDir, File destDir, FileFilter filter, boolean preserveFileDate) {
-        try {
-            FileUtils.copyDirectory(srcDir, destDir, filter, preserveFileDate);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void copyURLToFile(URL source, File destination) {
-        try {
-            FileUtils.copyURLToFile(source, destination);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void deleteDirectory(File directory) {
-        try {
-            FileUtils.deleteDirectory(directory);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static boolean deleteQuietly(File file) {
-        return FileUtils.deleteQuietly(file);
-    }
-
-    public static void cleanDirectory(File directory) {
-        try {
-            FileUtils.cleanDirectory(directory);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static boolean waitFor(File file, int seconds) {
-        return FileUtils.waitFor(file, seconds);
-    }
-
-    public static String readFileToString(File file, String encoding) {
-        try {
-            return FileUtils.readFileToString(file, encoding);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static String readFileToString(File file) {
-        try {
-            return FileUtils.readFileToString(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static byte[] readFileToByteArray(File file) {
-        try {
-            return FileUtils.readFileToByteArray(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static List readLines(File file, String encoding) {
-        try {
-            return FileUtils.readLines(file, encoding);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static List readLines(File file) {
-        try {
-            return FileUtils.readLines(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static LineIterator lineIterator(File file, String encoding) {
-        try {
-            return FileUtils.lineIterator(file, encoding);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static LineIterator lineIterator(File file) {
-        try {
-            return FileUtils.lineIterator(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeStringToFile(File file, String data, String encoding) {
-        try {
-            FileUtils.writeStringToFile(file, data, encoding);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeStringToFile(File file, String data) {
-        try {
-            FileUtils.writeStringToFile(file, data);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeByteArrayToFile(File file, byte[] data) {
-        try {
-            FileUtils.writeByteArrayToFile(file, data);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeLines(File file, String encoding, Collection lines) {
-        try {
-            FileUtils.writeLines(file, encoding, lines);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeLines(File file, Collection lines) {
-        try {
-            FileUtils.writeLines(file, lines);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeLines(File file, String encoding, Collection lines, String lineEnding) {
-        try {
-            FileUtils.writeLines(file, encoding, lines, lineEnding);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void writeLines(File file, Collection lines, String lineEnding) {
-        try {
-            FileUtils.writeLines(file, lines, lineEnding);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void forceDelete(File file) {
-        try {
-            FileUtils.forceDelete(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void forceDeleteOnExit(File file) {
-        try {
-            FileUtils.forceDeleteOnExit(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void forceMkdir(File directory) {
-        try {
-            FileUtils.forceMkdir(directory);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static long sizeOfDirectory(File directory) {
-        return FileUtils.sizeOfDirectory(directory);
-    }
-
-    public static boolean isFileNewer(File file, File reference) {
-        return FileUtils.isFileNewer(file, reference);
-    }
-
-    public static boolean isFileNewer(File file, Date date) {
-        return FileUtils.isFileNewer(file, date);
-    }
-
-    public static boolean isFileNewer(File file, long timeMillis) {
-        return FileUtils.isFileNewer(file, timeMillis);
-    }
-
-    public static boolean isFileOlder(File file, File reference) {
-        return FileUtils.isFileOlder(file, reference);
-    }
-
-    public static boolean isFileOlder(File file, Date date) {
-        return FileUtils.isFileOlder(file, date);
-    }
-
-    public static boolean isFileOlder(File file, long timeMillis) {
-        return FileUtils.isFileOlder(file, timeMillis);
-    }
-
-    public static long checksumCRC32(File file) {
-        try {
-            return FileUtils.checksumCRC32(file);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static Checksum checksum(File file, Checksum checksum) {
-        try {
-            return FileUtils.checksum(file, checksum);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void moveDirectory(File srcDir, File destDir) {
-        try {
-            FileUtils.moveDirectory(srcDir, destDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void moveDirectoryToDirectory(File src, File destDir, boolean createDestDir) {
-        try {
-            FileUtils.moveDirectoryToDirectory(src, destDir, createDestDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void moveFile(File srcFile, File destFile) {
-        try {
-            FileUtils.moveFile(srcFile, destFile);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void moveFileToDirectory(File srcFile, File destDir, boolean createDestDir) {
-        try {
-            FileUtils.moveFileToDirectory(srcFile, destDir, createDestDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static void moveToDirectory(File src, File destDir, boolean createDestDir) {
-        try {
-            FileUtils.moveToDirectory(src, destDir, createDestDir);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static File canonicalise(File src) {
-        try {
-            return src.getCanonicalFile();
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public static List<File> getSubDirectories(File directory) {
-        final List<File> subDirectories = new ArrayList<File>();
-
-        addSubDirectories(directory, subDirectories);
-
-        return subDirectories;
-    }
-
-    public static void addSubDirectories(final File directory, final Collection<File> subDirectories) {
-        final File[] subFiles = directory.listFiles();
-
-        if (subFiles != null && subFiles.length > 0) {
-            for (final File subFile : subFiles) {
-                if (subFile.isDirectory()) {
-                    subDirectories.add(subFile);
-                    addSubDirectories(subFile, subDirectories);
-                }
-                // ignore files
-            }
-        }
-    }
-
-    public static List<File> getSubFiles(File directory) {
-        final List<File> subFilesList = new ArrayList<File>();
-
-        final File[] subFiles = directory.listFiles();
-        if (subFiles != null && subFiles.length > 0) {
-            for (final File subFile : subFiles) {
-                if (subFile.isFile()) {
-                    subFilesList.add(subFile);
-                }
-            }
-        }
-
-        return subFilesList;
-    }
-
-    public static boolean createDirectoriesWhenNotExistent(File... directories) {
-        if (directories != null && directories.length > 0) {
-            boolean directoriesCreated = true;
-            int directoriesIndex = 0;
-
-            while (directoriesCreated && directoriesIndex < directories.length) {
-                final File currentDirectory = directories[directoriesIndex];
-
-                if (!currentDirectory.exists()) {
-                    directoriesCreated = currentDirectory.mkdirs();
-                }
-
-                directoriesIndex++;
-            }
-
-            return directoriesCreated;
-        } else {
-            return true;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/GradleVersion.java b/subprojects/gradle-core/src/main/groovy/org/gradle/util/GradleVersion.java
deleted file mode 100644
index a31e588..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/util/GradleVersion.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.util;
-
-import groovy.lang.GroovySystem;
-import org.apache.ivy.Ivy;
-import org.apache.tools.ant.Main;
-import org.gradle.api.InvalidUserDataException;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author Hans Dockter
- * @author Russel Winder
- */
-public class GradleVersion implements Comparable<GradleVersion> {
-    private final static String BUILD_TIME = "buildTime";
-    private final static String VERSION = "version";
-    private final static String FILE_NAME = "/org/gradle/version.properties";
-    public final static String URL = "http://www.gradle.org";
-    private final static Pattern VERSION_PATTERN = Pattern.compile("(\\d+(\\.\\d+)+)(-(\\p{Alpha}+)-(\\d+))?(-(\\d{14}\\+\\d{4}))?");
-
-    private final String version;
-    private final String buildTime;
-    private final Long snapshot;
-    private final String versionPart;
-    private final Stage stage;
-
-    public GradleVersion() {
-        this(GUtil.loadProperties(GradleVersion.class.getResourceAsStream(FILE_NAME)));
-    }
-
-    public GradleVersion(String version) {
-        this(properties(version));
-    }
-
-    private static Properties properties(String version) {
-        Properties properties = new Properties();
-        properties.setProperty(VERSION, version);
-        return properties;
-    }
-
-    private GradleVersion(Properties properties) {
-        version = properties.getProperty(VERSION);
-        buildTime = properties.getProperty(BUILD_TIME);
-        Matcher matcher = VERSION_PATTERN.matcher(version);
-        if (!matcher.matches()) {
-            throw new InvalidUserDataException(String.format("Unexpected Gradle version '%s'.", version));
-        }
-        versionPart = matcher.group(1);
-
-        if (matcher.group(3) != null) {
-            int stageNumber = 0;
-            if (matcher.group(4).equals("milestone")) {
-                stageNumber = 1;
-            } else if (matcher.group(4).equals("preview")) {
-                stageNumber = 2;
-            } else if (matcher.group(4).equals("rc")) {
-                stageNumber = 3;
-            }
-            stage = new Stage(stageNumber, Integer.parseInt(matcher.group(5)));
-        } else {
-            stage = null;
-        }
-
-        if (matcher.group(7) != null) {
-            try {
-                snapshot = new SimpleDateFormat("yyyyMMddHHmmssZ").parse(matcher.group(7)).getTime();
-            } catch (ParseException e) {
-                throw UncheckedException.asUncheckedException(e);
-            }
-        } else {
-            snapshot = null;
-        }
-    }
-
-    @Override
-    public String toString() {
-        return String.format("Gradle %s", version);
-    }
-
-    public String getVersion() {
-        return version;
-    }
-
-    public String getBuildTime() {
-        return buildTime;
-    }
-
-    public boolean isSnapshot() {
-        return snapshot != null;
-    }
-
-    public int compareTo(GradleVersion gradleVersion) {
-        String[] majorVersionParts = versionPart.split("\\.");
-        String[] otherMajorVersionParts = gradleVersion.versionPart.split("\\.");
-        for (int i = 0; i < majorVersionParts.length && i < otherMajorVersionParts.length; i++) {
-            int part = Integer.parseInt(majorVersionParts[i]);
-            int otherPart = Integer.parseInt(otherMajorVersionParts[i]);
-            if (part > otherPart) {
-                return 1;
-            }
-            if (otherPart > part) {
-                return -1;
-            }
-        }
-        if (majorVersionParts.length > otherMajorVersionParts.length) {
-            return 1;
-        }
-        if (majorVersionParts.length < otherMajorVersionParts.length) {
-            return -1;
-        }
-
-        if (stage != null && gradleVersion.stage != null) {
-            int diff = stage.compareTo(gradleVersion.stage);
-            if (diff != 0) {
-                return diff;
-            }
-        }
-        if (stage == null && gradleVersion.stage != null) {
-            return 1;
-        }
-        if (stage != null && gradleVersion.stage == null) {
-            return -1;
-        }
-
-        if (snapshot != null && gradleVersion.snapshot != null) {
-            return snapshot.compareTo(gradleVersion.snapshot);
-        }
-        if (snapshot == null && gradleVersion.snapshot != null) {
-            return 1;
-        }
-        if (snapshot != null && gradleVersion.snapshot == null) {
-            return -1;
-        }
-
-        return 0;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (o == this) {
-            return true;
-        }
-        if (o == null || o.getClass() != getClass()) {
-            return false;
-        }
-        GradleVersion other = (GradleVersion) o;
-        return version.equals(other.version);
-    }
-
-    @Override
-    public int hashCode() {
-        return version.hashCode();
-    }
-
-    public String prettyPrint() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("\n------------------------------------------------------------\nGradle ");
-        sb.append(getVersion());
-        sb.append("\n------------------------------------------------------------\n\nGradle build time: ");
-        sb.append(getBuildTime());
-        sb.append("\nGroovy: ");
-        sb.append(GroovySystem.getVersion());
-        sb.append("\nAnt: ");
-        sb.append(Main.getAntVersion());
-        sb.append("\nIvy: ");
-        sb.append(Ivy.getIvyVersion());
-        sb.append("\nJVM: ");
-        sb.append(Jvm.current());
-        sb.append("\nOS: ");
-        sb.append(OperatingSystem.current());
-        sb.append("\n");
-        return sb.toString();
-    }
-
-    private static final class Stage implements Comparable<Stage> {
-        final int stage;
-        final int number;
-
-        private Stage(int stage, int number) {
-            this.stage = stage;
-            this.number = number;
-        }
-
-        public int compareTo(Stage other) {
-            if (stage > other.stage) {
-                return 1;
-            }
-            if (stage < other.stage) {
-                return -1;
-            }
-            if (number > other.number) {
-                return 1;
-            }
-            if (number < other.number) {
-                return -1;
-            }
-            return 0;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/Jvm.java b/subprojects/gradle-core/src/main/groovy/org/gradle/util/Jvm.java
deleted file mode 100644
index 5f695e3..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/util/Jvm.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.util;
-
-import org.apache.tools.ant.util.JavaEnvUtils;
-
-import java.io.File;
-
-public class Jvm {
-    public static Jvm current() {
-        return new Jvm();
-    }
-
-    Jvm() {
-    }
-
-    @Override
-    public String toString() {
-        return String.format("%s (%s %s)", System.getProperty("java.version"), System.getProperty("java.vm.vendor"), System.getProperty("java.vm.version"));
-    }
-
-    public File getJavaExecutable() {
-        return new File(JavaEnvUtils.getJdkExecutable("java"));
-    }
-
-    public File getJavadocExecutable() {
-        return new File(JavaEnvUtils.getJdkExecutable("javadoc"));
-    }
-
-    public boolean isJava5Compatible() {
-        return System.getProperty("java.version").startsWith("1.5") || isJava6Compatible();
-    }
-
-    public boolean isJava6Compatible() {
-        return System.getProperty("java.version").startsWith("1.6");
-    }
-
-    public File getToolsJar() {
-        File javaHome = new File(System.getProperty("java.home"));
-        File toolsJar = new File(javaHome, "/lib/tools.jar");
-        if (toolsJar.exists()) {
-            return toolsJar;
-        }
-        if (javaHome.getName().equalsIgnoreCase("jre")) {
-            javaHome = javaHome.getParentFile();
-            toolsJar = new File(javaHome + "/lib/tools.jar");
-        }
-        if (!toolsJar.exists()) {
-            return null;
-        }
-        return toolsJar;
-    }
-
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/NameMatcher.java b/subprojects/gradle-core/src/main/groovy/org/gradle/util/NameMatcher.java
deleted file mode 100644
index a9474ed..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/util/NameMatcher.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.util;
-
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.apache.commons.lang.StringUtils;
-
-/**
- * Selects a single item from a list of candidates based on a camel-case pattern.
- */
-public class NameMatcher {
-    private final SortedSet<String> matches = new TreeSet<String>();
-    private final Set<String> candidates = new TreeSet<String>();
-    private String pattern;
-
-    /**
-     * Locates the best match for the given pattern in the given set of candidate items.
-     *
-     * @return The matching item if exactly 1 match found, null if no matches or multiple matches.
-     */
-    public <T> T find(String pattern, Map<String, ? extends T> items) {
-        String name = find(pattern, items.keySet());
-        if (name != null) {
-            return items.get(name);
-        }
-        return null;
-    }
-    
-    /**
-     * Locates the best match for the given pattern in the given set of candidate items.
-     *
-     * @return The match if exactly 1 match found, null if no matches or multiple matches.
-     */
-    public String find(String pattern, Collection<String> items) {
-        this.pattern = pattern;
-        matches.clear();
-        candidates.clear();
-
-        if (items.contains(pattern)) {
-            matches.add(pattern);
-            return pattern;
-        }
-
-        if (pattern.length() == 0) {
-            return null;
-        }
-
-        Pattern camelCasePattern = getPatternForName(pattern);
-        Pattern normalisedCamelCasePattern = Pattern.compile(camelCasePattern.pattern(), Pattern.CASE_INSENSITIVE);
-        String normalisedPattern = pattern.toUpperCase();
-
-        Set<String> matches1 = new TreeSet<String>();
-        Set<String> matches2 = new TreeSet<String>();
-
-        for (String candidate : items) {
-            if (camelCasePattern.matcher(candidate).matches()) {
-                matches1.add(candidate);
-                continue;
-            }
-            if (normalisedCamelCasePattern.matcher(candidate).lookingAt()) {
-                matches2.add(candidate);
-                continue;
-            }
-            if (StringUtils.getLevenshteinDistance(normalisedPattern, candidate.toUpperCase()) <= Math.min(3,
-                    pattern.length() / 2)) {
-                candidates.add(candidate);
-            }
-        }
-
-        if (!matches1.isEmpty()) {
-            matches.addAll(matches1);
-        }
-        else {
-            matches.addAll(matches2);
-        }
-
-        if (matches.size() == 1) {
-            return matches.first();
-        }
-
-        return null;
-    }
-
-    private static Pattern getPatternForName(String name) {
-        Pattern boundaryPattern = Pattern.compile("((^|\\p{Punct})\\p{javaLowerCase}+)|(\\p{javaUpperCase}\\p{javaLowerCase}*)");
-        Matcher matcher = boundaryPattern.matcher(name);
-        int pos = 0;
-        StringBuilder builder = new StringBuilder();
-        while (matcher.find()) {
-            String prefix = name.substring(pos, matcher.start());
-            if (prefix.length() > 0) {
-                builder.append(Pattern.quote(prefix));
-            }
-            builder.append(Pattern.quote(matcher.group()));
-            builder.append("[\\p{javaLowerCase}\\p{Digit}]*");
-            pos = matcher.end();
-        }
-        builder.append(Pattern.quote(name.substring(pos, name.length())));
-        return Pattern.compile(builder.toString());
-    }
-
-    /**
-     * Returns all matches, when there were more than 1.
-     *
-     * @return The matches. Returns an empty set when there are no matches.
-     */
-    public Set<String> getMatches() {
-        return matches;
-    }
-
-    /**
-     * Returns the potential matches, if any.
-     *
-     * @return The matches. Returns an empty set when there are no potential matches.
-     */
-    public Set<String> getCandidates() {
-        return candidates;
-    }
-
-    public String formatErrorMessage(String singularItemDescription, Object container) {
-        String capItem = StringUtils.capitalize(singularItemDescription);
-        if (!matches.isEmpty()) {
-            return String.format("%s '%s' is ambiguous in %s. Candidates are: %s.", capItem, pattern, container, GUtil.toString(matches));
-        }
-        if (!candidates.isEmpty()) {
-            return String.format("%s '%s' not found in %s. Some candidates are: %s.", capItem, pattern, container, GUtil.toString(candidates));
-        }
-        return String.format("%s '%s' not found in %s.", capItem, pattern, container);
-    }
-}
diff --git a/subprojects/gradle-core/src/main/groovy/org/gradle/util/WrapUtil.java b/subprojects/gradle-core/src/main/groovy/org/gradle/util/WrapUtil.java
deleted file mode 100644
index fd8c467..0000000
--- a/subprojects/gradle-core/src/main/groovy/org/gradle/util/WrapUtil.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.util;
-
-import java.util.*;
-
-/**
- * Common methods to wrap objects in generic collections.
- *
- */
-public class WrapUtil {
-    /**
-     * Wraps the given items in a mutable unordered set.
-     */
-    public static <T> Set<T> toSet(T... items) {
-        Set<T> coll = new HashSet<T>();
-        Collections.addAll(coll, items);
-        return coll;
-    }
-
-    /**
-     * Wraps the given items in a mutable ordered set.
-     */
-    public static <T> Set<T> toLinkedSet(T... items) {
-        Set<T> coll = new LinkedHashSet<T>();
-        Collections.addAll(coll, items);
-        return coll;
-    }
-
-    /**
-     * Wraps the given items in a mutable sorted set.
-     */
-    public static <T> SortedSet<T> toSortedSet(T... items) {
-        SortedSet<T> coll = new TreeSet<T>();
-        Collections.addAll(coll, items);
-        return coll;
-    }
-
-    /**
-     * Wraps the given items in a mutable sorted set using the given comparator.
-     */
-    public static <T> SortedSet<T> toSortedSet(Comparator<T> comp, T... items) {
-        SortedSet<T> coll = new TreeSet<T>(comp);
-        Collections.addAll(coll, items);
-        return coll;
-    }
-
-    /**
-     * Wraps the given items in a mutable list.
-     */
-    public static <T> List<T> toList(T... items) {
-        ArrayList<T> coll = new ArrayList<T>();
-        Collections.addAll(coll, items);
-        return coll;
-    }
-
-    /**
-     * Wraps the given items in a mutable list.
-     */
-    public static <T> List<T> toList(Iterable<? extends T> items) {
-        ArrayList<T> coll = new ArrayList<T>();
-        for (T item : items) {
-            coll.add(item);
-        }
-        return coll;
-    }
-
-    /**
-     * Wraps the given key and value in a mutable unordered map.
-     */
-    public static <K, V> Map<K, V> toMap(K key, V value) {
-        Map<K, V> map = new HashMap<K, V>();
-        map.put(key, value);
-        return map;
-    }
-
-    /**
-     * Wraps the given key and value in a mutable sorted map.
-     */
-    public static <K, V> SortedMap<K, V> toSortedMap(K key, V value) {
-        SortedMap<K, V> map = new TreeMap<K,V>();
-        map.put(key, value);
-        return map;
-    }
-
-    /**
-     * Wraps the given key and value in a mutable ordered map.
-     */
-    public static <K, V> Map<K, V> toLinkedMap(K key, V value) {
-        Map<K, V> map = new LinkedHashMap<K, V>();
-        map.put(key, value);
-        return map;
-    }
-
-    /**
-     * Wraps the given key and value in a mutable properties instance.
-     */
-    public static Properties toProperties(String key, String value) {
-        Properties props = new Properties();
-        props.setProperty(key, value);
-        return props;
-    }
-
-    public static <T> T[] toArray(T... items) {
-        return items;
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/StartParameterTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/StartParameterTest.groovy
deleted file mode 100644
index 1f654c3..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/StartParameterTest.groovy
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle
-
-import static org.gradle.util.Matchers.*
-
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction
-import org.gradle.api.logging.LogLevel
-import org.gradle.execution.BuildExecuter
-import org.gradle.execution.DefaultBuildExecuter
-import org.gradle.execution.DryRunBuildExecuter
-import org.gradle.groovy.scripts.ScriptSource
-import org.gradle.groovy.scripts.StringScriptSource
-import org.gradle.groovy.scripts.UriScriptSource
-import org.gradle.initialization.BuildFileProjectSpec
-import org.gradle.initialization.DefaultProjectSpec
-import org.gradle.initialization.ProjectDirectoryProjectSpec
-import org.gradle.initialization.ProjectSpec
-import org.gradle.util.TemporaryFolder
-import org.junit.Rule
-import org.junit.Test
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import org.gradle.util.SetSystemProperties
-
-/**
- * @author Hans Dockter
- */
-class StartParameterTest {
-    @Rule
-    public TemporaryFolder tmpDir = new TemporaryFolder();
-    @Rule
-    public SetSystemProperties systemProperties = new SetSystemProperties()
-
-    @Test public void testNewInstance() {
-        StartParameter testObj = new StartParameter()
-        testObj.settingsFile = 'settingsfile' as File
-        testObj.buildFile = 'buildfile' as File
-        testObj.taskNames = ['a']
-        testObj.projectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction([])
-        testObj.currentDir = new File('a')
-        testObj.searchUpwards = false
-        testObj.projectProperties = [a: 'a']
-        testObj.systemPropertiesArgs = [b: 'b']
-        testObj.gradleUserHomeDir = new File('b')
-        testObj.initScripts = [new File('init script'), new File("/path/to/another init script")]
-        testObj.cacheUsage = CacheUsage.ON
-        testObj.logLevel = LogLevel.WARN
-        testObj.colorOutput = false
-
-        StartParameter startParameter = testObj.newInstance()
-        assertEquals(testObj, startParameter)
-    }
-
-    @Test public void testDefaultValues() {
-        StartParameter parameter = new StartParameter();
-        assertThat(parameter.gradleUserHomeDir, equalTo(StartParameter.DEFAULT_GRADLE_USER_HOME))
-        assertThat(parameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
-
-        assertThat(parameter.buildFile, nullValue())
-        assertThat(parameter.settingsScriptSource, nullValue())
-
-        assertThat(parameter.logLevel, equalTo(LogLevel.LIFECYCLE))
-        assertTrue(parameter.colorOutput)
-        assertThat(parameter.taskNames, isEmpty())
-        assertThat(parameter.excludedTaskNames, isEmpty())
-        assertThat(parameter.projectProperties, isEmptyMap())
-        assertThat(parameter.systemPropertiesArgs, isEmptyMap())
-        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
-        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(parameter.currentDir)))
-        assertFalse(parameter.dryRun)
-    }
-
-    @Test public void testDefaultWithGradleUserHomeSystemProp() {
-        File gradleUserHome = tmpDir.file("someGradleUserHomePath")
-        System.setProperty(StartParameter.GRADLE_USER_HOME_PROPERTY_KEY, gradleUserHome.absolutePath)
-        StartParameter parameter = new StartParameter();
-        assertThat(parameter.gradleUserHomeDir, equalTo(gradleUserHome))
-    }
-
-    @Test public void testSetCurrentDir() {
-        StartParameter parameter = new StartParameter()
-        File dir = new File('current')
-        parameter.currentDir = dir
-
-        assertThat(parameter.currentDir, equalTo(dir.canonicalFile))
-        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(dir.canonicalFile)))
-    }
-
-    @Test public void testSetBuildFile() {
-        StartParameter parameter = new StartParameter()
-        File file = new File('test/build file')
-        parameter.buildFile = file
-
-        assertThat(parameter.buildFile, equalTo(file.canonicalFile))
-        assertThat(parameter.currentDir, equalTo(file.canonicalFile.parentFile))
-        assertThat(parameter.defaultProjectSelector, reflectionEquals(new BuildFileProjectSpec(file.canonicalFile)))
-    }
-
-    @Test public void testSetNullBuildFile() {
-        StartParameter parameter = new StartParameter()
-        parameter.buildFile = new File('test/build file')
-        parameter.buildFile = null
-
-        assertThat(parameter.buildFile, nullValue())
-        assertThat(parameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
-        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(parameter.currentDir)))
-        assertThat(parameter.initScripts, equalTo(Collections.emptyList()))
-    }
-
-    @Test public void testSetProjectDir() {
-        StartParameter parameter = new StartParameter()
-        File file = new File('test/project dir')
-        parameter.projectDir = file
-
-        assertThat(parameter.currentDir, equalTo(file.canonicalFile))
-        assertThat(parameter.defaultProjectSelector, reflectionEquals(new ProjectDirectoryProjectSpec(file.canonicalFile)))
-    }
-
-    @Test public void testSetNullProjectDir() {
-        StartParameter parameter = new StartParameter()
-        parameter.projectDir = new File('test/project dir')
-        parameter.projectDir = null
-
-        assertThat(parameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
-        assertThat(parameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(parameter.currentDir)))
-    }
-
-    @Test public void testSetSettingsFile() {
-        StartParameter parameter = new StartParameter()
-        File file = new File('some dir/settings file')
-        parameter.settingsFile = file
-
-        assertThat(parameter.currentDir, equalTo(file.canonicalFile.parentFile))
-        assertThat(parameter.settingsScriptSource, instanceOf(UriScriptSource.class))
-        assertThat(parameter.settingsScriptSource.resource.file, equalTo(file.canonicalFile))
-    }
-
-    @Test public void testSetNullSettingsFile() {
-        StartParameter parameter = new StartParameter()
-        parameter.settingsFile = null
-
-        assertThat(parameter.settingsScriptSource, nullValue())
-    }
-
-    @Test public void testSetSettingsScriptSource() {
-        StartParameter parameter = new StartParameter()
-        parameter.settingsFile = new File('settings file')
-
-        ScriptSource scriptSource = {} as ScriptSource
-
-        parameter.settingsScriptSource = scriptSource
-
-        assertThat(parameter.settingsScriptSource, sameInstance(scriptSource))
-    }
-
-    @Test public void testSetTaskNames() {
-        StartParameter parameter = new StartParameter()
-        parameter.taskNames = ['a', 'b']
-        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
-        assertThat(parameter.buildExecuter.delegate.names, equalTo(['a', 'b']))
-    }
-
-    @Test public void testSetTaskNamesUsesDefaultExecuter() {
-        StartParameter parameter = new StartParameter()
-
-        parameter.setBuildExecuter({} as BuildExecuter)
-        parameter.taskNames = []
-        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
-    }
-
-    @Test public void testSetExcludedTaskNames() {
-        StartParameter parameter = new StartParameter()
-        parameter.excludedTaskNames = ['a', 'b']
-        assertThat(parameter.buildExecuter, instanceOf(DefaultBuildExecuter))
-        assertThat(parameter.buildExecuter.excludedTaskNames, equalTo(['a', 'b'] as Set))
-    }
-
-    @Test public void testUseEmbeddedBuildFile() {
-        StartParameter parameter = new StartParameter();
-        parameter.useEmbeddedBuildFile("<content>")
-        assertThat(parameter.buildScriptSource, instanceOf(StringScriptSource.class))
-        assertThat(parameter.buildScriptSource.resource.text, equalTo("<content>"))
-        assertThat(parameter.settingsScriptSource, instanceOf(StringScriptSource.class))
-        assertThat(parameter.settingsScriptSource.resource.text, equalTo(""))
-        assertThat(parameter.searchUpwards, equalTo(false))
-    }
-
-    @Test public void testSetNullUserHomeDir() {
-        StartParameter parameter = new StartParameter()
-        parameter.gradleUserHomeDir = null
-        assertThat(parameter.gradleUserHomeDir, equalTo(StartParameter.DEFAULT_GRADLE_USER_HOME))
-    }
-
-    @Test public void testWrapsExecuterWhenDryRunIsTrue() {
-        StartParameter parameter = new StartParameter()
-        def originalExecuter = [:] as BuildExecuter
-        parameter.buildExecuter = originalExecuter
-        parameter.dryRun = true
-        assertThat(parameter.buildExecuter, instanceOf(DryRunBuildExecuter))
-        assertThat(parameter.buildExecuter.delegate, sameInstance(originalExecuter))
-        parameter.dryRun = false
-        assertThat(parameter.buildExecuter, sameInstance(originalExecuter))
-    }
-
-    @Test public void testNewBuild() {
-        StartParameter parameter = new StartParameter()
-
-        // Copied properties
-        parameter.gradleUserHomeDir = new File("home")
-        parameter.cacheUsage = CacheUsage.REBUILD
-        parameter.logLevel = LogLevel.DEBUG
-        parameter.colorOutput = false
-
-        // Non-copied
-        parameter.currentDir = new File("other")
-        parameter.buildFile = new File("build file")
-        parameter.settingsFile = new File("settings file")
-        parameter.taskNames = ['task1']
-        parameter.excludedTaskNames = ['excluded1']
-        parameter.defaultProjectSelector = [:] as ProjectSpec
-        parameter.dryRun = true
-
-        StartParameter newParameter = parameter.newBuild();
-
-        assertThat(newParameter, not(equalTo(parameter)));
-
-        assertThat(newParameter.gradleUserHomeDir, equalTo(parameter.gradleUserHomeDir));
-        assertThat(newParameter.cacheUsage, equalTo(parameter.cacheUsage));
-        assertThat(newParameter.logLevel, equalTo(parameter.logLevel));
-        assertThat(newParameter.colorOutput, equalTo(parameter.colorOutput));
-
-        assertThat(newParameter.buildFile, nullValue())
-        assertThat(newParameter.taskNames, isEmpty())
-        assertThat(newParameter.excludedTaskNames, isEmpty())
-        assertThat(newParameter.currentDir, equalTo(new File(System.getProperty("user.dir")).getCanonicalFile()))
-        assertThat(newParameter.defaultProjectSelector, reflectionEquals(new DefaultProjectSpec(newParameter.currentDir)))
-        assertFalse(newParameter.dryRun)
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultDomainObjectContainerTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultDomainObjectContainerTest.java
deleted file mode 100644
index 94aa023..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultDomainObjectContainerTest.java
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal;
-
-import org.gradle.api.Action;
-import org.gradle.api.DomainObjectCollection;
-import org.gradle.api.specs.Spec;
-import org.gradle.util.HelperUtil;
-import org.gradle.util.TestClosure;
-import org.hamcrest.Description;
-import org.jmock.Expectations;
-import org.jmock.api.Invocation;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.Iterator;
-
-import static org.gradle.util.WrapUtil.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
- at RunWith(JMock.class)
-public class DefaultDomainObjectContainerTest {
-    private final JUnit4Mockery context = new JUnit4Mockery();
-    private final DefaultDomainObjectContainer<CharSequence> container = new DefaultDomainObjectContainer<CharSequence>(CharSequence.class);
-
-    @Test
-    public void canGetAllDomainObjectsForEmptyCollection() {
-        assertTrue(container.getAll().isEmpty());
-    }
-
-    @Test
-    public void canGetAllDomainObjectsOrderedByOrderAdded() {
-        container.addObject("b");
-        container.addObject("a");
-        container.addObject("c");
-
-        assertThat(container.getAll(), equalTo(toLinkedSet((CharSequence) "b", "a", "c")));
-    }
-
-    @Test
-    public void canIterateOverEmptyCollection() {
-        Iterator<CharSequence> iterator = container.iterator();
-        assertFalse(iterator.hasNext());
-    }
-
-    @Test
-    public void canIterateOverDomainObjectsOrderedByOrderAdded() {
-        container.addObject("b");
-        container.addObject("a");
-        container.addObject("c");
-
-        Iterator<CharSequence> iterator = container.iterator();
-        assertThat(iterator.next(), equalTo((CharSequence) "b"));
-        assertThat(iterator.next(), equalTo((CharSequence) "a"));
-        assertThat(iterator.next(), equalTo((CharSequence) "c"));
-        assertFalse(iterator.hasNext());
-    }
-
-    @Test
-    public void canGetAllMatchingDomainObjectsOrderedByOrderAdded() {
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return !element.equals("b");
-            }
-        };
-
-        container.addObject("a");
-        container.addObject("b");
-        container.addObject("c");
-
-        assertThat(container.findAll(spec), equalTo(toLinkedSet((CharSequence) "a", "c")));
-    }
-
-    @Test
-    public void getAllMatchingDomainObjectsReturnsEmptySetWhenNoMatches() {
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return false;
-            }
-        };
-
-        container.addObject("a");
-
-        assertTrue(container.findAll(spec).isEmpty());
-    }
-
-    @Test
-    public void canGetFilteredCollectionContainingAllObjectsWhichMeetSpec() {
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return !element.equals("b");
-            }
-        };
-        TestClosure testClosure = new TestClosure() {
-            public Object call(Object param) {
-                return !param.equals("b");    
-            }
-        };
-
-        container.addObject("a");
-        container.addObject("b");
-        container.addObject("c");
-
-        assertThat(container.matching(spec).getAll(), equalTo(toLinkedSet((CharSequence) "a", "c")));
-        assertThat(container.matching(HelperUtil.toClosure(testClosure)).getAll(), equalTo(toLinkedSet((CharSequence) "a", "c")));
-    }
-
-    @Test
-    public void canGetFilteredCollectionContainingAllObjectsWhichHaveType() {
-        container.addObject("c");
-        container.addObject("a");
-        container.addObject(new StringBuffer("b"));
-
-        assertThat(container.withType(CharSequence.class).getAll(), equalTo(container.getAll()));
-        assertThat(container.withType(String.class).getAll(), equalTo(toLinkedSet("c", "a")));
-    }
-
-    @Test
-    public void filteredCollectionIsLive() {
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return !element.equals("a");
-            }
-        };
-
-        container.addObject("a");
-
-        DomainObjectCollection<CharSequence> filteredCollection = container.matching(spec);
-        assertTrue(filteredCollection.getAll().isEmpty());
-
-        container.addObject("b");
-        container.addObject("c");
-
-        assertThat(filteredCollection.getAll(), equalTo(toLinkedSet((CharSequence) "b", "c")));
-    }
-
-    @Test
-    public void filteredCollectionExecutesActionWhenMatchingObjectAdded() {
-        final Action<CharSequence> action = context.mock(Action.class);
-
-        context.checking(new Expectations() {{
-            one(action).execute("a");
-        }});
-
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return !element.equals("b");
-            }
-        };
-
-        container.matching(spec).whenObjectAdded(action);
-
-        container.addObject("a");
-        container.addObject("b");
-    }
-
-    @Test
-    public void filteredCollectionExecutesClosureWhenMatchingObjectAdded() {
-        final TestClosure closure = context.mock(TestClosure.class);
-
-        context.checking(new Expectations() {{
-            one(closure).call("a");
-        }});
-
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return !element.equals("b");
-            }
-        };
-
-        container.matching(spec).whenObjectAdded(HelperUtil.toClosure(closure));
-
-        container.addObject("a");
-        container.addObject("b");
-    }
-
-    @Test
-    public void canChainFilteredCollections() {
-        Spec<CharSequence> spec = new Spec<CharSequence>() {
-            public boolean isSatisfiedBy(CharSequence element) {
-                return !element.equals("b");
-            }
-        };
-        Spec<String> spec2 = new Spec<String>() {
-            public boolean isSatisfiedBy(String element) {
-                return !element.equals("c");
-            }
-        };
-
-        container.addObject("a");
-        container.addObject("b");
-        container.addObject("c");
-        container.addObject(new StringBuffer("d"));
-
-        DomainObjectCollection<String> collection = container.matching(spec).withType(String.class).matching(spec2);
-        assertThat(collection.getAll(), equalTo(toSet("a")));
-    }
-
-    @Test
-    public void callsActionWhenObjectAdded() {
-        final Action<CharSequence> action = context.mock(Action.class);
-
-        context.checking(new Expectations() {{
-            one(action).execute("a");
-        }});
-
-        container.whenObjectAdded(action);
-        container.addObject("a");
-    }
-
-    @Test
-    public void callsClosureWhenObjectAdded() {
-        final TestClosure closure = context.mock(TestClosure.class);
-
-        context.checking(new Expectations() {{
-            one(closure).call("a");
-        }});
-
-        container.whenObjectAdded(HelperUtil.toClosure(closure));
-        container.addObject("a");
-    }
-
-    @Test
-    public void callsActionWhenObjectRemoved() {
-        final Action<CharSequence> action = context.mock(Action.class);
-        final String original = "a";
-
-        context.checking(new Expectations() {{
-            one(action).execute(with(sameInstance(original)));
-        }});
-
-        container.whenObjectRemoved(action);
-        container.addObject(original);
-        container.addObject("a");
-    }
-
-    @Test
-    public void allObjectsCallsActionForEachExistingObject() {
-        final Action<CharSequence> action = context.mock(Action.class);
-
-        context.checking(new Expectations() {{
-            one(action).execute("a");
-        }});
-
-        container.addObject("a");
-        container.allObjects(action);
-    }
-
-    @Test
-    public void allObjectsCallsClosureForEachExistingObject() {
-        final TestClosure closure = context.mock(TestClosure.class);
-
-        context.checking(new Expectations() {{
-            one(closure).call("a");
-        }});
-
-        container.addObject("a");
-        container.allObjects(HelperUtil.toClosure(closure));
-    }
-
-    @Test
-    public void allObjectsCallsActionForEachNewObject() {
-        final Action<CharSequence> action = context.mock(Action.class);
-
-        context.checking(new Expectations() {{
-            one(action).execute("a");
-        }});
-
-        container.allObjects(action);
-        container.addObject("a");
-    }
-
-    @Test
-    public void allObjectsCallsClosureForEachNewObject() {
-        final TestClosure closure = context.mock(TestClosure.class);
-
-        context.checking(new Expectations() {{
-            one(closure).call("a");
-        }});
-
-        container.allObjects(HelperUtil.toClosure(closure));
-        container.addObject("a");
-    }
-
-    @Test
-    public void allObjectsCallsActionForEachNewObjectAddedByTheAction() {
-        final Action<CharSequence> action = context.mock(Action.class);
-
-        context.checking(new Expectations() {{
-            one(action).execute("a");
-            will(new org.jmock.api.Action() {
-                public Object invoke(Invocation invocation) throws Throwable {
-                    container.addObject("c");
-                    return null;
-                }
-
-                public void describeTo(Description description) {
-                    description.appendText("add 'c'");
-                }
-            });
-            one(action).execute("b");
-            one(action).execute("c");
-        }});
-
-        container.addObject("a");
-        container.addObject("b");
-        container.allObjects(action);
-    }
-
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainerTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainerTest.java
deleted file mode 100644
index 48096c4..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/DefaultNamedDomainObjectContainerTest.java
+++ /dev/null
@@ -1,628 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal;
-
-import groovy.lang.Closure;
-import groovy.lang.MissingPropertyException;
-import org.gradle.api.Action;
-import org.gradle.api.DomainObjectCollection;
-import org.gradle.api.Rule;
-import org.gradle.api.UnknownDomainObjectException;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.specs.Specs;
-import org.gradle.util.*;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.Iterator;
-
-import static org.gradle.util.HelperUtil.*;
-import static org.gradle.util.WrapUtil.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
- at RunWith(JMock.class)
-public class DefaultNamedDomainObjectContainerTest {
-    private final ClassGenerator classGenerator = new AsmBackedClassGenerator();
-    private final DefaultNamedDomainObjectContainer<Bean> container = classGenerator.newInstance(DefaultNamedDomainObjectContainer.class, Bean.class, classGenerator);
-    private final JUnit4Mockery context = new JUnit4Mockery();
-
-    @Test
-    public void usesTypeNameToGenerateDisplayName() {
-        assertThat(container.getTypeDisplayName(), equalTo("Bean"));
-        assertThat(container.getDisplayName(), equalTo("Bean container"));
-    }
-
-    @Test
-    public void canGetAllDomainObjectsForEmptyContainer() {
-        assertTrue(container.getAll().isEmpty());
-    }
-
-    @Test
-    public void canGetAllDomainObjectsOrderedByName() {
-        Bean bean1 = new Bean();
-        Bean bean2 = new Bean();
-        Bean bean3 = new Bean();
-
-        container.addObject("b", bean2);
-        container.addObject("a", bean1);
-        container.addObject("c", bean3);
-
-        assertThat(container.getAll(), equalTo(toLinkedSet(bean1, bean2, bean3)));
-    }
-
-    @Test
-    public void canIterateOverEmptyContainer() {
-        Iterator<Bean> iterator = container.iterator();
-        assertFalse(iterator.hasNext());
-    }
-
-    @Test
-    public void canIterateOverDomainObjectsOrderedByName() {
-        Bean bean1 = new Bean();
-        Bean bean2 = new Bean();
-        Bean bean3 = new Bean();
-
-        container.addObject("b", bean2);
-        container.addObject("a", bean1);
-        container.addObject("c", bean3);
-
-        Iterator<Bean> iterator = container.iterator();
-        assertThat(iterator.next(), sameInstance(bean1));
-        assertThat(iterator.next(), sameInstance(bean2));
-        assertThat(iterator.next(), sameInstance(bean3));
-        assertFalse(iterator.hasNext());
-    }
-
-    @Test
-    public void canGetAllDomainObjectsAsMapForEmptyContainer() {
-        assertTrue(container.getAsMap().isEmpty());
-    }
-
-    @Test
-    public void canGetAllDomainObjectsAsMap() {
-        Bean bean1 = new Bean();
-        Bean bean2 = new Bean();
-        Bean bean3 = new Bean();
-
-        container.addObject("b", bean2);
-        container.addObject("a", bean1);
-        container.addObject("c", bean3);
-
-        assertThat(container.getAsMap(), equalTo(GUtil.map("a", bean1, "b", bean2, "c", bean3)));
-    }
-
-    @Test
-    public void canGetAllMatchingDomainObjectsOrderedByName() {
-        Bean bean1 = new Bean();
-        final Bean bean2 = new Bean();
-        Bean bean3 = new Bean();
-
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element == bean2;
-            }
-        };
-
-        container.addObject("a", bean1);
-        container.addObject("b", bean2);
-        container.addObject("c", bean3);
-
-        assertThat(container.findAll(spec), equalTo(toLinkedSet(bean2)));
-    }
-
-    @Test
-    public void getAllMatchingDomainObjectsReturnsEmptySetWhenNoMatches() {
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return false;
-            }
-        };
-
-        container.addObject("a", new Bean());
-
-        assertTrue(container.findAll(spec).isEmpty());
-    }
-
-    @Test
-    public void canGetFilteredCollectionContainingAllObjectsWhichMeetSpec() {
-        final Bean bean1 = new Bean();
-        Bean bean2 = new Bean();
-        Bean bean3 = new Bean();
-
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element != bean1;
-            }
-        };
-
-        TestClosure testClosure = new TestClosure() {
-            public Object call(Object param) {
-                return param != bean1;
-            }
-        };
-
-        container.addObject("a", bean1);
-        container.addObject("b", bean2);
-        container.addObject("c", bean3);
-
-        assertThat(container.matching(spec).getAll(), equalTo(toLinkedSet(bean2, bean3)));
-        assertThat(container.matching(HelperUtil.toClosure(testClosure)).getAll(), equalTo(toLinkedSet(bean2, bean3)));
-        assertThat(container.matching(spec).findByName("a"), nullValue());
-        assertThat(container.matching(spec).findByName("b"), sameInstance(bean2));
-    }
-
-    @Test
-    public void canGetFilteredCollectionContainingAllObjectsWhichHaveType() {
-        class OtherBean extends Bean {
-        }
-        Bean bean1 = new Bean();
-        OtherBean bean2 = new OtherBean();
-        Bean bean3 = new Bean();
-
-        container.addObject("c", bean3);
-        container.addObject("a", bean1);
-        container.addObject("b", bean2);
-
-        assertThat(container.withType(Bean.class).getAll(), equalTo(toLinkedSet(bean1, bean2, bean3)));
-        assertThat(container.withType(OtherBean.class).getAll(), equalTo(toLinkedSet(bean2)));
-        assertThat(container.withType(OtherBean.class).findByName("a"), nullValue());
-        assertThat(container.withType(OtherBean.class).findByName("b"), sameInstance(bean2));
-    }
-
-    @Test
-    public void filteredCollectionIsLive() {
-        final Bean bean1 = new Bean();
-        Bean bean2 = new Bean();
-        Bean bean3 = new Bean();
-        Bean bean4 = new Bean();
-
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element != bean1;
-            }
-        };
-
-        container.addObject("a", bean1);
-
-        DomainObjectCollection<Bean> filteredCollection = container.matching(spec);
-        assertTrue(filteredCollection.getAll().isEmpty());
-
-        container.addObject("b", bean2);
-        container.addObject("c", bean3);
-
-        assertThat(filteredCollection.getAll(), equalTo(toLinkedSet(bean2, bean3)));
-
-        container.addObject("c", bean4);
-
-        assertThat(filteredCollection.getAll(), equalTo(toLinkedSet(bean2, bean4)));
-    }
-
-    @Test
-    public void filteredCollectionExecutesActionWhenMatchingObjectAdded() {
-        final Action<Bean> action = context.mock(Action.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(action).execute(bean);
-        }});
-
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element == bean;
-            }
-        };
-
-        container.matching(spec).whenObjectAdded(action);
-
-        container.addObject("bean", bean);
-        container.addObject("bean2", new Bean());
-    }
-
-    @Test
-    public void filteredCollectionExecutesClosureWhenMatchingObjectAdded() {
-        final TestClosure closure = context.mock(TestClosure.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(closure).call(bean);
-        }});
-
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element == bean;
-            }
-        };
-
-        container.matching(spec).whenObjectAdded(HelperUtil.toClosure(closure));
-
-        container.addObject("bean", bean);
-        container.addObject("bean2", new Bean());
-    }
-
-    @Test
-    public void canChainFilteredCollections() {
-        final Bean bean = new Bean();
-        final Bean bean2 = new Bean();
-        final Bean bean3 = new Bean();
-
-        Spec<Bean> spec = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element != bean;
-            }
-        };
-        Spec<Bean> spec2 = new Spec<Bean>() {
-            public boolean isSatisfiedBy(Bean element) {
-                return element != bean2;
-            }
-        };
-
-        container.addObject("a", bean);
-        container.addObject("b", bean2);
-        container.addObject("c", bean3);
-
-        DomainObjectCollection<Bean> collection = container.matching(spec).matching(spec2);
-        assertThat(collection.getAll(), equalTo(toSet(bean3)));
-    }
-
-    @Test
-    public void canGetDomainObjectByName() {
-        Bean bean = new Bean();
-        container.addObject("a", bean);
-
-        assertThat(container.getByName("a"), sameInstance(bean));
-        assertThat(container.getAt("a"), sameInstance(bean));
-    }
-
-    @Test
-    public void getDomainObjectByNameFailsForUnknownDomainObject() {
-        try {
-            container.getByName("unknown");
-            fail();
-        } catch (UnknownDomainObjectException e) {
-            assertThat(e.getMessage(), equalTo("Bean with name 'unknown' not found."));
-        }
-    }
-
-    @Test
-    public void getDomainObjectInvokesRuleForUnknownDomainObject() {
-        Bean bean = new Bean();
-        addRuleFor(bean);
-
-        assertThat(container.getByName("bean"), sameInstance(bean));
-    }
-
-    @Test
-    public void canConfigureDomainObjectByName() {
-        Bean bean = new Bean();
-        container.addObject("a", bean);
-
-        assertThat(container.getByName("a", toClosure("{ beanProperty = 'hi' }")), sameInstance(bean));
-        assertThat(bean.getBeanProperty(), equalTo("hi"));
-    }
-
-    @Test
-    public void configureDomainObjectInvokesRuleForUnknownDomainObject() {
-        Bean bean = new Bean();
-        addRuleFor(bean);
-
-        assertThat(container.getByName("bean", toClosure("{ beanProperty = 'hi' }")), sameInstance(bean));
-        assertThat(bean.getBeanProperty(), equalTo("hi"));
-    }
-
-    @Test
-    public void canFindDomainObjectByName() {
-        Bean bean = new Bean();
-        container.addObject("a", bean);
-
-        assertThat(container.findByName("a"), sameInstance(bean));
-    }
-
-    @Test
-    public void findDomainObjectByNameReturnsNullForUnknownDomainObject() {
-        assertThat(container.findByName("a"), nullValue());
-    }
-
-    @Test
-    public void findDomainObjectByNameInvokesRulesForUnknownDomainObject() {
-        Bean bean = new Bean();
-        addRuleFor(bean);
-
-        assertThat(container.findByName("bean"), sameInstance(bean));
-    }
-
-    @Test
-    public void findDomainObjectByNameInvokesNestedRulesOnlyOnceForUnknownDomainObject() {
-        final Bean bean1 = new Bean();
-        final Bean bean2 = new Bean();
-        container.addRule(new Rule() {
-            public String getDescription() {
-                return "rule1";
-            }
-
-            public void apply(String domainObjectName) {
-                if (domainObjectName.equals("bean1")) {
-                    container.addObject("bean1", bean1);
-                }
-            }
-        });
-        container.addRule(new Rule() {
-            private boolean applyHasBeenCalled;
-
-            public String getDescription() {
-                return "rule2";
-            }
-
-            public void apply(String domainObjectName) {
-                if (domainObjectName.equals("bean2")) {
-                    assertThat(applyHasBeenCalled, equalTo(false));
-                    container.findByName("bean1");
-                    container.findByName("bean2");
-                    container.addObject("bean2", bean2);
-                    applyHasBeenCalled = true;
-                }
-            }
-        });
-        container.findByName("bean2");
-        assertThat(container.getAll(), equalTo(WrapUtil.toSet(bean1, bean2)));
-    }
-
-    @Test
-    public void callsActionWhenObjectAdded() {
-        final Action<Bean> action = context.mock(Action.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(action).execute(bean);
-        }});
-
-        container.whenObjectAdded(action);
-        container.addObject("bean", bean);
-    }
-
-    @Test
-    public void callsClosureWhenObjectAdded() {
-        final TestClosure closure = context.mock(TestClosure.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(closure).call(bean);
-        }});
-
-        container.whenObjectAdded(HelperUtil.toClosure(closure));
-        container.addObject("bean", bean);
-    }
-
-    @Test
-    public void callsActionWhenObjectRemoved() {
-        final Action<Bean> action = context.mock(Action.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(action).execute(bean);
-        }});
-
-        container.whenObjectRemoved(action);
-        container.addObject("bean", bean);
-        container.addObject("bean", new Bean());
-    }
-
-    @Test
-    public void allObjectsCallsActionForEachExistingObject() {
-        final Action<Bean> action = context.mock(Action.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(action).execute(bean);
-        }});
-
-        container.addObject("bean", bean);
-        container.allObjects(action);
-    }
-
-    @Test
-    public void allObjectsCallsClosureForEachExistingObject() {
-        final TestClosure closure = context.mock(TestClosure.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(closure).call(bean);
-        }});
-
-        container.addObject("bean", bean);
-        container.allObjects(HelperUtil.toClosure(closure));
-    }
-
-    @Test
-    public void allObjectsCallsActionForEachNewObject() {
-        final Action<Bean> action = context.mock(Action.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(action).execute(bean);
-        }});
-
-        container.allObjects(action);
-        container.addObject("bean", bean);
-    }
-
-    @Test
-    public void allObjectsCallsClosureForEachNewObject() {
-        final TestClosure closure = context.mock(TestClosure.class);
-        final Bean bean = new Bean();
-
-        context.checking(new Expectations() {{
-            one(closure).call(bean);
-        }});
-
-        container.allObjects(HelperUtil.toClosure(closure));
-        container.addObject("bean", bean);
-    }
-
-    @Test
-    public void eachObjectIsAvailableAsADynamicProperty() {
-        Bean bean = new Bean();
-        container.addObject("child", bean);
-        assertTrue(container.getAsDynamicObject().hasProperty("child"));
-        assertThat(container.getAsDynamicObject().getProperty("child"), sameInstance((Object) bean));
-        assertThat(container.getAsDynamicObject().getProperties().get("child"), sameInstance((Object) bean));
-        assertThat(call("{ it.child }", container), sameInstance((Object) bean));
-        assertThat(call("{ it.child }", container.withType(Bean.class)), sameInstance((Object) bean));
-        assertThat(call("{ it.child }", container.matching(Specs.satisfyAll())), sameInstance((Object) bean));
-    }
-
-    @Test
-    public void eachObjectIsAvailableUsingAnIndex() {
-        Bean bean = new Bean();
-        container.addObject("child", bean);
-        assertThat(call("{ it['child'] }", container), sameInstance((Object) bean));
-    }
-
-    @Test
-    public void cannotGetUnknownProperty() {
-        assertFalse(container.getAsDynamicObject().hasProperty("unknown"));
-
-        try {
-            container.getAsDynamicObject().getProperty("unknown");
-            fail();
-        } catch (MissingPropertyException e) {
-            // expected
-        }
-    }
-
-    @Test
-    public void dynamicPropertyAccessInvokesRulesForUnknownDomainObject() {
-        Bean bean = new Bean();
-        addRuleFor(bean);
-
-        assertTrue(container.getAsDynamicObject().hasProperty("bean"));
-        assertThat(container.getAsDynamicObject().getProperty("bean"), sameInstance((Object) bean));
-    }
-
-    @Test
-    public void eachObjectIsAvailableAsConfigureMethod() {
-        Bean bean = new Bean();
-        container.addObject("child", bean);
-
-        Closure closure = toClosure("{ beanProperty = 'value' }");
-        assertTrue(container.getAsDynamicObject().hasMethod("child", closure));
-        container.getAsDynamicObject().invokeMethod("child", closure);
-        assertThat(bean.getBeanProperty(), equalTo("value"));
-
-        call("{ it.child { beanProperty = 'value 2' } }", container);
-        assertThat(bean.getBeanProperty(), equalTo("value 2"));
-
-        call("{ it.invokeMethod('child') { beanProperty = 'value 3' } }", container);
-        assertThat(bean.getBeanProperty(), equalTo("value 3"));
-    }
-
-    @Test
-    public void canUseDynamicPropertiesAndMethodsInsideConfigureClosures() {
-        Bean bean = new Bean();
-        container.addObject("child", bean);
-        container.addObject("aProp", bean);
-        container.addObject("a", bean);
-        container.addObject("withType", bean);
-        container.addObject("allObjects", bean);
-
-        ConfigureUtil.configure(toClosure("{ child.beanProperty = 'value 1' }"), container);
-        assertThat(bean.getBeanProperty(), equalTo("value 1"));
-
-        ConfigureUtil.configure(toClosure("{ child { beanProperty = 'value 2' } }"), container);
-        assertThat(bean.getBeanProperty(), equalTo("value 2"));
-
-        ConfigureUtil.configure(toClosure("{ aProp.beanProperty = 'value 3' }"), container);
-        assertThat(bean.getBeanProperty(), equalTo("value 3"));
-
-        ConfigureUtil.configure(toClosure("{ a.beanProperty = 'value 4' }"), container);
-        assertThat(bean.getBeanProperty(), equalTo("value 4"));
-
-        // Try with an element with the same name as a method
-        ConfigureUtil.configure(toClosure("{ withType.beanProperty = 'value 6' }"), container);
-        assertThat(bean.getBeanProperty(), equalTo("value 6"));
-
-        ConfigureUtil.configure(toClosure("{ withType { beanProperty = 'value 6' } }"), container);
-        assertThat(bean.getBeanProperty(), equalTo("value 6"));
-    }
-
-    @Test
-    public void cannotInvokeUnknownMethod() {
-        container.addObject("child", new Bean());
-
-        assertMethodUnknown("unknown");
-        assertMethodUnknown("unknown", toClosure("{ }"));
-        assertMethodUnknown("child");
-        assertMethodUnknown("child", "not a closure");
-        assertMethodUnknown("child", toClosure("{ }"), "something else");
-    }
-
-    private void assertMethodUnknown(String name, Object... arguments) {
-        assertFalse(container.getAsDynamicObject().hasMethod(name, arguments));
-        try {
-            container.getAsDynamicObject().invokeMethod(name, arguments);
-            fail();
-        } catch (groovy.lang.MissingMethodException e) {
-            // Expected
-        }
-    }
-
-    @Test
-    public void configureMethodInvokesRuleForUnknownDomainObject() {
-        Bean bean = new Bean();
-        addRuleFor(bean);
-
-        assertTrue(container.getAsDynamicObject().hasMethod("bean", toClosure("{ }")));
-    }
-
-    @Test
-    public void addRuleByClosure() {
-        String testPropertyKey = "org.gradle.test.addRuleByClosure";
-        String expectedTaskName = "someTaskName";
-        Closure ruleClosure = HelperUtil.toClosure(String.format("{ taskName -> System.setProperty('%s', '%s') }",
-                testPropertyKey, expectedTaskName));
-        container.addRule("description", ruleClosure);
-        container.getRules().get(0).apply(expectedTaskName);
-        assertThat(System.getProperty(testPropertyKey), equalTo(expectedTaskName));
-        System.getProperties().remove(testPropertyKey);
-    }
-
-    private void addRuleFor(final Bean bean) {
-        container.addRule(new Rule() {
-            public String getDescription() {
-                throw new UnsupportedOperationException();
-            }
-
-            public void apply(String taskName) {
-                container.addObject(taskName, bean);
-            }
-        });
-    }
-
-    private class Bean {
-        private String beanProperty;
-
-        public String getBeanProperty() {
-            return beanProperty;
-        }
-
-        public void setBeanProperty(String beanProperty) {
-            this.beanProperty = beanProperty;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/XmlTransformerTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/XmlTransformerTest.groovy
deleted file mode 100644
index ae43a0a..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/XmlTransformerTest.groovy
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal
-
-import spock.lang.Specification
-import org.gradle.api.artifacts.maven.XmlProvider
-import org.gradle.api.Action
-
-class XmlTransformerTest extends Specification {
-    final XmlTransformer transformer = new XmlTransformer()
-
-    def returnsOriginalStringWhenNoActions() {
-        expect:
-        transformer.transform('<xml/>') == '<xml/>'
-    }
-
-    def actionCanAccessXmlAsStringBuffer() {
-        Action<XmlProvider> action = Mock()
-        transformer.addAction(action)
-
-        when:
-        def result = transformer.transform('<xml/>')
-
-        then:
-        result == '<some-xml/>'
-        1 * action.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asString().insert(1, 'some-')
-        }
-    }
-
-    def actionCanAccessXmlAsNode() {
-        Action<XmlProvider> action = Mock()
-        transformer.addAction(action)
-
-        when:
-        def result = transformer.transform('<xml/>')
-
-        then:
-        result == '<xml>\n  <child1/>\n</xml>\n'
-        1 * action.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asNode().appendNode('child1')
-        }
-    }
-
-    def actionCanAccessXmlAsDomElement() {
-        Action<XmlProvider> action = Mock()
-        transformer.addAction(action)
-
-        when:
-        def result = transformer.transform('<xml/>')
-
-        then:
-        result == toNative('<?xml version="1.0" encoding="UTF-8"?>\n<xml>\n  <child1/>\n</xml>\n')
-        1 * action.execute(!null) >> { args ->
-            def provider = args[0]
-            def document = provider.asElement().ownerDocument
-            provider.asElement().appendChild(document.createElement('child1'))
-        }
-    }
-
-    def canTransformStringToAWriter() {
-        Action<XmlProvider> action = Mock()
-        transformer.addAction(action)
-        StringWriter writer = new StringWriter()
-
-        when:
-        transformer.transform('<xml/>', writer)
-
-        then:
-        writer.toString() == '<xml>\n  <child1/>\n</xml>\n'
-        1 * action.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asNode().appendNode('child1')
-        }
-    }
-
-    def canTransformNodeToAWriter() {
-        Action<XmlProvider> action = Mock()
-        transformer.addAction(action)
-        StringWriter writer = new StringWriter()
-        Node node = new XmlParser().parseText('<xml/>')
-
-        when:
-        transformer.transform(node, writer)
-
-        then:
-        writer.toString() == '<xml>\n  <child1/>\n</xml>\n'
-        1 * action.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asNode().appendNode('child1')
-        }
-    }
-
-    def canUseAClosureAsAnAction() {
-        transformer.addAction { provider ->
-            provider.asNode().appendNode('child1')
-        }
-        StringWriter writer = new StringWriter()
-
-        when:
-        transformer.transform('<xml/>', writer)
-
-        then:
-        writer.toString() == '<xml>\n  <child1/>\n</xml>\n'
-    }
-
-    def canChainActions() {
-        Action<XmlProvider> stringAction = Mock()
-        Action<XmlProvider> nodeAction = Mock()
-        Action<XmlProvider> elementAction = Mock()
-        Action<XmlProvider> stringAction2 = Mock()
-        transformer.addAction(stringAction)
-        transformer.addAction(elementAction)
-        transformer.addAction(nodeAction)
-        transformer.addAction(stringAction2)
-
-        when:
-        def result = transformer.transform('<xml/>')
-
-        then:
-        result == '<some-xml>\n  <child1/>\n  <child2/>\n</some-xml>\n<!-- end -->'
-        1 * stringAction.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asString().insert(1, 'some-')
-        }
-        1 * elementAction.execute(!null) >> { args ->
-            def provider = args[0]
-            def document = provider.asElement().ownerDocument
-            provider.asElement().appendChild(document.createElement('child1'))
-        }
-        1 * nodeAction.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asNode().appendNode('child2')
-        }
-        1 * stringAction2.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asString().append('<!-- end -->')
-        }
-    }
-
-    def canChainNodeActions() {
-        Action<XmlProvider> nodeAction = Mock()
-        Action<XmlProvider> nodeAction2 = Mock()
-        transformer.addAction(nodeAction)
-        transformer.addAction(nodeAction2)
-
-        when:
-        def result = transformer.transform('<xml/>')
-
-        then:
-        result == '<xml>\n  <child1/>\n  <child2/>\n</xml>\n'
-        1 * nodeAction.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asNode().appendNode('child1')
-        }
-        1 * nodeAction2.execute(!null) >> { args ->
-            def provider = args[0]
-            provider.asNode().appendNode('child2')
-        }
-    }
-
-    def String toNative(String value) {
-        return value.replaceAll('\n', System.getProperty('line.separator'))
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstructionTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstructionTest.java
deleted file mode 100644
index 8b57840..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ProjectDependenciesBuildInstructionTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts;
-
-import org.gradle.util.WrapUtil;
-import org.junit.Test;
-
-import java.util.Collections;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Hans Dockter
- */
-public class ProjectDependenciesBuildInstructionTest {
-    @Test
-    public void initWithNull() {
-        ProjectDependenciesBuildInstruction buildInstruction = new ProjectDependenciesBuildInstruction(null);
-        assertThat(buildInstruction.isRebuild(), equalTo(false));
-        assertThat(buildInstruction.getTaskNames(), equalTo(Collections.<String>emptyList()));
-    }
-
-    @Test
-    public void initWithEmptyList() {
-        ProjectDependenciesBuildInstruction buildInstruction = new ProjectDependenciesBuildInstruction(Collections.<String>emptyList());
-        assertThat(buildInstruction.isRebuild(), equalTo(true));
-        assertThat(buildInstruction.getTaskNames(), equalTo(Collections.<String>emptyList()));
-    }
-
-    @Test
-    public void initWithNonEmptyList() {
-        String taskName = "someTaskName";
-        ProjectDependenciesBuildInstruction buildInstruction = new ProjectDependenciesBuildInstruction(
-                WrapUtil.toList(taskName));
-        assertThat(buildInstruction.isRebuild(), equalTo(true));
-        assertThat(buildInstruction.getTaskNames(), equalTo(WrapUtil.toList(taskName)));
-    }
-
-    @Test
-    public void equality() {
-        String taskName = "someTaskName";
-        assertThat(new ProjectDependenciesBuildInstruction(null),
-                equalTo(new ProjectDependenciesBuildInstruction(null)));
-        assertThat(new ProjectDependenciesBuildInstruction(Collections.<String>emptyList()),
-                equalTo(new ProjectDependenciesBuildInstruction(Collections.<String>emptyList())));
-        assertThat(new ProjectDependenciesBuildInstruction(WrapUtil.toList(taskName)),
-                equalTo(new ProjectDependenciesBuildInstruction(WrapUtil.toList(taskName))));
-
-        assertThat(new ProjectDependenciesBuildInstruction(null),
-                not(equalTo(new ProjectDependenciesBuildInstruction(Collections.<String>emptyList()))));
-        assertThat(new ProjectDependenciesBuildInstruction(WrapUtil.toList(taskName)),
-                not(equalTo(new ProjectDependenciesBuildInstruction(WrapUtil.toList(taskName + 'x')))));
-    }
-
-    @Test
-    public void hashCodeEquality() {
-        String taskName = "someTaskName";
-        assertThat(new ProjectDependenciesBuildInstruction(null).hashCode(),
-                equalTo(new ProjectDependenciesBuildInstruction(null).hashCode()));
-        assertThat(new ProjectDependenciesBuildInstruction(Collections.<String>emptyList()).hashCode(),
-                equalTo(new ProjectDependenciesBuildInstruction(Collections.<String>emptyList()).hashCode()));
-        assertThat(new ProjectDependenciesBuildInstruction(WrapUtil.toList(taskName)).hashCode(),
-                equalTo(new ProjectDependenciesBuildInstruction(WrapUtil.toList(taskName)).hashCode()));
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependencyTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependencyTest.java
deleted file mode 100644
index a4a5cf7..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/AbstractModuleDependencyTest.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.dependencies;
-
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.DependencyArtifact;
-import org.gradle.api.artifacts.ExcludeRule;
-import org.gradle.api.artifacts.ModuleDependency;
-import org.gradle.api.internal.artifacts.DefaultExcludeRule;
-import org.gradle.util.HelperUtil;
-import org.gradle.util.JUnit4GroovyMockery;
-import static org.gradle.util.Matchers.*;
-import org.gradle.util.WrapUtil;
-import static org.hamcrest.Matchers.*;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import static org.junit.Assert.*;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.Map;
-
-/**
- * @author Hans Dockter
- */
- at RunWith(JMock.class)
-abstract public class AbstractModuleDependencyTest {
-
-    protected abstract AbstractModuleDependency getDependency();
-
-    protected abstract AbstractModuleDependency createDependency(String group, String name, String version);
-
-    protected abstract AbstractModuleDependency createDependency(String group, String name, String version, String configuration);
-
-    protected JUnit4Mockery context = new JUnit4GroovyMockery();
-
-    @Test
-    public void defaultValues() {
-        assertTrue(getDependency().isTransitive());
-        assertThat(getDependency().getArtifacts(), isEmpty());
-        assertThat(getDependency().getExcludeRules(), isEmpty());
-        assertThat(getDependency().getConfiguration(), equalTo(Dependency.DEFAULT_CONFIGURATION));
-    }
-
-    @Test
-    public void exclude() {
-        Map<String,String> excludeArgs1 = WrapUtil.toMap("key", "value");
-        Map<String,String> excludeArgs2 = WrapUtil.toMap("key2", "value2");
-
-        getDependency().exclude(excludeArgs1);
-        getDependency().exclude(excludeArgs2);
-
-        assertThat(getDependency().getExcludeRules().size(), equalTo(2));
-        assertThat(getDependency().getExcludeRules(), hasItem((ExcludeRule) new DefaultExcludeRule(excludeArgs1)));
-        assertThat(getDependency().getExcludeRules(), hasItem((ExcludeRule) new DefaultExcludeRule(excludeArgs2)));
-    }
-
-    @Test
-    public void addArtifact() {
-        DependencyArtifact artifact1 = createAnonymousArtifact();
-        DependencyArtifact artifact2 = createAnonymousArtifact();
-
-        getDependency().addArtifact(artifact1);
-        getDependency().addArtifact(artifact2);
-
-        assertThat(getDependency().getArtifacts().size(), equalTo(2));
-        assertThat(getDependency().getArtifacts(), hasItem(artifact1));
-        assertThat(getDependency().getArtifacts(), hasItem(artifact2));
-    }
-
-    private DependencyArtifact createAnonymousArtifact() {
-        return new DefaultDependencyArtifact(HelperUtil.createUniqueId(), "type", "org", "classifier", "url");
-    }
-
-    @Test
-    public void equality() {
-        assertThat(createDependency("group1", "name1", "version1"), equalTo(createDependency("group1", "name1", "version1")));
-        assertThat(createDependency("group1", "name1", "version1").hashCode(), equalTo(createDependency("group1", "name1", "version1").hashCode()));
-        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group1", "name1", "version2"))));
-        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group1", "name2", "version1"))));
-        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group2", "name1", "version1"))));
-        assertThat(createDependency("group1", "name1", "version1"), not(equalTo(createDependency("group2", "name1", "version1"))));
-        assertThat(createDependency("group1", "name1", "version1", "depConf1"), not(equalTo(createDependency("group1", "name1", "version1", "depConf2"))));
-    }
-
-    protected void assertDeepCopy(ModuleDependency dependency, ModuleDependency copiedDependency) {
-        assertThat(copiedDependency.getGroup(), equalTo(dependency.getGroup()));
-        assertThat(copiedDependency.getName(), equalTo(dependency.getName()));
-        assertThat(copiedDependency.getVersion(), equalTo(dependency.getVersion()));
-        assertThat(copiedDependency.getConfiguration(), equalTo(dependency.getConfiguration()));
-        assertThat(copiedDependency.isTransitive(), equalTo(dependency.isTransitive()));
-        assertThat(copiedDependency.getArtifacts(), equalTo(dependency.getArtifacts()));
-        assertThat(copiedDependency.getArtifacts(), not(sameInstance(dependency.getArtifacts())));
-        assertThat(copiedDependency.getExcludeRules(), equalTo(dependency.getExcludeRules()));
-        assertThat(copiedDependency.getExcludeRules(), not(sameInstance(dependency.getExcludeRules())));
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependencyTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependencyTest.java
deleted file mode 100644
index d182de5..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dependencies/DefaultProjectDependencyTest.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts.dependencies;
-
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.api.artifacts.*;
-import org.gradle.api.internal.artifacts.DependencyResolveContext;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.tasks.TaskContainer;
-import org.gradle.api.tasks.TaskDependency;
-import org.gradle.util.WrapUtil;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JMock;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.util.Set;
-
-import static org.gradle.util.Matchers.*;
-import static org.gradle.util.WrapUtil.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-/**
- * @author Hans Dockter
- */
- at RunWith(JMock.class)
-public class DefaultProjectDependencyTest extends AbstractModuleDependencyTest {
-    private final ProjectDependenciesBuildInstruction instruction = new ProjectDependenciesBuildInstruction(WrapUtil.<String>toList());
-    private final Project dependencyProjectStub = context.mock(Project.class);
-    private final ConfigurationContainer projectConfigurationsStub = context.mock(ConfigurationContainer.class);
-    private final Configuration projectConfigurationStub = context.mock(Configuration.class);
-    private final TaskContainer dependencyProjectTaskContainerStub = context.mock(TaskContainer.class);
-    private final DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, instruction);
-
-    protected AbstractModuleDependency getDependency() {
-        return projectDependency;
-    }
-
-    protected AbstractModuleDependency createDependency(String group, String name, String version) {
-        return createDependency(group, name, version, null);    
-    }
-
-    protected AbstractModuleDependency createDependency(String group, String name, String version, String configuration) {
-        ProjectInternal dependencyProject = context.mock(ProjectInternal.class);
-        DefaultProjectDependency projectDependency;
-        if (configuration != null) {
-            projectDependency = new DefaultProjectDependency(dependencyProject, configuration, instruction);
-        } else {
-            projectDependency = new DefaultProjectDependency(dependencyProject, instruction);
-        }
-        return projectDependency;
-    }
-
-    @Before
-    public void setUp() {
-        context.checking(new Expectations() {{
-            allowing(dependencyProjectStub).getConfigurations();
-            will(returnValue(projectConfigurationsStub));
-            allowing(projectConfigurationsStub).getByName("default");
-            will(returnValue(projectConfigurationStub));
-            allowing(dependencyProjectStub).getTasks();
-            will(returnValue(dependencyProjectTaskContainerStub));
-            allowing(dependencyProjectStub).getName();
-            will(returnValue("target-name"));
-            allowing(dependencyProjectStub).getGroup();
-            will(returnValue("target-group"));
-            allowing(dependencyProjectStub).getVersion();
-            will(returnValue("target-version"));
-        }});
-    }
-
-    @Test
-    public void init() {
-        assertTrue(projectDependency.isTransitive());
-        assertEquals("target-name", projectDependency.getName());
-        assertEquals("target-group", projectDependency.getGroup());
-        assertEquals("target-version", projectDependency.getVersion());
-    }
-
-    @Test
-    public void getConfiguration() {
-        context.checking(new Expectations() {{
-            allowing(projectConfigurationsStub).getByName("conf1");
-            will(returnValue(projectConfigurationStub));
-        }});
-
-        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction);
-        assertThat(projectDependency.getProjectConfiguration(), sameInstance(projectConfigurationStub));
-    }
-
-    @Test
-    public void resolveDelegatesToAllSelfResolvingDependenciesInTargetConfiguration() {
-        final DependencyResolveContext resolveContext = context.mock(DependencyResolveContext.class);
-        final Dependency projectSelfResolvingDependency = context.mock(Dependency.class);
-        final ProjectDependency transitiveProjectDependencyStub = context.mock(ProjectDependency.class);
-        context.checking(new Expectations() {{
-            allowing(projectConfigurationsStub).getByName("conf1");
-            will(returnValue(projectConfigurationStub));
-
-            allowing(projectConfigurationStub).getAllDependencies();
-            will(returnValue(toSet(projectSelfResolvingDependency, transitiveProjectDependencyStub)));
-
-            allowing(resolveContext).isTransitive();
-            will(returnValue(true));
-            
-            one(resolveContext).add(projectSelfResolvingDependency);
-            
-            one(resolveContext).add(transitiveProjectDependencyStub);
-        }});
-
-        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1",
-                instruction);
-        projectDependency.resolve(resolveContext);
-    }
-
-    @Test
-    public void resolveNotDelegatesToProjectDependenciesInTargetConfigurationIfConfigurationIsNonTransitive() {
-        final DependencyResolveContext resolveContext = context.mock(DependencyResolveContext.class);
-        final Dependency projectSelfResolvingDependency = context.mock(Dependency.class);
-        final ProjectDependency transitiveProjectDependencyStub = context.mock(ProjectDependency.class);
-        context.checking(new Expectations() {{
-            allowing(projectConfigurationsStub).getByName("conf1");
-            will(returnValue(projectConfigurationStub));
-
-            allowing(projectConfigurationStub).getAllDependencies();
-            will(returnValue(toSet(projectSelfResolvingDependency, transitiveProjectDependencyStub)));
-
-            allowing(resolveContext).isTransitive();
-            will(returnValue(false));
-
-            one(resolveContext).add(projectSelfResolvingDependency);
-        }});
-        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1",
-                instruction);
-        projectDependency.resolve(resolveContext);
-    }
-    
-    @Test
-    public void resolveNotDelegatesToTransitiveProjectDependenciesIfProjectDependencyIsNonTransitive() {
-        final DependencyResolveContext resolveContext = context.mock(DependencyResolveContext.class);
-        final SelfResolvingDependency projectSelfResolvingDependency = context.mock(SelfResolvingDependency.class);
-        final ProjectDependency transitiveProjectDependencyStub = context.mock(ProjectDependency.class);
-        context.checking(new Expectations() {{
-            allowing(projectConfigurationsStub).getByName("conf1");
-            will(returnValue(projectConfigurationStub));
-
-            allowing(projectConfigurationStub).getAllDependencies();
-            will(returnValue(toSet(projectSelfResolvingDependency, transitiveProjectDependencyStub)));
-
-            one(resolveContext).add(projectSelfResolvingDependency);
-        }});
-        DefaultProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction);
-        projectDependency.setTransitive(false);
-        projectDependency.resolve(resolveContext);
-    }
-
-    private Task taskInTargetProject(final String name) {
-        final Task task = context.mock(Task.class, name);
-        context.checking(new Expectations(){{
-            allowing(dependencyProjectTaskContainerStub).getByName(name);
-            will(returnValue(task));
-        }});
-        return task;
-    }
-
-    @Test
-    public void dependsOnTargetConfigurationAndArtifactsOfTargetConfiguration() {
-        Task a = taskInTargetProject("a");
-        Task b = taskInTargetProject("b");
-        Task c = taskInTargetProject("c");
-        expectTargetConfigurationHasDependencies(a, b);
-        expectTargetConfigurationHasArtifacts(c);
-
-        assertThat(projectDependency.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(a, b, c)));
-    }
-
-    private void expectTargetConfigurationHasDependencies(final Task... tasks) {
-        context.checking(new Expectations(){{
-            TaskDependency dependencyStub = context.mock(TaskDependency.class, "dependencies");
-
-            allowing(projectConfigurationStub).getBuildDependencies();
-            will(returnValue(dependencyStub));
-
-            allowing(dependencyStub).getDependencies(null);
-            will(returnValue(toSet(tasks)));
-        }});
-    }
-
-    private void expectTargetConfigurationHasArtifacts(final Task... tasks) {
-        context.checking(new Expectations(){{
-            TaskDependency dependencyStub = context.mock(TaskDependency.class, "artifacts");
-
-            allowing(projectConfigurationStub).getBuildArtifacts();
-            will(returnValue(dependencyStub));
-
-            allowing(dependencyStub).getDependencies(null);
-            will(returnValue(toSet(tasks)));
-        }});
-    }
-
-    private void expectTargetConfigurationHasNoDependencies() {
-        context.checking(new Expectations(){{
-            TaskDependency dependencyStub = context.mock(TaskDependency.class);
-
-            allowing(projectConfigurationStub).getBuildDependencies();
-            will(returnValue(dependencyStub));
-
-            allowing(projectConfigurationStub).getBuildArtifacts();
-            will(returnValue(dependencyStub));
-
-            allowing(dependencyStub).getDependencies(null);
-            will(returnValue(toSet()));
-        }});
-    }
-
-    @Test
-    public void doesNotDependOnAnythingWhenProjectRebuildIsDisabled() {
-        DefaultProjectDependency dependency = new DefaultProjectDependency(dependencyProjectStub,
-                new ProjectDependenciesBuildInstruction(null));
-        assertThat(dependency.getBuildDependencies().getDependencies(null), isEmpty());
-    }
-
-    @Test
-    public void dependsOnAdditionalTasksFromTargetProject() {
-        expectTargetConfigurationHasNoDependencies();
-
-        Task a = taskInTargetProject("a");
-        Task b = taskInTargetProject("b");
-
-        DefaultProjectDependency dependency = new DefaultProjectDependency(dependencyProjectStub,
-                new ProjectDependenciesBuildInstruction(toList("a", "b")));
-        assertThat(dependency.getBuildDependencies().getDependencies(null), equalTo((Set) toSet(a, b)));
-    }
-
-    @Test
-    public void contentEqualsWithEqualDependencies() {
-        ProjectDependency dependency1 = createProjectDependency();
-        ProjectDependency dependency2 = createProjectDependency();
-        assertThat(dependency1.contentEquals(dependency2), equalTo(true));
-    }
-
-    @Test
-    public void contentEqualsWithNonEqualDependencies() {
-        ProjectDependency dependency1 = createProjectDependency();
-        ProjectDependency dependency2 = createProjectDependency();
-        dependency2.setTransitive(!dependency1.isTransitive());
-        assertThat(dependency1.contentEquals(dependency2), equalTo(false));
-    }
-
-    @Test
-    public void copy() {
-        ProjectDependency dependency = createProjectDependency();
-        ProjectDependency copiedDependency = dependency.copy();
-        assertDeepCopy(dependency, copiedDependency);
-        assertThat(copiedDependency.getDependencyProject(), sameInstance(dependency.getDependencyProject()));
-    }
-
-    private ProjectDependency createProjectDependency() {
-        ProjectDependency projectDependency = new DefaultProjectDependency(dependencyProjectStub, "conf", instruction);
-        projectDependency.addArtifact(new DefaultDependencyArtifact("name", "type", "ext", "classifier", "url"));
-        return projectDependency;
-    }
-
-    @Test
-    @Override
-    public void equality() {
-        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), strictlyEqual(new DefaultProjectDependency(
-                dependencyProjectStub, instruction)));
-        assertThat(new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction), strictlyEqual(new DefaultProjectDependency(
-                dependencyProjectStub, "conf1", instruction)));
-        assertThat(new DefaultProjectDependency(dependencyProjectStub, "conf1", instruction), not(equalTo(new DefaultProjectDependency(
-                dependencyProjectStub, "conf2", instruction))));
-        Project otherProject = context.mock(Project.class, "otherProject");
-        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), not(equalTo(new DefaultProjectDependency(
-                otherProject, instruction))));
-        assertThat(new DefaultProjectDependency(dependencyProjectStub, instruction), not(equalTo(new DefaultProjectDependency(
-                dependencyProjectStub, new ProjectDependenciesBuildInstruction(null)))));
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactoryTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactoryTest.java
deleted file mode 100644
index f2443d6..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultDependencyFactoryTest.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.artifacts.dsl.dependencies;
-
-import groovy.lang.Closure;
-import org.gradle.api.IllegalDependencyNotation;
-import org.gradle.api.InvalidUserDataException;
-import org.gradle.api.artifacts.ClientModule;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.ModuleDependency;
-import org.gradle.api.artifacts.ProjectDependency;
-import org.gradle.util.HelperUtil;
-import org.gradle.util.WrapUtil;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.awt.*;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Hans Dockter
- */
- at RunWith(JMock.class)
-public class DefaultDependencyFactoryTest {
-    private JUnit4Mockery context = new JUnit4Mockery();
-
-    private IDependencyImplementationFactory testImplPointFactoryStub = context.mock(IDependencyImplementationFactory.class, "Point");
-    private DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(
-            WrapUtil.toSet(testImplPointFactoryStub), null, null);
-
-    @Test
-    public void testCreateDependencyWithValidDescription() {
-        final Point point = createAnonymousPoint();
-        final Dependency pointDependencyDummy = context.mock(Dependency.class, "PointDependency");
-        context.checking(new Expectations() {{
-            allowing(testImplPointFactoryStub).createDependency(Dependency.class, point);
-            will(returnValue(pointDependencyDummy));
-        }});
-        assertSame(pointDependencyDummy, dependencyFactory.createDependency(point));
-    }
-
-    @Test
-    public void createDependencyWithDependencyObject() {
-        final Dependency dependencyDummy = context.mock(Dependency.class);
-        assertSame(dependencyDummy, dependencyFactory.createDependency(dependencyDummy));    
-    }
-
-    @Test
-    public void testCreateDependencyWithValidDescriptionAndClosure() {
-        final Point point = createAnonymousPoint();
-        final Dependency pointDependencyMock = context.mock(Dependency.class, "PointDependency");
-        context.checking(new Expectations() {{
-            allowing(testImplPointFactoryStub).createDependency(Dependency.class, point);
-            will(returnValue(pointDependencyMock));
-        }});
-        assertSame(pointDependencyMock, dependencyFactory.createDependency(point));
-    }
-
-    private Point createAnonymousPoint() {
-        return new Point(5,4);
-    }
-
-    @Test(expected = InvalidUserDataException.class)
-    public void testCreateDependencyWithInvalidDescriptionShouldThrowInvalidUserDataEx() {
-        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
-        context.checking(new Expectations() {{
-            allowing(testImplPointFactoryStub).createDependency(with(equalTo(Dependency.class)), with(not(instanceOf(Point.class))));
-            will(throwException(new IllegalDependencyNotation()));
-            allowing(testImplStringFactoryStub).createDependency(with(equalTo(Dependency.class)), with(not(instanceOf(String.class))));
-            will(throwException(new IllegalDependencyNotation()));
-        }});
-        dependencyFactory.createDependency(createAnonymousInteger());
-    }
-
-    private Integer createAnonymousInteger() {
-        return new Integer(5);
-    }
-
-    @Test
-    public void createProject() {
-        final ProjectDependencyFactory projectDependencyFactoryStub = context.mock(ProjectDependencyFactory.class);
-        final ProjectDependency projectDependency = context.mock(ProjectDependency.class);
-        final ProjectFinder projectFinderDummy = context.mock(ProjectFinder.class);
-        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(null, null, projectDependencyFactoryStub);
-        final Map map = WrapUtil.toMap("key", "value");
-        context.checking(new Expectations() {{
-            allowing(projectDependencyFactoryStub).createProjectDependencyFromMap(projectFinderDummy, map);
-            will(returnValue(projectDependency));
-        }});
-        Closure configureClosure = HelperUtil.toClosure("{ transitive = false }");
-        assertThat(dependencyFactory.createProjectDependencyFromMap(projectFinderDummy, map), sameInstance(projectDependency));
-    }
-
-    @Test
-    public void createModule() {
-        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
-        final IDependencyImplementationFactory clientModuleFactoryStub = context.mock(IDependencyImplementationFactory.class);
-        final ClientModule clientModuleMock = context.mock(ClientModule.class);
-        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(WrapUtil.toSet(testImplStringFactoryStub), clientModuleFactoryStub, null);
-        final String someNotation1 = "someNotation1";
-        final String someNotation2 = "someNotation2";
-        final String someNotation3 = "someNotation3";
-        final String someNotation4 = "someNotation4";
-        final String someModuleNotation = "junit:junit:4.4";
-        final ModuleDependency dependencyDummy1 = context.mock(ModuleDependency.class, "dep1");
-        final ModuleDependency dependencyDummy2 = context.mock(ModuleDependency.class, "dep2");
-        final ModuleDependency dependencyDummy3 = context.mock(ModuleDependency.class, "dep3");
-        final ModuleDependency dependencyMock = context.mock(ModuleDependency.class, "dep4");
-        context.checking(new Expectations() {{
-            allowing(clientModuleFactoryStub).createDependency(ClientModule.class, someModuleNotation);
-            will(returnValue(clientModuleMock));
-            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation1);
-            will(returnValue(dependencyDummy1));
-            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation2);
-            will(returnValue(dependencyDummy2));
-            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation3);
-            will(returnValue(dependencyDummy3));
-            allowing(testImplStringFactoryStub).createDependency(Dependency.class, someNotation4);
-            will(returnValue(dependencyMock));
-            one(dependencyMock).setTransitive(true);
-            one(clientModuleMock).addDependency(dependencyDummy1);
-            one(clientModuleMock).addDependency(dependencyDummy2);
-            one(clientModuleMock).addDependency(dependencyDummy3);
-            one(clientModuleMock).addDependency(dependencyMock);
-        }});
-        Closure configureClosure = HelperUtil.toClosure(String.format(
-                "{dependency('%s'); dependencies('%s', '%s'); dependency('%s') { transitive = true }}",
-                someNotation1, someNotation2, someNotation3, someNotation4));
-        assertThat(dependencyFactory.createModule(someModuleNotation, configureClosure), equalTo(clientModuleMock));
-    }
-
-    @Test
-    public void createModuleWithNullClosure() {
-        final IDependencyImplementationFactory testImplStringFactoryStub = context.mock(IDependencyImplementationFactory.class, "String");
-        final IDependencyImplementationFactory clientModuleFactoryStub = context.mock(IDependencyImplementationFactory.class);
-        final ClientModule clientModuleMock = context.mock(ClientModule.class);
-        DefaultDependencyFactory dependencyFactory = new DefaultDependencyFactory(WrapUtil.toSet(testImplStringFactoryStub), clientModuleFactoryStub, null);
-
-        final String someModuleNotation = "junit:junit:4.4";
-        context.checking(new Expectations() {{
-            allowing(clientModuleFactoryStub).createDependency(ClientModule.class, someModuleNotation);
-            will(returnValue(clientModuleMock));
-        }});
-        assertThat(dependencyFactory.createModule(someModuleNotation, null), equalTo(clientModuleMock));
-    }
-
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactoryTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactoryTest.java
deleted file mode 100644
index 6794e82..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/dsl/dependencies/DefaultProjectDependencyFactoryTest.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.dsl.dependencies;
-
-import org.gradle.api.IllegalDependencyNotation;
-import org.gradle.api.Project;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.internal.AsmBackedClassGenerator;
-import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.util.GUtil;
-import org.gradle.util.HelperUtil;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Test;
-
-import java.awt.*;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultProjectDependencyFactoryTest {
-    private JUnit4Mockery context = new JUnit4Mockery();
-
-    private final ProjectDependenciesBuildInstruction projectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(null);
-    private ProjectDependencyFactory projectDependencyFactory = new DefaultProjectDependencyFactory(projectDependenciesBuildInstruction, new AsmBackedClassGenerator());
-    private ProjectFinder projectFinder = context.mock(ProjectFinder.class);
-
-    @Test
-    public void testCreateProjectDependencyWithProject() {
-        Project dependencyProject = HelperUtil.createRootProject();
-        DefaultProjectDependency projectDependency = (DefaultProjectDependency)
-                projectDependencyFactory.createDependency(Dependency.class, dependencyProject);
-        assertThat((ProjectInternal) projectDependency.getDependencyProject(), equalTo(dependencyProject));
-    }
-
-    @Test
-    public void testCreateProjectDependencyWithMapNotation() {
-        boolean expectedTransitive = false;
-        final Map<String, Object> mapNotation = GUtil.map("path", ":path", "configuration", "conf", "transitive", expectedTransitive);
-        final ProjectInternal projectDummy = context.mock(ProjectInternal.class);
-        context.checking(new Expectations() {{
-            allowing(projectFinder).getProject((String) mapNotation.get("path"));
-            will(returnValue(projectDummy));
-        }});
-        DefaultProjectDependency projectDependency = (DefaultProjectDependency)
-                projectDependencyFactory.createProjectDependencyFromMap(projectFinder, mapNotation);
-        assertThat((ProjectInternal) projectDependency.getDependencyProject(), equalTo(projectDummy));
-        assertThat(projectDependency.getConfiguration(), equalTo(mapNotation.get("configuration")));
-        assertThat(projectDependency.isTransitive(), equalTo(expectedTransitive));
-    }
-
-    @Test (expected = IllegalDependencyNotation.class)
-    public void testWithUnknownTypeShouldThrowUnknownDependencyNotationEx() {
-        projectDependencyFactory.createDependency(Dependency.class, new Point(3, 4));
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverterTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverterTest.java
deleted file mode 100644
index 69cea10..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/DefaultArtifactsToModuleDescriptorConverterTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2007-2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.ivyservice.moduleconverter;
-
-import org.apache.ivy.core.module.descriptor.Artifact;
-import org.apache.ivy.core.module.descriptor.DefaultArtifact;
-import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
-import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
-import org.gradle.api.artifacts.Configuration;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.PublishArtifact;
-import org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher;
-import org.gradle.api.internal.artifacts.publish.DefaultPublishArtifact;
-import org.gradle.util.HelperUtil;
-import org.gradle.util.WrapUtil;
-import static org.hamcrest.Matchers.equalTo;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import static org.junit.Assert.assertThat;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Hans Dockter
- */
- at RunWith(JMock.class)
-public class DefaultArtifactsToModuleDescriptorConverterTest {
-    private JUnit4Mockery context = new JUnit4Mockery();
-
-    @Test
-    public void testAddArtifacts() {
-        final PublishArtifact publishArtifactConf1 = createNamedPublishArtifact("conf1");
-        Configuration configurationStub1 = createConfigurationStub(publishArtifactConf1);
-        final PublishArtifact publishArtifactConf2 = createNamedPublishArtifact("conf2");
-        Configuration configurationStub2 = createConfigurationStub(publishArtifactConf2);
-        final ArtifactsExtraAttributesStrategy artifactsExtraAttributesStrategyMock = context.mock(ArtifactsExtraAttributesStrategy.class);
-        final Map<String, String> extraAttributesArtifact1 = WrapUtil.toMap("name", publishArtifactConf1.getName());
-        final Map<String, String> extraAttributesArtifact2 = WrapUtil.toMap("name", publishArtifactConf2.getName());
-        context.checking(new Expectations() {{
-            one(artifactsExtraAttributesStrategyMock).createExtraAttributes(publishArtifactConf1);
-            will(returnValue(extraAttributesArtifact1));
-            one(artifactsExtraAttributesStrategyMock).createExtraAttributes(publishArtifactConf2);
-            will(returnValue(extraAttributesArtifact2));
-        }});
-        DefaultModuleDescriptor moduleDescriptor = HelperUtil.createModuleDescriptor(WrapUtil.toSet(configurationStub1.getName(),
-                configurationStub2.getName()));
-
-        DefaultArtifactsToModuleDescriptorConverter artifactsToModuleDescriptorConverter =
-                new DefaultArtifactsToModuleDescriptorConverter(artifactsExtraAttributesStrategyMock);
-
-        artifactsToModuleDescriptorConverter.addArtifacts(moduleDescriptor, WrapUtil.toSet(configurationStub1, configurationStub2));
-
-        assertArtifactIsAdded(configurationStub1, moduleDescriptor, extraAttributesArtifact1);
-        assertArtifactIsAdded(configurationStub2, moduleDescriptor, extraAttributesArtifact2);
-        assertThat(moduleDescriptor.getAllArtifacts().length, equalTo(2));
-    }
-
-    @Test
-    public void testIvyFileStrategy() {
-        assertThat(
-                DefaultArtifactsToModuleDescriptorConverter.IVY_FILE_STRATEGY.createExtraAttributes(context.mock(PublishArtifact.class)),
-                equalTo((Map) new HashMap<String, String>()));
-    }
-
-    @Test
-    public void testResolveStrategy() {
-        PublishArtifact publishArtifact = createNamedPublishArtifact("someName");
-        Map<String, String> expectedExtraAttributes = WrapUtil.toMap(DefaultIvyDependencyPublisher.FILE_PATH_EXTRA_ATTRIBUTE, publishArtifact.getFile().getAbsolutePath());
-        assertThat(
-                DefaultArtifactsToModuleDescriptorConverter.RESOLVE_STRATEGY.createExtraAttributes(publishArtifact),
-                equalTo(expectedExtraAttributes));
-    }
-
-    private void assertArtifactIsAdded(Configuration configuration, DefaultModuleDescriptor moduleDescriptor, Map<String, String> extraAttributes) {
-        assertThat(moduleDescriptor.getArtifacts(configuration.getName()),
-                equalTo(WrapUtil.toArray(expectedIvyArtifact(configuration, moduleDescriptor, extraAttributes))));
-    }
-
-    private Artifact expectedIvyArtifact(Configuration configuration, ModuleDescriptor moduleDescriptor, Map<String, String> additionalExtraAttributes) {
-        PublishArtifact publishArtifact = configuration.getArtifacts().iterator().next();
-        Map<String,String> extraAttributes = WrapUtil.toMap(Dependency.CLASSIFIER, publishArtifact.getClassifier());
-        extraAttributes.putAll(additionalExtraAttributes);
-        return new DefaultArtifact(moduleDescriptor.getModuleRevisionId(),
-                publishArtifact.getDate(),
-                publishArtifact.getName(),
-                publishArtifact.getType(),
-                publishArtifact.getExtension(),
-                extraAttributes);
-    }
-
-    private Configuration createConfigurationStub(final PublishArtifact publishArtifact) {
-        final Configuration configurationStub = IvyConverterTestUtil.createNamedConfigurationStub(publishArtifact.getName(), context);
-        context.checking(new Expectations() {{
-            allowing(configurationStub).getArtifacts();
-            will(returnValue(WrapUtil.toSet(publishArtifact)));
-        }});
-        return configurationStub;
-    }
-
-    private PublishArtifact createNamedPublishArtifact(String name) {
-        return new DefaultPublishArtifact(name, "ext", "type", "classifier", new Date(), new File("somePath"));
-    }
-
-
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactoryTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactoryTest.java
deleted file mode 100644
index 4b16c80..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/ProjectDependencyDescriptorFactoryTest.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.ivyservice.moduleconverter.dependencies;
-
-import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
-import org.apache.ivy.core.module.id.ModuleRevisionId;
-import org.gradle.api.artifacts.ExternalModuleDependency;
-import org.gradle.api.artifacts.Module;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.artifacts.ProjectDependency;
-import org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency;
-import org.gradle.api.internal.artifacts.ivyservice.IvyUtil;
-import org.gradle.api.internal.project.AbstractProject;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.util.HelperUtil;
-import org.gradle.util.WrapUtil;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Test;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-/**
- * @author Hans Dockter
- */
-public class ProjectDependencyDescriptorFactoryTest extends AbstractDependencyDescriptorFactoryInternalTest {
-    private JUnit4Mockery context = new JUnit4Mockery();
-
-    private ProjectDependencyDescriptorStrategy descriptorStrategyStub = context.mock(ProjectDependencyDescriptorStrategy.class);
-    private ProjectDependencyDescriptorFactory projectDependencyDescriptorFactory =
-            new ProjectDependencyDescriptorFactory(excludeRuleConverterStub, descriptorStrategyStub);
-
-    @Test
-    public void canConvert() {
-        assertThat(projectDependencyDescriptorFactory.canConvert(context.mock(ProjectDependency.class)), equalTo(true));
-        assertThat(projectDependencyDescriptorFactory.canConvert(context.mock(ExternalModuleDependency.class)), equalTo(false));
-    }
-
-    @Test
-    public void testCreateFromProjectDependency() {
-        final ModuleRevisionId someModuleRevisionId = ModuleRevisionId.newInstance("a", "b", "c");
-        final ProjectDependency projectDependency = createProjectDependency(TEST_DEP_CONF);
-        setUpDependency(projectDependency);
-        context.checking(new Expectations() {{
-            allowing(descriptorStrategyStub).createModuleRevisionId(projectDependency);
-            will(returnValue(someModuleRevisionId));
-            allowing(descriptorStrategyStub).isChanging();
-            will(returnValue(true));
-        }});
-        projectDependencyDescriptorFactory.addDependencyDescriptor(TEST_CONF, moduleDescriptor, projectDependency);
-        DefaultDependencyDescriptor dependencyDescriptor = (DefaultDependencyDescriptor) moduleDescriptor.getDependencies()[0];
-
-        assertDependencyDescriptorHasCommonFixtureValues(dependencyDescriptor);
-        assertTrue(dependencyDescriptor.isChanging());
-        assertFalse(dependencyDescriptor.isForce());
-        assertEquals(someModuleRevisionId,
-                dependencyDescriptor.getDependencyRevisionId());
-    }
-
-    private ProjectDependency createProjectDependency(String dependencyConfiguration) {
-        AbstractProject dependencyProject = HelperUtil.createRootProject();
-        dependencyProject.setGroup("someGroup");
-        dependencyProject.setVersion("someVersion");
-        return new DefaultProjectDependency(dependencyProject, dependencyConfiguration, new ProjectDependenciesBuildInstruction(Collections.<String>emptyList()));
-    }
-
-    @Test
-    public void addExternalModuleDependenciesWithSameModuleRevisionIdAndDifferentConfsShouldBePartOfSameDependencyDescriptor() {
-        final ProjectDependency dependency1 = createProjectDependency(TEST_DEP_CONF);
-        final ProjectDependency dependency2 = createProjectDependency(TEST_OTHER_DEP_CONF);
-
-        context.checking(new Expectations() {{
-            allowing(descriptorStrategyStub).isChanging();
-            will(returnValue(true));
-            allowing(descriptorStrategyStub).createModuleRevisionId(dependency1);
-            will(returnValue(IvyUtil.createModuleRevisionId(dependency1)));
-            allowing(descriptorStrategyStub).createModuleRevisionId(dependency2);
-            will(returnValue(IvyUtil.createModuleRevisionId(dependency2)));
-        }});
-        
-        assertThataddDependenciesWithSameModuleRevisionIdAndDifferentConfsShouldBePartOfSameDependencyDescriptor(
-                dependency1, dependency2, projectDependencyDescriptorFactory
-        );
-    }
-
-    @Test
-    public void ivyFileModuleRevisionIdShouldBeDeterminedByModuleForPublicDescriptorWithoutExtraAttributes() {
-        ProjectDependency projectDependency = createProjectDependency(TEST_CONF);
-        Module module = ((ProjectInternal) projectDependency.getDependencyProject()).getModule();
-        ModuleRevisionId moduleRevisionId =
-                ProjectDependencyDescriptorFactory.IVY_FILE_DESCRIPTOR_STRATEGY.createModuleRevisionId(projectDependency);
-        assertThat(moduleRevisionId.getOrganisation(), equalTo(module.getGroup()));
-        assertThat(moduleRevisionId.getName(), equalTo(module.getName()));
-        assertThat(moduleRevisionId.getRevision(), equalTo(module.getVersion()));
-        assertThat(moduleRevisionId.getExtraAttributes(), equalTo((Map) new HashMap()));
-    }
-
-    @Test
-    public void resolveModuleRevisionIdShouldBeDeterminedByModuleForResolvePlusExtraAttributes() {
-        ProjectDependency projectDependency = createProjectDependency(TEST_CONF);
-        Module module = ((ProjectInternal) projectDependency.getDependencyProject()).getModule();
-        ModuleRevisionId moduleRevisionId =
-                ProjectDependencyDescriptorFactory.RESOLVE_DESCRIPTOR_STRATEGY.createModuleRevisionId(projectDependency);
-        assertThat(moduleRevisionId.getOrganisation(), equalTo(module.getGroup()));
-        assertThat(moduleRevisionId.getName(), equalTo(module.getName()));
-        assertThat(moduleRevisionId.getRevision(), equalTo(module.getVersion()));
-        assertThat(moduleRevisionId.getExtraAttributes(),
-                equalTo((Map) WrapUtil.toMap(DependencyDescriptorFactory.PROJECT_PATH_KEY, projectDependency.getDependencyProject().getPath())));
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomTest.groovy
deleted file mode 100644
index 2bfee59..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/DefaultMavenPomTest.groovy
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.publish.maven
-
-import org.apache.commons.lang.builder.EqualsBuilder
-import org.apache.maven.model.Dependency
-import org.gradle.api.Action
-import org.gradle.api.artifacts.Configuration
-import org.gradle.api.artifacts.ConfigurationContainer
-import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer
-import org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer
-import org.gradle.api.internal.artifacts.publish.maven.dependencies.PomDependenciesConverter
-import org.gradle.api.internal.file.FileResolver
-import org.gradle.util.TemporaryFolder
-import org.gradle.util.TestFile
-import org.junit.Rule
-import spock.lang.Specification
-import org.apache.maven.model.Model
-
-class DefaultMavenPomTest extends Specification {
-    static final String EXPECTED_PACKAGING = "something";
-    static final String EXPECTED_GROUP_ID = "someGroup";
-    static final String EXPECTED_ARTIFACT_ID = "artifactId";
-    static final String EXPECTED_VERSION = "version";
-
-    @Rule
-    TemporaryFolder tmpDir = new TemporaryFolder()
-
-    Conf2ScopeMappingContainer conf2ScopeMappingContainer = new DefaultConf2ScopeMappingContainer()
-    PomDependenciesConverter pomDependenciesConverterStub = Mock()
-    ConfigurationContainer configurationContainerStub = Mock()
-    FileResolver fileResolver = Mock()
-    DefaultMavenPom mavenPom = new DefaultMavenPom(configurationContainerStub, conf2ScopeMappingContainer, pomDependenciesConverterStub,
-            fileResolver)
-
-    void setup() {
-        mavenPom.packaging = EXPECTED_PACKAGING
-        mavenPom.groupId = EXPECTED_GROUP_ID
-        mavenPom.artifactId = EXPECTED_ARTIFACT_ID
-        mavenPom.version = EXPECTED_VERSION
-    }
-
-    def init() {
-        expect:
-        mavenPom.scopeMappings.is(conf2ScopeMappingContainer)
-        mavenPom.configurations.is(configurationContainerStub)
-        mavenPom.fileResolver.is(fileResolver)
-        mavenPom.mavenProject.modelVersion == "4.0.0"
-    }
-
-    def setModel() {
-        def newModel = new Model()
-
-        when:
-        mavenPom.model = newModel
-
-        then:
-        mavenPom.model.is(newModel)
-    }
-
-    def effectivePomShouldHaveGeneratedDependencies() {
-        Set configurations = [Mock(Configuration)]
-        configurationContainerStub.getAll() >> configurations
-        List generatedDependencies = [new Dependency(groupId: 'someGroup')]
-        List manuallyAddedDependencies = [new Dependency()]
-        pomDependenciesConverterStub.convert(conf2ScopeMappingContainer, configurations) >> generatedDependencies
-
-        when:
-        mavenPom.dependencies = manuallyAddedDependencies.clone()
-
-        then:
-        EqualsBuilder.reflectionEquals(mavenPom.getEffectivePom().getMavenProject().getDependencies(), manuallyAddedDependencies + generatedDependencies)
-
-        when:
-        mavenPom.dependencies = []
-
-        then:
-        mavenPom.getEffectivePom().getMavenProject().getDependencies() == generatedDependencies
-    }
-
-    def configureActionsShouldBeAppliedAgainstEffectivePom() {
-        mavenPom.configurations = null
-        when:
-        mavenPom.whenConfigured(new Action() {
-            void execute(def mavenPom) {
-                mavenPom.mavenProject.inceptionYear = '1999'
-            }
-        })
-
-        then:
-        mavenPom.effectivePom.mavenProject.inceptionYear == '1999'
-        mavenPom.mavenProject.inceptionYear == null
-    }
-
-
-    def writeShouldUseEffectivePom() {
-        Set configurations = [Mock(Configuration)]
-        configurationContainerStub.getAll() >> configurations
-        List generatedDependencies = [new Dependency(groupId: 'someGroup')]
-        pomDependenciesConverterStub.convert(conf2ScopeMappingContainer, configurations) >> generatedDependencies
-
-        when:
-        StringWriter pomWriter = new StringWriter()
-        mavenPom.writeTo pomWriter
-
-        then:
-        pomWriter.toString().contains('someGroup')
-    }
-
-    def effectivePomWithNullConfigurationsShouldWork() {
-        when:
-        mavenPom.configurations = null
-
-        then:
-        mavenPom.getEffectivePom().getMavenProject().getDependencies() == []
-    }
-
-    void projectBuilder() {
-        mavenPom.mavenProject.inceptionYear = '2007'
-        mavenPom.mavenProject.description = 'some description'
-        mavenPom.project {
-            inceptionYear '2008'
-            licenses {
-                license {
-                    name 'The Apache Software License, Version 2.0'
-                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-                    distribution 'repo'
-                }
-            }
-        }
-
-        expect:
-        mavenPom.mavenProject.modelVersion == "4.0.0"
-        mavenPom.version == EXPECTED_VERSION
-        mavenPom.mavenProject.description == 'some description'
-        mavenPom.mavenProject.inceptionYear == '2008'
-        mavenPom.mavenProject.licenses.size() == 1
-        mavenPom.mavenProject.licenses[0].name == 'The Apache Software License, Version 2.0'
-        mavenPom.mavenProject.licenses[0].url == 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-        mavenPom.mavenProject.licenses[0].distribution == 'repo'
-    }
-
-    void writeToShouldApplyXmlActions() {
-        mavenPom.configurations = null
-        StringWriter pomWriter = new StringWriter()
-
-        when:
-        mavenPom.withXml {xmlProvider ->
-            xmlProvider.asString().append('someAppendix')
-        }
-        mavenPom.writeTo(pomWriter);
-
-        then:
-        pomWriter.toString().endsWith("someAppendix")
-    }
-
-    void writeToWritesCorrectPom() {
-        mavenPom.configurations = null
-        TestFile pomFile = tmpDir.file('someNonexistingDir').file('someFile')
-        fileResolver.resolve('file') >> pomFile
-
-        when:
-        mavenPom.writeTo('file');
-
-        then:
-        pomFile.text == '''<?xml version="1.0" encoding="UTF-8"?>
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>someGroup</groupId>
-  <artifactId>artifactId</artifactId>
-  <version>version</version>
-  <packaging>something</packaging>
-</project>
-'''
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomTest.java
deleted file mode 100644
index 221a8af..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/artifacts/publish/maven/deploy/DefaultArtifactPomTest.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.artifacts.publish.maven.deploy;
-
-import org.apache.ivy.core.module.descriptor.Artifact;
-import org.apache.ivy.core.module.descriptor.DefaultArtifact;
-import org.apache.ivy.core.module.id.ModuleRevisionId;
-import org.gradle.api.InvalidUserDataException;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.PublishArtifact;
-import org.gradle.api.artifacts.maven.MavenPom;
-import org.gradle.api.internal.artifacts.publish.maven.DefaultMavenPom;
-import org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer;
-import org.gradle.api.internal.artifacts.publish.maven.dependencies.PomDependenciesConverter;
-import org.gradle.api.internal.file.FileResolver;
-import org.gradle.util.GUtil;
-import org.gradle.util.TemporaryFolder;
-import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultArtifactPomTest {
-    private DefaultArtifactPom artifactPom;
-    private MavenPom testPom;
-
-    @Rule
-    public TemporaryFolder tmpDir = new TemporaryFolder();
-
-    Mockery context = new JUnit4Mockery();
-
-    @Before
-    public void setUp() {
-        testPom = new DefaultMavenPom(context.mock(ConfigurationContainer.class), new DefaultConf2ScopeMappingContainer(),
-                context.mock(PomDependenciesConverter.class), context.mock(FileResolver.class));
-        artifactPom = new DefaultArtifactPom(testPom);
-    }
-
-    @Test
-    public void pomWithMainArtifact() {
-        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
-        File mainFile = new File("someFile");
-
-        artifactPom.addArtifact(mainArtifact, mainFile);
-
-        assertThat(artifactPom.getArtifact().getName(), equalTo("someName"));
-        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
-        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
-
-        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
-        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
-        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
-        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
-    }
-
-    @Test
-    public void pomWithMainArtifactAndClassifierArtifacts() {
-        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
-        File mainFile = new File("someFile");
-        Artifact classifierArtifact = createTestArtifact("otherName", "javadoc", "zip");
-        File classifierFile = new File("someClassifierFile");
-
-        artifactPom.addArtifact(mainArtifact, mainFile);
-        artifactPom.addArtifact(classifierArtifact, classifierFile);
-
-        assertThat(artifactPom.getArtifact().getName(), equalTo("someName"));
-        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
-        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
-
-        PublishArtifact artifact = singleItem(artifactPom.getAttachedArtifacts());
-        assertThat(artifact.getName(), equalTo("someName"));
-        assertThat(artifact.getExtension(), equalTo("zip"));
-        assertThat(artifact.getType(), equalTo("zip"));
-        assertThat(artifact.getClassifier(), equalTo("javadoc"));
-        assertThat(artifact.getFile(), equalTo(classifierFile));
-
-        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
-        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
-        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
-        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
-    }
-
-    @Test
-    public void pomWithClassifierArtifactsOnly() {
-        File classifierFile = new File("someClassifierFile");
-        Artifact classifierArtifact = createTestArtifact("someName", "javadoc", "zip");
-
-        artifactPom.addArtifact(classifierArtifact, classifierFile);
-
-        assertThat(artifactPom.getArtifact(), nullValue());
-
-        PublishArtifact artifact = singleItem(artifactPom.getAttachedArtifacts());
-        assertThat(artifact.getName(), equalTo("someName"));
-        assertThat(artifact.getExtension(), equalTo("zip"));
-        assertThat(artifact.getType(), equalTo("zip"));
-        assertThat(artifact.getClassifier(), equalTo("javadoc"));
-        assertThat(artifact.getFile(), equalTo(classifierFile));
-
-        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
-        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
-        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
-        assertThat(artifactPom.getPom().getPackaging(), equalTo("jar"));
-    }
-
-    @Test
-    public void pomWithMainArtifactAndMetadataArtifacts() {
-        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
-        File mainFile = new File("someFile");
-        File metadataFile = new File("someMetadataFile");
-        Artifact metadataArtifact = createTestArtifact("otherName", null, "sometype");
-
-        artifactPom.addArtifact(mainArtifact, mainFile);
-        artifactPom.addArtifact(metadataArtifact, metadataFile);
-
-        assertThat(artifactPom.getArtifact().getName(), equalTo("someName"));
-        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
-        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
-
-        PublishArtifact artifact = singleItem(artifactPom.getAttachedArtifacts());
-        assertThat(artifact.getName(), equalTo("someName"));
-        assertThat(artifact.getExtension(), equalTo("sometype"));
-        assertThat(artifact.getType(), equalTo("sometype"));
-        assertThat(artifact.getClassifier(), nullValue());
-        assertThat(artifact.getFile(), equalTo(metadataFile));
-
-        assertThat(artifactPom.getPom().getGroupId(), equalTo("org"));
-        assertThat(artifactPom.getPom().getArtifactId(), equalTo("someName"));
-        assertThat(artifactPom.getPom().getVersion(), equalTo("1.0"));
-        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
-    }
-    
-    @Test(expected = InvalidUserDataException.class)
-    public void addClassifierTwiceShouldThrowInvalidUserDataEx() {
-        File classifierFile = new File("someClassifierFile");
-        Artifact classifierArtifact = createTestArtifact("someName", "javadoc");
-        artifactPom.addArtifact(classifierArtifact, classifierFile);
-        artifactPom.addArtifact(classifierArtifact, classifierFile);
-    }
-
-    @Test(expected = InvalidUserDataException.class)
-    public void addMainArtifactTwiceShouldThrowInvalidUserDataEx() {
-        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
-        File mainFile = new File("someFile");
-        artifactPom.addArtifact(mainArtifact, mainFile);
-        artifactPom.addArtifact(mainArtifact, mainFile);
-    }
-
-    @Test
-    public void cannotAddMultipleArtifactsWithTheSameTypeAndClassifier() {
-
-        // No classifier
-        Artifact mainArtifact = createTestArtifact("someName", null);
-        artifactPom.addArtifact(mainArtifact, new File("someFile"));
-
-        assertIsDuplicate(mainArtifact, new File("someFile"));
-        assertIsDuplicate(mainArtifact, new File("otherFile"));
-        assertIsDuplicate(createTestArtifact("otherName", null), new File("otherFile"));
-
-        // Classifier
-        Artifact classifierArtifact = createTestArtifact("someName", "classifier");
-        artifactPom.addArtifact(classifierArtifact, new File("classifierFile"));
-
-        assertIsDuplicate(classifierArtifact, new File("someFile"));
-        assertIsDuplicate(classifierArtifact, new File("otherFile"));
-        assertIsDuplicate(createTestArtifact("otherName", "classifier"), new File("otherFile"));
-    }
-
-    private void assertIsDuplicate(Artifact artifact, File file) {
-        try {
-            artifactPom.addArtifact(artifact, file);
-            fail();
-        } catch (InvalidUserDataException e) {
-            assertThat(e.getMessage(), startsWith("A POM cannot have multiple artifacts with the same type and classifier."));
-        }
-    }
-
-    @Test
-    public void initWithCustomPomSettings() {
-        Artifact mainArtifact = createTestArtifact("someName", null, "mainPackaging");
-        File mainFile = new File("someFile");
-
-        testPom.setArtifactId("customArtifactId");
-        testPom.setGroupId("customGroupId");
-        testPom.setVersion("customVersion");
-        testPom.setPackaging("customPackaging");
-
-        artifactPom.addArtifact(mainArtifact, mainFile);
-
-        assertThat(artifactPom.getArtifact().getName(), equalTo("customArtifactId"));
-        assertThat(artifactPom.getArtifact().getExtension(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getType(), equalTo("mainPackaging"));
-        assertThat(artifactPom.getArtifact().getClassifier(), nullValue());
-        assertThat(artifactPom.getArtifact().getFile(), equalTo(mainFile));
-
-        assertThat(artifactPom.getPom().getGroupId(), equalTo("customGroupId"));
-        assertThat(artifactPom.getPom().getArtifactId(), equalTo("customArtifactId"));
-        assertThat(artifactPom.getPom().getVersion(), equalTo("customVersion"));
-        assertThat(artifactPom.getPom().getPackaging(), equalTo("mainPackaging"));
-    }
-
-    private Artifact createTestArtifact(String name, String classifier) {
-        return createTestArtifact(name, classifier, "jar");
-    }
-
-    private Artifact createTestArtifact(String name, String classifier, String type) {
-        Map<String, String> extraAttributes = new HashMap<String, String>();
-        if (classifier != null) {
-            extraAttributes.put(Dependency.CLASSIFIER, classifier);
-        }
-        return new DefaultArtifact(ModuleRevisionId.newInstance("org", name, "1.0"), null, name, type, type, extraAttributes);
-    }
-
-    @Test
-    public void writePom() {
-        final MavenPom mavenPomMock = context.mock(MavenPom.class);
-        DefaultArtifactPom artifactPom = new DefaultArtifactPom(mavenPomMock);
-        final File somePomFile = new File(tmpDir.getDir(), "someDir/somePath");
-        context.checking(new Expectations() {{
-            allowing(mavenPomMock).getArtifactId();
-            will(returnValue("artifactId"));
-            one(mavenPomMock).writeTo(with(any(FileWriter.class)));
-        }});
-
-        PublishArtifact artifact = artifactPom.writePom(somePomFile);
-
-        assertThat(artifact.getName(), equalTo("artifactId"));
-        assertThat(artifact.getType(), equalTo("pom"));
-        assertThat(artifact.getExtension(), equalTo("pom"));
-        assertThat(artifact.getClassifier(), nullValue());
-        assertThat(artifact.getFile(), equalTo(somePomFile));
-
-        assertThat(somePomFile.isFile(), equalTo(true));
-    }
-
-    private <T> T singleItem(Iterable<? extends T> collection) {
-        List<T> elements = GUtil.addLists(collection);
-        assertThat(elements.size(), equalTo(1));
-        return elements.get(0);
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileCollectionTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileCollectionTest.java
deleted file mode 100644
index 4ac3a4f..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/AbstractFileCollectionTest.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file;
-
-import org.gradle.api.Task;
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.file.FileTree;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.tasks.StopExecutionException;
-import org.gradle.api.tasks.TaskDependency;
-import org.gradle.util.TestFile;
-import org.gradle.util.HelperUtil;
-import org.gradle.util.TemporaryFolder;
-import org.hamcrest.Matcher;
-import org.junit.Rule;
-import org.junit.Test;
-
-import java.io.File;
-import java.util.*;
-
-import static org.gradle.api.tasks.AntBuilderAwareUtil.*;
-import static org.gradle.util.Matchers.*;
-import static org.gradle.util.WrapUtil.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-public class AbstractFileCollectionTest {
-    @Rule
-    public TemporaryFolder testDir = new TemporaryFolder();
-
-    @Test
-    public void usesDisplayNameAsToString() {
-        TestFileCollection collection = new TestFileCollection();
-        assertThat(collection.toString(), equalTo("collection-display-name"));
-    }
-
-    @Test
-    public void canIterateOverFiles() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        Iterator<File> iterator = collection.iterator();
-        assertThat(iterator.next(), sameInstance(file1));
-        assertThat(iterator.next(), sameInstance(file2));
-        assertFalse(iterator.hasNext());
-    }
-
-    @Test
-    public void canGetSingleFile() {
-        File file = new File("f1");
-
-        TestFileCollection collection = new TestFileCollection(file);
-        assertThat(collection.getSingleFile(), sameInstance(file));
-    }
-
-    @Test
-    public void failsToGetSingleFileWhenCollectionContainsMultipleFiles() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        try {
-            collection.getSingleFile();
-            fail();
-        } catch (IllegalStateException e) {
-            assertThat(e.getMessage(), equalTo(
-                    "Expected collection-display-name to contain exactly one file, however, it contains 2 files."));
-        }
-    }
-
-    @Test
-    public void failsToGetSingleFileWhenCollectionIsEmpty() {
-        TestFileCollection collection = new TestFileCollection();
-        try {
-            collection.getSingleFile();
-            fail();
-        } catch (IllegalStateException e) {
-            assertThat(e.getMessage(), equalTo(
-                    "Expected collection-display-name to contain exactly one file, however, it contains no files."));
-        }
-    }
-
-    @Test
-    public void containsFile() {
-        File file1 = new File("f1");
-
-        TestFileCollection collection = new TestFileCollection(file1);
-        assertTrue(collection.contains(file1));
-        assertFalse(collection.contains(new File("f2")));
-    }
-
-    @Test
-    public void canGetFilesAsAPath() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        assertThat(collection.getAsPath(), equalTo(file1 + File.pathSeparator + file2));
-    }
-
-    @Test
-    public void canAddCollectionsTogether() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-        File file3 = new File("f3");
-
-        TestFileCollection collection1 = new TestFileCollection(file1, file2);
-        TestFileCollection collection2 = new TestFileCollection(file2, file3);
-        FileCollection sum = collection1.plus(collection2);
-        assertThat(sum, instanceOf(UnionFileCollection.class));
-        assertThat(sum.getFiles(), equalTo(toLinkedSet(file1, file2, file3)));
-    }
-
-    @Test
-    public void canSubtractCollections() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-        File file3 = new File("f3");
-
-        TestFileCollection collection1 = new TestFileCollection(file1, file2);
-        TestFileCollection collection2 = new TestFileCollection(file2, file3);
-        FileCollection sum = collection1.minus(collection2);
-        assertThat(sum.getFiles(), equalTo(toLinkedSet(file1)));
-    }
-
-    @Test
-    public void cannotAddCollectionToThisCollection() {
-        try {
-            new TestFileCollection().add(new TestFileCollection());
-            fail();
-        } catch (UnsupportedOperationException e) {
-            assertThat(e.getMessage(), equalTo("Collection-display-name does not allow modification."));
-        }
-    }
-
-    @Test
-    public void canAddToAntBuilderAsResourceCollection() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        assertSetContains(collection, toSet("f1", "f2"));
-    }
-
-    @Test
-    public void includesOnlyExistingFilesWhenAddedToAntBuilderAsAFileSetOrMatchingTask() {
-        TestFile testDir = this.testDir.getDir();
-        TestFile file1 = testDir.file("f1").touch();
-        TestFile dir1 = testDir.file("dir1").createDir();
-        TestFile file2 = dir1.file("f2").touch();
-        TestFile missing = testDir.file("f3");
-        testDir.file("f2").touch();
-        testDir.file("ignored1").touch();
-        dir1.file("f1").touch();
-        dir1.file("ignored1").touch();
-
-        TestFileCollection collection = new TestFileCollection(file1, file2, dir1, missing);
-        assertSetContainsForFileSet(collection, toSet("f1", "f2"));
-        assertSetContainsForMatchingTask(collection, toSet("f1", "f2"));
-    }
-
-    @Test
-    public void isEmptyWhenFilesIsEmpty() {
-        assertTrue(new TestFileCollection().isEmpty());
-        assertFalse(new TestFileCollection(new File("f1")).isEmpty());
-    }
-    
-    @Test
-    public void throwsStopExceptionWhenEmpty() {
-        TestFileCollection collection = new TestFileCollection();
-        try {
-            collection.stopExecutionIfEmpty();
-            fail();
-        } catch (StopExecutionException e) {
-            assertThat(e.getMessage(), equalTo("Collection-display-name does not contain any files."));
-        }
-    }
-
-    @Test
-    public void doesNotThrowStopExceptionWhenNotEmpty() {
-        TestFileCollection collection = new TestFileCollection(new File("f1"));
-        collection.stopExecutionIfEmpty();
-    }
-
-    @Test
-    public void canConvertToCollectionTypes() {
-        File file = new File("f1");
-        TestFileCollection collection = new TestFileCollection(file);
-
-        assertThat(collection.asType(Collection.class), equalTo((Object) toLinkedSet(file)));
-        assertThat(collection.asType(Set.class), equalTo((Object) toLinkedSet(file)));
-        assertThat(collection.asType(List.class), equalTo((Object) toList(file)));
-    }
-
-    @Test
-    public void canConvertToArray() {
-        File file = new File("f1");
-        TestFileCollection collection = new TestFileCollection(file);
-
-        assertThat(collection.asType(File[].class), equalTo((Object) toArray(file)));
-    }
-
-    @Test
-    public void canConvertCollectionWithSingleFileToFile() {
-        File file = new File("f1");
-        TestFileCollection collection = new TestFileCollection(file);
-
-        assertThat(collection.asType(File.class), equalTo((Object) file));
-    }
-
-    @Test
-    public void canConvertToFileTree() {
-        TestFileCollection collection = new TestFileCollection();
-        assertThat(collection.asType(FileTree.class), notNullValue());
-    }
-
-    @Test
-    public void throwsUnsupportedOperationExceptionWhenConvertingToUnsupportedType() {
-        try {
-            new TestFileCollection().asType(Integer.class);
-            fail();
-        } catch (UnsupportedOperationException e) {
-            assertThat(e.getMessage(), equalTo(
-                    "Cannot convert collection-display-name to type Integer, as this type is not supported."));
-        }
-    }
-
-    @Test
-    public void toFileTreeReturnsSingletonTreeForEachFileInCollection() {
-        File file = new File("f1");
-
-        TestFileCollection collection = new TestFileCollection(file);
-        FileTree tree = collection.getAsFileTree();
-        assertThat(tree, instanceOf(CompositeFileTree.class));
-        CompositeFileTree compositeTree = (CompositeFileTree) tree;
-        assertThat(compositeTree.getSourceCollections(), hasItems((Matcher) instanceOf(SingletonFileTree.class)));
-    }
-
-    @Test
-    public void canFilterContentsOfCollectionUsingSpec() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        FileCollection filtered = collection.filter(new Spec<File>() {
-            public boolean isSatisfiedBy(File element) {
-                return element.getName().equals("f1");
-            }
-        });
-        assertThat(filtered.getFiles(), equalTo(toSet(file1)));
-    }
-
-    @Test
-    public void canFilterContentsOfCollectionUsingClosure() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        FileCollection filtered = collection.filter(HelperUtil.toClosure("{f -> f.name == 'f1'}"));
-        assertThat(filtered.getFiles(), equalTo(toSet(file1)));
-    }
-    
-    @Test
-    public void filteredCollectionIsLive() {
-        File file1 = new File("f1");
-        File file2 = new File("f2");
-        File file3 = new File("dir/f1");
-
-        TestFileCollection collection = new TestFileCollection(file1, file2);
-        FileCollection filtered = collection.filter(HelperUtil.toClosure("{f -> f.name == 'f1'}"));
-        assertThat(filtered.getFiles(), equalTo(toSet(file1)));
-
-        collection.files.add(file3);
-        assertThat(filtered.getFiles(), equalTo(toSet(file1, file3)));
-    }
-
-    @Test
-    public void hasNoDependencies() {
-        assertThat(new TestFileCollection().getBuildDependencies().getDependencies(null), isEmpty());
-    }
-
-    @Test
-    public void fileTreeHasSameDependenciesAsThis() {
-        TestFileCollectionWithDependency collection = new TestFileCollectionWithDependency();
-        collection.files.add(new File("f1"));
-
-        assertThat(collection.getAsFileTree().getBuildDependencies(), sameInstance(collection.dependency));
-        assertThat(collection.getAsFileTree().matching(HelperUtil.TEST_CLOSURE).getBuildDependencies(), sameInstance(collection.dependency));
-    }
-
-    @Test
-    public void filteredCollectionHasSameDependenciesAsThis() {
-        TestFileCollectionWithDependency collection = new TestFileCollectionWithDependency();
-
-        assertThat(collection.filter(HelperUtil.toClosure("{true}")).getBuildDependencies(), sameInstance( collection.dependency));
-    }
-
-    private class TestFileCollection extends AbstractFileCollection {
-        Set<File> files = new LinkedHashSet<File>();
-
-        private TestFileCollection(File... files) {
-            this.files.addAll(Arrays.asList(files));
-        }
-
-        public String getDisplayName() {
-            return "collection-display-name";
-        }
-
-        public Set<File> getFiles() {
-            return files;
-        }
-    }
-
-    private class TestFileCollectionWithDependency extends TestFileCollection {
-        TaskDependency dependency = new TaskDependency() {
-            public Set<? extends Task> getDependencies(Task task) {
-                throw new UnsupportedOperationException();
-            }
-        };
-
-        @Override
-        public TaskDependency getBuildDependencies() {
-            return dependency;
-        }
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/BaseDirConverterTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/BaseDirConverterTest.groovy
deleted file mode 100644
index 1e93c2f..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/BaseDirConverterTest.groovy
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-
-package org.gradle.api.internal.file
-
-import org.gradle.api.InvalidUserDataException
-import org.gradle.api.PathValidation
-import org.gradle.api.file.FileCollection
-import org.gradle.util.TemporaryFolder
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-import java.util.concurrent.Callable
-import org.gradle.util.OperatingSystem
-
-/**
- * @author Hans Dockter
- */
-class BaseDirConverterTest {
-    static final String TEST_PATH = 'testpath'
-
-    File baseDir
-    File testFile
-    File testDir
-
-    BaseDirConverter baseDirConverter
-    @Rule public TemporaryFolder rootDir = new TemporaryFolder();
-
-    @Before public void setUp() {
-        baseDir = rootDir.dir
-        baseDirConverter = new BaseDirConverter(baseDir)
-        testFile = new File(baseDir, 'testfile')
-        testDir = new File(baseDir, 'testdir')
-    }
-
-    @Test(expected = IllegalArgumentException) public void testWithNullPath() {
-        baseDirConverter.resolve(null)
-    }
-
-    @Test public void testWithNoPathValidation() {
-        // No exceptions means test has passed
-        baseDirConverter.resolve(TEST_PATH)
-        baseDirConverter.resolve(TEST_PATH, PathValidation.NONE)
-    }
-
-    @Test public void testPathValidationWithNonExistingFile() {
-        try {
-            baseDirConverter.resolve(testFile.name, PathValidation.FILE)
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("File '$testFile.canonicalFile' does not exist.".toString()))
-        }
-    }
-
-    @Test public void testPathValidationForFileWithDirectory() {
-        testDir.mkdir()
-        try {
-            baseDirConverter.resolve(testDir.name, PathValidation.FILE)
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("File '$testDir.canonicalFile' is not a file.".toString()))
-        }
-    }
-
-    @Test public void testWithValidFile() {
-        testFile.createNewFile()
-        baseDirConverter.resolve(testFile.name, PathValidation.FILE)
-    }
-
-    @Test public void testPathValidationWithNonExistingDirectory() {
-        try {
-            baseDirConverter.resolve(testDir.name, PathValidation.DIRECTORY)
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("Directory '$testDir.canonicalFile' does not exist.".toString()))
-        }
-    }
-
-    @Test public void testPathValidationWithValidDirectory() {
-        testDir.mkdir()
-        baseDirConverter.resolve(testDir.name, PathValidation.DIRECTORY)
-    }
-
-    @Test public void testPathValidationForDirectoryWithFile() {
-        testFile.createNewFile()
-        try {
-            baseDirConverter.resolve(testFile.name, PathValidation.DIRECTORY)
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("Directory '$testFile.canonicalFile' is not a directory.".toString()))
-        }
-    }
-
-    @Test public void testPathValidationForExistingDirAndFile() {
-        testDir.mkdir()
-        testFile.createNewFile()
-        baseDirConverter.resolve(testDir.name, PathValidation.EXISTS)
-        baseDirConverter.resolve(testFile.name, PathValidation.EXISTS)
-    }
-
-    @Test public void testExistsPathValidationWithNonExistingDir() {
-        try {
-            baseDirConverter.resolve(testDir.name, PathValidation.EXISTS)
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("File '$testDir.canonicalFile' does not exist.".toString()))
-        }
-    }
-
-    @Test public void testExistsPathValidationWithNonExistingFile() {
-        try {
-            baseDirConverter.resolve(testFile.name, PathValidation.EXISTS)
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("File '$testFile.canonicalFile' does not exist.".toString()))
-        }
-    }
-
-    @Test public void testResolveAbsolutePath() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.path))
-    }
-
-    @Test public void testResolveRelativePath() {
-        String relativeFileName = "relative"
-        assertEquals(new File(baseDir, relativeFileName), baseDirConverter.resolve(relativeFileName))
-    }
-
-    @Test public void testResolveFileWithAbsolutePath() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile))
-    }
-
-    @Test public void testResolveRelativeObject() {
-        assertEquals(new File(baseDir, "12"), baseDirConverter.resolve(12))
-    }
-
-    @Test public void testResolveFileWithRelativePath() {
-        File relativeFile = new File('relative')
-        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve(relativeFile))
-    }
-
-    @Test public void testResolveAbsolutePathOnCaseInsensitiveFileSystemToUri() {
-        if (OperatingSystem.current().isCaseSensitiveFileSystem()) {
-            return
-        }
-
-        String path = baseDir.absolutePath.toLowerCase()
-        assertEquals(baseDir, baseDirConverter.resolve(path))
-    }
-
-    @Test public void testResolveRelativeFileURIString() {
-        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve('file:relative'))
-        assertEquals(new File(baseDir.parentFile, 'relative'), baseDirConverter.resolve('file:../relative'))
-    }
-
-    @Test public void testResolveAbsoluteFileURIString() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI().toString()))
-    }
-
-    @Test public void testResolveAbsoluteFileURI() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI()))
-    }
-
-    @Test public void testResolveAbsoluteFileURL() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI().toURL()))
-    }
-
-    @Test public void testResolveFilePathWithURIEncodedAndReservedCharacters() {
-        File absoluteFile = new File('white%20space').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.absolutePath))
-        absoluteFile = new File('white space').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.absolutePath))
-    }
-
-    @Test public void testResolveURIStringWithEncodedAndReservedCharacters() {
-        assertEquals(new File(baseDir, 'white space'), baseDirConverter.resolve('file:white%20space'))
-        assertEquals(new File(baseDir, 'not%encoded'), baseDirConverter.resolve('file:not%encoded'))
-        assertEquals(new File(baseDir, 'bad%1'), baseDirConverter.resolve('file:bad%1'))
-        assertEquals(new File(baseDir, 'white space'), baseDirConverter.resolve('file:white space'))
-    }
-
-    @Test public void testResolveURIWithReservedCharacters() {
-        File absoluteFile = new File('white space').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI()))
-    }
-
-    @Test public void testResolveURLWithReservedCharacters() {
-        File absoluteFile = new File('white space').canonicalFile
-        assertEquals(absoluteFile, baseDirConverter.resolve(absoluteFile.toURI().toURL()))
-    }
-
-    @Test public void testCannotResolveNonFileURI() {
-        try {
-            baseDirConverter.resolve("http://www.gradle.org")
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo('Cannot convert URL \'http://www.gradle.org\' to a file.'))
-        }
-    }
-
-    @Test public void testResolveClosure() {
-        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve({'relative'}))
-    }
-
-    @Test public void testResolveCallable() {
-        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve({'relative'} as Callable))
-    }
-
-    @Test public void testResolveFileSource() {
-        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve(baseDirConverter.resolveLater('relative')))
-    }
-
-    @Test public void testResolveNestedClosuresAndCallables() {
-        Callable callable = {'relative'} as Callable
-        Closure closure = {callable}
-        assertEquals(new File(baseDir, 'relative'), baseDirConverter.resolve(closure))
-    }
-
-    @Test public void testFiles() {
-        FileCollection collection = baseDirConverter.resolveFiles('a', 'b')
-        assertThat(collection, instanceOf(PathResolvingFileCollection))
-        assertThat(collection.sources, equalTo(['a', 'b']))
-    }
-
-    @Test public void testFilesReturnsSourceFileCollection() {
-        FileCollection source = baseDirConverter.resolveFiles('a')
-        FileCollection collection = baseDirConverter.resolveFiles(source)
-        assertThat(collection, sameInstance(source))
-    }
-
-    @Test public void testResolveAbsolutePathToUri() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile.toURI(), baseDirConverter.resolveUri(absoluteFile.path))
-    }
-
-    @Test public void testResolveRelativePathToUri() {
-        assertEquals(new File(baseDir, 'relative').toURI(), baseDirConverter.resolveUri('relative'))
-    }
-
-    @Test public void testResolveFileWithAbsolutePathToUri() {
-        File absoluteFile = new File('nonRelative').canonicalFile
-        assertEquals(absoluteFile.toURI(), baseDirConverter.resolveUri(absoluteFile))
-    }
-
-    @Test public void testResolveFileWithRelativePathToUri() {
-        File relativeFile = new File('relative')
-        assertEquals(new File(baseDir, 'relative').toURI(), baseDirConverter.resolveUri(relativeFile))
-    }
-
-    @Test public void testResolveUriStringToUri() {
-        assertEquals(new URI("http://www.gradle.org"), baseDirConverter.resolveUri("http://www.gradle.org"))
-    }
-
-    @Test public void testResolveUriObjectToUri() {
-        URI uri = new URI("http://www.gradle.org")
-        assertEquals(uri, baseDirConverter.resolveUri(uri))
-    }
-
-    @Test public void testResolveUrlObjectToUri() {
-        assertEquals(new URI("http://www.gradle.org"), baseDirConverter.resolveUri(new URL("http://www.gradle.org")))
-    }
-
-    @Test public void testResolveAbsolutePathWithReservedCharsToUri() {
-        assertEquals(new File(baseDir, 'with white%20space').toURI(), baseDirConverter.resolveUri('with white%20space'))
-        assertEquals('with white%20space', baseDirConverter.resolve(baseDirConverter.resolveUri('with white%20space')).name)
-    }
-
-    @Test public void testResolveUriStringWithEncodedCharsToUri() {
-        assertEquals(new URI("http://www.gradle.org/white%20space"), baseDirConverter.resolveUri("http://www.gradle.org/white%20space"))
-    }
-    
-    @Test public void testResolveRelativePathToRelativePath() {
-        assertEquals("relative", baseDirConverter.resolveAsRelativePath("relative"))
-    }
-
-    @Test public void testResolveAbsoluteChildPathToRelativePath() {
-        def absoluteFile = new File(baseDir, 'child').absoluteFile
-        assertEquals('child', baseDirConverter.resolveAsRelativePath(absoluteFile))
-        assertEquals('child', baseDirConverter.resolveAsRelativePath(absoluteFile.absolutePath))
-    }
-
-    @Test public void testResolveAbsoluteSiblingPathToRelativePath() {
-        def absoluteFile = new File(baseDir, '../sibling').absoluteFile
-        assertEquals("..${File.separator}sibling".toString(), baseDirConverter.resolveAsRelativePath(absoluteFile))
-        assertEquals("..${File.separator}sibling".toString(), baseDirConverter.resolveAsRelativePath(absoluteFile.absolutePath))
-    }
-
-    @Test public void testResolveBaseDirToRelativePath() {
-        assertEquals('.', baseDirConverter.resolveAsRelativePath(baseDir))
-        assertEquals('.', baseDirConverter.resolveAsRelativePath(baseDir.absolutePath))
-        assertEquals('.', baseDirConverter.resolveAsRelativePath('.'))
-        assertEquals('.', baseDirConverter.resolveAsRelativePath("../$baseDir.name"))
-    }
-
-    @Test public void testResolveParentDirToRelativePath() {
-        assertEquals('..', baseDirConverter.resolveAsRelativePath(baseDir.parentFile))
-        assertEquals('..', baseDirConverter.resolveAsRelativePath('..'))
-    }
-
-    @Test public void testResolveLater() {
-        String src;
-        Closure cl = { src }
-        FileSource source = baseDirConverter.resolveLater(cl)
-        src = 'file1'
-        assertEquals(new File(baseDir, 'file1'), source.get())
-    }
-    
-    @Test public void testCreateFileResolver() {
-        File newBaseDir = new File(baseDir, 'subdir')
-        assertEquals(new File(newBaseDir, 'file'), baseDirConverter.withBaseDir('subdir').resolve('file'))
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultFileOperationsTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultFileOperationsTest.groovy
deleted file mode 100644
index 9d75a94..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/DefaultFileOperationsTest.groovy
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.api.internal.file
-
-import org.apache.commons.io.FileUtils
-import org.gradle.api.InvalidUserDataException
-import org.gradle.api.PathValidation
-import org.gradle.api.file.ConfigurableFileCollection
-import org.gradle.api.file.FileTree
-import org.gradle.api.internal.file.archive.TarFileTree
-import org.gradle.api.internal.file.archive.ZipFileTree
-import org.gradle.api.internal.file.copy.CopyActionImpl
-import org.gradle.api.internal.file.copy.CopySpecImpl
-import org.gradle.api.internal.tasks.TaskResolver
-import org.gradle.util.TemporaryFolder
-import org.gradle.util.TestFile
-import org.gradle.process.internal.ExecException
-import org.gradle.process.ExecResult
-import org.junit.Rule
-import org.junit.Test
-import spock.lang.Specification
-import org.gradle.util.OperatingSystem
-import org.gradle.util.ClasspathUtil
-
-public class DefaultFileOperationsTest extends Specification {
-    private final FileResolver resolver = Mock()
-    private final TaskResolver taskResolver = Mock()
-    private final TemporaryFileProvider temporaryFileProvider = Mock()
-    private DefaultFileOperations fileOperations = new DefaultFileOperations(resolver, taskResolver, temporaryFileProvider)
-    @Rule
-    public final TemporaryFolder tmpDir = new TemporaryFolder()
-
-    def resolvesFile() {
-        when:
-        TestFile file = expectPathResolved('path')
-
-        then:
-        fileOperations.file('path') == file
-    }
-
-    def resolvesFileWithValidation() {
-        TestFile file = tmpDir.file('path')
-        resolver.resolve('path', PathValidation.EXISTS) >> file
-
-        expect:
-        fileOperations.file('path', PathValidation.EXISTS) == file
-    }
-
-    def resolvesURI() {
-        when:
-        URI uri = expectPathResolvedToUri('path')
-
-        then:
-        fileOperations.uri('path') == uri
-    }
-
-    def resolvesFiles() {
-        when:
-        def fileCollection = fileOperations.files('a', 'b')
-
-        then:
-        fileCollection instanceof PathResolvingFileCollection
-        fileCollection.sources == ['a', 'b']
-        fileCollection.resolver.is(resolver)
-        fileCollection.buildDependency.resolver.is(taskResolver)
-    }
-
-    def createsFileTree() {
-        TestFile baseDir = expectPathResolved('base')
-
-        when:
-        def fileTree = fileOperations.fileTree('base')
-
-        then:
-        fileTree instanceof FileTree
-        fileTree.dir == baseDir
-        fileTree.resolver.is(resolver)
-    }
-
-    def createsFileTreeFromMap() {
-        TestFile baseDir = expectPathResolved('base')
-
-        when:
-        def fileTree = fileOperations.fileTree(dir: 'base')
-
-        then:
-        fileTree instanceof FileTree
-        fileTree.dir == baseDir
-        fileTree.resolver.is(resolver)
-    }
-
-    @Test
-    public void createsFileTreeFromClosure() {
-        TestFile baseDir = expectPathResolved('base')
-
-        when:
-        def fileTree = fileOperations.fileTree { from 'base' }
-
-        then:
-        fileTree instanceof FileTree
-        fileTree.dir == baseDir
-        fileTree.resolver.is(resolver)
-    }
-
-    def createsZipFileTree() {
-        expectPathResolved('path')
-        expectTempFileCreated()
-        when:
-        def zipTree = fileOperations.zipTree('path')
-
-        then:
-        zipTree instanceof ZipFileTree
-    }
-
-    def createsTarFileTree() {
-        expectPathResolved('path')
-        expectTempFileCreated()
-
-        when:
-        def tarTree = fileOperations.tarTree('path')
-
-        then:
-        tarTree instanceof TarFileTree
-    }
-
-    def copiesFiles() {
-        FileTree fileTree = Mock(FileTree)
-        resolver.resolveFilesAsTree(_) >> fileTree
-        // todo we should make this work so that we can be more specific
-//        resolver.resolveFilesAsTree(['file'] as Object[]) >> fileTree
-//        resolver.resolveFilesAsTree(['file'] as Set) >> fileTree
-        fileTree.matching(_) >> fileTree
-        resolver.resolve('dir') >> tmpDir.getDir()
-
-        when:
-        def result = fileOperations.copy { from 'file'; into 'dir' }
-
-        then:
-        result instanceof CopyActionImpl
-        !result.didWork
-    }
-
-    def deletes() {
-        TestFile fileToBeDeleted = tmpDir.file("file")
-        ConfigurableFileCollection fileCollection = new PathResolvingFileCollection(resolver, null, "file")
-        resolver.resolveFiles(["file"] as Object[]) >> fileCollection
-        resolver.resolve("file") >> fileToBeDeleted
-        fileToBeDeleted.touch();
-
-        expect:
-        fileOperations.delete('file') == true
-        fileToBeDeleted.isFile() == false
-    }
-
-    def makesDir() {
-        TestFile dirToBeCreated = tmpDir.file("parentDir", "dir")
-        resolver.resolve('parentDir/dir') >> dirToBeCreated
-
-        when:
-        File actualDir = fileOperations.mkdir('parentDir/dir')
-
-        then:
-        actualDir == dirToBeCreated
-        actualDir.isDirectory() == true
-    }
-
-    def makesDirThrowsExceptionIfPathPointsToFile() {
-        TestFile dirToBeCreated = tmpDir.file("parentDir", "dir")
-        dirToBeCreated.touch();
-        resolver.resolve('parentDir/dir') >> dirToBeCreated
-
-        when:
-        fileOperations.mkdir('parentDir/dir')
-
-        then:
-        thrown(InvalidUserDataException)
-    }
-
-    def createsCopySpec() {
-        when:
-        def spec = fileOperations.copySpec { include 'pattern'}
-
-        then:
-        spec instanceof CopySpecImpl
-        spec.includes == ['pattern'] as Set
-    }
-
-    private TestFile expectPathResolved(String path) {
-        TestFile file = tmpDir.file(path)
-        resolver.resolve(path) >> file
-        return file
-    }
-
-    private URI expectPathResolvedToUri(String path) {
-        TestFile file = tmpDir.file(path)
-        resolver.resolveUri(path) >> file.toURI()
-        return file.toURI()
-    }
-
-    private TestFile expectTempFileCreated() {
-        TestFile file = tmpDir.file('expandedArchives')
-        temporaryFileProvider.newTemporaryFile('expandedArchives') >> file
-        return file
-    }
-
-    def javaexec() {
-        File testFile = tmpDir.file("someFile")
-        fileOperations = new DefaultFileOperations(new IdentityFileResolver(), taskResolver, temporaryFileProvider)
-        List files = ClasspathUtil.getClasspath(getClass().classLoader)
-        println "Using classpath:"
-        files.each {println it}
-        println "==="
-
-        when:
-        ExecResult result = fileOperations.javaexec {
-            classpath(files as Object[])
-            main = 'org.gradle.api.internal.file.SomeMain'
-            args testFile.absolutePath
-        }
-
-        then:
-        testFile.isFile()
-        result.exitValue == 0
-    }
-
-    def javaexecWithNonZeroExitValueShouldThrowException() {
-        fileOperations = new DefaultFileOperations(new IdentityFileResolver(), taskResolver, temporaryFileProvider)
-
-        when:
-        fileOperations.javaexec {
-            main = 'org.gradle.UnknownMain'
-        }
-
-        then:
-        thrown(ExecException)
-    }
-
-    def javaexecWithNonZeroExitValueAndIgnoreExitValueShouldNotThrowException() {
-        fileOperations = new DefaultFileOperations(new IdentityFileResolver(), taskResolver, temporaryFileProvider)
-
-        when:
-        ExecResult result = fileOperations.javaexec {
-            main = 'org.gradle.UnknownMain'
-            ignoreExitValue = true
-        }
-
-        then:
-        result.exitValue != 0
-    }
-
-    def exec() {
-        if (OperatingSystem.current().isWindows()) {
-            return
-        }
-
-        fileOperations = new DefaultFileOperations(new IdentityFileResolver(), taskResolver, temporaryFileProvider)
-        File testFile = tmpDir.file("someFile")
-
-        when:
-        ExecResult result = fileOperations.exec {
-            executable = "touch"
-            workingDir = tmpDir.getDir()
-            args testFile.name
-        }
-
-        then:
-        testFile.isFile()
-        result.exitValue == 0
-    }
-
-    def execWithNonZeroExitValueShouldThrowException() {
-        if (OperatingSystem.current().isWindows()) {
-            return
-        }
-        fileOperations = new DefaultFileOperations(new IdentityFileResolver(), taskResolver, temporaryFileProvider)
-
-        when:
-        fileOperations.exec {
-            executable = "touch"
-            workingDir = tmpDir.getDir()
-            args tmpDir.dir.name + "/nonExistingDir/someFile"
-        }
-
-        then:
-        thrown(ExecException)
-    }
-
-    def execWithNonZeroExitValueAndIgnoreExitValueShouldNotThrowException() {
-        if (OperatingSystem.current().isWindows()) {
-            return
-        }
-        fileOperations = new DefaultFileOperations(new IdentityFileResolver(), taskResolver, temporaryFileProvider)
-
-        when:
-        ExecResult result = fileOperations.exec {
-            ignoreExitValue = true
-            executable = "touch"
-            workingDir = tmpDir.getDir()
-            args tmpDir.dir.name + "/nonExistingDir/someFile"
-        }
-
-        then:
-        result.exitValue != 0
-    }
-}
-
-class SomeMain {
-    static void main(String[] args) {
-        FileUtils.touch(new File(args[0]))
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/RegExpNameMapperTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/RegExpNameMapperTest.java
deleted file mode 100644
index 2651966..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/copy/RegExpNameMapperTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.file.copy;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class RegExpNameMapperTest {
-    @Test public void testRenameWithCapture() {
-        RegExpNameMapper mapper = new RegExpNameMapper("(.+).java","$1Test.java");
-        assertEquals("SourceTest.java", mapper.transform("Source.java"));
-        assertEquals("SecondTest.java", mapper.transform("Second.java"));
-    }
-
-    @Test public void testRenameNoMatch() {
-        RegExpNameMapper mapper = new RegExpNameMapper("(.+).java","$1Test.java");
-        String noMatch = "NoMatch";
-        assertEquals(noMatch, mapper.transform(noMatch));
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcherTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcherTest.java
deleted file mode 100644
index 81499bd..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/file/pattern/DefaultPatternMatcherTest.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.file.pattern;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-import org.gradle.api.file.RelativePath;
-
-import java.util.List;
-
-public class DefaultPatternMatcherTest {
-    private DefaultPatternMatcher matcher;
-    private RelativePath path;
-
-
-    @Test public void testParsing() {
-        List<PatternStep> steps;
-        PatternStep step;
-
-        // parse forward slash pattern
-        matcher = new DefaultPatternMatcher(true, true, "a", "b", "c");
-        steps = matcher.getStepsForTest();
-        assertEquals(3, steps.size());
-        step = steps.get(2);
-        assertTrue(step.matches("c", true));
-        //assertFalse(step.matches("c", false));
-
-        // try matching a wrong literal string
-        assertFalse(step.matches("somethingelse", true));
-
-        // check greedy
-        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c");
-        steps = matcher.getStepsForTest();
-        step = steps.get(1);
-        assertTrue(step.isGreedy());
-    }
-
-    @Test public void testEmpty() {
-        DefaultPatternMatcher matcher = new DefaultPatternMatcher(true, true);
-        List<PatternStep> steps = matcher.getStepsForTest();
-        assertEquals(0, steps.size());
-
-        // both empty
-        RelativePath path = new RelativePath(true);
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        // empty matcher, non-empty path
-        path = new RelativePath(true, "a");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        // non-empty matcher, empty path
-        matcher = new DefaultPatternMatcher(true, true, "a");
-        path = new RelativePath(true);
-        assertFalse(matcher.isSatisfiedBy(path));
-
-    }
-
-    @Test public void testLiterals() {
-        matcher = new DefaultPatternMatcher(true, true, "a");
-        path = new RelativePath(true, "a");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "b");
-        assertFalse(matcher.isSatisfiedBy(path));
-        
-        matcher = new DefaultPatternMatcher(true, true, "a", "b");
-        path = new RelativePath(true, "a", "b");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "c");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "b", "c");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        // short path
-        path = new RelativePath(true, "a");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        // long path
-        path = new RelativePath(true, "a", "b", "c");
-        assertFalse(matcher.isSatisfiedBy(path));
-    }
-
-    @Test public void testPartials() {
-        matcher = new DefaultPatternMatcher(true, true, "a", "b", "c");
-        path = new RelativePath(false, "a", "b");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "b");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        matcher = new DefaultPatternMatcher(false, true, "a", "b", "c");
-        path = new RelativePath(false, "a", "b");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-    }
-
-    @Test public void testWildCards() {
-        matcher = new DefaultPatternMatcher(true, true, "*");
-        path = new RelativePath(true, "anything");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "anything", "b");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        matcher = new DefaultPatternMatcher(true, true, "any??ing");
-        path = new RelativePath(true, "anything");
-        assertTrue(matcher.isSatisfiedBy(path));
-    }
-
-    @Test public void testGreedy() {
-        matcher = new DefaultPatternMatcher(true, true, "a","**");
-        path = new RelativePath(true, "a", "b", "c");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        //leading greedy
-        matcher = new DefaultPatternMatcher(true, true, "**", "c");
-        path = new RelativePath(true, "a", "b", "c");
-        assertTrue(matcher.isSatisfiedBy(path));
-        
-        path = new RelativePath(true, "a", "b", "d");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        // inner greedy
-        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c");
-        path = new RelativePath(true, "a", "b", "c");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "aa", "bb", "c");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(false, "a", "aa", "bb", "d");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "aa", "bb", "d");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        // fake trail
-        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c", "d");
-        path = new RelativePath(true, "a", "b", "c", "e", "c", "d");
-        assertTrue(matcher.isSatisfiedBy(path));
-        
-        // multiple greedies
-        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c", "**", "e");
-        path = new RelativePath(true, "a", "b", "c", "d", "e");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "b", "bb", "c", "d", "e");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "q", "bb", "c", "d", "c", "d", "e");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        // Missing greedy
-        matcher = new DefaultPatternMatcher(true, true, "a", "**", "c");
-        path = new RelativePath(true, "a", "c");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "a", "d");
-        assertFalse(matcher.isSatisfiedBy(path));
-    }
-
-    @Test public void testTypical() {
-        matcher = new DefaultPatternMatcher(true, true, "**", "CVS", "*");
-        path = new RelativePath(true, "CVS", "Repository");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "org", "gradle", "CVS", "Entries");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "org", "gradle", "CVS", "foo", "bar", "Entries");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        matcher = new DefaultPatternMatcher(true, true, "src", "main", "**");
-        path = new RelativePath(true, "src", "main", "groovy", "org");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "src", "test", "groovy", "org");
-        assertFalse(matcher.isSatisfiedBy(path));
-
-        matcher = new DefaultPatternMatcher(true, true, "**", "test", "**");
-        // below fails, trailing ** not ignored
-        path = new RelativePath(true, "src", "main", "test");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "src", "test", "main");
-        assertTrue(matcher.isSatisfiedBy(path));
-
-        path = new RelativePath(true, "src", "main", "fred");
-        assertFalse(matcher.isSatisfiedBy(path));
-    }
-
-    @Test public void testCase() {
-        matcher = new DefaultPatternMatcher(true, true, "a", "b");
-        assertTrue(matcher.isSatisfiedBy(new RelativePath(true, "a", "b")));
-        assertFalse(matcher.isSatisfiedBy(new RelativePath(true, "A", "B")));
-
-        matcher = new DefaultPatternMatcher(true, false, "a", "b");
-        assertTrue(matcher.isSatisfiedBy(new RelativePath(true, "a", "b")));
-        assertTrue(matcher.isSatisfiedBy(new RelativePath(true, "A", "B")));
-    }
-
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectTest.groovy
deleted file mode 100644
index 9789fa7..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/project/DefaultProjectTest.groovy
+++ /dev/null
@@ -1,1076 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.project
-
-import java.awt.Point
-import java.text.FieldPosition
-import org.apache.tools.ant.types.FileSet
-import org.gradle.api.artifacts.ConfigurationContainer
-import org.gradle.api.artifacts.Module
-import org.gradle.api.artifacts.dsl.ArtifactHandler
-import org.gradle.api.artifacts.dsl.DependencyHandler
-import org.gradle.api.artifacts.dsl.RepositoryHandler
-import org.gradle.api.initialization.dsl.ScriptHandler
-import org.gradle.api.internal.artifacts.ConfigurationContainerFactory
-import org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer
-import org.gradle.api.internal.artifacts.configurations.DependencyMetaDataProvider
-import org.gradle.api.internal.artifacts.dsl.PublishArtifactFactory
-import org.gradle.api.internal.artifacts.dsl.dependencies.DependencyFactory
-import org.gradle.api.internal.artifacts.ivyservice.ResolverFactory
-import org.gradle.api.internal.artifacts.repositories.InternalRepository
-import org.gradle.api.internal.file.FileOperations
-import org.gradle.api.internal.file.FileResolver
-import org.gradle.api.internal.initialization.ScriptClassLoaderProvider
-import org.gradle.api.internal.plugins.DefaultConvention
-import org.gradle.api.internal.tasks.TaskContainerInternal
-import org.gradle.api.invocation.Gradle
-import org.gradle.api.logging.LogLevel
-import org.gradle.api.plugins.Convention
-import org.gradle.api.plugins.PluginContainer
-import org.gradle.api.tasks.Directory
-import org.gradle.configuration.ProjectEvaluator
-import org.gradle.configuration.ScriptPluginFactory
-import org.gradle.groovy.scripts.EmptyScript
-import org.gradle.groovy.scripts.ScriptSource
-import org.gradle.logging.LoggingManagerInternal
-import org.gradle.logging.StandardOutputCapture
-import org.gradle.util.HelperUtil
-import org.gradle.util.JUnit4GroovyMockery
-import org.gradle.util.TestClosure
-import org.jmock.integration.junit4.JMock
-import org.jmock.lib.legacy.ClassImposteriser
-import org.junit.Before
-import org.junit.Ignore
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.api.*
-import org.gradle.api.internal.*
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.*
-
-/**
- * @author Hans Dockter
- */
- at RunWith (JMock.class)
-class DefaultProjectTest {
-    JUnit4GroovyMockery context = new JUnit4GroovyMockery()
-
-    static final String TEST_PROJECT_NAME = 'testproject'
-
-    static final String TEST_BUILD_FILE_NAME = 'build.gradle'
-
-    static final String TEST_TASK_NAME = 'testtask'
-
-    Task testTask;
-
-    DefaultProject project, child1, child2, childchild
-
-    ProjectEvaluator projectEvaluator
-
-    IProjectRegistry projectRegistry
-
-    File rootDir
-
-    groovy.lang.Script testScript
-
-    ScriptSource script;
-
-    ServiceRegistry serviceRegistryMock
-    ServiceRegistryFactory projectServiceRegistryFactoryMock
-    TaskContainerInternal taskContainerMock
-    Factory<AntBuilder> antBuilderFactoryMock
-    AntBuilder testAntBuilder
-
-    ConfigurationContainerFactory configurationContainerFactoryMock;
-    DefaultConfigurationContainer configurationContainerMock;
-    InternalRepository internalRepositoryDummy = context.mock(InternalRepository)
-    ResolverFactory resolverFactoryMock = context.mock(ResolverFactory.class);
-    Factory<RepositoryHandler> repositoryHandlerFactoryMock = context.mock(Factory.class);
-    RepositoryHandler repositoryHandlerMock
-    DependencyFactory dependencyFactoryMock
-    DependencyHandler dependencyHandlerMock = context.mock(DependencyHandler)
-    PluginContainer pluginContainerMock = context.mock(PluginContainer)
-    PublishArtifactFactory publishArtifactFactoryMock = context.mock(PublishArtifactFactory)
-    ScriptHandler scriptHandlerMock = context.mock(ScriptHandler)
-    DependencyMetaDataProvider dependencyMetaDataProviderMock = context.mock(DependencyMetaDataProvider)
-    Gradle build;
-    Convention convention = new DefaultConvention();
-    FileOperations fileOperationsMock
-    LoggingManagerInternal loggingManagerMock;
-
-    @Before
-    void setUp() {
-        rootDir = new File("/path/root").absoluteFile
-
-        context.imposteriser = ClassImposteriser.INSTANCE
-        dependencyFactoryMock = context.mock(DependencyFactory.class)
-        loggingManagerMock = context.mock(LoggingManagerInternal.class)
-        taskContainerMock = context.mock(TaskContainerInternal.class);
-        antBuilderFactoryMock = context.mock(Factory.class)
-        testAntBuilder = new DefaultAntBuilder()
-        context.checking {
-            allowing(antBuilderFactoryMock).create(); will(returnValue(testAntBuilder))
-        }
-        configurationContainerMock = context.mock(DefaultConfigurationContainer.class)
-        configurationContainerFactoryMock = [createConfigurationContainer: {
-          resolverProvider, dependencyMetaDataProvider, projectDependenciesBuildInstruction ->
-            assertSame(build.startParameter.projectDependenciesBuildInstruction, projectDependenciesBuildInstruction)
-            configurationContainerMock}] as ConfigurationContainerFactory
-        repositoryHandlerMock =  context.mock(RepositoryHandler.class);
-        context.checking {
-          allowing(repositoryHandlerFactoryMock).create(); will(returnValue(repositoryHandlerMock))
-        }
-        script = context.mock(ScriptSource.class)
-        context.checking {
-            allowing(script).getDisplayName(); will(returnValue('[build file]'))
-            allowing(script).getClassName(); will(returnValue('scriptClass'))
-            allowing(scriptHandlerMock).getSourceFile(); will(returnValue(new File(rootDir, TEST_BUILD_FILE_NAME)))
-        }
-
-        testScript = new EmptyScript()
-
-        testTask = HelperUtil.createTask(DefaultTask)
-
-        projectEvaluator = context.mock(ProjectEvaluator.class)
-        projectRegistry = new DefaultProjectRegistry()
-
-        projectServiceRegistryFactoryMock = context.mock(ServiceRegistryFactory.class, 'parent')
-        serviceRegistryMock = context.mock(ServiceRegistryFactory.class, 'project')
-        build = context.mock(GradleInternal.class)
-        fileOperationsMock = context.mock(FileOperations.class)
-
-        context.checking {
-            allowing(projectServiceRegistryFactoryMock).createFor(withParam(notNullValue())); will(returnValue(serviceRegistryMock))
-            allowing(serviceRegistryMock).newInstance(TaskContainerInternal); will(returnValue(taskContainerMock))
-            allowing(taskContainerMock).getAsDynamicObject(); will(returnValue(new BeanDynamicObject(new TaskContainerDynamicObject(someTask: testTask))))
-            allowing(serviceRegistryMock).get(RepositoryHandler); will(returnValue(repositoryHandlerMock))
-            allowing(serviceRegistryMock).getFactory(RepositoryHandler); will(returnValue(repositoryHandlerFactoryMock))
-            allowing(serviceRegistryMock).get(ConfigurationContainer); will(returnValue(configurationContainerMock))
-            allowing(serviceRegistryMock).get(ArtifactHandler); will(returnValue(context.mock(ArtifactHandler)))
-            allowing(serviceRegistryMock).get(DependencyHandler); will(returnValue(dependencyHandlerMock))
-            allowing(serviceRegistryMock).get(Convention); will(returnValue(convention))
-            allowing(serviceRegistryMock).get(ProjectEvaluator); will(returnValue(projectEvaluator))
-            allowing(serviceRegistryMock).getFactory(AntBuilder); will(returnValue(antBuilderFactoryMock))
-            allowing(serviceRegistryMock).get(PluginContainer); will(returnValue(pluginContainerMock))
-            allowing(serviceRegistryMock).get(ScriptHandler); will(returnValue(scriptHandlerMock))
-            allowing(serviceRegistryMock).get(ScriptClassLoaderProvider); will(returnValue(context.mock(ScriptClassLoaderProvider)))
-            allowing(serviceRegistryMock).get(LoggingManagerInternal); will(returnValue(loggingManagerMock))
-            allowing(serviceRegistryMock).get(StandardOutputCapture); will(returnValue(context.mock(StandardOutputCapture)))
-            allowing(serviceRegistryMock).get(IProjectRegistry); will(returnValue(projectRegistry))
-            allowing(serviceRegistryMock).get(DependencyMetaDataProvider); will(returnValue(dependencyMetaDataProviderMock))
-            allowing(serviceRegistryMock).get(FileResolver); will(returnValue([:] as FileResolver))
-            allowing(serviceRegistryMock).get(FileOperations);
-            will(returnValue(fileOperationsMock))
-            allowing(serviceRegistryMock).get(ScriptPluginFactory); will(returnValue([:] as ScriptPluginFactory))
-            Object listener = context.mock(ProjectEvaluationListener)
-            ignoring(listener)
-            allowing(build).getProjectEvaluationBroadcaster();
-            will(returnValue(listener))
-        }
-
-        // TODO - don't decorate the project objects
-        ClassGenerator classGenerator = new AsmBackedClassGenerator()
-        project = classGenerator.newInstance(DefaultProject.class, 'root', null, rootDir, script, build, projectServiceRegistryFactoryMock);
-        child1 = classGenerator.newInstance(DefaultProject.class, "child1", project, new File("child1"), script, build, projectServiceRegistryFactoryMock)
-        project.addChildProject(child1)
-        childchild = classGenerator.newInstance(DefaultProject.class, "childchild", child1, new File("childchild"), script, build, projectServiceRegistryFactoryMock)
-        child1.addChildProject(childchild)
-        child2 = classGenerator.newInstance(DefaultProject.class, "child2", project, new File("child2"), script, build, projectServiceRegistryFactoryMock)
-        project.addChildProject(child2)
-        [project, child1, childchild, child2].each {
-            projectRegistry.addProject(it)
-        }
-    }
-
-  @Test void testRepositories() {
-      context.checking {
-          allowing(repositoryHandlerFactoryMock).create(); will(returnValue(repositoryHandlerMock))
-          ignoring(repositoryHandlerMock)
-      }
-      assertThat(project.createRepositoryHandler(), sameInstance(repositoryHandlerMock))
-  }
-
-  @Ignore void testArtifacts() {
-        boolean called = false;
-        ArtifactHandler artifactHandlerMock = [testMethod: { called = true }] as ArtifactHandler
-        project.artifactHandler = artifactHandlerMock
-        project.artifacts {
-            testMethod()
-        }
-        assertTrue(called)
-  }
-
-  @Test void testDependencies() {
-      context.checking {
-          one(dependencyHandlerMock).add('conf', 'dep')
-      }
-      project.dependencies {
-          add('conf', 'dep')
-      }
-  }
-
-  @Test void testConfigurations() {
-        Closure cl = { }
-        context.checking {
-          one(configurationContainerMock).configure(cl)
-        }
-        project.configurationContainer = configurationContainerMock
-        project.configurations cl
-    }
-
-  @Test void testScriptClasspath() {
-        context.checking {
-            one(scriptHandlerMock).getRepositories()
-        }
-        project.buildscript {
-            repositories
-        }
-    }
-
-    @Test void testProject() {
-        assertSame project, child1.parent
-        assertSame project, child1.rootProject
-        checkProject(project, null, 'root', rootDir)
-    }
-
-    private void checkProject(DefaultProject project, Project parent, String name, File projectDir) {
-        assertSame parent, project.parent
-        assertEquals name, project.name
-        assertEquals Project.DEFAULT_VERSION, project.version
-        assertEquals Project.DEFAULT_STATUS, project.status
-        assertSame(rootDir, project.rootDir)
-        assertSame(projectDir, project.projectDir)
-        assertSame this.project, project.rootProject
-        assertEquals(new File(projectDir, TEST_BUILD_FILE_NAME), project.buildFile)
-        assertSame projectEvaluator, project.projectEvaluator
-        assertSame antBuilderFactoryMock, project.antBuilderFactory
-        assertSame project.gradle, build
-        assertNotNull(project.ant)
-        assertNotNull(project.convention)
-        assertEquals([], project.getDefaultTasks())
-        assert project.configurations.is(configurationContainerMock)
-        assert project.repositoryHandlerFactory.is(repositoryHandlerFactoryMock)
-        assertSame(repositoryHandlerMock, project.repositories)
-        assert projectRegistry.is(project.projectRegistry)
-        assertFalse project.state.executed
-        assertEquals DefaultProject.DEFAULT_BUILD_DIR_NAME, project.buildDirName
-    }
-
-    @Test public void testNullVersionAndStatus() {
-        project.version = 'version'
-        project.status = 'status'
-        assertEquals('version', project.version)
-        assertEquals('status', project.status)
-        project.version = null
-        project.status = null
-        assertEquals(Project.DEFAULT_VERSION, project.version)
-        assertEquals(Project.DEFAULT_STATUS, project.status)
-    }
-
-    @Test void testGetGroup() {
-        assertThat(project.getGroup(), equalTo(''))
-        assertThat(childchild.getGroup(), equalTo('root.child1'))
-
-        child1.group = ''
-        assertThat(child1.getGroup(), equalTo(''))
-
-        child1.group = null
-        assertThat(child1.getGroup(), equalTo('root'))
-    }
-
-    @Test public void testExecutesActionBeforeEvaluation() {
-        Action<Project> listener = context.mock(Action)
-        context.checking {
-            one(listener).execute(project)
-        }
-        project.beforeEvaluate(listener)
-        project.projectEvaluationBroadcaster.beforeEvaluate(project)
-    }
-
-    @Test public void testExecutesActionAfterEvaluation() {
-        Action<Project> listener = context.mock(Action)
-        context.checking {
-            one(listener).execute(project)
-        }
-        project.afterEvaluate(listener)
-        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
-    }
-
-    @Test public void testExecutesClosureBeforeEvaluation() {
-        TestClosure listener = context.mock(TestClosure)
-        context.checking {
-            one(listener).call(project)
-        }
-
-        project.beforeEvaluate(HelperUtil.toClosure(listener))
-        project.projectEvaluationBroadcaster.beforeEvaluate(project)
-    }
-
-    @Test public void testExecutesClosureAfterEvaluation() {
-        TestClosure listener = context.mock(TestClosure)
-        context.checking {
-            one(listener).call(project)
-        }
-
-        project.afterEvaluate(HelperUtil.toClosure(listener))
-        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
-    }
-
-    @Test void testEvaluate() {
-        context.checking {
-            one(projectEvaluator).evaluate(project, project.state)
-        }
-        assertSame(project, project.evaluate())
-    }
-
-    @Test void testUsePluginWithString() {
-        context.checking {
-            one(pluginContainerMock).apply('someplugin'); will(returnValue([:] as Plugin))
-        }
-        project.apply(plugin: 'someplugin')
-    }
-
-    @Test void testUsePluginWithClass() {
-        context.checking {
-            one(pluginContainerMock).apply(Plugin); will(returnValue([:] as Plugin))
-        }
-        project.apply(plugin: Plugin)
-    }
-
-    @Test void testEvaluationDependsOn() {
-        boolean mockReader2Finished = false
-        boolean mockReader1Called = false
-        final ProjectEvaluator mockReader1 = [evaluate: {DefaultProject project, state ->
-            project.evaluationDependsOn(child1.path)
-            assertTrue(mockReader2Finished)
-            mockReader1Called = true
-            testScript
-        }] as ProjectEvaluator
-        final ProjectEvaluator mockReader2 = [
-                evaluate: {DefaultProject project, state ->
-                    mockReader2Finished = true
-                    testScript
-                }] as ProjectEvaluator
-        project.projectEvaluator = mockReader1
-        child1.projectEvaluator = mockReader2
-        project.evaluate()
-        assertTrue mockReader1Called
-    }
-
-    @Test (expected = InvalidUserDataException) void testEvaluationDependsOnWithNullArgument() {
-        project.evaluationDependsOn(null)
-    }
-
-    @Test (expected = InvalidUserDataException) void testEvaluationDependsOnWithEmptyArgument() {
-        project.evaluationDependsOn('')
-    }
-
-    @Test (expected = CircularReferenceException) void testEvaluationDependsOnWithCircularDependency() {
-        final ProjectEvaluator mockReader1 = [evaluate: {DefaultProject project, ProjectState state ->
-            state.executing = true
-            project.evaluationDependsOn(child1.path)
-            testScript
-        }] as ProjectEvaluator
-        final ProjectEvaluator mockReader2 = [evaluate: {DefaultProject project, ProjectState state ->
-            state.executing = true
-            project.evaluationDependsOn(project.path)
-            testScript
-        }] as ProjectEvaluator
-        project.projectEvaluator = mockReader1
-        child1.projectEvaluator = mockReader2
-        project.evaluate()
-    }
-
-    @Test void testDependsOnWithNoEvaluation() {
-        boolean mockReaderCalled = false
-        final ProjectEvaluator mockReader = [evaluateProject: {DefaultProject project ->
-            mockReaderCalled = true
-            testScript
-        }] as ProjectEvaluator
-        child1.projectEvaluator = mockReader
-        project.dependsOn(child1.name, false)
-        assertFalse mockReaderCalled
-        assertEquals([child1] as Set, project.dependsOnProjects)
-        project.dependsOn(child2.path, false)
-        assertEquals([child1, child2] as Set, project.dependsOnProjects)
-    }
-
-    @Test void testDependsOn() {
-        boolean mockReaderCalled = false
-        final ProjectEvaluator mockReader = [evaluate: {DefaultProject project, state ->
-            mockReaderCalled = true
-            testScript
-        }] as ProjectEvaluator
-        child1.projectEvaluator = mockReader
-        project.dependsOn(child1.name)
-        assertTrue mockReaderCalled
-        assertEquals([child1] as Set, project.dependsOnProjects)
-
-    }
-
-    @Test void testChildrenDependsOnMe() {
-        project.childrenDependOnMe()
-        assertTrue(child1.dependsOnProjects.contains(project))
-        assertTrue(child2.dependsOnProjects.contains(project))
-        assertEquals(1, child1.dependsOnProjects.size())
-        assertEquals(1, child2.dependsOnProjects.size())
-    }
-
-    @Test void testDependsOnChildren() {
-        context.checking {
-            never(projectEvaluator).evaluate(child1, child1.state)
-        }
-
-        project.dependsOnChildren()
-        context.assertIsSatisfied()
-        assertTrue(project.dependsOnProjects.contains(child1))
-        assertTrue(project.dependsOnProjects.contains(child2))
-        assertEquals(2, project.dependsOnProjects.size())
-    }
-
-    @Test void testDependsOnChildrenIncludingEvaluate() {
-        context.checking {
-            one(projectEvaluator).evaluate(child1, child1.state)
-            one(projectEvaluator).evaluate(child2, child2.state)
-        }
-        project.dependsOnChildren(true)
-        assertTrue(project.dependsOnProjects.contains(child1))
-        assertTrue(project.dependsOnProjects.contains(child2))
-        assertEquals(2, project.dependsOnProjects.size())
-    }
-
-    @Test (expected = InvalidUserDataException) void testDependsOnWithNullPath() {
-        project.dependsOn(null)
-    }
-
-    @Test (expected = InvalidUserDataException) void testDependsOnWithEmptyPath() {
-        project.dependsOn('')
-    }
-
-    @Test (expected = UnknownProjectException) void testDependsOnWithUnknownParentPath() {
-        project.dependsOn(child1.path + 'XXX')
-    }
-
-    @Test (expected = UnknownProjectException) void testDependsOnWithUnknownProjectPath() {
-        project.dependsOn(child1.name + 'XXX')
-    }
-
-    @Test void testAddAndGetChildProject() {
-        ProjectInternal child1 = ['getName': {-> 'child1'}] as ProjectInternal
-        ProjectInternal child2 = ['getName': {-> 'child2'}] as ProjectInternal
-
-        project.addChildProject(child1)
-        assertEquals(2, project.childProjects.size())
-        assertSame(child1, project.childProjects.child1)
-
-        project.addChildProject(child2)
-        assertEquals(2, project.childProjects.size())
-        assertSame(child2, project.childProjects.child2)
-    }
-
-    @Test public void testDefaultTasks() {
-        project.defaultTasks("a", "b");
-        assertEquals(["a", "b"], project.getDefaultTasks())
-        project.defaultTasks("c");
-        assertEquals(["c"], project.getDefaultTasks())
-    }
-
-    @Test (expected = InvalidUserDataException) public void testDefaultTasksWithNull() {
-        project.defaultTasks(null);
-    }
-
-    @Test (expected = InvalidUserDataException) public void testDefaultTasksWithSingleNullValue() {
-        project.defaultTasks("a", null);
-    }
-
-    @Test public void testCreateTaskWithName() {
-        context.checking {
-            one(taskContainerMock).add([name: TEST_TASK_NAME]); will(returnValue(testTask))
-        }
-        assertSame(testTask, project.createTask(TEST_TASK_NAME));
-    }
-
-    @Test public void testCreateTaskWithNameAndArgs() {
-        Map testArgs = [a: 'b']
-        context.checking {
-            one(taskContainerMock).add(testArgs + [name: TEST_TASK_NAME]); will(returnValue(testTask))
-        }
-        assertSame(testTask, project.createTask(testArgs, TEST_TASK_NAME));
-    }
-
-    @Test public void testCreateTaskWithNameAndAction() {
-        Action<Task> testAction = {} as Action
-        context.checking {
-            one(taskContainerMock).add([name: TEST_TASK_NAME, action: testAction]); will(returnValue(testTask))
-        }
-        assertSame(testTask, project.createTask(TEST_TASK_NAME, testAction));
-    }
-
-    @Test public void testCreateTaskWithNameAndClosureAction() {
-        Closure testAction = {}
-        context.checking {
-            one(taskContainerMock).add([name: TEST_TASK_NAME, action: testAction]); will(returnValue(testTask))
-        }
-        assertSame(testTask, project.createTask(TEST_TASK_NAME, testAction));
-    }
-
-    @Test public void testCreateTaskWithNameArgsAndActions() {
-        Map testArgs = [a: 'b']
-        Action<Task> testAction = {} as Action
-        context.checking {
-            one(taskContainerMock).add(testArgs + [name: TEST_TASK_NAME, action: testAction]); will(returnValue(testTask))
-        }
-        assertSame(testTask, project.createTask(testArgs, TEST_TASK_NAME, testAction));
-    }
-
-    @Test void testCanAccessTaskAsAProjectProperty() {
-        assertThat(project.someTask, sameInstance(testTask))
-    }
-
-    @Test (expected = MissingPropertyException) void testPropertyShortCutForTaskCallWithNonExistingTask() {
-        project.unknownTask
-    }
-
-    @Test (expected = MissingMethodException) void testMethodShortCutForTaskCallWithNonExistingTask() {
-        project.unknownTask([dependsOn: '/task2'])
-    }
-
-    private Set getListWithAllProjects() {
-        [project, child1, child2, childchild]
-    }
-
-    private Set getListWithAllChildProjects() {
-        [child1, child2, childchild]
-
-    }
-
-    @Test void testPath() {
-        assertEquals(Project.PATH_SEPARATOR + "child1", child1.path)
-        assertEquals(Project.PATH_SEPARATOR, project.path)
-    }
-
-    @Test void testGetProject() {
-        assertSame(project, project.project(Project.PATH_SEPARATOR))
-        assertSame(child1, project.project(Project.PATH_SEPARATOR + "child1"))
-        assertSame(child1, project.project("child1"))
-        assertSame(childchild, child1.project('childchild'))
-        assertSame(child1, childchild.project(Project.PATH_SEPARATOR + "child1"))
-    }
-
-    @Test void testGetProjectWithUnknownAbsolutePath() {
-        try {
-            project.project(Project.PATH_SEPARATOR + "unknownchild")
-            fail()
-        } catch (UnknownProjectException e) {
-            assertEquals(e.getMessage(), "Project with path ':unknownchild' could not be found in root project 'root'.")
-        }
-    }
-
-    @Test void testGetProjectWithUnknownRelativePath() {
-        try {
-            project.project("unknownchild")
-            fail()
-        } catch (UnknownProjectException e) {
-            assertEquals(e.getMessage(), "Project with path 'unknownchild' could not be found in root project 'root'.")
-        }
-    }
-
-    @Test (expected = InvalidUserDataException) void testGetProjectWithEmptyPath() {
-        project.project("")
-    }
-
-    @Test (expected = InvalidUserDataException) void testGetProjectWithNullPath() {
-        project.project(null)
-    }
-
-    @Test void testFindProject() {
-        assertSame(project, project.findProject(Project.PATH_SEPARATOR))
-        assertSame(child1, project.findProject(Project.PATH_SEPARATOR + "child1"))
-        assertSame(child1, project.findProject("child1"))
-        assertSame(childchild, child1.findProject('childchild'))
-        assertSame(child1, childchild.findProject(Project.PATH_SEPARATOR + "child1"))
-    }
-
-    @Test void testFindProjectWithUnknownAbsolutePath() {
-        assertNull(project.findProject(Project.PATH_SEPARATOR + "unknownchild"))
-    }
-
-    @Test void testFindProjectWithUnknownRelativePath() {
-        assertNull(project.findProject("unknownChild"))
-    }
-
-    @Test void testGetProjectWithClosure() {
-        String newPropValue = 'someValue'
-        assert child1.is(project.project("child1") {
-            newProp = newPropValue
-        })
-        assertEquals(child1.newProp, newPropValue)
-    }
-
-    @Test void testGetAllTasksRecursive() {
-        Task projectTask = HelperUtil.createTask(DefaultTask.class)
-        Task child1Task = HelperUtil.createTask(DefaultTask.class)
-        Task child2Task = HelperUtil.createTask(DefaultTask.class)
-
-        Map expectedMap = new TreeMap()
-        expectedMap[project] = [projectTask] as TreeSet
-        expectedMap[child1] = [child1Task] as TreeSet
-        expectedMap[child2] = [child2Task] as TreeSet
-        expectedMap[childchild] = [] as TreeSet
-
-        context.checking {
-            one(taskContainerMock).getAll(); will(returnValue([projectTask] as Set))
-            one(taskContainerMock).getAll(); will(returnValue([child1Task] as Set))
-            one(taskContainerMock).getAll(); will(returnValue([child2Task] as Set))
-            one(taskContainerMock).getAll(); will(returnValue([] as Set))
-        }
-
-        assertEquals(expectedMap, project.getAllTasks(true))
-    }
-
-    @Test void testGetAllTasksNonRecursive() {
-        Task projectTask = HelperUtil.createTask(DefaultTask.class)
-
-        Map expectedMap = new TreeMap()
-        expectedMap[project] = [projectTask] as TreeSet
-
-        context.checking {
-            one(taskContainerMock).getAll(); will(returnValue([projectTask] as Set))
-        }
-
-        assertEquals(expectedMap, project.getAllTasks(false))
-    }
-
-    @Test void testGetTasksByNameRecursive() {
-        Task projectTask = HelperUtil.createTask(DefaultTask.class)
-        Task child1Task = HelperUtil.createTask(DefaultTask.class)
-
-        context.checking {
-            one(taskContainerMock).findByName('task'); will(returnValue(projectTask))
-            one(taskContainerMock).findByName('task'); will(returnValue(child1Task))
-            one(taskContainerMock).findByName('task'); will(returnValue(null))
-            one(taskContainerMock).findByName('task'); will(returnValue(null))
-        }
-
-        assertEquals([projectTask, child1Task] as Set, project.getTasksByName('task', true))
-    }
-
-    @Test void testGetTasksByNameNonRecursive() {
-        Task projectTask = HelperUtil.createTask(DefaultTask.class)
-
-        context.checking {
-            one(taskContainerMock).findByName('task'); will(returnValue(projectTask))
-        }
-
-        assertEquals([projectTask] as Set, project.getTasksByName('task', false))
-    }
-
-    @Test (expected = InvalidUserDataException) void testGetTasksWithEmptyName() {
-        project.getTasksByName('', true)
-    }
-
-    @Test (expected = InvalidUserDataException) void testGetTasksWithNullName() {
-        project.getTasksByName(null, true)
-    }
-
-    @Test void testGetTasksWithUnknownName() {
-        context.checking {
-            allowing(taskContainerMock).findByName('task'); will(returnValue(null))
-        }
-
-        assertEquals([] as Set, project.getTasksByName('task', true))
-        assertEquals([] as Set, project.getTasksByName('task', false))
-    }
-
-    private List addTestTaskToAllProjects(String name) {
-        List tasks = []
-        project.allprojects.each {Project project ->
-            tasks << addTestTask(project, name)
-        }
-        tasks
-    }
-
-    private Task addTestTask(Project project, String name) {
-        new DefaultTask(project, name)
-    }
-
-    @Test void testMethodMissing() {
-        boolean closureCalled = false
-        Closure testConfigureClosure = {closureCalled = true}
-        project.someTask(testConfigureClosure)
-        assert closureCalled
-
-        project.convention.plugins.test = new TestConvention()
-        assertEquals(TestConvention.METHOD_RESULT, project.scriptMethod(testConfigureClosure))
-
-        project.script = createScriptForMethodMissingTest('projectScript')
-        assertEquals('projectScript', project.scriptMethod(testConfigureClosure))
-    }
-
-    private groovy.lang.Script createScriptForMethodMissingTest(String returnValue) {
-        String code = """
-def scriptMethod(Closure closure) {
-    "$returnValue"
-}
-"""
-        HelperUtil.createScript(code)
-    }
-
-    @Test void testSetPropertyAndPropertyMissingWithProjectProperty() {
-        String propertyName = 'propName'
-        String expectedValue = 'somevalue'
-
-        project."$propertyName" = expectedValue
-        assertEquals(expectedValue, project."$propertyName")
-        assertEquals(expectedValue, child1."$propertyName")
-    }
-
-    @Test void testPropertyMissingWithExistingConventionProperty() {
-        String propertyName = 'conv'
-        String expectedValue = 'somevalue'
-        project.convention.plugins.test = new TestConvention()
-        project.convention.conv = expectedValue
-        assertEquals(expectedValue, project."$propertyName")
-        assertEquals(expectedValue, project.convention."$propertyName")
-        assertEquals(expectedValue, child1."$propertyName")
-    }
-
-    @Test void testSetPropertyAndPropertyMissingWithConventionProperty() {
-        String propertyName = 'conv'
-        String expectedValue = 'somevalue'
-        project.convention.plugins.test = new TestConvention()
-        project."$propertyName" = expectedValue
-        assertEquals(expectedValue, project."$propertyName")
-        assertEquals(expectedValue, project.convention."$propertyName")
-        assertEquals(expectedValue, child1."$propertyName")
-    }
-
-    @Test void testSetPropertyAndPropertyMissingWithProjectAndConventionProperty() {
-        String propertyName = 'archivesBaseName'
-        String expectedValue = 'somename'
-
-        project.archivesBaseName = expectedValue
-        project.convention.plugins.test = new TestConvention()
-        project.convention.archivesBaseName = 'someothername'
-        project."$propertyName" = expectedValue
-        assertEquals(expectedValue, project."$propertyName")
-        assertEquals('someothername', project.convention."$propertyName")
-    }
-
-    @Test void testPropertyMissingWithNullProperty() {
-        project.nullProp = null
-        assertNull(project.nullProp)
-        assert project.hasProperty('nullProp')
-    }
-
-    @Test (expected = MissingPropertyException)
-    public void testPropertyMissingWithUnknownProperty() {
-        project.unknownProperty
-    }
-
-    @Test void testHasProperty() {
-        assertTrue(project.hasProperty('name'))
-        String propertyName = 'beginIndex'
-        assertFalse(project.hasProperty(propertyName))
-        assertFalse(child1.hasProperty(propertyName))
-
-        project.convention.plugins.test = new FieldPosition(0)
-        project.convention."$propertyName" = 5
-        assertTrue(project.hasProperty(propertyName))
-        assertTrue(child1.hasProperty(propertyName))
-        project.convention = new DefaultConvention()
-        project."$propertyName" = 4
-        assertTrue(project.hasProperty(propertyName))
-        assertTrue(child1.hasProperty(propertyName))
-    }
-
-    @Test void testProperties() {
-        context.checking {
-            allowing(dependencyMetaDataProviderMock).getModule(); will(returnValue({} as Module))
-            ignoring(fileOperationsMock)
-            ignoring(taskContainerMock)
-        }
-        project.additional = 'additional'
-
-        Map properties = project.properties
-        assertEquals(properties.name, 'root')
-        assertEquals(properties.additional, 'additional')
-        assertSame(properties['someTask'], testTask)
-    }
-
-    @Test void testAdditionalProperty() {
-        String expectedPropertyName = 'somename'
-        String expectedPropertyValue = 'somevalue'
-        project.additionalProperties[expectedPropertyName] = expectedPropertyValue
-        assertEquals(project."$expectedPropertyName", expectedPropertyValue)
-    }
-
-    @Test void testAdditionalPropertiesAreInheritable() {
-        project.somename = 'somevalue'
-        assertTrue(project.inheritedScope.hasProperty('somename'))
-        assertEquals(project.inheritedScope.getProperty('somename'), 'somevalue')
-    }
-
-    @Test void testConventionPropertiesAreInheritable() {
-        project.convention.plugins.test = new TestConvention()
-        project.convention.plugins.test.conv = 'somevalue'
-        assertTrue(project.inheritedScope.hasProperty('conv'))
-        assertEquals(project.inheritedScope.getProperty('conv'), 'somevalue')
-    }
-
-    @Test void testInheritedPropertiesAreInheritable() {
-        project.somename = 'somevalue'
-        assertTrue(child1.inheritedScope.hasProperty('somename'))
-        assertEquals(child1.inheritedScope.getProperty('somename'), 'somevalue')
-    }
-
-    @Test void testGetProjectProperty() {
-        assert project.is(project.getProject())
-    }
-
-    @Test void testAllprojectsField() {
-        assertEquals(getListWithAllProjects(), project.allprojects)
-    }
-
-    @Test void testChildren() {
-        assertEquals(getListWithAllChildProjects(), project.subprojects)
-    }
-
-    @Test void testBuildDir() {
-        File dir = new File(rootDir, 'dir')
-        context.checking {
-            one(fileOperationsMock).file(Project.DEFAULT_BUILD_DIR_NAME)
-            will(returnValue(dir))
-        }
-        assertEquals(dir, child1.buildDir)
-
-        child1.buildDir = 12
-        context.checking {
-            one(fileOperationsMock).file(12)
-            will(returnValue(dir))
-        }
-        assertEquals(dir, child1.buildDir)
-    }
-
-    @Test public void testDir() {
-        Task dirTask1 = HelperUtil.createTask(Directory.class)
-        Task dirTask12 = HelperUtil.createTask(Directory.class)
-        Task dirTask123 = HelperUtil.createTask(Directory.class)
-        context.checking {
-            one(taskContainerMock).findByName('dir1'); will(returnValue(null))
-            one(taskContainerMock).add('dir1', Directory); will(returnValue(dirTask1))
-            one(taskContainerMock).findByName('dir1/dir2'); will(returnValue(null))
-            one(taskContainerMock).add('dir1/dir2', Directory); will(returnValue(dirTask12))
-            one(taskContainerMock).findByName('dir1/dir2/dir3'); will(returnValue(null))
-            one(taskContainerMock).add('dir1/dir2/dir3', Directory); will(returnValue(dirTask123))
-        }
-        assertSame(dirTask123, project.dir('dir1/dir2/dir3'));
-    }
-
-    @Test public void testDirWithExistingParentDirTask() {
-        Task dirTask1 = HelperUtil.createTask(Directory.class)
-        context.checking {
-            one(taskContainerMock).findByName('dir1'); will(returnValue(null))
-            one(taskContainerMock).add('dir1', Directory); will(returnValue(dirTask1))
-        }
-        project.dir('dir1')
-
-        Task dirTask14 = HelperUtil.createTask(Directory.class)
-        context.checking {
-            one(taskContainerMock).findByName('dir1'); will(returnValue(dirTask1))
-            one(taskContainerMock).findByName('dir1/dir4'); will(returnValue(null))
-            one(taskContainerMock).add('dir1/dir4', Directory); will(returnValue(dirTask14))
-        }
-        assertSame(dirTask14, project.dir('dir1/dir4'))
-    }
-
-    @Test public void testDirWithConflictingNonDirTask() {
-        Task dirTask14 = HelperUtil.createTask(DefaultTask.class)
-
-        Task dirTask1 = HelperUtil.createTask(Directory.class)
-        context.checking {
-            one(taskContainerMock).findByName('dir1'); will(returnValue(null))
-            one(taskContainerMock).add('dir1', Directory); will(returnValue(dirTask1))
-            one(taskContainerMock).findByName('dir1/dir4'); will(returnValue(dirTask14))
-        }
-
-        try {
-            project.dir('dir1/dir4')
-            fail()
-        } catch (InvalidUserDataException e) {
-            assertThat(e.message, equalTo("Cannot add directory task 'dir1/dir4' as a non-directory task with this name already exists."))
-        }
-    }
-
-    @Test void testCachingOfAnt() {
-        assertSame(testAntBuilder, project.ant)
-        assert project.ant.is(project.ant)
-    }
-
-    @Test void testAnt() {
-        Closure configureClosure = {fileset(dir: 'dir', id: 'fileset')}
-        project.ant(configureClosure)
-        assertThat(project.ant.project.getReference('fileset'), instanceOf(FileSet))
-    }
-
-    @Test void testCreateAntBuilder() {
-        assertSame testAntBuilder, project.createAntBuilder()
-    }
-
-    @Test void testCompareTo() {
-        assertThat(project, lessThan(child1))
-        assertThat(child1, lessThan(child2))
-        assertThat(child1, lessThan(childchild))
-        assertThat(child2, lessThan(childchild))
-    }
-
-    @Test void testDepthCompare() {
-        assertTrue(project.depthCompare(child1) < 0)
-        assertTrue(child1.depthCompare(project) > 0)
-        assertTrue(child1.depthCompare(child2) == 0)
-    }
-
-    @Test void testDepth() {
-        assertTrue(project.depth == 0)
-        assertTrue(child1.depth == 1)
-        assertTrue(child2.depth == 1)
-        assertTrue(childchild.depth == 2)
-    }
-
-    @Test void testSubprojects() {
-        checkConfigureProject('subprojects', listWithAllChildProjects)
-    }
-
-    @Test void testAllprojects() {
-        checkConfigureProject('allprojects', listWithAllProjects)
-    }
-
-    @Test void testConfigureProjects() {
-        checkConfigureProject('configure', [project, child1] as Set)
-    }
-
-    @Test void testHasUsefulToString() {
-        assertEquals('root project \'root\'', project.toString())
-        assertEquals('project \':child1\'', child1.toString())
-        assertEquals('project \':child1:childchild\'', childchild.toString())
-    }
-
-    private void checkConfigureProject(String configureMethod, Set projectsToCheck) {
-        String propValue = 'someValue'
-        if (configureMethod == 'configure') {
-            project."$configureMethod" projectsToCheck as List,
-                    {
-                        testSubProp = propValue
-                    }
-        } else {
-            project."$configureMethod"
-            {
-                testSubProp = propValue
-            }
-        }
-
-        projectsToCheck.each {
-            assertEquals(propValue, it.testSubProp)
-        }
-    }
-
-    @Test
-    void disableStandardOutputCapture() {
-        context.checking {
-            one(loggingManagerMock).disableStandardOutputCapture()
-        }
-        project.disableStandardOutputCapture()
-    }
-
-    @Test
-    void captureStandardOutput() {
-        context.checking {
-            one(loggingManagerMock).captureStandardOutput(LogLevel.DEBUG)
-        }
-        project.captureStandardOutput(LogLevel.DEBUG)
-    }
-
-    @Test
-    void configure() {
-        Point expectedPoint = new Point(4, 3)
-        Point actualPoint = project.configure(new Point()) {
-            setLocation(expectedPoint.x, expectedPoint.y)
-        }
-        assertEquals(expectedPoint, actualPoint)
-    }
-
-    @Test(expected = ReadOnlyPropertyException) void setName() {
-        project.name = "someNewName"
-    }
-
-    @Test void testGetModule() {
-        Module moduleDummyResolve = [:] as Module
-        context.checking {
-            allowing(dependencyMetaDataProviderMock).getModule(); will(returnValue(moduleDummyResolve))
-        }
-        assertThat(project.getModule(), equalTo(moduleDummyResolve))
-    }
-
-    @Test void convertsAbsolutePathToAbsolutePath() {
-        assertThat(project.absoluteProjectPath(':'), equalTo(':'))
-        assertThat(project.absoluteProjectPath(':other'), equalTo(':other'))
-        assertThat(child1.absoluteProjectPath(':'), equalTo(':'))
-        assertThat(child1.absoluteProjectPath(':other'), equalTo(':other'))
-    }
-
-    @Test void convertsRelativePathToAbsolutePath() {
-        assertThat(project.absoluteProjectPath('task'), equalTo(':task'))
-        assertThat(project.absoluteProjectPath('sub:other'), equalTo(':sub:other'))
-        assertThat(child1.absoluteProjectPath('task'), equalTo(':child1:task'))
-        assertThat(child1.absoluteProjectPath('sub:other'), equalTo(':child1:sub:other'))
-    }
-
-    @Test void convertsRelativePathToRelativePath() {
-        assertThat(project.relativeProjectPath('task'), equalTo('task'))
-        assertThat(project.relativeProjectPath('sub:other'), equalTo('sub:other'))
-    }
-
-    @Test void convertsAbsolutePathToRelativePath() {
-        assertThat(project.relativeProjectPath(':'), equalTo(':'))
-        assertThat(project.relativeProjectPath(':task'), equalTo('task'))
-        assertThat(project.relativeProjectPath(':sub:other'), equalTo('sub:other'))
-        assertThat(child1.relativeProjectPath(':child1'), equalTo(':child1'))
-        assertThat(child1.relativeProjectPath(':child1:task'), equalTo('task'))
-        assertThat(child1.relativeProjectPath(':child12:task'), equalTo(':child12:task'))
-        assertThat(child1.relativeProjectPath(':sub:other'), equalTo(':sub:other'))
-    }
-}
-
-class TaskContainerDynamicObject {
-    Task someTask
-    
-    def someTask(Closure closure) {
-        closure.call()
-    }
-}
-
-class TestConvention {
-    final static String METHOD_RESULT = 'methodResult'
-    String name
-    String conv
-    String archivesBaseName
-
-    def scriptMethod(Closure cl) {
-        METHOD_RESULT
-    }
-}
-
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObjectTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObjectTest.groovy
deleted file mode 100644
index 65f2216..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/generator/XmlPersistableConfigurationObjectTest.groovy
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.tasks.generator
-
-import org.gradle.api.internal.XmlTransformer
-import org.gradle.util.TemporaryFolder
-import org.junit.Rule
-import spock.lang.Specification
-
-class XmlPersistableConfigurationObjectTest extends Specification {
-    @Rule public final TemporaryFolder tmpDir = new TemporaryFolder()
-    String rootElement
-    final XmlPersistableConfigurationObject object = new XmlPersistableConfigurationObject(new XmlTransformer()) {
-        @Override protected String getDefaultResourceName() {
-            return 'defaultResource.xml'
-        }
-
-        @Override protected void load(Node xml) {
-            rootElement = xml.name() as String
-        }
-
-        @Override protected void store(Node xml) {
-            xml.name = rootElement
-        }
-    }
-
-    def loadsFromXmlFile() {
-        def inputFile = tmpDir.file('input.xml')
-        inputFile.text = '<some-xml/>'
-
-        when:
-        object.load(inputFile)
-
-        then:
-        rootElement == 'some-xml'
-    }
-
-    def loadsFromDefaultResource() {
-        when:
-        object.loadDefaults()
-
-        then:
-        rootElement == 'default-xml'
-    }
-
-    def storesToXmlFile() {
-        object.loadDefaults()
-        rootElement = 'modified-xml'
-        def outputFile = tmpDir.file('output.xml')
-
-        when:
-        object.store(outputFile)
-
-        then:
-        outputFile.text == '<modified-xml/>\n'
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultJavaForkOptionsTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultJavaForkOptionsTest.groovy
deleted file mode 100644
index 99858e4..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultJavaForkOptionsTest.groovy
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.api.internal.tasks.util
-
-import static org.hamcrest.Matchers.*
-
-import org.gradle.api.file.FileCollection
-import org.gradle.api.internal.file.FileResolver
-import org.gradle.api.internal.file.IdentityFileResolver
-import org.gradle.process.JavaForkOptions
-import org.gradle.process.internal.DefaultJavaForkOptions
-import org.gradle.util.JUnit4GroovyMockery
-import org.gradle.util.Jvm
-import org.jmock.integration.junit4.JMock
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.gradle.util.Matchers.isEmpty
-import static org.gradle.util.Matchers.isEmptyMap
-import static org.junit.Assert.*
-import org.junit.Before
-
- at RunWith(JMock.class)
-public class DefaultJavaForkOptionsTest {
-    private final JUnit4GroovyMockery context = new JUnit4GroovyMockery()
-    private final FileResolver resolver = context.mock(FileResolver.class)
-    private DefaultJavaForkOptions options
-
-    @Before
-    public void setup() {
-        context.checking {
-            allowing(resolver).resolveLater(new File('.').absoluteFile)
-        }
-        options = new DefaultJavaForkOptions(resolver, Jvm.current())
-    }
-
-    @Test
-    public void defaultValues() {
-        assertThat(options.executable, notNullValue())
-        assertThat(options.jvmArgs, isEmpty())
-        assertThat(options.systemProperties, isEmptyMap())
-        assertThat(options.maxHeapSize, nullValue())
-        assertThat(options.bootstrapClasspath.files, isEmpty())
-        assertFalse(options.enableAssertions)
-        assertFalse(options.debug)
-        assertThat(options.allJvmArgs, isEmpty())
-    }
-
-    @Test
-    public void convertsJvmArgsToStringOnGet() {
-        options.jvmArgs = [12, "${1 + 2}"]
-        assertThat(options.jvmArgs, equalTo(['12', '3']))
-    }
-
-    @Test
-    public void canAddJvmArgs() {
-        options.jvmArgs('arg1', 'arg2')
-        assertThat(options.jvmArgs, equalTo(['arg1', 'arg2']))
-    }
-
-    @Test
-    public void canSetSystemProperties() {
-        options.systemProperties = [key: 12, key2: "value", key3: null]
-        assertThat(options.systemProperties, equalTo(key: 12, key2: "value", key3: null))
-    }
-
-    @Test
-    public void canAddSystemProperties() {
-        options.systemProperties(key: 12)
-        options.systemProperty('key2', 'value2')
-        assertThat(options.systemProperties, equalTo(key: 12, key2: 'value2'))
-    }
-
-    @Test
-    public void allJvmArgsIncludeSystemPropertiesAsString() {
-        options.systemProperties(key: 12, key2: null, "key3": 'value')
-        options.jvmArgs('arg1')
-
-        assertThat(options.allJvmArgs, equalTo(['arg1', '-Dkey=12', '-Dkey2', '-Dkey3=value']))
-    }
-
-    @Test
-    public void systemPropertiesAreUpdatedWhenAddedUsingJvmArgs() {
-        options.systemProperties(key: 12)
-        options.jvmArgs('-Dkey=new value', '-Dkey2')
-
-        assertThat(options.systemProperties, equalTo(key: 'new value', key2: null))
-
-        options.allJvmArgs = []
-
-        assertThat(options.systemProperties, equalTo([:]))
-
-        options.allJvmArgs = ['-Dkey=value']
-
-        assertThat(options.systemProperties, equalTo([key: 'value']))
-    }
-
-    @Test
-    public void allJvmArgsIncludeMaxHeapSize() {
-        options.maxHeapSize = '1g'
-        options.jvmArgs('arg1')
-
-        assertThat(options.allJvmArgs, equalTo(['arg1', '-Xmx1g']))
-    }
-
-    @Test
-    public void maxHeapSizeIsUpdatedWhenSetUsingJvmArgs() {
-        options.maxHeapSize = '1g'
-        options.jvmArgs('-Xmx1024m')
-
-        assertThat(options.maxHeapSize, equalTo('1024m'))
-
-        options.allJvmArgs = []
-
-        assertThat(options.maxHeapSize, nullValue())
-
-        options.allJvmArgs = ['-Xmx1g']
-
-        assertThat(options.maxHeapSize, equalTo('1g'))
-    }
-
-    @Test
-    public void allJvmArgsIncludeAssertionsEnabled() {
-        assertThat(options.allJvmArgs, equalTo([]))
-
-        options.enableAssertions = true
-
-        assertThat(options.allJvmArgs, equalTo(['-ea']))
-    }
-
-    @Test
-    public void assertionsEnabledIsUpdatedWhenSetUsingJvmArgs() {
-        options.jvmArgs('-ea')
-        assertTrue(options.enableAssertions)
-        assertThat(options.jvmArgs, equalTo([]))
-
-        options.allJvmArgs = []
-        assertFalse(options.enableAssertions)
-
-        options.jvmArgs('-enableassertions')
-        assertTrue(options.enableAssertions)
-
-        options.allJvmArgs = ['-da']
-        assertFalse(options.enableAssertions)
-    }
-
-    @Test
-    public void allJvmArgsIncludeDebugArgs() {
-        assertThat(options.allJvmArgs, equalTo([]))
-
-        options.debug = true
-
-        assertThat(options.allJvmArgs, equalTo(['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005']))
-    }
-
-    @Test
-    public void debugIsUpdatedWhenSetUsingJvmArgs() {
-        options.jvmArgs('-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005')
-        assertTrue(options.debug)
-        assertThat(options.jvmArgs, equalTo([]))
-
-        options.allJvmArgs = []
-        assertFalse(options.debug)
-
-        options.jvmArgs = ['-Xdebug']
-        assertFalse(options.debug)
-        assertThat(options.jvmArgs, equalTo(['-Xdebug']))
-
-        options.jvmArgs = ['-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005']
-        assertFalse(options.debug)
-        assertThat(options.jvmArgs, equalTo(['-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005']))
-
-        options.jvmArgs '-Xdebug'
-        assertTrue(options.debug)
-        assertThat(options.jvmArgs, equalTo([]))
-
-        options.jvmArgs = ['-Xdebug', '-Xrunjdwp:transport=other']
-        assertFalse(options.debug)
-        assertThat(options.jvmArgs, equalTo(['-Xdebug', '-Xrunjdwp:transport=other']))
-
-        options.allJvmArgs = ['-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005', '-Xdebug']
-        assertTrue(options.debug)
-        assertThat(options.jvmArgs, equalTo([]))
-    }
-    
-    @Test
-    public void canSetBootstrapClasspath() {
-        def bootstrapClasspath = [:] as FileCollection
-        options.bootstrapClasspath = bootstrapClasspath
-
-        assertThat(options.bootstrapClasspath, sameInstance(bootstrapClasspath))
-    }
-
-    @Test
-    public void canAddToBootstrapClasspath() {
-        def files = ['file1.jar', 'file2.jar'].collect { new File(it).canonicalFile }
-        options = new DefaultJavaForkOptions(new IdentityFileResolver());
-        options.bootstrapClasspath(files[0])
-        options.bootstrapClasspath(files[1])
-
-        assertThat(options.bootstrapClasspath.getFiles(), equalTo(files as Set))
-    }
-
-    @Test
-    public void allJvmArgsIncludeBootstrapClasspath() {
-        def files = ['file1.jar', 'file2.jar'].collect { new File(it).canonicalFile }
-        options = new DefaultJavaForkOptions(new IdentityFileResolver());
-        options.bootstrapClasspath(files)
-
-        context.checking {
-            allowing(resolver).resolveFiles(['file.jar'])
-            will(returnValue([isEmpty: {false}, getAsPath: {'<classpath>'}] as FileCollection))
-        }
-
-        assertThat(options.allJvmArgs, equalTo(['-Xbootclasspath:' + files.join(System.properties['path.separator'])]))
-    }
-
-    @Test
-    public void canSetBootstrapClasspathViaAllJvmArgs() {
-        def files = ['file1.jar', 'file2.jar'].collect { new File(it).canonicalFile }
-        options = new DefaultJavaForkOptions(new IdentityFileResolver());
-        options.bootstrapClasspath(files[0])
-
-        options.allJvmArgs = ['-Xbootclasspath:' + files[1]]
-
-        assertThat(options.bootstrapClasspath.files, equalTo([files[1]] as Set))
-    }
-
-    @Test
-    public void canCopyToTargetOptions() {
-        options.executable('executable')
-        options.jvmArgs('arg')
-        options.systemProperties(key: 12)
-        options.maxHeapSize = '1g'
-
-        JavaForkOptions target = context.mock(JavaForkOptions.class)
-        context.checking {
-            one(target).setExecutable('executable')
-            one(target).setJvmArgs(['arg'])
-            one(target).setSystemProperties(key: 12)
-            one(target).setMaxHeapSize('1g')
-            one(target).setBootstrapClasspath(options.bootstrapClasspath)
-            one(target).setEnableAssertions(false)
-            one(target).setDebug(false)
-            ignoring(target)
-        }
-
-        options.copyTo(target)
-    }
-}
-
-
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultProcessForkOptionsTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultProcessForkOptionsTest.groovy
deleted file mode 100644
index f886f4d..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/api/internal/tasks/util/DefaultProcessForkOptionsTest.groovy
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.tasks.util
-
-import static org.gradle.util.Matchers.*
-
-import org.gradle.api.internal.file.FileResolver
-import org.gradle.util.JUnit4GroovyMockery
-import org.gradle.process.ProcessForkOptions
-import org.jmock.integration.junit4.JMock
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.*
-import static org.junit.Assert.assertThat
-import org.gradle.process.internal.DefaultProcessForkOptions
-import org.junit.Before
-import org.gradle.api.internal.file.FileSource
-
- at RunWith(JMock.class)
-public class DefaultProcessForkOptionsTest {
-    private final JUnit4GroovyMockery context = new JUnit4GroovyMockery()
-    private final FileResolver resolver = context.mock(FileResolver.class)
-    private final FileSource workingDir = context.mock(FileSource.class)
-    private DefaultProcessForkOptions options
-    private final File baseDir = new File("base-dir")
-
-    @Before
-    public void setup() {
-        context.checking {
-            allowing(resolver).resolveLater(new File('.').absoluteFile)
-            will(returnValue(workingDir))
-        }
-        options = new DefaultProcessForkOptions(resolver)
-    }
-
-    @Test
-    public void defaultValues() {
-        assertThat(options.executable, nullValue())
-        assertThat(options.environment, not(isEmptyMap()))
-    }
-
-    @Test
-    public void resolvesWorkingDirectoryOnGet() {
-        context.checking {
-            one(resolver).resolveLater(12)
-            will(returnValue(workingDir))
-        }
-
-        options.workingDir = 12
-
-        context.checking {
-            one(workingDir).get()
-            will(returnValue(baseDir))
-        }
-
-        assertThat(options.workingDir, equalTo(baseDir))
-    }
-
-    @Test
-    public void convertsEnvironmentToString() {
-        options.environment = [key1: 12, key2: "${1+2}"]
-
-        assertThat(options.actualEnvironment, equalTo(key1: '12', key2: '3'))
-    }
-
-    @Test
-    public void canAddEnvironmentVariables() {
-        options.environment = [:]
-
-        assertThat(options.environment, equalTo([:]))
-
-        options.environment('key', 12)
-
-        assertThat(options.environment, equalTo([key: 12]))
-        assertThat(options.actualEnvironment, equalTo([key: '12']))
-
-        options.environment(key2: "value")
-
-        assertThat(options.environment, equalTo([key: 12, key2: "value"]))
-    }
-    
-    @Test
-    public void canCopyToTargetOptions() {
-        options.executable('executable')
-        options.environment('key', 12)
-
-        ProcessForkOptions target = context.mock(ProcessForkOptions.class)
-        context.checking {
-            one(target).setExecutable('executable')
-            one(target).setWorkingDir(workingDir)
-            one(target).setEnvironment(withParam(not(isEmptyMap())))
-        }
-
-        options.copyTo(target)
-    }
-}
-
-
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultCommandLineConverterTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultCommandLineConverterTest.java
deleted file mode 100644
index f51c4b8..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultCommandLineConverterTest.java
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.initialization;
-
-import org.gradle.CacheUsage;
-import org.gradle.CommandLineArgumentException;
-import org.gradle.StartParameter;
-import org.gradle.api.internal.artifacts.ProjectDependenciesBuildInstruction;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.groovy.scripts.UriScriptSource;
-import org.gradle.util.GUtil;
-import org.gradle.util.TemporaryFolder;
-import org.gradle.util.TestFile;
-import org.gradle.util.WrapUtil;
-import org.junit.Rule;
-import org.junit.Test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.*;
-
-import static org.gradle.util.WrapUtil.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultCommandLineConverterTest {
-    @Rule
-    public TemporaryFolder testDir = new TemporaryFolder();
-
-    private TestFile currentDir = testDir.file("current-dir");
-    private File expectedBuildFile;
-    private File expectedGradleUserHome = StartParameter.DEFAULT_GRADLE_USER_HOME;
-    private File expectedProjectDir = currentDir;
-    private List<String> expectedTaskNames = toList();
-    private Set<String> expectedExcludedTasks = toSet();
-    private ProjectDependenciesBuildInstruction expectedProjectDependenciesBuildInstruction
-            = new ProjectDependenciesBuildInstruction(WrapUtil.<String>toList());
-    private Map<String, String> expectedSystemProperties = new HashMap<String, String>();
-    private Map<String, String> expectedProjectProperties = new HashMap<String, String>();
-    private List<File> expectedInitScripts = new ArrayList<File>();
-    private CacheUsage expectedCacheUsage = CacheUsage.ON;
-    private boolean expectedSearchUpwards = true;
-    private boolean expectedDryRun;
-    private StartParameter.ShowStacktrace expectedShowStackTrace = StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
-    private String expectedEmbeddedScript = "somescript";
-    private LogLevel expectedLogLevel = LogLevel.LIFECYCLE;
-    private boolean expectedColorOutput = true;
-    private StartParameter actualStartParameter;
-    private boolean expectedProfile;
-
-    private final DefaultCommandLineConverter commandLineConverter = new DefaultCommandLineConverter();
-
-    @Test
-    public void withoutAnyOptions() {
-        checkConversion();
-    }
-
-    private void checkConversion(String... args) {
-        checkConversion(false, args);
-    }
-
-    private void checkStartParameter(StartParameter startParameter) {
-        assertEquals(expectedBuildFile, startParameter.getBuildFile());
-        assertEquals(expectedTaskNames, startParameter.getTaskNames());
-        assertEquals(expectedProjectDependenciesBuildInstruction,
-                startParameter.getProjectDependenciesBuildInstruction());
-        assertEquals(expectedProjectDir.getAbsoluteFile(), startParameter.getCurrentDir().getAbsoluteFile());
-        assertEquals(expectedCacheUsage, startParameter.getCacheUsage());
-        assertEquals(expectedSearchUpwards, startParameter.isSearchUpwards());
-        assertEquals(expectedProjectProperties, startParameter.getProjectProperties());
-        assertEquals(expectedSystemProperties, startParameter.getSystemPropertiesArgs());
-        assertEquals(expectedGradleUserHome.getAbsoluteFile(), startParameter.getGradleUserHomeDir().getAbsoluteFile());
-        assertEquals(expectedGradleUserHome.getAbsoluteFile(), startParameter.getGradleUserHomeDir().getAbsoluteFile());
-        assertEquals(expectedLogLevel, startParameter.getLogLevel());
-        assertEquals(expectedColorOutput, startParameter.isColorOutput());
-        assertEquals(expectedDryRun, startParameter.isDryRun());
-        assertEquals(expectedShowStackTrace, startParameter.getShowStacktrace());
-        assertEquals(expectedExcludedTasks, startParameter.getExcludedTaskNames());
-        assertEquals(expectedInitScripts, startParameter.getInitScripts());
-        assertEquals(expectedProfile, startParameter.isProfile());
-    }
-
-    private void checkConversion(final boolean embedded, String... args) {
-        actualStartParameter = new StartParameter();
-        actualStartParameter.setCurrentDir(currentDir);
-        commandLineConverter.convert(Arrays.asList(args), actualStartParameter);
-        // We check the params passed to the build factory
-        checkStartParameter(actualStartParameter);
-        if (embedded) {
-            assertThat(actualStartParameter.getBuildScriptSource().getResource().getText(), equalTo(expectedEmbeddedScript));
-        } else {
-            assert !GUtil.isTrue(actualStartParameter.getBuildScriptSource());
-        }
-    }
-
-    @Test
-    public void withSpecifiedGradleUserHomeDirectory() {
-        expectedGradleUserHome = testDir.file("home");
-        checkConversion("-g", expectedGradleUserHome.getAbsolutePath());
-
-        expectedGradleUserHome = currentDir.file("home");
-        checkConversion("-g", "home");
-    }
-
-    @Test
-    public void withSpecifiedProjectDirectory() {
-        expectedProjectDir = testDir.file("project-dir");
-        checkConversion("-p", expectedProjectDir.getAbsolutePath());
-
-        expectedProjectDir = currentDir.file("project-dir");
-        checkConversion("-p", "project-dir");
-    }
-
-    @Test
-    public void withSpecifiedBuildFileName() throws IOException {
-        expectedBuildFile = testDir.file("somename");
-        expectedProjectDir = expectedBuildFile.getParentFile();
-        checkConversion("-b", expectedBuildFile.getAbsolutePath());
-
-        expectedBuildFile = currentDir.file("somename");
-        expectedProjectDir = expectedBuildFile.getParentFile();
-        checkConversion("-b", "somename");
-    }
-
-    @Test
-    public void withSpecifiedSettingsFileName() throws IOException {
-        File expectedSettingsFile = currentDir.file("somesettings");
-        expectedProjectDir = expectedSettingsFile.getParentFile();
-
-        checkConversion("-c", "somesettings");
-
-        assertThat(actualStartParameter.getSettingsScriptSource(), instanceOf(UriScriptSource.class));
-        assertThat(actualStartParameter.getSettingsScriptSource().getResource().getFile(), equalTo(expectedSettingsFile));
-    }
-
-    @Test
-    public void withInitScripts() {
-        File script1 = currentDir.file("init1.gradle");
-        expectedInitScripts.add(script1);
-        checkConversion("-Iinit1.gradle");
-
-        File script2 = currentDir.file("init2.gradle");
-        expectedInitScripts.add(script2);
-        checkConversion("-Iinit1.gradle", "-Iinit2.gradle");
-    }
-    
-    @Test
-    public void withSystemProperties() {
-        final String prop1 = "gradle.prop1";
-        final String valueProp1 = "value1";
-        final String prop2 = "gradle.prop2";
-        final String valueProp2 = "value2";
-        expectedSystemProperties = toMap(prop1, valueProp1);
-        expectedSystemProperties.put(prop2, valueProp2);
-        checkConversion("-D", prop1 + "=" + valueProp1, "-D", prop2 + "=" + valueProp2);
-    }
-
-    @Test
-    public void withStartProperties() {
-        final String prop1 = "prop1";
-        final String valueProp1 = "value1";
-        final String prop2 = "prop2";
-        final String valueProp2 = "value2";
-        expectedProjectProperties = toMap(prop1, valueProp1);
-        expectedProjectProperties.put(prop2, valueProp2);
-        checkConversion("-P", prop1 + "=" + valueProp1, "-P", prop2 + "=" + valueProp2);
-    }
-
-    @Test
-    public void withTaskNames() {
-        expectedTaskNames = toList("a", "b");
-        checkConversion("a", "b");
-    }
-
-    @Test
-    public void withRebuildCacheFlagSet() {
-        expectedCacheUsage = CacheUsage.REBUILD;
-        checkConversion("-C", "rebuild");
-    }
-
-    @Test
-    public void withCacheOnFlagSet() {
-        checkConversion("-C", "on");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withUnknownCacheFlags() {
-        checkConversion("-C", "unknown");
-    }
-
-    @Test
-    public void withSearchUpwardsFlagSet() {
-        expectedSearchUpwards = false;
-        checkConversion("-u");
-    }
-
-    @Test
-    public void withShowFullStacktrace() {
-        expectedShowStackTrace = StartParameter.ShowStacktrace.ALWAYS_FULL;
-        checkConversion("-S");
-    }
-
-    @Test
-    public void withShowStacktrace() {
-        expectedShowStackTrace = StartParameter.ShowStacktrace.ALWAYS;
-        checkConversion("-s");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withShowStacktraceAndShowFullStacktraceShouldThrowCommandLineArgumentEx() {
-        checkConversion("-sf");
-    }
-
-    @Test
-    public void withDryRunFlagSet() {
-        expectedDryRun = true;
-        checkConversion("-m");
-    }
-
-    @Test
-    public void withExcludeTask() {
-        expectedExcludedTasks.add("excluded");
-        checkConversion("-x", "excluded");
-        expectedExcludedTasks.add("excluded2");
-        checkConversion("-x", "excluded", "-x", "excluded2");
-    }
-
-    @Test
-    public void withEmbeddedScript() {
-        expectedSearchUpwards = false;
-        checkConversion(true, "-e", expectedEmbeddedScript);
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withEmbeddedScriptAndConflictingNoSearchUpwardsOption() {
-        checkConversion("-e", "someScript", "-u", "clean");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withEmbeddedScriptAndConflictingSpecifyBuildFileOption() {
-        checkConversion("-e", "someScript", "-bsomeFile", "clean");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withEmbeddedScriptAndConflictingSpecifySettingsFileOption() {
-        checkConversion("-e", "someScript", "-csomeFile", "clean");
-    }
-
-    @Test
-    public void withNoProjectDependencyRebuild() {
-        expectedProjectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(null);
-        checkConversion("-a");
-    }
-
-    @Test
-    public void withProjectDependencyTaskNames() {
-        expectedProjectDependenciesBuildInstruction = new ProjectDependenciesBuildInstruction(WrapUtil.toList("task1",
-                "task2"));
-        checkConversion("-Atask1", "-A", "task2");
-    }
-
-    @Test
-    public void withQuietLoggingOptions() {
-        expectedLogLevel = LogLevel.QUIET;
-        checkConversion("-q");
-    }
-
-    @Test
-    public void withInfoLoggingOptions() {
-        expectedLogLevel = LogLevel.INFO;
-        checkConversion("-i");
-    }
-
-    @Test
-    public void withDebugLoggingOptions() {
-        expectedLogLevel = LogLevel.DEBUG;
-        checkConversion("-d");
-    }
-
-    @Test
-    public void withNoColor() {
-        expectedColorOutput = false;
-        checkConversion("--no-color");
-    }
-
-    @Test
-    public void withShowTasks() {
-        expectedTaskNames = toList("tasks");
-        checkConversion(false, "-t");
-    }
-
-    @Test
-    public void withShowAllTasks() {
-        expectedTaskNames = toList("tasks", "--all");
-        checkConversion(false, "-t", "--all");
-    }
-
-    @Test
-    public void withShowTasksAndEmbeddedScript() {
-        expectedSearchUpwards = false;
-        expectedTaskNames = toList("tasks");
-        checkConversion(true, "-e", expectedEmbeddedScript, "-t");
-    }
-
-    @Test
-    public void withShowProperties() {
-        expectedTaskNames = toList("properties");
-        checkConversion(false, "-r");
-    }
-
-    @Test
-    public void withShowDependencies() {
-        expectedTaskNames = toList("dependencies");
-        checkConversion(false, "-n");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withLowerPParameterWithoutArgument() {
-        checkConversion("-p");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withAParameterWithoutArgument() {
-        checkConversion("-A");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withUpperAAndLowerAParameter() {
-        checkConversion("-a", "-Atask1");
-    }
-
-    @Test
-    public void withProfile() {
-        expectedProfile = true;
-        checkConversion("--profile");
-    }
-
-    @Test(expected = CommandLineArgumentException.class)
-    public void withUnknownOption() {
-        checkConversion("--unknown");
-    }
-
-    @Test
-    public void withTaskAndTaskOption() {
-        expectedTaskNames = toList("someTask", "--some-task-option");
-        checkConversion("someTask", "--some-task-option");
-    }
-
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultInitScriptFinderTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultInitScriptFinderTest.java
deleted file mode 100644
index d1fb305..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/initialization/DefaultInitScriptFinderTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.initialization;
-
-import org.gradle.util.GFileUtils;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.Expectations;
-import org.gradle.StartParameter;
-import org.gradle.api.internal.GradleInternal;
-import org.gradle.groovy.scripts.ScriptSource;
-import org.junit.Test;
-import static org.junit.Assert.*;
-import static org.hamcrest.Matchers.*;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.io.File;
-
-public class DefaultInitScriptFinderTest {
-    @Test
-    public void testFindScripts() {
-        JUnit4Mockery context = new JUnit4Mockery();
-
-        final GradleInternal gradleMock = context.mock(GradleInternal.class);
-        final StartParameter testStartParameter = new StartParameter();
-        testStartParameter.addInitScript(new File("some init script"));
-        testStartParameter.addInitScript(new File("/path/to/another init script"));
-
-        context.checking(new Expectations() {{
-            allowing(gradleMock).getStartParameter();
-            will(returnValue(testStartParameter));
-        }});
-
-        List<ScriptSource> sourceList = new DefaultInitScriptFinder().findScripts(gradleMock);
-        assertThat(getSourceFiles(sourceList), equalTo(canonicalise(testStartParameter.getInitScripts())));
-    }
-
-    private List<File> canonicalise(List<File> files) {
-        List<File> results = new ArrayList<File>();
-        for (File file : files) {
-            results.add(GFileUtils.canonicalise(file));
-        }
-        return results;
-    }
-
-    private List<File> getSourceFiles(List<ScriptSource> sources)
-    {
-        List<File> results = new ArrayList<File>(sources.size());
-        for (ScriptSource source : sources) {
-            results.add(source.getResource().getFile());
-        }
-        return results;
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/listener/ListenerBroadcastTest.java b/subprojects/gradle-core/src/test/groovy/org/gradle/listener/ListenerBroadcastTest.java
deleted file mode 100644
index 1dc5067..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/listener/ListenerBroadcastTest.java
+++ /dev/null
@@ -1,334 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.listener;
-
-import org.gradle.api.Action;
-import org.gradle.messaging.dispatch.Dispatch;
-import org.gradle.messaging.dispatch.MethodInvocation;
-import org.gradle.util.JUnit4GroovyMockery;
-import org.gradle.util.TestClosure;
-import org.hamcrest.Description;
-import org.jmock.Expectations;
-import org.jmock.api.Invocation;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.gradle.util.HelperUtil.*;
-import static org.gradle.util.Matchers.*;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
- at RunWith(JMock.class)
-public class ListenerBroadcastTest {
-    private final JUnit4Mockery context = new JUnit4GroovyMockery();
-    private final ListenerBroadcast<TestListener> broadcast = new ListenerBroadcast<TestListener>(TestListener.class);
-
-    @Test
-    public void createsSourceObject() {
-        assertThat(broadcast.getSource(), notNullValue());
-        assertThat(broadcast.getSource(), strictlyEqual(broadcast.getSource()));
-        assertFalse(broadcast.getSource().equals(new ListenerBroadcast<TestListener>(TestListener.class).getSource()));
-        assertEquals(broadcast.getSource().hashCode(), broadcast.getSource().hashCode());
-        assertThat(broadcast.getSource().toString(), equalTo("TestListener broadcast"));
-    }
-
-    @Test
-    public void getTypeIsCorrect() {
-        assertThat(broadcast.getType(), equalTo(TestListener.class));
-    }
-
-    @Test
-    public void sourceObjectDoesNothingWhenNoListenersAdded() {
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void sourceObjectNotifiesEachListenerInOrderAdded() {
-        final TestListener listener1 = context.mock(TestListener.class, "listener1");
-        final TestListener listener2 = context.mock(TestListener.class, "listener2");
-
-        context.checking(new Expectations() {{
-            one(listener1).event1("param");
-            one(listener2).event1("param");
-        }});
-
-        broadcast.add(listener1);
-        broadcast.add(listener2);
-
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void canDispatchEventToListeners() throws NoSuchMethodException {
-        final TestListener listener1 = context.mock(TestListener.class, "listener1");
-        final TestListener listener2 = context.mock(TestListener.class, "listener2");
-
-        context.checking(new Expectations() {{
-            one(listener1).event1("param");
-            one(listener2).event1("param");
-        }});
-
-        broadcast.add(listener1);
-        broadcast.add(listener2);
-
-        MethodInvocation invocation = new MethodInvocation(TestListener.class.getMethod("event1", String.class), new Object[] { "param" });
-        broadcast.dispatch(invocation);
-    }
-
-    @Test
-    public void listenerIsNotUsedAfterItIsRemoved() {
-        TestListener listener = context.mock(TestListener.class);
-
-        broadcast.add(listener);
-        broadcast.remove(listener);
-
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void canUseDispatchToReceiveNotifications() throws NoSuchMethodException {
-        final Dispatch<MethodInvocation> dispatch1 = context.mock(Dispatch.class, "listener1");
-        final Dispatch<MethodInvocation> dispatch2 = context.mock(Dispatch.class, "listener2");
-        final MethodInvocation invocation = new MethodInvocation(TestListener.class.getMethod("event1", String.class), new Object[] { "param" });
-
-        context.checking(new Expectations() {{
-            one(dispatch1).dispatch(invocation);
-            one(dispatch2).dispatch(invocation);
-        }});
-
-        broadcast.add(dispatch1);
-        broadcast.add(dispatch2);
-
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void dispatchIsNotUsedAfterItIsRemoved() {
-        Dispatch<MethodInvocation> dispatch = context.mock(Dispatch.class);
-
-        broadcast.add(dispatch);
-        broadcast.remove(dispatch);
-
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void canUseClosureToReceiveNotificationsForSingleEventMethod() {
-        final TestClosure testClosure = context.mock(TestClosure.class);
-        context.checking(new Expectations() {{
-            one(testClosure).call("param");
-            will(returnValue("ignore me"));
-        }});
-
-        broadcast.add("event1", toClosure(testClosure));
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void doesNotNotifyClosureForOtherEventMethods() {
-        final TestClosure testClosure = context.mock(TestClosure.class);
-
-        broadcast.add("event1", toClosure(testClosure));
-        broadcast.getSource().event2(9, "param");
-    }
-
-    @Test
-    public void closureCanHaveFewerParametersThanEventMethod() {
-        broadcast.add("event2", toClosure("{ a -> 'result' }"));
-        broadcast.getSource().event2(1, "param");
-        broadcast.getSource().event2(2, null);
-    }
-
-    @Test
-    public void canUseActionForSingleEventMethod() {
-        final Action<String> action = context.mock(Action.class);
-        context.checking(new Expectations() {{
-            one(action).execute("param");
-        }});
-
-        broadcast.add("event1", action);
-        broadcast.getSource().event1("param");
-    }
-
-    @Test
-    public void doesNotNotifyActionForOtherEventMethods() {
-        final Action<String> action = context.mock(Action.class);
-
-        broadcast.add("event1", action);
-        broadcast.getSource().event2(9, "param");
-    }
-
-    @Test
-    public void actionCanHaveFewerParametersThanEventMethod() {
-        final Action<Integer> action = context.mock(Action.class);
-        context.checking(new Expectations(){{
-            one(action).execute(1);
-            one(action).execute(2);
-        }});
-        broadcast.add("event2", action);
-        broadcast.getSource().event2(1, "param");
-        broadcast.getSource().event2(2, null);
-    }
-
-    @Test
-    public void listenerCanAddAnotherListener() {
-        final TestListener listener1 = context.mock(TestListener.class, "listener1");
-        final TestListener listener2 = context.mock(TestListener.class, "listener2");
-        final TestListener listener3 = context.mock(TestListener.class, "listener3");
-
-        broadcast.add(listener1);
-        broadcast.add(listener2);
-
-        context.checking(new Expectations() {{
-            ignoring(listener2);
-            one(listener1).event1("event");
-            will(new org.jmock.api.Action() {
-                public void describeTo(Description description) {
-                    description.appendText("add listener");
-                }
-
-                public Object invoke(Invocation invocation) throws Throwable {
-                    broadcast.add(listener3);
-                    return null;
-                }
-            });
-        }});
-
-        broadcast.getSource().event1("event");
-    }
-    
-    @Test
-    public void wrapsExceptionThrownByListener() {
-        final TestListener listener = context.mock(TestListener.class);
-        final RuntimeException failure = new RuntimeException();
-
-        context.checking(new Expectations() {{
-            one(listener).event1("param");
-            will(throwException(failure));
-        }});
-
-        broadcast.add(listener);
-
-        try {
-            broadcast.getSource().event1("param");
-            fail();
-        } catch (ListenerNotificationException e) {
-            assertThat(e.getMessage(), equalTo("Failed to notify test listener."));
-            assertThat(e.getCause(), sameInstance((Throwable) failure));
-        }
-    }
-
-    @Test
-    public void wrapsExceptionThrownByClosure() {
-        final TestClosure testClosure = context.mock(TestClosure.class);
-        final RuntimeException failure = new RuntimeException();
-
-        context.checking(new Expectations() {{
-            one(testClosure).call("param");
-            will(throwException(failure));
-        }});
-
-        broadcast.add("event1", toClosure(testClosure));
-
-        try {
-            broadcast.getSource().event1("param");
-            fail();
-        } catch (ListenerNotificationException e) {
-            assertThat(e.getMessage(), equalTo("Failed to notify test listener."));
-            assertThat(e.getCause(), sameInstance((Throwable) failure));
-        }
-    }
-
-    @Test
-    public void dispatchWrapsExceptionThrownByListener() throws NoSuchMethodException {
-        final TestListener listener = context.mock(TestListener.class);
-        final RuntimeException failure = new RuntimeException();
-
-        context.checking(new Expectations() {{
-            one(listener).event1("param");
-            will(throwException(failure));
-        }});
-
-        broadcast.add(listener);
-
-        try {
-            broadcast.dispatch(new MethodInvocation(TestListener.class.getMethod("event1", String.class), new Object[]{"param"}));
-            fail();
-        } catch (ListenerNotificationException e) {
-            assertThat(e.getMessage(), equalTo("Failed to notify test listener."));
-            assertThat(e.getCause(), sameInstance((Throwable) failure));
-        }
-    }
-
-    @Test
-    public void attemptsToNotifyAllOtherListenersWhenOneThrowsException() {
-        final TestListener listener1 = context.mock(TestListener.class);
-        final TestListener listener2 = context.mock(TestListener.class);
-        final RuntimeException failure = new RuntimeException();
-
-        context.checking(new Expectations() {{
-            one(listener1).event1("param");
-            will(throwException(failure));
-            one(listener2).event1("param");
-        }});
-
-        broadcast.add(listener1);
-        broadcast.add(listener2);
-
-        try {
-            broadcast.getSource().event1("param");
-            fail();
-        } catch (ListenerNotificationException e) {
-            assertThat(e.getCause(), sameInstance((Throwable) failure));
-        }
-    }
-
-    @Test
-    public void attemptsToNotifyAllOtherListenersWhenMultipleThrowException() {
-        final TestListener listener1 = context.mock(TestListener.class);
-        final TestListener listener2 = context.mock(TestListener.class);
-        final TestListener listener3 = context.mock(TestListener.class);
-        final RuntimeException failure = new RuntimeException();
-
-        context.checking(new Expectations() {{
-            one(listener1).event1("param");
-            will(throwException(failure));
-            one(listener2).event1("param");
-            will(throwException(new RuntimeException()));
-            one(listener3).event1("param");
-        }});
-
-        broadcast.add(listener1);
-        broadcast.add(listener2);
-        broadcast.add(listener3);
-
-        try {
-            broadcast.getSource().event1("param");
-            fail();
-        } catch (ListenerNotificationException e) {
-            assertThat(e.getCause(), sameInstance((Throwable) failure));
-        }
-    }
-
-    public interface TestListener {
-        void event1(String param);
-
-        void event2(int value, String other);
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/GradleVersionTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/util/GradleVersionTest.groovy
deleted file mode 100644
index 5bc9e1a..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/util/GradleVersionTest.groovy
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.util
-
-import org.codehaus.groovy.runtime.InvokerHelper
-import static org.junit.Assert.*
-
-import org.apache.tools.ant.Main
-import org.apache.ivy.Ivy
-import spock.lang.Specification;
-
-/**
- * @author Hans Dockter
- */
-class GradleVersionTest extends Specification {
-    final GradleVersion version = new GradleVersion()
-
-    def equalsAndHashCode() {
-        expect:
-        Matchers.strictlyEquals(new GradleVersion('0.9'), new GradleVersion('0.9'))
-        new GradleVersion('0.9') != new GradleVersion('1.0')
-    }
-
-    def canConstructSnapshotVersion() {
-        expect:
-        new GradleVersion('0.9-20101220110000+1100').snapshot
-        !new GradleVersion('0.9-rc-1').snapshot
-    }
-
-    def canCompareMajorVersions() {
-        expect:
-        new GradleVersion(a) > new GradleVersion(b)
-        new GradleVersion(b) < new GradleVersion(a)
-        new GradleVersion(a) == new GradleVersion(a)
-        new GradleVersion(b) == new GradleVersion(b)
-
-        where:
-        a | b
-        '0.9' | '0.8'
-        '1.0' | '0.10'
-        '10.0' | '2.1'
-        '2.5' | '2.4'
-    }
-
-    def canComparePointVersions() {
-        expect:
-        new GradleVersion(a) > new GradleVersion(b)
-        new GradleVersion(b) < new GradleVersion(a)
-        new GradleVersion(a) == new GradleVersion(a)
-        new GradleVersion(b) == new GradleVersion(b)
-
-        where:
-        a | b
-        '0.9.2' | '0.9.1'
-        '0.10.1' | '0.9.2'
-    }
-
-    def canComparePointVersionAndMajorVersions() {
-        expect:
-        new GradleVersion(a) > new GradleVersion(b)
-        new GradleVersion(b) < new GradleVersion(a)
-        new GradleVersion(a) == new GradleVersion(a)
-        new GradleVersion(b) == new GradleVersion(b)
-
-        where:
-        a | b
-        '0.9.1' | '0.9'
-        '0.10' | '0.9.1'
-    }
-
-    def canComparePreviewsMilestonesAndRCVersions() {
-        expect:
-        new GradleVersion(a) > new GradleVersion(b)
-        new GradleVersion(b) < new GradleVersion(a)
-        new GradleVersion(a) == new GradleVersion(a)
-        new GradleVersion(b) == new GradleVersion(b)
-
-        where:
-        a | b
-        '1.0-milestone-2' | '1.0-milestone-1'
-        '1.0-preview-2' | '1.0-preview-1'
-        '1.0-rc-2' | '1.0-rc-1'
-        '1.0-preview-1' | '1.0-milestone-7'
-        '1.0-rc-7' | '1.0-rc-1'
-        '1.0' | '1.0-rc-7'
-    }
-
-    def canCompareSnapshotVersions() {
-        expect:
-        new GradleVersion(a) > new GradleVersion(b)
-        new GradleVersion(b) < new GradleVersion(a)
-        new GradleVersion(a) == new GradleVersion(a)
-        new GradleVersion(b) == new GradleVersion(b)
-
-        where:
-        a | b
-        '0.9-20101220110000+1100' | '0.9-20101220100000+1100'
-        '0.9-20101220110000+1000' | '0.9-20101220100000+1100'
-        '0.9' | '0.9-20101220100000+1000'
-    }
-
-    def defaultValuesForGradleVersion() {
-        expect:
-        version.version != null
-        version.buildTime != null
-    }
-
-    def prettyPrint() {
-        String expectedText = """
-------------------------------------------------------------
-Gradle $version.version
-------------------------------------------------------------
-
-Gradle build time: $version.buildTime
-Groovy: $InvokerHelper.version
-Ant: $Main.antVersion
-Ivy: ${Ivy.ivyVersion}
-JVM: ${Jvm.current()}
-OS: ${OperatingSystem.current()}
-"""
-        expect:
-        version.prettyPrint() == expectedText
-    }
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/JvmTest.groovy b/subprojects/gradle-core/src/test/groovy/org/gradle/util/JvmTest.groovy
deleted file mode 100644
index 589c78c..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/util/JvmTest.groovy
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.util
-
-import spock.lang.Specification
-import org.junit.Rule
-
-class JvmTest extends Specification {
-    @Rule public final TemporaryFolder tmpDir = new TemporaryFolder()
-    @Rule public final SetSystemProperties sysProp = new SetSystemProperties()
-
-    def usesSystemPropertyToDetermineIfCompatibleWithJava5() {
-        System.properties['java.version'] = '1.5'
-
-        expect:
-        def jvm = new Jvm()
-        jvm.java5Compatible
-        !jvm.java6Compatible
-    }
-
-    def usesSystemPropertyToDetermineIfCompatibleWithJava6() {
-        System.properties['java.version'] = '1.6'
-
-        expect:
-        def jvm = new Jvm()
-        jvm.java5Compatible
-        jvm.java6Compatible
-    }
-
-}
diff --git a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFile.java b/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFile.java
deleted file mode 100644
index 08660ad..0000000
--- a/subprojects/gradle-core/src/test/groovy/org/gradle/util/TestFile.java
+++ /dev/null
@@ -1,439 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.util;
-
-import groovy.lang.Closure;
-import org.apache.commons.io.FileUtils;
-import org.apache.tools.ant.taskdefs.Tar;
-import org.apache.tools.ant.taskdefs.Zip;
-import org.gradle.api.UncheckedIOException;
-import org.gradle.api.file.DeleteAction;
-import org.gradle.api.internal.file.IdentityFileResolver;
-import org.gradle.api.internal.file.copy.DeleteActionImpl;
-import org.hamcrest.Matcher;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.*;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import static org.junit.Assert.*;
-
-public class TestFile extends File implements TestFileContext {
-    private boolean useNativeTools;
-
-    public TestFile(File file, Object... path) {
-        super(join(file, path).getAbsolutePath());
-    }
-
-    public TestFile(URI uri) {
-        this(new File(uri));
-    }
-
-    public TestFile(String path) {
-        this(new File(path));
-    }
-
-    public TestFile(URL url) {
-        this(toUri(url));
-    }
-
-    public TestFile getTestDir() {
-        return this;
-    }
-
-    public TestFile usingNativeTools() {
-        useNativeTools = true;
-        return this;
-    }
-
-    private static URI toUri(URL url) {
-        try {
-            return url.toURI();
-        } catch (URISyntaxException e) {
-            throw new RuntimeException(e);
-        }
-    }
-
-    private static File join(File file, Object[] path) {
-        File current = file.getAbsoluteFile();
-        for (Object p : path) {
-            current = new File(current, p.toString());
-        }
-        return GFileUtils.canonicalise(current);
-    }
-
-    public TestFile file(Object... path) {
-        return new TestFile(this, path);
-    }
-
-    public List<TestFile> files(Object... paths) {
-        List<TestFile> files = new ArrayList<TestFile>();
-        for (Object path : paths) {
-            files.add(file(path));
-        }
-        return files;
-    }
-
-    public TestFile writelns(String... lines) {
-        return writelns(Arrays.asList(lines));
-    }
-
-    public TestFile write(Object content) {
-        try {
-            FileUtils.writeStringToFile(this, content.toString());
-        } catch (IOException e) {
-            throw new UncheckedIOException(String.format("Could not write to test file '%s'", this), e);
-        }
-        return this;
-    }
-
-    public TestFile leftShift(Object content) {
-        getParentFile().mkdirs();
-        return write(content);
-    }
-
-    public String getText() {
-        assertIsFile();
-        try {
-            return FileUtils.readFileToString(this);
-        } catch (IOException e) {
-            throw new UncheckedIOException(String.format("Could not read from test file '%s'", this), e);
-        }
-    }
-
-    public Map<String, String> getProperties() {
-        assertIsFile();
-        Properties properties = new Properties();
-        try {
-            FileInputStream inStream = new FileInputStream(this);
-            try {
-                properties.load(inStream);
-            } finally {
-                inStream.close();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-        Map<String, String> map = new HashMap<String, String>();
-        for (Object key : properties.keySet()) {
-            map.put(key.toString(), properties.getProperty(key.toString()));
-        }
-        return map;
-    }
-
-    public Manifest getManifest() {
-        assertIsFile();
-        try {
-            JarFile jarFile = new JarFile(this);
-            try {
-                return jarFile.getManifest();
-            } finally {
-                jarFile.close();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public List<String> linesThat(Matcher<? super String> matcher) {
-        try {
-            BufferedReader reader = new BufferedReader(new FileReader(this));
-            try {
-                List<String> lines = new ArrayList<String>();
-                String line;
-                while ((line = reader.readLine()) != null) {
-                    if (matcher.matches(line)) {
-                        lines.add(line);
-                    }
-                }
-                return lines;
-            } finally {
-                reader.close();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public void unzipTo(File target) {
-        assertIsFile();
-        new TestFileHelper(this).unzipTo(target, useNativeTools);
-    }
-
-    public void untarTo(File target) {
-        assertIsFile();
-
-        new TestFileHelper(this).untarTo(target, useNativeTools);
-    }
-
-    public void copyTo(File target) {
-        if (isDirectory()) {
-            try {
-                FileUtils.copyDirectory(this, target);
-            } catch (IOException e) {
-                throw new UncheckedIOException(String.format("Could not copy test directory '%s' to '%s'", this,
-                        target), e);
-            }
-        } else {
-            try {
-                FileUtils.copyFile(this, target);
-            } catch (IOException e) {
-                throw new UncheckedIOException(String.format("Could not copy test file '%s' to '%s'", this, target), e);
-            }
-        }
-    }
-
-    public void copyFrom(File target) {
-        new TestFile(target).copyTo(this);
-    }
-    
-    public void copyFrom(URL resource) {
-        try {
-            FileUtils.copyURLToFile(resource, this);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public TestFile linkTo(File target) {
-        getParentFile().createDir();
-        int retval = PosixUtil.current().symlink(target.getAbsolutePath(), getAbsolutePath());
-        if (retval != 0) {
-            throw new UncheckedIOException(String.format("Could not create link from '%s' to '%s'", target, this));
-        }
-        return this;
-    }
-
-    public TestFile touch() {
-        try {
-            FileUtils.touch(this);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-        assertIsFile();
-        return this;
-    }
-
-    /**
-     * Creates a directory structure specified by the given closure.
-     * <pre>
-     * dir.create {
-     *     subdir1 {
-     *        file 'somefile.txt'
-     *     }
-     *     subdir2 { nested { file 'someFile' } }
-     * }
-     * </pre>
-     */
-    public TestFile create(Closure structure) {
-        assertTrue(isDirectory() || mkdirs());
-        new TestDirHelper(this).apply(structure);
-        return this;
-    }
-
-    @Override
-    public TestFile getParentFile() {
-        return new TestFile(super.getParentFile());
-    }
-
-    @Override
-    public String toString() {
-        return getPath();
-    }
-
-    public TestFile writelns(Iterable<String> lines) {
-        Formatter formatter = new Formatter();
-        for (String line : lines) {
-            formatter.format("%s%n", line);
-        }
-        return write(formatter);
-    }
-
-    public TestFile assertExists() {
-        assertTrue(String.format("%s does not exist", this), exists());
-        return this;
-    }
-
-    public TestFile assertIsFile() {
-        assertTrue(String.format("%s is not a file", this), isFile());
-        return this;
-    }
-
-    public TestFile assertIsDir() {
-        assertTrue(String.format("%s is not a directory", this), isDirectory());
-        return this;
-    }
-
-    public TestFile assertDoesNotExist() {
-        assertFalse(String.format("%s should not exist", this), exists());
-        return this;
-    }
-
-    public TestFile assertContents(Matcher<String> matcher) {
-        assertThat(getText(), matcher);
-        return this;
-    }
-
-    public TestFile assertPermissions(Matcher<String> matcher) {
-        if (OperatingSystem.current().isUnix()) {
-            assertThat(String.format("mismatched permissions for '%s'", this), getPermissions(), matcher);
-        }
-        return this;
-    }
-
-    private String getPermissions() {
-        assertExists();
-        return new TestFileHelper(this).getPermissions();
-    }
-
-    public TestFile setPermissions(String permissions) {
-        assertExists();
-        new TestFileHelper(this).setPermissions(permissions);
-        return this;
-    }
-
-    /**
-     * Asserts that this file contains exactly the given set of descendants.
-     */
-    public TestFile assertHasDescendants(String... descendants) {
-        Set<String> actual = new TreeSet<String>();
-        assertIsDir();
-        visit(actual, "", this);
-        Set<String> expected = new TreeSet<String>(Arrays.asList(descendants));
-
-        Set<String> extras = new TreeSet<String>(actual);
-        extras.removeAll(expected);
-        Set<String> missing = new TreeSet<String>(expected);
-        missing.removeAll(actual);
-
-        assertEquals(String.format("Extra files: %s, missing files: %s, expected: %s", extras, missing, expected), expected, actual);
-
-        return this;
-    }
-
-    private void visit(Set<String> names, String prefix, File file) {
-        for (File child : file.listFiles()) {
-            if (child.isFile()) {
-                names.add(prefix + child.getName());
-            } else if (child.isDirectory()) {
-                visit(names, prefix + child.getName() + "/", child);
-            }
-        }
-    }
-
-    public boolean isSelfOrDescendent(File file) {
-        if (file.getAbsolutePath().equals(getAbsolutePath())) {
-            return true;
-        }
-        return file.getAbsolutePath().startsWith(getAbsolutePath() + File.separatorChar);
-    }
-
-    public TestFile createDir() {
-        assertTrue(isDirectory() || mkdirs());
-        return this;
-    }
-
-    public TestFile deleteDir() {
-        DeleteAction delete = new DeleteActionImpl(new IdentityFileResolver());
-        delete.delete(this);
-        return this;
-    }
-
-    /**
-     * Attempts to delete this directory, ignoring failures to do so.
-     * @return this
-     */
-    public TestFile maybeDeleteDir() {
-        try {
-            deleteDir();
-        } catch (UncheckedIOException e) {
-            // Ignore
-        }
-        return this;
-    }
-
-    public TestFile createFile() {
-        new TestFile(getParentFile()).createDir();
-        try {
-            assertTrue(isFile() || createNewFile());
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-        return this;
-    }
-
-    public TestFile zipTo(TestFile zipFile) {
-        Zip zip = new Zip();
-        zip.setBasedir(this);
-        zip.setDestFile(zipFile);
-        AntUtil.execute(zip);
-        return this;
-    }
-
-    public TestFile tarTo(TestFile zipFile) {
-        Tar tar = new Tar();
-        tar.setBasedir(this);
-        tar.setDestFile(zipFile);
-        AntUtil.execute(tar);
-        return this;
-    }
-
-    public Snapshot snapshot() {
-        assertIsFile();
-        return new Snapshot();
-    }
-
-    public void assertHasChangedSince(Snapshot snapshot) {
-        Snapshot now = snapshot();
-        assertTrue(now.modTime != snapshot.modTime || !Arrays.equals(now.hash, snapshot.hash));
-    }
-
-    public void assertHasNotChangedSince(Snapshot snapshot) {
-        Snapshot now = snapshot();
-        assertEquals(String.format("last modified time of %s has changed", this), snapshot.modTime, now.modTime);
-        assertArrayEquals(String.format("contents of %s has changed", this), snapshot.hash, now.hash);
-    }
-
-    public void writeProperties(Map<?, ?> properties) {
-        Properties props = new Properties();
-        props.putAll(properties);
-        try {
-            FileOutputStream stream = new FileOutputStream(this);
-            try {
-                props.store(stream, "comment");
-            } finally {
-                stream.close();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    public class Snapshot {
-        private final long modTime;
-        private final byte[] hash;
-
-        public Snapshot() {
-            modTime = lastModified();
-            hash = HashUtil.createHash(TestFile.this);
-        }
-    }
-}
diff --git a/subprojects/gradle-docs/docs.gradle b/subprojects/gradle-docs/docs.gradle
deleted file mode 100644
index f38c369..0000000
--- a/subprojects/gradle-docs/docs.gradle
+++ /dev/null
@@ -1,489 +0,0 @@
-
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-import org.gradle.build.docs.UserGuideTransformTask
-import org.gradle.build.docs.ExtractSnippetsTask
-import org.gradle.build.docs.AssembleSamplesDocTask
-import org.gradle.build.docs.dsl.docbook.AssembleDslDocTask
-import org.gradle.build.docs.dsl.ExtractDslMetaDataTask
-
-apply plugin: 'base'
-
-configurations {
-    ftpAntTask
-    userGuideStyleSheets
-    userGuideTask
-}
-
-dependencies {
-    ftpAntTask module("org.apache.ant:ant-commons-net:1.7.0") {
-        module("commons-net:commons-net:1.4.1") {
-            dependencies("oro:oro:2.0.8 at jar")
-        }
-    }
-
-    userGuideTask 'xalan:xalan:2.7.1', 'xerces:xercesImpl:2.9.1'
-    userGuideTask module('xhtmlrenderer:xhtmlrenderer:R8rc1') {
-        dependency 'itext:itext:2.0.8 at jar'
-    }
-    userGuideTask 'xslthl:xslthl:2.0.1 at jar'
-
-    userGuideStyleSheets 'docbook:docbook-xsl:1.75.2 at zip'
-}
-
-RemoteLocations remoteLocations = new RemoteLocations(version: version)
-
-srcDocsDir = file('src/docs')
-userguideSrcDir = new File(srcDocsDir, 'userguide')
-cssSrcDir = new File(srcDocsDir, 'css')
-dslSrcDir = new File(srcDocsDir, 'dsl')
-
-docsDir = file("$buildDir/docs")
-userguideDir = new File(docsDir, 'userguide')
-distDocsDir = new File(buildDir, 'distDocs')
-samplesDir = file("$buildDir/samples")
-docbookSrc = new File(project.buildDir, 'src')
-samplesSrcDir = file('src/samples')
-websiteDocs = new File(buildDir, 'websiteDocs')
-
-tasks.withType(Docbook2Xhtml).allObjects { task->
-    task.dependsOn userguideStyleSheets
-    task.classpath = configurations.userGuideTask
-    task.stylesheetsDir = userguideStyleSheets.destinationDir
-}
-tasks.withType(UserGuideTransformTask).allObjects { task->
-    task.classpath = configurations.userGuideTask
-    task.dependsOn samples, dslDocbook
-    task.snippetsDir = samples.snippetsDir
-    task.linksFile = dslDocbook.linksFile
-}
-tasks.withType(AssembleDslDocTask).allObjects { task ->
-    task.classpath = configurations.userGuideTask
-    task.classDocbookDir = dslSrcDir
-}
-
-task samples(type: ExtractSnippetsTask) {
-    source samplesSrcDir
-    exclude 'userguideOutput/**'
-    exclude 'userguide/tutorial/antChecksumFiles/**'
-    exclude '**/readme.xml'
-    destDir = samplesDir
-    snippetsDir = new File(buildDir, 'snippets')
-    doLast {
-        copy {
-            from samplesSrcDir
-            into samplesDir
-            include 'userguide/tutorial/antChecksumFiles/**'
-        }
-    }
-}
-
-task userguideStyleSheets(type: Copy) {
-    File stylesheetsDir = new File(srcDocsDir, 'stylesheets')
-    into new File(buildDir, 'stylesheets')
-    from(stylesheetsDir) {
-        include '*.xsl'
-    }
-    from(cssSrcDir) {
-        include '*.css'
-    }
-    from(zipTree(configurations.userGuideStyleSheets.singleFile)) {
-        // Remove the prefix
-        eachFile { fcd -> fcd.path = fcd.path.replaceFirst('^docbook-xsl-[0-9\\.]+/', '') }
-    }
-}
-
-task samplesDocbook(type: AssembleSamplesDocTask) {
-    source samplesSrcDir
-    include '**/readme.xml'
-    destFile = new File(docbookSrc, 'samplesList.xml')
-}
-
-task samplesDocs(type: Docbook2Xhtml, dependsOn: samplesDocbook) {
-    source samplesDocbook.destFile
-    destFile = new File(samples.destDir, 'readme.html')
-    stylesheetName = 'standaloneHtml.xsl'
-}
-
-task dslMetaData(type: ExtractDslMetaDataTask) {
-    source { groovydoc.source }
-    destFile = new File(docbookSrc, 'dsl-meta-data.bin')
-}
-
-task dslDocbook(type: AssembleDslDocTask, dependsOn: [dslMetaData]) {
-    inputs.files fileTree(dir: dslSrcDir, includes: ['*.xml'])
-    sourceFile = new File(dslSrcDir, 'dsl.xml')
-    classMetaDataFile = dslMetaData.destFile
-    pluginsMetaDataFile = new File(dslSrcDir, 'plugins.xml')
-    destFile = new File(docbookSrc, 'dsl.xml')
-    linksFile = new File(docbookSrc, 'api-links.bin')
-}
-
-task dslStandaloneDocbook(type: UserGuideTransformTask, dependsOn: [dslDocbook]) {
-    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
-    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
-    sourceFile = dslDocbook.destFile
-    destFile = new File(docbookSrc, 'dsl-standalone.xml')
-    javadocUrl = '../javadoc'
-    groovydocUrl = '../groovydoc'
-    dsldocUrl = '.'
-    websiteUrl = 'http://www.gradle.org'
-}
-
-task dslHtml(type: Docbook2Xhtml, dependsOn: dslStandaloneDocbook) {
-    source dslStandaloneDocbook.destFile
-    destDir = new File(docsDir, 'dsl')
-    stylesheetName = 'dslHtml.xsl'
-    resources = fileTree {
-        from cssSrcDir
-        include '*.css'
-    } + fileTree {
-        from dslSrcDir
-        include '*.js'
-    }
-}
-
-task userguideDocbook(type: UserGuideTransformTask, dependsOn: [samples, samplesDocbook]) {
-    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
-    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
-    sourceFile = new File(userguideSrcDir, 'userguide.xml')
-    destFile = new File(docbookSrc, 'userguide.xml')
-    javadocUrl = '../javadoc'
-    groovydocUrl = '../groovydoc'
-    dsldocUrl = '../dsl'
-    websiteUrl = 'http://www.gradle.org'
-}
-
-task remoteUserguideDocbook(type: UserGuideTransformTask, dependsOn: samples) {
-    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
-    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
-    sourceFile = new File(userguideSrcDir, 'userguide.xml')
-    destFile = new File(docbookSrc, 'remoteUserguide.xml')
-    doFirst {
-        javadocUrl = remoteLocations.javadocUrl
-        groovydocUrl = remoteLocations.groovydocUrl
-        dsldocUrl = remoteLocations.dsldocUrl
-        websiteUrl = 'http://www.gradle.org'
-    }
-}
-
-task userguideHtml(type: Docbook2Xhtml, dependsOn: userguideDocbook) {
-    source userguideDocbook.destFile
-    destDir = userguideDir
-    stylesheetName = 'userGuideHtml.xsl'
-    resources = fileTree {
-        from userguideSrcDir
-        include 'img/*.png'
-    }
-    resources += fileTree {
-        from cssSrcDir
-        include '*.css'
-    }
-}
-
-task userguideSingleHtml(type: Docbook2Xhtml, dependsOn: userguideDocbook) {
-    source userguideDocbook.destFile
-    destFile = new File(userguideDir, 'userguide_single.html')
-    stylesheetName = 'userGuideSingleHtml.xsl'
-    resources = fileTree {
-        from userguideSrcDir
-        include 'img/*.png'
-    }
-    resources += fileTree {
-        from cssSrcDir
-        include '*.css'
-    }
-}
-
-task userguideXhtml(type: Docbook2Xhtml, dependsOn: remoteUserguideDocbook) {
-    source remoteUserguideDocbook.destFile
-    destFile = new File(buildDir, 'tmp/userguidePdf/userguidePdf.html')
-    stylesheetName = 'userGuidePdf.xsl'
-    resources = fileTree {
-        from userguideSrcDir
-        include 'img/*.png'
-    }
-    resources += fileTree {
-        from cssSrcDir
-        include '*.css'
-    }
-}
-
-task userguidePdf(type: Xhtml2Pdf, dependsOn: userguideXhtml) {
-    inputs.dir cssSrcDir
-    sourceFile = userguideXhtml.destFile
-    destFile = new File(userguideDir, 'userguide.pdf')
-    classpath = configurations.userGuideTask
-}
-
-task javadoc(type: Javadoc) {
-    group = 'documentation'
-    source groovyProjects().collect {project -> project.sourceSets.main.allJava }
-    destinationDir = new File(docsDir, 'javadoc')
-    classpath = files(groovyProjects().collect {project -> [project.sourceSets.main.compileClasspath, project.sourceSets.main.classes] })
-    include 'org/gradle/api/**'
-    include 'org/gradle/*'
-    include 'org/gradle/external/javadoc/**'
-    include 'org/gradle/process/**'
-    include 'org/gradle/plugins/**'
-    include 'org/gradle/testfixtures/**'
-    exclude '**/internal/**'
-    options.links("http://java.sun.com/j2se/1.5.0/docs/api", "http://groovy.codehaus.org/gapi/", "http://maven.apache.org/ref/2.2.1/maven-core/apidocs",
-        "http://maven.apache.org/ref/2.2.1/maven-model/apidocs")
-    doFirst {
-        title = "Gradle API $version"
-    }
-}
-
-task checkstyleApi(type: Checkstyle) {
-    source javadoc.source
-    configFile = file("$checkstyleConfigDir/checkstyle-api.xml")
-    classpath = files()
-    resultFile = file("$checkstyleResultsDir/checkstyle-api.xml")
-}
-
-task groovydoc(type: Groovydoc) {
-    group = 'documentation'
-    source groovyProjects().collect {project -> project.sourceSets.main.groovy + project.sourceSets.main.java }
-    destinationDir = new File(docsDir, 'groovydoc')
-    includes = javadoc.includes
-    excludes = javadoc.excludes
-    doFirst {
-        title = "Gradle API $version"
-    }
-    groovyClasspath = project(':core').configurations.groovy
-}
-
-task userguideFragmentSrc(type: UserGuideTransformTask, dependsOn: [userguideStyleSheets, samples]) {
-    tags << 'standalone'
-    sourceFile = new File(userguideSrcDir, 'installation.xml')
-    destFile = new File(docbookSrc, 'installation.xml')
-    doFirst {
-        javadocUrl = remoteLocations.javadocUrl
-        groovydocUrl = remoteLocations.groovydocUrl
-        dsldocUrl = remoteLocations.dsldocUrl
-        websiteUrl = 'http://www.gradle.org'
-    }
-}
-
-task distDocs(type: Docbook2Xhtml, dependsOn: userguideFragmentSrc) {
-    source userguideFragmentSrc.destFile
-    destFile = new File(distDocsDir, 'getting-started.html')
-    stylesheetName = 'standaloneHtml.xsl'
-}
-
-task websiteUserguideSrc(type: UserGuideTransformTask, dependsOn: [userguideStyleSheets, samples, samplesDocbook]) {
-    inputs.files fileTree(dir: userguideSrcDir, includes: ['*.xml'])
-    inputs.files fileTree(dir: docbookSrc, includes: ['*.xml'])
-    sourceFile = new File(userguideSrcDir, 'userguide.xml')
-    destFile = new File(docbookSrc, 'website.xml')
-    tags << 'website'
-    doFirst {
-        javadocUrl = remoteLocations.javadocUrl
-        groovydocUrl = remoteLocations.groovydocUrl
-        dsldocUrl = remoteLocations.dsldocUrl
-        websiteUrl = ''
-    }
-}
-
-task websiteUserguide(type: Docbook2Xhtml, dependsOn: websiteUserguideSrc) {
-    source websiteUserguideSrc.destFile
-    destFile = new File(websiteDocs, 'website.html')
-    stylesheetName = 'websiteHtml.xsl'
-    resources = fileTree {
-        from userguideSrcDir
-        include 'img/*.png'
-    }
-    resources += fileTree {
-        from cssSrcDir
-        include '*.css'
-    }
-}
-
-task websiteProperties {
-    def propertiesFile = new File(websiteDocs, 'version.properties')
-    inputs.property 'version', { version.toString() }
-    outputs.files propertiesFile
-    doLast {
-        def properties = new Properties()
-        properties.version = version.toString()
-        propertiesFile.parentFile.mkdirs()
-        propertiesFile.withOutputStream { outputStream -> properties.store(outputStream, 'documentation version properties') }
-    }
-}
-
-task websiteDocs {
-    dependsOn websiteUserguide, websiteProperties
-}
-
-task userguide {
-    dependsOn userguideHtml, userguideSingleHtml, userguidePdf
-    description = 'Generates the userguide'
-    group = 'documentation'
-}
-
-task docs {
-    dependsOn javadoc, groovydoc, userguide, distDocs, samplesDocs, dslHtml
-    description = 'Generates all documentation'
-    group = 'documentation'
-}
-
-task uploadDocs(dependsOn: docs) << {
-    ftp(action: 'mkdir', remotedir: remoteLocations.docsRemoteDir)
-    ftp(action: 'delete', remotedir: remoteLocations.docsRemoteDir) {
-        fileset() {
-            include(name: '**/*')
-        }
-    }
-    ftp(action: 'send', remotedir: remoteLocations.docsRemoteDir) {
-        fileset(dir: docsDir)
-    }
-}
-
-void ftp(Map args, Closure antFileset = {}) {
-    ant {
-        taskdef(name: 'ftp',
-                classname: 'org.apache.tools.ant.taskdefs.optional.net.FTP',
-                classpath: configurations.ftpAntTask.asPath)
-        Map ftpArgs = args + [
-                server: 'ftp.gradle.org',
-                userid: websiteFtpUserName,
-                password: websiteFtpUserPassword
-        ]
-        delegate.ftp(ftpArgs) {
-            antFileset.delegate = delegate
-            antFileset()
-        }
-    }
-}
-
-class RemoteLocations {
-    def version
-
-    static final GRADLE_ORG_URL = "http://www.gradle.org"
-
-    String getDistributionUploadUrl() {
-        version.isRelease() ? 'https://dav.codehaus.org/dist/gradle' : 'https://dav.codehaus.org/snapshots.dist/gradle'
-    }
-
-    String getDocsRemoteDir() {
-        (version.isRelease() ? version.toString() : 'latest') + '/docs'
-    }
-
-    String getJavadocUrl() {
-        "$GRADLE_ORG_URL/${getDocsRemoteDir()}/javadoc"
-    }
-
-    String getGroovydocUrl() {
-        "$GRADLE_ORG_URL/${getDocsRemoteDir()}/groovydoc"
-    }
-
-    String getDsldocUrl() {
-        "$GRADLE_ORG_URL/${getDocsRemoteDir()}/dsl"
-    }
-}
-
-class Docbook2Xhtml extends SourceTask {
-    @InputFiles
-    FileCollection classpath
-
-    @OutputFile @Optional
-    File destFile
-
-    @OutputDirectory @Optional
-    File destDir
-
-    @InputDirectory
-    File stylesheetsDir
-
-    String stylesheetName
-
-    @InputFiles @Optional
-    FileCollection resources
-
-    @TaskAction
-    def transform() {
-        if (!((destFile != null) ^ (destDir != null))) {
-            throw new InvalidUserDataException("Must specify exactly 1 of output file or dir.")
-        }
-
-        source.visit { FileVisitDetails fvd ->
-            if (fvd.isDirectory()) {
-                return
-            }
-
-            ant.java(classname: 'org.apache.xalan.xslt.Process', failonerror: true, fork: true) {
-                jvmarg(value: '-Xmx256m')
-                arg(value: '-in')
-                arg(value: fvd.file)
-                if (destFile) {
-                    arg(value: '-out')
-                    arg(value: destFile)
-                } else {
-                    arg(value: '-out')
-                    File outFile = fvd.relativePath.replaceLastName(fvd.file.name.replaceAll('.xml$', '.html')).getFile(destDir)
-                    outFile.parentFile.mkdirs()
-                    arg(value: outFile)
-                }
-                arg(value: '-xsl')
-                arg(value: new File(stylesheetsDir, stylesheetName))
-                if (destDir) {
-                    arg(line: "-param base.dir ${destDir}/")
-                }
-                sysproperty(key: 'xslthl.config', value: new File("$stylesheetsDir/highlighting/xslthl-config.xml").toURI())
-                sysproperty(key: 'org.apache.xerces.xni.parser.XMLParserConfiguration', value: 'org.apache.xerces.parsers.XIncludeParserConfiguration')
-                classpath {
-                    path(path: classpath.asPath)
-                    path(location: new File(stylesheetsDir, 'extensions/xalan27.jar'))
-                }
-            }
-        }
-
-        if (resources) {
-            project.copy {
-                into this.destDir ?: destFile.parentFile
-                from resources
-            }
-        }
-    }
-}
-
-class Xhtml2Pdf extends DefaultTask {
-    @InputFile
-    File sourceFile
-
-    @OutputFile
-    File destFile
-
-    @InputFiles
-    FileCollection classpath
-
-    def Xhtml2Pdf() {
-        onlyIf { !OperatingSystem.current().isWindows() }
-    }
-
-    @TaskAction
-    def transform() {
-        def uris = classpath.files.collect {it.toURI().toURL()}
-        def classloader = new URLClassLoader(uris as URL[], getClass().classLoader)
-        def renderer = classloader.loadClass('org.xhtmlrenderer.pdf.ITextRenderer').newInstance()
-        renderer.setDocument(sourceFile)
-        renderer.layout()
-        destFile.withOutputStream {
-            renderer.createPDF(it)
-        }
-    }
-}
diff --git a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Project.xml b/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Project.xml
deleted file mode 100644
index a09fc33..0000000
--- a/subprojects/gradle-docs/src/docs/dsl/org.gradle.api.Project.xml
+++ /dev/null
@@ -1,235 +0,0 @@
-<section>
-    <section>
-        <title>Properties</title>
-        <table>
-            <thead>
-                <tr>
-                    <td>Name</td>
-                </tr>
-            </thead>
-            <tr>
-                <td>allprojects</td>
-            </tr>
-            <tr>
-                <td>artifacts</td>
-            </tr>
-            <tr>
-                <td>ant</td>
-            </tr>
-            <tr>
-                <td>buildDir</td>
-            </tr>
-            <tr>
-                <td>buildFile</td>
-            </tr>
-            <tr>
-                <td>buildscript</td>
-            </tr>
-            <tr>
-                <td>childProjects</td>
-            </tr>
-            <tr>
-                <td>configurations</td>
-            </tr>
-            <tr>
-                <td>convention</td>
-            </tr>
-            <tr>
-                <td>dependencies</td>
-            </tr>
-            <tr>
-                <td>dependsOnProjects</td>
-            </tr>
-            <tr>
-                <td>defaultTasks</td>
-            </tr>
-            <tr>
-                <td>description</td>
-            </tr>
-            <tr>
-                <td>gradle</td>
-            </tr>
-            <tr>
-                <td>group</td>
-            </tr>
-            <tr>
-                <td>logger</td>
-            </tr>
-            <tr>
-                <td>logging</td>
-            </tr>
-            <tr>
-                <td>name</td>
-            </tr>
-            <tr>
-                <td>parent</td>
-            </tr>
-            <tr>
-                <td>path</td>
-            </tr>
-            <tr>
-                <td>plugins</td>
-            </tr>
-            <tr>
-                <td>project</td>
-            </tr>
-            <tr>
-                <td>projectDir</td>
-            </tr>
-            <tr>
-                <td>properties</td>
-            </tr>
-            <tr>
-                <td>repositories</td>
-            </tr>
-            <tr>
-                <td>rootDir</td>
-            </tr>
-            <tr>
-                <td>rootProject</td>
-            </tr>
-            <tr>
-                <td>state</td>
-            </tr>
-            <tr>
-                <td>status</td>
-            </tr>
-            <tr>
-                <td>subprojects</td>
-            </tr>
-            <tr>
-                <td>tasks</td>
-            </tr>
-            <tr>
-                <td>version</td>
-            </tr>
-        </table>
-    </section>
-    <section>
-        <title>Methods</title>
-        <table>
-            <thead>
-                <tr>
-                    <td>Name</td>
-                </tr>
-            </thead>
-            <tr>
-                <td>ant</td>
-            </tr>
-            <tr>
-                <td>repositories</td>
-            </tr>
-            <tr>
-                <td>configurations</td>
-            </tr>
-            <tr>
-                <td>dependencies</td>
-            </tr>
-            <tr>
-                <td>artifacts</td>
-            </tr>
-            <tr>
-                <td>allprojects</td>
-            </tr>
-            <tr>
-                <td>subprojects</td>
-            </tr>
-            <tr>
-                <td>configure</td>
-            </tr>
-            <tr>
-                <td>buildscript</td>
-            </tr>
-            <tr>
-                <td>apply</td>
-            </tr>
-            <tr>
-                <td>file</td>
-            </tr>
-            <tr>
-                <td>files</td>
-            </tr>
-            <tr>
-                <td>fileTree</td>
-            </tr>
-            <tr>
-                <td>zipTree</td>
-            </tr>
-            <tr>
-                <td>tarTree</td>
-            </tr>
-            <tr>
-                <td>uri</td>
-            </tr>
-            <tr>
-                <td>relativePath</td>
-            </tr>
-            <tr>
-                <td>mkdir</td>
-            </tr>
-            <tr>
-                <td>delete</td>
-            </tr>
-            <tr>
-                <td>copy</td>
-            </tr>
-            <tr>
-                <td>copySpec</td>
-            </tr>
-            <tr>
-                <td>javaexec</td>
-            </tr>
-            <tr>
-                <td>exec</td>
-            </tr>
-            <tr>
-                <td>setProperty</td>
-            </tr>
-            <tr>
-                <td>property</td>
-            </tr>
-            <tr>
-                <td>hasProperty</td>
-            </tr>
-            <tr>
-                <td>task</td>
-            </tr>
-            <tr>
-                <td>dependsOn</td>
-            </tr>
-            <tr>
-                <td>evaluationDependsOn</td>
-            </tr>
-            <tr>
-                <td>childrenDependOnMe</td>
-            </tr>
-            <tr>
-                <td>dependsOnChildren</td>
-            </tr>
-            <tr>
-                <td>findProject</td>
-            </tr>
-            <tr>
-                <td>project</td>
-            </tr>
-            <tr>
-                <td>absoluteProjectPath</td>
-            </tr>
-            <tr>
-                <td>relativeProjectPath</td>
-            </tr>
-            <tr>
-                <td>getAllTasks</td>
-            </tr>
-            <tr>
-                <td>getTasksByName</td>
-            </tr>
-            <tr>
-                <td>beforeEvaluate</td>
-            </tr>
-            <tr>
-                <td>afterEvaluate</td>
-            </tr>
-        </table>
-    </section>
-</section>
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/docs/userguide/commandLine.xml b/subprojects/gradle-docs/src/docs/userguide/commandLine.xml
deleted file mode 100644
index a476d16..0000000
--- a/subprojects/gradle-docs/src/docs/userguide/commandLine.xml
+++ /dev/null
@@ -1,236 +0,0 @@
-<!--
-  ~ Copyright 2009 the original author or authors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<appendix id='gradle_command_line'>
-    <title>Gradle Command Line</title>
-    <para>The <command>gradle</command> command has the following usage:
-        <cmdsynopsis>
-            <command>gradle</command>
-            <arg choice="opt" rep="repeat">option</arg>
-            <arg choice="opt" rep="repeat">task</arg>
-        </cmdsynopsis>
-        The command-line options available for the <command>gradle</command> command are listed below:
-    </para>
-    <variablelist>
-        <varlistentry>
-            <term><option>-?</option>, <option>-h</option>, <option>--help</option></term>
-            <listitem><para>Shows a help message.</para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-C</option>, <option>--cache</option></term>
-            <listitem><para>Specifies how compiled build scripts should be cached. Possible values are:
-                <literal>rebuild</literal> or <literal>on</literal>. Default value is
-                <literal>on</literal>. See <xref linkend="sec:caching"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-D</option>, <option>--system-prop</option></term>
-            <listitem><para>Sets a system property of the JVM, for example <literal>-Dmyprop=myvalue</literal>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-I</option>, <option>--init-script</option></term>
-            <listitem><para>Specifies an initialization script. See <xref linkend="init_scripts"/>.</para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-P</option>, <option>--project-prop</option></term>
-            <listitem><para>Sets a project property of the root project, for example
-                <literal>-Pmyprop=myvalue</literal>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-S</option>, <option>--full-stacktrace</option></term>
-            <listitem><para>Print out the full (very verbose) stacktrace for any exceptions. See <xref linkend="logging"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-a</option>, <option>--no-rebuild</option></term>
-            <listitem><para>Do not rebuild project dependencies.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>--all</option></term>
-            <listitem><para>Shows additional detail in the task listing. See <xref linkend="sec:listing_tasks"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-b</option>, <option>--build-file</option></term>
-            <listitem><para>Specifies the build file. See <xref linkend="sec:selecting_build"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-c</option>, <option>--settings-file</option></term>
-            <listitem><para>Specifies the settings file.</para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-d</option>, <option>--debug</option></term>
-            <listitem><para>Log in debug mode (includes normal stacktrace). See <xref linkend="logging"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-e</option>, <option>--embedded</option></term>
-            <listitem><para>Specify an embedded build script.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-g</option>, <option>--gradle-user-home</option></term>
-            <listitem><para>Specifies the Gradle user home directory.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>--gui</option></term>
-            <listitem><para>Launches the Gradle GUI. See <xref linkend="tutorial_gradle_gui"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-i</option>, <option>--info</option></term>
-            <listitem><para>Set log level to info. See <xref linkend="logging"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-m</option>, <option>--dry-run</option></term>
-            <listitem><para>Runs the build with all task actions disabled.</para> </listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>--no-color</option></term>
-            <listitem><para>Do not use color in the console output.</para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-p</option>, <option>--project-dir</option></term>
-            <listitem><para>Specifies the start directory for Gradle. Defaults to current directory.
-                See <xref linkend="sec:selecting_build"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>--profile</option></term>
-            <listitem><para>Profiles build execution time and generates a report in the
-                <build_dir>/reports/profile directory.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-q</option>, <option>--quiet</option></term>
-            <listitem><para>Log errors only. See <xref linkend="logging"/>.</para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-s</option>, <option>--stacktrace</option></term>
-            <listitem><para>Print out the stacktrace also for user exceptions (e.g. compile error). See <xref linkend="logging"/>.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-u</option>, <option>--no-search-upwards</option></term>
-            <listitem><para>Don't search in parent directories for a <filename>settings.gradle</filename> file.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-v</option>, <option>--version</option></term>
-            <listitem><para>Prints version info.
-            </para></listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><option>-x</option>, <option>--exclude-task</option></term>
-            <listitem><para>Specifies a task to be excluded from execution. See <xref linkend="sec:excluding_tasks_from_the_command_line"/>.
-            </para></listitem>
-        </varlistentry>
-    </variablelist>
-    <para>The above information is printed to the console when you execute <userinput>gradle -h</userinput>.</para>
-
-    <section>
-        <title>Deprecated command-line options</title>
-        <para>The following options are deprecated and will be removed in a future version of Gradle:</para>
-        <variablelist>
-            <varlistentry>
-                <term><option>-n</option>, <option>--dependencies</option></term>
-                <listitem><para>(deprecated) Show list of all project dependencies. You should use <userinput>gradle dependencies</userinput>
-                    instead. See <xref linkend="sec:listing_dependencies"/>.
-                </para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><option>-r</option>, <option>--properties</option></term>
-                <listitem><para>(deprecated) Show list of all available project properties. You should use <userinput>gradle properties</userinput>
-                    instead. See <xref linkend="sec:listing_properties"/>.</para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><option>-t</option>, <option>--tasks</option></term>
-                <listitem><para>(deprecated) Show list of available tasks. You should use <userinput>gradle tasks</userinput>
-                    instead. See <xref linkend="sec:listing_tasks"/>.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </section>
-
-    <section>
-        <title>Experimental command-line options</title>
-        <para>The following options are experimental:</para>
-        <variablelist>
-            <varlistentry>
-                <term><option>--daemon</option></term>
-                <listitem><para>Uses the Gradle daemon to run the build. Starts the daemon if not running.</para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><option>--foreground</option></term>
-                <listitem><para>Starts the Gradle daemon in the foreground.</para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><option>--no-daemon</option></term>
-                <listitem><para>Do not use the Gradle daemon to run the build.</para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><option>--stop</option></term>
-                <listitem><para>Stops the Gradle daemon if it is running.</para></listitem>
-            </varlistentry>
-        </variablelist>
-    </section>
-
-    <section>
-        <title>System properties</title>
-        <para>The following system properties are available for the <command>gradle</command> command. Note that
-            command-line options take precedence over system properties.
-        </para>
-        <varlistentry>
-            <term><literal>gradle.user.home</literal></term>
-            <listitem><para>Specifies the Gradle user home directory.</para> </listitem>
-        </varlistentry>
-        <varlistentry>
-            <term><literal>org.gradle.daemon</literal></term>
-            <listitem><para>When set to <literal>true</literal>, use the Gradle daemon to run the build.</para>
-            </listitem>
-        </varlistentry>
-    </section>
-
-    <section>
-        <title>Environment variables</title>
-        <para>The following environment variables are available for the <command>gradle</command> command. Note that
-            command-line options and system properties take precedence over environment variables.
-        </para>
-        <variablelist>
-            <varlistentry>
-                <term><literal>GRADLE_HOME</literal></term>
-                <listitem><para>Specifies the root directory of the Gradle installation to use.</para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><literal>GRADLE_OPTS</literal></term>
-                <listitem><para>Specifies command-line arguments to use to start the JVM. This can be useful for setting
-                    the system properties to use for running Gradle. For example you could set <literal>GRADLE_OPTS="-Dorg.gradle.daemon=true"</literal>
-                    to use the Gradle daemon without needing to use the <option>--daemon</option> option every time you
-                    run Gradle.
-                </para></listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><literal>GRADLE_USER_HOME</literal></term>
-                <listitem><para>Specifies the Gradle user home directory.</para></listitem>
-            </varlistentry>
-        </variablelist>
-    </section>
-</appendix>
diff --git a/subprojects/gradle-docs/src/docs/userguide/customPlugins.xml b/subprojects/gradle-docs/src/docs/userguide/customPlugins.xml
deleted file mode 100644
index 451dac2..0000000
--- a/subprojects/gradle-docs/src/docs/userguide/customPlugins.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-<!--
-  ~ Copyright 2009 the original author or authors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<chapter id="custom_plugins" xmlns:xi="http://www.w3.org/2001/XInclude">
-    <title>Writing Custom Plugins</title>
-
-    <para>A Gradle plugin packages up reusable pieces of build logic, which can be used across many different
-        projects and builds. Gradle allows you to implement your own custom plugins, so you can reuse your
-        build logic, and potentially share it with others.
-    </para>
-
-    <para>
-        You can implement a custom plugin in any language you like, provided the implementation ends up compiled as
-        bytecode. For the examples here, we are going to use Groovy as the implementation language. You could use
-        Java or Scala instead, if you want.
-    </para>
-
-    <section>
-        <title>Packaging a plugin</title>
-        <para>There are several places where you can put the source for the plugin. Two convenient options
-            are to add the task implementation to your build script, or to put the source in the
-            <filename><replaceable>rootProjectDir</replaceable>/buildSrc/src/main/groovy</filename> directory. Gradle will
-            take care of compiling the task and making it available on the classpath of the build script.
-            See <xref linkend="organizing_build_logic"/> for more details, and some other options.
-            In our examples, we will put the task implementation in the build script, to keep things simple.
-        </para>
-    
-    </section>
-
-    <section>
-        <title>Writing a simple plugin</title>
-        <para>To create a custom plugin, you need to write an implementation of <apilink class="org.gradle.api.Plugin"/>.
-            Gradle instantiates the plugin and calls the plugin instance's <literal>apply()</literal> method when the plugin
-            is used with a project. The project
-            object is passed as a parameter, which the plugin can use to configure the project however it needs to.
-            The following sample contains a greeting plugin, which adds a <literal>hello</literal> task to the project.
-        </para>
-
-        <sample id="customPlugin" dir="userguide/organizeBuildLogic/customPlugin" title="A custom plugin">
-            <sourcefile file="build.gradle"/>
-            <output args="-q hello"/>
-        </sample>
-
-        <para>One thing to note is that only one instance of a given plugin is created for a given build. The same plugin
-            instance is used for all projects in the build.
-        </para>
-    </section>
-
-    <section>
-        <title>Getting input from the build</title>
-        <para>Most plugins need to read user defined input from the build script. Plugins read values using convention objects. 
-             The Gradle <apilink class="org.gradle.api.Project"/> has a <apilink class="org.gradle.api.plugins.Convention"/> object 
-             that helps keep track of all the settings and properties being passed to plugins. You can capture user input by telling
-             the Project Convention about your plugin. To capture input, simply add a Java Bean compliant class into the Convention's list of 
-             plugins. Groovy is a good language choice for a plugin because plain old Groovy objects contain all the getter and setter methods
-             that a Java Bean requires. 
-        </para>
-
-        <para>Let's add a simple convention object to the project. Here we add a <literal>greeting</literal> property to the
-            project, which allows you to configure the greeting.
-        </para>
-
-        <sample id="customPluginWithConvention" dir="userguide/organizeBuildLogic/customPluginWithConvention" title="A custom plugin convention">
-            <sourcefile file="build.gradle"/>
-            <output args="-q hello"/>
-        </sample>
-
-        <para>In this example, GreetingPluginConvention is a plain old Groovy object with a field called <literal>greeting</literal>. 
-            The convention object is added to the plugin list with the name <literal>greet</literal>. The name of the variable in
-            the build needs to match the name of the field in the convention object.  The name you choose for your plugin 
-            (<literal>greet</literal>) is arbitrary and can be whatever you choose. 
-        </para>
-
-        <para>Oftentimes, you have several related properties you need to specify on a single plugin. With Groovy plugins it is easy
-            to offer a configuration closure block to group settings together. The following example shows you how to do this. 
-        </para>
-
-        <sample id="customPluginWithAdvancedConvention" dir="userguide/organizeBuildLogic/customPluginWithAdvancedConvention" title="A custom plugin with closure convention">
-            <sourcefile file="build.gradle"/>
-            <output args="-q hello"/>
-        </sample>
-
-        <para>In this example, several convention settings can be grouped together within the <literal>greet</literal> closure. 
-            The name of the closure block in the build script (<literal>greet</literal>) needs a matching method on 
-            the convention object, and that method must take a closure as an argument. Then, when the closure is executed, 
-            the fields on the convention object will be mapped to the variables within the closure based on the standard
-            Groovy closure delegate feature. This technique is possible in other JVM languages but may not be as convenient 
-            as in Groovy. 
-        </para>
-
-    </section>
-</chapter>
diff --git a/subprojects/gradle-docs/src/docs/userguide/customTasks.xml b/subprojects/gradle-docs/src/docs/userguide/customTasks.xml
deleted file mode 100644
index 3b647cb..0000000
--- a/subprojects/gradle-docs/src/docs/userguide/customTasks.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<!--
-  ~ Copyright 2009 the original author or authors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<chapter id="custom_tasks">
-    <title>Writing Custom Tasks</title>
-
-    <para>Gradle supports two types of task. One such type is the simple task, where you define the task with an
-        action closure. We have seen these in <xref linkend="tutorial_using_tasks"/>. For this type of task, the action
-        closure determines the behaviour of the task. This type of task is good for implementing one-off tasks in your
-        build script.
-    </para>
-    <para>
-        The other type of task is the enhanced task, where the behaviour is built into the task, and the task provides some
-        properties which you can use to configure the behaviour. We have seen these in
-        <xref linkend="more_about_tasks"/>. Most Gradle plugins use enhanced tasks. With enhanced tasks, you don't need
-        to implement the task behaviour as you do with simple tasks. You simply declare and configure the task using
-        its properties.
-        In this way, enhanced tasks let you reuse a piece of behaviour in many different places, possibly
-        across different builds.
-    </para>
-    <para>Implementing your own custom enhanced tasks in Gradle is easy.
-        You can implement a custom task in pretty much any language you like, provided it ends up compiled to bytecode.
-        In our examples, we are going to use Groovy as the implementation language, but you could use, for example, Java
-        or Scala.
-    </para>
-
-    <section>
-        <title>Packaging a task</title>
-        <para>There are several places where you can put the source for the task.
-        </para>
-        <variablelist>
-            <varlistentry>
-                <term>Build script</term>
-                <listitem>
-                    <para>You can include the task implementation directly in the build script. This has the
-                        benefit that the task class is automatically compiled and included in the classpath of the
-                        build script without you having to do anything. However, the task class is not visible outside the
-                        build script, and so you cannot reuse the task class outside the build script it is defined in.
-                    </para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term><filename>buildSrc</filename> project</term>
-                <listitem>
-                    <para>You can put the source for the task implementation in the
-                        <filename><replaceable>rootProjectDir</replaceable>/buildSrc/src/main/groovy</filename> directory.
-                        Gradle will take care of compiling and testing the task class and making it available on the
-                        classpath of the build script. The task class is visible to every build script used by the build.
-                        However, it is not visible outside the build, and so you cannot reuse the task class outside the
-                        build it is defined in.
-                        Using the <filename>buildSrc</filename> project approach keeps separate
-                        the task declaration - that is, what the task should do - from the task implementation - that is,
-                        how the task does it.</para>
-                    <para>
-                        See <xref linkend="organizing_build_logic"/> for more details about the <filename>buildSrc</filename>
-                        project.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>Standalone project</term>
-                <listitem>
-                    <para>You can create a separate project for your task implementation. This project produces and
-                        publishes a JAR which you can then use in multiple builds and share with others. Generally, this JAR
-                        might include a custom plugin, or bundle several related custom tasks into a single library. Or
-                        some combination.
-                    </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-        <para> In our examples, we will start with the task implementation in the build script, to keep things simple.
-            Then we will look at creating a standalone project.
-        </para>
-    </section>
-
-    <section>
-        <title>Writing a simple task</title>
-        <para>To implement a custom task, you extend <apilink class="org.gradle.api.DefaultTask"/>.
-        </para>
-        <sample id="customTask" dir="userguide/tasks/customTask" title="Defining a custom task">
-            <sourcefile file="build.gradle" snippet="define-task"/>
-        </sample>
-
-        <para>This task doesn't do anything useful, so let's add some behaviour. To do so, we add a method to the task
-            and mark it with the <apilink class="org.gradle.api.tasks.TaskAction"/> annotation. Gradle will call the
-            method when the task executes. You don't have to use a method to define the behaviour for the task. You
-            could, for instance, call <literal>doFirst()</literal> or <literal>doLast()</literal> with a closure in the
-            task constructor to add behaviour.
-        </para>
-        <sample id="customTaskWithAction" dir="userguide/tasks/customTask" title="A hello world task">
-            <sourcefile file="build.gradle" snippet="add-action"/>
-            <output args="-q hello"/>
-        </sample>
-
-        <para>Let's add a property to the task, so we can customize it. Tasks are simply POGOs, and when you declare a
-            task, you can set the properties or call methods on the task object. Here we add a <literal>greeting</literal>
-            property, and set the value when we declare the <literal>greeting</literal> task.
-        </para>
-        <sample id="customTaskWithProperty" dir="userguide/tasks/customTaskWithProperty" title="A customizable hello world task">
-            <sourcefile file="build.gradle" snippet="add-property"/>
-            <output args="-q hello greeting"/>
-        </sample>
-    </section>
-
-    <section>
-        <title>A standalone project</title>
-        <para>Now we will move our task to a standalone project, so we can publish it and share it with others.
-            This project is simply a Groovy project that produces a JAR containing the task implementation.
-            Here is a simple build script for the project. It applies the Groovy plugin, and adds the Gradle API
-            as a compile-time dependency.
-        </para>
-
-        <sample id="customTaskStandalone" dir="customPlugin" title="A build for a custom task" includeLocation="true">
-            <sourcefile file="build.gradle" snippet="use-plugin"/>
-        </sample>
-
-        <para>We just follow the convention for where the source for the task should go.</para>
-
-        <sample id="customTaskStandalone" dir="customPlugin" title="A custom task">
-            <sourcefile file="src/main/groovy/org/gradle/GreetingTask.groovy"/>
-        </sample>
-
-        <section>
-            <title>Writing tests</title>
-            <para>You can use the <apilink class="org.gradle.testfixtures.ProjectBuilder"/> class to create
-                <apilink class="org.gradle.api.Project"/> instances to use when you test your task implementation.
-            </para>
-            <sample id="customTaskStandalone" dir="customPlugin" title="Testing a custom task">
-                <sourcefile file="src/test/groovy/org/gradle/GreetingTaskTest.groovy" snippet="test-task"/>
-            </sample>
-        </section>
-    </section>
-</chapter>
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/docs/userguide/ideSupport.xml b/subprojects/gradle-docs/src/docs/userguide/ideSupport.xml
deleted file mode 100644
index f99e552..0000000
--- a/subprojects/gradle-docs/src/docs/userguide/ideSupport.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<!--
-  ~ Copyright 2009 the original author or authors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-<appendix id='ide_support' xmlns:xi="http://www.w3.org/2001/XInclude">
-    <title>Existing IDE Support and how to cope without it</title>
-    <section id='sec:intellij'>
-        <title>IntelliJ</title>
-        <para>Gradle has been mainly developed with Idea IntelliJ and its very good Groovy plugin. Gradle's build script
-            <footnote>
-                <para>Gradle is built with Gradle
-                </para>
-            </footnote>
-            has also been developed with the support of this IDE. IntelliJ allows you to define any filepattern to be
-            interpreted as a Groovy script. In the case of Gradle you can define such a pattern for
-            <filename>build.gradle</filename>
-            and <filename>settings.gradle</filename>. This will already help very much. What is missing is the classpath
-            to the Gradle binaries to offer content assistance for the Gradle classes. You might add the Gradle jar
-            (which you can find in your distribution) to your project's classpath. It does not really belong there, but
-            if you do this you have a fantastic IDE support for developing Gradle scripts. Of course if you use
-            additional libraries for your build scripts they would further pollute your project classpath.
-        </para>
-        <para>We hope that in the future <filename>*.gradle</filename> files
-            get special treatment by IntelliJ and you will be able to define a specific classpath for them.
-        </para>
-    </section>
-    <section>
-        <title>Eclipse</title>
-        <para>There is a Groovy plugin for eclipse. We don't know in what state it is and how it would support Gradle.
-            In the next edition of this user guide we can hopefully write more about this.
-        </para>
-    </section>
-    <section id='sec:using_gradle_without_ide_support'>
-        <title>Using Gradle without IDE support</title>
-        <para>What we can do for you is to spare you typing things like
-            <literal>throw new org.gradle.api.tasks.StopExecutionException()</literal>
-            and just type
-            <literal>throw new StopExecutionException()</literal>
-            instead. We do this by automatically adding a set of import statements to the Gradle scripts before Gradle
-            executes them. Listed below are the imports added to each script.
-        </para>
-        <figure>
-            <title>gradle-imports</title>
-            <programlisting><xi:include href='../../../../../subprojects/gradle-core/src/main/resources/org/gradle/configuration/default-imports.txt' parse='text'/></programlisting>
-        </figure>
-    </section>
-</appendix>
diff --git a/subprojects/gradle-docs/src/docs/userguide/installation.xml b/subprojects/gradle-docs/src/docs/userguide/installation.xml
deleted file mode 100644
index 1fe93f5..0000000
--- a/subprojects/gradle-docs/src/docs/userguide/installation.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<!--
-  ~ Copyright 2010 the original author or authors.
-  ~
-  ~ Licensed under the Apache License, Version 2.0 (the "License");
-  ~ you may not use this file except in compliance with the License.
-  ~ You may obtain a copy of the License at
-  ~
-  ~      http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing, software
-  ~ distributed under the License is distributed on an "AS IS" BASIS,
-  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  ~ See the License for the specific language governing permissions and
-  ~ limitations under the License.
-  -->
-
-<chapter id="installation">
-<title>Installing Gradle</title>
-
-<section>
-    <title>Prerequisites</title>
-
-    <para>Gradle requires a Java JDK to be installed. Gradle requires a JDK 1.5 or higher. Gradle ships with its own
-        Groovy library, therefore no Groovy needs to be installed. Any existing Groovy installation is ignored by Gradle.
-    </para>
-
-    <para>Gradle uses whichever JDK it finds in your path (to check, use <userinput>java -version</userinput>).
-        Alternatively, you can set the <envar>JAVA_HOME</envar> environment variable to point to the install directory
-        of the desired JDK.
-    </para>
-</section>
-
-<section>
-    <title>Download</title>
-    <para>You can download one of the Gradle distributions from the <ulink url="website:downloads.html">Gradle web site</ulink>.</para>
-</section>
-
-<section>
-<title>Unpacking</title>
-
-<para>The Gradle distribution comes packaged as a ZIP. The full distribution contains:</para>
-
-<itemizedlist>
-    <listitem><para>The Gradle binaries.</para></listitem>
-    <listitem><para>The user guide (HTML and PDF).</para></listitem>
-    <listitem><para>The DSL reference guide.</para></listitem>
-    <listitem><para>The API documentation (Javadoc and Groovydoc).</para></listitem>
-    <listitem>
-        <para>Extensive samples, including the examples referenced in the user guide, along with some complete and more
-            complex builds you can use the starting point for your own build.
-        </para>
-    </listitem>
-    <listitem>
-        <para>The binary sources. This is for reference only. If you want to build Gradle you need to download the source distribution
-            or checkout the sources from the source repository. See the <ulink url="website:build.html">Gradle web site</ulink> for details).
-        </para>
-    </listitem>
-</itemizedlist>
-
-<note>
-<title>For Un*x users</title>
-
-<para>You need a GNU compatible tool to unzip Gradle, if you want the file permissions to be properly set. We mention this as
-some zip front ends for Mac OS X don't restore the file permissions properly.
-</para>
-</note>
-</section>
-
-<section>
-<title>Environment variables</title>
-
-<para>For running Gradle, add <filename><replaceable>GRADLE_HOME</replaceable>/bin</filename> to your <envar>PATH</envar>
-    environment variable. Usually, this is sufficient to run Gradle. Optionally, you may also want to set the
-    <envar>GRADLE_HOME</envar> environment variable to point to the root directory of your Gradle installation.
-</para>
-</section>
-
-<section>
-<title>Running and testing your installation</title>
-
-<para>You run Gradle via the <command>gradle</command> command. To check if Gradle is properly installed just type
-<command>gradle -v</command> and you should get an output like:
-</para>
-
-<screen>
-------------------------------------------------------------
-Gradle 0.9.1
-------------------------------------------------------------
-
-Gradle build time: Sunday, 2 January 2011 09:52:16 AM EST
-Groovy: 1.7.6
-Ant: Apache Ant version 1.8.1 compiled on April 30 2010
-Ivy: 2.2.0
-JVM: 1.6.0_22 (Sun Microsystems Inc. 17.1-b03)
-OS: Linux 2.6.35-23-generic amd64
-</screen>
-
-</section>
-
-<section>
-<title>JVM options</title>
-
-<para>JVM options for running Gradle can be set via environment variables. You can use <envar>GRADLE_OPTS</envar>
-or <envar>JAVA_OPTS</envar>. Those variables can be used together. <envar>JAVA_OPTS</envar> is by convention an environment
-variable shared by many Java applications. A typical use case would be to set the HTTP proxy in <envar>JAVA_OPTS</envar>
-and the memory options in <envar>GRADLE_OPTS</envar>. Those variables can also be set at the beginning
-of the <command>gradle</command> or <command>gradlew</command> script.
-</para>
-
-</section>
-
-<section condition="standalone">
-<title>Getting help</title>
-
-<para>You might check the user guide at <filename><replaceable>GRADLE_HOME</replaceable>/docs/userguide/userguide.html</filename>.
-It is also available on the <ulink url="website:documentation.html">Gradle web site</ulink>.
-Typing <command>gradle help</command> prints the command line help. Typing <command>gradle tasks</command> shows all the
-tasks of a Gradle build.
-</para>
-
-</section>
-
-</chapter>
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/basicEdition/build.gradle b/subprojects/gradle-docs/src/samples/customBuildLanguage/basicEdition/build.gradle
deleted file mode 100644
index 60ad497..0000000
--- a/subprojects/gradle-docs/src/samples/customBuildLanguage/basicEdition/build.gradle
+++ /dev/null
@@ -1,9 +0,0 @@
-apply plugin: org.gradle.samples.ProductPlugin
-
-// A custom build element. This defines the product to build
-product {
-    displayName 'Basic Edition'
-    // Which modules to include in this product?
-    module project(':identityManagement')
-    module project(':billing')
-}
diff --git a/subprojects/gradle-docs/src/samples/customBuildLanguage/enterpriseEdition/build.gradle b/subprojects/gradle-docs/src/samples/customBuildLanguage/enterpriseEdition/build.gradle
deleted file mode 100644
index 4247acb..0000000
--- a/subprojects/gradle-docs/src/samples/customBuildLanguage/enterpriseEdition/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: org.gradle.samples.ProductPlugin
-
-// A custom build element. This defines the product to build
-product {
-    displayName 'Enterprise Edition'
-    // Which modules to include in this product?
-    module project(':identityManagement')
-    module project(':billing')
-    module project(':reporting')
-}
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/build.gradle b/subprojects/gradle-docs/src/samples/customPlugin/build.gradle
deleted file mode 100644
index c717687..0000000
--- a/subprojects/gradle-docs/src/samples/customPlugin/build.gradle
+++ /dev/null
@@ -1,15 +0,0 @@
-// START SNIPPET use-plugin
-apply plugin: 'groovy'
-
-dependencies {
-    compile gradleApi()
-// END SNIPPET use-plugin
-    groovy localGroovy()
-    testCompile 'junit:junit:4.7'
-// START SNIPPET use-plugin
-}
-// END SNIPPET use-plugin
-
-repositories {
-    mavenCentral()
-}
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingPlugin.groovy b/subprojects/gradle-docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingPlugin.groovy
deleted file mode 100644
index dae067c..0000000
--- a/subprojects/gradle-docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingPlugin.groovy
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.gradle
-
-import org.gradle.api.Project
-import org.gradle.api.Plugin
-
-class GreetingPlugin implements Plugin<Project> {
-
-    void apply(Project target) {
-        target.task('hello', type: GreetingTask)
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingTask.groovy b/subprojects/gradle-docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingTask.groovy
deleted file mode 100644
index ef470eb..0000000
--- a/subprojects/gradle-docs/src/samples/customPlugin/src/main/groovy/org/gradle/GreetingTask.groovy
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.gradle
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.tasks.TaskAction
-
-class GreetingTask extends DefaultTask {
-    @TaskAction
-    def greet() {
-        println 'hello from GreetingTask'
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingPluginTest.groovy b/subprojects/gradle-docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingPluginTest.groovy
deleted file mode 100644
index 467d844..0000000
--- a/subprojects/gradle-docs/src/samples/customPlugin/src/test/groovy/org/gradle/GreetingPluginTest.groovy
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.gradle
-
-import org.junit.Test
-import org.gradle.testfixtures.ProjectBuilder
-import org.gradle.api.Project
-import static org.junit.Assert.*
-
-class GreetingPluginTest {
-    @Test
-    public void greeterPluginAddsGreetingTaskToProject() {
-        Project project = ProjectBuilder.builder().build()
-        project.apply plugin: 'greeting'
-
-        assertTrue(project.tasks.hello instanceof GreetingTask)
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/samples/gradleUserHome/build.gradle b/subprojects/gradle-docs/src/samples/gradleUserHome/build.gradle
deleted file mode 100644
index baeba05..0000000
--- a/subprojects/gradle-docs/src/samples/gradleUserHome/build.gradle
+++ /dev/null
@@ -1,13 +0,0 @@
-import org.junit.Assert
-
-task checkGradleUserHomeViaSystemEnv << {
-    Assert.assertEquals(file('customUserHome').absolutePath, gradle.gradleUserHomeDir.absolutePath)
-}
-
-task checkDefaultGradleUserHome<< {
-    Assert.assertEquals(new File(System.properties['user.home'], ".gradle").absolutePath, gradle.gradleUserHomeDir.absolutePath)
-}
-
-task checkSystemPropertyGradleUserHomeHasPrecedence << {
-    Assert.assertEquals(file('systemPropCustomUserHome').absolutePath, gradle.gradleUserHomeDir.absolutePath)
-}
\ No newline at end of file
diff --git a/subprojects/gradle-docs/src/samples/maven/pomGeneration/build.gradle b/subprojects/gradle-docs/src/samples/maven/pomGeneration/build.gradle
deleted file mode 100644
index 2533045..0000000
--- a/subprojects/gradle-docs/src/samples/maven/pomGeneration/build.gradle
+++ /dev/null
@@ -1,109 +0,0 @@
-import org.apache.maven.settings.Settings
-
-apply plugin: 'war'
-// START SNIPPET use-plugin
-apply plugin: 'maven'
-// END SNIPPET use-plugin
-
-group = 'gradle'
-version = '1.0'
-archivesBaseName = 'mywar'
-buildDir = 'target'
-
-repositories {
-    flatDir(dirs: "$projectDir/lib")
-}
-
-configurations {
-  runtime.exclude group: 'excludeGroup2', module: 'excludeArtifact2'
-}
-
-dependencies {
-    compile("group1:compile:1.0") {
-        exclude(group: 'excludeGroup', module: 'excludeArtifact')
-    }
-    providedCompile "group2:providedCompile:1.0 at jar"
-    runtime "group3:runtime:1.0"
-    providedRuntime("group4:providedRuntime:1.0 at zip") {
-        artifact {
-            name = 'providedRuntime-util'
-            type = 'war'
-        }
-    }
-    testCompile "group5:testCompile:1.0"
-    testRuntime "group6:testRuntime:1.0"
-}
-
-// Include a javadoc zip
-
-task javadocZip(type: Zip, dependsOn: javadoc) {
-    classifier = 'javadoc'
-    from javadoc.destinationDir
-}
-
-artifacts {
-    archives javadocZip
-}
-
-// Configure the release and snapshot repositories
-
-def deployer = null
-uploadArchives {
-    repositories {
-        deployer = mavenDeployer {
-            repository(url: "file://localhost/$projectDir/pomRepo/")
-            snapshotRepository(url: "file://localhost/$projectDir/snapshotRepo/")
-        }
-    }
-}
-
-// Customize the contents of the pom
-
-installer = install.repositories.mavenInstaller
-
-if (hasProperty('customVersion')) {
-    [installer, deployer]*.pom*.version = customVersion
-    installer.pom.project {
-        groupId 'installGroup'
-    }
-    deployer.pom.groupId = 'deployGroup'
-}
-
-// START SNIPPET new-pom
-task writeNewPom << {
-    pom {
-        project {
-            inceptionYear '2008'
-            licenses {
-                license {
-                    name 'The Apache Software License, Version 2.0'
-                    url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
-                    distribution 'repo'
-                }
-            }
-        }
-    }.writeTo("$buildDir/newpom.xml")
-}
-// END SNIPPET new-pom
-
-// START SNIPPET when-configured
-[installer, deployer]*.pom*.whenConfigured {pom ->
-    pom.dependencies.find {dep -> dep.groupId == 'group3' && dep.artifactId == 'runtime' }.optional = true
-}
-// END SNIPPET when-configured
-
-task writeDeployerPom(dependsOn: uploadArchives) << {
-    deployer.pom.writeTo("$buildDir/deployerpom.xml")
-}
-
-// For our integration tests
-
-install.doLast {
-    Settings settings = installer.settings
-    new File(buildDir, "localRepoPath.txt").write(settings.localRepository)
-}
-
-clean {
-    delete 'pomRepo'
-    delete 'snapshotRepo'
-}
diff --git a/subprojects/gradle-docs/src/samples/maven/quickstart/build.gradle b/subprojects/gradle-docs/src/samples/maven/quickstart/build.gradle
deleted file mode 100644
index e610edf..0000000
--- a/subprojects/gradle-docs/src/samples/maven/quickstart/build.gradle
+++ /dev/null
@@ -1,30 +0,0 @@
-import org.apache.maven.settings.Settings
-
-apply plugin: 'java'
-// START SNIPPET use-plugin
-apply plugin: 'maven'
-// END SNIPPET use-plugin
-
-group = 'gradle'
-version = '1.0'
-
-// Configure the repository
-
-uploadArchives {
-    repositories {
-        mavenDeployer {
-            repository(url: "file://localhost/$projectDir/pomRepo/")
-        }
-    }
-}
-
-// For our integration tests
-
-install.doLast {
-    Settings settings = repositories.mavenInstaller.settings
-    new File(buildDir, "localRepoPath.txt").write(settings.localRepository)
-}
-
-clean {
-    delete 'pomRepo'
-}
diff --git a/subprojects/gradle-docs/src/samples/userguide/tutorial/projectCoreProperties/subProject/build.gradle b/subprojects/gradle-docs/src/samples/userguide/tutorial/projectCoreProperties/subProject/build.gradle
deleted file mode 100644
index e69de29..0000000
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseClasspath.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseClasspath.groovy
deleted file mode 100644
index 5aa97a5..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseClasspath.groovy
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse
-
-import org.gradle.api.artifacts.Configuration
-import org.gradle.api.tasks.SourceSet
-import org.gradle.api.tasks.XmlGeneratorTask
-import org.gradle.plugins.eclipse.model.Classpath
-import org.gradle.plugins.eclipse.model.Container
-import org.gradle.plugins.eclipse.model.internal.ClasspathFactory
-
-/**
- * Generates an Eclipse <code>.classpath</code> file.
- *
- * @author Hans Dockter
- */
-public class EclipseClasspath extends XmlGeneratorTask<Classpath> {
-    /**
-     * The source sets to be added to the classpath.
-     */
-    Iterable<SourceSet> sourceSets
-
-    /**
-     * The configurations which files are to be transformed into classpath entries.
-     */
-    Set<Configuration> plusConfigurations = new LinkedHashSet<Configuration>();
-
-    /**
-     * The configurations which files are to be excluded from the classpath entries.
-     */
-    Set<Configuration> minusConfigurations = new LinkedHashSet<Configuration>();
-
-    /**
-     * The variables to be used for replacing absolute paths in classpath entries.
-     */
-    Map<String, File> variables = [:]
-
-    /**
-     * Containers to be added to the classpath
-     */
-    Set<Container> containers = new LinkedHashSet<Container>();
-
-    /**
-     * The default output directory for eclipse generated files, eg classes.
-     */
-    File defaultOutputDir;
-
-    /**
-     * Whether to download and add sources associated with the dependency jars. Defaults to true.
-     */
-    boolean downloadSources = true
-
-    /**
-     * Whether to download and add javadocs associated with the dependency jars. Defaults to false.
-     */
-    boolean downloadJavadoc = false
-
-    protected ClasspathFactory modelFactory = new ClasspathFactory()
-
-    @Override protected Classpath create() {
-        return new Classpath(xmlTransformer)
-    }
-
-    @Override protected void configure(Classpath object) {
-        modelFactory.configure(this, object)
-    }
-
-    /**
-     * Adds containers to the .classpath.
-     *
-     * @param containers the container names to be added to the .classpath.
-     */
-    void containers(String... containers) {
-        assert containers != null
-        this.containers.addAll(containers as List)
-    }
-
-    /**
-     * Adds variables to be used for replacing absolute paths in classpath entries.
-     *
-     * @param variables A map where the keys are the variable names and the values are the variable values.
-     */
-    void variables(Map<String, File> variables) {
-        assert variables != null
-        this.variables.putAll variables
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipsePlugin.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipsePlugin.groovy
deleted file mode 100644
index 99ff423..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipsePlugin.groovy
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse
-
-import org.gradle.api.Project
-import org.gradle.api.internal.plugins.IdePlugin
-import org.gradle.api.plugins.GroovyBasePlugin
-import org.gradle.api.plugins.JavaBasePlugin
-import org.gradle.api.plugins.JavaPlugin
-import org.gradle.api.plugins.WarPlugin
-import org.gradle.api.plugins.scala.ScalaBasePlugin
-import org.gradle.plugins.eclipse.model.BuildCommand
-import org.gradle.plugins.eclipse.model.Facet
-import org.gradle.api.JavaVersion
-
-/**
- * <p>A plugin which generates Eclipse files.</p>
- *
- * @author Hans Dockter
- */
-public class EclipsePlugin extends IdePlugin {
-    public static final String ECLIPSE_TASK_NAME = "eclipse";
-    public static final String CLEAN_ECLIPSE_TASK_NAME = "cleanEclipse";
-    public static final String ECLIPSE_PROJECT_TASK_NAME = "eclipseProject";
-    public static final String ECLIPSE_WTP_TASK_NAME = "eclipseWtp";
-    public static final String ECLIPSE_CP_TASK_NAME = "eclipseClasspath";
-    public static final String ECLIPSE_JDT_TASK_NAME = "eclipseJdt";
-
-    @Override protected String getLifecycleTaskName() {
-        return 'eclipse'
-    }
-
-    @Override protected void onApply(Project project) {
-        lifecycleTask.description = 'Generates the Eclipse files.'
-        cleanTask.description = 'Cleans the generated eclipse files.'
-        configureEclipseProject(project)
-        configureEclipseClasspath(project)
-        configureEclipseJdt(project)
-        configureEclipseWtpModuleForWarProjects(project);
-    }
-
-    private void configureEclipseProject(Project project) {
-        EclipseProject eclipseProject = project.tasks.add(ECLIPSE_PROJECT_TASK_NAME, EclipseProject.class);
-        eclipseProject.setProjectName(project.name);
-        eclipseProject.description = "Generates the Eclipse .project file."
-        eclipseProject.setInputFile(project.file('.project'))
-        eclipseProject.setOutputFile(project.file('.project'))
-        eclipseProject.conventionMapping.comment = { project.description }
-
-        project.plugins.withType(JavaBasePlugin.class).allPlugins {
-            project.configure(project.eclipseProject) {
-                buildCommands = [new BuildCommand("org.eclipse.jdt.core.javabuilder")]
-                natures = ["org.eclipse.jdt.core.javanature"]
-            }
-        }
-        project.plugins.withType(GroovyBasePlugin.class).allPlugins {
-            project.configure(project.eclipseProject) {
-                natures.add(natures.indexOf("org.eclipse.jdt.core.javanature"), "org.eclipse.jdt.groovy.core.groovyNature")
-            }
-        }
-        project.plugins.withType(ScalaBasePlugin.class).allPlugins {
-            project.configure(project.eclipseProject) {
-                buildCommands = buildCommands.collect { command ->
-                    command.name == "org.eclipse.jdt.core.javabuilder" ? new BuildCommand("ch.epfl.lamp.sdt.core.scalabuilder") : command
-                }
-                natures.add(natures.indexOf("org.eclipse.jdt.core.javanature"), "ch.epfl.lamp.sdt.core.scalanature")
-            }
-        }
-        project.plugins.withType(WarPlugin.class).allPlugins {
-            project.configure(project.eclipseProject) {
-                buildCommand 'org.eclipse.wst.common.project.facet.core.builder'
-                buildCommand 'org.eclipse.wst.validation.validationbuilder'
-                natures 'org.eclipse.wst.common.project.facet.core.nature', 'org.eclipse.wst.common.modulecore.ModuleCoreNature'
-            }
-        }
-
-        addWorker(eclipseProject)
-    }
-
-    private void configureEclipseClasspath(final Project project) {
-        project.plugins.withType(JavaBasePlugin.class).allPlugins {
-            EclipseClasspath eclipseClasspath = project.tasks.add(ECLIPSE_CP_TASK_NAME, EclipseClasspath.class);
-            project.configure(eclipseClasspath) {
-                description = "Generates the Eclipse .classpath file."
-                containers 'org.eclipse.jdt.launching.JRE_CONTAINER'
-                sourceSets = project.sourceSets
-                inputFile = project.file('.classpath')
-                outputFile = project.file('.classpath')
-                conventionMapping.defaultOutputDir = { new File(project.buildDir, 'eclipse') }
-            }
-            addWorker(eclipseClasspath)
-        }
-        project.plugins.withType(JavaPlugin.class).allPlugins {
-            project.configure(project.eclipseClasspath) {
-                plusConfigurations = [project.configurations.testRuntime]
-                conventionMapping.defaultOutputDir = { project.sourceSets.main.classesDir }
-            }
-        }
-    }
-
-    private void configureEclipseJdt(final Project project) {
-        project.plugins.withType(JavaBasePlugin.class).allPlugins {
-            EclipseJdt eclipseJdt = project.tasks.add(ECLIPSE_JDT_TASK_NAME, EclipseJdt.class);
-            project.configure(eclipseJdt) {
-                description = "Generates the Eclipse JDT settings file."
-                outputFile = project.file('.settings/org.eclipse.jdt.core.prefs')
-                inputFile = project.file('.settings/org.eclipse.jdt.core.prefs')
-                conventionMapping.sourceCompatibility = { project.sourceCompatibility }
-                conventionMapping.targetCompatibility = { project.targetCompatibility }
-            }
-            addWorker(eclipseJdt)
-        }
-    }
-
-    private void configureEclipseWtpModuleForWarProjects(final Project project) {
-        project.plugins.withType(WarPlugin.class).allPlugins {
-            final EclipseWtp eclipseWtp = project.getTasks().add(ECLIPSE_WTP_TASK_NAME, EclipseWtp.class);
-
-            project.configure(eclipseWtp) {
-                description = 'Generate the Eclipse WTP settings files.'
-                deployName = project.name
-                conventionMapping.contextPath = { project.war.baseName }
-                conventionMapping.facets = { [new Facet("jst.web", "2.4"), new Facet("jst.java", toJavaFacetVersion(project.sourceCompatibility))]}
-                sourceSets = project.sourceSets.matching { sourceSet -> sourceSet.name == 'main' }
-                plusConfigurations = [project.configurations.runtime]
-                minusConfigurations = [project.configurations.providedRuntime]
-                resource deployPath: '/', sourcePath: project.convention.plugins.war.webAppDirName
-                orgEclipseWstCommonComponentInputFile = project.file('.settings/org.eclipse.wst.common.component')
-                orgEclipseWstCommonComponentOutputFile = project.file('.settings/org.eclipse.wst.common.component')
-                orgEclipseWstCommonProjectFacetCoreInputFile = project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
-                orgEclipseWstCommonProjectFacetCoreOutputFile = project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
-            }
-
-            addWorker(eclipseWtp)
-        }
-    }
-
-    def toJavaFacetVersion(JavaVersion version) {
-        if (version == JavaVersion.VERSION_1_5) {
-            return '5.0'
-        }
-        if (version == JavaVersion.VERSION_1_6) {
-            return '6.0'
-        }
-        return version.toString()
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseProject.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseProject.groovy
deleted file mode 100644
index 0ed79bb..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseProject.groovy
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse;
-
-
-import org.gradle.api.InvalidUserDataException
-import org.gradle.api.tasks.XmlGeneratorTask
-import org.gradle.plugins.eclipse.model.BuildCommand
-import org.gradle.plugins.eclipse.model.Link
-import org.gradle.plugins.eclipse.model.Project
-
-/**
- * Generates an Eclipse <code>.project</code> file.
- *
- * @author Hans Dockter
- */
-public class EclipseProject extends XmlGeneratorTask<Project> {
-    private static final LINK_ARGUMENTS = ['name', 'type', 'location', 'locationUri']
-
-    /**
-     * The name used for the name of the eclipse project
-     */
-    String projectName;
-
-    /**
-     * A comment used for the eclipse project
-     */
-    String comment;
-
-    /**
-     * The referenced projects of this Eclipse project.
-     */
-    Set<String> referencedProjects = new LinkedHashSet<String>();
-
-    /**
-     * The natures to be added to this Eclipse project.
-     */
-    List<String> natures = []
-
-    /**
-     * The build commands to be added to this Eclipse project.
-     */
-    List<BuildCommand> buildCommands = []
-
-    /**
-     * The links to be added to this Eclipse project.
-     */
-    Set<Link> links = new LinkedHashSet<Link>();
-
-    @Override protected Project create() {
-        return new Project(xmlTransformer)
-    }
-
-    @Override protected void configure(Project project) {
-        project.configure(this)
-    }
-
-    /**
-     * Adds natures entries to the eclipse project.
-     * @param natures the nature names
-     */
-    void natures(String... natures) {
-        assert natures != null
-        this.natures.addAll(natures as List)
-    }
-
-    /**
-     * Adds project references to the eclipse project.
-     *
-     * @param referencedProjects The name of the project references.
-     */
-    void referencedProjects(String... referencedProjects) {
-        assert referencedProjects != null
-        this.referencedProjects.addAll(referencedProjects as List)
-    }
-
-    /**
-     * Adds a build command with arguments to the eclipse project.
-     *
-     * @param args A map with arguments, where the key is the name of the argument and the value the value.
-     * @param buildCommand The name of the build command.
-     * @see #buildCommand(String)
-     */
-    void buildCommand(Map args, String buildCommand) {
-        assert buildCommand != null
-        this.buildCommands.add(new BuildCommand(buildCommand, args))
-    }
-
-    /**
-     * Adds a build command to the eclipse project.
-     *
-     * @param buildCommand The name of the build command
-     * @see #buildCommand(Map, String)
-     */
-    void buildCommand(String buildCommand) {
-        assert buildCommand != null
-        this.buildCommands.add(new BuildCommand(buildCommand))
-    }
-
-    /**
-     * Adds a link to the eclipse project.
-     *
-     * @param args A maps with the args for the link. Legal keys for the map are name, type, location and locationUri.
-     */
-    void link(Map<String, String> args) {
-        def illegalArgs = LINK_ARGUMENTS - args.keySet()
-        if (illegalArgs) {
-            throw new InvalidUserDataException("You provided illegal argument for a link: " + illegalArgs)
-        }
-        this.links.add(new Link(args.name, args.type, args.location, args.locationUri))
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseWtp.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseWtp.groovy
deleted file mode 100644
index 65d8546..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/EclipseWtp.groovy
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse;
-
-
-import org.gradle.api.artifacts.Configuration
-import org.gradle.api.internal.ConventionTask
-import org.gradle.api.tasks.OutputFile
-import org.gradle.api.tasks.SourceSet
-import org.gradle.api.tasks.TaskAction
-import org.gradle.listener.ActionBroadcast
-import org.gradle.plugins.eclipse.model.Facet
-import org.gradle.plugins.eclipse.model.WbProperty
-import org.gradle.plugins.eclipse.model.WbResource
-import org.gradle.plugins.eclipse.model.Wtp
-import org.gradle.plugins.eclipse.model.internal.WtpFactory
-import org.gradle.util.ConfigureUtil
-
-/**
- * Generates Eclipse configuration files for Eclipse WTP.
- *
- * @author Hans Dockter
- */
-public class EclipseWtp extends ConventionTask {
-    /**
-     * The file that is merged into the to be produced org.eclipse.wst.common.component file. This
-     * file must not exist.
-     */
-    File orgEclipseWstCommonComponentInputFile
-
-    /**
-     * The output file for the org.eclipse.wst.common.component metadata.
-     */
-    @OutputFile
-    File orgEclipseWstCommonComponentOutputFile
-
-    /**
-     * The file that is merged into the to be produced org.eclipse.wst.common.project.facet.core file. This
-     * file must not exist.
-     */
-    File orgEclipseWstCommonProjectFacetCoreInputFile
-
-    /**
-     * The output file for the org.eclipse.wst.common.project.facet.core metadata.
-     */
-    @OutputFile
-    File orgEclipseWstCommonProjectFacetCoreOutputFile
-
-    /**
-     * The source sets to be transformed into wb-resource elements.
-     */
-    Iterable<SourceSet> sourceSets
-
-    /**
-     * The configurations which files are to be transformed into dependent-module elements of
-     * the org.eclipse.wst.common.component file.
-     */
-    Set<Configuration> plusConfigurations
-
-    /**
-     * The configurations which files are to be excluded from the dependent-module elements of
-     * the org.eclipse.wst.common.component file.
-     */
-    Set<Configuration> minusConfigurations
-
-    /**
-     * The facets to be added as installed elements to the org.eclipse.wst.common.project.facet.core file.
-     */
-    List<Facet> facets = []
-
-    /**
-     * The deploy name to be used in the org.eclipse.wst.common.component file.
-     */
-    String deployName;
-
-    /**
-     * The variables to be used for replacing absolute path in dependent-module elements of
-     * the org.eclipse.wst.common.component file.
-     */
-    Map<String, File> variables = [:]
-
-    /**
-     * Additional wb-resource elements.
-     */
-    List<WbResource> resources = []
-
-    /**
-     * Additional property elements.
-     */
-    List<WbProperty> properties = []
-
-    /**
-     * The context path for the web application
-     */
-    String contextPath
-
-    protected WtpFactory modelFactory = new WtpFactory()
-
-    def ActionBroadcast<Map<String, Node>> withXmlActions = new ActionBroadcast<Map<String, Node>>();
-    def ActionBroadcast<Wtp> beforeConfiguredActions = new ActionBroadcast<Wtp>();
-    def ActionBroadcast<Wtp> whenConfiguredActions = new ActionBroadcast<Wtp>();
-
-    def EclipseWtp() {
-        outputs.upToDateWhen { false }
-    }
-
-    @TaskAction
-    protected void generateXml() {
-        Wtp wtp = modelFactory.createWtp(this)
-        wtp.toXml(orgEclipseWstCommonComponentOutputFile, orgEclipseWstCommonProjectFacetCoreOutputFile)
-    }
-
-    /**
-     * Adds a facet for the org.eclipse.wst.common.project.facet.core file.
-     *
-     * @param args A map that must contain a name and version key with corresponding values.
-     */
-    void facet(Map<String, ?> args) {
-        setFacets(getFacets() + [ConfigureUtil.configureByMap(args, new Facet())])
-    }
-
-    /**
-     * Adds variables to be used for replacing absolute path in dependent-module elements of
-     * the org.eclipse.wst.common.component file.
-     *
-     * @param variables A map where the keys are the variable names and the values are the variable values.
-     */
-    void variables(Map<String, File> variables) {
-        assert variables != null
-        this.variables.putAll variables
-    }
-
-    /**
-     * Adds a property to be added to the org.eclipse.wst.common.component file.
-     *
-     * @param args A map that must contain a name and value key with corresponding values.
-     */
-    void property(Map<String, String> args) {
-        properties.add(new WbProperty(args.name, args.value))
-    }
-
-    /**
-     * Adds a wb-resource to be added to the org.eclipse.wst.common.component file.
-     *
-     * @param args A map that must contain a deployPath and sourcePath key with corresponding values.
-     */
-    void resource(Map<String, String> args) {
-        resources.add(new WbResource(args.deployPath, args.sourcePath))
-    }
-
-    /**
-     * Adds a closure to be called when the XML content for each file has been generated, but before the content is
-     * written to the file.
-     */
-    void withXml(Closure closure) {
-        withXmlActions.add(closure);
-    }
-
-    /**
-     * Adds a closure to be called when the model has been loaded from the input files, and before this task has
-     * configured the model.
-     */
-    void beforeConfigured(Closure closure) {
-        beforeConfiguredActions.add(closure);
-    }
-
-    /**
-     * Adds a closure to be called after this task has configured model, and before it generates the XML content for the
-     * files.
-     */
-    void whenConfigured(Closure closure) {
-        whenConfiguredActions.add(closure);
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Classpath.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Classpath.groovy
deleted file mode 100644
index 65610b5..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Classpath.groovy
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse.model
-
-import org.gradle.api.internal.XmlTransformer
-import org.gradle.api.internal.tasks.generator.XmlPersistableConfigurationObject
-
-/**
- * Represents the customizable elements of an eclipse classpath file. (via XML hooks everything is customizable).
- *
- * @author Hans Dockter
- */
-class Classpath extends XmlPersistableConfigurationObject {
-    List<ClasspathEntry> entries = []
-
-    Classpath(XmlTransformer xmlTransformer) {
-        super(xmlTransformer)
-    }
-
-    @Override protected String getDefaultResourceName() {
-        return 'defaultClasspath.xml'
-    }
-
-    @Override protected void load(Node xml) {
-        xml.classpathentry.each { Node entryNode ->
-            ClasspathEntry entry = null
-            switch (entryNode. at kind) {
-                case 'src':
-                    def path = entryNode. at path
-                    entry = path.startsWith('/') ? new ProjectDependency(entryNode) : new SourceFolder(entryNode)
-                    break
-                case 'var': entry = new Variable(entryNode)
-                    break
-                case 'con': entry = new Container(entryNode)
-                    break
-                case 'lib': entry = new Library(entryNode)
-                    break
-                case 'output': entry = new Output(entryNode)
-                    break
-            }
-            if (entry) {
-                entries.add(entry)
-            }
-        }
-    }
-
-    def configure(List entries) {
-        this.entries.addAll(entries)
-        this.entries.unique()
-    }
-
-    @Override protected void store(Node xml) {
-        xml.classpathentry.each { xml.remove(it) }
-        entries.each { ClasspathEntry entry ->
-            entry.appendNode(xml)
-        }
-    }
-
-    boolean equals(o) {
-        if (this.is(o)) { return true }
-
-        if (getClass() != o.class) { return false }
-
-        Classpath classpath = (Classpath) o;
-
-        if (entries != classpath.entries) { return false }
-
-        return true
-    }
-
-    int hashCode() {
-        int result;
-
-        result = entries.hashCode();
-        return result;
-    }
-
-    public String toString() {
-        return "Classpath{" +
-                "entries=" + entries +
-                '}';
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Wtp.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Wtp.groovy
deleted file mode 100644
index 8cc03f3..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/Wtp.groovy
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse.model
-
-import org.gradle.api.Action
-import org.gradle.plugins.eclipse.EclipseWtp
-
-/**
- * @author Hans Dockter
- */
-class Wtp {
-    List wbModuleEntries = []
-
-    List facets = []
-
-    String deployName
-
-    String contextPath
-
-    private Node orgEclipseWstCommonComponentXml
-    private Node orgEclipseWstCommonProjectFacetCoreXml
-
-    private Action<Map<String, Node>> withXmlActions
-
-    Wtp(EclipseWtp eclipseWtp, List wbModuleEntries, Reader inputOrgEclipseWstCommonComponentXml,
-        Reader inputOrgEclipseWstCommonProjectFacetCoreXml) {
-        initFromXml(inputOrgEclipseWstCommonComponentXml, inputOrgEclipseWstCommonProjectFacetCoreXml)
-
-        eclipseWtp.beforeConfiguredActions.execute(this)
-
-        this.wbModuleEntries.addAll(wbModuleEntries)
-        this.wbModuleEntries.unique()
-        this.facets.addAll(eclipseWtp.facets)
-        this.facets.unique()
-        if (eclipseWtp.deployName) {
-            this.deployName = eclipseWtp.deployName
-        }
-        if (eclipseWtp.contextPath) {
-            this.contextPath = eclipseWtp.contextPath
-        }
-        this.withXmlActions = eclipseWtp.withXmlActions
-
-        eclipseWtp.whenConfiguredActions.execute(this)
-    }
-
-    private def initFromXml(Reader inputOrgEclipseWstCommonComponentXml, Reader inputOrgEclipseWstCommonProjectFacetCoreXml) {
-        if (!inputOrgEclipseWstCommonComponentXml) {
-            orgEclipseWstCommonComponentXml =
-                new Node(null, 'project-modules', [id: "moduleCoreId", 'project-version': "2.0"])
-            orgEclipseWstCommonComponentXml.appendNode('wb-module')
-            orgEclipseWstCommonProjectFacetCoreXml = new Node(null, 'faceted-project')
-            orgEclipseWstCommonProjectFacetCoreXml.appendNode('fixed', [facet: 'jst.java'])
-            orgEclipseWstCommonProjectFacetCoreXml.appendNode('fixed', [facet: 'jst.web'])
-            return
-        }
-
-        orgEclipseWstCommonComponentXml = readOrgEclipseWstCommonComponentXml(inputOrgEclipseWstCommonComponentXml)
-        orgEclipseWstCommonProjectFacetCoreXml = readOrgEclipseWstCommonProjectFacetCoreXml(inputOrgEclipseWstCommonProjectFacetCoreXml)
-    }
-
-    private def readOrgEclipseWstCommonComponentXml(Reader inputXml) {
-        def rootNode = new XmlParser().parse(inputXml)
-
-        deployName = rootNode.'wb-module'[0].@'deploy-name'
-        rootNode.'wb-module'[0].children().each { entryNode ->
-            def entry = null
-            switch (entryNode.name()) {
-                case 'property':
-                    if (entryNode. at name == 'context-root') {
-                        contextPath = entryNode. at value
-                    } else {
-                        entry = new WbProperty(entryNode)
-                    }
-                    break
-                case 'wb-resource': entry = new WbResource(entryNode)
-                    break
-                case 'dependent-module': entry = new WbDependentModule(entryNode)
-                    break
-            }
-            if (entry) {
-                wbModuleEntries.add(entry)
-            }
-        }
-        rootNode
-    }
-
-    private def readOrgEclipseWstCommonProjectFacetCoreXml(Reader inputXml) {
-        def rootNode = new XmlParser().parse(inputXml)
-
-        rootNode.installed.each { entryNode ->
-            facets.add(new Facet(entryNode))
-        }
-        rootNode
-    }
-
-    void toXml(File orgEclipseWstCommonComponentXmlFile, File orgEclipseWstCommonProjectFacetCoreXmlFile) {
-        orgEclipseWstCommonComponentXmlFile.withWriter {Writer componentWriter ->
-            orgEclipseWstCommonProjectFacetCoreXmlFile.withWriter {Writer facetWriter ->
-                toXml(componentWriter, facetWriter)
-            }
-        }
-    }
-
-    def toXml(Writer orgEclipseWstCommonComponentXmlWriter, Writer orgEclipseWstCommonProjectFacetCoreXmlWriter) {
-        removeConfigurableDataFromXml()
-        orgEclipseWstCommonComponentXml.'wb-module'[0].@'deploy-name' = deployName
-        new WbProperty('context-root', contextPath).appendNode(orgEclipseWstCommonComponentXml.'wb-module')
-        wbModuleEntries.each { entry ->
-            entry.appendNode(orgEclipseWstCommonComponentXml.'wb-module')
-        }
-        facets.each { facet ->
-            facet.appendNode(orgEclipseWstCommonProjectFacetCoreXml)
-        }
-        withXmlActions.execute([
-                'org.eclipse.wst.commons.component': orgEclipseWstCommonComponentXml,
-                'org.eclipse.wst.commons.project.facet.core': orgEclipseWstCommonProjectFacetCoreXml])
-
-        PrintWriter printWriter = new PrintWriter(orgEclipseWstCommonComponentXmlWriter)
-        new XmlNodePrinter(printWriter).print(orgEclipseWstCommonComponentXml)
-        printWriter.flush()
-
-        printWriter = new PrintWriter(orgEclipseWstCommonProjectFacetCoreXmlWriter)
-        new XmlNodePrinter(printWriter).print(orgEclipseWstCommonProjectFacetCoreXml)
-        printWriter.flush()
-    }
-
-    private def removeConfigurableDataFromXml() {
-        ['property', 'wb-resource', 'dependent-module'].each { elementName ->
-            orgEclipseWstCommonComponentXml.'wb-module'."$elementName".each { elementNode ->
-                orgEclipseWstCommonComponentXml.'wb-module'[0].remove(elementNode)
-            }
-        }
-        orgEclipseWstCommonProjectFacetCoreXml.installed.each { orgEclipseWstCommonProjectFacetCoreXml.remove(it) }
-    }
-
-    boolean equals(o) {
-        if (this.is(o)) { return true }
-
-        if (getClass() != o.class) { return false }
-
-        Wtp wtp = (Wtp) o;
-
-        if (deployName != wtp.deployName) { return false }
-        if (contextPath != wtp.contextPath) { return false }
-        if (facets != wtp.facets) { return false }
-        if (wbModuleEntries != wtp.wbModuleEntries) { return false }
-
-        return true
-    }
-
-    int hashCode() {
-        int result;
-
-        result = wbModuleEntries.hashCode();
-        result = 31 * result + facets.hashCode();
-        result = 31 * result + deployName.hashCode();
-        return result;
-    }
-
-    public String toString() {
-        return "Wtp{" +
-                "wbModuleEntries=" + wbModuleEntries +
-                ", facets=" + facets +
-                ", deployName='" + deployName + '\'' +
-                ", contextPath='" + contextPath + '\'' +
-                '}';
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/ClasspathFactory.groovy b/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/ClasspathFactory.groovy
deleted file mode 100644
index d526293..0000000
--- a/subprojects/gradle-eclipse/src/main/groovy/org/gradle/plugins/eclipse/model/internal/ClasspathFactory.groovy
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse.model.internal
-
-import org.gradle.api.file.SourceDirectorySet
-import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency
-import org.gradle.api.specs.Specs
-import org.gradle.api.tasks.SourceSet
-import org.gradle.api.artifacts.*
-import org.gradle.plugins.eclipse.model.*
-import org.gradle.plugins.eclipse.EclipseClasspath
-
-/**
- * @author Hans Dockter
- */
-class ClasspathFactory {
-    def configure(EclipseClasspath eclipseClasspath, Classpath classpath) {
-        List entries = []
-        entries.add(new Output(eclipseClasspath.project.relativePath(eclipseClasspath.defaultOutputDir)))
-        entries.addAll(getEntriesFromSourceSets(eclipseClasspath.sourceSets, eclipseClasspath.project))
-        entries.addAll(getEntriesFromContainers(eclipseClasspath.getContainers()))
-        entries.addAll(getEntriesFromConfigurations(eclipseClasspath))
-        classpath.configure(entries)
-    }
-
-    List getEntriesFromSourceSets(def sourceSets, def project) {
-        List entries = []
-        sourceSets.each { SourceSet sourceSet ->
-            sourceSet.allSource.sourceTrees.each { SourceDirectorySet sourceDirectorySet ->
-                sourceDirectorySet.srcDirs.each { dir ->
-                    if (dir.isDirectory()) {
-                        entries.add(new SourceFolder(
-                                project.relativePath(dir),
-                                null,
-                                [] as Set,
-                                project.relativePath(sourceSet.classesDir),
-                                sourceDirectorySet.getIncludes() as List,
-                                sourceDirectorySet.getExcludes() as List))
-                    }
-                }
-            }
-        }
-        entries
-    }
-
-    List getEntriesFromContainers(Set containers) {
-        containers.collect { container ->
-            new Container(container, true, null, [] as Set)
-        }
-    }
-
-    List getEntriesFromConfigurations(EclipseClasspath eclipseClasspath) {
-        getModules(eclipseClasspath) + getLibraries(eclipseClasspath)
-    }
-
-    protected List getModules(EclipseClasspath eclipseClasspath) {
-        return getDependencies(eclipseClasspath.plusConfigurations, eclipseClasspath.minusConfigurations, { it instanceof org.gradle.api.artifacts.ProjectDependency }).collect { projectDependency ->
-            projectDependency.dependencyProject
-        }.collect { dependencyProject ->
-            new org.gradle.plugins.eclipse.model.ProjectDependency('/' + dependencyProject.name, true, null, [] as Set)
-        }
-    }
-
-    protected Set getLibraries(EclipseClasspath eclipseClasspath) {
-        Set declaredDependencies = getDependencies(eclipseClasspath.plusConfigurations, eclipseClasspath.minusConfigurations,
-                { it instanceof ExternalDependency})
-
-        ResolvedConfiguration resolvedConfiguration = eclipseClasspath.project.configurations.
-                detachedConfiguration((declaredDependencies as Dependency[])).resolvedConfiguration
-        def allResolvedDependencies = getAllDeps(resolvedConfiguration.firstLevelModuleDependencies)
-
-        Set sourceDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
-            addSourceArtifact(dependency)
-        }
-        Map sourceFiles = eclipseClasspath.downloadSources ? getFiles(eclipseClasspath.project, sourceDependencies, "sources") : [:]
-
-        Set javadocDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
-            addJavadocArtifact(dependency)
-        }
-        Map javadocFiles = eclipseClasspath.downloadJavadoc ? getFiles(eclipseClasspath.project, javadocDependencies, "javadoc") : [:]
-
-        List moduleLibraries = resolvedConfiguration.getFiles(Specs.SATISFIES_ALL).collect { File binaryFile ->
-            File sourceFile = sourceFiles[binaryFile.name]
-            File javadocFile = javadocFiles[binaryFile.name]
-            createLibraryEntry(binaryFile, sourceFile, javadocFile, eclipseClasspath.variables)
-        }
-        moduleLibraries.addAll(getSelfResolvingFiles(getDependencies(eclipseClasspath.plusConfigurations, eclipseClasspath.minusConfigurations,
-                { it instanceof SelfResolvingDependency && !(it instanceof org.gradle.api.artifacts.ProjectDependency)}), eclipseClasspath.variables))
-        moduleLibraries
-    }
-
-    private def getSelfResolvingFiles(Collection dependencies, Map<String, File> variables) {
-        dependencies.inject([] as LinkedHashSet) { result, SelfResolvingDependency selfResolvingDependency ->
-            result.addAll(selfResolvingDependency.resolve().collect { File file ->
-                createLibraryEntry(file, null, null, variables)
-            })
-            result
-        }
-    }
-
-    AbstractLibrary createLibraryEntry(File binary, File source, File javadoc, Map<String, File> variables) {
-        def usedVariableEntry = variables.find { String name, File value -> binary.canonicalPath.startsWith(value.canonicalPath) }
-        if (usedVariableEntry) {
-            String name = usedVariableEntry.key
-            String value = usedVariableEntry.value.canonicalPath
-            String binaryPath = name + binary.canonicalPath.substring(value.length())
-            String sourcePath = source ? name + source.canonicalPath.substring(value.length()) : null
-            String javadocPath = javadoc ? name + javadoc.canonicalPath.substring(value.length()) : null
-            return new Variable(binaryPath, true, null, [] as Set, sourcePath, javadocPath)
-        }
-        new Library(binary.canonicalPath, true, null, [] as Set, source ? source.canonicalPath : null, javadoc ? javadoc.canonicalPath : null)
-    }
-
-    private Set getDependencies(Set plusConfigurations, Set minusConfigurations, Closure filter) {
-        Set declaredDependencies = new LinkedHashSet()
-        plusConfigurations.each { configuration ->
-            declaredDependencies.addAll(configuration.getAllDependencies().findAll(filter))
-        }
-        minusConfigurations.each { configuration ->
-            configuration.getAllDependencies().findAll(filter).each { minusDep ->
-                declaredDependencies.remove(minusDep)
-            }
-        }
-        return declaredDependencies
-    }
-
-    private def getFiles(def project, Set dependencies, String classifier) {
-        return project.configurations.detachedConfiguration((dependencies as Dependency[])).files.inject([:]) { result, sourceFile ->
-            String key = sourceFile.name.replace("-${classifier}.jar", '.jar')
-            result[key] = sourceFile
-            result
-        }
-    }
-
-    private List getResolvableDependenciesForAllResolvedDependencies(Set allResolvedDependencies, Closure configureClosure) {
-        return allResolvedDependencies.collect { ResolvedDependency resolvedDependency ->
-            def dependency = new DefaultExternalModuleDependency(resolvedDependency.moduleGroup, resolvedDependency.moduleName, resolvedDependency.moduleVersion,
-                    resolvedDependency.configuration)
-            dependency.transitive = false
-            configureClosure.call(dependency)
-            dependency
-        }
-    }
-
-    protected Set getAllDeps(Set deps) {
-        Set result = []
-        deps.each { ResolvedDependency resolvedDependency ->
-            if (resolvedDependency.children) {
-                result.addAll(getAllDeps(resolvedDependency.children))
-            }
-            result.add(resolvedDependency)
-        }
-        result
-    }
-
-    protected def addSourceArtifact(DefaultExternalModuleDependency dependency) {
-        dependency.artifact { artifact ->
-            artifact.name = dependency.name
-            artifact.type = 'source'
-            artifact.extension = 'jar'
-            artifact.classifier = 'sources'
-        }
-    }
-
-    protected def addJavadocArtifact(DefaultExternalModuleDependency dependency) {
-        dependency.artifact { artifact ->
-            artifact.name = dependency.name
-            artifact.type = 'javadoc'
-            artifact.extension = 'jar'
-            artifact.classifier = 'javadoc'
-        }
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseClasspathTest.groovy b/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseClasspathTest.groovy
deleted file mode 100644
index 13ade92..0000000
--- a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseClasspathTest.groovy
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse;
-
-
-import org.gradle.api.internal.ConventionTask
-import org.gradle.api.tasks.AbstractSpockTaskTest
-
-/**
- * @author Hans Dockter
- */
-public class EclipseClasspathTest extends AbstractSpockTaskTest {
-
-    private EclipseClasspath eclipseClasspath;
-
-    ConventionTask getTask() {
-        return eclipseClasspath
-    }
-
-    def setup() {
-        eclipseClasspath = createTask(EclipseClasspath.class);
-    }
-
-    def containers_shouldAdd() {
-        when:
-        eclipseClasspath.containers "container1"
-        eclipseClasspath.containers "container2"
-
-        then:
-        eclipseClasspath.containers = ['container1', 'container2'] as Set
-    }
-
-    def variables_shouldAdd() {
-        when:
-        eclipseClasspath.variables variable1: 'value1'
-        eclipseClasspath.variables variable2: 'value2'
-
-        then:
-        eclipseClasspath.variables == [variable1: 'value1', variable2: 'value2']
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipsePluginTest.groovy b/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipsePluginTest.groovy
deleted file mode 100644
index 38adff7..0000000
--- a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipsePluginTest.groovy
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.plugins.eclipse
-
-import org.gradle.api.Project
-import org.gradle.api.Task
-import org.gradle.api.internal.project.DefaultProject
-import org.gradle.api.tasks.Delete
-import org.gradle.plugins.eclipse.model.BuildCommand
-import org.gradle.plugins.eclipse.model.Facet
-import org.gradle.util.HelperUtil
-import spock.lang.Specification
-import org.gradle.plugins.eclipse.model.WbResource
-
-/**
- * @author Hans Dockter
- */
-class EclipsePluginTest extends Specification {
-    private final DefaultProject project = HelperUtil.createRootProject()
-    private final EclipsePlugin eclipsePlugin = new EclipsePlugin()
-
-    def applyToBaseProject_shouldOnlyHaveEclipseProjectTask() {
-        when:
-        eclipsePlugin.apply(project)
-
-        then:
-        project.tasks.findByPath(':eclipseClasspath') == null
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
-        checkEclipseProjectTask([], [])
-    }
-
-    def applyToJavaProject_shouldOnlyHaveProjectAndClasspathTaskForJava() {
-        when:
-        project.apply(plugin: 'java-base')
-        eclipsePlugin.apply(project)
-
-        then:
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
-        checkEclipseProjectTask([new BuildCommand('org.eclipse.jdt.core.javabuilder')], ['org.eclipse.jdt.core.javanature'])
-        checkEclipseClasspath([] as Set)
-        checkEclipseJdt()
-
-        when:
-        project.apply(plugin: 'java')
-
-        then:
-        checkEclipseClasspath([project.configurations.testRuntime] as Set)
-    }
-
-    def applyToWarProject_shouldHaveProjectForWebAndClasspathTask() {
-        when:
-        project.apply(plugin: 'war')
-        eclipsePlugin.apply(project)
-
-        then:
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseWtp)
-        checkEclipseProjectTask([
-                new BuildCommand('org.eclipse.jdt.core.javabuilder'),
-                new BuildCommand('org.eclipse.wst.common.project.facet.core.builder'),
-                new BuildCommand('org.eclipse.wst.validation.validationbuilder')],
-                ['org.eclipse.jdt.core.javanature',
-                        'org.eclipse.wst.common.project.facet.core.nature',
-                        'org.eclipse.wst.common.modulecore.ModuleCoreNature'])
-        checkEclipseClasspath([project.configurations.testRuntime] as Set)
-        checkEclipseWtp()
-    }
-
-    def applyToScalaProject_shouldHaveProjectAndClasspathTaskForScala() {
-        when:
-        project.apply(plugin: 'scala-base')
-        eclipsePlugin.apply(project)
-
-        then:
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
-        checkEclipseProjectTask([new BuildCommand('ch.epfl.lamp.sdt.core.scalabuilder')],
-                ['ch.epfl.lamp.sdt.core.scalanature', 'org.eclipse.jdt.core.javanature'])
-        checkEclipseClasspath([] as Set)
-
-        when:
-        project.apply(plugin: 'scala')
-
-        then:
-        checkEclipseClasspath([project.configurations.testRuntime] as Set)
-    }
-
-    def applyToGroovyProject_shouldHaveProjectAndClasspathTaskForGroovy() {
-        when:
-        project.apply(plugin: 'groovy-base')
-        eclipsePlugin.apply(project)
-
-        then:
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseProject)
-        assertThatCleanEclipseDependsOn(project, project.cleanEclipseClasspath)
-        checkEclipseProjectTask([new BuildCommand('org.eclipse.jdt.core.javabuilder')], ['org.eclipse.jdt.groovy.core.groovyNature',
-                'org.eclipse.jdt.core.javanature'])
-        checkEclipseClasspath([] as Set)
-
-        when:
-        project.apply(plugin: 'groovy')
-
-        then:
-        checkEclipseClasspath([project.configurations.testRuntime] as Set)
-    }
-
-    private void checkEclipseProjectTask(List buildCommands, List natures) {
-        EclipseProject eclipseProjectTask = project.eclipseProject
-        assert eclipseProjectTask instanceof EclipseProject
-        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseProjectTask)
-        assert eclipseProjectTask.buildCommands == buildCommands
-        assert eclipseProjectTask.natures == natures
-        assert eclipseProjectTask.links == [] as Set
-        assert eclipseProjectTask.referencedProjects == [] as Set
-        assert eclipseProjectTask.comment == null
-        assert eclipseProjectTask.projectName == project.name
-        assert eclipseProjectTask.outputFile == project.file('.project')
-    }
-
-    private void checkEclipseClasspath(def configurations) {
-        EclipseClasspath eclipseClasspath = project.eclipseClasspath
-        assert eclipseClasspath instanceof EclipseClasspath
-        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseClasspath)
-        assert eclipseClasspath.sourceSets == project.sourceSets
-        assert eclipseClasspath.plusConfigurations == configurations
-        assert eclipseClasspath.minusConfigurations == [] as Set
-        assert eclipseClasspath.containers == ['org.eclipse.jdt.launching.JRE_CONTAINER'] as Set
-        assert eclipseClasspath.outputFile == project.file('.classpath')
-        def mainSourceSet = project.sourceSets.findByName('main')
-        if (mainSourceSet != null) {
-            assert eclipseClasspath.defaultOutputDir == mainSourceSet.classesDir
-        } else {
-            assert eclipseClasspath.defaultOutputDir == new File(project.buildDir, 'eclipse')
-        }
-        assert eclipseClasspath.variables == [:]
-    }
-
-    private void checkEclipseJdt() {
-        EclipseJdt eclipseJdt = project.eclipseJdt
-        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseJdt)
-        assert eclipseJdt.sourceCompatibility == project.sourceCompatibility
-        assert eclipseJdt.targetCompatibility == project.targetCompatibility
-        assert eclipseJdt.outputFile == project.file('.settings/org.eclipse.jdt.core.prefs')
-    }
-
-    private void checkEclipseWtp() {
-        EclipseWtp eclipseWtp = project.eclipseWtp
-        assert eclipseWtp instanceof EclipseWtp
-        assert project.eclipse.taskDependencies.getDependencies(project.eclipse).contains(eclipseWtp)
-        assert eclipseWtp.sourceSets.all == [project.sourceSets.main] as Set
-        assert eclipseWtp.plusConfigurations == [project.configurations.runtime] as Set
-        assert eclipseWtp.minusConfigurations == [project.configurations.providedRuntime] as Set
-        assert eclipseWtp.deployName == project.name
-        assert eclipseWtp.contextPath == project.war.baseName
-        assert eclipseWtp.orgEclipseWstCommonComponentInputFile == project.file('.settings/org.eclipse.wst.common.component')
-        assert eclipseWtp.orgEclipseWstCommonComponentOutputFile == project.file('.settings/org.eclipse.wst.common.component')
-        assert eclipseWtp.orgEclipseWstCommonProjectFacetCoreInputFile == project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
-        assert eclipseWtp.orgEclipseWstCommonProjectFacetCoreOutputFile == project.file('.settings/org.eclipse.wst.common.project.facet.core.xml')
-        assert eclipseWtp.facets == [new Facet("jst.web", "2.4"), new Facet("jst.java", "5.0")]
-        assert eclipseWtp.variables == [:]
-        assert eclipseWtp.resources == [new WbResource('/', project.convention.plugins.war.webAppDirName)]
-    }
-
-    void assertThatCleanEclipseDependsOn(Project project, Task dependsOnTask) {
-        assert dependsOnTask instanceof Delete
-        assert project.cleanEclipse.taskDependencies.getDependencies(project.cleanEclipse).contains(dependsOnTask)
-    }
-}
-
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseProjectTest.groovy b/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseProjectTest.groovy
deleted file mode 100644
index a578e91..0000000
--- a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/EclipseProjectTest.groovy
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse
-
-import org.gradle.api.internal.ConventionTask
-import org.gradle.api.tasks.AbstractSpockTaskTest
-import org.gradle.plugins.eclipse.model.BuildCommand
-
-/**
- * @author Hans Dockter
- */
-class EclipseProjectTest extends AbstractSpockTaskTest {
-    EclipseProject eclipseProject
-
-    ConventionTask getTask() {
-        return eclipseProject
-    }
-
-    def setup() {
-        eclipseProject = createTask(EclipseProject.class);
-    }
-
-    def natures_shouldAdd() {
-        when:
-        eclipseProject.natures 'nature1'
-        eclipseProject.natures 'nature2'
-
-        then:
-        eclipseProject.natures = ['nature1', 'nature2']
-    }
-
-    def buildCommands_shouldAdd() {
-        when:
-        eclipseProject.buildCommand 'command1', key1: 'value1'
-        eclipseProject.buildCommand 'command2'
-
-        then:
-        eclipseProject.buildCommands as List == [new BuildCommand('command1', [key1: 'value1']), new BuildCommand('command2')]
-    }
-}
diff --git a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ClasspathTest.groovy b/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ClasspathTest.groovy
deleted file mode 100644
index 50ceb28..0000000
--- a/subprojects/gradle-eclipse/src/test/groovy/org/gradle/plugins/eclipse/model/ClasspathTest.groovy
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.eclipse.model;
-
-
-import org.gradle.api.internal.XmlTransformer
-import org.gradle.util.TemporaryFolder
-import org.junit.Rule
-import spock.lang.Specification
-
-/**
- * @author Hans Dockter
- */
-
-public class ClasspathTest extends Specification {
-    private static final CUSTOM_ENTRIES = [
-            new ProjectDependency("/test2", false, null, [] as Set),
-            new Container("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6",
-                false, null, [] as Set),
-            new Library("/apache-ant-1.7.1/lib/ant-antlr.jar", false, null, [] as Set, null, null),
-            new SourceFolder("src", null, [] as Set, "bin2", [], []),
-            new Variable("GRADLE_CACHE/ant-1.6.5.jar", false, null, [] as Set, null, null),
-            new Container("org.eclipse.jdt.USER_LIBRARY/gradle", false, null, [] as Set),
-            new Output("bin")]
-    final Classpath classpath = new Classpath(new XmlTransformer())
-
-    @Rule
-    public TemporaryFolder tmpDir = new TemporaryFolder();
-
-    def loadFromReader() {
-        when:
-        classpath.load(customClasspathReader)
-
-        then:
-        classpath.entries == CUSTOM_ENTRIES
-    }
-
-    def configureMergesEntries() {
-        def constructorEntries = [createSomeLibrary()]
-
-        when:
-        classpath.load(customClasspathReader)
-        classpath.configure(constructorEntries + [CUSTOM_ENTRIES[0]])
-
-        then:
-        classpath.entries == CUSTOM_ENTRIES + constructorEntries
-    }
-
-    def loadDefaults() {
-        when:
-        classpath.loadDefaults()
-
-        then:
-        classpath.entries == []
-    }
-
-    def toXml_shouldContainCustomValues() {
-        def constructorEntries = [createSomeLibrary()]
-
-        when:
-        classpath.load(customClasspathReader)
-        classpath.configure(constructorEntries)
-        def xml = getToXmlReader()
-        def other = new Classpath(new XmlTransformer())
-        other.load(xml)
-
-        then:
-        classpath == other
-    }
-
-    private InputStream getCustomClasspathReader() {
-        return getClass().getResourceAsStream('customClasspath.xml')
-    }
-
-    private Library createSomeLibrary() {
-        return new Library("/somepath", true, null, [] as Set, null, null)
-    }
-
-    private InputStream getToXmlReader() {
-        ByteArrayOutputStream toXmlText = new ByteArrayOutputStream()
-        classpath.store(toXmlText)
-        return new ByteArrayInputStream(toXmlText.toByteArray())
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaModule.groovy b/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaModule.groovy
deleted file mode 100644
index d1ee8de..0000000
--- a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaModule.groovy
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.idea
-
-import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency
-import org.gradle.api.specs.Specs
-import org.gradle.plugins.idea.model.ModuleLibrary
-import org.gradle.plugins.idea.model.Path
-import org.gradle.plugins.idea.model.PathFactory
-import org.gradle.api.tasks.*
-import org.gradle.plugins.idea.model.Module
-import org.gradle.api.artifacts.ProjectDependency
-import org.gradle.api.artifacts.ExternalDependency
-import org.gradle.api.artifacts.ResolvedConfiguration
-import org.gradle.api.artifacts.SelfResolvingDependency
-import org.gradle.api.artifacts.ResolvedDependency
-import org.gradle.api.artifacts.Dependency
-import org.gradle.api.artifacts.Configuration
-
-/**
- * Generates an IDEA module file.
- *
- * @author Hans Dockter
- */
-public class IdeaModule extends XmlGeneratorTask<Module> {
-    /**
-     * The content root directory of the module.
-     */
-    @InputFiles
-    File moduleDir
-
-    /**
-     * The dirs containing the production sources.
-     */
-    @InputFiles
-    Set<File> sourceDirs
-
-    /**
-     * The dirs containing the test sources.
-     */
-    @InputFiles
-    Set<File> testSourceDirs
-
-    /**
-     * The dirs to be excluded by idea.
-     */
-    @InputFiles
-    Set<File> excludeDirs
-
-    /**
-     * The idea output dir for the production sources. If {@code null} no entry for output dirs is created.
-     */
-    @InputFiles @Optional
-    File outputDir
-
-    /**
-     * The idea output dir for the test sources. If {@code null} no entry for test output dirs is created.
-     */
-    @InputFiles @Optional
-    File testOutputDir
-
-    /**
-     * The JDK to use for this module. If this is {@code null} the value of the existing or default ipr XML (inherited)
-     * is used. If it is set to <code>inherited</code>, the project SDK is used. Otherwise the SDK for the corresponding
-     * value of java version is used for this module
-     */
-    @Input @Optional
-    String javaVersion = org.gradle.plugins.idea.model.Module.INHERITED
-
-    /**
-     * Whether to download and add sources associated with the dependency jars.
-     */
-    @Input
-    boolean downloadSources = true
-
-    /**
-     * Whether to download and add javadoc associated with the dependency jars.
-     */
-    @Input
-    boolean downloadJavadoc = false
-
-    /**
-     * The variables to be used for replacing absolute paths in the iml entries. For example, you might add a
-     * {@code GRADLE_USER_HOME} variable to point to the Gradle user home dir.
-     */
-    Map<String, File> variables = [:]
-
-    /**
-     * The keys of this map are the Intellij scopes. Each key points to another map that has two keys, plus and minus.
-     * The values of those keys are sets of  {@link org.gradle.api.artifacts.Configuration}  objects. The files of the
-     * plus configurations are added minus the files from the minus configurations.
-     */
-    Map<String, Map<String, Configuration>> scopes = [:]
-
-    @Override protected Module create() {
-        return new Module(xmlTransformer, pathFactory)
-    }
-
-    @Override protected void configure(Module module) {
-        module.configure(getContentPath(), getSourcePaths(), getTestSourcePaths(), getExcludePaths(), getOutputPath(), getTestOutputPath(),
-                getDependencies(), javaVersion)
-    }
-
-    protected Path getContentPath() {
-        getPath(project.projectDir)
-    }
-
-    protected Path getOutputPath() {
-        getOutputDir() ? getPath(getOutputDir()) : null
-    }
-
-    protected Path getTestOutputPath() {
-        getTestOutputDir() ? getPath(getTestOutputDir()) : null
-    }
-
-    protected Set getSourcePaths() {
-        getSourceDirs().collect { getPath(it) }
-    }
-
-    protected Set getTestSourcePaths() {
-        getTestSourceDirs().collect { getPath(it) }
-    }
-
-    protected Set getExcludePaths() {
-
-        getExcludeDirs().collect { getPath(it) }
-    }
-
-    protected Set getDependencies() {
-        scopes.keySet().inject([] as LinkedHashSet) {result, scope ->
-            result + (getModuleLibraries(scope) + getModules(scope))
-        }
-    }
-
-    protected Set getModules(String scope) {
-        if (scopes[scope]) {
-            return getScopeDependencies(scopes[scope], { it instanceof ProjectDependency}).collect { ProjectDependency projectDependency ->
-                projectDependency.dependencyProject
-            }.collect { project ->
-                new org.gradle.plugins.idea.model.ModuleDependency(project.name, scope)
-            }
-        }
-        return []
-    }
-
-    protected Set getModuleLibraries(String scope) {
-        if (scopes[scope]) {
-            Set firstLevelDependencies = getScopeDependencies(scopes[scope], { it instanceof ExternalDependency})
-
-            ResolvedConfiguration resolvedConfiguration = project.configurations.detachedConfiguration((firstLevelDependencies as Dependency[])).resolvedConfiguration
-            def allResolvedDependencies = getAllDeps(resolvedConfiguration.firstLevelModuleDependencies)
-
-            Set sourceDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
-                addSourceArtifact(dependency)
-            }
-            Map sourceFiles = downloadSources ? getFiles(sourceDependencies, "sources") : [:]
-
-            Set javadocDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
-                addJavadocArtifact(dependency)
-            }
-            Map javadocFiles = downloadJavadoc ? getFiles(javadocDependencies, "javadoc") : [:]
-
-            List moduleLibraries = resolvedConfiguration.getFiles(Specs.SATISFIES_ALL).collect { File binaryFile ->
-                File sourceFile = sourceFiles[binaryFile.name]
-                File javadocFile = javadocFiles[binaryFile.name]
-                new ModuleLibrary([getPath(binaryFile)] as Set, javadocFile ? [getPath(javadocFile)] as Set : [] as Set, sourceFile ? [getPath(sourceFile)] as Set : [] as Set, [] as Set, scope)
-            }
-            moduleLibraries.addAll(getSelfResolvingFiles(getScopeDependencies(scopes[scope],
-                    { it instanceof SelfResolvingDependency && !(it instanceof ProjectDependency)}), scope))
-            return moduleLibraries as LinkedHashSet
-        }
-        return []
-    }
-
-    private def getSelfResolvingFiles(Collection dependencies, String scope) {
-        dependencies.inject([] as LinkedHashSet) { result, SelfResolvingDependency selfResolvingDependency ->
-            result.addAll(selfResolvingDependency.resolve().collect { File file ->
-                new ModuleLibrary([getPath(file)] as Set, [] as Set, [] as Set, [] as Set, scope)
-            })
-            result
-        }
-    }
-
-    private Set getScopeDependencies(Map<String, Configuration> configurations, Closure filter) {
-        Set firstLevelDependencies = new LinkedHashSet()
-        configurations.plus.each { Configuration configuration ->
-            firstLevelDependencies.addAll(configuration.getAllDependencies().findAll(filter))
-        }
-        configurations.minus.each { Configuration configuration ->
-            configuration.getAllDependencies().findAll(filter).each { minusDep ->
-                // This deals with dependencies that are defined in different scopes with different
-                // artifacts. Right now we accept the fact, that in such a situation some artifacts
-                // might be duplicated in Idea (they live in different scopes then). 
-                if (minusDep instanceof ExternalDependency) {
-                    ExternalDependency removeCandidate = firstLevelDependencies.find { it == minusDep }
-                    if (removeCandidate && removeCandidate.artifacts == minusDep.artifacts) {
-                        firstLevelDependencies.remove(removeCandidate)
-                    }
-                } else {
-                    firstLevelDependencies.remove(minusDep)
-                }
-            }
-        }
-        return firstLevelDependencies
-    }
-
-    private def getFiles(Set dependencies, String classifier) {
-        return project.configurations.detachedConfiguration((dependencies as Dependency[])).files.inject([:]) { result, sourceFile ->
-            String key = sourceFile.name.replace("-${classifier}.jar", '.jar')
-            result[key] = sourceFile
-            result
-        }
-    }
-
-    private List getResolvableDependenciesForAllResolvedDependencies(Set allResolvedDependencies, Closure configureClosure) {
-        return allResolvedDependencies.collect { ResolvedDependency resolvedDependency ->
-            def dependency = new DefaultExternalModuleDependency(resolvedDependency.moduleGroup, resolvedDependency.moduleName, resolvedDependency.moduleVersion,
-                    resolvedDependency.configuration)
-            dependency.transitive = false
-            configureClosure.call(dependency)
-            dependency
-        }
-    }
-
-    protected Set getAllDeps(Set deps) {
-        Set result = []
-        deps.each { ResolvedDependency resolvedDependency ->
-            if (resolvedDependency.children) {
-                result.addAll(getAllDeps(resolvedDependency.children))
-            }
-            result.add(resolvedDependency)
-        }
-        result
-    }
-
-    protected def addSourceArtifact(DefaultExternalModuleDependency dependency) {
-        dependency.artifact { artifact ->
-            artifact.name = dependency.name
-            artifact.type = 'source'
-            artifact.extension = 'jar'
-            artifact.classifier = 'sources'
-        }
-    }
-
-    protected def addJavadocArtifact(DefaultExternalModuleDependency dependency) {
-        dependency.artifact { artifact ->
-            artifact.name = dependency.name
-            artifact.type = 'javadoc'
-            artifact.extension = 'jar'
-            artifact.classifier = 'javadoc'
-        }
-    }
-
-    protected Path getPath(File file) {
-        return pathFactory.path(file)
-    }
-
-    protected PathFactory getPathFactory() {
-        PathFactory factory = new PathFactory()
-        factory.addPathVariable('MODULE_DIR', getOutputFile().parentFile)
-        variables.each { key, value ->
-            factory.addPathVariable(key, value)
-        }
-        return factory
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaPlugin.groovy b/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaPlugin.groovy
deleted file mode 100644
index 5719e53..0000000
--- a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaPlugin.groovy
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.idea;
-
-
-import org.gradle.api.JavaVersion
-import org.gradle.api.Project
-import org.gradle.api.internal.plugins.IdePlugin
-import org.gradle.api.plugins.JavaPlugin
-
-/**
- * @author Hans Dockter
- *
- * When applied to a project, this plugin add one IdeaModule task. If the project is the root project, the plugin
- * adds also an IdeaProject task.
- *
- * If the java plugin is or has been added to a project where this plugin is applied to, the IdeaModule task gets some
- * Java specific configuration.
- */
-class IdeaPlugin extends IdePlugin {
-    @Override protected String getLifecycleTaskName() {
-        return 'idea'
-    }
-
-    @Override protected void onApply(Project project) {
-        lifecycleTask.description = 'Generates IDEA project files (IML, IPR, IWS)'
-        cleanTask.description = 'Cleans IDEA project files (IML, IPR)'
-        configureIdeaWorkspace(project)
-        configureIdeaProject(project)
-        configureIdeaModule(project)
-        configureForJavaPlugin(project)
-    }
-
-    private def configureIdeaWorkspace(Project project) {
-        if (isRoot(project)) {
-            def task = project.task('ideaWorkspace', description: 'Generates an IDEA workspace file (IWS)', type: IdeaWorkspace) {
-                outputFile = new File(project.projectDir, project.name + ".iws")
-            }
-            addWorker(task)
-        }
-    }
-
-    private def configureIdeaModule(Project project) {
-        def task = project.task('ideaModule', description: 'Generates IDEA module files (IML)', type: IdeaModule) {
-            conventionMapping.outputFile = { new File(project.projectDir, project.name + ".iml") }
-            conventionMapping.moduleDir = { project.projectDir }
-            conventionMapping.sourceDirs = { [] as Set }
-            conventionMapping.excludeDirs = { [project.buildDir, project.file('.gradle')] as Set }
-            conventionMapping.testSourceDirs = { [] as Set }
-        }
-        addWorker(task)
-    }
-
-    private def configureIdeaProject(Project project) {
-        if (isRoot(project)) {
-            def task = project.task('ideaProject', description: 'Generates IDEA project file (IPR)', type: IdeaProject) {
-                outputFile = new File(project.projectDir, project.name + ".ipr")
-                subprojects = project.rootProject.allprojects
-                javaVersion = JavaVersion.VERSION_1_6.toString()
-                wildcards = ['!?*.java', '!?*.groovy']
-            }
-            addWorker(task)
-        }
-    }
-
-    private def configureForJavaPlugin(Project project) {
-        project.plugins.withType(JavaPlugin).allPlugins {
-            configureIdeaProjectForJava(project)
-            configureIdeaModuleForJava(project)
-        }
-    }
-
-    private def configureIdeaProjectForJava(Project project) {
-        if (isRoot(project)) {
-            project.ideaProject {
-                javaVersion = project.sourceCompatibility
-            }
-        }
-    }
-
-    private def configureIdeaModuleForJava(Project project) {
-        project.ideaModule {
-            conventionMapping.sourceDirs = { project.sourceSets.main.allSource.sourceTrees.srcDirs.flatten() as Set }
-            conventionMapping.testSourceDirs = { project.sourceSets.test.allSource.sourceTrees.srcDirs.flatten() as Set }
-            conventionMapping.outputDir = { project.sourceSets.main.classesDir }
-            conventionMapping.testOutputDir = { project.sourceSets.test.classesDir }
-            def configurations = project.configurations
-            scopes = [
-                    COMPILE: [plus: [configurations.compile], minus: []],
-                    RUNTIME: [plus: [configurations.runtime], minus: [configurations.compile]],
-                    TEST: [plus: [configurations.testRuntime], minus: [configurations.runtime]]
-            ]
-        }
-    }
-
-    private boolean isRoot(Project project) {
-        return project.parent == null
-    }
-}
-
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Module.groovy b/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Module.groovy
deleted file mode 100644
index 20f81c5..0000000
--- a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Module.groovy
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.idea.model
-
-import org.gradle.api.internal.XmlTransformer
-import org.gradle.api.internal.tasks.generator.XmlPersistableConfigurationObject
-
-/**
- * Represents the customizable elements of an iml (via XML hooks everything of the iml is customizable).
- *
- * @author Hans Dockter
- */
-class Module extends XmlPersistableConfigurationObject {
-    static final String INHERITED = "inherited"
-
-    /**
-     * The dir for the content root of the module.  Defaults to the projectDir for the project.  If null,
-     * the directory that contains the output file will be used.
-     */
-    Path contentPath;
-
-    /**
-     * The foldes for the production code. Must not be null.
-     */
-    Set sourceFolders = [] as LinkedHashSet
-
-    /**
-     * The folders for the test code. Must not be null.
-     */
-    Set testSourceFolders = [] as LinkedHashSet
-
-    /**
-     * Folders to be excluded. Must not be null.
-     */
-    Set excludeFolders = [] as LinkedHashSet
-
-    /**
-     * The dir for the production source classes. If null this output dir element is not added.
-     */
-    Path outputDir
-
-    /**
-     * The dir for the compiled test source classes. If null this output element is not added.
-     */
-    Path testOutputDir
-
-    /**
-     * The dependencies of this module. Must not be null. Has instances of type    {@link Dependency}   .
-     */
-    Set dependencies = [] as LinkedHashSet
-
-    String javaVersion
-
-    private final PathFactory pathFactory
-
-    def Module(XmlTransformer withXmlActions, PathFactory pathFactory) {
-        super(withXmlActions)
-        this.pathFactory = pathFactory
-    }
-
-    @Override protected String getDefaultResourceName() {
-        return 'defaultModule.xml'
-    }
-
-    @Override protected void load(Node xml) {
-        readJdkFromXml()
-        readSourceAndExcludeFolderFromXml()
-        readOutputDirsFromXml()
-        readDependenciesFromXml()
-    }
-
-    private def readJdkFromXml() {
-        def jdk = findOrderEntries().find { it. at type == 'jdk' }
-        if (jdk) {
-            this.javaVersion = jdk. at jdkName
-        } else {
-            this.javaVersion = INHERITED
-        }
-    }
-
-    private def readOutputDirsFromXml() {
-        def outputDirUrl = findOutputDir()?. at url
-        def testOutputDirUrl = findTestOutputDir()?. at url
-        this.outputDir = outputDirUrl ? pathFactory.path(outputDirUrl) : null
-        this.testOutputDir = testOutputDirUrl ? pathFactory.path(testOutputDirUrl) : null
-    }
-
-    private def readDependenciesFromXml() {
-        return findOrderEntries().each { orderEntry ->
-            switch (orderEntry. at type) {
-                case "module-library":
-                    Set classes = orderEntry.library.CLASSES.root.collect {
-                        pathFactory.path(it. at url)
-                    }
-                    Set javadoc = orderEntry.library.JAVADOC.root.collect {
-                        pathFactory.path(it. at url)
-                    }
-                    Set sources = orderEntry.library.SOURCES.root.collect {
-                        pathFactory.path(it. at url)
-                    }
-                    Set jarDirectories = orderEntry.library.jarDirectory.collect { new JarDirectory(pathFactory.path(it. at url), Boolean.parseBoolean(it. at recursive)) }
-                    def moduleLibrary = new ModuleLibrary(classes, javadoc, sources, jarDirectories, orderEntry. at scope)
-                    dependencies.add(moduleLibrary)
-                    break
-                case "module":
-                    dependencies.add(new ModuleDependency(orderEntry.@'module-name', orderEntry. at scope))
-            }
-        }
-    }
-
-    private def readSourceAndExcludeFolderFromXml() {
-        findSourceFolder().each { sourceFolder ->
-            if (sourceFolder. at isTestSource == 'false') {
-                this.sourceFolders.add(pathFactory.path(sourceFolder. at url))
-            } else {
-                this.testSourceFolders.add(pathFactory.path(sourceFolder. at url))
-            }
-        }
-        findExcludeFolder().each { excludeFolder ->
-            this.excludeFolders.add(pathFactory.path(excludeFolder. at url))
-        }
-    }
-
-    def configure(Path contentPath, Set sourceFolders, Set testSourceFolders, Set excludeFolders, Path outputDir, Path testOutputDir, Set dependencies,
-                  String javaVersion) {
-        this.contentPath = contentPath
-        this.sourceFolders.addAll(sourceFolders);
-        this.testSourceFolders.addAll(testSourceFolders);
-        this.excludeFolders.addAll(excludeFolders);
-        if (outputDir) {
-            this.outputDir = outputDir
-        }
-        if (testOutputDir) {
-            this.testOutputDir = testOutputDir;
-        }
-        this.dependencies.addAll(dependencies);
-        if (javaVersion) {
-            this.javaVersion = javaVersion
-        }
-    }
-
-    @Override protected void store(Node xml) {
-        addJdkToXml()
-        setContentURL()
-        removeSourceAndExcludeFolderFromXml()
-        addSourceAndExcludeFolderToXml()
-        addOutputDirsToXml()
-
-        removeDependenciesFromXml()
-        addDependenciesToXml()
-    }
-
-    private def addJdkToXml() {
-        assert javaVersion != null
-        Node moduleJdk = findOrderEntries().find { it. at type == 'jdk' }
-        if (javaVersion != INHERITED) {
-            Node inheritedJdk = findOrderEntries().find { it. at type == "inheritedJdk" }
-            if (inheritedJdk) {
-                inheritedJdk.parent().remove(inheritedJdk)
-            }
-            if (moduleJdk) {
-                findNewModuleRootManager().remove(moduleJdk)
-            }
-            findNewModuleRootManager().appendNode("orderEntry", [type: "jdk", jdkName: javaVersion, jdkType: "JavaSDK"])
-        } else if (!(findOrderEntries().find { it. at type == "inheritedJdk" })) {
-            if (moduleJdk) {
-                findNewModuleRootManager().remove(moduleJdk)
-            }
-            findNewModuleRootManager().appendNode("orderEntry", [type: "inheritedJdk"])
-        }
-    }
-
-    private def setContentURL() {
-        if (contentPath != null) {
-            findContent(). at url = contentPath.url
-        }
-    }
-
-    private def addOutputDirsToXml() {
-        if (outputDir) {
-            findOrCreateOutputDir(). at url = outputDir.url
-        }
-        if (testOutputDir) {
-            findOrCreateTestOutputDir(). at url = testOutputDir.url
-        }
-    }
-
-    private Node findOrCreateOutputDir() {
-        return findOutputDir() ?: findNewModuleRootManager().appendNode("output")
-    }
-
-    private Node findOrCreateTestOutputDir() {
-        return findTestOutputDir() ?: findNewModuleRootManager().appendNode("output-test")
-    }
-
-    private Set addDependenciesToXml() {
-        return dependencies.each { Dependency dependency ->
-            dependency.addToNode(findNewModuleRootManager())
-        }
-    }
-
-    private def addSourceAndExcludeFolderToXml() {
-        sourceFolders.each { Path path ->
-            findContent().appendNode('sourceFolder', [url: path.url, isTestSource: 'false'])
-        }
-        testSourceFolders.each { Path path ->
-            findContent().appendNode('sourceFolder', [url: path.url, isTestSource: 'true'])
-        }
-        excludeFolders.each { Path path ->
-            findContent().appendNode('excludeFolder', [url: path.url])
-        }
-    }
-
-    private def removeSourceAndExcludeFolderFromXml() {
-        findSourceFolder().each { sourceFolder ->
-            findContent().remove(sourceFolder)
-        }
-        findExcludeFolder().each { excludeFolder ->
-            findContent().remove(excludeFolder)
-        }
-    }
-
-    private def removeDependenciesFromXml() {
-        return findOrderEntries().each { orderEntry ->
-            if (isDependencyOrderEntry(orderEntry)) {
-                findNewModuleRootManager().remove(orderEntry)
-            }
-        }
-    }
-
-    protected boolean isDependencyOrderEntry(def orderEntry) {
-        ['module-library', 'module'].contains(orderEntry. at type)
-    }
-
-    private Node findContent() {
-        findNewModuleRootManager().content[0]
-    }
-
-    private def findSourceFolder() {
-        return findContent().sourceFolder
-    }
-
-    private def findExcludeFolder() {
-        return findContent().excludeFolder
-    }
-
-    private Node findOutputDir() {
-        return findNewModuleRootManager().output[0]
-    }
-
-    private Node findNewModuleRootManager() {
-        return xml.component.find { it. at name == 'NewModuleRootManager'}
-    }
-
-    private Node findTestOutputDir() {
-        return findNewModuleRootManager().'output-test'[0]
-    }
-
-    private def findOrderEntries() {
-        return findNewModuleRootManager().orderEntry
-    }
-
-
-    boolean equals(o) {
-        if (this.is(o)) { return true }
-
-        if (getClass() != o.class) { return false }
-
-        Module module = (Module) o;
-
-        if (dependencies != module.dependencies) { return false }
-        if (excludeFolders != module.excludeFolders) { return false }
-        if (outputDir != module.outputDir) { return false }
-        if (sourceFolders != module.sourceFolders) { return false }
-        if (testOutputDir != module.testOutputDir) { return false }
-        if (testSourceFolders != module.testSourceFolders) { return false }
-
-        return true;
-    }
-
-    int hashCode() {
-        int result;
-
-        result = (sourceFolders != null ? sourceFolders.hashCode() : 0);
-        result = 31 * result + (testSourceFolders != null ? testSourceFolders.hashCode() : 0);
-        result = 31 * result + (excludeFolders != null ? excludeFolders.hashCode() : 0);
-        result = 31 * result + outputDir.hashCode();
-        result = 31 * result + testOutputDir.hashCode();
-        result = 31 * result + (dependencies != null ? dependencies.hashCode() : 0);
-        return result;
-    }
-
-
-    public String toString() {
-        return "Module{" +
-                "dependencies=" + dependencies +
-                ", sourceFolders=" + sourceFolders +
-                ", testSourceFolders=" + testSourceFolders +
-                ", excludeFolders=" + excludeFolders +
-                ", outputDir=" + outputDir +
-                ", testOutputDir=" + testOutputDir +
-                '}';
-    }
-}
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/IdeaPluginTest.groovy b/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/IdeaPluginTest.groovy
deleted file mode 100644
index 0912a8b..0000000
--- a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/IdeaPluginTest.groovy
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.idea
-
-import org.gradle.api.JavaVersion
-import org.gradle.api.Project
-import org.gradle.api.Task
-import org.gradle.api.internal.project.DefaultProject
-import org.gradle.api.tasks.Delete
-import org.gradle.util.HelperUtil
-import spock.lang.Specification
-
-/**
- * @author Hans Dockter
- */
-class IdeaPluginTest extends Specification {
-    private final DefaultProject project = HelperUtil.createRootProject()
-    private final Project childProject = HelperUtil.createChildProject(project, "child", new File("."))
-    private final IdeaPlugin ideaPlugin = new IdeaPlugin()
-
-    def addsIdeaProjectToRootProject() {
-        when:
-        applyPluginToProjects()
-
-        then:
-        assertThatCleanIdeaDependsOnDeleteTask(project, project.cleanIdeaProject)
-        IdeaProject ideaProjectTask = project.ideaProject
-        ideaProjectTask instanceof IdeaProject
-        ideaProjectTask.outputFile == new File(project.projectDir, project.name + ".ipr")
-        ideaProjectTask.subprojects == project.rootProject.allprojects
-        ideaProjectTask.javaVersion == JavaVersion.VERSION_1_6.toString()
-        ideaProjectTask.wildcards == ['!?*.java', '!?*.groovy'] as Set
-
-        childProject.tasks.findByName('ideaProject') == null
-        childProject.tasks.findByName('cleanIdeaProject') == null
-    }
-
-    def addsIdeaWorkspaceToRootProject() {
-        when:
-        applyPluginToProjects()
-
-        then:
-        project.ideaWorkspace instanceof IdeaWorkspace
-        assertThatCleanIdeaDependsOnDeleteTask(project, project.cleanIdeaWorkspace)
-
-        childProject.tasks.findByName('ideaWorkspace') == null
-        childProject.tasks.findByName('cleanIdeaWorkspace') == null
-    }
-
-    def addsIdeaModuleToProjects() {
-        when:
-        applyPluginToProjects()
-
-        then:
-        assertThatIdeaModuleIsProperlyConfigured(project)
-        assertThatIdeaModuleIsProperlyConfigured(childProject)
-    }
-
-    def addsSpecialConfigurationIfJavaPluginIsApplied() {
-        when:
-        applyPluginToProjects()
-        project.apply(plugin: 'java')
-
-        then:
-        project.ideaProject.javaVersion == project.sourceCompatibility.toString()
-
-        IdeaModule ideaModuleTask = project.ideaModule
-        ideaModuleTask.sourceDirs == project.sourceSets.main.allSource.sourceTrees.srcDirs.flatten() as Set
-        ideaModuleTask.testSourceDirs == project.sourceSets.test.allSource.sourceTrees.srcDirs.flatten() as Set
-        ideaModuleTask.outputDir == project.sourceSets.main.classesDir
-        ideaModuleTask.testOutputDir == project.sourceSets.test.classesDir
-        def configurations = project.configurations
-        ideaModuleTask.scopes == [
-                COMPILE: [plus: [configurations.compile], minus: []],
-                RUNTIME: [plus: [configurations.runtime], minus: [configurations.compile]],
-                TEST: [plus: [configurations.testRuntime], minus: [configurations.runtime]]
-        ]
-    }
-
-    void assertThatIdeaModuleIsProperlyConfigured(Project project) {
-        IdeaModule ideaModuleTask = project.ideaModule
-        assert ideaModuleTask instanceof IdeaModule
-        assert ideaModuleTask.outputFile == new File(project.projectDir, project.name + ".iml")
-        assert ideaModuleTask.moduleDir == project.projectDir
-        assert ideaModuleTask.sourceDirs == [] as Set
-        assert ideaModuleTask.testSourceDirs == [] as Set
-        assert ideaModuleTask.excludeDirs == [project.buildDir, project.file('.gradle')] as Set
-        assert ideaModuleTask.variables == [:]
-        assertThatCleanIdeaDependsOnDeleteTask(project, project.cleanIdeaModule)
-    }
-
-    void shouldPickUpLateChangesToBuildDir() {
-        when:
-        applyPluginToProjects()
-        project.apply(plugin: 'java')
-        project.buildDir = project.file('target')
-
-        then:
-        project.ideaModule.excludeDirs == [project.buildDir, project.file('.gradle')] as Set
-        project.ideaModule.outputDir == project.file('target/classes/main')
-    }
-
-    void assertThatCleanIdeaDependsOnDeleteTask(Project project, Task dependsOnTask) {
-        assert dependsOnTask instanceof Delete
-        assert project.cleanIdea.taskDependencies.getDependencies(project.cleanIdea).contains(dependsOnTask)
-    }
-
-    def addsCleanIdeaToProjects() {
-        when:
-        applyPluginToProjects()
-
-        then:
-        project.cleanIdea instanceof Task
-        childProject.cleanIdea instanceof Task
-    }
-
-    private def applyPluginToProjects() {
-        ideaPlugin.apply(project)
-        ideaPlugin.apply(childProject)
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleTest.groovy b/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleTest.groovy
deleted file mode 100644
index 05951dd..0000000
--- a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleTest.groovy
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.idea.model
-
-import org.gradle.api.internal.XmlTransformer
-import spock.lang.Specification
-
-/**
- * @author Hans Dockter
- */
-class ModuleTest extends Specification {
-    final PathFactory pathFactory = new PathFactory()
-    final XmlTransformer xmlTransformer = new XmlTransformer()
-    final customSourceFolders = [path('file://$MODULE_DIR$/src')] as LinkedHashSet
-    final customTestSourceFolders = [path('file://$MODULE_DIR$/srcTest')] as LinkedHashSet
-    final customExcludeFolders = [path('file://$MODULE_DIR$/target')] as LinkedHashSet
-    final customDependencies = [
-            new ModuleLibrary([path('file://$MODULE_DIR$/gradle/lib')] as Set,
-                    [path('file://$MODULE_DIR$/gradle/javadoc')] as Set, [path('file://$MODULE_DIR$/gradle/src')] as Set,
-                    [] as Set, null),
-            new ModuleLibrary([path('file://$MODULE_DIR$/ant/lib'), path('jar://$GRADLE_CACHE$/gradle.jar!/')] as Set, [] as Set, [] as Set,
-                    [new JarDirectory(path('file://$MODULE_DIR$/ant/lib'), false)] as Set, "RUNTIME"),
-            new ModuleDependency('someModule', null)]
-
-    Module module = new Module(xmlTransformer, pathFactory)
-
-    def loadFromReader() {
-        when:
-        module.load(customModuleReader)
-
-        then:
-        module.javaVersion == "1.6"
-        module.sourceFolders == customSourceFolders
-        module.testSourceFolders == customTestSourceFolders
-        module.excludeFolders == customExcludeFolders
-        module.outputDir == path('file://$MODULE_DIR$/out')
-        module.testOutputDir == path('file://$MODULE_DIR$/outTest')
-        (module.dependencies as List) == customDependencies
-    }
-
-    def configureMergesValues() {
-        def constructorSourceFolders = [path('a')] as Set
-        def constructorTestSourceFolders = [path('b')] as Set
-        def constructorExcludeFolders = [path('c')] as Set
-        def constructorOutputDir = path('someOut')
-        def constructorJavaVersion = '1.6'
-        def constructorTestOutputDir = path('someTestOut')
-        def constructorModuleDependencies = [
-                customDependencies[0],
-                new ModuleLibrary([path('x')], [], [], [new JarDirectory(path('y'), false)], null)] as LinkedHashSet
-
-        when:
-        module.load(customModuleReader)
-        module.configure(null, constructorSourceFolders, constructorTestSourceFolders, constructorExcludeFolders, constructorOutputDir, constructorTestOutputDir, constructorModuleDependencies, constructorJavaVersion)
-
-        then:
-        module.sourceFolders == customSourceFolders + constructorSourceFolders
-        module.testSourceFolders == customTestSourceFolders + constructorTestSourceFolders
-        module.excludeFolders == customExcludeFolders + constructorExcludeFolders
-        module.outputDir == constructorOutputDir
-        module.testOutputDir == constructorTestOutputDir
-        module.javaVersion == constructorJavaVersion
-        module.dependencies as LinkedHashSet == ((customDependencies as LinkedHashSet) + constructorModuleDependencies as LinkedHashSet) as LinkedHashSet
-    }
-
-    def loadDefaults() {
-        when:
-        module.loadDefaults()
-
-        then:
-        module.javaVersion == Module.INHERITED
-        module.sourceFolders == [] as Set
-        module.dependencies.size() == 0
-    }
-
-    def generatedXmlShouldContainCustomValues() {
-        def constructorSourceFolders = [new Path('a')] as Set
-        def constructorOutputDir = new Path('someOut')
-        def constructorTestOutputDir = new Path('someTestOut')
-
-        when:
-        module.loadDefaults()
-        module.configure(null, constructorSourceFolders, [] as Set, [] as Set, constructorOutputDir, constructorTestOutputDir, [] as Set, null)
-        def xml = toXmlReader
-        def newModule = new Module(xmlTransformer, pathFactory)
-        newModule.load(xml)
-
-        then:
-        this.module == newModule
-    }
-
-    private InputStream getToXmlReader() {
-        ByteArrayOutputStream toXmlText = new ByteArrayOutputStream()
-        module.store(toXmlText)
-        return new ByteArrayInputStream(toXmlText.toByteArray())
-    }
-
-    private InputStream getCustomModuleReader() {
-        return getClass().getResourceAsStream('customModule.xml')
-    }
-
-    private Path path(String url) {
-        pathFactory.path(url)
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/PathFactoryTest.groovy b/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/PathFactoryTest.groovy
deleted file mode 100644
index 4adcc59..0000000
--- a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/PathFactoryTest.groovy
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.plugins.idea.model
-
-import org.gradle.util.TemporaryFolder
-import org.junit.Rule
-import spock.lang.Specification
-import org.gradle.util.TestFile
-
-class PathFactoryTest extends Specification {
-    @Rule TemporaryFolder tmpDir = new TemporaryFolder()
-    final PathFactory factory = new PathFactory()
-
-    def createsPathForAFileUnderARootDir() {
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-        def path = factory.path(tmpDir.file('a', 'b'))
-        path.url == 'file://$ROOT_DIR$/a/b'
-    }
-
-    def createsPathForAFileNotUnderARootDir() {
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-        def file = tmpDir.dir.parentFile.file('a')
-        def relpath = relpath(file)
-
-        expect:
-        def path = factory.path(file)
-        path.url == "file://$relpath"
-    }
-
-    def usesTheClosestAncestorRootDirForAFileUnderMultipleRootDirs() {
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-        factory.addPathVariable('SUB_DIR', tmpDir.file('sub'))
-
-        expect:
-        def path = factory.path(tmpDir.file('sub', 'a'))
-        path.url == 'file://$SUB_DIR$/a'
-    }
-
-    def createsPathForARootDir() {
-        factory.addPathVariable('SUB_DIR', tmpDir.file('sub'))
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-        def path = factory.path(tmpDir.dir)
-        path.url == 'file://$ROOT_DIR$/'
-
-        path = factory.path(tmpDir.file('sub'))
-        path.url == 'file://$SUB_DIR$/'
-    }
-
-    def createsPathForAJarFile() {
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-        def path = factory.path(tmpDir.file('a.jar'))
-        path.url == 'jar://$ROOT_DIR$/a.jar!/'
-    }
-
-    def createsRelativePath() {
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-        def path = factory.relativePath('ROOT_DIR', tmpDir.file('a/b'))
-        path.url == 'file://$ROOT_DIR$/a/b'
-
-        path = factory.relativePath('ROOT_DIR', tmpDir.dir.parentFile.parentFile.file('a/b'))
-        path.url == 'file://$ROOT_DIR$/../../a/b'
-    }
-    
-    def createsPathForAFileUrl() {
-        expect:
-        def path = factory.path('file://a/b/c')
-        path.url == 'file://a/b/c'
-    }
-
-    def createsPathForAJarUrl() {
-        expect:
-        def path = factory.path('jar://a/b/c.jar!/some/entry')
-        path.url == 'jar://a/b/c.jar!/some/entry'
-    }
-
-    def createsPathForAUrlWithUnknownScheme() {
-        expect:
-        def path = factory.path('other:abc')
-        path.url == 'other:abc'
-    }
-
-    def createsPathForAUrlWithPathVariables() {
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-        def path = factory.path('file://$ROOT_DIR$/c')
-        path.url == 'file://$ROOT_DIR$/c'
-    }
-
-    def filePathsAreEqualWhenTheyPointToTheSameFile() {
-        TestFile subDir = tmpDir.file('sub')
-        TestFile childFile = tmpDir.file('sub/a/b')
-
-        factory.addPathVariable('SUB_DIR', subDir)
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-
-        // Using files
-        factory.path(subDir) == factory.path(subDir)
-        factory.path(childFile) == factory.path(childFile)
-        factory.path(childFile) != factory.path(subDir)
-
-        // Using normalised absolute urls
-        factory.path(subDir) == factory.path("file://${relpath(subDir)}")
-        factory.path(subDir) == factory.path("file://${relpath(childFile)}/../..")
-        factory.path("file://${relpath(subDir)}") != factory.path("file://${relpath(childFile)}")
-
-        // Using absolute paths
-        factory.path(subDir) == factory.path("file://${subDir.absolutePath}")
-
-        // Using replacement variables
-        factory.path(childFile) == factory.path('file://$SUB_DIR$/a/b')
-        factory.path(childFile) == factory.path('file://$SUB_DIR$/c/../a/b')
-        factory.path('file://$ROOT_DIR$/sub') == factory.path('file://$SUB_DIR$')
-        factory.path('file://$ROOT_DIR$') != factory.path('file://$SUB_DIR$')
-    }
-
-    def filePathsAreEqualWhenTheyPointToTheSameEntryInTheSameFile() {
-        TestFile subDir = tmpDir.file('sub')
-        TestFile childFile = tmpDir.file('sub/a/b.jar')
-
-        factory.addPathVariable('SUB_DIR', subDir)
-        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
-
-        expect:
-
-        // Using files
-        factory.path(childFile) == factory.path(childFile)
-        factory.path(childFile) != factory.path(subDir)
-
-        // Using normalised absolute urls
-        factory.path(childFile) == factory.path("jar://${relpath(childFile)}!/")
-        factory.path("jar://${relpath(childFile)}!/entry") == factory.path("jar://${relpath(childFile)}!/entry")
-        factory.path(childFile) != factory.path("jar://${relpath(childFile)}!/entry")
-
-        // Using replacement variables
-        factory.path(childFile) == factory.path('jar://$SUB_DIR$/a/b.jar!/')
-        factory.path(childFile) == factory.path('jar://$SUB_DIR$/c/../a/b.jar!/')
-
-        factory.path(childFile) != factory.path('jar://$SUB_DIR$/a/b.jar')
-        factory.path(childFile) != factory.path("file://${relpath(childFile)}")
-    }
-
-    private String relpath(File file) {
-        return file.absolutePath.replace(File.separator, '/')
-    }
-
-}
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPlugin.java b/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPlugin.java
deleted file mode 100644
index e7a2bd8..0000000
--- a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPlugin.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.jetty;
-
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.Project;
-import org.gradle.api.internal.IConventionAware;
-import org.gradle.api.plugins.*;
-import org.gradle.api.tasks.ConventionValue;
-import org.gradle.api.tasks.SourceSet;
-import org.gradle.api.tasks.bundling.War;
-
-import java.io.File;
-
-/**
- * <p>A {@link Plugin} which extends the {@link WarPlugin} to add tasks which run the web application using an embedded
- * Jetty web container.</p>
- *
- * @author Hans Dockter
- */
-public class JettyPlugin implements Plugin<Project> {
-    public static final String JETTY_RUN = "jettyRun";
-    public static final String JETTY_RUN_WAR = "jettyRunWar";
-    public static final String JETTY_STOP = "jettyStop";
-
-    public static final String RELOAD_AUTOMATIC = "automatic";
-    public static final String RELOAD_MANUAL = "manual";
-
-    public void apply(Project project) {
-        project.getPlugins().apply(WarPlugin.class);
-        JettyPluginConvention jettyConvention = new JettyPluginConvention();
-        Convention convention = project.getConvention();
-        convention.getPlugins().put("jetty", jettyConvention);
-
-        configureMappingRules(project, jettyConvention);
-        configureJettyRun(project);
-        configureJettyRunWar(project);
-        configureJettyStop(project, jettyConvention);
-    }
-
-    private void configureMappingRules(final Project project, final JettyPluginConvention jettyConvention) {
-        project.getTasks().withType(AbstractJettyRunTask.class).whenTaskAdded(new Action<AbstractJettyRunTask>() {
-            public void execute(AbstractJettyRunTask abstractJettyRunTask) {
-                configureAbstractJettyTask(project, jettyConvention, abstractJettyRunTask);
-            }
-        });
-    }
-
-    private void configureJettyRunWar(final Project project) {
-        project.getTasks().withType(JettyRunWar.class).whenTaskAdded(new Action<JettyRunWar>() {
-            public void execute(JettyRunWar jettyRunWar) {
-                jettyRunWar.dependsOn(WarPlugin.WAR_TASK_NAME);
-                jettyRunWar.getConventionMapping().map("webApp", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return ((War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME)).getArchivePath();
-                    }
-                });
-            }
-        });
-
-        JettyRunWar jettyRunWar = project.getTasks().add(JETTY_RUN_WAR, JettyRunWar.class);
-        jettyRunWar.setDescription("Assembles the webapp into a war and deploys it to Jetty.");
-        jettyRunWar.setGroup(WarPlugin.WEB_APP_GROUP);
-    }
-
-    private void configureJettyStop(Project project, final JettyPluginConvention jettyConvention) {
-        JettyStop jettyStop = project.getTasks().add(JETTY_STOP, JettyStop.class);
-        jettyStop.setDescription("Stops Jetty.");
-        jettyStop.setGroup(WarPlugin.WEB_APP_GROUP);
-        jettyStop.getConventionMapping().map("stopPort", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return jettyConvention.getStopPort();
-            }
-        });
-        jettyStop.getConventionMapping().map("stopKey", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return jettyConvention.getStopKey();
-            }
-        });
-    }
-
-    private void configureJettyRun(final Project project) {
-        project.getTasks().withType(JettyRun.class).whenTaskAdded(new Action<JettyRun>() {
-            public void execute(JettyRun jettyRun) {
-                jettyRun.getConventionMapping().map("webXml", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return getWebXml(project);
-                    }
-                });
-                jettyRun.getConventionMapping().map("classpath", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return getJavaConvention(project).getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
-                    }
-                });
-                jettyRun.getConventionMapping().map("webAppSourceDirectory", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return getWarConvention(project).getWebAppDir();
-                    }
-                });
-            }
-        });
-
-        JettyRun jettyRun = project.getTasks().add(JETTY_RUN, JettyRun.class);
-        jettyRun.setDescription("Uses your files as and where they are and deploys them to Jetty.");
-        jettyRun.setGroup(WarPlugin.WEB_APP_GROUP);
-    }
-
-    private Object getWebXml(Project project) {
-        War war = (War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME);
-        File webXml;
-        if (war.getWebXml() != null) {
-            webXml = war.getWebXml();
-        } else {
-            webXml = new File(getWarConvention(project).getWebAppDir(), "WEB-INF/web.xml");
-        }
-        return webXml;
-    }
-
-    private void configureAbstractJettyTask(final Project project, final JettyPluginConvention jettyConvention, AbstractJettyRunTask jettyTask) {
-        jettyTask.setDaemon(false);
-        jettyTask.setReload(RELOAD_AUTOMATIC);
-        jettyTask.setScanIntervalSeconds(0);
-        jettyTask.getConventionMapping().map("contextPath", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return ((War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME)).getBaseName();
-            }
-        });
-        jettyTask.getConventionMapping().map("httpPort", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return jettyConvention.getHttpPort();
-            }
-        });
-        jettyTask.getConventionMapping().map("stopPort", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return jettyConvention.getStopPort();
-            }
-        });
-        jettyTask.getConventionMapping().map("stopKey", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return jettyConvention.getStopKey();
-            }
-        });
-    }
-
-    public JavaPluginConvention getJavaConvention(Project project) {
-        return project.getConvention().getPlugin(JavaPluginConvention.class);
-    }
-
-    public WarPluginConvention getWarConvention(Project project) {
-        return project.getConvention().getPlugin(WarPluginConvention.class);
-    }
-}
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRunWar.java b/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRunWar.java
deleted file mode 100644
index 6a21177..0000000
--- a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRunWar.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins.jetty;
-
-import org.gradle.api.plugins.jetty.internal.Jetty6PluginServer;
-import org.mortbay.util.Scanner;
-import org.mortbay.xml.XmlConfiguration;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.gradle.api.tasks.InputFile;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * <p>Deploys a WAR to an embedded Jetty web container.</p>
- *
- * <p> Once started, the web container can be configured to run continuously, scanning for changes to the war file and
- * automatically performing a hot redeploy when necessary. </p>
- */
-public class JettyRunWar extends AbstractJettyRunTask {
-    private static Logger logger = LoggerFactory.getLogger(JettyRunWar.class);
-
-    /**
-     * The location of the war file.
-     */
-    private File webApp;
-
-    public void configureWebApplication() throws Exception {
-        super.configureWebApplication();
-
-        getWebAppConfig().setWar(getWebApp().getCanonicalPath());
-        getWebAppConfig().configure();
-    }
-
-
-    public void validateConfiguration() {
-    }
-
-    /* (non-Javadoc)
-    * @see org.mortbay.jetty.plugin.util.AbstractJettyTask#configureScanner()
-    */
-    public void configureScanner() {
-        List<File> scanList = new ArrayList<File>();
-        scanList.add(getProject().getBuildFile());
-        scanList.add(getWebApp());
-        getScanner().setScanDirs(scanList);
-
-        ArrayList listeners = new ArrayList();
-        listeners.add(new Scanner.BulkListener() {
-            public void filesChanged(List changes) {
-                try {
-                    boolean reconfigure = changes.contains(getProject().getBuildFile().getCanonicalPath());
-                    restartWebApp(reconfigure);
-                }
-                catch (Exception e) {
-                    logger.error("Error reconfiguring/restarting webapp after change in watched files", e);
-                }
-            }
-        });
-        setScannerListeners(listeners);
-    }
-
-    public void restartWebApp(boolean reconfigureScanner) throws Exception {
-        logger.info("Restarting webapp ...");
-        logger.debug("Stopping webapp ...");
-        getWebAppConfig().stop();
-        logger.debug("Reconfiguring webapp ...");
-
-        validateConfiguration();
-
-        // check if we need to reconfigure the scanner
-        if (reconfigureScanner) {
-            logger.info("Reconfiguring scanner ...");
-            List<File> scanList = new ArrayList<File>();
-            scanList.add(getProject().getBuildFile());
-            scanList.add(getWebApp());
-            getScanner().setScanDirs(scanList);
-        }
-
-        logger.debug("Restarting webapp ...");
-        getWebAppConfig().start();
-        logger.info("Restart completed.");
-    }
-
-
-    public void finishConfigurationBeforeStart() {
-    }
-
-    /**
-     * Returns the web application to deploy.
-     */
-    @InputFile
-    public File getWebApp() {
-        return webApp;
-    }
-
-    public void setWebApp(File webApp) {
-        this.webApp = webApp;
-    }
-
-    public void applyJettyXml() throws Exception {
-
-        if (getJettyConfig() == null) {
-            return;
-        }
-
-        logger.info("Configuring Jetty from xml configuration file = {}", getJettyConfig());
-        XmlConfiguration xmlConfiguration = new XmlConfiguration(getJettyConfig().toURI().toURL());
-        xmlConfiguration.configure(getServer().getProxiedObject());
-    }
-
-    public org.gradle.api.plugins.jetty.internal.JettyPluginServer createServer() throws Exception {
-        return new Jetty6PluginServer();
-    }
-}
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/ScanTargetPattern.java b/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/ScanTargetPattern.java
deleted file mode 100644
index a3b5286..0000000
--- a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/ScanTargetPattern.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins.jetty;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * Patterns for scanning for file changes.
- */
-public class ScanTargetPattern
-{
-    private File directory;
-    private List includes = Collections.EMPTY_LIST;
-    private List excludes = Collections.EMPTY_LIST;
-
-    public File getDirectory()
-    {
-        return directory;
-    }
-
-    public void setDirectory(File directory)
-    {
-        this.directory = directory;
-    }
-    
-    public void setIncludes (List includes)
-    {
-        this.includes = includes;
-    }
-    
-    public void setExcludes(List excludes)
-    {
-        this.excludes = excludes;
-    }
-    
-    public List getIncludes()
-    {
-        return includes;
-    }
-    
-    public List getExcludes()
-    {
-        return excludes;
-    }
-
-}
diff --git a/subprojects/gradle-maven/src/main/groovy/org/gradle/api/plugins/MavenPlugin.java b/subprojects/gradle-maven/src/main/groovy/org/gradle/api/plugins/MavenPlugin.java
deleted file mode 100644
index d17fd92..0000000
--- a/subprojects/gradle-maven/src/main/groovy/org/gradle/api/plugins/MavenPlugin.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins;
-
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.Project;
-import org.gradle.api.artifacts.Configuration;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.ResolverContainer;
-import org.gradle.api.artifacts.dsl.RepositoryHandler;
-import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer;
-import org.gradle.api.internal.IConventionAware;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.tasks.ConventionValue;
-import org.gradle.api.tasks.Upload;
-import org.gradle.util.GUtil;
-import org.gradle.util.WrapUtil;
-
-import java.util.Map;
-
-/**
- * <p>A {@link org.gradle.api.Plugin} which allows project artifacts to be deployed to a Maven repository, or installed
- * to the local Maven cache.</p>
- *
- * @author Hans Dockter
- */
-public class MavenPlugin implements Plugin<Project> {
-    public static final int COMPILE_PRIORITY = 300;
-    public static final int RUNTIME_PRIORITY = 200;
-    public static final int TEST_COMPILE_PRIORITY = 150;
-    public static final int TEST_RUNTIME_PRIORITY = 100;
-
-    public static final int PROVIDED_COMPILE_PRIORITY = COMPILE_PRIORITY + 100;
-    public static final int PROVIDED_RUNTIME_PRIORITY = COMPILE_PRIORITY + 150;
-
-    public static final String INSTALL_TASK_NAME = "install";
-
-    public void apply(final Project project) {
-        setConventionMapping(project);
-        addConventionObject(project);
-        PluginContainer plugins = project.getPlugins();
-        plugins.withType(JavaPlugin.class).allPlugins(new Action<JavaPlugin>() {
-            public void execute(JavaPlugin javaPlugin) {
-                configureJavaScopeMappings(project.getRepositories(), project.getConfigurations());
-                configureInstall(project);
-            }
-        });
-        plugins.withType(WarPlugin.class).allPlugins(new Action<WarPlugin>() {
-            public void execute(WarPlugin warPlugin) {
-                configureWarScopeMappings(project.getRepositories(), project.getConfigurations());
-            }
-        });
-    }
-
-    private void setConventionMapping(final Project project) {
-        Map mapping = GUtil.map(
-                "mavenPomDir", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return convention.getPlugin(MavenPluginConvention.class).getPomDir();
-                    }
-                },
-                "configurationContainer", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return project.getConfigurations();
-                    }
-                },
-                "fileResolver", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return ((ProjectInternal) project).getFileResolver();
-                    }
-                },
-                "mavenScopeMappings", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return convention.getPlugin(MavenPluginConvention.class).getConf2ScopeMappings();
-                    }
-                });
-        ((IConventionAware) project.getRepositories()).getConventionMapping().map(mapping);
-    }
-
-    private void addConventionObject(Project project) {
-        MavenPluginConvention mavenConvention = new MavenPluginConvention((ProjectInternal) project);
-        Convention convention = project.getConvention();
-        convention.getPlugins().put("maven", mavenConvention);
-    }
-
-    private void configureJavaScopeMappings(ResolverContainer resolverFactory, ConfigurationContainer configurations) {
-        resolverFactory.getMavenScopeMappings().addMapping(COMPILE_PRIORITY, configurations.getByName(JavaPlugin.COMPILE_CONFIGURATION_NAME),
-                Conf2ScopeMappingContainer.COMPILE);
-        resolverFactory.getMavenScopeMappings().addMapping(RUNTIME_PRIORITY, configurations.getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME),
-                Conf2ScopeMappingContainer.RUNTIME);
-        resolverFactory.getMavenScopeMappings().addMapping(TEST_COMPILE_PRIORITY, configurations.getByName(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME),
-                Conf2ScopeMappingContainer.TEST);
-        resolverFactory.getMavenScopeMappings().addMapping(TEST_RUNTIME_PRIORITY, configurations.getByName(JavaPlugin.TEST_RUNTIME_CONFIGURATION_NAME),
-                Conf2ScopeMappingContainer.TEST);
-    }
-
-    private void configureWarScopeMappings(ResolverContainer resolverContainer, ConfigurationContainer configurations) {
-        resolverContainer.getMavenScopeMappings().addMapping(PROVIDED_COMPILE_PRIORITY, configurations.getByName(WarPlugin.PROVIDED_COMPILE_CONFIGURATION_NAME),
-                Conf2ScopeMappingContainer.PROVIDED);
-        resolverContainer.getMavenScopeMappings().addMapping(PROVIDED_RUNTIME_PRIORITY, configurations.getByName(WarPlugin.PROVIDED_RUNTIME_CONFIGURATION_NAME),
-                Conf2ScopeMappingContainer.PROVIDED);
-    }
-
-    private void configureInstall(Project project) {
-        Upload installUpload = project.getTasks().add(INSTALL_TASK_NAME, Upload.class);
-        Configuration configuration = project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION);
-        installUpload.dependsOn(configuration.getBuildArtifacts());
-        installUpload.setConfiguration(configuration);
-        installUpload.getRepositories().mavenInstaller(WrapUtil.toMap("name", RepositoryHandler.DEFAULT_MAVEN_INSTALLER_NAME));
-        installUpload.setDescription("Does a maven install of the archives artifacts into the local .m2 cache.");
-    }
-}
diff --git a/subprojects/gradle-maven/src/test/groovy/org/gradle/api/plugins/MavenPluginConventionTest.groovy b/subprojects/gradle-maven/src/test/groovy/org/gradle/api/plugins/MavenPluginConventionTest.groovy
deleted file mode 100644
index 27f529d..0000000
--- a/subprojects/gradle-maven/src/test/groovy/org/gradle/api/plugins/MavenPluginConventionTest.groovy
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins
-
-import org.gradle.api.internal.artifacts.publish.maven.DefaultMavenPom
-import org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer
-import org.gradle.api.internal.project.DefaultProject
-import org.gradle.util.HelperUtil
-import spock.lang.Specification
-
-/**
- * @author Hans Dockter
- */
-class MavenPluginConventionTest extends Specification {
-    DefaultProject project = HelperUtil.createRootProject()
-    MavenPluginConvention mavenPluginConvention = new MavenPluginConvention(project)
-
-    def pomShouldCreateMavenPom() {
-        mavenPluginConvention.conf2ScopeMappings = new DefaultConf2ScopeMappingContainer();
-        project.group = 'someGroup'
-        project.version = '1.0'
-        DefaultMavenPom mavenPom = mavenPluginConvention.pom()
-
-        expect:
-        !mavenPluginConvention.conf2ScopeMappings.is(mavenPom.scopeMappings)
-        mavenPluginConvention.conf2ScopeMappings == mavenPom.scopeMappings
-        mavenPom.mavenProject != null
-        mavenPom.pomDependenciesConverter != null
-        mavenPom.configurations.is(project.getConfigurations())
-        mavenPom.fileResolver = project.fileResolver
-        mavenPom.groupId == project.group
-        mavenPom.artifactId == project.name
-        mavenPom.version == project.version
-    }
-
-    def pomShouldCreateAndConfigureMavenPom() {
-        mavenPluginConvention.conf2ScopeMappings = new DefaultConf2ScopeMappingContainer();
-        DefaultMavenPom mavenPom = mavenPluginConvention.pom {
-            project {
-                inceptionYear '1999'
-            }
-        }
-
-        expect:
-        mavenPom.mavenProject.inceptionYear = '1999'
-
-    }
-}
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest.groovy b/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest.groovy
deleted file mode 100644
index cc31bfe..0000000
--- a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest.groovy
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.openapi
-
-import org.gradle.api.internal.AbstractClassPathProvider
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.BasicGradleDistribution
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.util.Jvm
-import org.junit.Assert
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.slf4j.Logger
-import org.slf4j.LoggerFactory
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class CrossVersionCompatibilityIntegrationTest {
-    private final Logger logger = LoggerFactory.getLogger(CrossVersionCompatibilityIntegrationTest)
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final TestResources resources = new TestResources()
-
-    private final BasicGradleDistribution gradle09rc1 = dist.previousVersion('0.9-rc-1')
-    private final BasicGradleDistribution gradle09rc2 = dist.previousVersion('0.9-rc-2')
-    private final BasicGradleDistribution gradle09rc3 = dist.previousVersion('0.9-rc-3')
-    private final BasicGradleDistribution gradle09 = dist.previousVersion('0.9')
-
-    @Test
-    public void canUseOpenApiFromCurrentVersionToBuildUsingAnOlderVersion() {
-        [gradle09rc1, gradle09rc2, gradle09rc3, gradle09].each {
-            checkCanBuildUsing(dist, it)
-        }
-    }
-
-    @Test
-    public void canUseOpenApiFromOlderVersionToBuildUsingCurrentVersion() {
-        [gradle09rc1, gradle09rc2, gradle09rc3, gradle09].each {
-            checkCanBuildUsing(it, dist)
-        }
-    }
-
-    def checkCanBuildUsing(BasicGradleDistribution openApiVersion, BasicGradleDistribution buildVersion) {
-        try {
-            if (!buildVersion.worksWith(Jvm.current())) {
-                System.out.println("skipping $buildVersion as it does not work with ${Jvm.current()}.")
-                return
-            }
-            if (!openApiVersion.worksWith(Jvm.current())) {
-                System.out.println("skipping $openApiVersion as it does not work with ${Jvm.current()}.")
-                return
-            }
-            def testClasses = AbstractClassPathProvider.getClasspathForClass(CrossVersionBuilder.class)
-            def junitJar = AbstractClassPathProvider.getClasspathForClass(Assert.class)
-            def classpath = [testClasses, junitJar] + openApiVersion.gradleHomeDir.file('lib').listFiles().findAll { it.name =~ /gradle-open-api.*\.jar/ }
-            logger.info('Using Open API classpath {}', classpath)
-            def classloader = new URLClassLoader(classpath.collect { it.toURI().toURL() } as URL[], ClassLoader.systemClassLoader.parent)
-            def builder = classloader.loadClass(CrossVersionBuilder.class.name).newInstance()
-            builder.targetGradleHomeDir = buildVersion.gradleHomeDir
-            builder.currentDir = dist.testDir
-            builder.version = buildVersion.version
-            builder.build()
-        } catch (Throwable throwable) {
-            throw new RuntimeException("Failed to build using $buildVersion via the open API of $openApiVersion", throwable)
-        }
-    }
-}
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/GradleRunnerTest.groovy b/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/GradleRunnerTest.groovy
deleted file mode 100644
index d291f1b..0000000
--- a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/GradleRunnerTest.groovy
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.openapi
-
-import junit.framework.AssertionFailedError
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.openapi.external.runner.GradleRunnerFactory
-import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1
-import org.gradle.openapi.external.runner.GradleRunnerVersion1
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-
- at RunWith(DistributionIntegrationTestRunner.class)
-class GradleRunnerTest {
-
-  static final String JAVA_PROJECT_NAME = 'javaproject'
-  static final String SHARED_NAME = 'shared'
-  static final String API_NAME = 'api'
-  static final String WEBAPP_NAME = 'webservice'
-  static final String SERVICES_NAME = 'services'
-  static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
-
-  private File javaprojectDir
-
-  @Rule public final GradleDistribution dist = new GradleDistribution()
-  @Rule public final TestResources resources = new TestResources('testproject')
-
-  @Before
-  void setUp() {
-      javaprojectDir = dist.testDir
-  }
-
-  /**
-   * We just want to make sure we can instantiate a GradleRunner here. That's all
-  */
-  @Test
-  public void testInstantiation()
-  {
-    TestGradleRunnerInteractionVersion1 interaction = new TestGradleRunnerInteractionVersion1(javaprojectDir)
-
-    GradleRunnerVersion1 runner = GradleRunnerFactory.createGradleRunner(getClass().getClassLoader(), dist.getGradleHomeDir(), interaction, true)
-
-    Assert.assertNotNull( "Failed to instantiate runner", runner )
-  }
-
-  /**
-   * This does a basic execution. It also checks to make sure that the notifications were fired
-   * correctly.
-  */
-  @Test
-  public void testExecution()
-  {
-    TestGradleRunnerInteractionVersion1 interaction = new TestGradleRunnerInteractionVersion1( javaprojectDir )
-
-    GradleRunnerVersion1 runner = GradleRunnerFactory.createGradleRunner(getClass().getClassLoader(), dist.getGradleHomeDir(), interaction, true)
-
-    Assert.assertNotNull( "Failed to instantiate runner", runner )
-
-    runner.executeCommand( "clean build" )
-
-        //wait for it to complete
-    int totalWaitTime = 0;
-    int maximumWaitTime = 80
-    while ( !interaction.executionFinished && totalWaitTime <= maximumWaitTime ) {
-        try {
-            Thread.sleep(1000);
-        }
-        catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        totalWaitTime += 1;
-    }
-
-    if( totalWaitTime > maximumWaitTime ) {
-      throw new AssertionFailedError( "Waited " + totalWaitTime + " seconds and failed to finish executing command. This is taking too long, so assuming something is wrong.\nCurrent project directory: '" + interaction.getWorkingDirectory() + "'\nOutput:\n" + interaction.output.toString() )
-    }
-
-    //now make sure we were notified of things correctly:
-
-    //it should have fired a message that execution has started
-    Assert.assertTrue( "Execution did not report started", interaction.executionStarted )
-    
-    //it should have finished
-    Assert.assertTrue( "Execution did not report finished", interaction.executionFinished )
-
-    //it should have been successful
-    Assert.assertTrue( "Did not execute command successfully", interaction.wasSuccessful )
-
-    //we should have output
-    Assert.assertTrue( "Missing output", interaction.output.length() > 0 )
-
-    //we should have a message when we finished (basically the full output)
-    Assert.assertTrue( "Missing finish message", interaction.finishMessage != null )
-
-    //there should have been multiple tasks to execute
-    Assert.assertTrue( "Not enough tasks executed. Expected multiple. Found " + interaction.numberOfTasksToExecute, interaction.numberOfTasksToExecute > 1 )
-
-    //we should have been notified that tasks started and completed (we're not interested in tracking how many times or specific tasks as that might change too often with releases of gradle.
-    Assert.assertTrue( "No tasks reported started", interaction.taskStarted )
-    Assert.assertTrue( "No tasks reported completed", interaction.taskCompleted )
-  }
-
-  /**
-   * This tests killing a task. We'll start a build task then kill it after it starts executing.
-   * Note: the kill interaction actually kills execution. It waits for a certain number of tasks
-   * to be executed.
-  */
-  @Test
-  public void testKill()
-  {
-    KillTestInteraction interaction = new KillTestInteraction(javaprojectDir)
-
-    GradleRunnerVersion1 runner = GradleRunnerFactory.createGradleRunner(getClass().getClassLoader(), dist.getGradleHomeDir(), interaction, true)
-
-    interaction.runner = runner
-
-    Assert.assertNotNull( "Failed to instantiate runner", runner )
-
-    runner.executeCommand( "build" )
-
-        //wait for it to complete
-    int totalWaitTime = 0;
-    int maximumWaitTime = 80
-    while ( !interaction.executionFinished && totalWaitTime <= maximumWaitTime ) {
-        try {
-            Thread.sleep(1000);
-        }
-        catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-
-        totalWaitTime += 1;
-    }
-
-    if( totalWaitTime > maximumWaitTime ) {
-      throw new AssertionFailedError( "Waited " + totalWaitTime + " seconds and failed to finish executing command. This is taking too long, so assuming something is wrong.\nCurrent project directory: '" + interaction.getWorkingDirectory() + "'\nOutput:\n" + interaction.output.toString() )
-    }
-
-    //make sure we tried to kill the task
-    Assert.assertTrue( "Did not attempt to kill execution", interaction.killedTask )
-
-    //now make sure we were notified of things correctly:
-
-    //it should NOT have been successful
-    Assert.assertFalse( "Erroneously executed successfully (was not killed)", interaction.wasSuccessful )
-
-    //it should have fired a message that execution has started
-    Assert.assertTrue( "Execution did not report started", interaction.executionStarted )
-
-    //it should have finished
-    Assert.assertTrue( "Execution did not report finished", interaction.executionFinished )
-  }
-}
-
-  //Inner class used to track what has been called
-  public class TestGradleRunnerInteractionVersion1 implements GradleRunnerInteractionVersion1
-  {
-    private File workingDirectory
-    private StringBuilder output = new StringBuilder()
-    private String finishMessage
-    boolean wasSuccessful
-    boolean executionStarted
-    int numberOfTasksToExecute
-    boolean executionFinished
-    boolean taskCompleted
-    boolean taskStarted
-
-
-    public TestGradleRunnerInteractionVersion1(File workingDirectory) {
-      this.workingDirectory = workingDirectory;
-    }
-
-    def TestGradleRunnerInteractionVersion1() {
-    }
-
-    File getWorkingDirectory() { return workingDirectory }
-
-    GradleRunnerInteractionVersion1.LogLevel getLogLevel() { return GradleRunnerInteractionVersion1.LogLevel.Lifecycle }
-
-    GradleRunnerInteractionVersion1.StackTraceLevel getStackTraceLevel() { return GradleRunnerInteractionVersion1.StackTraceLevel.InternalExceptions }
-
-    void reportExecutionStarted() { executionStarted = true }
-    void reportNumberOfTasksToExecute(int size) { numberOfTasksToExecute = size }
-
-    //both of these will be fired often. We're not going to try to track that.
-    void reportTaskStarted(String currentTaskName, float percentComplete) { taskStarted = true; }
-    void reportTaskComplete(String currentTaskName, float percentComplete) { taskCompleted = true }
-
-    void reportLiveOutput(String output) { this.output.append( output ) }
-
-    void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
-      this.executionFinished = true;
-      this.wasSuccessful = wasSuccessful
-      this.finishMessage = message;
-    }
-
-    File getCustomGradleExecutable() { return null; }
-  }
-
-
-  //class to track that has class was started and then kills it. 
-  private class KillTestInteraction implements GradleRunnerInteractionVersion1
-  {
-    private GradleRunnerVersion1 runner
-    int tasks = 0
-    boolean killedTask
-
-    //after at least 2 tasks start, try to kill the process. This simulates someone killing it while
-    //its in the middle of running
-    def void reportTaskStarted(String currentTaskName, float percentComplete) {
-      tasks++
-      if( tasks == 2 ) {
-        killedTask = true
-        runner.killProcess();
-      }
-    }
-    private File workingDirectory
-    boolean wasSuccessful
-    boolean executionStarted
-    boolean executionFinished
-
-    public KillTestInteraction(File workingDirectory) {
-      this.workingDirectory = workingDirectory;
-    }
-
-    File getWorkingDirectory() { return workingDirectory }
-
-    GradleRunnerInteractionVersion1.LogLevel getLogLevel() { return GradleRunnerInteractionVersion1.LogLevel.Lifecycle }
-
-    GradleRunnerInteractionVersion1.StackTraceLevel getStackTraceLevel() { return GradleRunnerInteractionVersion1.StackTraceLevel.InternalExceptions }
-
-    void reportExecutionStarted() { executionStarted = true }
-    void reportNumberOfTasksToExecute(int size) { }
-
-    void reportTaskComplete(String currentTaskName, float percentComplete) {}
-    void reportLiveOutput(String output) {}
-    File getCustomGradleExecutable() { return null; }
-
-    void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
-      this.executionFinished = true;
-      this.wasSuccessful = wasSuccessful
-    }
-  }
\ No newline at end of file
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiUiTest.groovy b/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiUiTest.groovy
deleted file mode 100644
index 6b6772b..0000000
--- a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiUiTest.groovy
+++ /dev/null
@@ -1,986 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.openapi
-
-import java.awt.Component
-import java.awt.event.HierarchyEvent
-import java.awt.event.HierarchyListener
-import java.util.concurrent.TimeUnit
-import javax.swing.JFrame
-import javax.swing.JLabel
-import junit.framework.AssertionFailedError
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.openapi.external.ExternalUtility
-import org.gradle.openapi.external.foundation.GradleInterfaceVersion2
-import org.gradle.openapi.external.foundation.ProjectVersion1
-import org.gradle.openapi.external.foundation.RequestVersion1
-import org.gradle.openapi.external.foundation.TaskVersion1
-import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1
-import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1
-import org.gradle.util.OperatingSystem
-import org.junit.Assert
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import org.gradle.openapi.external.ui.*
-import static org.hamcrest.Matchers.*
-
-/**
- * This tests numerous aspects of the Open API UI. This is how the Idea plugin extracts the UI from
- * Gradle.
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-public class OpenApiUiTest {
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final TestResources resources = new TestResources('testproject')
-    @Rule public final OpenApiFixture openApi = new OpenApiFixture()
-
-    /**
-     This tests to see if we can call the UIFactory to create a single pane UI.
-     This is only testing that extracting the UI returns something without giving
-     errors and that it has a component. This is just a good general-case test
-     to make sure the basics are working.
-     */
-    @Test
-    public void testSinglePaneBasic() {
-        SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-
-        //make sure we got something
-        Assert.assertNotNull(singlePane)
-
-        //tell it we're about to show it, so it'll create a component
-        singlePane.aboutToShow();
-
-        //make sure we now have that component
-        Assert.assertNotNull(singlePane.getComponent())
-    }
-
-  /**
-   * This tests to see if we can call the UIFactory to create a dual pane UI.
-      This is only testing that extracting the UI returns something without giving
-      errors and that it has its dual components. This is just a good general-case test
-      to make sure the basics are working.
-   */
-    @Test
-    public void testDualPaneBasic()
-    {
-        DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-
-        //make sure we got something
-        Assert.assertNotNull( dualPane )
-
-        //tell it we're about to show it, so it'll create a component
-        dualPane.aboutToShow();
-
-        //make sure we now have the main component
-        Assert.assertNotNull( dualPane.getMainComponent() )
-
-        //and the output component
-        Assert.assertNotNull( dualPane.getOutputPanel() )
-    }
-
-    /**
-    * This verifies that favorites are working for some basics. We're going to test this with both
-     * the single and dual pane UIs (they actually use the same editor then for other tests we'll
-     * assume they're same).
-    */
-    @Test
-    public void testFavoritesBasic()
-    {
-      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-      checkFavoritesBasic( singlePane )
-
-      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-      checkFavoritesBasic( dualPane )
-    }
-
-    /**
-    * This verifies that we favorites are basically working based on the given UI. We're going to add one, then
-    * do some 'gets' to find the just-added favorite.
-    */
-    private void checkFavoritesBasic( BasicGradleUIVersion1 basicGradleUI )
-    {
-      FavoritesEditorVersion1 editor = basicGradleUI.getFavoritesEditor()
-
-      //there should be no favorites as of yet
-      Assert.assertTrue( editor.getFavoriteTasks().isEmpty() )
-
-      //add one (doesn't really matter what it is)
-      def fullCommandLine = "-t -S"
-      def displayName = "Task List With Stack trace"
-      FavoriteTaskVersion1 favorite = editor.addFavorite( fullCommandLine, displayName, true )
-
-      //make sure something was added
-      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
-
-      //get the newly-added favorite by command line.
-      FavoriteTaskVersion1 matchingFavorite1 = editor.getFavorite( fullCommandLine )
-      Assert.assertEquals( favorite, matchingFavorite1 )
-
-      //get the newly-added favorite by displayName.
-      FavoriteTaskVersion1 matchingFavorite2 = editor.getFavoriteByDisplayName( displayName )
-      Assert.assertEquals( favorite, matchingFavorite2 )
-
-      Assert.assertTrue( matchingFavorite2.alwaysShowOutput() )
-    }
-
-    /**
-    * This verifies that we can edit favorites. We're going to add a favorite then edit its
-     * command line, display name, and 'show output' setting.
-    */
-    @Test
-    public void testEditingFavorites()
-    {
-      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-      FavoritesEditorVersion1 editor = singlePane.getFavoritesEditor()
-
-      def originalFullCommandLine = "-t -S"
-      def originalDisplayName = "Task List With Stack trace"
-      FavoriteTaskVersion1 addedFavorite = editor.addFavorite(originalFullCommandLine, originalDisplayName, true)
-
-      //make sure we can find the just-added favorite
-      Assert.assertNotNull( editor.getFavorite( originalFullCommandLine ) )
-      Assert.assertNotNull( editor.getFavoriteByDisplayName( originalDisplayName ) )
-
-      String newFullCommandLine = "-t -S -d"
-      String newDisplayName = "new task list"
-      String error = editor.editFavorite( addedFavorite, newFullCommandLine, newDisplayName, false )
-      Assert.assertNull( error )  //we should get no error
-
-      //now we shouldn't be able to find the favorite using the original values. This is part of verifying the values were in fact changed.
-      Assert.assertNull( editor.getFavorite( originalFullCommandLine ) )
-      Assert.assertNull( editor.getFavoriteByDisplayName( originalDisplayName ) )
-
-      //make sure we can find it using the new values. This is part of verifying the values were in fact changed.
-      Assert.assertNotNull( editor.getFavorite( newFullCommandLine ) )
-      Assert.assertNotNull( editor.getFavoriteByDisplayName( newDisplayName ) )
-
-      //there should just be 1 favorite
-      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
-    }
-
-    /**
-    * This verifies that we can remove favorites. We're going to add some favorites then remove them
-     * verifying that they've gone.
-    */
-    @Test
-    public void testRemovingFavorites()
-    {
-      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-      FavoritesEditorVersion1 editor = singlePane.getFavoritesEditor()
-
-      //there should be no favorites as of yet
-      Assert.assertTrue( editor.getFavoriteTasks().isEmpty() )
-
-      //add one (doesn't really matter what it is)
-      String command1 = "build"
-      FavoriteTaskVersion1 favorite1 = editor.addFavorite( command1, command1, true )
-
-      //make sure it was added
-      Assert.assertNotNull( editor.getFavorite( command1 ) )
-      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
-
-      //add another one
-      String command2 = "build -xtest"
-      FavoriteTaskVersion1 favorite2 = editor.addFavorite( command2, command2, true )
-
-      //make sure it was added
-      Assert.assertNotNull( editor.getFavorite( command2 ) )
-      Assert.assertEquals( 2, editor.getFavoriteTasks().size() )
-
-      String command3 = "clean"
-      FavoriteTaskVersion1 favorite3 = editor.addFavorite( command3, command3, true )
-
-      //make sure it was added
-      Assert.assertNotNull( editor.getFavorite( command3 ) )
-      Assert.assertEquals( 3, editor.getFavoriteTasks().size() )
-
-      String command4 = "docs"
-      FavoriteTaskVersion1 favorite4 = editor.addFavorite( command4, command4, true )
-
-      //make sure it was added
-      Assert.assertNotNull( editor.getFavorite( command4 ) )
-      Assert.assertEquals( 4, editor.getFavoriteTasks().size() )
-
-      //now remove one of them
-      List removed1 = [ favorite2 ]
-      editor.removeFavorites( removed1 )
-
-      //make sure it was removed
-      Assert.assertNull( editor.getFavorite( command2 ) )
-      Assert.assertEquals( 3, editor.getFavoriteTasks().size() )
-
-      //now remove multiples
-      List removed2 = [ favorite1, favorite4 ]
-      editor.removeFavorites( removed2 )
-
-      //make sure they were both removed
-      Assert.assertNull( editor.getFavorite( command1 ) )
-      Assert.assertNull( editor.getFavorite( command4 ) )
-      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
-    }
-
-    /**
-   * This tests executing multiple favorites at once. We'll add two favorites, then execute both of them
-   * via GradleInterfaceVersion1.executeFavorites(). This should execute both as a single command
-   * concatenating them together.
-   */
-    @Test
-    public void testExecutingFavorites()
-    {
-      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-      FavoritesEditorVersion1 editor = singlePane.getFavoritesEditor()
-
-      //this starts the execution queue
-      singlePane.aboutToShow()
-
-      //there should be no favorites as of yet
-      Assert.assertTrue( editor.getFavoriteTasks().isEmpty() )
-
-      //add one (doesn't really matter what it is)
-      String command1 = "build"
-      FavoriteTaskVersion1 favorite1 = editor.addFavorite( command1, command1, true )
-
-      //make sure it was added
-      Assert.assertNotNull( editor.getFavorite( command1 ) )
-      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
-
-      //add another one
-      String command2 = "clean"
-      FavoriteTaskVersion1 favorite2 = editor.addFavorite( command2, command2, true )
-
-      //make sure it was added
-      Assert.assertNotNull( editor.getFavorite( command2 ) )
-      Assert.assertEquals( 2, editor.getFavoriteTasks().size() )
-
-      //add a request observer so we can observe when the command is finished. This allows us to
-      //see what was actually executed.
-      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.EXECUTION_TYPE )
-      ((GradleInterfaceVersion2)singlePane.getGradleInterfaceVersion1()).addRequestObserver( testRequestObserver )
-
-      //now execute both favorites
-      List<FavoriteTaskVersion1> favorites = [ favorite1, favorite2 ]
-      RequestVersion1 request = ( (GradleInterfaceVersion2) singlePane.getGradleInterfaceVersion1() ).executeFavorites(favorites)
-
-      Assert.assertNotNull( request )
-
-      //verify that the actual command that was executed is a concatenation of both favorites
-      Assert.assertThat( request.getFullCommandLine(), startsWith("build clean") )
-    }
-
-    /**
-    * This tests getting projects and tasks from gradle. It then goes through a series of tests
-    * related to projects and tasks (such as making sure their description is returned, their
-    * parent is returned, etc).
-    */
-    @Test
-    public void testProjectsAndTasks()
-    {
-      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
-
-      //make sure our samples directory exists
-      Assert.assertTrue( gradleInterface.getCurrentDirectory().isDirectory() )
-
-      //add a request observer so we can observe when the command is finished. This allows us to
-      //see what was actually executed.
-      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.REFRESH_TYPE )
-      gradleInterface.addRequestObserver( testRequestObserver )
-
-      //this starts the execution queue
-      dualPane.aboutToShow()
-
-      gradleInterface.refreshTaskTree()
-
-      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
-
-      Assert.assertEquals( "Execution Failed: " + testRequestObserver.output, 0, testRequestObserver.result)
-
-      List<ProjectVersion1> rootProjects = gradleInterface.getRootProjects();
-      Assert.assertFalse( rootProjects.isEmpty() );   //do we have any root projects?
-
-      ProjectVersion1 rootProject = rootProjects.get( 0 );
-      Assert.assertNotNull( rootProject );
-      Assert.assertThat( rootProject.getSubProjects().size(), equalTo(3))
-
-      //Quick check to make sure there are tasks on each of the sub projects.
-      //The exact task names will change over time, so I don't want to try
-      //to test for those. I'll just make sure there are several.
-      Iterator<ProjectVersion1> iterator = rootProjects.get(0).getSubProjects().iterator();
-      while( iterator.hasNext() )
-      {
-         ProjectVersion1 projectVersion1 = iterator.next();
-         Assert.assertTrue( projectVersion1.getTasks().size() > 4 );
-      }
-
-      //there should be a 'services' project
-      ProjectVersion1 servicesProject = rootProjects.get(0).getSubProject("services" );
-      Assert.assertNotNull( servicesProject );
-
-      //and it contains a 'webservice' sub project
-      ProjectVersion1 webserviceProject = servicesProject.getSubProject("webservice");
-      Assert.assertNotNull( webserviceProject );
-
-      ProjectVersion1 apiProject = rootProjects.get(0).getSubProject("api");
-      Assert.assertNotNull( apiProject );
-
-      //verify the parent project is set correctly
-      Assert.assertEquals( servicesProject, webserviceProject.getParentProject() )
-
-      //verify its full name is correct (this might should be prefixed with a colon)
-      Assert.assertEquals( "services:webservice", webserviceProject.getFullProjectName() )
-
-      //verify getSubProjectFromFullPath works
-      ProjectVersion1 foundProject = rootProject.getSubProjectFromFullPath("services:webservice")
-      Assert.assertNotNull( "Failed to find services:webservice", foundProject )
-      Assert.assertEquals( webserviceProject, foundProject )
-
-      //verify that are multiple tasks here (we know their should be)
-      Assert.assertTrue( webserviceProject.getTasks().size() > 4 );
-
-      //verify getTaskFromFullPath works
-      TaskVersion1 apiBuildTask = rootProject.getTaskFromFullPath(":api:build")
-      Assert.assertNotNull( "Failed to find :api:build", apiBuildTask )
-
-      Assert.assertEquals( apiProject, apiBuildTask.getProject() )
-
-      //then make sure it has a description
-      Assert.assertNotNull( apiBuildTask.getDescription() )
-
-      //and that its not marked as the default (we need a task to be the default so we can verify it returns true)
-      Assert.assertFalse( apiBuildTask.isDefault() )
-
-      //there are no default tasks here
-      Assert.assertTrue( apiProject.getDefaultTasks().isEmpty() )
-
-      //this build task is a child of the api project. Should be the same task we got earlier
-      TaskVersion1 buildTask = apiProject.getTask("build")
-      Assert.assertNotNull( "Failed to find build task", buildTask )
-      Assert.assertEquals( apiBuildTask, buildTask )
-    }
-
-   /**
-    * This verifies that the GradleInterfaceVersion1.refreshTaskTree that takes
-    * additional arguments works. We're not really interested in what those additional
-    * arguments are, just that it passes them along.
-    */
-    @Test
-    public void testRefreshWithArguments()
-    {
-      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
-
-      //make sure our samples directory exists
-      if( !gradleInterface.getCurrentDirectory().exists() ) {
-        throw new AssertionFailedError('sample project missing. Expected it at: ' + gradleInterface.getCurrentDirectory())
-      }
-
-      //this starts the execution queue
-      dualPane.aboutToShow()
-
-      //add a request observer so we can observe when the command is finished. This allows us to
-      //see what was actually executed.
-      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.REFRESH_TYPE )
-      gradleInterface.addRequestObserver( testRequestObserver )
-
-      RequestVersion1 request = gradleInterface.refreshTaskTree2("-xtest")
-
-      //make sure that the actual request is the normal refresh request with our
-      //(this line is really what we're trying to test)
-      Assert.assertThat( request.getFullCommandLine(), startsWith("tasks -xtest") )
-
-      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
-
-      Assert.assertEquals( "Execution Failed: " + testRequestObserver.output, 0, testRequestObserver.result)
-
-      Assert.assertEquals( "Not our request", request, testRequestObserver.request );
-    }
-
-    /**
-    * This verifies that you can add custom stuff to the setup tab. This is a UI test and is kinda tricky. We're going
-    * to use a HierarchyListener to see if our component is made visible. This will confirm if it was added or not
-    * because it must be added to be made visible. To do this, however, we'll need to actually show the UI. All we're
-    * really doing here, is adding a 'custom' component to the UI, then adding the UI to a frame, then showing the frame,
-    * so we can verify that our component was shown.
-    */
-    @Test
-    public void testAddingComponentToSetupTab()
-    {
-      if ( java.awt.GraphicsEnvironment.isHeadless() ) {
-        return;  // Can't run this test in headless mode!
-       }
-
-      JLabel label = new JLabel("Testing Testing 123")
-      TestVisibilityHierarchyListener hierarchyAdapter = new TestVisibilityHierarchyListener()
-      label.addHierarchyListener( hierarchyAdapter )
-
-      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-
-      //make sure we haven't been told the component was shown or hidden yet
-      Assert.assertFalse( hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( hierarchyAdapter.componentWasHidden )
-
-      singlePane.aboutToShow();
-
-      singlePane.setCustomPanelToSetupTab( label )
-
-      //this still should not show the component (at this point, we're probably more testing that our hierarchyAdapter is working)
-      Assert.assertFalse( hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( hierarchyAdapter.componentWasHidden )
-
-      //now create a frame, place the UI in it, then show it briefly
-      JFrame frame = openApi.open(singlePane)
-
-      //set the Setup tab as the current tab. This is required to actually show the component.
-      int setupTabIndex = singlePane.getGradleTabIndex( "Setup" );
-      Assert.assertTrue( "Failed to get index of setup tab", setupTabIndex != -1 )
-      singlePane.setCurrentGradleTab( setupTabIndex );
-
-      //still should not show the component (its not yet visible, but is about to be)
-      Assert.assertFalse( hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( hierarchyAdapter.componentWasHidden )
-
-
-      //This shows and hides the UI, giving it time to actually show itself and empty the event dispatch
-      //queue. This is required for the setup tab to become current as well as show the custom component we added.
-      openApi.flushEventQueue( frame )
-
-      Assert.assertEquals( "The setup tab was not selected", setupTabIndex, singlePane.getCurrentGradleTab() )
-
-      //now the label should have been made visible then invisible
-      Assert.assertTrue( hierarchyAdapter.componentWasShown )
-      Assert.assertTrue( hierarchyAdapter.componentWasHidden )
-    }
-
-    /**
-    * This verifies that you can add a custom tab to the UI. This is a UI test and is kinda tricky. We're going
-    * to use a HierarchyListener to see if our tab component is made visible. This will confirm if it was added or not
-    * because it must be added to be made visible. To do this, however, we'll need to actually show the UI. All we're
-    * really doing here, is adding a tab to the UI, then adding the UI to a frame, then showing the frame so we can
-    * then verify that our tab was shown (actually using our tab's component).
-    */
-    @Test
-    public void testAddingCustomTab()
-    {
-      if ( java.awt.GraphicsEnvironment.isHeadless() ) {
-        return;  // Can't run this test in headless mode!
-      }
-
-      TestTab testTab = new TestTab()
-
-      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-
-      //make sure we haven't been told the component was shown or hidden yet
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
-
-      //make sure things are initialized properly. These should all be false
-      Assert.assertFalse( testTab.nameRetrieved );
-      Assert.assertFalse( testTab.informedAboutToShow );
-      Assert.assertFalse( testTab.componentCreated );
-
-      int originalCount = singlePane.getGradleTabCount();
-
-      singlePane.addTab( 99, testTab ) //I don't really care about the index. It should accept a number that is too large and handle it appropriately.
-
-      singlePane.aboutToShow()
-
-      //this still should not show the component (at this point, we're probably more testing that our hierarchyAdapter is working)
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
-
-      //now create a frame, place the UI in it, then show it briefly
-      JFrame frame = openApi.open( singlePane )
-
-      String testTabName = "Test Tab"
-
-      //set the test tab as the current tab. This is required to actually show the component.
-      int testTabIndex = singlePane.getGradleTabIndex( testTabName )
-      Assert.assertTrue( "Failed to get index of test tab", testTabIndex != -1 )
-      singlePane.setCurrentGradleTab( testTabIndex )
-
-      //just to test getGradleTabName, make sure it returns our tab name
-      Assert.assertEquals( testTabName, singlePane.getGradleTabName( testTabIndex ) )
-
-      //to test getGradleTabCount, make sure the tab count went up by 1
-      Assert.assertEquals( originalCount + 1, singlePane.getGradleTabCount() )
-
-      //still should not show the component (its not yet visible, but is about to be)
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
-
-      //This shows and hides the UI, giving it time to actually show itself and empty the event dispatch
-      //queue. This is required for the test tab to become current.
-      openApi.flushEventQueue( frame )
-
-      Assert.assertEquals( "The test tab was not selected", testTabIndex, singlePane.getCurrentGradleTab() )
-
-      //now the label should have been made visible then invisible
-      Assert.assertTrue( testTab.hierarchyAdapter.componentWasShown )
-      Assert.assertTrue( testTab.hierarchyAdapter.componentWasHidden )
-
-      //at the end, the name should have been queried, we should have been told we were about to shown, and the component should be created
-      Assert.assertTrue( testTab.nameRetrieved );
-      Assert.assertTrue( testTab.informedAboutToShow );
-      Assert.assertTrue( testTab.componentCreated );
-
-      //reset the test tab (resets the listener so we can remove the tab and verify that it no longer shows up, as well as some of our test variables)
-      testTab.reset()
-      singlePane.removeTab( testTab )
-
-      //I'm going to set the current tab, but this shouldn't do anything because the tab was removed
-      singlePane.setCurrentGradleTab( testTabIndex );
-
-      //part of showing the UI is telling it its about to be shown. In this case, nothing should happen
-      //related to the test tab. It has been removed
-      singlePane.aboutToShow()
-
-      //This shows and hides the UI, giving it time to actually show itself and empty the event
-      //dispatch queue. This is required for the test tab to become current (were it still present).
-      openApi.flushEventQueue( frame )
-
-      //try to get the test tab
-      testTabIndex = singlePane.getGradleTabIndex( "Test Tab" );
-      Assert.assertTrue( "Erroneously got index of test tab. It was removed", testTabIndex == -1 )
-
-      //we've removed it, so it shouldn't have been polled about or informed of anything
-      Assert.assertFalse( testTab.nameRetrieved );
-      Assert.assertFalse( testTab.informedAboutToShow );
-      Assert.assertFalse( testTab.componentCreated );
-
-      //It was not shown after the reset, these should both be false
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
-      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
-    }
-
-    /**
-    * We want to make sure the settings are working correctly here. This is the mechanism that
-     * handles saving/restoring the values within the UI and can be stored in different ways
-     * depending on how the UI integrated with its parent (its up to whoever implements
-     * SettingsNodeVersion1). Here, to spot check that the basics are working, we'll create a
-     * UI, set a value, close it, then recreate it using the same settings object. The values
-     * should be saved upon close and then restored.
-    */
-    @Test
-    public void testSettings()
-    {
-      TestSettingsNodeVersion1 settingsNode = new TestSettingsNodeVersion1();
-
-      TestSingleDualPaneUIInteractionVersion1 testSingleDualPaneUIInteractionVersion1 = new TestSingleDualPaneUIInteractionVersion1( new TestAlternateUIInteractionVersion1(), settingsNode );
-        SinglePaneUIVersion1 singlePane = null;
-        try {
-            singlePane = UIFactory.createSinglePaneUI(getClass().getClassLoader(), dist.getGradleHomeDir(), testSingleDualPaneUIInteractionVersion1, false );
-        } catch (Exception e) {
-            throw new AssertionFailedError( "Failed to extract single pane: Caused by " + e.getMessage() )
-        }
-
-        File illegalDirectory = dist.testFile( "non-existant" ).createDir();
-        if( illegalDirectory.equals( singlePane.getCurrentDirectory() ) ) {
-          throw new AssertionFailedError( "Directory already set to 'test' directory. The test is not setup correctly." );
-        }
-
-        //this is required to get the ball rolling
-        singlePane.aboutToShow();
-
-        //set the current directory after calling aboutToShow (otherwise, it'll stomp over us when it restores its default settings)
-        singlePane.setCurrentDirectory( illegalDirectory );
-
-        //close the UI. This saves the current settings.
-        singlePane.close();
-
-        //now instantiate it again
-        testSingleDualPaneUIInteractionVersion1 = new TestSingleDualPaneUIInteractionVersion1( new TestAlternateUIInteractionVersion1(), settingsNode );
-        try {
-            singlePane = UIFactory.createSinglePaneUI(getClass().getClassLoader(), dist.getGradleHomeDir(), testSingleDualPaneUIInteractionVersion1, false );
-        } catch (Exception e) {
-            throw new AssertionFailedError( "Failed to extract single pane (second time): Caused by " + e.getMessage() )
-        }
-
-        //this should restore the previous settings
-        singlePane.aboutToShow();
-
-        Assert.assertEquals( illegalDirectory, singlePane.getCurrentDirectory() );
-    }
-
-    /**
-     * This tests that the command line altering mechanism works. This adds additional
-     * things to the command line being executed. This is used by gradle build systems
-     * that need custom, system-specific arguments passed to it that aren't known by gradle
-     * proper. For example: you're working with a large project made of MANY subprojects, a
-     * custom IDE plugin can track which projects you're focusing on and pass that information
-     * to the build system via this mechanism, so it only builds appropriate projects.
-     * This is awkward to test because its real use requires a customized build system,
-     * so I'm going to pass an argument that is illegal by itself -- meaning no tasks
-     * are specified. Then I'll alter the command line by adding an actual task. Then
-     * wait for it to complete and verify what was executed
-    */
-    @Test
-    public void testCommandLineAlteringListener()
-    {
-      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
-
-      //this starts the execution queue. This also initiates a refresh that we'll ignore later.
-      dualPane.aboutToShow()
-
-      //add a request observer so we can observe when the command is finished. This allows us to
-      //see what was actually executed.
-      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.EXECUTION_TYPE )
-      gradleInterface.addRequestObserver( testRequestObserver )
-
-      //now that we know that command is illegal by itself, try it again but the listener will append 'build'
-      //to the command line which makes it legal (again, we don't really care what we execute.
-      TestCommandLineArgumentAlteringListenerVersion1 commandLineArgumentAlteringListener = new TestCommandLineArgumentAlteringListenerVersion1("classes")
-      gradleInterface.addCommandLineArgumentAlteringListener( commandLineArgumentAlteringListener )
-
-      //execute this before we do our test. This is not legal by itself. It should fail. That means our
-      //test is setup correctly. For example: if someone adds a default task to this project, this will
-      //generate NO error and thus, our test will prove nothing. If you get a test failure here, you
-      //can try changing the command line to something that's illegal by itself (we don't care what).
-      RequestVersion1 request = gradleInterface.executeCommand2("-s", "test command")
-
-      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
-
-      Assert.assertThat( testRequestObserver.request.getFullCommandLine(), startsWith( "-s " ) )
-      Assert.assertThat( testRequestObserver.request.getFullCommandLine(), endsWith( " classes" ) )
-
-      //make sure it completed execution correctly
-      Assert.assertEquals( "Execution failed with return code: " + testRequestObserver.result + "\nOutput:\n" + testRequestObserver.output , 0, testRequestObserver.result )
-
-      //the request that was executed should be equal to our original command with our 'altered' command added to it
-      Assert.assertNotNull( "Missing 'execution completed' request", testRequestObserver.request )
-
-      //just to be paranoid, let's make sure it was actually our request. If this fails, it probably represents something
-      //fundamentally flawed with the request or request wrapper mechanism.
-      Assert.assertEquals( request, testRequestObserver.request )
-
-      gradleInterface.removeRequestObserver( testRequestObserver )
-      gradleInterface.removeCommandLineArgumentAlteringListener( commandLineArgumentAlteringListener )
-    }
-
-   /**
-    * This tests that getVersion returns the same thing as the jar's suffix.
-    * We'll get the gradle jar, then strip off its extension and verify that
-    * the jar's name ends with the version number.
-    */
-  @Test
-  public void testVersion()
-  {
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-    String version = ( (GradleInterfaceVersion2) singlePane.getGradleInterfaceVersion1()).getVersion()
-
-    Assert.assertNotNull( "null version number", version )
-
-    Assert.assertFalse( "Empty version number", version.trim().equals( "" ) )       //shouldn't be empty
-
-    File gradleJar = ExternalUtility.getGradleJar(dist.gradleHomeDir)
-
-    Assert.assertNotNull( "Missing gradle jar", gradleJar )                         //we should have a gradle jar
-
-    int indexOfExtension = gradleJar.getName().toLowerCase().lastIndexOf( ".jar" )  //get the index of its extension
-
-    Assert.assertTrue( "Has no '.jar' extension", indexOfExtension != -1 )          //it had better have an extension
-
-    String name = gradleJar.getName().substring( 0, indexOfExtension )              //get its name minus the extension
-
-    Assert.assertTrue( "Jar name doesn't end with version", name.endsWith( version ) )  //the name (minus extension) should end with the version
-  }
-
-  /**
-   * This is just a spot check that getGradleHomeDirectory works. Its based off
-   * of the gradle you're running.
-   */
-  @Test
-  public void testGradleHomeDirectory()
-  {
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-
-    Assert.assertEquals( dist.gradleHomeDir, singlePane.getGradleHomeDirectory() )
-  }
-
-
-  /**
-   * This is just a spot check that we can get an instance of the OutputUILord.
-   * Other tests cover its functionality more thoroughly. This is just to make sure
-   * its working when accessed via the Open API.
-   */
-  @Test
-  public void testOutputUILord()
-  {
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
-    Assert.assertNotNull( outputUILord )
-  }
-
-  /**
-   * This tests that you can correctly obtain the number of output tabs from a
-   * dual pane UI. This
-   */
-  @Test
-  public void testDualPaneOutputPaneNumber()
-  {
-    if ( java.awt.GraphicsEnvironment.isHeadless() ) {
-      return;  // Can't run this test in headless mode!
-    }
-
-    DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-
-    //now create a frame, place the UI in it, then show it briefly
-    JFrame frame = openApi.open(dualPane)
-
-    //make sure we got something
-    Assert.assertNotNull( dualPane )
-
-    //tell it we're about to show it, so it'll create a component
-    dualPane.aboutToShow()
-
-    dualPane.refreshTaskTree()
-
-    openApi.flushEventQueue( frame )
-
-    //there should be one opened output tab for the refresh
-    Assert.assertEquals( 1, dualPane.getNumberOfOpenedOutputTabs() )
-
-    dualPane.executeCommand( "build", "build" )
-
-    openApi.flushEventQueue( frame )
-
-    //there should be 2 opened output tabs. One for refresh, one for build
-    Assert.assertEquals( 2, dualPane.getNumberOfOpenedOutputTabs() )
-  }
-
-   /**
-  * This tests whether or not a the UI is considered busy. Its busy if its
-    * executing a command. To test this, we'll execute a command and verify
-    * we're busy. When it finishes, we'll verify we're not longer busy.
-    * We'll also check that canClose works properly. If we're busy, calling
-    * canClose should prompt the user to confirm closing and return their
-    * answer. If we're not busy, it should not prompt the user and return
-    * true.
-   */
-  @Test
-  public void testBusy()
-  {
-      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
-
-      //this starts the execution queue. This also initiates a refresh that we'll ignore later.
-      dualPane.aboutToShow()
-
-      //add a request observer so we can observe when the command is finished.
-      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.EXECUTION_TYPE )
-      gradleInterface.addRequestObserver( testRequestObserver )
-
-      gradleInterface.executeCommand("build", "test command")
-
-      //now that there's a real command in the queue, we should be considered busy
-      Assert.assertTrue( dualPane.isBusy() )
-      Assert.assertTrue( gradleInterface.isBusy() )
-
-      //we're busy, we shouldn't be able to close
-      TestCloseInteraction testCloseInteraction = new TestCloseInteraction( false )
-      Assert.assertFalse( dualPane.canClose( testCloseInteraction ) )
-
-      //since we just asked to close and we're busy, make sure we prompted the user
-      Assert.assertTrue( testCloseInteraction.wasPromptedToConfirmClose )
-
-      testRequestObserver.waitForRequestExecutionComplete(120, TimeUnit.SECONDS)
-
-      Assert.assertThat( testRequestObserver.request.getFullCommandLine(), startsWith( "build" ) )
-
-      //make sure it completed execution correctly
-      Assert.assertEquals( "Execution failed with return code: " + testRequestObserver.result + "\nOutput:\n" + testRequestObserver.output , 0, testRequestObserver.result )
-
-      //make sure we're not longer considered busy
-      Assert.assertFalse( dualPane.isBusy() )
-      Assert.assertFalse( gradleInterface.isBusy() )
-
-      //make sure we can close now
-      testCloseInteraction = new TestCloseInteraction( false )
-      Assert.assertTrue( dualPane.canClose( testCloseInteraction ) )
-
-      //since we just asked to close and we're NOT busy, make sure we did NOT prompt the user
-      Assert.assertFalse( testCloseInteraction.wasPromptedToConfirmClose )
-
-      gradleInterface.removeRequestObserver( testRequestObserver )
-  }
-
-   /**
-   * This tests that we can set a custom gradle executor.
-    */
-    @Test
-    public void testSettingCustomGradleExecutor()
-    {
-       DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
-      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
-
-      //it should be null by default
-      Assert.assertNull( gradleInterface.getCustomGradleExecutable() )
-
-      //now let's set it to a custom gradle executable. Actually, we're not going to really get
-      //a custom one; we'll use the normal one. Why? Because a real custom one would probably
-      //become a pain for maintaining this test. Here, we're interested that the basics are working
-      //from an open-api standpoint.
-      File gradleExecutor = getCustomGradleExecutable()
-
-      gradleInterface.setCustomGradleExecutable( gradleExecutor )
-
-      //make sure it was set
-      Assert.assertEquals( gradleExecutor, gradleInterface.getCustomGradleExecutable() )
-      Assert.assertEquals( gradleExecutor, dualPane.getCustomGradleExecutable() ) //just another way to get it
-
-      //add a request observer so we can observe when the command is finished.
-      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.REFRESH_TYPE )
-      gradleInterface.addRequestObserver( testRequestObserver )
-
-      //this starts the execution queue
-      dualPane.aboutToShow()
-
-      dualPane.refreshTaskTree()
-
-      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
-
-      //make sure it completed execution correctly
-      Assert.assertEquals( "Execution failed with return code: " + testRequestObserver.result + "\nOutput:\n" + testRequestObserver.output , 0, testRequestObserver.result )
-
-      gradleInterface.removeRequestObserver( testRequestObserver )
-    }
-
-   /**
-    * This gets a gradle executable. That is, a way to launch gradle (shell script or batch file).
-    */
-    private File getCustomGradleExecutable()
-    {
-      //now let's set it to a custom gradle executable. We'll just point it to the regular
-      //gradle file (but it'll be the custom one.
-      String name = OperatingSystem.current().getScriptName("bin/gradle");
-
-      File gradleExecutor = new File( dist.getGradleHomeDir(), name )
-
-      //make sure the executable exists
-      Assert.assertTrue( "Missing gradle executable at: " + gradleExecutor, gradleExecutor.exists() )
-
-      return gradleExecutor
-    }
-}
-
-  /**
-   * Inner class for tracking a component's visiblity has changed.
-   * A HierarchyListener is how Swing notifies you that a component's visibility has changed.
-   * We'll use it to track if the component was shown and then hidden.
-   */
-    private class TestVisibilityHierarchyListener implements HierarchyListener
-    {
-      private boolean componentWasShown = false;
-      private boolean componentWasHidden = false;
-
-       public void hierarchyChanged(HierarchyEvent e)
-       {
-         if((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)!=0)
-         {
-            if( e.getComponent().isShowing() ) {
-              componentWasShown = true;
-            }
-            else {
-              componentWasHidden = true;
-            }
-         }
-       }
-     }
-
- /**
- * A class that manages a dummy gradle tab. It just consists of a label,
- *  but tracks that certain fields were called.
-  */
-  public class TestTab implements GradleTabVersion1
-  {
-    private JLabel label = new JLabel("Testing Testing 123")
-    private TestVisibilityHierarchyListener hierarchyAdapter = new TestVisibilityHierarchyListener()
-    private boolean nameRetrieved
-    private boolean informedAboutToShow
-    private boolean componentCreated
-
-    def TestTab() {
-      label.addHierarchyListener( hierarchyAdapter )
-    }
-
-    private void reset() {
-      label.removeHierarchyListener( hierarchyAdapter )         //remove the existing listener
-      hierarchyAdapter = new TestVisibilityHierarchyListener()  //create a new one
-      label.addHierarchyListener( hierarchyAdapter )            //add it
-
-      nameRetrieved = false
-      informedAboutToShow = false
-      componentCreated = false
-    }
-
-    String getName() {
-      nameRetrieved = true;
-      return "Test Tab";
-    }
-
-    Component createComponent() {
-      componentCreated = true;
-      return label;
-    }
-
-    void aboutToShow() {
-      informedAboutToShow = true;
-    }
-  }
-
-  /**
-   * Class that tracks whether we were prompted to confirm close. It also returns a specific
-   * value to that prompt.
-   */
-    private class TestCloseInteraction implements BasicGradleUIVersion1.CloseInteraction
-    {
-      boolean wasPromptedToConfirmClose
-      boolean promptResult
-
-
-
-      def TestCloseInteraction(promptResult) {
-        this.promptResult = promptResult;
-      }
-
-      boolean promptUserToConfirmClosingWhileBusy() {
-        wasPromptedToConfirmClose = true
-        return promptResult
-      }
-    }
-
-  /**
-   * This appends a specified string to the command line when executing a command. 
-   */
-  private class TestCommandLineArgumentAlteringListenerVersion1 implements CommandLineArgumentAlteringListenerVersion1
-  {
-    private final String additionalArguments;
-
-    def TestCommandLineArgumentAlteringListenerVersion1(additionalArguments) {
-      this.additionalArguments = additionalArguments;
-    }
-
-    String getAdditionalCommandLineArguments(String commandLineArguments) {
-      if( commandLineArguments.startsWith( "-s " ) ) {  //we're only interested in altering this one command
-        return additionalArguments;
-      }
-
-      return null;
-    }
-  }
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OutputUILordTest.groovy b/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OutputUILordTest.groovy
deleted file mode 100644
index 8e62a9a..0000000
--- a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OutputUILordTest.groovy
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.openapi;
-
-
-import java.awt.Font
-import java.util.concurrent.TimeUnit
-import javax.swing.UIManager
-import org.gradle.integtests.DistributionIntegrationTestRunner
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.TestResources
-import org.gradle.openapi.external.ui.OutputUILordVersion1
-import org.gradle.openapi.external.ui.SinglePaneUIVersion1
-import org.junit.Assert
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import static org.hamcrest.Matchers.startsWith
-
-/**
- * Tests aspects of the OutputUILord in OpenAPI
- *
- * @author mhunsicker
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-public class OutputUILordTest  {
-  @Rule public final GradleDistribution dist = new GradleDistribution()
-  @Rule public final OpenApiFixture openApi = new OpenApiFixture()
-  @Rule public final TestResources resources = new TestResources('testProject')
-
-  /**
-  * This verifies that you can add file extension to the output lord. This is for
-  * highlighting file links in the output. Here, we're just interested in whether
-  * or not the functions work via/exists in the Open API. The actual functionality
-  * is tested elsewhere.
-  */
-  @Test
-  public void testAddingFileExtension()
-  {
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
-
-    outputUILord.addFileExtension( '.txt', ':' )
-    List extensions = outputUILord.getFileExtensions()
-    Assert.assertTrue( extensions.contains( '.txt' ) )
-  }
-
-  /**
-  * This verifies that you can add prefixed file extensions to the output lord. This
-  * is for highlighting file links in the output. Here, we're just interested in whether
-  * or not the functions work via/exists in the Open API. The actual functionality is tested elsewhere.
-  */
-  @Test
-  public void testAddingPrefixedFileLink()
-  {
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
-
-    outputUILord.addPrefixedFileLink( "Error Text", "The error is:", ".txt", ":" )
-  }
-
-  /**
-  * This tests setting the font. There's not much here to do other than set it and then
-  * get it, making sure its the same. This isn't worried so much about the font itself as
-  * much as the open API doesn't have a problem with setting the font.
-  */
-  @Test
-  public void testFont()
-  {
-    if ( java.awt.GraphicsEnvironment.isHeadless() ) {
-       return;  // Can't run this test in headless mode!
-    }
-
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
-    Font font = UIManager.getFont( "Button.font" )  //this specific font is not important
-
-    //make sure that the above font doesn't happen to be the default font for the output lord. If it
-    //is, this test will silently succeed even if it should fail.
-    Assert.assertNotSame( "Fonts are the same. This test is not setup correctly.", font, outputUILord.getOutputTextFont() )
-
-    //now set the new font and then make sure it worked
-    outputUILord.setOutputTextFont( font )
-  }
-
-  /**
-  *
-  */
-  @Test
-  public void testReExecute()
-  {
-    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
-    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
-
-    //this starts the execution queue. This also initiates a refresh that we'll ignore later.
-    singlePane.aboutToShow()
-
-    BlockingRequestObserver testRequestObserver = new BlockingRequestObserver()
-    singlePane.getGradleInterfaceVersion1().addRequestObserver( testRequestObserver )
-
-    //now execute a command
-    singlePane.executeCommand( "build", "test build")
-
-    //wait for it to complete
-    testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
-    testRequestObserver.reset()
-
-    //now the single command we're trying to test
-    outputUILord.reExecuteLastCommand();
-
-    //wait again for it exit
-    testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
-
-    //make sure it executed the correct request
-    Assert.assertThat( testRequestObserver.request.getFullCommandLine(), startsWith('build') )
-  }
-}
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSettingsNodeVersion1.java b/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSettingsNodeVersion1.java
deleted file mode 100644
index 95fb63d..0000000
--- a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSettingsNodeVersion1.java
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests.openapi;
-
-import org.gradle.openapi.external.ui.SettingsNodeVersion1;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Implementation of settings node. It basically mirrors a DOM.
- * @author mhunsicker
- */
-public class TestSettingsNodeVersion1 implements SettingsNodeVersion1 {
-
-    private String name;
-    private String value;
-    private HashMap<String,String> attributes = new HashMap<String, String>();
-    private SettingsNodeVersion1 parent;
-    private List<SettingsNodeVersion1> children = new ArrayList<SettingsNodeVersion1>();
-
-
-    public TestSettingsNodeVersion1() {
-        //this creates a root settings node.
-    }
-
-    public TestSettingsNodeVersion1(SettingsNodeVersion1 parent) {
-        this.parent = parent;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public void setValue(String value) {
-        this.value = value;
-    }
-
-    public String getValue() {
-        return value;
-    }
-
-    public void setValueOfChild(String name, String value) {
-        SettingsNodeVersion1 settingsNode = addChildIfNotPresent(name);
-        settingsNode.setValue(value);
-    }
-
-    public String getValueOfChild(String name, String defaultValue) {
-        SettingsNodeVersion1 settingsNode = getChildNode(name);
-        if (settingsNode != null) {
-            String value = settingsNode.getValue();
-            if (value != null) {
-                return value;
-            }
-        }
-        return defaultValue;
-    }
-
-    public SettingsNodeVersion1 getChildNode(String name) {
-        Iterator<SettingsNodeVersion1> iterator = children.iterator();
-        while (iterator.hasNext()) {
-            SettingsNodeVersion1 childNode = iterator.next();
-            if (name.equals(childNode.getName() )) {
-                return childNode;
-            }
-        }
-        return null;
-    }
-
-    public List<SettingsNodeVersion1> getChildNodes() {
-        return children;
-    }
-
-    public List<SettingsNodeVersion1> getChildNodes(String name) {
-        List<SettingsNodeVersion1> children = new ArrayList<SettingsNodeVersion1>();
-
-        Iterator<SettingsNodeVersion1> iterator = children.iterator();
-        while (iterator.hasNext()) {
-            SettingsNodeVersion1 childNode = iterator.next();
-            if (name.equals(childNode.getName()) ) {
-                children.add(childNode);
-            }
-        }
-
-        return children;
-    }
-
-    public int getValueOfChildAsInt(String name, int defaultValue) {
-        SettingsNodeVersion1 settingsNode = getChildNode(name);
-        if (settingsNode != null) {
-            String value = settingsNode.getValue();
-
-            try {
-                if (value != null) {
-                    return Integer.parseInt(value);
-                }
-            } catch (NumberFormatException e) {
-                //we couldn't parse it. Just return the default.
-            }
-        }
-        return defaultValue;
-    }
-
-    public void setValueOfChildAsInt(String name, int value) {
-        setValueOfChild(name, Integer.toString(value));
-    }
-
-    public long getValueOfChildAsLong(String name, long defaultValue) {
-        SettingsNodeVersion1 settingsNode = getChildNode(name);
-        if (settingsNode != null) {
-            String value = settingsNode.getValue();
-
-            try {
-                if (value != null) {
-                    return Long.parseLong(value);
-                }
-            } catch (NumberFormatException e) {
-                //we couldn't parse it. Just return the default.
-            }
-        }
-        return defaultValue;
-    }
-
-    public void setValueOfChildAsLong(String name, long value) {
-        setValueOfChild(name, Long.toString(value));
-    }
-
-    public boolean getValueOfChildAsBoolean(String name, boolean defaultValue) {
-        SettingsNodeVersion1 settingsNode = getChildNode(name);
-        if (settingsNode != null) {
-            String value = settingsNode.getValue();
-
-            //I'm not calling 'Boolean.parseBoolean( value )' because it will return false if the value isn't true/false
-            //and we want it to return whatever the default is if its not a boolean.
-            if (value != null) {
-                if ("true".equalsIgnoreCase(value)) {
-                    return true;
-                }
-
-                if ("false".equalsIgnoreCase(value)) {
-                    return false;
-                }
-            }
-        }
-
-        return defaultValue;
-    }
-
-    public void setValueOfChildAsBoolean(String name, boolean value) {
-        setValueOfChild(name, Boolean.toString(value));
-    }
-
-    public SettingsNodeVersion1 addChild(String name) {
-        SettingsNodeVersion1 childNode = new TestSettingsNodeVersion1( this );
-        childNode.setName( name );
-
-        children.add( childNode );
-        return childNode;
-    }
-
-    public SettingsNodeVersion1 addChildIfNotPresent(String name) {
-        SettingsNodeVersion1 settingsNode = getChildNode(name);
-        if (settingsNode == null) {
-            settingsNode = addChild(name);
-        }
-
-        return settingsNode;
-    }
-
-    public SettingsNodeVersion1 getNodeAtPath(String... pathPortions) {
-        if (pathPortions == null || pathPortions.length == 0) {
-            return null;
-        }
-
-        String firstPathPortion = pathPortions[0];
-
-        SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
-
-        int index = 1; //Skip the first one. we've already used that one.
-        while (index < pathPortions.length && currentNode != null) {
-            String pathPortion = pathPortions[index];
-            currentNode = currentNode.getChildNode(pathPortion);
-            index++;
-        }
-
-        return currentNode;
-    }
-
-    private SettingsNodeVersion1 getNodeAtPathCreateIfNotFound(String... pathPortions) {
-        if (pathPortions == null || pathPortions.length == 0) {
-            return null;
-        }
-
-        String firstPathPortion = pathPortions[0];
-
-        SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
-        if (currentNode == null) {
-            currentNode = addChild(firstPathPortion);
-        }
-
-        int index = 1;
-        while (index < pathPortions.length) {
-            String pathPortion = pathPortions[index];
-            currentNode = currentNode.getChildNode(pathPortion);
-            if (currentNode == null) {
-                currentNode = addChild(firstPathPortion);
-            }
-
-            index++;
-        }
-
-        return currentNode;
-    }
-
-    public void removeFromParent() {
-        ((TestSettingsNodeVersion1) this.parent).children.remove( this );
-        this.parent = null;
-    }
-
-    public void removeAllChildren() {
-        children.clear();
-    }
-
-    @Override
-    public String toString() {
-        return getName() + "='" + getValue() + "' " + children.size() + " children";
-    }
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/foundation/BootstrapLoader.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/foundation/BootstrapLoader.java
deleted file mode 100644
index 26468af..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/foundation/BootstrapLoader.java
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/*
- This handles the work of loading gradle dynamically. Due to jar version issues,
- you can't just load all jar files.
-
- This does NOT require any system or environment variables to be set.
-
- To use this, instantiate this, then call one of the initialize functions.
- Now you can get the class loader to load whatever classes you like.
-
- @author mhunsicker
-  */
-public class BootstrapLoader
-{
-   private URLClassLoader libClassLoader;
-
-    public void initialize(File gradleHome, boolean bootStrapDebug) throws Exception {
-        initialize(ClassLoader.getSystemClassLoader().getParent(), gradleHome, false, true, bootStrapDebug);
-    }
-
-    /*
-      Call this to initialize gradle.
-      @param  parentClassloader    a parent class loader. Probably whatever class loader
-                                   is used by the caller.
-      @param  gradleHome           the root directory where gradle is installed. This
-                                   directory should have a 'bin' child directory.
-      @param  useParentLastClassLoader true to use a class loader that will delegate
-                                   to the parent only if it can't find it locally. This
-                                   should only be true if you're trying to load gradle
-                                   dynamically from another application.
-      @param  loadOpenAPI          True to load the gradle open API, false not to.
-                                   If you're calling this from a tool using the OpenAPI,
-                                   then you've probably already loaded it, so pass in false
-                                   here, otherwise, pass in true.
-      @param  bootStrapDebug       true to output debug information about the loading
-                                   process.
-      @throws Exception            if something goes wrong.
-      @author mhunsicker
-   */
-   public void initialize(ClassLoader parentClassloader, File gradleHome, boolean useParentLastClassLoader,
-                          boolean loadOpenAPI, boolean bootStrapDebug) throws Exception {
-       if (gradleHome == null || !gradleHome.exists()) {
-           throw new RuntimeException("Gradle home not defined!");
-       }
-
-       if (bootStrapDebug) {
-           System.out.println(
-                   "Gradle Home is declared by system property gradle.home to: " + gradleHome.getAbsolutePath());
-       }
-
-       System.setProperty("gradle.home", gradleHome.getAbsolutePath());
-
-       List<URL> loggingJars = toUrl(getLoggingJars());
-
-       List<File> nonLoggingJarFiles = getNonLoggingJars();
-       removeUnwantedJarFiles(nonLoggingJarFiles, loadOpenAPI);
-       List<URL> nonLoggingJars = toUrl(nonLoggingJarFiles);
-
-       if (bootStrapDebug) {
-           System.out.println("Parent Classloader of new context classloader is: " + parentClassloader);
-           System.out.println("Adding the following files to new logging classloader: " + loggingJars);
-           System.out.println("Adding the following files to new lib classloader: " + nonLoggingJars);
-       }
-
-       URLClassLoader loggingClassLoader = new URLClassLoader(loggingJars.toArray(new URL[loggingJars.size()]),
-               parentClassloader);
-
-       if (useParentLastClassLoader) {
-           libClassLoader = new ParentLastClassLoader(nonLoggingJars.toArray(new URL[nonLoggingJars.size()]),
-                   loggingClassLoader);
-       } else {
-           libClassLoader = new URLClassLoader(nonLoggingJars.toArray(new URL[nonLoggingJars.size()]),
-                   loggingClassLoader);
-       }
-
-       if (bootStrapDebug) {
-           System.out.println("Logging class loader: " + loggingClassLoader);
-           System.out.println("Lib class loader: " + libClassLoader);
-       }
-   }
-
-    public static File[] getGradleHomeLibClasspath() {
-        File gradleHomeLib = new File(System.getProperty("gradle.home") + "/lib");
-        if (gradleHomeLib.isDirectory()) {
-            return gradleHomeLib.listFiles();
-        }
-        return new File[0];
-    }
-
-    public static List<File> getNonLoggingJars() {
-        List<File> pathElements = new ArrayList<File>();
-        for (File file : getGradleClasspath()) {
-            if (!isLogLib(file)) {
-                pathElements.add(file);
-            }
-        }
-        return pathElements;
-    }
-
-    public static List<File> getLoggingJars() {
-        List<File> pathElements = new ArrayList<File>();
-        for (File file : getGradleClasspath()) {
-            if (isLogLib(file)) {
-                pathElements.add(file);
-            }
-        }
-        return pathElements;
-    }
-
-    private static boolean isLogLib(File file) {
-        return file.getName().startsWith("logback") || file.getName().startsWith("slf4j");
-    }
-
-    public static List<File> getGradleClasspath() {
-        File customGradleBin = null;
-        List<File> pathElements = new ArrayList<File>();
-        if (System.getProperty("gradle.bootstrap.gradleBin") != null) {
-            customGradleBin = new File(System.getProperty("gradle.bootstrap.gradleBin"));
-            pathElements.add(customGradleBin);
-        }
-        for (File homeLibFile : getGradleHomeLibClasspath()) {
-            if (homeLibFile.isFile() && !(customGradleBin != null && homeLibFile.getName().startsWith("gradle-"))) {
-                pathElements.add(homeLibFile);
-            }
-        }
-        return pathElements;
-    }
-
-    /*
-      This removes unwanted jar files. At the time of this writing, we're only
-      interested in the open api jar.
-
-      @param  nonLoggingJarFiles a list of jar files
-      @param  loadOpenAPI        true to keep the open api jar, false to remove it.
-      @author mhunsicker
-   */
-    private void removeUnwantedJarFiles(List<File> nonLoggingJarFiles, boolean loadOpenAPI) {
-        if (loadOpenAPI) {
-            return;
-        }
-
-        Iterator<File> iterator = nonLoggingJarFiles.iterator();
-        while (iterator.hasNext()) {
-            File file = iterator.next();
-            if (file.getName().startsWith("gradle-open-api-")) {
-                iterator.remove();
-            }
-        }
-    }
-
-    /*
-      Call this to get the class loader you can use to load gradle classes.
-      @return a URLClassLoader
-      @author mhunsicker
-   */
-   public URLClassLoader getClassLoader() { return libClassLoader; }
-
-    public Class load(String classPath) throws Exception {
-        return libClassLoader.loadClass(classPath);
-    }
-
-    private static List<URL> toUrl(List<File> files) throws MalformedURLException {
-        List<URL> result = new ArrayList<URL>();
-        for (File file : files) {
-            result.add(file.toURI().toURL());
-        }
-        return result;
-    }
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/foundation/ParentLastClassLoader.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/foundation/ParentLastClassLoader.java
deleted file mode 100644
index 0976d35..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/foundation/ParentLastClassLoader.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import java.net.URLClassLoader;
-import java.net.URL;
-import java.net.URLStreamHandlerFactory;
-
-/**
-
- This class loader delegates to the parent class loader ONLY if it cannot find
- it itself. This is meant to solve classloading issues when running something
- as, say, a plugin inside an application that may have already loaded a different
- version of some required jars. This makes sure it looks locally first. This is
- the opposite of a ClassLoader's typical behavior, but it necessary when you
- can't control the environment in which you're running.
-
- Using this class can be very dangerous. You must carefully make sure you
- understand the ramifications of using this. You should also probably make this
- the first class loader between your plugin and the plugin's owner.
-
- @author mhunsicker
-  */
-public class ParentLastClassLoader extends URLClassLoader
-{
-   public ParentLastClassLoader( URL[] urls, ClassLoader parent )
-   {
-      super( urls, parent );
-   }
-
-   public ParentLastClassLoader( URL[] urls )
-   {
-      super( urls );
-   }
-
-   public ParentLastClassLoader( URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory )
-   {
-      super( urls, parent, factory );
-   }
-
-   /*
-    This has been overridden to look at the parent class loader last.
-    @author mhunsicker
-    */
-   @Override
-   public Class<?> loadClass( String name ) throws ClassNotFoundException
-   {
-      // First check whether it's already been loaded, if so use it
-      Class loadedClass = findLoadedClass( name );
-
-      // Not loaded, try to load it
-      if( loadedClass == null )
-      {
-         try
-         {
-            // Ignore parent delegation and just try to load locally
-            loadedClass = findClass( name );
-         }
-         catch( ClassNotFoundException e )
-         {
-            // Swallow exception - does not exist locally
-         }
-
-         // If not found locally, use normal parent delegation in URLClassloader
-         if( loadedClass == null )
-         {
-            // throws ClassNotFoundException if not found in delegation hierarchy at all
-            loadedClass = super.loadClass( name );
-         }
-      }
-      // will never return null (ClassNotFoundException will be thrown)
-      return loadedClass;
-   }
-}
-
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ExternalUtility.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ExternalUtility.java
deleted file mode 100644
index e000b6b..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ExternalUtility.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external;
-
-import org.gradle.foundation.BootstrapLoader;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.util.regex.Pattern;
-
-/**
-
- Utility functions required by the OpenAPI
-
- @author mhunsicker
-  */
-public class ExternalUtility
-{
-    private static final Pattern GRADLE_CORE_PATTERN = Pattern.compile("^gradle-core-\\d.*\\.jar$");
-
-   /*
-      Call this to get a classloader that has loaded gradle.
-
-      @param  parentClassLoader    Your classloader. Probably the classloader
-                                   of whatever class is calling this.
-      @param  gradleHomeDirectory  the root directory of a gradle installation
-      @param  showDebugInfo        true to show some additional information that
-                                   may be helpful diagnosing problems is this
-                                   fails
-      @return a classloader that has loaded gradle and all of its dependencies.
-      @author mhunsicker
-   */
-
-    public static ClassLoader getGradleClassloader(ClassLoader parentClassLoader, File gradleHomeDirectory,
-                                                   boolean showDebugInfo) throws Exception {
-        File gradleJarFile = getGradleJar(gradleHomeDirectory);
-        if (gradleJarFile == null) {
-            throw new RuntimeException(
-                    "Not a valid gradle home directory '" + gradleHomeDirectory.getAbsolutePath() + "'");
-        }
-
-        System.setProperty("gradle.home", gradleHomeDirectory.getAbsolutePath());
-
-        BootstrapLoader bootstrapLoader = new BootstrapLoader();
-        bootstrapLoader.initialize(parentClassLoader, gradleHomeDirectory, true, false, showDebugInfo);
-        return bootstrapLoader.getClassLoader();
-    }
-
-    /*
-       This locates the gradle jar. We do NOT want the gradle-wrapper jar.
-
-       @param  gradleHomeDirectory the root directory of a gradle installation.
-                                   We're expecting this to have a child directory
-                                   named 'lib'.
-       @return the gradle jar file. Null if we didn't find it.
-       @author mhunsicker
-    */
-
-    public static File getGradleJar(File gradleHomeDirectory) {
-        File libDirectory = new File(gradleHomeDirectory, "lib");
-        if (!libDirectory.exists()) {
-            return null;
-        }
-
-        //try to get the gradle.jar. It'll be "gradle-[version].jar"
-        File[] files = libDirectory.listFiles(new FileFilter() {
-            public boolean accept(File file) {
-                return GRADLE_CORE_PATTERN.matcher(file.getName()).matches();
-            }
-        });
-
-        if (files == null || files.length == 0) {
-            return null;
-        }
-
-        //if they've given us a directory with multiple gradle jars, tell them. We won't know which one to use.
-        if (files.length > 1) {
-            throw new RuntimeException(
-                    "Installation has multiple gradle jars. Cannot determine which one to use. Found files: " + createFileNamesString(files));
-        }
-
-        return files[0];
-    }
-
-    private static StringBuilder createFileNamesString(File[] files) {
-        StringBuilder fileNames = new StringBuilder();
-        for (File f : files)
-        {
-            fileNames.append(f.getName() + ", ");
-        }
-        fileNames.delete(fileNames.length() - 2, fileNames.length()); // Remove the trailing ', '
-        return fileNames;
-    }
-
-    //just a function to help debugging. If we can't find the constructor we want, this dumps out what is available.
-
-    public static String dumpConstructors(Class classInQuestion) {
-        StringBuilder builder = new StringBuilder();
-        Constructor[] constructors = classInQuestion.getConstructors();
-        for (int index = 0; index < constructors.length; index++) {
-            Constructor constructor = constructors[index];
-            builder.append(constructor).append('\n');
-        }
-
-        return builder.toString();
-    }
-
-
-    public static String dumpMethods(Class classInQuestion) {
-        StringBuilder builder = new StringBuilder();
-
-        Method[] methods = classInQuestion.getMethods();
-        for (int index = 0; index < methods.length; index++) {
-            Method method = methods[index];
-            builder.append(method).append('\n');
-        }
-
-        return builder.toString();
-    }
-
-    /**
-     * This attempts to load the a class from the specified gradle home directory.
-     * @param classToLoad  the full path to the class to load
-     * @param  parentClassLoader    Your classloader. Probably the classloader
-     *                              of whatever class is calling this.
-     * @param  gradleHomeDirectory  the root directory of a gradle installation
-     * @param  showDebugInfo        true to show some additional information that
-     *                              may be helpful diagnosing problems is this
-     *                              fails
-     */
-    public static Class loadGradleClass( String classToLoad, ClassLoader parentClassLoader, File gradleHomeDirectory, boolean showDebugInfo ) throws Exception
-    {
-       ClassLoader bootStrapClassLoader = getGradleClassloader( parentClassLoader, gradleHomeDirectory, showDebugInfo );
-       Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
-
-       //load the class in gradle that wraps our return interface and handles versioning issues.
-      try
-      {
-         return bootStrapClassLoader.loadClass( classToLoad );
-      }
-      catch( NoClassDefFoundError e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-         return null;
-      }
-      catch( Throwable e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-         return null;
-      }
-    }
-
-     /**
-     * This wraps up invoking a static method into a single call.
-     * @param classToInvoke the class that has the method
-     * @param methodName    the name of the method to invoke
-     * @param argumentsClasses the classes of the arguments (we can't determine this from the argumentValues
-     *                          because they can be of class A, but implement class B and B is be the argument
-     *                          type of the method in question
-     * @param argumentValues   the values of the arguments.
-     * @return the return value of invoking the method.
-     * @throws Exception
-     */
-    public static Object invokeStaticMethod( Class classToInvoke, String methodName, Class[] argumentsClasses, Object ... argumentValues) throws Exception
-    {
-      Method method = null;
-      try
-      {
-         method = classToInvoke.getDeclaredMethod( methodName, argumentsClasses );
-      }
-      catch( NoSuchMethodException e )
-      {
-         e.printStackTrace();
-         System.out.println( "Dumping available methods on " + classToInvoke.getName() + "\n" + ExternalUtility.dumpMethods( classToInvoke ) );
-         throw e;
-      }
-      return method.invoke( null, argumentValues);
-    }
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion1.java
deleted file mode 100644
index 857d6f6..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion1.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.foundation;
-
-import org.gradle.openapi.external.ui.CommandLineArgumentAlteringListenerVersion1;
-import java.io.File;
-import java.util.List;
-
-/**
- * This is an abstraction from Gradle that allows you to retrieve projects
- * and views from it.
- *
- * This is a mirror of GradlePluginLord inside Gradle, but this is meant
- * to aid backward and forward compatibility by shielding you from direct
- * changes within gradle.
- *
- * @author mhunsicker
-
- */
-public interface GradleInterfaceVersion1 {
-
-    /**
-     * @return the root projects. It probably only has one.
-     */
-    public List<ProjectVersion1> getRootProjects();
-
-    /**
-    This refreshes the projects and task list.
-    */
-   public void refreshTaskTree();
-
-   /**
-      Determines if commands are currently being executed or not.
-      @return true if we're busy, false if not.
-   */
-   public boolean isBusy();
-
-    /*
-      Call this to execute the given gradle command.
-
-      @param  commandLineArguments the command line arguments to pass to gradle.
-      @param displayName           the name displayed in the UI for this command
-      @author mhunsicker
-   */
-   public void executeCommand( String commandLineArguments, String displayName );
-
-   /*
-      @return the root directory of your gradle project.
-      @author mhunsicker
-   */
-   public File getCurrentDirectory();
-
-   /*
-      @param  currentDirectory the new root directory of your gradle project.
-      @author mhunsicker
-   */
-   public void setCurrentDirectory( File currentDirectory );
-
-   /*
-      @return the gradle home directory. Where gradle is installed.
-      @author mhunsicker
-   */
-   public File getGradleHomeDirectory();
-
-   /*
-      This is called to get a custom gradle executable file. If you don't run
-      gradle.bat or gradle shell script to run gradle, use this to specify
-      what you do run. Note: we're going to pass it the arguments that we would
-      pass to gradle so if you don't like that, see alterCommandLineArguments.
-      Normally, this should return null.
-      @return the Executable to run gradle command or null to use the default
-      @author mhunsicker
-   */
-   public File getCustomGradleExecutable();
-
-   /*
-      This allows you to add a listener that can add additional command line
-      arguments whenever gradle is executed. This is useful if you've customized
-      your gradle build and need to specify, for example, an init script.
-
-      @param  listener   the listener that modifies the command line arguments.
-      @author mhunsicker
-   */
-   public void addCommandLineArgumentAlteringListener( CommandLineArgumentAlteringListenerVersion1 listener );
-   public void removeCommandLineArgumentAlteringListener( CommandLineArgumentAlteringListenerVersion1 listener );
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion2.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion2.java
deleted file mode 100644
index 4120eb0..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion2.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.foundation;
-
-import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * This is an abstraction from Gradle that allows you to retrieve projects
- * and views from it.
- *
- * This is a mirror of GradlePluginLord inside Gradle, but this is meant
- * to aid backward and forward compatibility by shielding you from direct
- * changes within gradle.
- *
- * @author mhunsicker
-
- */
-public interface GradleInterfaceVersion2 extends GradleInterfaceVersion1 {
-
-    /**
-     * @return the version of gradle being run. This is basically the version from the jar file.
-     */
-    public String getVersion();
-
-    /**
-    This refreshes the projects and task list.
-    */
-   public RequestVersion1 refreshTaskTree2();
-
-   /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    @param additionalCommandLineArguments additional command line arguments to be passed to gradle when
-                                          refreshing the task tree.
-    @return the request object. Useful if you want to track its completion via a RequestObserver
-    */
-   public RequestVersion1 refreshTaskTree2( String additionalCommandLineArguments );
-
-    /**
-      Call this to execute the given gradle command.
-
-      @param  commandLineArguments the command line arguments to pass to gradle.
-      @param displayName           the name displayed in the UI for this command
-      @return the request object. Useful if you want to track its completion via a RequestObserver
-      @author mhunsicker
-   */
-   public RequestVersion1 executeCommand2( String commandLineArguments, String displayName );
-
-    /**
-     * Executes several favorites commands at once as a single command. This has the affect
-     * of simply concatenating all the favorite command lines into a single line.
-     * @param favorites a list of favorites. If just one favorite, it executes it normally.
-     *                  If multiple favorites, it executes them all at once as a single command.
-     *                  This blindly concatenates them so it may wind up with duplicate tasks on
-     *                  the command line.
-     * @return the request object. Useful if you want to track its completion via a RequestObserver
-     */
-    public RequestVersion1 executeFavorites(List<FavoriteTaskVersion1> favorites);
-
-    /**
-     * Sets a custom gradle executable. See getCustomGradleExecutable
-     * @param customGradleExecutor the path to an executable (or script/batch file)
-     */
-   public void setCustomGradleExecutable(File customGradleExecutor);
-
-    /**
-     * Adds an observer that is notified when Gradle commands are executed and
-     * completed.
-     * @param observer the observer that is notified
-     */
-   public void addRequestObserver( RequestObserverVersion1 observer );
-
-    /**
-     * Removes a request observer when you no longer wish to receive notifications
-     * about Gradle command being executed.
-     * @param observer the observer to remove
-     */
-   public void removeRequestObserver( RequestObserverVersion1 observer );
-}
\ No newline at end of file
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/ProjectVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/ProjectVersion1.java
deleted file mode 100644
index 874d03e..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/ProjectVersion1.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.foundation;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * This is an abstraction of a Gradle project
- *
- * This is a mirror of ProjectView inside Gradle, but this is meant
- * to aid backward and forward compatibility by shielding you from direct
- * changes within gradle. 
- *
- * @author mhunsicker
-
- */
-public interface ProjectVersion1 {
-
-    /**
-     * @return the name of this project
-     */
-    public String getName();
-
-    /**
-     * @return The full project name. This is just the project name if its off of the root.
-     * Otherwise, its all of its ancestors separated by colons with this project being last.
-     */
-    public String getFullProjectName();
-
-    /**
-     * @return the TaskVersion1 objects associated with this project
-     */
-    public List<TaskVersion1> getTasks();
-
-    /**
-     * @return the .gradle file this project is defined in
-     */
-    public File getFile();
-
-
-    /**
-     * @return the sub projects of this project
-     */
-    public List<ProjectVersion1> getSubProjects();
-
-    /**
-     * @return the parent of this project if this is a sub project. Otherwise, null
-     */
-    public ProjectVersion1 getParentProject();
-
-    /**
-     * @return a list of projects that this project depends on.
-     */
-    public List<ProjectVersion1> getDependantProjects();
-
-    public ProjectVersion1 getSubProject( String name );
-
-    public ProjectVersion1 getSubProjectFromFullPath(String fullProjectName);
-
-    public TaskVersion1 getTask(String name);
-
-    /**
-     * Builds a list of default tasks. These are defined by specifying
-     *
-     * defaultTasks 'task name'
-     *
-     * in the gradle file. There can be multiple default tasks. This only returns default tasks directly for this
-     * project and does not return them for subprojects.
-     *
-     * @return a list of default tasks or an empty list if none exist
-     */
-    public List<TaskVersion1> getDefaultTasks();
-
-    public TaskVersion1 getTaskFromFullPath(String fullTaskName);
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestObserverVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestObserverVersion1.java
deleted file mode 100644
index 72d3f86..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestObserverVersion1.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.foundation;
-
-/**
- * This allows you to observer when Gradle commands are executed/complete. It is
- * an abstraction of a GradlePluginLord.RequestObserver.
- *
- * This is a mirror of GradlePluginLord.RequestObserver inside Gradle, but
- * this is meant to aid backward and forward compatibility by shielding you
- * from direct changes within gradle.
- *
- * @author mhunsicker
- */
-public interface RequestObserverVersion1 {
-
-    /**
-     * Notification that an execution request was added to the queue. This is
-     * the normal request that initiates a gradle command.
-     * @param request the request that was added
-     */
-  public void executionRequestAdded( RequestVersion1 request );
-
-    /**
-     * Notification that a refresh request was added to the queue. This type
-     * of request updates the task tree.
-     * @param request
-     */
-  public void refreshRequestAdded( RequestVersion1 request );
-
-  /**
-   * Notification that a command is about to be executed. This is mostly useful
-   * for IDE's that may need to save their files. This is always called after
-   * a request has been added to the queue.
-  */
-  public void aboutToExecuteRequest( RequestVersion1 request );
-
-  /**
-   * Notification that a request has completed execution.
-   * @param request the original request containing the command that was executed
-   * @param result the result of the command
-   * @param output the output from gradle executing the command
-   */
-  public void requestExecutionComplete( RequestVersion1 request, int result, String output );
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoriteTaskVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoriteTaskVersion1.java
deleted file mode 100644
index d7b239a..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoriteTaskVersion1.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.foundation.favorites;
-
-/**
- * This is an abstraction from Gradle that allows you to work with a 'favorite' task.
- *
- * This is a mirror of FavoriteTask inside Gradle, but this is meant
- * to aid backward and forward compatibility by shielding you from direct
- * changes within gradle.
- *
- * You should not implement this yourself. Only use an implementation coming from Gradle.
- *
- * @author mhunsicker
- */
-public interface FavoriteTaskVersion1
-{
-    /**<!====== getFullCommandLine ============================================>
-       @return the command line that is executed
-       @author mhunsicker
-    <!=======================================================================>*/
-    public String getFullCommandLine();
-
-    /**<!====== getDisplayName ================================================>
-       @return a display name for this command
-       @author mhunsicker
-    <!=======================================================================>*/
-    public String getDisplayName();
-
-    /**<!====== alwaysShowOutput ==============================================>
-       @return true if executing this command should always show the output, false
-               to only show output if an error occurs.
-       @author mhunsicker
-    <!=======================================================================>*/
-    public boolean alwaysShowOutput();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoritesEditorVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoritesEditorVersion1.java
deleted file mode 100644
index 77e8bda..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoritesEditorVersion1.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.foundation.favorites;
-
-import org.gradle.openapi.external.foundation.TaskVersion1;
-
-import java.awt.*;
-import java.util.List;
-
-/**
- * This is an abstraction from Gradle that allows you to obtain and edit favorites.
- *
- * This is a mirror of FavoritesEditor inside Gradle, but this is meant
- * to aid backward and forward compatibility by shielding you from direct
- * changes within gradle.
- *
- * @author mhunsicker
-
- */
-public interface FavoritesEditorVersion1 {
-
-    /**
-     * Adds the specified favorite.
-     *
-     * @param fullCommandLine the command line that this favorite executes
-     * @param displayName  a more user-friendly name for the command
-     * @param alwaysShowOutput true to always show output when this favorite is executed. False to only show output when errors occur.
-     * @return the favorite added
-     */
-    public FavoriteTaskVersion1 addFavorite(String fullCommandLine, String displayName, boolean alwaysShowOutput);
-
-    /**
-     * Sets new values on the specified favorite task. This provides a simple way to programmatically edit favorite tasks.
-     * @param favoriteTask the favorite to edit
-     * @param newFullCommandLine the new command line
-     * @param newDisplayName the new display name
-     * @param newAlwaysShowOutput the new value for whether or not to always show output (vs only showing it when an error occurs).
-     * @returns null if successful otherwise, an error suitable for displaying to the user.
-     */
-    public String editFavorite( FavoriteTaskVersion1 favoriteTask, String newFullCommandLine, String newDisplayName, boolean newAlwaysShowOutput );
-
-    /**
-     * @return a list of all favorites in the system
-     */
-    public List<FavoriteTaskVersion1> getFavoriteTasks();
-
-    /**
-     * Returns the favorite with the specified command line
-     * @param fullCommandLine the command line of the sought favorite
-     * @return the matching favorite or null if no match found.
-     */
-    public FavoriteTaskVersion1 getFavorite(String fullCommandLine);
-
-    /**
-     * Returns the favorite with the specified display name
-     * @param displayName the display name of the sought favorite
-     * @return the matching favorite or null if no match found.
-     */
-    public FavoriteTaskVersion1 getFavoriteByDisplayName(String displayName);
-
-    /**
-     * Returns the favorite with the specified task
-     * @param task the task of the sought favorite
-     * @return the matching favorite or null if no match found.
-     */
-    public FavoriteTaskVersion1 getFavorite( TaskVersion1 task);
-
-    /**
-     * Display a Swing dialog prompting the user to enter a favorite.
-     * @param parent the parent window of the dialog.
-     * @return the favorite that was added or null if the user canceled
-     */
-    public FavoriteTaskVersion1 promptUserToAddFavorite( Window parent );
-
-    /**
-     * Display a Swing dialog prompting the user to edit the specified favorite
-     * @param parent the parent window of the dialog
-     * @param favorite the favorite to edit
-     * @return true if the user made changes and accepted them, false if the user canceled.
-     */
-    public boolean promptUserToEditFavorite( Window parent, FavoriteTaskVersion1 favorite );
-
-    /**
-     * Removes the specified favorites.
-     * @param favoritesToRemove the favorites to remove
-     */
-    public void removeFavorites( List<FavoriteTaskVersion1> favoritesToRemove);
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerFactory.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerFactory.java
deleted file mode 100644
index e925d97..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerFactory.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.runner;
-
-import org.gradle.openapi.external.ExternalUtility;
-
-import java.io.File;
-import java.lang.reflect.Constructor;
-
-/**
-
- This provides a simple way to execute gradle commands from an external
- process. call createGradleRunner to instantiate a gradle runner. You can then
- use that to execute commands.
-
- @author mhunsicker
-  */
-public class GradleRunnerFactory
-{
-   /*
-      Call this to instantiate an object that you can use to execute gradle
-      commands directly.
-
-      Note: this function is meant to be backward and forward compatible. So
-      this signature should not change at all, however, it may take and return
-      objects that implement ADDITIONAL interfaces. That is, it will always
-      return a GradleRunnerVersion1, but it may also be an object that implements
-      GradleRunnerVersion2 (notice the 2). The caller will need to dynamically
-      determine that. The GradleRunnerInteractionVersion1 may take an object
-      that also implements GradleRunnerInteractionVersion2. If so, we'll
-      dynamically determine that and handle it. Of course, this all depends on
-      what happens in the future.
-
-      @param  parentClassLoader    Your classloader. Probably the classloader
-                                   of whatever class is calling this.
-      @param  gradleHomeDirectory  the root directory of a gradle installation
-      @param  interaction          this is how we interact with the caller.
-      @param  showDebugInfo        true to show some additional information that
-                                   may be helpful diagnosing problems is this
-                                   fails
-      @return a gradle runner
-      @author mhunsicker
-   */
-   public static GradleRunnerVersion1 createGradleRunner( ClassLoader parentClassLoader, File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-       //much of this function is exception handling so if we can't obtain it via the newer factory method, then
-       //we'll try the old way, but we want to report the original exception if we can't do it either way.
-       Exception viaFactoryException = null;
-       GradleRunnerVersion1 gradleRunner = null;
-
-       //first, try it the new way
-       try {
-           gradleRunner = createGradleRunnerViaFactory(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
-       } catch (Exception e) {
-           //we might ignore this. It means we're probably using an older version of gradle. That case is handled below.
-           //If not, this exception will be thrown at the end.
-           viaFactoryException = e;
-       }
-
-       //try it the old way
-       if( gradleRunner == null ) {
-           gradleRunner = createGradleRunnerOldWay(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
-       }
-
-       //if we still don't have a gradle runner and we have an exception from using the factory, throw it. If we
-       //got an exception using the 'old way', it would have been thrown already and we wouldn't be here.
-       if( gradleRunner == null && viaFactoryException != null ) {
-           throw viaFactoryException;
-       }
-
-       return gradleRunner;
-   }
-
-    /**
-     * This function uses a factory to instantiate a GradleRunner. The factory is located with the version of gradle
-     * pointed to by gradleHomeDirectory and thus allows the version of gradle being loaded to make decisions
-     * about how to instantiate the runner. This is needed as multiple versions of the runner are being used.
-     */
-   private static GradleRunnerVersion1 createGradleRunnerViaFactory( ClassLoader parentClassLoader, File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-      //load the class in gradle that wraps our return interface and handles versioning issues.
-      Class soughtClass = ExternalUtility.loadGradleClass( "org.gradle.openapi.wrappers.RunnerWrapperFactory", parentClassLoader, gradleHomeDirectory, showDebugInfo );
-      if( soughtClass == null )
-      {
-         return null;
-      }
-
-      Class[] argumentClasses = new Class[ ] { File.class, GradleRunnerInteractionVersion1.class, boolean.class };
-
-      Object gradleRunner = ExternalUtility.invokeStaticMethod( soughtClass, "createGradleRunner", argumentClasses, gradleHomeDirectory, interaction, showDebugInfo );
-      return (GradleRunnerVersion1) gradleRunner;
-   }
-
-   /**
-     * This function uses an early way (early 0.9 pre-release and sooner) of instantiating the GradleRunner and
-     * should no longer be used. It unfortunately is tied to a single wrapper class instance (which it tries to
-     * directly instantiate). This doesn't allow the GradleRunner to adaptively determine what to instantiate.
-     */
-   private static GradleRunnerVersion1 createGradleRunnerOldWay( ClassLoader parentClassLoader, File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-      ClassLoader bootStrapClassLoader = ExternalUtility.getGradleClassloader( parentClassLoader, gradleHomeDirectory, showDebugInfo );
-      Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
-
-      //load the class in gradle that wraps our return interface and handles versioning issues.
-      Class soughtClass = null;
-      try
-      {
-         soughtClass = bootStrapClassLoader.loadClass( "org.gradle.openapi.wrappers.runner.GradleRunnerWrapper" );
-      }
-      catch( NoClassDefFoundError e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-         return null;
-      }
-      catch( ClassNotFoundException e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-         return null;
-      }
-
-      if( soughtClass == null ) {
-         return null;
-      }
-
-      //instantiate it.
-      Constructor constructor = null;
-      try
-      {
-         constructor = soughtClass.getDeclaredConstructor( File.class, GradleRunnerInteractionVersion1.class );
-      }
-      catch( NoSuchMethodException e )
-      {
-         e.printStackTrace();
-         System.out.println( "Dumping available constructors on " + soughtClass.getName() + "\n" + ExternalUtility.dumpConstructors( soughtClass ) );
-
-         throw e;
-      }
-
-      Object gradleRunner = constructor.newInstance( gradleHomeDirectory, interaction );
-
-      return (GradleRunnerVersion1) gradleRunner;
-   }
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerInteractionVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerInteractionVersion1.java
deleted file mode 100644
index 3609844..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerInteractionVersion1.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.runner;
-
-import java.io.File;
-
-/**
-
- .
-
- @author mhunsicker
-  */
-public interface GradleRunnerInteractionVersion1
-{
-   /*
-      @return The root directory of your gradle project. The same directory
-      Where you would run gradle from the command.
-      @author mhunsicker
-   */
-   public File getWorkingDirectory();
-
-   public enum LogLevel { Quiet, Lifecycle, Debug }
-   public enum StackTraceLevel { InternalExceptions, Always, AlwaysFull }
-
-   /*
-      @return the log level. This determines the detail level of information
-      reported via reportLiveOutput and reportExecutionFinished.
-      @author mhunsicker
-   */
-   public LogLevel getLogLevel();
-
-   /*
-      @return the stack trace level. This determines the detail level of any
-      stack traces should an exception occur.
-      @author mhunsicker
-   */
-   public StackTraceLevel getStackTraceLevel();
-
-   /*
-      Notification that overall execution has been started. This is only called
-      once at the end.
-      @author mhunsicker
-   */
-   public void reportExecutionStarted();
-
-   /**
-      Notification of the total number of tasks that will be executed. This is
-      called after reportExecutionStarted and before any tasks are executed.
-      @param size the total number of tasks.
-   */
-   public void reportNumberOfTasksToExecute( int size );
-
-   /*
-      Notification that a single task has completed. Note: the task you kicked
-      off probably executes other tasks and this notifies you of those tasks
-      and provides completion progress.
-
-      @param  currentTaskName the task being executed
-      @param  percentComplete the percent complete of all the tasks that make
-                              up the task you requested.
-      @author mhunsicker
-   */
-   public void reportTaskStarted( String currentTaskName, float percentComplete );
-
-   public void reportTaskComplete( String currentTaskName, float percentComplete );
-
-   /*
-      Report real-time output from gradle and its subsystems (such as ant).
-      @param  output     a single line of text to show.
-      @author mhunsicker
-   */
-   public void reportLiveOutput( String output );
-
-   public void reportExecutionFinished( boolean wasSuccessful, String message, Throwable throwable );
-
-   /*
-      This is called to get a custom gradle executable file. If you don't run
-      gradle.bat or gradle shell script to run gradle, use this to specify
-      what you do run. Note: we're going to pass it the arguments that we would
-      pass to gradle so if you don't like that, see alterCommandLineArguments.
-      Normaly, this should return null.
-      @return the Executable to run gradle command or null to use the default
-      @author mhunsicker
-   */
-   public File getCustomGradleExecutable();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerVersion1.java
deleted file mode 100644
index 0680290..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerVersion1.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.runner;
-
-/*
- This executes gradle commands in an external process.
-
- @author mhunsicker
-  */
-public interface GradleRunnerVersion1
-{
-   /*
-      Call this to execute the specified command line.
-
-      @param  commandLine the command to execute
-      @author mhunsicker
-   */
-   public void executeCommand( String commandLine );
-
-   /*
-      Call this to stop the gradle command. This is killing the process, not
-      gracefully exiting.
-      @author mhunsicker
-   */
-   public void killProcess();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/AlternateUIInteractionVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/AlternateUIInteractionVersion1.java
deleted file mode 100644
index 676f62f..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/AlternateUIInteractionVersion1.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import java.io.File;
-
-/*
- This is how the gradle UI panel interacts with the UI that is holding it.
-
- This is a mirror of AlternateUIInteraction inside Gradle, but this is meant
- to aid backward and forward compatibility by shielding you from direct
- changes within gradle.
-
- @author mhunsicker
- */
-public interface AlternateUIInteractionVersion1
-{
-   /**
-    Notification that you should open the specified file and go to the specified line. Its up to the
-    application to determine if this file should be opened for editing or simply displayed. The difference
-    comes into play for things like xml or html files where a user may want to open them in a browser vs
-    a source code file where they may want to open it directly in an IDE.
-
-    @param file the file to edit
-    @param line the line to go to. -1 if no line is specified.
-    */
-   public void openFile( File file, int line );
-
-   /*
-      This is called when we should open the specified file for editing. This version explicitly wants them
-      edited versus just opened.
-
-      @param  file      the file to open
-      @param line the line to go to. -1 if no line is specified.
-      @author mhunsicker
-   */
-   public void editFile( File file, int line );
-
-   /*
-      Determines if we can call editFiles or openFile. This is not a dynamic answer
-      and should always return either true of false. If you want to change the
-      answer, return true and then handle the files differently in editFiles.
-      @return true if support editing files, false otherwise.
-      @author mhunsicker
-   */
-   public boolean doesSupportEditingOpeningFiles();
-
-   /**
-    Notification that a command is about to be executed. This is mostly useful
-    for IDE's that may need to save their files.
-
-    @param fullCommandLine the command that's about to be executed.
-    @author mhunsicker
-    */
-   public void aboutToExecuteCommand( String fullCommandLine );
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/BasicGradleUIVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/BasicGradleUIVersion1.java
deleted file mode 100644
index f5f2982..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/BasicGradleUIVersion1.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import org.gradle.openapi.external.foundation.GradleInterfaceVersion1;
-import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1;
-import javax.swing.*;
-import java.io.File;
-
-/*
- This represents a basic gradle UI
-
- To use this, you'll want to get an instance of this from Gradle. Then setup
- your UI and add this to it via getComponent. Then call aboutToShow before
- you display your UI. Call close before you hide your UI. You'll need to set
- the current directory (at any time) so gradle knows where your project is
- located.
-
- @author mhunsicker
-  */
-public interface BasicGradleUIVersion1
-{
-   /*
-      Call this whenever you're about to show this panel. We'll do whatever
-      initialization is necessary.
-      @author mhunsicker
-   */
-   public void aboutToShow();
-
-   //
-            public interface CloseInteraction
-            {
-               /*
-                  This is called if gradle tasks are being executed and you want to know if
-                  we can close. Ask the user.
-                  @return true if the user confirms cancelling the current tasks. False if not.
-                  @author mhunsicker
-               */
-               public boolean promptUserToConfirmClosingWhileBusy();
-            }
-
-   /*
-      Call this to determine if you can close this pane. if we're busy, we'll
-      ask the user if they want to close.
-
-      @param  closeInteraction allows us to interact with the user
-      @return true if we can close, false if not.
-      @author mhunsicker
-   */
-   public boolean canClose( CloseInteraction closeInteraction );
-
-   /*
-      Call this before you close the pane. This gives it an opportunity to do
-      cleanup. You probably should call canClose before this. It gives the
-      app a chance to cancel if its busy.
-      @author mhunsicker
-   */
-   public void close();
-
-   /*
-      @return the root directory of your gradle project.
-      @author mhunsicker
-   */
-   public File getCurrentDirectory();
-
-   /*
-      @param  currentDirectory the new root directory of your gradle project.
-      @author mhunsicker
-   */
-   public void setCurrentDirectory( File currentDirectory );
-
-   /*
-      @return the gradle home directory. Where gradle is installed.
-      @author mhunsicker
-   */
-   public File getGradleHomeDirectory();
-
-   /*
-      This is called to get a custom gradle executable file. If you don't run
-      gradle.bat or gradle shell script to run gradle, use this to specify
-      what you do run. Note: we're going to pass it the arguments that we would
-      pass to gradle so if you don't like that, see alterCommandLineArguments.
-      Normally, this should return null.
-      @return the Executable to run gradle command or null to use the default
-      @author mhunsicker
-   */
-   public File getCustomGradleExecutable();
-
-   /*
-      Call this to add an additional tab to the gradle UI. You can call this
-      at any time.
-
-      @param  index             the index of where to add the tab.
-      @param  gradleTabVersion1 the tab to add.
-      @author mhunsicker
-   */
-   public void addTab( int index, GradleTabVersion1 gradleTabVersion1 );
-
-   /*
-      Call this to remove one of your own tabs from this.
-      @param  gradleTabVersion1 the tab to remove
-      @author mhunsicker
-   */
-   public void removeTab( GradleTabVersion1 gradleTabVersion1 );
-
-   /*
-      @return the total number of tabs.
-      @author mhunsicker
-   */
-   public int getGradleTabCount();
-
-   /*
-      @param  index      the index of the tab
-      @return the name of the tab at the specified index.
-      @author mhunsicker
-   */
-   public String getGradleTabName( int index );
-
-    /**
-     * Returns the index of the gradle tab with the specified name.
-     * @param name the name of the tab
-     * @return the index of the tab or -1 if not found
-     */
-    public int getGradleTabIndex( String name );
-
-    /**
-     * @return the currently selected tab
-     */
-    public int getCurrentGradleTab();
-
-    /**
-     * Makes the specified tab the current tab.
-     * @param index the index of the tab.
-     */
-    public void setCurrentGradleTab( int index );
-
-   /*
-      This allows you to add a listener that can add additional command line
-      arguments whenever gradle is executed. This is useful if you've customized
-      your gradle build and need to specify, for example, an init script.
-
-      @param  listener   the listener that modifies the command line arguments.
-      @author mhunsicker
-   */
-   public void addCommandLineArgumentAlteringListener( CommandLineArgumentAlteringListenerVersion1 listener );
-
-   public void removeCommandLineArgumentAlteringListener( CommandLineArgumentAlteringListenerVersion1 listener );
-
-   /*
-      Call this to execute the given gradle command.
-
-      @param  commandLineArguments the command line arguments to pass to gradle.
-      @param displayName           the name displayed in the UI for this command
-      @author mhunsicker
-   */
-   public void executeCommand( String commandLineArguments, String displayName );
-
-   /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    */
-   public void refreshTaskTree();
-
-    /**
-     * @return the output lord which shows the live output of all commands being executed. You can add observers to this as well as alter how it finds file links. 
-     */
-   public OutputUILordVersion1 getOutputLord();
-
-    //these were moved to OutputUILordVersion1, but remain here for backward compatibility
-   public void addOutputObserver( OutputObserverVersion1 outputObserverVersion1 );
-   public void removeOutputObserver( OutputObserverVersion1 outputObserverVersion1 );    
-
-   /**
-      Determines if commands are currently being executed or not.
-      @return true if we're busy, false if not.
-   */
-   public boolean isBusy();
-
-   /**
-    Determines whether output is shown only when errors occur or always
-    @return true to only show output if errors occur, false to show it always.
-    */
-   public boolean getOnlyShowOutputOnErrors();
-
-   /**
-    This adds the specified component to the setup panel. It is added below the last
-    'default' item. You can only add 1 component here, so if you need to add multiple
-    things, you'll have to handle adding that to yourself to the one component.
-    @param component the component to add.
-    */
-   public void setCustomPanelToSetupTab( JComponent component );
-
-    /**
-     * This returns an object that works with lower level gradle and contains the
-     * current projects and tasks. You can also execute tasks from it and perform
-     * certain setup.
-     * @return a GradleInterfaceVersion1 object. It may also be GradleInterfaceVersion2 or
-     * a future version. You can check its type and then cast it as appropriate.
-     * This allows the caller to be backward compatible.
-     */
-   public GradleInterfaceVersion1 getGradleInterfaceVersion1();
-
-    /**
-     * Returns a FavoritesEditor. This is useful for getting a list of all favorites or
-     * modifying them.
-     * @return a FavoritesEditorVersion1. Use this to interact with the favorites.
-     */
-   public FavoritesEditorVersion1 getFavoritesEditor();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/CommandLineArgumentAlteringListenerVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/CommandLineArgumentAlteringListenerVersion1.java
deleted file mode 100644
index cac7d5e..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/CommandLineArgumentAlteringListenerVersion1.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-/**
- This allows you to add a listener that can add additional command line
- arguments whenever gradle is executed. This is useful if you've customized
- your gradle build and need to specify, for example, an init script.
-
- @author mhunsicker
-  */
-public interface CommandLineArgumentAlteringListenerVersion1
-{
-   /*
-      This is called when you can add additional command line arguments. Return
-      any additional arguments to add. This doesn't modify the existing commands.
-
-      @param  commandLineArguments the command line to execute.
-      @return any command lines to add or null to leave it alone
-      @author mhunsicker
-   */
-   public String getAdditionalCommandLineArguments( String commandLineArguments );
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIVersion1.java
deleted file mode 100644
index ac176f3..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIVersion1.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import javax.swing.JComponent;
-import java.awt.Component;
-
-/**
-This is a gradle UI that is broken into two panels: one contains a tabbed pane
- of tasks, favorites, command line, etc. The other pane contains the output.
- This is meant to simplify how an IDE plugin can interact with gradle. Specifically,
- this allows the 'main' pane to be vertical and the output pane to be horizontal.
-
- To use this, you'll want to get an instance of this from Gradle. Then setup
- your UI and add this to it via getComponent. Then call aboutToShow before
- you display your UI. Call close before you hide your UI. You'll need to set
- the current directory (at any time) so gradle knows where your project is
- located.
- */
-public interface DualPaneUIVersion1 extends BasicGradleUIVersion1
-{
-   /**
-      Returns a component that shows the task tree tab, favorites tab, etc.
-      suitable for inserting in your UI.
-      @return the main component
-    */
-   public JComponent getMainComponent();
-
-   /**
-      Returns a component that shows the output of the tasks being executed.
-      This is suitable for inserting in your UI.
-      @return the output component
-   */
-   public Component getOutputPanel();
-
-    /**
-     * This gets the number of opened output tabs. This is used by the Idea plugin
-     * to determine if it should close the entire output pane when a tab is closed
-     * This doesn't determine whether or not the tabs are busy. See
-     * GradleInterfaceVersion1.isBusy for that 
-     * @return the number of opened output tabs.
-     */
-   public int getNumberOfOpenedOutputTabs();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleTabVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleTabVersion1.java
deleted file mode 100644
index c381e2a..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleTabVersion1.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import java.awt.Component;
-
-/**
-
- This represents a tab that the caller can add to the gradle UI.
-
-  This is a mirror of GradleTab inside Gradle, but this is meant to aid
-  backward and forward compatibility by shielding you from direct changes
-  within gradle.
-
- @author mhunsicker
-  */
-public interface GradleTabVersion1
-{
-   /*
-      @return the name of this tab
-      @author mhunsicker
-   */
-   public String getName();
-
-   /*
-      This is where we should create your component.
-
-      @return the component
-      @author mhunsicker
-   */
-   public Component createComponent();
-
-   /*
-      Notification that this component is about to be shown. Do whatever
-      initialization you choose.
-      @author mhunsicker
-   */
-   public void aboutToShow();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleUIInteractionVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleUIInteractionVersion1.java
deleted file mode 100644
index 3408ba4..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleUIInteractionVersion1.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-/**
- This interface holds onto our options and allows us to interact with the
- caller. This is meant to interact with the Gradle UI across class loader
- and version boundaries. That is, the open API has a single entry point
- that shouldn't change across versions. New interfaces can be expected, but
- we'll always allow 'version1'. This is to provide backward/forward compatibility.
-
- @author mhunsicker
-*/
-public interface GradleUIInteractionVersion1
-{
-   /*
-      This is only called once and is how we get a hold of the AlternateUIInteraction.
-      @return an AlternateUIInteraction object. This cannot be null.
-      @author mhunsicker
-   */
-   public AlternateUIInteractionVersion1 instantiateAlternateUIInteraction();
-
-   /*
-      This is only called once and is how we get a hold of how the owner wants
-      to store preferences.
-      @return a settings object. This cannot be null.
-      @author mhunsicker
-   */
-   public SettingsNodeVersion1 instantiateSettings();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputObserverVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputObserverVersion1.java
deleted file mode 100644
index effb733..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputObserverVersion1.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-/**
- This interface informs you when the output pane is displaying requests. This is NOT
- for general output of gradle commands.
- This is a mirror of OutputUILord.OutputObserver inside Gradle, but this is meant to aid
- backward and forward compatibility by shielding you from direct changes within
- gradle.
-  */
-public interface OutputObserverVersion1
-{
-   /**
-      Notification that a request was added to the output. This means we've got some output
-      that is useful to display.
-      <!      Name             Description>
-      @param  requestID        an ID you can use to identify this request when it is complete.
-      @param  fullCommandLine  the command line for the request that was added
-      @param  displayName      the display name of this command (often the same as the full command line)
-      @param  forceOutputToBeShown true if this request wants to force its output to be shown
-   */
-   public void executionRequestAdded( long requestID, String fullCommandLine, String displayName, boolean forceOutputToBeShown );
-
-   /**
-    Notification that a refresh task list request was added to the output. This means we've got some output
-    that is useful to display.
-
-    @param requestID        an ID you can use to identify this request when it is complete.
-    @param forceOutputToBeShown true if this request wants to force its output to be shown
-    */
-   public void refreshRequestAdded( long requestID, boolean forceOutputToBeShown );
-
-   /**
-    Notification that a request is complete. Note: if its canceled, you'll just get an
-    outputTabClosed notification.
-
-    @param requestID     the ID of the request that is complete. It is given to you in
-                         executionRequestAdded or refreshRequestAdded.
-    @param wasSuccessful true if was successful, false if not or was cancelled.
-    */
-   public void requestComplete( long requestID, boolean wasSuccessful );
-
-   /**
-    Notification that an output tab was closed, possibly because it was canceled. You might want to
-    know this if you want to close your IDE output window when all tabs are closed.
-
-    @param requestID     the ID of the request associated with this tab. It is given to you in
-                         executionRequestAdded or refreshRequestAdded.
-    */
-   public void outputTabClosed( long requestID );
-
-
-   
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputUILordVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputUILordVersion1.java
deleted file mode 100644
index e37fffe..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputUILordVersion1.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import java.util.List;
-import java.awt.Font;
-
-/**
- Provides access to aspects of gradle's output
- * @author mhunsicker
- */
-public interface OutputUILordVersion1 {
-
-   public void setOutputTextFont( Font font );
-   public Font getOutputTextFont();
-
-    /**
-     Call this to add file extensions to look for in the output. The files will be highlighted
-     and are clickable by the user. This results in AlternateUIInteractionVersion1.editFile
-     or openFile being called. This assumes the file path is the first thing on the line.
-     @param extension the file extension
-     @param lineNumberDelimiter optional delimiter text for line number. Whatever is after
-             this will be assumed to be a line number. We'll only parse the numbers after
-             this so there can be other stuff after the line number. Pass in null to ignore.
-     */
-    public void addFileExtension( String extension, String lineNumberDelimiter );
-
-    /**
-     Creates a file link definition to find file paths in the output that have a known prefix and extension.
-     The files will be highlighted and are clickable by the user. This results in
-     AlternateUIInteractionVersion1.editFile or openFile being called.
-     It also allows for an optional line number after a delimiter. This is useful if you know a certain
-     message always precedes a file path.
-     @param name  the name of this file link definition. Used by tests mostly.
-     @param prefix  the text that is before the file path. It should be enough to make it fairly unique
-     @param extension  the expected file extension. If we don't find this extension, we do not consider
-             the text a file's path. If there are multiple extensions, you'll have to add multiples of these.
-     @param lineNumberDelimiter optional delimiter text for line number. Whatever is after
-             this will be assumed to be a line number. We'll only parse the numbers after
-             this so there can be other stuff after the line number. Pass in null to ignore.
-
-     */
-    public void addPrefixedFileLink( String name, String prefix, String extension, String lineNumberDelimiter );
-
-
-    /**
-     * @return a list of file extensions that are highlighted in the output
-     */
-    public List<String> getFileExtensions();
-
-   public void addOutputObserver( OutputObserverVersion1 outputObserverVersion1 );
-   public void removeOutputObserver( OutputObserverVersion1 outputObserverVersion1 );
-
-    /*
-    This re-executes the last execution command (ignores refresh commands).
-    This is potentially useful for IDEs to hook into (hotkey to execute last command).
-     */
-    public void reExecuteLastCommand();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SettingsNodeVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SettingsNodeVersion1.java
deleted file mode 100644
index b46e414..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SettingsNodeVersion1.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import java.util.List;
-
-/**
-
- Abstraction of how settings are stored. If you're implementing this, see
- SettingsNode for more information.
-
- This is a mirror of SettingsNode inside Gradle, but this is meant to aid
- backward and forward compatibility by shielding you from direct changes within
- gradle.
-
- @author mhunsicker
-  */
-public interface SettingsNodeVersion1
-{
-   public void setName( String name );
-   public String getName();
-
-   public void setValue( String value );
-   public String getValue();
-
-   public void setValueOfChild( String name, String value );
-   public String getValueOfChild( String name, String defaultValue );
-
-   public int getValueOfChildAsInt( String name, int defaultValue );
-   public void setValueOfChildAsInt( String name, int value );
-
-   public boolean getValueOfChildAsBoolean( String name, boolean defaultValue );
-   public void setValueOfChildAsBoolean( String name, boolean value );
-
-   public long getValueOfChildAsLong( String name, long defaultValue );
-   public void setValueOfChildAsLong( String name, long value );
-
-
-   public List<SettingsNodeVersion1> getChildNodes();
-   public List<SettingsNodeVersion1> getChildNodes( String name );
-
-   public SettingsNodeVersion1 addChild( String name );
-   public SettingsNodeVersion1 addChildIfNotPresent( String name );
-   public SettingsNodeVersion1 getChildNode( String name );
-
-   public SettingsNodeVersion1 getNodeAtPath( String ... pathPortions );
-
-   public void removeFromParent();
-   public void removeAllChildren();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIVersion1.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIVersion1.java
deleted file mode 100644
index 79d503d..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIVersion1.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import javax.swing.JComponent;
-
-/*
- This is a gradle UI that is entirely within a single panel (and only a panel;
- no dialog or frame). This is meant to simplify how a plugin can interact with
- gradle.
-
- To use this, you'll want to get an instance of this from Gradle. Then setup
- your UI and add this to it via getComponent. Then call aboutToShow before
- you display your UI. Call close before you hide your UI. You'll need to set
- the current directory (at any time) so gradle knows where your project is
- located.
-
- @author mhunsicker
-  */
-public interface SinglePaneUIVersion1 extends BasicGradleUIVersion1
-{
-   /**
-   Returns this panel as a Swing object suitable for inserting in your UI.
-   @return the main component
-      */
-   public JComponent getComponent();
-}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/UIFactory.java b/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/UIFactory.java
deleted file mode 100644
index c5553bb..0000000
--- a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/UIFactory.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.external.ui;
-
-import org.gradle.openapi.external.ExternalUtility;
-
-import java.io.File;
-import java.lang.reflect.Constructor;
-
-/*
- This loads up the main gradle UI. This is intended to be used as a plugin
- inside another application (like an IDE) in a dynamic fashion. If you're
- always going to ship the entire plugin with the entire Gradle dist, you don't
- need to use this. This is meant to dynamically load Gradle from its dist. The
- idea is that you point your plugin to a Gradle dist and then can always load
- the latest version.
-
- @author mhunsicker
-  */
-public class UIFactory
-{
-    private static final String UIWRAPPER_FACTORY_CLASS_NAME = "org.gradle.openapi.wrappers.UIWrapperFactory";
-    /*
-       Call this to instantiate a self-contained gradle UI. That is, everything in
-       the UI is in a single panel (versus 2 panels one for the tasks and one
-       for the output). This will load gradle via reflection, instantiate the UI
-       and all required gradle-related classes.
-
-       Note: this function is meant to be backward and forward compatible. So
-       this signature should not change at all, however, it may take and return
-       objects that implement ADDITIONAL interfaces. That is, it will always
-       return SinglePaneUIVersion1, but it may also be an object that implements
-       SinglePaneUIVersion2 (notice the 2). The caller will need to dynamically
-       determine that. The SinglePaneUIInteractionVersion1 may take an object
-       that also implements SinglePaneUIInteractionVersion2. If so, we'll
-       dynamically determine that and handle it. Of course, this all depends on
-       what happens in the future.
-       @param  parentClassLoader    Your classloader. Probably the classloader
-                                    of whatever class is calling this.
-       @param  gradleHomeDirectory  the root directory of a gradle installation
-       @param  singlePaneUIArguments this is how we interact with the caller.
-       @param  showDebugInfo        true to show some additional information that
-                                    may be helpful diagnosing problems is this
-                                    fails
-       @return the UI object.
-       @author mhunsicker
-    */
-   public static SinglePaneUIVersion1 createSinglePaneUI( ClassLoader parentClassLoader, File gradleHomeDirectory, final SinglePaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-       //much of this function is exception handling so if we can't obtain it via the newer factory method, then
-       //we'll try the old way, but we want to report the original exception if we can't do it either way.
-       Exception viaFactoryException = null;
-       SinglePaneUIVersion1 gradleUI = null;
-
-       //first, try it the new way
-       try {
-           gradleUI = createSinglePaneUIViaFactory( parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo );
-       } catch (Exception e) {
-           //we might ignore this. It means we're probably using an older version of gradle. That case is handled below.
-           //If not, this exception will be thrown at the end.
-           viaFactoryException = e;
-       }
-
-       //try it the old way
-       if( gradleUI == null ) {
-          gradleUI = createSinglePaneUIOldWay(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo );
-       }
-
-       //if we still don't have a gradle ui and we have an exception from using the factory, throw it. If we
-       //got an exception using the 'old way', it would have been thrown already and we wouldn't be here.
-       if( gradleUI == null && viaFactoryException != null ) {
-           throw viaFactoryException;
-       }
-
-       return gradleUI;
-   }
-
-    /**
-     * This function uses a factory to instantiate the UI. The factory is located with the version of gradle
-     * pointed to by gradleHomeDirectory and thus allows the version of gradle being loaded to make decisions
-     * about how to instantiate the UI. This is needed as multiple versions of the UI are being used.
-     */
-   private static SinglePaneUIVersion1 createSinglePaneUIViaFactory( ClassLoader parentClassLoader, File gradleHomeDirectory, final SinglePaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-      //load the class in gradle that wraps our return interface and handles versioning issues.
-      Class soughtClass = ExternalUtility.loadGradleClass(UIWRAPPER_FACTORY_CLASS_NAME, parentClassLoader, gradleHomeDirectory, showDebugInfo );
-      if( soughtClass == null )
-      {
-         return null;
-      }
-
-      Class[] argumentClasses = new Class[ ] { SinglePaneUIInteractionVersion1.class, boolean.class };
-
-      Object gradleUI = ExternalUtility.invokeStaticMethod( soughtClass, "createSinglePaneUI", argumentClasses, interaction, showDebugInfo );
-      return (SinglePaneUIVersion1) gradleUI;
-   }
-
-    /**
-     * This function uses an early way (early 0.9 pre-release and sooner) of instantiating the UI and should
-     * no longer be used. It unfortunately is tied to a single wrapper class instance (which it tries to
-     * directly instantiate). This doesn't allow the Gradle UI to adaptively determine what to instantiate.
-     */
-   private static SinglePaneUIVersion1 createSinglePaneUIOldWay( ClassLoader parentClassLoader, File gradleHomeDirectory, final SinglePaneUIInteractionVersion1 singlePaneUIArguments, boolean showDebugInfo ) throws Exception
-   {
-      ClassLoader bootStrapClassLoader = ExternalUtility.getGradleClassloader( parentClassLoader, gradleHomeDirectory, showDebugInfo );
-      Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
-
-      //load the class in gradle that wraps our return interface and handles versioning issues.
-      Class soughtClass = null;
-      try
-      {
-         soughtClass = bootStrapClassLoader.loadClass( "org.gradle.openapi.wrappers.ui.SinglePaneUIWrapper" );
-      }
-      catch( NoClassDefFoundError e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-         return null;
-      }
-      catch( ClassNotFoundException e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-      }
-      if( soughtClass == null )
-      {
-         return null;
-      }
-
-      //instantiate it.
-      Constructor constructor = null;
-      try
-      {
-         constructor = soughtClass.getDeclaredConstructor( SinglePaneUIInteractionVersion1.class );
-      }
-      catch( NoSuchMethodException e )
-      {
-         e.printStackTrace();
-         System.out.println( "Dumping available constructors on " + soughtClass.getName() + "\n" + ExternalUtility.dumpConstructors( soughtClass ) );
-
-         throw e;
-      }
-      Object singlePaneUI = constructor.newInstance( singlePaneUIArguments );
-      return (SinglePaneUIVersion1) singlePaneUI;
-   }
-
-   /*
-      Call this to instantiate a gradle UI that contains the main tab control
-      separate from the output panel. This allows you to position the output
-      however you like. For example: you can place the main pane along the side
-      going vertically and you can place the output pane along the bottom going
-      horizontally.
-      This will load gradle via reflection, instantiate the UI and all required
-      gradle-related classes.
-
-      Note: this function is meant to be backward and forward compatible. So
-      this signature should not change at all, however, it may take and return
-      objects that implement ADDITIONAL interfaces. That is, it will always
-      return SinglePaneUIVersion1, but it may also be an object that implements
-      SinglePaneUIVersion2 (notice the 2). The caller will need to dynamically
-      determine that. The SinglePaneUIInteractionVersion1 may take an object
-      that also implements SinglePaneUIInteractionVersion2. If so, we'll
-      dynamically determine that and handle it. Of course, this all depends on
-      what happens in the future.
-      @param  parentClassLoader    Your classloader. Probably the classloader
-                                   of whatever class is calling this.
-      @param  gradleHomeDirectory  the root directory of a gradle installation
-      @param  interaction          this is how we interact with the caller.
-      @param  showDebugInfo        true to show some additional information that
-                                   may be helpful diagnosing problems is this
-                                   fails
-      @return the UI object.
-      @author mhunsicker
-   */
-   public static DualPaneUIVersion1 createDualPaneUI( ClassLoader parentClassLoader, File gradleHomeDirectory, final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-       //much of this function is exception handling so if we can't obtain it via the newer factory method, then
-       //we'll try the old way, but we want to report the original exception if we can't do it either way.
-       Exception viaFactoryException = null;
-       DualPaneUIVersion1 gradleUI = null;
-
-       //first, try it the new way
-       try {
-           gradleUI = createDualPaneUIViaFactory( parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo );
-       } catch (Exception e) {
-           //we might ignore this. It means we're probably using an older version of gradle. That case is handled below.
-           //If not, this exception will be thrown at the end.
-           viaFactoryException = e;
-       }
-
-       //try it the old way
-       if( gradleUI == null ) {
-          gradleUI = createDualPaneUIOldWay(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo );
-       }
-
-       //if we still don't have a gradle ui and we have an exception from using the factory, throw it. If we
-       //got an exception using the 'old way', it would have been thrown already and we wouldn't be here.
-       if( gradleUI == null && viaFactoryException != null ) {
-           throw viaFactoryException;
-       }
-
-       return gradleUI;
-   }
-
-    /**
-     * This function uses a factory to instantiate the UI. The factory is located with the version of gradle
-     * pointed to by gradleHomeDirectory and thus allows the version of gradle being loaded to make decisions
-     * about how to instantiate the UI. This is needed as multiple versions of the UI are being used.
-     */
-   public static DualPaneUIVersion1 createDualPaneUIViaFactory( ClassLoader parentClassLoader, File gradleHomeDirectory, final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-      //load the class in gradle that wraps our return interface and handles versioning issues.
-      Class soughtClass = ExternalUtility.loadGradleClass(UIWRAPPER_FACTORY_CLASS_NAME, parentClassLoader, gradleHomeDirectory, showDebugInfo );
-      if( soughtClass == null )
-      {
-         return null;
-      }
-
-      Class[] argumentClasses = new Class[ ] { DualPaneUIInteractionVersion1.class, boolean.class };
-
-      Object gradleUI = ExternalUtility.invokeStaticMethod( soughtClass, "createDualPaneUI", argumentClasses, interaction, showDebugInfo );
-      return (DualPaneUIVersion1) gradleUI;
-   }
-
-    /**
-     * This function uses an early way (early 0.9 pre-release and sooner) of instantiating the UI and should no
-     * longer be used. It unfortunately is tied to a single wrapper class instance (which it tries to directly
-     * instantiate). This doesn't allow the Gradle UI to adaptively determine what to instantiate.
-     */
-   private static DualPaneUIVersion1 createDualPaneUIOldWay( ClassLoader parentClassLoader, File gradleHomeDirectory, final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception
-   {
-      ClassLoader bootStrapClassLoader = ExternalUtility.getGradleClassloader( parentClassLoader, gradleHomeDirectory, showDebugInfo );
-      Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
-
-      //load the class in gradle that wraps our return interface and handles versioning issues.
-      Class soughtClass = null;
-      try
-      {
-         soughtClass = bootStrapClassLoader.loadClass( "org.gradle.openapi.wrappers.ui.DualPaneUIWrapper" );
-      }
-      catch( NoClassDefFoundError e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-         return null;
-      }
-      catch( ClassNotFoundException e )
-      {  //might be a version mismatch
-         e.printStackTrace();
-      }
-      if( soughtClass == null )
-      {
-         return null;
-      }
-
-      //instantiate it.
-      Constructor constructor = null;
-      try
-      {
-         constructor = soughtClass.getDeclaredConstructor( DualPaneUIInteractionVersion1.class );
-      }
-      catch( NoSuchMethodException e )
-      {
-         e.printStackTrace();
-         System.out.println( "Dumping available constructors on " + soughtClass.getName() + "\n" + ExternalUtility.dumpConstructors( soughtClass ) );
-
-         throw e;
-      }
-      Object gradleUI = constructor.newInstance( interaction );
-      return (DualPaneUIVersion1) gradleUI;
-   }
-
-}
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPlugin.groovy b/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPlugin.groovy
deleted file mode 100644
index b0a65ef..0000000
--- a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPlugin.groovy
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.osgi;
-
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.plugins.JavaBasePlugin
-import org.gradle.api.plugins.JavaPlugin
-import org.gradle.api.tasks.SourceSet
-
-/**
- * <p>A {@link Plugin} which extends the {@link JavaPlugin} to add OSGi meta-information to the project JARs.</p>
- *
- * @author Hans Dockter
- */
-public class OsgiPlugin implements Plugin<Project> {
-    public void apply(Project project) {
-        project.getPlugins().apply(JavaBasePlugin.class);
-
-        OsgiPluginConvention osgiConvention = new OsgiPluginConvention(project);
-        project.convention.plugins.osgi = osgiConvention
-
-        project.plugins.withType(JavaPlugin.class).allPlugins {javaPlugin ->
-            OsgiManifest osgiManifest = osgiConvention.osgiManifest {
-                from project.manifest
-                classesDir = project.convention.plugins.java.sourceSets[SourceSet.MAIN_SOURCE_SET_NAME].classesDir
-                classpath = project.configurations[JavaPlugin.RUNTIME_CONFIGURATION_NAME]
-            }
-            project.jar.manifest = osgiManifest
-        }
-    }
-}
diff --git a/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactoryTest.java b/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactoryTest.java
deleted file mode 100644
index 6b51460..0000000
--- a/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactoryTest.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.internal.plugins.osgi;
-
-import org.junit.Test;import static org.junit.Assert.assertNotNull;
-
-/**
- * @author Hans Dockter
- */
-public class DefaultAnalyzerFactoryTest {
-    @Test
-    public void create() {
-        ContainedVersionAnalyzer analyzer = new DefaultAnalyzerFactory().create();
-        assertNotNull(analyzer);
-    }
-}
diff --git a/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginConventionTest.groovy b/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginConventionTest.groovy
deleted file mode 100644
index 6c4f183..0000000
--- a/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginConventionTest.groovy
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.osgi
-
-import spock.lang.Specification
-import org.gradle.util.HelperUtil
-import org.gradle.api.internal.project.DefaultProject
-import org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest
-import org.gradle.api.internal.plugins.osgi.OsgiHelper
-import org.gradle.api.plugins.JavaBasePlugin
-
-/**
- * @author Hans Dockter
- */
-class OsgiPluginConventionTest extends Specification {
-    DefaultProject project = HelperUtil.createRootProject()
-    OsgiPluginConvention osgiPluginConvention = new OsgiPluginConvention(project)
-
-    def setup() {
-        new JavaBasePlugin().apply(project)
-    }
-
-    def osgiManifestWithNoClosure() {
-        OsgiManifest osgiManifest = osgiPluginConvention.osgiManifest()
-
-        expect:
-        matchesExpectedConfig(osgiManifest)
-    }
-
-    def osgiManifestWithClosure() {
-        OsgiManifest osgiManifest = osgiPluginConvention.osgiManifest {
-            description = 'myDescription'    
-        }
-
-        expect:
-        matchesExpectedConfig(osgiManifest)
-        osgiManifest.description = 'myDescription'
-    }
-
-    void matchesExpectedConfig(DefaultOsgiManifest osgiManifest) {
-        OsgiHelper osgiHelper = new OsgiHelper();
-        assert osgiManifest.version == osgiHelper.getVersion((String) project.version)
-        assert osgiManifest.name == project.archivesBaseName
-        assert osgiManifest.symbolicName == osgiHelper.getBundleSymbolicName(project)
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFramework.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFramework.java
deleted file mode 100644
index 36673cd..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFramework.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.tasks.testing.junit;
-
-import org.gradle.api.Action;
-import org.gradle.api.internal.project.ServiceRegistry;
-import org.gradle.api.internal.tasks.testing.TestClassProcessor;
-import org.gradle.api.internal.tasks.testing.TestFramework;
-import org.gradle.api.internal.tasks.testing.WorkerTestClassProcessorFactory;
-import org.gradle.api.tasks.testing.Test;
-import org.gradle.api.tasks.testing.junit.JUnitOptions;
-import org.gradle.process.internal.WorkerProcessBuilder;
-import org.gradle.util.IdGenerator;
-
-import java.io.File;
-import java.io.Serializable;
-
-/**
- * @author Tom Eyckmans
- */
-public class JUnitTestFramework implements TestFramework {
-    private AntJUnitReport antJUnitReport;
-    private JUnitOptions options;
-    private JUnitDetector detector;
-    private final Test testTask;
-
-    public JUnitTestFramework(Test testTask) {
-        this.testTask = testTask;
-        antJUnitReport = new AntJUnitReport();
-        options = new JUnitOptions();
-        detector = new JUnitDetector(testTask.getTestClassesDir(), testTask.getClasspath());
-    }
-
-    public WorkerTestClassProcessorFactory getProcessorFactory() {
-        final File testResultsDir = testTask.getTestResultsDir();
-        return new TestClassProcessorFactoryImpl(testResultsDir);
-    }
-
-    public Action<WorkerProcessBuilder> getWorkerConfigurationAction() {
-        return new Action<WorkerProcessBuilder>() {
-            public void execute(WorkerProcessBuilder workerProcessBuilder) {
-                workerProcessBuilder.sharedPackages("junit.framework");
-                workerProcessBuilder.sharedPackages("junit.extensions");
-                workerProcessBuilder.sharedPackages("org.junit");
-            }
-        };
-    }
-
-    public void report() {
-        if (!testTask.isTestReport()) {
-            return;
-        }
-        antJUnitReport.execute(testTask.getTestResultsDir(), testTask.getTestReportDir(),
-                testTask.getProject().getAnt());
-    }
-
-    public JUnitOptions getOptions() {
-        return options;
-    }
-
-    void setOptions(JUnitOptions options) {
-        this.options = options;
-    }
-
-    AntJUnitReport getAntJUnitReport() {
-        return antJUnitReport;
-    }
-
-    void setAntJUnitReport(AntJUnitReport antJUnitReport) {
-        this.antJUnitReport = antJUnitReport;
-    }
-
-    public JUnitDetector getDetector() {
-        return detector;
-    }
-
-    private static class TestClassProcessorFactoryImpl implements WorkerTestClassProcessorFactory, Serializable {
-        private final File testResultsDir;
-
-        public TestClassProcessorFactoryImpl(File testResultsDir) {
-            this.testResultsDir = testResultsDir;
-        }
-
-        public TestClassProcessor create(ServiceRegistry serviceRegistry) {
-            return new JUnitTestClassProcessor(
-                    testResultsDir,
-                    serviceRegistry.get(IdGenerator.class),
-                    new JULRedirector());
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessor.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessor.java
deleted file mode 100644
index b789372..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessor.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.tasks.testing.results;
-
-import org.gradle.api.internal.tasks.testing.*;
-
-public class AttachParentTestResultProcessor implements TestResultProcessor {
-    private Object rootId;
-    private final TestResultProcessor processor;
-
-    public AttachParentTestResultProcessor(TestResultProcessor processor) {
-        this.processor = processor;
-    }
-
-    public void started(TestDescriptorInternal test, TestStartEvent event) {
-        if (rootId == null) {
-            assert test.isComposite();
-            rootId = test.getId();
-        }
-        else if (event.getParentId() == null) {
-            event = event.withParentId(rootId);
-        }
-        processor.started(test, event);
-    }
-
-    public void failure(Object testId, Throwable result) {
-        processor.failure(testId, result);
-    }
-
-    public void output(Object testId, TestOutputEvent event) {
-        processor.output(testId, event);
-    }
-
-    public void completed(Object testId, TestCompleteEvent event) {
-        if (testId.equals(rootId)) {
-            rootId = null;
-        }
-        processor.completed(testId, event);
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFramework.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFramework.java
deleted file mode 100644
index b8dd7cb..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFramework.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.tasks.testing.testng;
-
-import org.gradle.api.Action;
-import org.gradle.api.JavaVersion;
-import org.gradle.api.internal.project.ServiceRegistry;
-import org.gradle.api.internal.tasks.testing.TestClassProcessor;
-import org.gradle.api.internal.tasks.testing.TestFramework;
-import org.gradle.api.internal.tasks.testing.WorkerTestClassProcessorFactory;
-import org.gradle.api.internal.tasks.testing.junit.JULRedirector;
-import org.gradle.api.tasks.testing.Test;
-import org.gradle.api.tasks.testing.testng.TestNGOptions;
-import org.gradle.process.internal.WorkerProcessBuilder;
-import org.gradle.util.IdGenerator;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @author Tom Eyckmans
- */
-public class TestNGTestFramework implements TestFramework {
-
-    private TestNGOptions options;
-    private TestNGDetector detector;
-    private final Test testTask;
-
-    public TestNGTestFramework(Test testTask) {
-        this.testTask = testTask;
-        options = new TestNGOptions(testTask.getProject().getProjectDir());
-        options.setAnnotationsOnSourceCompatibility(JavaVersion.toVersion(testTask.getProject().property(
-                "sourceCompatibility")));
-        detector = new TestNGDetector(testTask.getTestClassesDir(), testTask.getClasspath());
-    }
-
-    public WorkerTestClassProcessorFactory getProcessorFactory() {
-        options.setTestResources(testTask.getTestSrcDirs());
-        List<File> suiteFiles = options.getSuites(testTask.getTemporaryDir());
-        return new TestClassProcessorFactoryImpl(testTask.getTestReportDir(), options, suiteFiles);
-    }
-
-    public Action<WorkerProcessBuilder> getWorkerConfigurationAction() {
-        return new Action<WorkerProcessBuilder>() {
-            public void execute(WorkerProcessBuilder workerProcessBuilder) {
-                workerProcessBuilder.sharedPackages("org.testng");
-            }
-        };
-    }
-
-    public void report() {
-        // TODO currently reports are always generated because the antTestNGExecute task uses the
-        // default listeners and these generate reports by default.
-    }
-
-    public TestNGOptions getOptions() {
-        return options;
-    }
-
-    void setOptions(TestNGOptions options) {
-        this.options = options;
-    }
-
-    public TestNGDetector getDetector() {
-        return detector;
-    }
-
-    private static class TestClassProcessorFactoryImpl implements WorkerTestClassProcessorFactory, Serializable {
-        private final File testReportDir;
-        private final TestNGOptions options;
-        private final List<File> suiteFiles;
-
-        public TestClassProcessorFactoryImpl(File testReportDir, TestNGOptions options, List<File> suiteFiles) {
-            this.testReportDir = testReportDir;
-            this.options = options;
-            this.suiteFiles = suiteFiles;
-        }
-
-        public TestClassProcessor create(ServiceRegistry serviceRegistry) {
-            return new TestNGTestClassProcessor(testReportDir, options, suiteFiles, serviceRegistry.get(IdGenerator.class), new JULRedirector());
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.groovy b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.groovy
deleted file mode 100644
index f2f700a..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.groovy
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
-package org.gradle.api.plugins
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.Rule
-import org.gradle.api.Task
-import org.gradle.api.artifacts.Configuration
-import org.gradle.api.tasks.Delete
-import org.gradle.api.tasks.Upload
-import org.gradle.api.tasks.bundling.AbstractArchiveTask
-import org.gradle.api.tasks.bundling.Jar
-import org.gradle.api.artifacts.ConfigurationContainer
-import org.gradle.api.artifacts.Dependency
-import org.apache.commons.lang.StringUtils
-
-/**
- * <p>A  {@link org.gradle.api.Plugin}  which defines a basic project lifecycle and some common convention properties.</p>
- */
-class BasePlugin implements Plugin<Project> {
-    public static final String CLEAN_TASK_NAME = 'clean'
-    public static final String ASSEMBLE_TASK_NAME = 'assemble'
-    public static final String BUILD_GROUP = 'build'
-    public static final String UPLOAD_GROUP = 'upload'
-
-    public void apply(Project project) {
-        project.convention.plugins.base = new BasePluginConvention(project)
-
-        configureBuildConfigurationRule(project)
-        configureUploadRules(project)
-        configureArchiveDefaults(project, project.convention.plugins.base)
-        configureConfigurations(project)
-
-        addClean(project)
-        addCleanRule(project)
-        addAssemble(project);
-    }
-
-    private Task addAssemble(Project project) {
-        Task assembleTask = project.tasks.add(ASSEMBLE_TASK_NAME);
-        assembleTask.description = "Assembles all Jar, War, Zip, and Tar archives.";
-        assembleTask.group = BUILD_GROUP
-        assembleTask.dependsOn { project.tasks.withType(AbstractArchiveTask.class).all }
-    }
-
-    private void configureArchiveDefaults(Project project, BasePluginConvention pluginConvention) {
-        project.tasks.withType(AbstractArchiveTask).allTasks {AbstractArchiveTask task ->
-            if (task instanceof Jar) {
-                task.conventionMapping.destinationDir = { pluginConvention.libsDir }
-            } else {
-                task.conventionMapping.destinationDir = { pluginConvention.distsDir }
-            }
-            task.conventionMapping.version = { project.version == Project.DEFAULT_VERSION ? null : project.version.toString() }
-            task.conventionMapping.baseName = { pluginConvention.archivesBaseName }
-        }
-    }
-
-    private void addClean(final Project project) {
-        Delete clean = project.tasks.add(CLEAN_TASK_NAME, Delete.class)
-        clean.description = "Deletes the build directory.";
-        clean.group = BUILD_GROUP
-        clean.delete { project.buildDir }
-    }
-
-    private void addCleanRule(Project project) {
-        String prefix = 'clean'
-        String description = "Pattern: ${prefix}<TaskName>: Cleans the output files of a task."
-        Rule rule = [
-                getDescription: { description },
-                apply: {String taskName ->
-                    if (!taskName.startsWith(prefix)) {
-                        return
-                    }
-                    Task task = project.tasks.findByName(StringUtils.uncapitalize(taskName.substring(prefix.length())))
-                    if (task == null) {
-                        return
-                    }
-                    Delete clean = project.tasks.add(taskName, Delete)
-                    clean.delete(task.outputs.files)
-                },
-                toString: { "Rule: " + description }
-        ] as Rule
-
-        project.tasks.addRule(rule)
-    }
-
-    private void configureBuildConfigurationRule(Project project) {
-        String prefix = "build";
-        String description = "Pattern: ${prefix}<ConfigurationName>: Assembles the artifacts of a configuration."
-        Rule rule = [
-                getDescription: {
-                    description
-                },
-                apply: {String taskName ->
-                    if (taskName.startsWith(prefix)) {
-                        Configuration configuration = project.configurations.findByName(StringUtils.uncapitalize(taskName.substring(prefix.length())))
-                        if (configuration != null) {
-                            project.tasks.add(taskName).dependsOn(configuration.getBuildArtifacts()).setDescription(String.format("Builds the artifacts belonging to %s.", configuration))
-                        }
-                    }
-                },
-                toString: { "Rule: " + description }
-        ] as Rule
-
-        project.configurations.allObjects {
-            if (!project.tasks.rules.contains(rule)) {
-                project.tasks.addRule(rule)
-            }
-        }
-    }
-
-    private void configureUploadRules(final Project project) {
-        String description = "Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration."
-        Rule rule = [
-                getDescription: {
-                    description
-                },
-                apply: {String taskName ->
-                    Set<Configuration> configurations = project.configurations.all
-                    for (Configuration configuration: configurations) {
-                        if (taskName == configuration.uploadTaskName) {
-                            createUploadTask(configuration.uploadTaskName, configuration, project)
-                        }
-                    }
-                },
-                toString: { "Rule: " + description }
-        ] as Rule
-        project.configurations.allObjects {
-            if (!project.tasks.rules.contains(rule)) {
-                project.tasks.addRule(rule)
-            }
-        }
-    }
-
-    private Upload createUploadTask(String name, final Configuration configuration, Project project) {
-        Upload upload = project.getTasks().add(name, Upload.class)
-        upload.configuration = configuration
-        upload.uploadDescriptor = true
-        upload.descriptorDestination = new File(project.getBuildDir(), "ivy.xml")
-        upload.description = "Uploads all artifacts belonging to $configuration."
-        upload.group = UPLOAD_GROUP
-        return upload
-    }
-
-    private void configureConfigurations(final Project project) {
-        ConfigurationContainer configurations = project.getConfigurations();
-        project.setProperty("status", "integration");
-
-        Configuration archivesConfiguration = configurations.add(Dependency.ARCHIVES_CONFIGURATION).
-                setDescription("Configuration for the default artifacts.");
-
-        configurations.add(Dependency.DEFAULT_CONFIGURATION).extendsFrom(archivesConfiguration).
-                setDescription("Configuration for the default artifacts and their dependencies.");
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/GroovyBasePlugin.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/GroovyBasePlugin.java
deleted file mode 100644
index 01083da..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/GroovyBasePlugin.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins;
-
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.Project;
-import org.gradle.api.file.FileTreeElement;
-import org.gradle.api.internal.DynamicObjectAware;
-import org.gradle.api.internal.IConventionAware;
-import org.gradle.api.internal.project.ProjectInternal;
-import org.gradle.api.internal.tasks.DefaultGroovySourceSet;
-import org.gradle.api.internal.tasks.DefaultSourceSet;
-import org.gradle.api.specs.Spec;
-import org.gradle.api.tasks.ConventionValue;
-import org.gradle.api.tasks.SourceSet;
-import org.gradle.api.tasks.compile.GroovyCompile;
-import org.gradle.api.tasks.javadoc.Groovydoc;
-
-import java.io.File;
-
-/**
- * <p>A {@link org.gradle.api.Plugin} which extends the {@link org.gradle.api.plugins.JavaBasePlugin} to provide support for compiling and documenting Groovy
- * source files.</p>
- *
- * @author Hans Dockter
- */
-public class GroovyBasePlugin implements Plugin<Project> {
-    public static final String GROOVY_CONFIGURATION_NAME = "groovy";
-
-    public void apply(Project project) {
-        JavaBasePlugin javaBasePlugin = project.getPlugins().apply(JavaBasePlugin.class);
-
-        project.getConfigurations().add(GROOVY_CONFIGURATION_NAME).setVisible(false).setTransitive(false).
-                setDescription("The groovy libraries to be used for this Groovy project.");
-
-        configureCompileDefaults(project);
-        configureSourceSetDefaults(project, javaBasePlugin);
-
-        configureGroovydoc(project);
-    }
-
-    private void configureCompileDefaults(final Project project) {
-        project.getTasks().withType(GroovyCompile.class).allTasks(new Action<GroovyCompile>() {
-            public void execute(GroovyCompile compile) {
-                compile.getConventionMapping().map("groovyClasspath", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return project.getConfigurations().getByName(GROOVY_CONFIGURATION_NAME).copy().setTransitive(true);
-                    }
-                });
-            }
-        });
-    }
-
-    private void configureSourceSetDefaults(final Project project, final JavaBasePlugin javaBasePlugin) {
-        final ProjectInternal projectInternal = (ProjectInternal) project;
-        project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().allObjects(new Action<SourceSet>() {
-            public void execute(SourceSet sourceSet) {
-                final DefaultGroovySourceSet groovySourceSet = new DefaultGroovySourceSet(((DefaultSourceSet) sourceSet).getDisplayName(), projectInternal.getFileResolver());
-                ((DynamicObjectAware) sourceSet).getConvention().getPlugins().put("groovy", groovySourceSet);
-
-                groovySourceSet.getGroovy().srcDir(String.format("src/%s/groovy", sourceSet.getName()));
-                sourceSet.getResources().getFilter().exclude(new Spec<FileTreeElement>() {
-                    public boolean isSatisfiedBy(FileTreeElement element) {
-                        return groovySourceSet.getGroovy().contains(element.getFile());
-                    }
-                });
-                sourceSet.getAllJava().add(groovySourceSet.getGroovy().matching(sourceSet.getJava().getFilter()));
-                sourceSet.getAllSource().add(groovySourceSet.getGroovy());
-
-                String compileTaskName = sourceSet.getCompileTaskName("groovy");
-                GroovyCompile compile = project.getTasks().add(compileTaskName, GroovyCompile.class);
-                javaBasePlugin.configureForSourceSet(sourceSet, compile);
-                compile.dependsOn(sourceSet.getCompileJavaTaskName());
-                compile.setDescription(String.format("Compiles the %s Groovy source.", sourceSet.getName()));
-                compile.conventionMapping("defaultSource", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return groovySourceSet.getGroovy();
-                    }
-                });
-
-                project.getTasks().getByName(sourceSet.getClassesTaskName()).dependsOn(compileTaskName);
-            }
-        });
-    }
-
-    private void configureGroovydoc(final Project project) {
-        project.getTasks().withType(Groovydoc.class).allTasks(new Action<Groovydoc>() {
-            public void execute(Groovydoc groovydoc) {
-                groovydoc.getConventionMapping().map("groovyClasspath", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return project.getConfigurations().getByName(GROOVY_CONFIGURATION_NAME).copy().setTransitive(true);
-                    }
-                });
-                groovydoc.getConventionMapping().map("destinationDir", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return new File(java(convention).getDocsDir(), "groovydoc");
-                    }
-                });
-                groovydoc.getConventionMapping().map("docTitle", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return convention.getPlugin(ReportingBasePluginConvention.class).getApiDocTitle();
-                    }
-                });
-                groovydoc.getConventionMapping().map("windowTitle", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return convention.getPlugin(ReportingBasePluginConvention.class).getApiDocTitle();
-                    }
-                });
-            }
-        });
-    }
-
-    private JavaPluginConvention java(Convention convention) {
-        return convention.getPlugin(JavaPluginConvention.class);
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaBasePlugin.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaBasePlugin.java
deleted file mode 100644
index 24377e6..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaBasePlugin.java
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins;
-
-import org.gradle.api.*;
-import org.gradle.api.internal.ConventionMapping;
-import org.gradle.api.internal.IConventionAware;
-import org.gradle.api.internal.plugins.ProcessResources;
-import org.gradle.api.tasks.ConventionValue;
-import org.gradle.api.tasks.Copy;
-import org.gradle.api.tasks.SourceSet;
-import org.gradle.api.tasks.compile.AbstractCompile;
-import org.gradle.api.tasks.compile.Compile;
-import org.gradle.api.tasks.javadoc.Javadoc;
-import org.gradle.api.tasks.testing.Test;
-import org.gradle.api.tasks.testing.TestDescriptor;
-import org.gradle.api.tasks.testing.TestListener;
-import org.gradle.api.tasks.testing.TestResult;
-import org.gradle.util.WrapUtil;
-
-import java.io.File;
-
-/**
- * <p>A {@link org.gradle.api.Plugin} which compiles and tests Java source, and assembles it into a JAR file.</p>
- *
- * @author Hans Dockter
- */
-public class JavaBasePlugin implements Plugin<Project> {
-    public static final String CHECK_TASK_NAME = "check";
-    public static final String BUILD_TASK_NAME = "build";
-    public static final String BUILD_DEPENDENTS_TASK_NAME = "buildDependents";
-    public static final String BUILD_NEEDED_TASK_NAME = "buildNeeded";
-    public static final String VERIFICATION_GROUP = "verification";
-    public static final String DOCUMENTATION_GROUP = "documentation";
-
-    public void apply(Project project) {
-        project.getPlugins().apply(BasePlugin.class);
-        project.getPlugins().apply(ReportingBasePlugin.class);
-
-        JavaPluginConvention javaConvention = new JavaPluginConvention(project);
-        project.getConvention().getPlugins().put("java", javaConvention);
-
-        configureCompileDefaults(project, javaConvention);
-        configureSourceSetDefaults(javaConvention);
-
-        configureJavaDoc(project);
-        configureTest(project);
-        configureCheck(project);
-        configureBuild(project);
-        configureBuildNeeded(project);
-        configureBuildDependents(project);
-    }
-
-    private void configureSourceSetDefaults(final JavaPluginConvention pluginConvention) {
-        pluginConvention.getSourceSets().allObjects(new Action<SourceSet>() {
-            public void execute(final SourceSet sourceSet) {
-                final Project project = pluginConvention.getProject();
-                ConventionMapping conventionMapping = ((IConventionAware) sourceSet).getConventionMapping();
-
-                conventionMapping.map("classesDir", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        String classesDirName = String.format("classes/%s", sourceSet.getName());
-                        return new File(project.getBuildDir(), classesDirName);
-                    }
-                });
-                sourceSet.getJava().srcDir(String.format("src/%s/java", sourceSet.getName()));
-                sourceSet.getResources().srcDir(String.format("src/%s/resources", sourceSet.getName()));
-
-                Copy processResources = project.getTasks().add(sourceSet.getProcessResourcesTaskName(), ProcessResources.class);
-                processResources.setDescription(String.format("Processes the %s.", sourceSet.getResources()));
-                conventionMapping = processResources.getConventionMapping();
-                conventionMapping.map("defaultSource", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return sourceSet.getResources();
-                    }
-                });
-                conventionMapping.map("destinationDir", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return sourceSet.getClassesDir();
-                    }
-                });
-
-                String compileTaskName = sourceSet.getCompileJavaTaskName();
-                Compile compileJava = project.getTasks().add(compileTaskName, Compile.class);
-                configureForSourceSet(sourceSet, compileJava);
-
-                Task classes = project.getTasks().add(sourceSet.getClassesTaskName());
-                classes.dependsOn(sourceSet.getProcessResourcesTaskName(), compileTaskName);
-                classes.setDescription(String.format("Assembles the %s classes.", sourceSet.getName()));
-                classes.setGroup(BasePlugin.BUILD_GROUP);
-
-                sourceSet.compiledBy(sourceSet.getClassesTaskName());
-            }
-        });
-    }
-
-    public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
-        ConventionMapping conventionMapping;
-        compile.setDescription(String.format("Compiles the %s.", sourceSet.getJava()));
-        conventionMapping = compile.getConventionMapping();
-        conventionMapping.map("classpath", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return sourceSet.getCompileClasspath();
-            }
-        });
-        conventionMapping.map("defaultSource", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return sourceSet.getJava();
-            }
-        });
-        conventionMapping.map("destinationDir", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return sourceSet.getClassesDir();
-            }
-        });
-    }
-
-    private void configureCompileDefaults(final Project project, final JavaPluginConvention javaConvention) {
-        project.getTasks().withType(AbstractCompile.class).allTasks(new Action<AbstractCompile>() {
-            public void execute(final AbstractCompile compile) {
-                ConventionMapping conventionMapping = compile.getConventionMapping();
-                conventionMapping.map("sourceCompatibility", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return javaConvention.getSourceCompatibility().toString();
-                    }
-                });
-                conventionMapping.map("targetCompatibility", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return javaConvention.getTargetCompatibility().toString();
-                    }
-                });
-            }
-        });
-        project.getTasks().withType(Compile.class).allTasks(new Action<Compile>() {
-            public void execute(final Compile compile) {
-                ConventionMapping conventionMapping = compile.getConventionMapping();
-                conventionMapping.map("dependencyCacheDir", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return javaConvention.getDependencyCacheDir();
-                    }
-                });
-            }
-        });
-    }
-
-    private void configureJavaDoc(final Project project) {
-        project.getTasks().withType(Javadoc.class).allTasks(new Action<Javadoc>() {
-            public void execute(Javadoc javadoc) {
-                javadoc.getConventionMapping().map("destinationDir", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return new File(convention.getPlugin(JavaPluginConvention.class).getDocsDir(), "javadoc");
-                    }
-                });
-                javadoc.getConventionMapping().map("title", new ConventionValue() {
-                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                        return convention.getPlugin(ReportingBasePluginConvention.class).getApiDocTitle();
-                    }
-                });
-            }
-        });
-    }
-
-    private void configureCheck(final Project project) {
-        Task checkTask = project.getTasks().add(CHECK_TASK_NAME);
-        checkTask.setDescription("Runs all checks.");
-        checkTask.setGroup(VERIFICATION_GROUP);
-    }
-
-    private void configureBuild(Project project) {
-        DefaultTask buildTask = project.getTasks().add(BUILD_TASK_NAME, DefaultTask.class);
-        buildTask.setDescription("Assembles and tests this project.");
-        buildTask.setGroup(BasePlugin.BUILD_GROUP);
-        buildTask.dependsOn(BasePlugin.ASSEMBLE_TASK_NAME);
-        buildTask.dependsOn(CHECK_TASK_NAME);
-    }
-
-    private void configureBuildNeeded(Project project) {
-        DefaultTask buildTask = project.getTasks().add(BUILD_NEEDED_TASK_NAME, DefaultTask.class);
-        buildTask.setDescription("Assembles and tests this project and all projects it depends on.");
-        buildTask.setGroup(BasePlugin.BUILD_GROUP);
-        buildTask.dependsOn(BUILD_TASK_NAME);
-    }
-
-    private void configureBuildDependents(Project project) {
-        DefaultTask buildTask = project.getTasks().add(BUILD_DEPENDENTS_TASK_NAME, DefaultTask.class);
-        buildTask.setDescription("Assembles and tests this project and all projects that depend on it.");
-        buildTask.setGroup(BasePlugin.BUILD_GROUP);
-        buildTask.dependsOn(BUILD_TASK_NAME);
-    }
-
-    private void configureTest(final Project project) {
-        project.getTasks().withType(Test.class).allTasks(new Action<Test>() {
-            public void execute(Test test) {
-                configureTestDefaults(test, project);
-            }
-        });
-        project.afterEvaluate(new Action<Project>() {
-            public void execute(Project project) {
-                project.getTasks().withType(Test.class).allTasks(new Action<Test>() {
-                    public void execute(Test test) {
-                        overwriteIncludesIfSinglePropertyIsSet(test);
-                        overwriteDebugIfDebugPropertyIsSet(test);
-                    }
-                });
-            }
-        });
-    }
-
-    private void overwriteDebugIfDebugPropertyIsSet(Test test) {
-        String debugProp = getTaskPrefixedProperty(test, "debug");
-        if (debugProp != null) {
-            test.doFirst(new Action<Task>() {
-                public void execute(Task task) {
-                    task.getLogger().info("Running tests for remote debugging.");
-                }
-            });
-            test.setDebug(true);
-        }
-    }
-
-    private void overwriteIncludesIfSinglePropertyIsSet(final Test test) {
-        String singleTest = getTaskPrefixedProperty(test, "single");
-        if (singleTest == null) {
-            return;
-        }
-        test.doFirst(new Action<Task>() {
-            public void execute(Task task) {
-                test.getLogger().info("Running single tests with pattern: {}", test.getIncludes());
-            }
-        });
-        test.setIncludes(WrapUtil.toSet(String.format("**/%s*.class", singleTest)));
-        failIfNoTestIsExecuted(test, singleTest);
-    }
-
-    private void failIfNoTestIsExecuted(Test test, final String pattern) {
-        test.addTestListener(new TestListener() {
-            public void beforeSuite(TestDescriptor suite) {
-                // do nothing
-            }
-
-            public void afterSuite(TestDescriptor suite, TestResult result) {
-                if (suite.getParent() == null && result.getTestCount() == 0) {
-                    throw new GradleException("Could not find matching test for pattern: " + pattern);
-                }
-            }
-
-            public void beforeTest(TestDescriptor testDescriptor) {
-                // do nothing
-            }
-
-            public void afterTest(TestDescriptor testDescriptor, TestResult result) {
-                // do nothing
-            }
-        });
-    }
-
-    private String getTaskPrefixedProperty(Task task, String propertyName) {
-        String suffix = '.' + propertyName;
-        String value = System.getProperty(task.getPath() + suffix);
-        if (value == null) {
-            return System.getProperty(task.getName() + suffix);
-        }
-        return value;
-    }
-
-    private void configureTestDefaults(Test test, Project project) {
-        test.getConventionMapping().map("testResultsDir", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return convention.getPlugin(JavaPluginConvention.class).getTestResultsDir();
-            }
-        });
-        test.getConventionMapping().map("testReportDir", new ConventionValue() {
-            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
-                return convention.getPlugin(JavaPluginConvention.class).getTestReportDir();
-            }
-        });
-        test.workingDir(project.getProjectDir());
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaPlugin.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaPlugin.java
deleted file mode 100644
index 81fcda0..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaPlugin.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins;
-
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.api.artifacts.Configuration;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact;
-import org.gradle.api.internal.plugins.EmbeddableJavaProject;
-import org.gradle.api.tasks.SourceSet;
-import org.gradle.api.tasks.bundling.Jar;
-import org.gradle.api.tasks.javadoc.Javadoc;
-import org.gradle.api.tasks.testing.Test;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.concurrent.Callable;
-
-/**
- * <p>A {@link Plugin} which compiles and tests Java source, and assembles it into a JAR file.</p>
- *
- * @author Hans Dockter
- */
-public class JavaPlugin implements Plugin<Project> {
-    public static final String PROCESS_RESOURCES_TASK_NAME = "processResources";
-    public static final String CLASSES_TASK_NAME = "classes";
-    public static final String COMPILE_JAVA_TASK_NAME = "compileJava";
-    public static final String PROCESS_TEST_RESOURCES_TASK_NAME = "processTestResources";
-    public static final String TEST_CLASSES_TASK_NAME = "testClasses";
-    public static final String COMPILE_TEST_JAVA_TASK_NAME = "compileTestJava";
-    public static final String TEST_TASK_NAME = "test";
-    public static final String JAR_TASK_NAME = "jar";
-    public static final String JAVADOC_TASK_NAME = "javadoc";
-
-    public static final String COMPILE_CONFIGURATION_NAME = "compile";
-    public static final String RUNTIME_CONFIGURATION_NAME = "runtime";
-    public static final String TEST_RUNTIME_CONFIGURATION_NAME = "testRuntime";
-    public static final String TEST_COMPILE_CONFIGURATION_NAME = "testCompile";
-
-    public void apply(Project project) {
-        project.getPlugins().apply(JavaBasePlugin.class);
-
-        JavaPluginConvention javaConvention = (JavaPluginConvention) project.getConvention().getPlugins().get("java");
-        project.getConvention().getPlugins().put("embeddedJavaProject", new EmbeddableJavaProjectImpl(javaConvention));
-
-        configureConfigurations(project);
-
-        configureSourceSets(javaConvention);
-
-        configureJavaDoc(javaConvention);
-        configureTest(project, javaConvention);
-        configureArchives(project, javaConvention);
-        configureBuild(project);
-    }
-
-    private void configureSourceSets(final JavaPluginConvention pluginConvention) {
-        final Project project = pluginConvention.getProject();
-
-        pluginConvention.getSourceSets().allObjects(new Action<SourceSet>() {
-            public void execute(SourceSet sourceSet) {
-                sourceSet.setCompileClasspath(project.getConfigurations().getByName(COMPILE_CONFIGURATION_NAME));
-                sourceSet.setRuntimeClasspath(sourceSet.getClasses().plus(project.getConfigurations().getByName(
-                        RUNTIME_CONFIGURATION_NAME)));
-            }
-        });
-        SourceSet main = pluginConvention.getSourceSets().add(SourceSet.MAIN_SOURCE_SET_NAME);
-
-        SourceSet test = pluginConvention.getSourceSets().add(SourceSet.TEST_SOURCE_SET_NAME);
-        test.setCompileClasspath(project.files(main.getClasses(), project.getConfigurations().getByName(
-                TEST_COMPILE_CONFIGURATION_NAME)));
-        test.setRuntimeClasspath(project.files(test.getClasses(), main.getClasses(),
-                project.getConfigurations().getByName(TEST_RUNTIME_CONFIGURATION_NAME)));
-    }
-
-    private void configureJavaDoc(final JavaPluginConvention pluginConvention) {
-        Project project = pluginConvention.getProject();
-
-        SourceSet mainSourceSet = pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
-        Javadoc javadoc = project.getTasks().add(JAVADOC_TASK_NAME, Javadoc.class);
-        javadoc.setDescription("Generates the javadoc for the main source code.");
-        javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
-        javadoc.setClasspath(mainSourceSet.getClasses().plus(mainSourceSet.getCompileClasspath()));
-        javadoc.setSource(mainSourceSet.getAllJava());
-        addDependsOnTaskInOtherProjects(javadoc, true, JAVADOC_TASK_NAME, COMPILE_CONFIGURATION_NAME);
-    }
-
-    private void configureArchives(final Project project, final JavaPluginConvention pluginConvention) {
-        project.getTasks().getByName(JavaBasePlugin.CHECK_TASK_NAME).dependsOn(TEST_TASK_NAME);
-        Jar jar = project.getTasks().add(JAR_TASK_NAME, Jar.class);
-        jar.getManifest().from(pluginConvention.getManifest());
-        jar.setDescription("Assembles a jar archive containing the main classes.");
-        jar.setGroup(BasePlugin.BUILD_GROUP);
-        jar.from(pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getClasses());
-        jar.getMetaInf().from(new Callable() {
-            public Object call() throws Exception {
-                return pluginConvention.getMetaInf();
-            }
-        });
-
-        project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION).addArtifact(new ArchivePublishArtifact(
-                jar));
-    }
-
-    private void configureBuild(Project project) {
-        addDependsOnTaskInOtherProjects(project.getTasks().getByName(JavaBasePlugin.BUILD_NEEDED_TASK_NAME), true,
-                JavaBasePlugin.BUILD_TASK_NAME, TEST_RUNTIME_CONFIGURATION_NAME);
-        addDependsOnTaskInOtherProjects(project.getTasks().getByName(JavaBasePlugin.BUILD_DEPENDENTS_TASK_NAME), false,
-                JavaBasePlugin.BUILD_TASK_NAME, TEST_RUNTIME_CONFIGURATION_NAME);
-    }
-
-    private void configureTest(final Project project, final JavaPluginConvention pluginConvention) {
-        project.getTasks().withType(Test.class).allTasks(new Action<Test>() {
-            public void execute(Test test) {
-                test.getConventionMapping().map("testClassesDir", new Callable<Object>() {
-                    public Object call() throws Exception {
-                        return pluginConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME).getClassesDir();
-                    }
-                });
-                test.getConventionMapping().map("classpath", new Callable<Object>() {
-                    public Object call() throws Exception {
-                        return pluginConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME).getRuntimeClasspath();
-                    }
-                });
-                test.getConventionMapping().map("testSrcDirs", new Callable<Object>() {
-                    public Object call() throws Exception {
-                        return new ArrayList<File>(pluginConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME)
-                                .getJava().getSrcDirs());
-                    }
-                });
-            }
-        });
-        Test test = project.getTasks().add(TEST_TASK_NAME, Test.class);
-        test.setDescription("Runs the unit tests.");
-        test.setGroup(JavaBasePlugin.VERIFICATION_GROUP);
-    }
-
-    void configureConfigurations(final Project project) {
-        ConfigurationContainer configurations = project.getConfigurations();
-        Configuration compileConfiguration = configurations.add(COMPILE_CONFIGURATION_NAME).setVisible(false).
-                setDescription("Classpath for compiling the sources.");
-        Configuration runtimeConfiguration = configurations.add(RUNTIME_CONFIGURATION_NAME).setVisible(false)
-                .extendsFrom(compileConfiguration).
-                        setDescription("Classpath for running the compiled sources.");
-
-        Configuration compileTestsConfiguration = configurations.add(TEST_COMPILE_CONFIGURATION_NAME).setVisible(false)
-                .extendsFrom(compileConfiguration).setDescription("Classpath for compiling the test sources.");
-
-        configurations.add(TEST_RUNTIME_CONFIGURATION_NAME).setVisible(false).extendsFrom(runtimeConfiguration,
-                compileTestsConfiguration).
-                setDescription("Classpath for running the test sources.");
-
-        configurations.getByName(Dependency.DEFAULT_CONFIGURATION).extendsFrom(runtimeConfiguration);
-    }
-
-    /**
-     * Adds a dependency on tasks with the specified name in other projects.  The other projects are determined from
-     * project lib dependencies using the specified configuration name. These may be projects this project depends on or
-     * projects that depend on this project based on the useDependOn argument.
-     *
-     * @param task Task to add dependencies to
-     * @param useDependedOn if true, add tasks from projects this project depends on, otherwise use projects that depend
-     * on this one.
-     * @param otherProjectTaskName name of task in other projects
-     * @param configurationName name of configuration to use to find the other projects
-     */
-    private void addDependsOnTaskInOtherProjects(final Task task, boolean useDependedOn, String otherProjectTaskName,
-                                                 String configurationName) {
-        Project project = task.getProject();
-        final Configuration configuration = project.getConfigurations().getByName(configurationName);
-        task.dependsOn(configuration.getTaskDependencyFromProjectDependency(useDependedOn, otherProjectTaskName));
-    }
-
-    private static class EmbeddableJavaProjectImpl implements EmbeddableJavaProject {
-        private final JavaPluginConvention convention;
-
-        public EmbeddableJavaProjectImpl(JavaPluginConvention convention) {
-            this.convention = convention;
-        }
-
-        public Collection<String> getRebuildTasks() {
-            return Arrays.asList(BasePlugin.CLEAN_TASK_NAME, JavaBasePlugin.BUILD_TASK_NAME);
-        }
-
-        public Collection<String> getBuildTasks() {
-            return Arrays.asList(JavaBasePlugin.BUILD_TASK_NAME);
-        }
-
-        public FileCollection getRuntimeClasspath() {
-            return convention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/WarPlugin.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/WarPlugin.java
deleted file mode 100644
index df7ee46..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/WarPlugin.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.plugins;
-
-import org.gradle.api.Action;
-import org.gradle.api.Plugin;
-import org.gradle.api.Project;
-import org.gradle.api.artifacts.Configuration;
-import org.gradle.api.artifacts.ConfigurationContainer;
-import org.gradle.api.artifacts.Dependency;
-import org.gradle.api.artifacts.PublishArtifact;
-import org.gradle.api.file.FileCollection;
-import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact;
-import org.gradle.api.tasks.SourceSet;
-import org.gradle.api.tasks.bundling.Jar;
-import org.gradle.api.tasks.bundling.War;
-
-import java.util.concurrent.Callable;
-
-/**
- * <p>A {@link Plugin} which extends the {@link JavaPlugin} to add tasks which assemble a web application into a WAR
- * file.</p>
- *
- * @author Hans Dockter
- */
-public class WarPlugin implements Plugin<Project> {
-    public static final String PROVIDED_COMPILE_CONFIGURATION_NAME = "providedCompile";
-    public static final String PROVIDED_RUNTIME_CONFIGURATION_NAME = "providedRuntime";
-    public static final String WAR_TASK_NAME = "war";
-    public static final String WEB_APP_GROUP = "web application";
-
-    public void apply(final Project project) {
-        project.getPlugins().apply(JavaPlugin.class);
-        final WarPluginConvention pluginConvention = new WarPluginConvention(project);
-        project.getConvention().getPlugins().put("war", pluginConvention);
-
-        project.getTasks().withType(War.class).allTasks(new Action<War>() {
-            public void execute(War task) {
-                task.from(new Callable() {
-                    public Object call() throws Exception {
-                        return pluginConvention.getWebAppDir();
-                    }
-                });
-                task.dependsOn(new Callable() {
-                    public Object call() throws Exception {
-                        return project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().getByName(
-                                SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
-                    }
-                });
-                task.classpath(new Object[] {new Callable() {
-                    public Object call() throws Exception {
-                        FileCollection runtimeClasspath = project.getConvention().getPlugin(JavaPluginConvention.class)
-                                .getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
-                        Configuration providedRuntime = project.getConfigurations().getByName(
-                                PROVIDED_RUNTIME_CONFIGURATION_NAME);
-                        return runtimeClasspath.minus(providedRuntime);
-                    }
-                }});
-            }
-        });
-        
-        War war = project.getTasks().add(WAR_TASK_NAME, War.class);
-        war.setDescription("Generates a war archive with all the compiled classes, the web-app content and the libraries.");
-        war.setGroup(BasePlugin.BUILD_GROUP);
-        Configuration archivesConfiguration = project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION);
-        disableJarTaskAndRemoveFromArchivesConfiguration(project, archivesConfiguration);
-        archivesConfiguration.addArtifact(new ArchivePublishArtifact(war));
-        configureConfigurations(project.getConfigurations());
-    }
-
-    private void disableJarTaskAndRemoveFromArchivesConfiguration(Project project, Configuration archivesConfiguration) {
-        Jar jarTask = (Jar) project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME);
-        jarTask.setEnabled(false);
-        removeJarTaskFromArchivesConfiguration(archivesConfiguration, jarTask);
-    }
-
-    private void removeJarTaskFromArchivesConfiguration(Configuration archivesConfiguration, Jar jar) {
-        // todo: There should be a richer connection between an ArchiveTask and a PublishArtifact
-        for (PublishArtifact publishArtifact : archivesConfiguration.getAllArtifacts()) {
-            if (publishArtifact instanceof ArchivePublishArtifact) {
-                ArchivePublishArtifact archivePublishArtifact = (ArchivePublishArtifact) publishArtifact;
-                if (archivePublishArtifact.getArchiveTask() == jar) {
-                    archivesConfiguration.removeArtifact(publishArtifact);
-                }
-            }
-        }
-    }
-
-    public void configureConfigurations(ConfigurationContainer configurationContainer) {
-        Configuration provideCompileConfiguration = configurationContainer.add(PROVIDED_COMPILE_CONFIGURATION_NAME).setVisible(false).
-                setDescription("Additional compile classpath for libraries that should not be part of the WAR archive.");
-        Configuration provideRuntimeConfiguration = configurationContainer.add(PROVIDED_RUNTIME_CONFIGURATION_NAME).setVisible(false).
-                extendsFrom(provideCompileConfiguration).
-                setDescription("Additional runtime classpath for libraries that should not be part of the WAR archive.");
-        configurationContainer.getByName(JavaPlugin.COMPILE_CONFIGURATION_NAME).extendsFrom(provideCompileConfiguration);
-        configurationContainer.getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME).extendsFrom(provideRuntimeConfiguration);
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/CoreJavadocOptions.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/CoreJavadocOptions.java
deleted file mode 100644
index 018abf1..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/CoreJavadocOptions.java
+++ /dev/null
@@ -1,566 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc;
-
-import org.gradle.external.javadoc.internal.JavadocOptionFile;
-import org.gradle.process.ExecSpec;
-import org.gradle.util.GFileUtils;
-import org.gradle.util.GUtil;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * Provides the core Javadoc Options. That is, provides the options which are not doclet specific.
- *
- * @author Tom Eyckmans
- */
-public abstract class CoreJavadocOptions implements MinimalJavadocOptions
-{
-    private final JavadocOptionFile optionFile;
-
-    public CoreJavadocOptions() {
-        this(new JavadocOptionFile());
-    }
-
-    protected CoreJavadocOptions(JavadocOptionFile optionFile) {
-        this.optionFile = optionFile;
-
-        overview = addStringOption("overview");
-        memberLevel = addEnumOption("memberLevel");
-        doclet = addStringOption("doclet");
-        docletpath = addPathOption("docletpath");
-        source = addStringOption("source");
-        classpath = addPathOption("classpath");
-        bootClasspath = addPathOption("bootclasspath");
-        extDirs = addPathOption("extdirs");
-        outputLevel = addEnumOption("outputLevel", JavadocOutputLevel.QUIET);
-        breakIterator = addBooleanOption("breakiterator");
-        locale = addStringOption("locale");
-        encoding = addStringOption("encoding");
-
-        sourceNames = optionFile.getSourceNames();
-    }
-
-    /**
-     * -overview  path\filename
-     * Specifies that javadoc should retrieve the text for the overview documentation from
-     * the "source" file specified by path/filename and place it on the Overview page (overview-summary.html).
-     * The path/filename is relative to the -sourcepath.
-     *
-     * While you can use any name you want for filename and place it anywhere you want for path,
-     * a typical thing to do is to name it overview.html and place it in the source tree at the directory that contains the topmost package directories.
-     * In this location, no path is needed when documenting packages, since -sourcepath will point to this file.
-     * For example, if the source tree for the java.lang package is C:\src\classes\java\lang\,
-     * then you could place the overview file at C:\src\classes\overview.html. See Real World Example.
-     *
-     * For information about the file specified by path/filename, see overview comment file.
-     *
-     * Note that the overview page is created only if you pass into javadoc two or more package names.
-     * For further explanation, see HTML Frames.)
-     *
-     * The title on the overview page is set by -doctitle.
-     */
-    private final JavadocOptionFileOption<String> overview;
-
-    public String getOverview() {
-        return overview.getValue();
-    }
-
-    public void setOverview(String overview) {
-        this.overview.setValue(overview);
-    }
-
-    /**
-     * Fluent setter for the overview option.
-     * @param overview The new overview.
-     * @return The <code>MinimalJavadocOptions</code> object.
-     */
-    public MinimalJavadocOptions overview(String overview) {
-        setOverview(overview);
-        return this;
-    }
-
-    /**
-     * Switch to set the members that should be included in the Javadoc. (-public, -protected, -package, -private)
-     */
-    private final JavadocOptionFileOption<JavadocMemberLevel> memberLevel;
-
-    public JavadocMemberLevel getMemberLevel() {
-        return memberLevel.getValue();
-    }
-
-    public void setMemberLevel(JavadocMemberLevel memberLevel) {
-        this.memberLevel.setValue(memberLevel);
-    }
-
-    public MinimalJavadocOptions showFromPublic() {
-        setMemberLevel(JavadocMemberLevel.PUBLIC);
-        return this;
-    }
-
-    public MinimalJavadocOptions showFromProtected() {
-        setMemberLevel(JavadocMemberLevel.PROTECTED);
-        return this;
-    }
-
-    public MinimalJavadocOptions showFromPackage() {
-        setMemberLevel(JavadocMemberLevel.PACKAGE);
-        return this;
-    }
-
-    public void contributeCommandLineOptions(ExecSpec execHandleBuilder) {
-        execHandleBuilder
-            .args(GUtil.prefix("-J", jFlags)) // J flags can not be set in the option file
-            .args(GUtil.prefix("@", GFileUtils.toPaths(optionFiles))); // add additional option files
-    }
-
-    public MinimalJavadocOptions showFromPrivate() {
-        setMemberLevel(JavadocMemberLevel.PRIVATE);
-        return this;
-    }
-
-    public MinimalJavadocOptions showAll() {
-        return showFromPrivate();
-    }
-
-    /**
-     * -doclet  class
-     * Specifies the class file that starts the doclet used in generating the documentation. Use the fully-qualified name.
-     * This doclet defines the content and formats the output. If the -doclet option is not used,
-     * javadoc uses the standard doclet for generating the default HTML format.
-     * This class must contain the start(Root) method.
-     * The path to this starting class is defined by the -docletpath option.
-     *
-     * For example, to call the MIF doclet, use:
-     *
-     *     -doclet com.sun.tools.doclets.mif.MIFDoclet
-     *
-     * For full, working examples of running a particular doclet, see Running the MIF Doclet.
-     */
-    private final JavadocOptionFileOption<String> doclet;
-
-    public String getDoclet() {
-        return doclet.getValue();
-    }
-
-    public void setDoclet(String doclet) {
-        this.doclet.setValue(doclet);
-    }
-
-    public MinimalJavadocOptions doclet(String doclet) {
-        setDoclet(doclet);
-        return this;
-    }
-
-    /**
-     * -docletpath  classpathlist 
-     * Specifies the path to the doclet starting class file (specified with the -doclet option) and any jar files it depends on.
-     * If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below.
-     * You can specify an absolute path or a path relative to the current directory. If classpathlist contains multiple paths or jar files,
-     * they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows.
-     * This option is not necessary if the doclet starting class is already in the search path.
-     *
-     * Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included.
-     *
-     *    -docletpath C:/user/mifdoclet/lib/mifdoclet.jar
-     *
-     * Example of path to starting doclet class file. Notice the class filename is omitted.
-     *
-     *    -docletpath C:/user/mifdoclet/classes/com/sun/tools/doclets/mif/
-     *
-     * For full, working examples of running a particular doclet, see Running the MIF Doclet.
-     */
-    private final JavadocOptionFileOption<List<File>> docletpath;
-
-    public List<File> getDocletpath() {
-        return docletpath.getValue();
-    }
-
-    public void setDocletpath(List<File> docletpath) {
-        this.docletpath.setValue(docletpath);
-    }
-
-    public MinimalJavadocOptions docletpath(File ... docletpath) {
-        this.docletpath.getValue().addAll(Arrays.asList(docletpath));
-        return this;
-    }
-
-    /**
-     * -source release
-     * Specifies the version of source code accepted. The following values for release are allowed:
-     * 1.5  javadoc accepts code containing generics and other language features introduced in JDK 1.5.
-     * The compiler defaults to the 1.5 behavior if the -source flag is not used.
-     * 1.4  javadoc accepts code containing assertions, which were introduced in JDK 1.4.
-     * 1.3  javadoc does not support assertions, generics, or other language features introduced after JDK 1.3.
-     *
-     * Use the value of release corresponding to that used when compiling the code with javac.
-     */
-    private final JavadocOptionFileOption<String> source;// TODO bind with the sourceCompatibility property
-
-    public String getSource() {
-        return source.getValue();
-    }
-
-    public void setSource(String source) {
-        this.source.setValue(source);
-    }
-
-    public MinimalJavadocOptions source(String source) {
-        setSource(source);
-        return this;
-    }
-
-    /**
-     * -classpath  classpathlist
-     * Specifies the paths where javadoc will look for referenced classes (.class files)
-     * -- these are the documented classes plus any classes referenced by those classes.
-     * The classpathlist can contain multiple paths by separating them with a semicolon (;).
-     * The Javadoc tool will search in all subdirectories of the specified paths.
-     * Follow the instructions in class path documentation for specifying classpathlist.
-     *
-     * If -sourcepath is omitted, the Javadoc tool uses -classpath to find the source files as well as
-     * class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths,
-     * use both -sourcepath and -classpath.
-     *
-     * For example, if you want to document com.mypackage, whose source files reside in the directory C:/user/src/com/mypackage,
-     * and if this package relies on a library in C:/user/lib, you would specify:
-     *
-     *   C:> javadoc -classpath /user/lib -sourcepath /user/src com.mypackage
-     *
-     * As with other tools, if you do not specify -classpath, the Javadoc tool uses the CLASSPATH environment variable,
-     * if it is set. If both are not set, the Javadoc tool searches for classes from the current directory.
-     *
-     * For an in-depth description of how the Javadoc tool uses -classpath to find user classes as it relates to extension classes and
-     * bootstrap classes, see How Classes Are Found.
-     */
-    private final JavadocOptionFileOption<List<File>> classpath;// TODO link to runtime configuration ?
-
-    public List<File> getClasspath() {
-        return classpath.getValue();
-    }
-
-    public void setClasspath(List<File> classpath) {
-        this.classpath.setValue(classpath);
-    }
-
-    public MinimalJavadocOptions classpath(List<File> classpath) {
-        this.classpath.getValue().addAll(classpath);
-        return this;
-    }
-
-    public MinimalJavadocOptions classpath(File ... classpath) {
-        this.classpath.getValue().addAll(Arrays.asList(classpath));
-        return this;
-    }
-
-    /**
-     * -bootclasspath  classpathlist
-     * Specifies the paths where the boot classes reside. These are nominally the Java platform classes.
-     * The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files.
-     * See How Classes Are Found. for more details. Separate directories in classpathlist with semicolons (;).
-     */
-    private final JavadocOptionFileOption<List<File>> bootClasspath;
-
-    public List<File> getBootClasspath() {
-        return bootClasspath.getValue();
-    }
-
-    public void setBootClasspath(List<File> bootClasspath) {
-        this.bootClasspath.setValue(bootClasspath);
-    }
-
-    public MinimalJavadocOptions bootClasspath(File ... bootClasspath) {
-        this.bootClasspath.getValue().addAll(Arrays.asList(bootClasspath));
-        return this;
-    }
-
-    /**
-     * -extdirs  dirlist
-     * Specifies the directories where extension classes reside.
-     * These are any classes that use the Java Extension mechanism.
-     * The extdirs is part of the search path the Javadoc tool will use to look up source and class files.
-     * See -classpath (above) for more details. Separate directories in dirlist with semicolons (;).
-     */
-    private final JavadocOptionFileOption<List<File>> extDirs;
-
-    public List<File> getExtDirs() {
-        return extDirs.getValue();
-    }
-
-    public void setExtDirs(List<File> extDirs) {
-        this.extDirs.setValue(extDirs);
-    }
-
-    public MinimalJavadocOptions extDirs(File ... extDirs) {
-        this.extDirs.getValue().addAll(Arrays.asList(extDirs));
-        return this;
-    }
-
-    /**
-     * Control the Javadoc output level (-verbose or -quiet).
-     */
-    private final JavadocOptionFileOption<JavadocOutputLevel> outputLevel;
-
-    public JavadocOutputLevel getOutputLevel() {
-        return outputLevel.getValue();
-    }
-
-    public void setOutputLevel(JavadocOutputLevel outputLevel) {
-        this.outputLevel.setValue(outputLevel);
-    }
-
-    public MinimalJavadocOptions verbose() {
-        setOutputLevel(JavadocOutputLevel.VERBOSE);
-        return this;
-    }
-
-    public boolean isVerbose() {
-        return outputLevel.getValue() == JavadocOutputLevel.VERBOSE;
-    }
-
-    public MinimalJavadocOptions quiet() {
-        setOutputLevel(JavadocOutputLevel.QUIET);
-        return this;
-    }
-
-    /**
-     * -breakiterator
-     * Uses the internationalized sentence boundary of java.text.BreakIterator to determine the end of the first sentence
-     * for English (all other locales already use BreakIterator), rather than an English language, locale-specific algorithm.
-     * By first sentence, we mean the first sentence in the main description of a package, class or member.
-     * This sentence is copied to the package, class or member summary, and to the alphabetic index.
-     *
-     * From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English.
-     * Therefore, the -breakiterator option has no effect except for English from 1.2 forward. English has its own default algorithm:
-     *
-     *     * English default sentence-break algorithm - Stops at a period followed by a space or a HTML block tag, such as <P>.
-     *     * Breakiterator sentence-break algorithm - In general, stops at a period,
-     *       question mark or exclamation mark followed by a space if the next word starts with a capital letter.
-     *       This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith").
-     *       Doesn't stop at HTML tags or sentences that begin with numbers or symbols.
-     *       Stops at the last period in "../filename", even if embedded in an HTML tag.
-     *
-     *     NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and
-     *           have left the default sentence-break algorithm unchanged. That is, the -breakiterator option is not the default in 1.5.0,
-     *           nor do we expect it to become the default. This is a reversal from our former intention that
-     *           the default would change in the "next major release" (1.5.0).
-     *           This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x,
-     *           then you don't have to do anything, and the warnings go away starting with 1.5.0.
-     *           The reason for this reversal is because any benefit to having breakiterator become the default
-     *           would be outweighed by the incompatible source change it would require.
-     *           We regret any extra work and confusion this has caused.
-     */
-    private final JavadocOptionFileOption<Boolean> breakIterator;
-
-    public boolean isBreakIterator() {
-        return breakIterator.getValue();
-    }
-
-    public void setBreakIterator(boolean breakIterator) {
-        this.breakIterator.setValue(breakIterator);
-    }
-
-    public MinimalJavadocOptions breakIterator(boolean breakIterator) {
-        setBreakIterator(breakIterator);
-        return this;
-    }
-
-    public MinimalJavadocOptions breakIterator() {
-        setBreakIterator(true);
-        return this;
-    }
-
-    /**
-     * -locale  language_country_variant
-     *     Important - The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or
-     *                 any other doclet. Otherwise, the navigation bars will appear in English.
-     *                 This is the only command-line option that is order-dependent.
-     *
-     * Specifies the locale that javadoc uses when generating documentation.
-     * The argument is the name of the locale, as described in java.util.Locale documentation, such as
-     * en_US (English, United States) or en_US_WIN (Windows variant).
-     *
-     * Specifying a locale causes javadoc to choose the resource files of that locale for messages
-     * (strings in the navigation bar, headings for lists and tables, help file contents,
-     * comments in stylesheet.css, and so forth).
-     * It also specifies the sorting order for lists sorted alphabetically,
-     * and the sentence separator to determine the end of the first sentence.
-     * It does not determine the locale of the doc comment text specified in the source files of the documented classes.
-     */
-    private final JavadocOptionFileOption<String> locale;
-
-    public String getLocale() {
-        return locale.getValue();
-    }
-
-    public void setLocale(String locale) {
-        this.locale.setValue(locale);
-    }
-
-    public MinimalJavadocOptions locale(String locale) {
-        setLocale(locale);
-        return this;
-    }
-
-    /**
-     * -encoding  name
-     * Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, the platform default converter is used.
-     *
-     * Also see -docencoding and -charset.
-     */
-    private final JavadocOptionFileOption<String> encoding;
-
-    public String getEncoding() {
-        return encoding.getValue();
-    }
-
-    public void setEncoding(String encoding) {
-        this.encoding.setValue(encoding);
-    }
-
-    public MinimalJavadocOptions encoding(String encoding) {
-        setEncoding(encoding);
-        return this;
-    }
-
-    private final OptionLessJavadocOptionFileOption<List<String>> sourceNames;
-
-    public List<String> getSourceNames() {
-        return sourceNames.getValue();
-    }
-
-    public void setSourceNames(List<String> sourceNames) {
-        this.sourceNames.setValue(sourceNames);
-    }
-
-    public MinimalJavadocOptions sourceNames(String ... sourceNames) {
-        this.sourceNames.getValue().addAll(Arrays.asList(sourceNames));
-        return this;
-    }
-
-    /**
-     * -Jflag
-     * Passes flag directly to the runtime system java that runs javadoc.
-     * Notice there must be no space between the J and the flag. For example,
-     * if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation,
-     * then you would call the -Xmx option of java as follows (-Xms is optional, as it only sets the size of initial memory,
-     * which is useful if you know the minimum amount of memory required):
-     *
-     *    C:> javadoc -J-Xmx32m -J-Xms32m com.mypackage
-     *
-     * To tell what version of javadoc you are using, call the "-version" option of java:
-     *
-     *    C:> javadoc -J-version
-     *    java version "1.2"
-     *    Classic VM (build JDK-1.2-V, green threads, sunwjit)
-     *
-     * (The version number of the standard doclet appears in its output stream.)
-     */
-    private List<String> jFlags = new ArrayList<String>();
-
-    public List<String> getJFlags() {
-        return jFlags;
-    }
-
-    public void setJFlags(List<String> jFlags) {
-        this.jFlags = jFlags;
-    }
-
-    public MinimalJavadocOptions jFlags(String ... jFlags) {
-        this.jFlags.addAll(Arrays.asList(jFlags));
-        return this;
-    }
-
-    private List<File> optionFiles = new ArrayList<File>();
-
-    public List<File> getOptionFiles() {
-        return optionFiles;
-    }
-
-    public void setOptionFiles(List<File> optionFiles) {
-        this.optionFiles = optionFiles;
-    }
-
-    public MinimalJavadocOptions optionFiles(File ... argumentFiles) {
-        this.optionFiles.addAll(Arrays.asList(argumentFiles));
-        return this;
-    }
-
-    public final void write(File outputFile) throws IOException {
-        optionFile.write(outputFile);
-    }
-
-    public <T> JavadocOptionFileOption<T> addOption(JavadocOptionFileOption<T> option) {
-        return optionFile.addOption(option);
-    }
-
-    public JavadocOptionFileOption<String> addStringOption(String option) {
-        return optionFile.addStringOption(option);
-    }
-
-    public JavadocOptionFileOption<String> addStringOption(String option, String value) {
-        return optionFile.addStringOption(option, value);
-    }
-
-    public <T extends Enum<T>> JavadocOptionFileOption<T> addEnumOption(String option) {
-        return optionFile.addEnumOption(option);
-    }
-
-    public <T extends Enum<T>> JavadocOptionFileOption<T> addEnumOption(String option, T value) {
-        return optionFile.addEnumOption(option, value);
-    }
-
-    public JavadocOptionFileOption<List<File>> addPathOption(String option) {
-        return optionFile.addPathOption(option);
-    }
-
-    public JavadocOptionFileOption<List<File>> addPathOption(String option, String joinBy) {
-        return optionFile.addPathOption(option, joinBy);
-    }
-
-    public JavadocOptionFileOption<List<String>> addStringsOption(String option) {
-        return optionFile.addStringsOption(option);
-    }
-
-    public JavadocOptionFileOption<List<String>> addStringsOption(String option, String joinBy) {
-        return optionFile.addStringsOption(option, joinBy);
-    }
-
-   public JavadocOptionFileOption<List<String>> addMultilineStringsOption(String option) {
-       return optionFile.addMultilineStringsOption(option);
-   }
-
-    public JavadocOptionFileOption<Boolean> addBooleanOption(String option) {
-        return optionFile.addBooleanOption(option);
-    }
-
-    public JavadocOptionFileOption<Boolean> addBooleanOption(String option, boolean value) {
-        return optionFile.addBooleanOption(option, value);
-    }
-
-    public JavadocOptionFileOption<File> addFileOption(String option) {
-        return optionFile.addFileOption(option);
-    }
-
-    public JavadocOptionFileOption<File> addFileOption(String option, File value) {
-        return optionFile.addFileOption(option, value);
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractListJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractListJavadocOptionFileOption.java
deleted file mode 100644
index 30e5070..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractListJavadocOptionFileOption.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import java.util.List;
-import java.io.IOException;
-
-/**
- * A base class for {@link org.gradle.external.javadoc.JavadocOptionFileOption} implementations whose value
- * is a {@code List}.
- *
- * @author Tom Eyckmans
- * @param <T> The type which this option represents.
- */
-public abstract class AbstractListJavadocOptionFileOption<T extends List> extends AbstractJavadocOptionFileOption<T> {
-    protected String joinBy;
-
-    protected AbstractListJavadocOptionFileOption(String option, String joinBy) {
-        super(option);
-        this.joinBy = joinBy;
-    }
-
-    protected AbstractListJavadocOptionFileOption(String option, T value, String joinBy) {
-        super(option, value);
-        this.joinBy = joinBy;
-    }
-
-    public T getValue() {
-        return value;
-    }
-
-    public void setValue(T value) {
-        if ( value == null ) {
-            this.value.clear();
-        }
-        else {
-            this.value = value;
-        }
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null && !value.isEmpty() ) {
-            writeCollectionValue(writerContext);
-        }
-    }
-
-    protected abstract void writeCollectionValue(JavadocOptionFileWriterContext writerContext) throws IOException;
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOption.java
deleted file mode 100644
index 7d6ff2c..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOption.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import java.io.IOException;
-
-/**
- * A {@link org.gradle.external.javadoc.JavadocOptionFileOption} whose value is a boolean.
- * 
- * @author Tom Eyckmans
- */
-public class BooleanJavadocOptionFileOption extends AbstractJavadocOptionFileOption<Boolean> {
-    protected BooleanJavadocOptionFileOption(String option) {
-        super(option);
-    }
-
-    protected BooleanJavadocOptionFileOption(String option, Boolean value) {
-        super(option, value);
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null && value) {
-            writerContext.writeOption(option);
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOption.java
deleted file mode 100644
index c4d9625..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOption.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import java.io.IOException;
-
-/**
- * @author Tom Eyckmans
- * @param <T> The type which this option represents.
- */
-public class EnumJavadocOptionFileOption<T> extends AbstractJavadocOptionFileOption<T> {
-    public EnumJavadocOptionFileOption(String option) {
-        super(option);
-    }
-
-    public EnumJavadocOptionFileOption(String option, T value) {
-        super(option, value);
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null ) {
-            writerContext.writeOption(value.toString().toLowerCase());
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOption.java
deleted file mode 100644
index ce6c7be..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOption.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import java.io.File;
-import java.io.IOException;
-
-/**
- * A {@link org.gradle.external.javadoc.JavadocOptionFileOption} whose value is a file.
- * 
- * @author Tom Eyckmans
- */
-public class FileJavadocOptionFileOption extends AbstractJavadocOptionFileOption<File> {
-    protected FileJavadocOptionFileOption(String option) {
-        super(option);
-    }
-
-    protected FileJavadocOptionFileOption(String option, File value) {
-        super(option, value);
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null ) {
-            writerContext.writeValueOption(option, value.getAbsolutePath());
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java
deleted file mode 100644
index 54f1fc5..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import org.gradle.util.GUtil;
-
-import java.io.IOException;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * A {@link org.gradle.external.javadoc.JavadocOptionFileOption} which represents the -groups command line
- * option.
- *
- * @author Tom Eyckmans
- */
-public class GroupsJavadocOptionFileOption extends AbstractJavadocOptionFileOption<Map<String, List<String>>> {
-    public GroupsJavadocOptionFileOption(String option) {
-        super(option, new LinkedHashMap<String, List<String>>());
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null && !value.isEmpty() ) {
-            for ( final String group : value.keySet() ) {
-                final List<String> groupPackages = value.get(group);
-
-                writerContext
-                    .writeOptionHeader(option)
-                    .write(
-                        new StringBuffer()
-                            .append("\"")
-                            .append(group)
-                            .append("\"")
-                            .toString())
-                    .write(" ")
-                    .write(
-                        new StringBuffer()
-                            .append("\"")
-                            .append(GUtil.join(groupPackages, ":"))
-                            .append("\"")
-                            .toString())
-                    .newLine();
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContext.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContext.java
deleted file mode 100644
index 679c9d1..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContext.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import java.io.BufferedWriter;
-import java.io.IOException;
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-
-/**
- * @author Tom Eyckmans
- */
-public class JavadocOptionFileWriterContext {
-    private final BufferedWriter writer;
-
-    public JavadocOptionFileWriterContext(BufferedWriter writer) {
-        this.writer = writer;
-    }
-
-    public JavadocOptionFileWriterContext write(String string) throws IOException {
-        writer.write(string);
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext newLine() throws IOException {
-        writer.newLine();
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeOptionHeader(String option) throws IOException {
-        write("-");
-        write(option);
-        write(" ");
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeOption(String option) throws IOException {
-        writeOptionHeader(option);
-        newLine();
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeValueOption(String option, String value) throws IOException {
-        writeOptionHeader(option);
-        writeValue(value);
-        newLine();
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeValue(String value) throws IOException {
-        write("\'");
-        write(value.replaceAll("\\\\", "\\\\\\\\"));
-        write("\'");
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeValueOption(String option, Collection<String> values) throws IOException {
-        for ( final String value : values ) {
-            writeValueOption(option, value);
-        }
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeValuesOption(String option, Collection<String> values, String joinValuesBy) throws IOException {
-        StringBuilder builder = new StringBuilder();
-        Iterator<String> valuesIt = values.iterator();
-        while (valuesIt.hasNext()) {
-            builder.append(valuesIt.next());
-            if (valuesIt.hasNext()) {
-                builder.append(joinValuesBy);
-            }
-        }
-        writeValueOption(option, builder.toString());
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writeMultilineValuesOption(String option, Collection<String> values) throws IOException {
-        for(String value : values) {
-            writeValueOption(option, value);
-        }
-        return this;
-    }
-
-    public JavadocOptionFileWriterContext writePathOption(String option, Collection<File> files, String joinValuesBy) throws IOException {
-        StringBuilder builder = new StringBuilder();
-        Iterator<File> filesIt = files.iterator();
-        while ( filesIt.hasNext() ) {
-            builder.append(filesIt.next().getAbsolutePath());
-            if (filesIt.hasNext()) {
-                builder.append(joinValuesBy);
-            }
-        }
-        writeValueOption(option, builder.toString());
-        return this;
-    }
-
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOption.java
deleted file mode 100644
index 9183c1e..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOption.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import org.gradle.external.javadoc.JavadocOfflineLink;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.io.IOException;
-
-/**
- * @author Tom Eyckmans
- */
-public class LinksOfflineJavadocOptionFileOption extends AbstractJavadocOptionFileOption<List<JavadocOfflineLink>> {
-    public LinksOfflineJavadocOptionFileOption(String option) {
-        super(option, new ArrayList<JavadocOfflineLink>());
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null && !value.isEmpty() ) {
-            for ( final JavadocOfflineLink offlineLink : value ) {
-                writerContext.writeValueOption(option, offlineLink.toString());
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOption.java
deleted file mode 100644
index 3bacad9..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOption.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.io.IOException;
-
-/**
- * @author Melanie Pfautz
- */
-public class MultilineStringsJavadocOptionFileOption extends AbstractListJavadocOptionFileOption<List<String>> {
-
-   // We should never attempt to join strings so if you see this, there's a problem
-    private static final String JOIN_BY = "Not Used!";
-
-    protected MultilineStringsJavadocOptionFileOption(String option) {
-        super(option, new ArrayList<String>(), JOIN_BY);
-    }
-
-    protected MultilineStringsJavadocOptionFileOption(String option, List<String> value) {
-        super(option, value, JOIN_BY);
-    }
-
-    public void writeCollectionValue(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null && !value.isEmpty() ) {
-            writerContext.writeMultilineValuesOption(option, value);
-       }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOption.java b/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOption.java
deleted file mode 100644
index 83899d7..0000000
--- a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOption.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc.internal;
-
-import org.gradle.external.javadoc.OptionLessJavadocOptionFileOption;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.io.IOException;
-
-/**
- * @author Tom Eyckmans
- */
-public class OptionLessStringsJavadocOptionFileOption implements OptionLessJavadocOptionFileOption<List<String>> {
-    private List<String> value;
-
-    public OptionLessStringsJavadocOptionFileOption() {
-        value = new ArrayList<String>();
-    }
-
-    public OptionLessStringsJavadocOptionFileOption(List<String> value) {
-        this.value = value;
-    }
-
-    public List<String> getValue() {
-        return value;
-    }
-
-    public void setValue(List<String> value) {
-        if ( value == null ) {
-            this.value.clear();
-        }
-        else {
-            this.value = value;
-        }
-    }
-
-    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
-        if ( value != null && !value.isEmpty() ) {
-            for ( String singleValue : value ) {
-                writerContext.writeValue(singleValue);
-                writerContext.newLine();
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFrameworkTest.java b/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFrameworkTest.java
deleted file mode 100644
index 24d25b9..0000000
--- a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFrameworkTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.tasks.testing.junit;
-
-import org.gradle.api.internal.project.ServiceRegistry;
-import org.gradle.api.internal.tasks.testing.AbstractTestFrameworkTest;
-import org.gradle.api.internal.tasks.testing.TestClassProcessor;
-import org.gradle.api.tasks.testing.junit.JUnitOptions;
-import org.gradle.util.IdGenerator;
-import org.jmock.Expectations;
-import org.junit.Before;
-
-import static junit.framework.Assert.assertNotNull;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-/**
- * @author Tom Eyckmans
- */
-public class JUnitTestFrameworkTest extends AbstractTestFrameworkTest {
-    private JUnitTestFramework jUnitTestFramework;
-    private AntJUnitReport antJUnitReportMock;
-    private JUnitOptions jUnitOptionsMock;
-    private IdGenerator<?> idGenerator;
-    private ServiceRegistry serviceRegistry;
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-
-        antJUnitReportMock = context.mock(AntJUnitReport.class);
-        jUnitOptionsMock = context.mock(JUnitOptions.class);
-        idGenerator = context.mock(IdGenerator.class);
-        serviceRegistry = context.mock(ServiceRegistry.class);
-
-        context.checking(new Expectations(){{
-            allowing(testMock).getTestClassesDir();will(returnValue(testClassesDir));
-            allowing(testMock).getClasspath();will(returnValue(classpathMock));
-        }});
-    }
-
-    @org.junit.Test
-    public void testInitialize() {
-        jUnitTestFramework = new JUnitTestFramework(testMock);
-        setMocks();
-
-        assertNotNull(jUnitTestFramework.getOptions());
-        assertNotNull(jUnitTestFramework.getAntJUnitReport());
-    }
-
-    @org.junit.Test
-    public void testCreatesTestProcessor() {
-        jUnitTestFramework = new JUnitTestFramework(testMock);
-        setMocks();
-
-        context.checking(new Expectations() {{
-            one(testMock).getTestResultsDir(); will(returnValue(testResultsDir));
-            one(serviceRegistry).get(IdGenerator.class); will(returnValue(idGenerator));
-        }});
-
-        TestClassProcessor testClassProcessor = jUnitTestFramework.getProcessorFactory().create(serviceRegistry);
-        assertThat(testClassProcessor, instanceOf(JUnitTestClassProcessor.class));
-    }
-
-    @org.junit.Test
-    public void testReport() {
-        jUnitTestFramework = new JUnitTestFramework(testMock);
-        setMocks();
-
-        context.checking(new Expectations() {{
-            one(testMock).getTestResultsDir(); will(returnValue(testResultsDir));
-            one(testMock).getTestReportDir(); will(returnValue(testReportDir));
-            one(projectMock).getAnt(); will(returnValue(antBuilderMock));
-            one(testMock).isTestReport(); will(returnValue(true));
-            one(antJUnitReportMock).execute(
-                    testResultsDir, testReportDir,
-                    antBuilderMock
-            );
-        }});
-
-        jUnitTestFramework.report();
-    }
-
-    @org.junit.Test
-    public void testReportWithDisabledReport() {
-        jUnitTestFramework = new JUnitTestFramework(testMock);
-        setMocks();
-
-        context.checking(new Expectations() {{
-            one(testMock).isTestReport(); will(returnValue(false));
-        }});
-
-        jUnitTestFramework.report();
-    }
-
-    private void setMocks() {
-        jUnitTestFramework.setAntJUnitReport(antJUnitReportMock);
-        jUnitTestFramework.setOptions(jUnitOptionsMock);
-    }
-}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFrameworkTest.java b/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFrameworkTest.java
deleted file mode 100644
index 566401c..0000000
--- a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFrameworkTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.internal.tasks.testing.testng;
-
-import org.gradle.api.JavaVersion;
-import org.gradle.api.internal.project.ServiceRegistry;
-import org.gradle.api.internal.tasks.testing.AbstractTestFrameworkTest;
-import org.gradle.api.internal.tasks.testing.TestClassProcessor;
-import org.gradle.api.tasks.testing.testng.TestNGOptions;
-import org.gradle.util.IdGenerator;
-import org.jmock.Expectations;
-import org.junit.Before;
-
-import java.io.File;
-
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
-/**
- * @author Tom Eyckmans
- */
-public class TestNGTestFrameworkTest extends AbstractTestFrameworkTest {
-
-    private TestNGTestFramework testNGTestFramework;
-    private TestNGOptions testngOptionsMock;
-    private IdGenerator<?> idGeneratorMock;
-    private ServiceRegistry serviceRegistry;
-
-    @Before
-    public void setUp() throws Exception {
-        super.setUp();
-
-        testngOptionsMock = context.mock(TestNGOptions.class);
-        idGeneratorMock = context.mock(IdGenerator.class);
-        serviceRegistry = context.mock(ServiceRegistry.class);
-
-        final JavaVersion sourceCompatibility = JavaVersion.VERSION_1_5;
-        context.checking(new Expectations() {{
-            allowing(projectMock).getProjectDir(); will(returnValue(new File("projectDir")));
-            allowing(projectMock).property("sourceCompatibility"); will(returnValue(sourceCompatibility));
-            allowing(testMock).getTestClassesDir();will(returnValue(testClassesDir));
-            allowing(testMock).getClasspath();will(returnValue(classpathMock));
-            allowing(testMock).getTemporaryDir(); will(returnValue(temporaryDir));
-        }});
-    }
-
-    @org.junit.Test
-    public void testInitialize() {
-        testNGTestFramework = new TestNGTestFramework(testMock);
-        setMocks();
-
-        assertNotNull(testNGTestFramework.getOptions());
-    }
-
-    @org.junit.Test
-    public void testCreatesTestProcessor() {
-        testNGTestFramework = new TestNGTestFramework(testMock);
-        setMocks();
-
-        context.checking(new Expectations() {{
-            allowing(testMock).getTestSrcDirs();  will(returnValue(testSrcDirs));
-            allowing(testMock).getTestReportDir(); will(returnValue(testReportDir));
-            allowing(serviceRegistry).get(IdGenerator.class); will(returnValue(idGeneratorMock));
-            one(testngOptionsMock).setTestResources(testSrcDirs);
-            one(testngOptionsMock).getSuites(temporaryDir);
-        }});
-
-        TestClassProcessor processor = testNGTestFramework.getProcessorFactory().create(serviceRegistry);
-        assertThat(processor, instanceOf(TestNGTestClassProcessor.class));
-    }
-
-    private void setMocks() {
-        testNGTestFramework.setOptions(testngOptionsMock);
-    }
-}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy b/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy
deleted file mode 100644
index 08c2724..0000000
--- a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-
- 
-package org.gradle.api.plugins
-
-import org.gradle.api.DefaultTask
-import org.gradle.api.Project
-import org.gradle.api.tasks.Copy
-import org.gradle.api.tasks.bundling.Jar
-import org.gradle.api.tasks.compile.Compile
-import org.gradle.api.tasks.javadoc.Javadoc
-import org.gradle.util.HelperUtil
-import org.gradle.util.Matchers
-import spock.lang.Specification
-import static org.gradle.util.WrapUtil.toLinkedSet
-import org.gradle.api.tasks.testing.Test
-import org.gradle.util.SetSystemProperties
-import org.junit.Rule
-
-/**
- * @author Hans Dockter
- */
-
-class JavaBasePluginTest extends Specification {
-    @Rule
-    public SetSystemProperties sysProperties = new SetSystemProperties()
-    private final Project project = HelperUtil.createRootProject()
-    private final JavaBasePlugin javaBasePlugin = new JavaBasePlugin()
-
-    void appliesBasePluginsAndAddsConventionObject() {
-        when:
-        javaBasePlugin.apply(project)
-
-        then:
-        project.getPlugins().hasPlugin(ReportingBasePlugin)
-        project.getPlugins().hasPlugin(BasePlugin)
-        project.convention.plugins.java instanceof JavaPluginConvention
-    }
-
-    void createsTasksAndAppliesMappingsForNewSourceSet() {
-        when:
-        javaBasePlugin.apply(project)
-        project.sourceSets.add('custom')
-        
-        then:
-        def set = project.sourceSets.custom
-        set.java.srcDirs == toLinkedSet(project.file('src/custom/java'))
-        set.resources.srcDirs == toLinkedSet(project.file('src/custom/resources'))
-        set.classesDir == new File(project.buildDir, 'classes/custom')
-        Matchers.builtBy('customClasses').matches(set.classes)
-
-        def task = project.tasks['processCustomResources']
-        task.description == 'Processes the custom resources.'
-        task instanceof Copy
-        Matchers.dependsOn().matches(task)
-        task.destinationDir == project.sourceSets.custom.classesDir
-        task.defaultSource == project.sourceSets.custom.resources
-
-        task = project.tasks['compileCustomJava']
-        task.description == 'Compiles the custom Java source.'
-        task instanceof Compile
-        Matchers.dependsOn().matches(task)
-        task.defaultSource == project.sourceSets.custom.java
-        task.classpath.is(project.sourceSets.custom.compileClasspath)
-        task.destinationDir == project.sourceSets.custom.classesDir
-
-        task = project.tasks['customClasses']
-        task.description == 'Assembles the custom classes.'
-        task instanceof DefaultTask
-        Matchers.dependsOn('processCustomResources', 'compileCustomJava').matches(task)
-    }
-
-    void appliesMappingsToTasksDefinedByBuildScript() {
-        when:
-        javaBasePlugin.apply(project)
-        def task = project.createTask('customCompile', type: Compile)
-
-        then:
-        task.sourceCompatibility == project.sourceCompatibility.toString()
-
-        task = project.createTask('customTest', type: Test.class)
-        task.workingDir == project.projectDir
-        task.testResultsDir == project.testResultsDir
-        task.testReportDir == project.testReportDir
-
-        task = project.createTask('customJavadoc', type: Javadoc)
-        task.destinationDir == project.file("$project.docsDir/javadoc")
-        task.title == project.apiDocTitle
-    }
-
-    void appliesMappingsToCustomJarTasks() {
-        when:
-        javaBasePlugin.apply(project)
-        def task = project.createTask('customJar', type: Jar)
-
-        then:
-        Matchers.dependsOn().matches(task)
-        task.destinationDir == project.libsDir
-    }
-
-    void createsLifecycleBuildTasks() {
-        when:
-        javaBasePlugin.apply(project)
-
-        then:
-        def build = project.tasks[JavaBasePlugin.BUILD_TASK_NAME]
-        Matchers.dependsOn(JavaBasePlugin.CHECK_TASK_NAME, BasePlugin.ASSEMBLE_TASK_NAME).matches(build)
-
-        def buildDependent = project.tasks[JavaBasePlugin.BUILD_DEPENDENTS_TASK_NAME]
-        Matchers.dependsOn(JavaBasePlugin.BUILD_TASK_NAME).matches(buildDependent)
-
-        def buildNeeded = project.tasks[JavaBasePlugin.BUILD_NEEDED_TASK_NAME]
-        Matchers.dependsOn(JavaBasePlugin.BUILD_TASK_NAME).matches(buildNeeded)
-    }
-
-    def configuresTestTaskWhenDebugSystemPropertyIsSet() {
-        javaBasePlugin.apply(project)
-        def task = project.tasks.add('test', Test.class)
-
-        when:
-        System.setProperty("test.debug", "true")
-        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
-
-        then:
-        task.debug
-    }
-
-    def configuresTestTaskWhenSingleTestSystemPropertyIsSet() {
-        javaBasePlugin.apply(project)
-        def task = project.tasks.add('test', Test.class)
-        task.include 'ignoreme'
-
-        when:
-        System.setProperty("test.single", "pattern")
-        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
-
-        then:
-        task.includes == ['**/pattern*.class'] as Set
-    }
-
-}
\ No newline at end of file
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/AbstractTestFrameworkOptionsTest.java b/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/AbstractTestFrameworkOptionsTest.java
deleted file mode 100644
index b33f432..0000000
--- a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/AbstractTestFrameworkOptionsTest.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.tasks.testing;
-
-import org.gradle.api.internal.tasks.testing.TestFramework;
-import org.gradle.util.JUnit4GroovyMockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-
-/**
- * @author Tom Eyckmans
- */
-public class AbstractTestFrameworkOptionsTest<T extends TestFramework> {
-    protected JUnit4GroovyMockery context = new JUnit4GroovyMockery();
-
-    protected T testFrameworkMock;
-
-    protected void setUp(Class<T> testFrameworkClass) throws Exception
-    {
-        context.setImposteriser(ClassImposteriser.INSTANCE);
-
-        testFrameworkMock = context.mock(testFrameworkClass);
-    }
-}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptionsTest.java b/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptionsTest.java
deleted file mode 100644
index b62a7dc..0000000
--- a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptionsTest.java
+++ /dev/null
@@ -1,514 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.external.javadoc;
-
-import org.gradle.external.javadoc.internal.LinksOfflineJavadocOptionFileOption;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.After;
-import static org.junit.Assert.*;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
-import org.jmock.Expectations;
-import org.gradle.external.javadoc.internal.JavadocOptionFile;
-import org.gradle.external.javadoc.internal.GroupsJavadocOptionFileOption;
-
-import java.util.*;
-import java.io.File;
-
-/**
- * @author Tom Eyckmans
- */
-public class StandardJavadocDocletOptionsTest {
-
-    private final JUnit4Mockery context = new JUnit4Mockery();
-    private StandardJavadocDocletOptions options;
-
-    @Before
-    public void setUp() {
-        context.setImposteriser(ClassImposteriser.INSTANCE);
-
-        options = new StandardJavadocDocletOptions();
-    }
-
-    @Test
-    public void testDefaults() {
-        // core javadoc options
-        assertNull(options.getOverview());
-        assertNull(options.getMemberLevel());
-        assertNull(options.getDoclet());
-        assertEmpty(options.getDocletpath());
-        assertNull(options.getSource());
-        assertEmpty(options.getClasspath());
-        assertEmpty(options.getBootClasspath());
-        assertEmpty(options.getExtDirs());
-        assertEquals(options.getOutputLevel(), JavadocOutputLevel.QUIET);
-        assertFalse(options.isBreakIterator());
-        assertNull(options.getLocale());
-        assertNull(options.getEncoding());
-        assertEmpty(options.getJFlags());
-        assertEmpty(options.getSourceNames());
-        assertEmpty(options.getOptionFiles());
-        // standard doclet options
-        assertNull(options.getDestinationDirectory());
-        assertFalse(options.isUse());
-        assertFalse(options.isVersion());
-        assertFalse(options.isAuthor());
-        assertFalse(options.isSplitIndex());
-        assertNull(options.getWindowTitle());
-        assertNull(options.getDocTitle());
-        assertNull(options.getFooter());
-        assertNull(options.getBottom());
-        assertEmpty(options.getLinks());
-        assertEmpty(options.getLinksOffline());
-        assertFalse(options.isLinkSource());
-        assertEmpty(options.getGroups());
-        assertFalse(options.isNoDeprecated());
-        assertFalse(options.isNoDeprecatedList());
-        assertFalse(options.isNoSince());
-        assertFalse(options.isNoTree());
-        assertFalse(options.isNoIndex());
-        assertFalse(options.isNoHelp());
-        assertFalse(options.isNoNavBar());
-        assertNull(options.getHelpFile());
-        assertNull(options.getStylesheetFile());
-        assertFalse(options.isSerialWarn());
-        assertNull(options.getCharSet());
-        assertNull(options.getDocEncoding());
-        assertFalse(options.isKeyWords());
-        assertEmpty(options.getTags());
-        assertEmpty(options.getTagletPath());
-        assertFalse(options.isDocFilesSubDirs());
-        assertEmpty(options.getExcludeDocFilesSubDir());
-        assertEmpty(options.getNoQualifiers());
-        assertFalse(options.isNoTimestamp());
-        assertFalse(options.isNoComment());
-    }
-
-    @Test
-    public void testConstructor() {
-        final JavadocOptionFile optionFileMock = context.mock(JavadocOptionFile.class);
-
-        context.checking(new Expectations(){{
-            // core options
-            one(optionFileMock).addStringOption("overview");
-            one(optionFileMock).addEnumOption("memberLevel");
-            one(optionFileMock).addStringOption("doclet");
-            one(optionFileMock).addPathOption("docletclasspath");
-            one(optionFileMock).addStringOption("source");
-            one(optionFileMock).addPathOption("sourcepath");
-            one(optionFileMock).addPathOption("classpath");
-            one(optionFileMock).addStringsOption("subpackages", ";");
-            one(optionFileMock).addStringsOption("exclude", ":");
-            one(optionFileMock).addPathOption("bootclasspath");
-            one(optionFileMock).addPathOption("extdirs");
-            one(optionFileMock).addEnumOption("outputLevel", JavadocOutputLevel.QUIET);
-            one(optionFileMock).addBooleanOption("breakiterator");
-            one(optionFileMock).addStringOption("locale");
-            one(optionFileMock).addStringOption("encoding");
-            // standard doclet options
-            one(optionFileMock).addFileOption("d");
-            one(optionFileMock).addBooleanOption("use");
-            one(optionFileMock).addBooleanOption("version");
-            one(optionFileMock).addBooleanOption("author");
-            one(optionFileMock).addBooleanOption("splitindex");
-            one(optionFileMock).addStringOption("windowtitle");
-            one(optionFileMock).addStringOption("doctitle");
-            one(optionFileMock).addStringOption("footer");
-            one(optionFileMock).addStringOption("bottom");
-            one(optionFileMock).addStringOption("link");
-            allowing(optionFileMock).addOption(new LinksOfflineJavadocOptionFileOption("linkoffline"));
-            one(optionFileMock).addBooleanOption("linksource");
-            one(optionFileMock).addOption(new GroupsJavadocOptionFileOption("group"));
-            one(optionFileMock).addBooleanOption("nodeprecated");
-            one(optionFileMock).addBooleanOption("nodeprecatedlist");
-            one(optionFileMock).addBooleanOption("nosince");
-            one(optionFileMock).addBooleanOption("notree");
-            one(optionFileMock).addBooleanOption("noindex");
-            one(optionFileMock).addBooleanOption("nohelp");
-            one(optionFileMock).addBooleanOption("nonavbar");
-            one(optionFileMock).addFileOption("helpfile");
-            one(optionFileMock).addFileOption("stylesheetfile");
-            one(optionFileMock).addBooleanOption("serialwarn");
-            one(optionFileMock).addStringOption("charset");
-            one(optionFileMock).addStringOption("docencoding");
-            one(optionFileMock).addBooleanOption("keywords");
-            one(optionFileMock).addStringOption("tags");
-            one(optionFileMock).addPathOption("tagletpath");
-            one(optionFileMock).addBooleanOption("docfilessubdirs");
-            one(optionFileMock).addStringsOption("excludedocfilessubdir", ":");
-            one(optionFileMock).addStringsOption("noqualifier", ":");
-            one(optionFileMock).addBooleanOption("notimestamp");
-            one(optionFileMock).addBooleanOption("nocomment");
-        }});
-
-        options = new StandardJavadocDocletOptions();
-    }
-
-    @Test
-    public void testFluentOverview() {
-        final String overviewValue = "overview";
-        assertEquals(options, options.overview(overviewValue));
-        assertEquals(overviewValue, options.getOverview());
-    }
-
-    @Test
-    public void testShowAll() {
-        assertEquals(options, options.showAll());
-        assertEquals(JavadocMemberLevel.PRIVATE, options.getMemberLevel());
-    }
-
-    @Test
-    public void testShowFromPublic() {
-        assertEquals(options, options.showFromPublic());
-        assertEquals(JavadocMemberLevel.PUBLIC, options.getMemberLevel());
-    }
-
-    @Test
-    public void testShowFromPackage() {
-        assertEquals(options, options.showFromPackage());
-        assertEquals(JavadocMemberLevel.PACKAGE, options.getMemberLevel());
-    }
-
-    @Test
-    public void testShowFromProtected() {
-        assertEquals(options, options.showFromProtected());
-        assertEquals(JavadocMemberLevel.PROTECTED, options.getMemberLevel());
-    }
-
-    @Test
-    public void testShowFromPrivate() {
-        assertEquals(options, options.showFromPrivate());
-        assertEquals(JavadocMemberLevel.PRIVATE, options.getMemberLevel());
-    }
-
-    @Test
-    public void testFluentDocletClass() {
-        final String docletValue = "org.gradle.CustomDocletClass";
-        assertEquals(options, options.doclet(docletValue));
-        assertEquals(docletValue, options.getDoclet());
-    }
-
-    @Test
-    public void testFluentDocletClasspath() {
-        final File[] docletClasspathValue = new File[]{new File("doclet.jar"), new File("doclet-dep.jar")};
-        assertEquals(options, options.docletpath(docletClasspathValue));
-        assertArrayEquals(docletClasspathValue, options.getDocletpath().toArray());
-    }
-
-    @Test
-    public void testFluentSource() {
-        final String sourceValue = "1.5";
-        assertEquals(options, options.source(sourceValue));
-        assertEquals(sourceValue, options.getSource());
-    }
-
-    @Test
-    public void testFluentClasspath() {
-        final File[] classpathValue = new File[]{new File("classpath.jar"), new File("classpath-dir")};
-        assertEquals(options, options.classpath(classpathValue));
-        assertArrayEquals(classpathValue, options.getClasspath().toArray());
-    }
-
-    @Test
-    public void testFluentBootclasspath() {
-        final File[] bootClasspathValue = new File[]{new File("bootclasspath.jar"), new File("bootclasspath2.jar")};
-        assertEquals(options, options.bootClasspath(bootClasspathValue));
-        assertArrayEquals(bootClasspathValue, options.getBootClasspath().toArray());
-    }
-
-    @Test
-    public void testFluentExtDirs() {
-        final File[] extDirsValue = new File[]{new File("extDirOne"), new File("extDirTwo")};
-        assertEquals(options, options.extDirs(extDirsValue));
-        assertArrayEquals(extDirsValue, options.getExtDirs().toArray());
-    }
-
-    @Test
-    public void testQuietOutputLevel() {
-        assertEquals(options, options.quiet());
-        assertEquals(JavadocOutputLevel.QUIET, options.getOutputLevel());
-    }
-
-    @Test
-    public void testVerboseOutputLevel() {
-        assertEquals(options, options.verbose());
-        assertEquals(JavadocOutputLevel.VERBOSE, options.getOutputLevel());
-        assertTrue(options.isVerbose());
-    }
-
-    @Test
-    public void testFluentBreakIterator() {
-        assertEquals(options, options.breakIterator());
-        assertTrue(options.isBreakIterator());
-    }
-
-    @Test
-    public void testFluentLocale() {
-        final String localeValue = "nl";
-        assertEquals(options, options.locale(localeValue));
-        assertEquals(localeValue, options.getLocale());
-    }
-
-    @Test
-    public void testFluentEncoding() {
-        final String encodingValue = "UTF-8";
-        assertEquals(options, options.encoding(encodingValue));
-        assertEquals(encodingValue, options.getEncoding());
-    }
-
-    @Test
-    public void testFluentDirectory() {
-        final File directoryValue = new File("testOutput");
-        assertEquals(options, options.destinationDirectory(directoryValue));
-        assertEquals(directoryValue, options.getDestinationDirectory());
-    }
-
-    @Test
-    public void testFluentUse() {
-        assertEquals(options, options.use());
-        assertTrue(options.isUse());
-    }
-
-    @Test
-    public void testFluentVersion() {
-        assertEquals(options, options.version());
-        assertTrue(options.isVersion());
-    }
-
-    @Test
-    public void testFluentAuthor() {
-        assertEquals(options, options.author());
-        assertTrue(options.isAuthor());
-    }
-
-    @Test
-    public void testFluentSplitIndex() {
-        assertEquals(options, options.splitIndex());
-        assertTrue(options.isSplitIndex());
-    }
-
-    @Test
-    public void testFluentWindowTitle() {
-        final String windowTitleValue = "windowTitleValue";
-        assertEquals(options, options.windowTitle(windowTitleValue));
-        assertEquals(windowTitleValue, options.getWindowTitle());
-    }
-
-    @Test
-    public void testFluentDocTitle() {
-        final String docTitleValue = "docTitleValue";
-        assertEquals(options, options.docTitle(docTitleValue));
-        assertEquals(docTitleValue, options.getDocTitle());
-    }
-
-    @Test
-    public void testFluentFooter() {
-        final String footerValue = "footerValue";
-        assertEquals(options, options.footer(footerValue));
-        assertEquals(footerValue, options.getFooter());
-    }
-
-    @Test
-    public void testFluentBottom() {
-        final String bottomValue = "bottomValue";
-        assertEquals(options, options.bottom(bottomValue));
-        assertEquals(bottomValue, options.getBottom());
-    }
-
-    @Test
-    public void testFluentLink() {
-        final String[] linkValue = new String[]{"http://otherdomain.org/javadoc"};
-        assertEquals(options, options.links(linkValue));
-        assertArrayEquals(linkValue, options.getLinks().toArray());
-    }
-
-    @Test
-    public void testFluentLinkOffline() {
-        final String extDocUrl = "http://otherdomain.org/javadoc";
-        final String packageListLoc = "/home/someuser/used-lib-local-javadoc-list";
-        assertEquals(options, options.linksOffline(extDocUrl, packageListLoc));
-        assertEquals(extDocUrl, options.getLinksOffline().get(0).getExtDocUrl());
-        assertEquals(packageListLoc, options.getLinksOffline().get(0).getPackagelistLoc());
-    }
-
-    @Test
-    public void testFluentLinkSource() {
-        assertEquals(options, options.linkSource());
-        assertTrue(options.isLinkSource());
-    }
-
-    @Test
-    public void testFluentGroup() {
-        final String groupOneName = "groupOneName";
-        final String[] groupOnePackages = new String[]{"java.lang", "java.io"};
-
-        final String groupTwoName = "gradle";
-        final String[] groupTwoPackages = new String[]{"org.gradle"};
-
-        assertEquals(options, options.group(groupOneName, groupOnePackages));
-        assertEquals(options, options.group(groupTwoName, groupTwoPackages));
-        assertEquals(2, options.getGroups().size());
-        assertArrayEquals(groupOnePackages, options.getGroups().get(groupOneName).toArray());
-        assertArrayEquals(groupTwoPackages, options.getGroups().get(groupTwoName).toArray());
-    }
-
-    @Test
-    public void testFluentNoDeprecated() {
-        assertEquals(options, options.noDeprecated());
-        assertTrue(options.isNoDeprecated());
-    }
-
-    @Test
-    public void testFluentNoDeprecatedList() {
-        assertEquals(options, options.noDeprecatedList());
-        assertTrue(options.isNoDeprecatedList());
-    }
-
-    @Test
-    public void testFluentNoSince() {
-        assertEquals(options, options.noSince());
-        assertTrue(options.isNoSince());
-    }
-
-    @Test
-    public void testFluentNoTree() {
-        assertEquals(options, options.noTree());
-        assertTrue(options.isNoTree());
-    }
-
-    @Test
-    public void testFluentNoIndex() {
-        assertEquals(options, options.noIndex());
-        assertTrue(options.isNoIndex());
-    }
-
-    @Test
-    public void testFluentNoNavBar() {
-        assertEquals(options, options.noNavBar());
-        assertTrue(options.isNoNavBar());
-    }
-
-    @Test
-    public void testFluentHelpFile() {
-        final File helpFileValue = new File("help-file.txt");
-        assertEquals(options, options.helpFile(helpFileValue));
-        assertEquals(helpFileValue, options.getHelpFile());
-    }
-
-    @Test
-    public void testFluentStylesheetFile() {
-        final File stylesheetFileValue = new File("stylesheet.css");
-        assertEquals(options, options.stylesheetFile(stylesheetFileValue));
-        assertEquals(stylesheetFileValue, options.getStylesheetFile());
-    }
-
-    @Test
-    public void testFluentSerialWarn() {
-        assertEquals(options, options.serialWarn());
-        assertTrue(options.isSerialWarn());
-    }
-
-    @Test
-    public void testFluentCharset() {
-        final String charsetValue = "dummy-charset";
-        assertEquals(options, options.charSet(charsetValue));
-        assertEquals(charsetValue, options.getCharSet());
-    }
-
-    @Test
-    public void testFluentDocEncoding() {
-        final String docEncodingValue = "UTF-16";
-        assertEquals(options, options.docEncoding(docEncodingValue));
-        assertEquals(docEncodingValue, options.getDocEncoding());
-    }
-
-    @Test
-    public void testFluentKeywords() {
-        assertEquals(options, options.keyWords());
-        assertTrue(options.isKeyWords());
-    }
-
-    @Test
-    public void testFluentTagsAndTaglets() {
-        final String[] tagletsValue = new String[]{"com.sun.tools.doclets.ToDoTaglet"};
-        final String[] tagsValue = new String[]{"param", "return", "todo:a:\"To Do:\""};
-
-        final List<String> tempList = new ArrayList<String>();
-        tempList.addAll(Arrays.asList(tagletsValue));
-        tempList.addAll(Arrays.asList(tagsValue));
-
-        final Object[] totalTagsValue = tempList.toArray();
-        assertEquals(options, options.taglets(tagletsValue));
-        assertEquals(options, options.tags(tagsValue));
-        assertArrayEquals(totalTagsValue, options.getTags().toArray());
-    }
-
-    @Test
-    public void testFluentTagletPath() {
-        final File[] tagletPathValue = new File[]{new File("tagletOne.jar"), new File("tagletTwo.jar")};
-        assertEquals(options, options.tagletPath(tagletPathValue));
-        assertArrayEquals(tagletPathValue, options.getTagletPath().toArray());
-    }
-
-    @Test
-    public void testFluentDocFilesSubDirs() {
-        assertEquals(options, options.docFilesSubDirs());
-        assertTrue(options.isDocFilesSubDirs());
-    }
-
-    @Test
-    public void testFluentExcludeDocFilesSubDir() {
-        final String[] excludeDocFilesSubDirValue = new String[]{".hg",".svn",".bzr", ".git"};
-        assertEquals(options, options.excludeDocFilesSubDir(excludeDocFilesSubDirValue));
-        assertArrayEquals(excludeDocFilesSubDirValue, options.getExcludeDocFilesSubDir().toArray());
-    }
-
-    @Test
-    public void testFluentNoQualifier() {
-        String[] noQualifierValue = new String[]{"java.lang", "java.io"};
-        assertEquals(options, options.noQualifiers(noQualifierValue));
-        assertArrayEquals(noQualifierValue, options.getNoQualifiers().toArray());
-    }
-
-    @Test
-    public void testFluetNoTimestamp() {
-        assertEquals(options, options.noTimestamp());
-        assertTrue(options.isNoTimestamp());
-    }
-
-    @Test
-    public void testFluentNoComment() {
-        assertEquals(options, options.noComment());
-        assertTrue(options.isNoComment());
-    }
-
-    @After
-    public void tearDown() {
-        options = null;
-    }
-
-    public static void assertEmpty(Collection shouldBeEmptyCollection) {
-        assertNotNull(shouldBeEmptyCollection);
-        assertTrue(shouldBeEmptyCollection.isEmpty());
-    }
-
-    public static void assertEmpty(Map shouldBeEmptyMap) {
-        assertNotNull(shouldBeEmptyMap);
-        assertTrue(shouldBeEmptyMap.isEmpty());
-    }
-}
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaBasePlugin.groovy b/subprojects/gradle-scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaBasePlugin.groovy
deleted file mode 100644
index 000b5fb..0000000
--- a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaBasePlugin.groovy
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.scala;
-
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.file.FileTreeElement
-import org.gradle.api.internal.tasks.DefaultScalaSourceSet
-import org.gradle.api.plugins.JavaBasePlugin
-import org.gradle.api.plugins.JavaPluginConvention
-import org.gradle.api.tasks.SourceSet
-import org.gradle.api.tasks.scala.ScalaCompile
-import org.gradle.api.tasks.scala.ScalaDoc
-
-public class ScalaBasePlugin implements Plugin<Project> {
-    // public configurations
-    public static final String SCALA_TOOLS_CONFIGURATION_NAME = "scalaTools";
-
-    public void apply(Project project) {
-        JavaBasePlugin javaPlugin = project.plugins.apply(JavaBasePlugin.class);
-
-        project.configurations.add(SCALA_TOOLS_CONFIGURATION_NAME).setVisible(false).setTransitive(true).
-                setDescription("The Scala tools libraries to be used for this Scala project.");
-
-        configureCompileDefaults(project, javaPlugin)
-        configureSourceSetDefaults(project, javaPlugin)
-        configureScaladoc(project);
-    }
-
-    private void configureSourceSetDefaults(Project project, JavaBasePlugin javaPlugin) {
-        project.convention.getPlugin(JavaPluginConvention.class).sourceSets.allObjects {SourceSet sourceSet ->
-            sourceSet.convention.plugins.scala = new DefaultScalaSourceSet(sourceSet.displayName, project.fileResolver)
-            sourceSet.scala.srcDir { project.file("src/$sourceSet.name/scala")}
-            sourceSet.allJava.add(sourceSet.scala.matching(sourceSet.java.filter))
-            sourceSet.allSource.add(sourceSet.scala)
-            sourceSet.resources.filter.exclude { FileTreeElement element -> sourceSet.scala.contains(element.file) }
-
-            String taskName = sourceSet.getCompileTaskName('scala')
-            ScalaCompile scalaCompile = project.tasks.add(taskName, ScalaCompile.class);
-            scalaCompile.dependsOn sourceSet.compileJavaTaskName
-            javaPlugin.configureForSourceSet(sourceSet, scalaCompile);
-            scalaCompile.description = "Compiles the $sourceSet.scala.";
-            scalaCompile.conventionMapping.defaultSource = { sourceSet.scala }
-
-            project.tasks[sourceSet.classesTaskName].dependsOn(taskName)
-        }
-    }
-
-    private void configureCompileDefaults(final Project project, JavaBasePlugin javaPlugin) {
-        project.tasks.withType(ScalaCompile.class).allTasks {ScalaCompile compile ->
-            compile.scalaClasspath = project.configurations[SCALA_TOOLS_CONFIGURATION_NAME]
-        }
-    }
-
-    private void configureScaladoc(final Project project) {
-        project.getTasks().withType(ScalaDoc.class).allTasks {ScalaDoc scalaDoc ->
-            scalaDoc.conventionMapping.destinationDir = { project.file("$project.docsDir/scaladoc") }
-            scalaDoc.conventionMapping.title = { project.apiDocTitle }
-            scalaDoc.scalaClasspath = project.configurations[SCALA_TOOLS_CONFIGURATION_NAME]
-        }
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaPlugin.groovy b/subprojects/gradle-scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaPlugin.groovy
deleted file mode 100644
index 77f8d61..0000000
--- a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaPlugin.groovy
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.plugins.scala;
-
-
-import org.gradle.api.Plugin
-import org.gradle.api.Project
-import org.gradle.api.plugins.JavaPlugin
-import org.gradle.api.tasks.scala.ScalaDoc
-import org.gradle.api.plugins.JavaBasePlugin
-
-public class ScalaPlugin implements Plugin<Project> {
-    // tasks
-    public static final String SCALA_DOC_TASK_NAME = "scaladoc";
-
-    public void apply(Project project) {
-        project.plugins.apply(ScalaBasePlugin.class);
-        project.plugins.apply(JavaPlugin.class);
-
-        configureScaladoc(project);
-    }
-
-    private void configureScaladoc(final Project project) {
-        project.getTasks().withType(ScalaDoc.class).allTasks {ScalaDoc scalaDoc ->
-            scalaDoc.conventionMapping.classpath = { project.sourceSets.main.classes + project.sourceSets.main.compileClasspath }
-            scalaDoc.conventionMapping.defaultSource = { project.sourceSets.main.scala }
-        }
-        ScalaDoc scalaDoc = project.tasks.add(SCALA_DOC_TASK_NAME, ScalaDoc.class)
-        scalaDoc.description = "Generates scaladoc for the main source code.";
-        scalaDoc.group = JavaBasePlugin.DOCUMENTATION_GROUP
-    }
-}
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/ScalaSourceSet.java b/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/ScalaSourceSet.java
deleted file mode 100644
index 354cfb9..0000000
--- a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/ScalaSourceSet.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.api.tasks;
-
-import groovy.lang.Closure;
-import org.gradle.api.file.FileTree;
-import org.gradle.api.file.SourceDirectorySet;
-
-/**
- * A {@code ScalaSourceSetConvention} defines the properties and methods added to a {@link
- * org.gradle.api.tasks.SourceSet} by the {@link org.gradle.api.plugins.scala.ScalaPlugin}.
- */
-public interface ScalaSourceSet {
-    /**
-     * Returns the source to be compiled by the Scala compiler for this source set. This may contain both Java and Scala
-     * source files.
-     *
-     * @return The Scala source. Never returns null.
-     */
-    SourceDirectorySet getScala();
-
-    /**
-     * Configures the Scala source for this set.
-     *
-     * <p>The given closure is used to configure the {@link SourceDirectorySet} which contains the Scala source.
-     *
-     * @param configureClosure The closure to use to configure the Scala source.
-     * @return this
-     */
-    ScalaSourceSet scala(Closure configureClosure);
-
-    /**
-     * All Scala source for this source set.
-     *
-     * @return the Scala source. Never returns null.
-     */
-    FileTree getAllScala();
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/FavoritesIntegrationTest.java b/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/FavoritesIntegrationTest.java
deleted file mode 100644
index 4697861..0000000
--- a/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/FavoritesIntegrationTest.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests;
-
-import junit.framework.AssertionFailedError;
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.foundation.BuildInformation;
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.foundation.TestUtility;
-import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-import org.gradle.util.TemporaryFolder;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.swing.filechooser.FileFilter;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Performs integration tests on favorite tasks.
- *
- * @author mhunsicker
- */
-public class FavoritesIntegrationTest {
-    @Rule
-    public final TemporaryFolder tempDir = new TemporaryFolder();
-    private BuildInformation buildInformation;
-
-    private ProjectView myRootProject;
-
-    private ProjectView mySubProject1;
-    private TaskView mySubProject1Comple;
-    private TaskView mySubProject1Lib;
-    private TaskView mySubProject1Doc;
-
-    private ProjectView mySubSubProject;
-    private TaskView mySubSubProjectCompile;
-    private TaskView mySubSubProjectLib;
-    private TaskView mySubSubProjectDoc;
-
-    private ProjectView mySubProject2;
-    private TaskView mySubProject2Lib;
-    private TaskView mySubProject2doc;
-    private TaskView mySubProject2Compile;
-    private JUnit4Mockery context;
-
-    @Before
-    public void setUp() throws Exception {
-        context = new JUnit4Mockery();
-
-        Task subsubCompileTask = TestUtility.createTask(context, "compile", "compile description");
-        Task subsubLibTask = TestUtility.createTask(context, "lib", "lib description");
-        Task subsubDocTask = TestUtility.createTask(context, "doc", "doc description");
-        Project subsubProject = TestUtility.createMockProject(context, "mysubsubproject", "filepath3", 2, null,
-                new Task[]{subsubCompileTask, subsubLibTask, subsubDocTask}, null, (Project[]) null);
-
-        Task subCompileTask1 = TestUtility.createTask(context, "compile", "compile description");
-        Task subLibTask1 = TestUtility.createTask(context, "lib", "lib description");
-        Task subDocTask1 = TestUtility.createTask(context, "doc", "doc description");
-        Project subProject1 = TestUtility.createMockProject(context, "mysubproject1", "filepath2a", 1,
-                new Project[]{subsubProject}, new Task[]{subCompileTask1, subLibTask1, subDocTask1}, null,
-                (Project[]) null);
-
-        Task subCompileTask2 = TestUtility.createTask(context, "compile", "compile description");
-        Task subLibTask2 = TestUtility.createTask(context, "lib", "lib description");
-        Task subDocTask2 = TestUtility.createTask(context, "doc", "doc description");
-        Project subProject2 = TestUtility.createMockProject(context, "mysubproject2", "filepath2b", 1, null,
-                new Task[]{subCompileTask2, subLibTask2, subDocTask2}, null, (Project[]) null);
-
-        Project rootProject = TestUtility.createMockProject(context, "myrootproject", "filepath1", 0,
-                new Project[]{subProject1, subProject2}, null, null, (Project[]) null);
-
-        buildInformation = new BuildInformation(rootProject);
-
-        //now get the converted objects to simplify our matching
-        myRootProject = buildInformation.getProjectFromFullPath("myrootproject");
-        Assert.assertNotNull(myRootProject);
-        mySubProject1 = buildInformation.getProjectFromFullPath("myrootproject:mysubproject1");
-        Assert.assertNotNull(mySubProject1);
-        mySubProject1Comple = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:compile");
-        Assert.assertNotNull(mySubProject1Comple);
-        mySubProject1Lib = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:lib");
-        Assert.assertNotNull(mySubProject1Lib);
-        mySubProject1Doc = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:doc");
-        Assert.assertNotNull(mySubProject1Doc);
-        mySubSubProject = buildInformation.getProjectFromFullPath("myrootproject:mysubproject1:mysubsubproject");
-        Assert.assertNotNull(mySubSubProject);
-        mySubSubProjectCompile = buildInformation.getTaskFromFullPath(
-                "myrootproject:mysubproject1:mysubsubproject:compile");
-        Assert.assertNotNull(mySubSubProjectCompile);
-        mySubSubProjectLib = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:mysubsubproject:lib");
-        Assert.assertNotNull(mySubSubProjectLib);
-        mySubSubProjectDoc = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:mysubsubproject:doc");
-        Assert.assertNotNull(mySubSubProjectDoc);
-        mySubProject2 = buildInformation.getProjectFromFullPath("myrootproject:mysubproject2");
-        Assert.assertNotNull(mySubProject2);
-        mySubProject2Compile = buildInformation.getTaskFromFullPath("myrootproject:mysubproject2:compile");
-        Assert.assertNotNull(mySubProject2Compile);
-        mySubProject2Lib = buildInformation.getTaskFromFullPath("myrootproject:mysubproject2:lib");
-        Assert.assertNotNull(mySubProject2Lib);
-        mySubProject2doc = buildInformation.getTaskFromFullPath("myrootproject:mysubproject2:doc");
-        Assert.assertNotNull(mySubProject2doc);
-    }
-
-    /**
-     * This creates favorites, saves them to a file, then reads them from that file.
-     */
-    @Test
-    public void testSavingRestoringFavorites() {
-        FavoritesEditor originalEditor = new FavoritesEditor();
-
-        Assert.assertTrue(originalEditor.getFavoriteTasks().isEmpty());
-
-        //add two tasks
-        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
-        FavoriteTask favoriteTask2 = originalEditor.addFavorite(mySubSubProjectLib, false);
-
-        //now change the display name so its not the same as the full name, just so know each field is working.
-        originalEditor.editFavorite(favoriteTask1, new FavoritesEditor.EditFavoriteInteraction() {
-            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
-                favoriteTask.displayName = "favorite 1";
-                return true;
-            }
-
-            public void reportError(String error) {
-                throw new AssertionFailedError("Unexpected error");
-            }
-        });
-
-        //make sure they were added properly
-        FavoriteTask originalFavoriteTask1 = originalEditor.getFavoriteTasks().get(0);
-        assertFavorite(originalFavoriteTask1, "mysubproject1:compile", "favorite 1", true);
-
-        FavoriteTask originalFavoriteTask2 = originalEditor.getFavoriteTasks().get(1);
-        assertFavorite(originalFavoriteTask2, "mysubproject1:mysubsubproject:lib", "mysubproject1:mysubsubproject:lib",
-                false);
-
-        File file = tempDir.createFile("fred.favorite-tasks");
-        originalEditor.exportToFile(new TestUtility.TestExportInteraction(file,
-                true)); //confirm overwrite because the above function actually creates the file.
-
-        FavoritesEditor newEditor = new FavoritesEditor();
-        newEditor.importFromFile(new TestUtility.TestImportInteraction(file));
-
-        //make sure they're the same
-        FavoriteTask readInFavoriteTask1 = originalEditor.getFavoriteTasks().get(0);
-        assertFavorite(readInFavoriteTask1, originalFavoriteTask1);
-
-        FavoriteTask readInFavoriteTask2 = originalEditor.getFavoriteTasks().get(1);
-        assertFavorite(readInFavoriteTask2, originalFavoriteTask2);
-    }
-
-    /**
-     * This verifies that the serialization mechananism corrects the extension so that it is correct. We'll save a file
-     * with the wrong extension. The save mechanism should save it with the correct extension appended to the end
-     * (leaving the wrong extension in tact, just not at the end).
-     */
-    @Test
-    public void testEnsureFileHasCorrectExtension() {
-        FavoritesEditor originalEditor = new FavoritesEditor();
-
-        Assert.assertTrue(originalEditor.getFavoriteTasks().isEmpty());
-
-        //add a favorite
-        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
-
-        //specify a wrong extension. It should actually end in ".favorite-tasks"
-        File incorrectFile = tempDir.createFile("fred.wrong");
-        File correctFile = new File(incorrectFile.getParentFile(), incorrectFile.getName() + ".favorite-tasks");
-
-        //Make sure the correct file doesn't already exist before we've even done our test. This is highly unlikely, but it might happen.
-        //Technically, I should place these in a new temporary directory, but I didn't want the hassle of cleanup.
-        if (correctFile.exists()) {
-            throw new AssertionFailedError(
-                    "'correct' file already exists. This means this test WILL succeed but perhaps not for the correct reasons.");
-        }
-
-        //do the export
-        originalEditor.exportToFile(new TestUtility.TestExportInteraction(incorrectFile,
-                true)); //confirm overwrite because the above function actually creates the file.
-
-        //it should have been saved to the correct file
-        if (!correctFile.exists()) {
-            throw new AssertionFailedError(
-                    "failed to correct the file name. Expected it to be saved to '" + correctFile.getAbsolutePath()
-                            + "'");
-        }
-
-        //now read in the file to verify it actually worked.
-        FavoritesEditor newEditor = new FavoritesEditor();
-        newEditor.importFromFile(new TestUtility.TestImportInteraction(correctFile));
-
-        FavoriteTask readInFavoriteTask = newEditor.getFavoriteTasks().get(0);
-        assertFavorite(readInFavoriteTask, favoriteTask1);
-    }
-
-    private void assertFavorite(FavoriteTask favoriteTaskToTest, String expectedFullTaskName,
-                                String expectedDisplayName, boolean expectedAlwaysShowOutput) {
-        Assert.assertEquals(expectedFullTaskName, favoriteTaskToTest.getFullCommandLine());
-        Assert.assertEquals(expectedDisplayName, favoriteTaskToTest.getDisplayName());
-        Assert.assertEquals(expectedAlwaysShowOutput, favoriteTaskToTest.alwaysShowOutput());
-    }
-
-    private void assertFavorite(FavoriteTask favoriteTaskToTest, FavoriteTask expectedFavoriteTask) {
-        assertFavorite(favoriteTaskToTest, expectedFavoriteTask.getFullCommandLine(),
-                expectedFavoriteTask.getDisplayName(), expectedFavoriteTask.alwaysShowOutput());
-    }
-
-    /**
-     * This confirms that overwriting a file requires confirmation. We'll create a file (just by creating a temporary
-     * file), then try to save to it.
-     */
-    @Test
-    public void testConfirmOverwrite() {  //we should be prompted to confirm overwriting an existing file.
-
-        FavoritesEditor originalEditor = new FavoritesEditor();
-
-        Assert.assertTrue(originalEditor.getFavoriteTasks().isEmpty());
-
-        //add a favorite
-        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
-
-        File file = tempDir.createFile("test.favorite-tasks");
-
-        //make sure the file exists, so we know our save will be overwritting something.
-        Assert.assertTrue(file.exists());
-
-        long originalSize = file.length();
-
-        TestOverwriteConfirmExportInteraction exportInteraction = new TestOverwriteConfirmExportInteraction(file,
-                false);
-
-        //do the export
-        originalEditor.exportToFile(exportInteraction);
-
-        //make sure we were prompted to confirm overwriting
-        Assert.assertTrue(exportInteraction.wasConfirmed);
-
-        //make sure the size didn't change. This means we didn't write to it.
-        Assert.assertEquals(originalSize, file.length());
-    }
-
-    /**
-     * This exists soley so we can track if confirmOverwritingExisingFile was called.
-     */
-    private class TestOverwriteConfirmExportInteraction extends TestUtility.TestExportInteraction {
-        public boolean wasConfirmed;
-
-        private TestOverwriteConfirmExportInteraction(File file, boolean confirmOverwrite) {
-            super(file, confirmOverwrite);
-        }
-
-        public File promptForFile(FileFilter fileFilters) {
-            if (wasConfirmed)   //once we confirm it, just return null.
-            {
-                return null;
-            }
-
-            return super.promptForFile(fileFilters);
-        }
-
-        /**
-         * The file already exists. Confirm whether or not you want to overwrite it.
-         *
-         * @param file the file in question
-         * @return true to overwrite it, false not to.
-         */
-        @Override
-        public boolean confirmOverwritingExisingFile(File file) {
-            wasConfirmed = true;
-            return false;
-        }
-    }
-
-    /**
-     * This tests duplicating a single favorite. First, we'll create some, then duplicate one.
-     */
-    @Test
-    public void testDuplicateSingleFavorite() {
-        FavoritesEditor editor = new FavoritesEditor();
-
-        //add two tasks
-        FavoriteTask favoriteTask1 = editor.addFavorite(mySubProject1Comple, true);
-        FavoriteTask favoriteTask2 = editor.addFavorite(mySubSubProjectLib, false);
-        FavoriteTask favoriteTask3 = editor.addFavorite(mySubSubProjectDoc, false);
-
-        //now change the display names and the alwaysShowOutput field, just so we can verify that all fields are copied.
-        editFavorite(editor, favoriteTask1, "name1", false );
-        editFavorite(editor, favoriteTask2, "name2", true );
-        editFavorite(editor, favoriteTask3, "name3", false );
-
-        //duplicate a single task
-        FavoriteTask favoriteTask4 = editor.duplicateFavorite( favoriteTask1 );
-        Assert.assertNotNull( favoriteTask4 );
-        Assert.assertEquals( favoriteTask1.getFullCommandLine(), favoriteTask4.getFullCommandLine() );
-        Assert.assertEquals( favoriteTask1.getDisplayName(), favoriteTask4.getDisplayName() );
-        Assert.assertEquals( favoriteTask1.alwaysShowOutput(), favoriteTask4.alwaysShowOutput() );
-
-        //there should be 4 tasks now
-        Assert.assertEquals( 4, editor.getFavoriteTasks().size() );
-
-        //now duplicate another one
-        FavoriteTask favoriteTask5 = editor.duplicateFavorite( favoriteTask2 );
-        Assert.assertNotNull(favoriteTask5);
-        Assert.assertEquals( favoriteTask2.getFullCommandLine(), favoriteTask5.getFullCommandLine() );
-        Assert.assertEquals( favoriteTask2.getDisplayName(), favoriteTask5.getDisplayName() );
-        Assert.assertEquals( favoriteTask2.alwaysShowOutput(), favoriteTask5.alwaysShowOutput() );
-
-        //there should be 5 tasks now
-        Assert.assertEquals( 5, editor.getFavoriteTasks().size() );
-    }
-
-    /**
-     * This tests duplicating multiple favorites at once. First, we'll create some, then duplicate them.
-     */
-    @Test
-    public void testDuplicatingMultipleFavorites() {
-        FavoritesEditor editor = new FavoritesEditor();
-
-        //add two tasks
-        FavoriteTask favoriteTask1 = editor.addFavorite(mySubProject1Comple, true);
-        FavoriteTask favoriteTask2 = editor.addFavorite(mySubSubProjectLib, false);
-        FavoriteTask favoriteTask3 = editor.addFavorite(mySubSubProjectDoc, false);
-
-        //now change the display names and the alwaysShowOutput field, just so we can verify that all fields are copied.
-        editFavorite(editor, favoriteTask1, "name1", false );
-        editFavorite(editor, favoriteTask2, "name2", true );
-        editFavorite(editor, favoriteTask3, "name3", false );
-
-        //get the ones to dupicate in a list
-        List<FavoriteTask> tasksToCopy = new ArrayList<FavoriteTask>();
-        tasksToCopy.add( favoriteTask1 );
-        tasksToCopy.add( favoriteTask2 );
-
-        //now peform the duplication
-        editor.duplicateFavorites( tasksToCopy );
-
-        //there should be 5 tasks now
-        Assert.assertEquals( 5, editor.getFavoriteTasks().size() );
-
-        //the 4th one (3 from index 0) should be the same as the first one
-        FavoriteTask favoriteTask4 = editor.getFavoriteTasks().get( 3 );
-
-        Assert.assertNotNull( favoriteTask4 );
-        Assert.assertEquals( favoriteTask1.getFullCommandLine(), favoriteTask4.getFullCommandLine() );
-        Assert.assertEquals( favoriteTask1.getDisplayName(), favoriteTask4.getDisplayName() );
-        Assert.assertEquals( favoriteTask1.alwaysShowOutput(), favoriteTask4.alwaysShowOutput() );
-
-        //the 5th one (4 from index 0) should be the same as the second one
-        FavoriteTask favoriteTask5 = editor.getFavoriteTasks().get( 4 );
-        Assert.assertNotNull(favoriteTask5);
-        Assert.assertEquals( favoriteTask2.getFullCommandLine(), favoriteTask5.getFullCommandLine() );
-        Assert.assertEquals( favoriteTask2.getDisplayName(), favoriteTask5.getDisplayName() );
-        Assert.assertEquals( favoriteTask2.alwaysShowOutput(), favoriteTask5.alwaysShowOutput() );       
-    }
-
-    /**
-    This sets the display name of the favorite task to the specified new name.
-     */
-    private void editFavorite( FavoritesEditor editor, FavoriteTask favoriteTask, final String newDisplayName, final boolean newAlwaysShowOutput )
-    {
-       editor.editFavorite( favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
-            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
-                favoriteTask.displayName = newDisplayName;
-                favoriteTask.alwaysShowOutput = newAlwaysShowOutput;
-                return true;
-            }
-
-            public void reportError(String error) {
-                throw new AssertionFailedError("Unexpected error");
-            }
-        });
-
-        Assert.assertEquals( newDisplayName, favoriteTask.getDisplayName() );
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/LiveOutputIntegrationTest.groovy b/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/LiveOutputIntegrationTest.groovy
deleted file mode 100644
index eb750c1..0000000
--- a/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/LiveOutputIntegrationTest.groovy
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-package org.gradle.integtests
-
-import org.gradle.foundation.TestUtility
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol
-import org.gradle.gradleplugin.foundation.GradlePluginLord
-import org.gradle.gradleplugin.foundation.runner.GradleRunner
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.Sample
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import java.util.concurrent.TimeUnit
-import java.util.concurrent.locks.Lock
-import java.util.concurrent.locks.ReentrantLock
-import java.util.concurrent.locks.Condition
-
-/**
-This tests the that live output is gathered while executing a task.
- at author mhunsicker
-*/
- at RunWith(DistributionIntegrationTestRunner.class)
-class LiveOutputIntegrationTest {
-
-    static final String JAVA_PROJECT_NAME = 'javaproject'
-    static final String SHARED_NAME = 'shared'
-    static final String API_NAME = 'api'
-    static final String WEBAPP_NAME = 'webservice'
-    static final String SERVICES_NAME = 'services'
-    static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
-
-    private File javaprojectDir
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/quickstart')
-
-    @Before
-    void setUp() {
-        javaprojectDir = sample.dir
-    }
-
-    /**
-This executes 'build' on the java multiproject sample. We want to make sure that
-we do get live output from gradle. We're not concerned with what it is, because
-that's likely to change over time. This version executes the command via GradlePlugin.
-
- at author mhunsicker
-*/
-
-    @Test
-    public void liveOutputObtainedViaGradlePlugin() {
-       System.out.println("project dir: " + javaprojectDir );
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
-
-        File multiProjectDirectory = sample.getDir();
-        Assert.assertTrue(multiProjectDirectory.exists()); //make sure things are setup the way we expect
-
-        GradlePluginLord gradlePluginLord = new GradlePluginLord();
-        gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
-        gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
-
-        gradlePluginLord.startExecutionQueue(); //for tests, we'll need to explicitly start the execution queue (unless we do a refresh via the TestUtility).
-
-        TestExecutionInteraction executionInteraction = new TestExecutionInteraction();
-
-        //execute a command. We don't really care what the command is, just something that generates output
-        TestUtility.executeBlocking( gradlePluginLord, "tasks", "Test Execution", executionInteraction, 100 )
-
-        verifyLiveOutputObtained( executionInteraction );
-    }
-
-    /**
-This executes 'build' on the java multiproject sample. We want to make sure that
-we do get live output from gradle. We're not concerned with what it is, because
-that's likely to change over time. This version executes the command via GradleRunner.
-
- at author mhunsicker
-*/
-    @Test
-    public void liveOutputObtainedViaGradleRunner() {
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
-
-        File multiProjectDirectory = sample.getDir();
-        Assert.assertTrue(multiProjectDirectory.exists()); //make sure things are setup the way we expect
-
-        GradleRunner gradleRunner = new GradleRunner( multiProjectDirectory, dist.gradleHomeDir, null );
-
-        TestExecutionInteraction executionInteraction = new TestExecutionInteraction();
-
-        //execute a command. We don't really care what the command is, just something that generates output
-        gradleRunner.executeCommand("tasks", org.gradle.api.logging.LogLevel.LIFECYCLE,
-                                            org.gradle.StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS,
-                                            executionInteraction);
-
-        executionInteraction.waitForCompletion(100, TimeUnit.SECONDS)
-
-        verifyLiveOutputObtained( executionInteraction );
-    }
-
-
-
-   /**
-  This verifies that it has live output. It also checks that we received some final output as well
-  as that the execution was successful
-  */
-   private void verifyLiveOutputObtained( TestExecutionInteraction executionInteraction )
-   {
-      executionInteraction.assertCompleted()
-
-      //Make sure we were successful. If we weren't successful, that probably indicates a different problem and the test itself may be invalid.
-      Assert.assertTrue( String.format("Verifying execution was successful failed:%n%s", executionInteraction.finalMessage), executionInteraction.wasSuccessful )
-
-      //verify that we actually finished. If not, then we timed out, which may mean the machine is really slow or that there's a serious problem.
-      Assert.assertTrue( "Verifying execution finished in a timely manner", executionInteraction.executionFinishedReported );
-
-      //make sure we received some output! I just made up 30 because I wanted more than just 1 character and there should actually be dozens of characters.
-      Assert.assertTrue( "Verifying live output was obtained", executionInteraction.liveOutput.length() >= 30 )
-
-      //We should also get a final message. Note: this is usually a little different from the live output, if for not other reason than
-      //timing issues of when the last live output is sent. The final message should have everything, but we might not get the last
-      //live output. As such, we won't verify they're equal.
-      Assert.assertTrue( "Verifying the final output message was received", executionInteraction.finalMessage.length() > 30 )
-   }
-}
-
-//this class just holds onto our liveOutput and also tracks whether or not we've finished.
-public class TestExecutionInteraction implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
-    private StringBuilder liveOutput = new StringBuilder();
-    public boolean executionFinishedReported = false;
-    public boolean wasSuccessful = false;
-    public String finalMessage;
-    private Throwable failure
-    private final Lock lock = new ReentrantLock()
-    private final Condition condition = lock.newCondition()
-
-    public void reportLiveOutput(String message) {
-        liveOutput.append(message);
-    }
-
-    //when we finish executing, we'll make sure we got some type of live output from gradle.
-
-    public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
-        lock.lock()
-        try {
-            executionFinishedReported = true
-            this.wasSuccessful = wasSuccessful
-            this.finalMessage = message
-            failure = throwable
-            condition.signalAll()
-        } finally {
-            lock.unlock()
-        }
-    }
-
-    def assertCompleted() {
-        lock.lock()
-        try {
-            if (!executionFinishedReported) {
-                throw new AssertionError("Request has not completed.")
-            }
-        } finally {
-            lock.unlock()
-        }
-    }
-
-    public waitForCompletion(int maxWaitValue, TimeUnit maxWaitUnits) {
-        Date expiry = new Date(System.currentTimeMillis() + maxWaitUnits.toMillis(maxWaitValue))
-        lock.lock()
-        try {
-            while (!executionFinishedReported) {
-                if (!condition.awaitUntil(expiry)) {
-                    throw new AssertionError("Timeout waiting for execution to complete.")
-                }
-            }
-            if (failure != null) {
-                throw failure
-            }
-        } finally {
-            lock.unlock()
-        }
-    }
-
-    public void reportExecutionStarted() { }
-
-    public void reportNumberOfTasksToExecute(int size) { }
-
-    public void reportTaskStarted(String message, float percentComplete) { }
-
-    public void reportTaskComplete(String message, float percentComplete) { }
-
-
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/MultiprojectProjectAndTaskListIntegrationTest.groovy b/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/MultiprojectProjectAndTaskListIntegrationTest.groovy
deleted file mode 100644
index b732e6f..0000000
--- a/subprojects/gradle-ui/src/integTest/groovy/org/gradle/integtests/MultiprojectProjectAndTaskListIntegrationTest.groovy
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.integtests
-
-import org.gradle.foundation.ProjectView
-import org.gradle.foundation.TaskView
-import org.gradle.gradleplugin.foundation.GradlePluginLord
-import org.gradle.integtests.fixtures.GradleDistribution
-import org.gradle.integtests.fixtures.GradleDistributionExecuter
-import org.gradle.integtests.fixtures.Sample
-import org.gradle.openapi.external.foundation.ProjectVersion1
-import org.gradle.openapi.wrappers.foundation.GradleInterfaceWrapperVersion1
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import java.util.concurrent.TimeUnit
-import org.gradle.foundation.TestUtility
-
-/**
- This tests the multiproject sample with the GradleView mechanism.
- @author mhunsicker
- */
- at RunWith(DistributionIntegrationTestRunner.class)
-class MultiprojectProjectAndTaskListIntegrationTest {
-
-    static final String JAVA_PROJECT_NAME = 'javaproject'
-    static final String SHARED_NAME = 'shared'
-    static final String API_NAME = 'api'
-    static final String WEBAPP_NAME = 'webservice'
-    static final String SERVICES_NAME = 'services'
-    static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
-
-    private File javaprojectDir
-
-    @Rule public final GradleDistribution dist = new GradleDistribution()
-    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
-    @Rule public final Sample sample = new Sample('java/multiproject')
-
-    @Before
-    void setUp() {
-        javaprojectDir = sample.getDir()
-    }
-
-    /*
-       This tests against the multiproject sample. It expects to find not just
-       the root level projects, but also the nested sub projects
-       (services:webservice). This isn't really interested in the actual tasks
-       themselves (I fear those may change too often to worry with keeping the
-       test up to date).
-
-       @author mhunsicker
-    */
-
-    @Test
-    public void multiProjectjavaProjectSample() {
-        // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
-
-        File multiProjectDirectory = sample.getDir();
-        Assert.assertTrue(multiProjectDirectory.exists());
-
-        GradlePluginLord gradlePluginLord = new GradlePluginLord();
-        gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
-        gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
-
-        //refresh the projects and wait. This will throw an exception if it fails.
-        TestUtility.refreshProjectsBlocking(gradlePluginLord, 80, TimeUnit.SECONDS);
-
-        //get the root project
-        List<ProjectView> projects = gradlePluginLord.getProjects();
-        Assert.assertNotNull(projects);
-
-        //make sure there weren't other root projects found.
-        Assert.assertEquals(1, projects.size());
-
-        ProjectView rootProject = projects.get(0);
-        Assert.assertNotNull(rootProject);
-        Assert.assertEquals("multiproject", rootProject.getName());
-
-        //now check for sub projects, api, shared, and services
-        ProjectView apiProject = rootProject.getSubProject("api");
-        Assert.assertNotNull(apiProject);
-        Assert.assertTrue(apiProject.getSubProjects().isEmpty());  //this has no sub projects
-
-        ProjectView sharedProject = rootProject.getSubProject("shared");
-        Assert.assertNotNull(sharedProject);
-        Assert.assertTrue(sharedProject.getSubProjects().isEmpty());  //this has no sub projects
-
-        ProjectView servicesProject = rootProject.getSubProject("services");
-        Assert.assertNotNull(servicesProject);
-
-        //services has a sub project
-        ProjectView webservicesProject = servicesProject.getSubProject("webservice");
-        Assert.assertNotNull(webservicesProject);
-        Assert.assertTrue(webservicesProject.getSubProjects().isEmpty());  //this has no sub projects
-
-        //make sure we didn't inadvertantly find other sub projects.
-        Assert.assertEquals(3, rootProject.getSubProjects().size());
-    }
-
-   /**
-    This tests that the wrappers for projects and tasks are working
-    */
-   @Test
-   public void testOpenAPIWrapperProjectAndTaskList()
-   {
-     // Build and test projects
-        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
-
-        File multiProjectDirectory = sample.getDir();
-        Assert.assertTrue(multiProjectDirectory.exists());
-
-        GradlePluginLord gradlePluginLord = new GradlePluginLord();
-        gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
-        gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
-
-        GradleInterfaceWrapperVersion1 wrapper = new GradleInterfaceWrapperVersion1( gradlePluginLord );
-
-        //the rest of this uses the open API mechanism to access the projects and tasks
-
-        //refresh the projects and wait. This will throw an exception if it fails.
-        TestUtility.refreshProjectsBlocking(gradlePluginLord, 80, TimeUnit.SECONDS);
-
-        //get the root project
-        List<ProjectVersion1> projects = wrapper.getRootProjects();
-        Assert.assertNotNull(projects);
-
-        //make sure there weren't other root projects found.
-        Assert.assertEquals(1, projects.size());
-
-        ProjectVersion1 rootProject = projects.get(0);
-        Assert.assertNotNull(rootProject);
-        Assert.assertEquals("multiproject", rootProject.getName());
-
-        //now check for sub projects, api, shared, and services
-        ProjectVersion1 apiProject = rootProject.getSubProject("api");
-        Assert.assertNotNull(apiProject);
-        Assert.assertTrue(apiProject.getSubProjects().isEmpty());  //this has no sub projects
-
-        ProjectVersion1 sharedProject = rootProject.getSubProject("shared");
-        Assert.assertNotNull(sharedProject);
-        Assert.assertTrue(sharedProject.getSubProjects().isEmpty());  //this has no sub projects
-
-        ProjectVersion1 servicesProject = rootProject.getSubProject("services");
-        Assert.assertNotNull(servicesProject);
-
-        //services has a sub project
-        ProjectVersion1 webservicesProject = servicesProject.getSubProject("webservice");
-        Assert.assertNotNull(webservicesProject);
-        Assert.assertTrue(webservicesProject.getSubProjects().isEmpty());  //this has no sub projects
-
-        //make sure we didn't inadvertantly find other sub projects.
-        Assert.assertEquals(3, rootProject.getSubProjects().size());
-
-        //I don't want to keep the actual tasks in synch, but let's make sure there's something there.
-        def tasks = apiProject.getTasks()
-        Assert.assertNotNull( tasks );
-        Assert.assertFalse( tasks.isEmpty() );
-   }
-
-   /**
-   * This tests ProjectView.getSubProjectFromFullPath. Specifically, the first character
-    * is optionally a colon. So this tests it both ways.
-   */
-   @Test
-   public void testSubProjectFromFullPath()
-   {
-     executer.inDirectory(javaprojectDir).withTasks('assemble').run();
-
-      File multiProjectDirectory = sample.getDir();
-      Assert.assertTrue(multiProjectDirectory.exists());
-
-      GradlePluginLord gradlePluginLord = new GradlePluginLord();
-      gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
-      gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
-
-      //refresh the projects and wait. This will throw an exception if it fails.
-      TestUtility.refreshProjectsBlocking(gradlePluginLord, 80, TimeUnit.SECONDS);
-
-      //get the root project
-      List<ProjectView> projects = gradlePluginLord.getProjects();
-      Assert.assertNotNull(projects);
-      Assert.assertFalse( projects.isEmpty() );
-
-      ProjectView rootProject = projects.get(0)
-
-      //test it using no prefixed colon
-      ProjectView foundProject1 = rootProject.getSubProjectFromFullPath("services:webservice")
-      Assert.assertNotNull( foundProject1 )
-
-      //test it using a prefixed colon
-      ProjectView foundProject2 = rootProject.getSubProjectFromFullPath(":services:webservice")
-      Assert.assertNotNull( foundProject2 )
-
-      //should both the same project
-      Assert.assertEquals( foundProject1, foundProject2 )
-   }
-
-   /**
-   * This tests TaskView.getTaskFromFullPath. Specifically, the first character
-    * is optionally a colon. So this tests it both ways.
-   */
-   @Test
-   public void testGetTaskFromFullPath()
-   {
-     executer.inDirectory(javaprojectDir).withTasks('assemble').run();
-
-      File multiProjectDirectory = sample.getDir();
-      Assert.assertTrue(multiProjectDirectory.exists());
-
-      GradlePluginLord gradlePluginLord = new GradlePluginLord();
-      gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
-      gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
-
-      //refresh the projects and wait. This will throw an exception if it fails.
-      TestUtility.refreshProjectsBlocking(gradlePluginLord, 100, TimeUnit.SECONDS);
-
-      //get the root project
-      List<ProjectView> projects = gradlePluginLord.getProjects();
-      Assert.assertNotNull(projects);
-      Assert.assertFalse( projects.isEmpty() );
-
-      ProjectView rootProject = projects.get(0)
-
-      //test it using no prefixed colon
-      TaskView foundTask1 = rootProject.getTaskFromFullPath("api:build")
-      Assert.assertNotNull( foundTask1 )
-
-      //test it using a prefixed colon
-      TaskView foundTask2 = rootProject.getTaskFromFullPath(":api:build")
-      Assert.assertNotNull( foundTask2 )
-
-      //should both the same project
-      Assert.assertEquals( foundTask1, foundTask2 )      
-   }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/CommandLineAssistant.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/CommandLineAssistant.java
deleted file mode 100644
index a16b7ad..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/CommandLineAssistant.java
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import org.gradle.initialization.DefaultCommandLineConverter;
-import org.gradle.logging.internal.LoggingCommandLineConverter;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-
-/**
- * Some helpful functions for manipulating command line arguments.
- *
- * @author mhunsicker
- */
-public class CommandLineAssistant {
-    private final DefaultCommandLineConverter commandLineConverter;
-    private final LoggingCommandLineConverter loggingCommandLineConverter = new LoggingCommandLineConverter();
-
-    public CommandLineAssistant() {
-        commandLineConverter = new DefaultCommandLineConverter();
-    }
-
-    public DefaultCommandLineConverter getCommandLineConverter() {
-        return commandLineConverter;
-    }
-
-    public LoggingCommandLineConverter getLoggingCommandLineConverter() {
-        return loggingCommandLineConverter;
-    }
-
-    /**
-     * This breaks up the full command line string into space-delimited and/or quoted command line arguments. This
-     * currently does not handle escaping characters such as quotes.
-     *
-     * @param fullCommandLine the full command line
-     * @return a string array of the separate command line arguments.
-     */
-    public static String[] breakUpCommandLine(String fullCommandLine) {
-        List<String> commandLineArguments = new ArrayList<String>();
-
-        Character currentQuote = null;
-        StringBuilder currentOption = new StringBuilder();
-        boolean hasOption = false;
-
-        for (int index = 0; index < fullCommandLine.length(); index++) {
-            char c = fullCommandLine.charAt(index);
-            if (currentQuote == null && Character.isWhitespace(c)) {
-                if (hasOption) {
-                    commandLineArguments.add(currentOption.toString());
-                    hasOption = false;
-                    currentOption.setLength(0);
-                }
-            } else if (currentQuote == null && (c == '"' || c == '\'')) {
-                currentQuote = c;
-                hasOption = true;
-            } else if (currentQuote != null && c == currentQuote) {
-                currentQuote = null;
-            }
-            else {
-                currentOption.append(c);
-                hasOption = true;
-            }
-        }
-
-        if (hasOption) {
-            commandLineArguments.add(currentOption.toString());
-        }
-
-        return commandLineArguments.toArray(new String[commandLineArguments.size()]);
-    }
-
-    public boolean hasLogLevelDefined(String[] commandLineArguments) {
-        return hasCommandLineOptionsDefined(commandLineArguments, new CommandLineSearch() {
-            public boolean contains(String commandLine) {
-
-                return loggingCommandLineConverter.getLogLevel(commandLine) != null;
-            }
-        });
-    }
-
-    public boolean hasShowStacktraceDefined(String[] commandLineArguments) {
-        return hasCommandLineOptionsDefined(commandLineArguments, new CommandLineSearch() {
-            public boolean contains(String commandLine) {
-                return commandLineConverter.getShowStacktrace(commandLine) != null;
-            }
-        });
-    }
-
-    public interface CommandLineSearch {
-        public boolean contains(String commandLine);
-    }
-
-    /**
-     * This determines if one of the sought options is defined on the command line. We're only looking for options that
-     * are prefixed with a single '-'. Note: this IS case-sensitive.
-     *
-     * @param commandLineOptions the command line options
-     * @param commandLineSearch the options we're looking for. This won't have the prefixed dash in them (just "s", "d",
-     * etc.).
-     * @return true if one of the sought options exists in the
-     */
-    private boolean hasCommandLineOptionsDefined(String[] commandLineOptions, CommandLineSearch commandLineSearch) {
-        for (
-                int commandLineOptionsIndex = 0; commandLineOptionsIndex < commandLineOptions.length;
-                commandLineOptionsIndex++) {
-            String commandLineOption = commandLineOptions[commandLineOptionsIndex];
-
-            if (commandLineOption != null && commandLineOption.length() > 1 && commandLineOption.charAt(0) == '-') {
-                //everything minus the dash must be equivalent to the sought option.
-                String remainder = commandLineOption.substring(1);
-
-                if (commandLineSearch.contains(remainder)) {
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * This appends additional command line options to a task name to generate a full command line option.
-     *
-     * @param task the task to execute
-     * @param additionCommandLineOptions the additional options
-     * @return a single command line string.
-     */
-    public static String appendAdditionalCommandLineOptions(TaskView task, String... additionCommandLineOptions) {
-        if (additionCommandLineOptions == null || additionCommandLineOptions.length == 0) {
-            return task.getFullTaskName();
-        }
-
-        StringBuilder builder = new StringBuilder(task.getFullTaskName());
-        builder.append(' ');
-
-        appendAdditionalCommandLineOptions(builder, additionCommandLineOptions);
-
-        return builder.toString();
-    }
-
-    /*
-   combines the tasks into a single command
-    */
-
-    public static String combineTasks(List<TaskView> tasks, String... additionCommandLineOptions) {
-        if (tasks == null || tasks.isEmpty()) {
-            return null;
-        }
-
-        StringBuilder builder = new StringBuilder();
-        Iterator<TaskView> iterator = tasks.iterator();
-        while (iterator.hasNext()) {
-            TaskView taskView = iterator.next();
-            builder.append(taskView.getFullTaskName());
-            if (iterator.hasNext()) {
-                builder.append(' ');
-            }
-        }
-
-        appendAdditionalCommandLineOptions(builder, additionCommandLineOptions);
-
-        return builder.toString();
-    }
-
-    public static void appendAdditionalCommandLineOptions(StringBuilder builder, String... additionCommandLineOptions) {
-        if (additionCommandLineOptions != null) {
-            for (int index = 0; index < additionCommandLineOptions.length; index++) {
-                String additionCommandLineOption = additionCommandLineOptions[index];
-                builder.append(additionCommandLineOption);
-                if (index + 1 < additionCommandLineOptions.length) {
-                    builder.append(' ');
-                }
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/PathParserPortion.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/PathParserPortion.java
deleted file mode 100644
index a86269c..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/PathParserPortion.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-/**
- * Small helper class that aids walking a full task path which can be multiple projects deep with a task on the end.
- *
- * @author mhunsicker
- */
-public class PathParserPortion {
-    private String firstPart;
-    private String remainder;
-
-    public PathParserPortion(String path) {
-        if( path != null && path.length() > 0 )
-        {
-            if( path.startsWith( ":" ) )    //skip the first character, if its a colon. This is optional and makes it absolute, vs relative.
-            {
-                path = path.substring( 1 );
-            }
-
-            int indexOfColon = path.indexOf(':');
-            if (indexOfColon == -1) {
-                firstPart = path;
-            } else {
-                firstPart = path.substring(0, indexOfColon);  //get everyting up to the colon
-                remainder = path.substring(indexOfColon + 1); //everything else
-            }
-        }
-    }
-
-    public String getFirstPart() {
-        return firstPart;
-    }
-
-    public String getRemainder() {
-        return remainder;
-    }
-
-    public boolean hasRemainder() {
-        return remainder != null;
-    }
-
-    public String toString() {
-        return firstPart + " -> " + remainder;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ProjectConverter.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ProjectConverter.java
deleted file mode 100644
index e3548ca..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ProjectConverter.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import java.util.*;
-
-/**
- * This converts Gradle's projects into ProjectView objects. These can be safely reused unlike Gradle's projects.
- *
- * @author mhunsicker
- */
-public class ProjectConverter {
-    private List<ProjectView> rootLevelResultingProjects = new ArrayList<ProjectView>();
-    private HashMap<Project, ProjectView> projectMap = new HashMap<Project, ProjectView>();
-    private final Logger logger = Logging.getLogger(ProjectConverter.class);
-
-    public ProjectConverter() {
-    }
-
-    /**
-     * Call this to convert the projects.
-     *
-     * @param rootProject the root project.
-     */
-    public List<ProjectView> convertProjects(Project rootProject) {
-        rootLevelResultingProjects.clear();
-        projectMap.clear();
-
-        addRootLevelProject(rootProject);
-
-        buildDependencies();
-
-        return rootLevelResultingProjects;
-    }
-
-    /**
-     * This adds the specified poject as a root level projects. It then adds all tasks and recursively adds all sub
-     * projects.
-     *
-     * @param rootLevelProject a root level project.
-     */
-    public void addRootLevelProject(Project rootLevelProject) {
-        ProjectView rootLevelProjectView = new ProjectView(null, rootLevelProject.getName(), rootLevelProject.getBuildFile(), rootLevelProject.getDescription());
-        projectMap.put(rootLevelProject, rootLevelProjectView);
-
-        rootLevelResultingProjects.add(rootLevelProjectView);
-
-        addSubProjects(rootLevelProject, rootLevelProjectView);
-
-        addTasks(rootLevelProject, rootLevelProjectView);
-
-        rootLevelProjectView.sortSubProjectsAndTasks();
-    }
-
-    /**
-     * Adds all sub projects of the specified GradleProject.
-     *
-     * @param parentProject the source parent project. Where we get the sub projects from.
-     * @param parentProjectView the destination of the sub projects from parentProject.
-     */
-    private void addSubProjects(Project parentProject, ProjectView parentProjectView) {
-        Collection<Project> subProjects = parentProject.getChildProjects().values();
-        for (Project subProject : subProjects) {
-            ProjectView projectView = new ProjectView(parentProjectView, subProject.getName(), subProject.getBuildFile(), subProject.getDescription());
-            projectMap.put(subProject, projectView);
-
-            addTasks(subProject, projectView);
-
-            projectView.sortSubProjectsAndTasks();
-
-            addSubProjects(subProject, projectView);
-        }
-    }
-
-    /**
-     * Adds the tasks from the project to the GradleProject.
-     *
-     * @param project the source parent project. Where we get the sub projects from.
-     * @param projectView the destination of the tasks from project.
-     */
-    private void addTasks(Project project, ProjectView projectView) {
-        List<String> defaultTasks = project.getDefaultTasks();
-        for (Task task : project.getTasks()) {
-            String taskName = task.getName();
-
-            boolean isDefault = defaultTasks.contains(taskName);
-
-            projectView.createTask(taskName, task.getDescription(), isDefault);
-        }
-    }
-
-    /**
-     * This sets the dependencies on the ProjectViews. We ask the gradle projects for the dependencies and then convert
-     * them to ProjectViews. Obviously, this must be done after converting all Projects to ProjectViews.
-     */
-    private void buildDependencies() {
-        for (Project project : projectMap.keySet()) {
-            ProjectView projectView = projectMap.get(project);
-
-            List<ProjectView> projectViewList = getProjectViews(project.getDependsOnProjects());
-
-            projectView.setDependsOnProjects(projectViewList);
-        }
-    }
-
-    /**
-     * Converts a set of projects to the existing project views. This does not actually instantiate new ProjectView
-     * objects.
-     */
-    private List<ProjectView> getProjectViews(Set<Project> projects) {
-        List<ProjectView> views = new ArrayList<ProjectView>();
-
-        Iterator<Project> projectIterator = projects.iterator();
-        while (projectIterator.hasNext()) {
-            Project project = projectIterator.next();
-            ProjectView projectView = projectMap.get(project);
-            if (projectView == null) {
-                logger.error("Missing project: " + project.getName());
-            } else {
-                views.add(projectView);
-            }
-        }
-
-        return views;
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ProjectView.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ProjectView.java
deleted file mode 100644
index b63a9c8..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ProjectView.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import org.gradle.util.GUtil;
-
-import java.io.File;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Analog to gradle's Project but more light-weight and is better suited for using the gradle API from an IDE plugin. It
- * is also easily serializable for passing across a socket. A project is a collection of source files that have tasks
- * associated with them. The tasks build the project. Projects can contain other projects. This is immutable and
- * ultimately comes from gradle files.
- *
- * @author mhunsicker
- */
-public class ProjectView implements Comparable<ProjectView>, Serializable {
-    private final String name;
-    private final ProjectView parentProject;
-            // It is null for the root project.
-    private final List<ProjectView> subProjects = new ArrayList<ProjectView>();
-    private final List<TaskView> tasks = new ArrayList<TaskView>();
-    private final List<ProjectView> dependsOnProjects = new ArrayList<ProjectView>();
-
-    private final File buildFile;
-    private final String description;
-
-    /**
-     * Instantiates an immutable view of a project. This is only meant to be called internally whenever generating a
-     * hierarchy of projects and tasks.
-     */
-    /*package*/ ProjectView(ProjectView parentProject, String name, File buildFile, String description) {
-        this.parentProject = parentProject;
-        this.name = name;
-        this.buildFile = buildFile;
-        this.description = GUtil.elvis(description, "");
-        if (parentProject != null) {
-            parentProject.addSubProject(this);
-        }
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public File getBuildFile() {
-        return buildFile;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public String toString() {
-        return name;
-    }
-
-    public ProjectView getParentProject() {
-        return parentProject;
-    }
-
-    public int compareTo(ProjectView otherProject) {
-        return name.compareTo(otherProject.name);
-    }
-
-    /**
-     * creates a task for this project. This is only meant to be called internally whenever generating a hierachy of
-     * projects and tasks.
-     */
-    /*package*/ void createTask(String name, String description, boolean isDefault) {
-        TaskView taskView = new TaskView(this, name, description, isDefault);
-        tasks.add(taskView);
-    }
-
-    /**
-     * Adds the specified project as a sub project of this project. This is only meant to be called internally whenever
-     * generating a hierachy of projects and tasks.
-     */
-    /*package*/ void addSubProject(ProjectView subProject) {
-        subProjects.add(subProject);
-    }
-
-    /**
-     * Sets the project that this project depends on. This is only meant to be called internally whenever generating a
-     * hierachy of projects and tasks.
-     */
-    /*package*/ void setDependsOnProjects(List<ProjectView> newDependsOnProjects) {
-        if( newDependsOnProjects == null ) {
-            return;
-        }
-
-        this.dependsOnProjects.clear();
-        this.dependsOnProjects.addAll( newDependsOnProjects );
-    }
-
-    public List<ProjectView> getDependsOnProjects() {
-        return dependsOnProjects;
-    }
-
-    public List<TaskView> getTasks() {
-        return Collections.unmodifiableList(tasks);
-    }
-
-    public List<ProjectView> getSubProjects() {
-        return Collections.unmodifiableList(subProjects);
-    }
-
-    public void sortSubProjectsAndTasks() {
-        Collections.sort(tasks);
-        Collections.sort(subProjects);
-    }
-
-    public ProjectView getSubProject(String name) {
-        Iterator<ProjectView> iterator = subProjects.iterator();
-        while (iterator.hasNext()) {
-            ProjectView subProject = iterator.next();
-            if (name.equals(subProject.getName())) {
-                return subProject;
-            }
-        }
-
-        return null;
-    }
-
-    public TaskView getTask(String name) {
-        Iterator<TaskView> iterator = tasks.iterator();
-        while (iterator.hasNext()) {
-            TaskView task = iterator.next();
-            if (name.equals(task.getName())) {
-                return task;
-            }
-        }
-
-        return null;
-    }
-
-    public ProjectView getSubProjectFromFullPath(String fullProjectName) {
-        if (fullProjectName == null) {
-            return null;
-        }
-
-        PathParserPortion portion = new PathParserPortion(fullProjectName);
-
-        ProjectView subProject = getSubProject(portion.getFirstPart());
-
-        if (!portion
-                .hasRemainder()) //if we have no remainder, then the path is just a sub project's name. We're done (even if subProject is null).
-        {
-            return subProject;
-        }
-
-        if (subProject == null) {
-            return null;
-        }   //the path may be invalid
-
-        return subProject.getSubProjectFromFullPath(portion.getRemainder());
-    }
-
-    /**
-     * This gets the task based on the given full path. This recursively calls this same function with sub projects
-     * until it finds the task or no matches are found.
-     *
-     * @param fullTaskName the full task name (root_project:sub_project:sub_sub_project:task.).
-     * @return the task or null if not found.
-     */
-    public TaskView getTaskFromFullPath(String fullTaskName) {
-        if (fullTaskName == null) {
-            return null;
-        }
-
-        PathParserPortion portion = new PathParserPortion(fullTaskName);
-        if (!portion.hasRemainder()) //if we have no remainder, then this is for a task.
-        {
-            return getTask(portion.getFirstPart());
-        }
-
-        ProjectView subProject = getSubProject(portion.getFirstPart());
-        if (subProject == null) {
-            return null;
-        }
-
-        //let the sub project figure it out.
-        return subProject.getTaskFromFullPath(portion.getRemainder());
-    }
-
-    /**
-     * This generates this project's full name. This is a colon-separated string of this project and its parent
-     * projects.
-     *
-     * Example: root_project:sub_project:sub_sub_project.
-     */
-    public String getFullProjectName() {
-        ProjectView ancestorProject = getParentProject();
-        if (ancestorProject == null) {
-            return "";
-        } //if we're the root, our full project name is nothing.
-
-        StringBuilder builder = new StringBuilder(name);
-        while (ancestorProject != null
-                && ancestorProject.getParentProject() != null)   //we don't want to include the 'root' project
-        {
-            builder.insert(0, ancestorProject.getName() + ':');
-            ancestorProject = ancestorProject.getParentProject();
-        }
-
-        return builder.toString();
-    }
-
-    /**
-     * Builds a list of default tasks. These are defined by specifying
-     *
-     * defaultTasks 'task name'
-     *
-     * in the gradle file. There can be multiple default tasks. This only returns default tasks directly for this
-     * project and does not return them for subprojects.
-     *
-     * @return a list of default tasks or an empty list if none exist
-     */
-    public List<TaskView> getDefaultTasks() {
-        List<TaskView> defaultTasks = new ArrayList<TaskView>();
-
-        Iterator<TaskView> taskIterator = tasks.iterator();
-        while (taskIterator.hasNext()) {
-            TaskView taskView = taskIterator.next();
-            if (taskView.isDefault()) {
-                defaultTasks.add(taskView);
-            }
-        }
-
-        return defaultTasks;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/TaskView.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/TaskView.java
deleted file mode 100644
index 48d2fb9..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/TaskView.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import org.gradle.util.GUtil;
-
-import java.io.Serializable;
-
-/**
- * Analog to gradle's Task but more light-weight and better suited for using the gradle API from an IDE plugin. It is
- * also easily serializable for passing across a socket. A task is something you can execute and is part of a project.
- * This is immutable and ultimately comes from gradle files.
- *
- * @author mhunsicker
- */
-public class TaskView implements Comparable<TaskView>, Serializable {
-    private ProjectView project;
-    private String name;
-    private String description;
-    private boolean isDefault;
-            //whether or not this is one of potentially many default tasks for its project.
-
-    /**
-     * Instantiates an immutable view of a task. This is only meant to be called internally whenever generating a hierarchy
-     * of projects and tasks.
-     */
-    /*package*/ TaskView(ProjectView project, String name, String description, boolean isDefault) {
-        this.project = project;
-        this.name = name;
-        this.isDefault = isDefault;
-        this.description = GUtil.elvis(description, "");
-    }
-
-    public ProjectView getProject() {
-        return project;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public boolean hasDescription() {
-        return !description.equals("");
-    }
-
-    /**
-     * returns whether or not this is a default task for its parent project. These are defined by specifying
-     *
-     * defaultTasks 'task name'
-     *
-     * in the gradle file. There can be multiple default tasks.
-     *
-     * @return true if its a default task, false if not.
-     */
-    public boolean isDefault() {
-        return isDefault;
-    }
-
-    public int compareTo(TaskView otherTask) {
-        //sort by project name first, then by task name.
-        int projectComparison = project.compareTo(otherTask.getProject());
-        if (projectComparison != 0) {
-            return projectComparison;
-        }
-
-        return name.compareTo(otherTask.name);
-    }
-
-    public String toString() {
-        return name;
-    }
-
-    /**
-     * This generates this task's full name. This is a colon-separated string of this task and its parent projects.
-     *
-     * Example: root_project:sub_project:sub_sub_project:task.
-     */
-    public String getFullTaskName() {
-        return project.getFullProjectName() + ':' + name;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ListReorderer.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ListReorderer.java
deleted file mode 100644
index 78c8288..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ListReorderer.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.common;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Collections;
-import java.util.Comparator;
-
-/**
- * Utility class that allows lists to be reordered.
- *
- * @author Chris Hampton
- */
-public class ListReorderer {
-    /**
-     * Moves the object down one position in the group list.
-     *
-     * @param sourceList The list whose elements we want to reorder.
-     * @param object The object to move.
-     */
-    public static boolean moveBefore(List sourceList, Object object) {
-        // Get the old index of the object
-        int previousIndex = sourceList.indexOf(object);
-        // If the index of the object is 0 it can't go any lower. If it's
-        // -1 it's not even in the list. In these cases we do nothing.
-        if (previousIndex < 1) {
-            return false;
-        }
-        // Remove the object from it's old position in the list, this shifts all
-        // elements above it down by 1
-        sourceList.remove(object);
-        // Add the object back at 1 less than it's original index, the old
-        // element at this position is shifted to right in the lise
-        sourceList.add(previousIndex - 1, object);
-        // If we get here we assume we moved it.
-        return true;
-    }
-
-    /**
-     * Moves a list of elements in this list while keeping their relative positions. When the first element reaches the
-     * beginning it goes no further and the other elements in the list will continue to be shifted on subsequent calls
-     * as long as they don't overwrite previously moved elements. This means that elements with other elements between
-     * them will continue move with the same distance between them but will 'bunch up' toward the beginning of the
-     * list.
-     *
-     * NOTE: The order of the list of moved elements is important. They have to be added in order from lowest index to
-     * highest.
-     *
-     * @param sourceList The list whose elements we want to reorder.
-     * @param objectsToMove List of elements to move.
-     */
-    public static void moveBefore(List sourceList, List objectsToMove) {
-        sortMoveListByRelativeOrder(sourceList, objectsToMove);
-        // Create a new list to put elements in we try to move
-        List triedToMove = new ArrayList();
-        // Now iterate through the elements to move and attempt to move them
-        Iterator iterator = objectsToMove.iterator();
-        while (iterator.hasNext()) {
-            // Get the next object to move
-            Object objectToMove = iterator.next();
-            // Get the index of the object to move
-            int currentPosition = sourceList.indexOf(objectToMove);
-            // Only move the element if it's not already at the front of the list
-            if (currentPosition > 0) {
-                // Get the element at the position we want to move to and make sure it's not
-                // an element in the list that we'vd already moved
-                Object occupyingObject = sourceList.get(currentPosition - 1);
-                if (currentPosition < sourceList.size() && !triedToMove.contains(occupyingObject)) {
-                    moveBefore(sourceList, objectToMove);
-                }
-            }
-            // If we get here we have at least tried to move the object,
-            // so stick it in the tried list
-            triedToMove.add(objectToMove);
-        }
-    }
-
-    /**
-     * Moves a list of objects to a new index location.
-     *
-     * @param sourceList The list where the move will occur.
-     * @param moveList The objects to move.
-     * @param index The object's new location in the list.
-     */
-    public static void moveTo(List sourceList, List moveList, int index) {
-        // First make sure the move is valid
-        if (index < 0 || index >= sourceList.size()) {
-            return;
-        }
-        // Store the object at the index to move to
-        Object moveBeforeObject = sourceList.get(index);
-
-        //This fixes a bug. This happens if the user selects things and moves them to an index where something is already selected. I select 1, 2, and 4 and I say move to 2. 2 is already selected. This makes no sense, but its happened in the field.
-        if (moveList.contains(moveBeforeObject)) //just remove the item from the move list.
-        {
-            List newMoveList = new ArrayList(
-                    moveList);   //we don't want to actually affect the move list. Callers use it for visually selecting items after the move. So we'll make a duplicate and just recursively call ourselves again.
-            newMoveList.remove(moveBeforeObject);
-            moveTo(sourceList, newMoveList, index + 1);   //skip over the one we took out
-            return;
-        }
-
-        // Remove the object from it's old position
-        sourceList.removeAll(moveList);
-        // Get the new index value after shifts
-        index = sourceList.indexOf(moveBeforeObject);
-
-        //make sure the index is within bounds.
-        if (index < 0) {
-            index = 0;
-        }
-        if (index > sourceList.size() - 1) {
-            index = sourceList.size() - 1;
-        }
-
-        // Add the element to the new location
-        sourceList.addAll(index, moveList);
-    }
-
-    /**
-     * Moves an object to the front of the list.
-     *
-     * @param sourceList The list the object is in.
-     * @param object The object to move.
-     * @return True if the object was in the list and it was moved.
-     */
-    public static boolean moveToFront(List sourceList, Object object) {
-        boolean moved = false;
-        // If we can remove it, then it was in the list
-        if (sourceList.remove(object)) {
-            sourceList.add(0, object); // This is a void method, so it doesn't set our flag
-            moved = true;
-        }
-
-        return moved;
-    }
-
-    /**
-     * Moves a list of objects to the front of the list.
-     *
-     * @param sourceList The list the object is in.
-     * @param objectsToMove The object to move.
-     */
-    public static void moveToFront(List sourceList, List objectsToMove) {
-        sortMoveListByRelativeOrder(sourceList, objectsToMove);
-        for (int i = objectsToMove.size() - 1; i >= 0; i--) {
-            Object object = objectsToMove.get(i);
-            if (sourceList.remove(object)) {
-                sourceList.add(0, object);
-            }
-        }
-    }
-
-    /**
-     * Moves the object up one index position in the list.
-     *
-     * @param sourceList The list whose elements we want to reorder.
-     * @param object The object to move.
-     */
-    public static boolean moveAfter(List sourceList, Object object) {
-        // Get the old index of the object
-        int previousIndex = sourceList.indexOf(object);
-        // If the index of the object is 0 it can't go any higher. If it's
-        // -1 it's not even in the list. In these cases we do nothing.
-        if (previousIndex >= sourceList.size() - 1 || previousIndex == -1) {
-            return false;
-        }
-        // Remove the object from it's old position in the list, this shifts all
-        // elements above it down by 1
-        sourceList.remove(object);
-        // Add the object back at 2 higher than it's original index, if we only
-        // add one than we just place it back where it was since everything shifted
-        // down when we removed it
-        sourceList.add(previousIndex + 1, object);
-        // If we get here we assume we moved it.
-        return true;
-    }
-
-    /**
-     * Moves the objects in the list up one index position in this list while maintaining their relative position. When
-     * an element reaches the end of the list it can go no farther, but the other elements continue to move each call
-     * without overwriting previously moved elements. This causes moved elements to 'bunch up' at the end of the list.
-     *
-     * NOTE: The order of the list of moved elements is important. They have to be added in order from lowest index to
-     * highest.
-     *
-     * @param sourceList The list whose elements we want to reorder.
-     * @param objectsToMove List of elements to move.
-     */
-    public static void moveAfter(List sourceList, List objectsToMove) {
-        sortMoveListByRelativeOrder(sourceList, objectsToMove);
-        List triedToMove = new ArrayList();
-        // Since we are moving elements to a greater index in the list,
-        // we iterate through the list backwards to move the highest indexed
-        // element first
-        for (int i = objectsToMove.size() - 1; i >= 0; i--) {
-            Object objectToMove = objectsToMove.get(i);
-            // Get the index of the object to move
-            int currentPosition = sourceList.indexOf(objectToMove);
-            // Make sure the element we want to move isn't already at the end of
-            // the list
-            if (currentPosition < sourceList.size() - 1) {
-                // Now get the index of the elment occupying the spot we want
-                // to move to and only move the current objectToMove if it
-                // does not overwite a previously moved element
-                Object occupyingObject = sourceList.get(currentPosition + 1);
-                if (!triedToMove.contains(occupyingObject)) {
-                    moveAfter(sourceList, objectToMove);
-                }
-            }
-            // If we get here we have at least tried to move the object,
-            // so stick it in the tried list
-            triedToMove.add(objectToMove);
-        }
-    }
-
-    /**
-     * Moves an object to the back of the list.
-     *
-     * @param sourceList The list the object is in.
-     * @param object The object to move.
-     * @return True if the object was in the list and it was moved.
-     */
-    public static boolean moveToBack(List sourceList, Object object) {
-        boolean moved = false;
-
-        // If we can remove it, then it was in the list
-        if (sourceList.remove(object)) {
-            moved = sourceList.add(object);
-        }
-
-        return moved;
-    }
-
-    /**
-     * Moves a list of objects to the front of the list.
-     *
-     * @param sourceList The list the object is in.
-     * @param objectsToMove The object to move.
-     */
-    public static void moveToBack(List sourceList, List objectsToMove) {
-        sortMoveListByRelativeOrder(sourceList, objectsToMove);
-        for (int i = 0; i < objectsToMove.size(); i++) {
-            Object object = objectsToMove.get(i);
-            if (sourceList.remove(object)) {
-                sourceList.add(object);
-            }
-        }
-    }
-
-    /**
-     * Sorts a child list by position in a parent list to preserve relative ordering of the elements.
-     *
-     * @param parentList .
-     * @param childList .
-     */
-    public static void sortMoveListByRelativeOrder(final List parentList, List childList) {
-        Collections.sort(childList, new Comparator() {
-            public int compare(Object o, Object o1) {
-                int index = parentList.indexOf(o);
-                int index1 = parentList.indexOf(o1);
-                return (index < index1) ? -1 : (index > index1) ? 1 : 0;
-            }
-        });
-    }
-
-    /**
-     * Returns true if all the elements of the check list are at the end of the source list.
-     *
-     * @param sourceList .
-     * @param checkList .
-     * @return .
-     */
-    public static boolean allElementsInFront(List sourceList, List checkList) {
-        // Quick check, if the source list doesn't contain all elements of the checklist,
-        // abort and return false
-        if (!sourceList.containsAll(checkList)) {
-            return false;
-        }
-        // Get the last index of the source list
-        int sourceIndex = checkList.size();
-        // Iterate thru the check list. Find the index of the element
-        // in the source list; and check it's index against the index
-        // we should be on to match the source.
-        for (int index = 0; index < checkList.size(); index++) {
-            Object element = checkList.get(index);
-            int checkIndex = sourceList.indexOf(element);
-            if (checkIndex >= sourceIndex) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public static boolean allElementsInBack(List sourceList, List checkList) {
-        // Quick check, if the source list doesn't contain all elements of the checklist,
-        // abort and return false
-        if (!sourceList.containsAll(checkList)) {
-            return false;
-        }
-        // Get the last index of the source list
-        int sourceIndex = sourceList.size() - checkList.size();
-        // Iterate thru the check list. Find the index of the element
-        // in the source list; and check it's index against the index
-        // we should be on to match the source.
-        for (int index = checkList.size() - 1; index >= 0; index--) {
-            Object element = checkList.get(index);
-            int checkIndex = sourceList.indexOf(element);
-            if (checkIndex < sourceIndex) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    /**
-     * This is mainly used for after doing a move. It gives you the current index of all the moved elements. This is
-     * useful for UIs that need to reselect the new items.
-     *
-     * @param sourceList the source list
-     * @param objectsToMove the elements to move
-     * @return an integer array of the items to select.
-     */
-    public static int[] getIndices(List sourceList, List objectsToMove) {
-        int[] newIndices = new int[objectsToMove.size()];
-
-        for (int index = 0; index < objectsToMove.size(); index++) {
-            Object elementToMove = objectsToMove.get(index);
-            int sourceIndexOfElement = sourceList.indexOf(elementToMove);
-
-            newIndices[index] = sourceIndexOfElement;
-        }
-
-        return newIndices;
-    }
-}
-
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ObserverLord.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ObserverLord.java
deleted file mode 100644
index a5bc7ae..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ObserverLord.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.common;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import javax.swing.SwingUtilities;
-import java.awt.EventQueue;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This is a Swing-friendly observer manager class. Swing-friendly, but can be used by non-Swing classes. Its meant to
- * abstract the fact that you probably need to be in the Event Dispatch Thread when receiving notifications inside
- * Swing-related classes.
- *
- * To use this class, add it as a member variable (don't derive from this!) of a class that you want to be observered.
- * You can have multiple instances of this if you want to allow for a finer granularity of observing (similar to
- * components having mouse move listeners and mouse (click) listeners). Next, create an interface for the observers. Now
- * implement add and remove observer functions that call the add and remove functions here. Lastly, implement
- * ObserverNotification and have it call the aforementioned observer interface appropriately. Note: you should actually
- * implement ObserverNotification for each "message" you want to send. Example: One that would tell a view a node was
- * added. One that would tell a view a node was deleted, etc. While you have multiple notification classes, you only
- * need 1 (or few) actual observer interfaces, containing all the possible functions called by all notifications.
- *
- * @author mhunsicker
- */
-
-public class ObserverLord<E> {
-    private List<E> regularObservers = new ArrayList<E>();
-    private List<E> eventQueueObservers = new ArrayList<E>();
-
-    private final Logger logger = Logging.getLogger(ObserverLord.class);
-
-    /**
-     * Implement this for each call to ObserverLord.notifyObservers. The notify function usually just has a single call
-     * to a function on the observer.
-     *
-     * Example:
-     * <pre>
-     * public void notify( MyObserver observer )
-     * {
-     * observer.myfunction();
-     * }
-     * </pre>
-     */
-    public interface ObserverNotification<E> {
-        public void notify(E observer);
-    }
-
-    /**
-     * Adds an observer to our messaging system.
-     *
-     * <!       Name        Description  >
-     *
-     * @param observer observer to add.
-     * @param inEventQueue true to notify this observer only in the event queue, false to notify it immediately.
-     */
-
-    public void addObserver(E observer, boolean inEventQueue) {
-        if (!inEventQueue) {
-            addIfNew(observer, regularObservers);
-        } else {
-            addIfNew(observer, eventQueueObservers);
-        }
-    }
-
-    private void addIfNew(E observer, List<E> destinationList) {
-        if (!destinationList.contains(observer)) {
-            destinationList.add(observer);
-        }
-    }
-
-    /**
-     * Deletes an observer in our messaging system.
-     *
-     * <!       Name     Dir   Description  >
-     *
-     * @param observer in,
-     */
-    public void removeObserver(E observer) {
-        regularObservers.remove(observer);
-        eventQueueObservers.remove(observer);
-    }
-
-    public void removeAllObservers() {
-        regularObservers.clear();
-        eventQueueObservers.clear();
-    }
-
-    /**
-     * Messaging method that handles telling each observer that something happen to the observable.
-     *
-     * <!       Name        Dir   Description  >
-     *
-     * @param notification in,  notification sent to the observer
-     */
-    public void notifyObservers(ObserverNotification<E> notification) {
-        //notify all the non-event queue observers now.
-        notifyObserversInternal(regularObservers, notification);
-        notifyObserversInEventQueueThread(notification);
-    }
-
-    /**
-     * Here is where we notify all the event queue observers. To notify the event queue observers we have to make sure
-     * it occurs in the event queue thread. If we're not in the event queue, we'll wrap it in an invoke and wait.
-     *
-     * <!       Name        Dir   Description  > <!       Name        Dir   Description  >
-     *
-     * @param notification in,  notification sent to the observer
-     */
-    private void notifyObserversInEventQueueThread(final ObserverNotification notification) {
-        if (eventQueueObservers.size() == 0) //if we have no event queue observsers, we're done
-        {
-            return;
-        }
-
-        if (EventQueue.isDispatchThread()) {
-            notifyObserversInternal(eventQueueObservers, notification);
-        } else {
-            try {
-                SwingUtilities.invokeAndWait(new Runnable() {
-                    public void run() {
-                        notifyObserversInternal(eventQueueObservers, notification);
-                    }
-                });
-            } catch (Exception e) {
-                logger.error("notifyObservers exception", e);
-            }
-        }
-    }
-
-    /**
-     * The internal mechanism that actually notifies the observers. We just iterate though each observer and pass it to
-     * the notification mechanism.
-     *
-     *
-     * <!       Name         Dir  Description  >
-     *
-     * @param observers in,  objects that changed (observable)
-     * @param notification in,  notification sent to the observer
-     */
-    private void notifyObserversInternal(List<E> observers, ObserverNotification notification) {
-        Iterator<E> iterator = observers.iterator();
-        while (iterator.hasNext()) {
-            E observer = iterator.next();
-            try {
-                notification.notify(observer);
-            } catch (Exception e) //this is so an error in the notification doesn't stop the entire process.
-            {
-                logger.error("error notifying observers", e);
-            }
-        }
-    }
-
-    public String toString() {
-        return regularObservers.size() + " regular observers, " + eventQueueObservers.size() + " event queue observers";
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ReorderableList.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ReorderableList.java
deleted file mode 100644
index 9846b79..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/common/ReorderableList.java
+++ /dev/null
@@ -1,566 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.common;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-
-/*
-   Class to store a list whose elements can be reordered. This list is
-   meant to be generic so it can be reused.
-
-   The copy method allows for a 'deep copy' of all the list elements. For the
-   copy to work properly, all elements stored in the list must implement the
-   Copyable interface.
-
-   Unfortunately, we can't use Java's Object.clone() method because it is
-   protected and must be overridden as public to be used. So we can't call
-   obj.clone() on an Object instance.
-
-   @author champton
-*/
-
-public class ReorderableList<E> implements List<E> {
-    /**
-     * Internal list to store the real elements.
-     */
-    protected List<E> elements;
-
-    /*
-       Parameterized Constructor. This constructor uses an ArrayList by default.
-       Use this constructor if iterating through the elements in order is a
-       high priority.
-    */
-
-    public ReorderableList() {
-        // I chose ArrayList over LinkedList simply because of performance.
-        // LinkedLists are supposed to have better performance when you move
-        // the elements around, as you can do to this list when it is being
-        // edited. But editing will happen only rarely and the list will
-        // be used heavily when displaying the elements to the user.
-        elements = new ArrayList<E>();
-    }
-
-    /*
-       Parameterized Constructor. This is an alternative where the list-type
-       can be passed in. If reordering the list occurs often and has a higher
-       priority than in-order iteration. A LinkedList() can be passed in for
-       the elementList parameter.
-
-       CAUTION: When using this constructor you should probably make the call
-                like the following to prevent the list from being modified
-                outside of the ReorderableList instance:
-
-                List list = ReorderableList(  new LinkedList() );
-
-       @param  elementList The list instance used to store elements.
-    */
-
-    public ReorderableList(List<E> elementList) {
-        this.elements = elementList;
-    }
-
-    /*
-       Add a object to this ReorderableList.
-       @param  object   The object to add.
-    */
-
-    public boolean add(E object) {
-        return elements.add(object);
-    }
-
-    /*
-       Retrieve an object from the ReorderableList.
-       @param  index      The position of the element to retrieve.
-       @return Object - element in the list.
-    */
-
-    public E get(int index) {
-        return elements.get(index);
-    }
-
-    /*
-       Add another list to this ReorderableList.
-       @param  list   The object to add.
-    */
-
-    public void addAll(List<E> list) {
-        elements.addAll(list);
-    }
-
-    /*
-       Remove a object from the ReorderableList.
-       @param  object   The object to remove.
-       @return True if the ReorderableList contained the object, false
-               otherwise.
-    */
-
-    public boolean remove(Object object) {
-        return elements.remove(object);
-    }
-
-    /*
-       Retrieves the index of the element in the ReorderableList.
-       @param  object   The object whose index we want.
-       @return The index of the object in the list or -1 if the object is
-               not contained in the list.
-    */
-
-    public int indexOf(Object object) {
-        return elements.indexOf(object);
-    }
-
-    /*
-       Returns the number of elements in this ReorderableList.
-       @return The number of elements as an int.
-    */
-
-    public int size() {
-        return elements.size();
-    }
-
-    /*
-       Test to see if the ReorderableList has elements or not.
-       @return True if there are no elements in the list, false otherwise.
-    */
-
-    public boolean isEmpty() {
-        return elements.isEmpty();
-    }
-
-    /*
-       Moves the object down one position in the list. If the object reaches the
-       beginning of the list it obviously can go no farther so subsequent calls
-       will have no effect.
-       @param  objectToMove    The object to move.
-       @return Returns true if the object was in the list and was moved.
-    */
-
-    public boolean moveBefore(Object objectToMove) {
-        return ListReorderer.moveBefore(elements, objectToMove);
-    }
-
-    /*
-       Moves a list of elements in this list while keeping their relative positions.
-       When the first element reaches the beginning it goes no further and the
-       other elements in the list will continue to be shifted on subsequent calls
-       as long as they don't overwrite previously moved elements. This means that
-       elements with other elements between them will continue move with the same
-       distance between them but will 'bunch up' toward the beginning of the
-       list.
-
-       NOTE: The order of the list of moved elements is important. They have
-             to be added in order from lowest index to highest.
-
-       @param  elementsToMove       List of elements to move.
-    */
-
-    public void moveBefore(List elementsToMove) {
-        ListReorderer.moveBefore(elements, elementsToMove);
-    }
-
-    /*
-       Move a list of objects to a new specified location.
-       @param  objectsToMove The objects to move.
-       @param  newIndex     The new location of the object.
-    */
-
-    public void moveTo(List objectsToMove, int newIndex) {
-        ListReorderer.moveTo(elements, objectsToMove, newIndex);
-    }
-
-    /*
-       Moves a single object to the front of the list.
-       @param  objectToMove The object to move in the list.
-       @return True if the object was moved, false otherwise.
-    */
-
-    public boolean moveToFront(Object objectToMove) {
-        return ListReorderer.moveToFront(elements, objectToMove);
-    }
-
-    /*
-       Moves a list of objects to the front of the list.
-       @param  elementsToMove  The list of objects to move in the list.
-    */
-
-    public void moveToFront(List elementsToMove) {
-        ListReorderer.moveToFront(elements, elementsToMove);
-    }
-
-    /*
-       Moves the object up one index position higher in the list. If the object
-       reaches the end of the list it obviously can go no farther so subsequent
-       calls will have no effect.
-       @param  objectToMove    The object to move.
-       @return Returns true if the object was in the list and was moved.
-    */
-
-    public boolean moveAfter(Object objectToMove) {
-        return ListReorderer.moveAfter(elements, objectToMove);
-    }
-
-    /*
-       Moves the objects in the list up one index position in this list while
-       maintaining their relative position. When an element reaches the end
-       of the list it can go no farther, but the other elements continue to
-       move each call without overwriting previously moved elements. This
-       causes moved elements to 'bunch up' at the end of the list.
-
-       NOTE: The order of the list of moved elements is important. They have
-             to be added in order from lowest index to highest.
-
-       @param  elementsToMove     List of elements to move.
-    */
-
-    public void moveAfter(List elementsToMove) {
-        ListReorderer.moveAfter(elements, elementsToMove);
-    }
-
-    /*
-       Moves an object to the back of the list.
-       @param  objectToMove The object to move.
-       @return Returns true if the object was in the list and was moved.
-    */
-
-    public boolean moveToBack(Object objectToMove) {
-        return ListReorderer.moveToBack(elements, objectToMove);
-    }
-
-    /*
-       Moves a list of objects to the back of the list.
-       @param  elementsToMove The list of objects to move.
-    */
-
-    public void moveToBack(List elementsToMove) {
-        ListReorderer.moveToBack(elements, elementsToMove);
-    }
-
-    /*
-       @param  checkList  The list of elements to check against our ordered list.
-       @return True if the list of passed in elements are all at the front of the
-               list, false otherwise.
-    */
-
-    public boolean allElementsInFront(List checkList) {
-        return ListReorderer.allElementsInFront(elements, checkList);
-    }
-
-    /*
-       @param  checkList  The list of elements to check against our ordered list.
-       @return True if the list of passed in elements are all at the back of the
-               list, false otherwise.
-    */
-
-    public boolean allElementsInBack(List checkList) {
-        return ListReorderer.allElementsInBack(elements, checkList);
-    }
-
-    /*
-       Returns an Iterator object to iterate through the elements in the
-       ReorderableList.
-       @return Iterator of Objects. It's up to the caller to cast the elements
-               to the appropriate type.
-    */
-
-    public Iterator<E> iterator() {
-        return elements.iterator();
-    }
-
-    ////////////////////////////////////////////////////////////////////////////
-    //////////////////////////// List Implementation ///////////////////////////
-    ////////////////////////////////////////////////////////////////////////////
-
-    /**
-     * Removes all of the elements from this list (optional operation).  This list will be empty after this call returns
-     * (unless it throws an exception).
-     *
-     * @throws UnsupportedOperationException if the <tt>clear</tt> method is not supported by this list.
-     */
-    public void clear() {
-        elements.clear();
-    }
-
-    /**
-     * Returns an array containing all of the elements in this list in proper sequence.  Obeys the general contract of
-     * the <tt>Collection.toArray</tt> method.
-     *
-     * @return an array containing all of the elements in this list in proper sequence.
-     */
-    public Object[] toArray() {
-        return elements.toArray();
-    }
-
-    /**
-     * Removes the element at the specified position in this list (optional operation).  Shifts any subsequent elements
-     * to the left (subtracts one from their indices).  Returns the element that was removed from the list.
-     *
-     * @param index the index of the element to removed.
-     * @return the element previously at the specified position.
-     * @throws UnsupportedOperationException if the <tt>remove</tt> method is not supported by this list.
-     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).
-     */
-    public E remove(int index) {
-        return elements.remove(index);
-    }
-
-    /**
-     * Inserts the specified element at the specified position in this list (optional operation).  Shifts the element
-     * currently at that position (if any) and any subsequent elements to the right (adds one to their indices).
-     *
-     * @param index index at which the specified element is to be inserted.
-     * @param element element to be inserted.
-     * @throws UnsupportedOperationException if the <tt>add</tt> method is not supported by this list.
-     * @throws ClassCastException if the class of the specified element prevents it from being added to this list.
-     * @throws NullPointerException if the specified element is null and this list does not support null elements.
-     * @throws IllegalArgumentException if some aspect of the specified element prevents it from being added to this
-     * list.
-     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).
-     */
-    public void add(int index, E element) {
-        elements.add(index, element);
-    }
-
-    /**
-     * Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not
-     * contain this element. More formally, returns the highest index <tt>i</tt> such that <tt>(o==null ? get(i)==null :
-     * o.equals(get(i)))</tt>, or -1 if there is no such index.
-     *
-     * @param object element to search for.
-     * @return the index in this list of the last occurrence of the specified element, or -1 if this list does not
-     *         contain this element.
-     * @throws ClassCastException if the type of the specified element is incompatible with this list (optional).
-     * @throws NullPointerException if the specified element is null and this list does not support null elements
-     * (optional).
-     */
-    public int lastIndexOf(Object object) {
-        return elements.lastIndexOf(object);
-    }
-
-    /**
-     * Returns <tt>true</tt> if this list contains the specified element. More formally, returns <tt>true</tt> if and
-     * only if this list contains at least one element <tt>e</tt> such that <tt>(o==null ? e==null : o.equals(e))</tt>.
-     *
-     * @param object element whose presence in this list is to be tested.
-     * @return <tt>true</tt> if this list contains the specified element.
-     * @throws ClassCastException if the type of the specified element is incompatible with this list (optional).
-     * @throws NullPointerException if the specified element is null and this list does not support null elements
-     * (optional).
-     */
-    public boolean contains(Object object) {
-        return elements.contains(object);
-    }
-
-    /**
-     * Inserts all of the elements in the specified collection into this list at the specified position (optional
-     * operation).  Shifts the element currently at that position (if any) and any subsequent elements to the right
-     * (increases their indices).  The new elements will appear in this list in the order that they are returned by the
-     * specified collection's iterator.  The behavior of this operation is unspecified if the specified collection is
-     * modified while the operation is in progress.  (Note that this will occur if the specified collection is this
-     * list, and it's nonempty.)
-     *
-     * @param index index at which to insert first element from the specified collection.
-     * @param c elements to be inserted into this list.
-     * @return <tt>true</tt> if this list changed as a result of the call.
-     * @throws UnsupportedOperationException if the <tt>addAll</tt> method is not supported by this list.
-     * @throws ClassCastException if the class of one of elements of the specified collection prevents it from being
-     * added to this list.
-     * @throws NullPointerException if the specified collection contains one or more null elements and this list does
-     * not support null elements, or if the specified collection is <tt>null</tt>.
-     * @throws IllegalArgumentException if some aspect of one of elements of the specified collection prevents it from
-     * being added to this list.
-     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).
-     */
-    public boolean addAll(int index, Collection<? extends E> c) {
-        return elements.addAll(index, c);
-    }
-
-    /**
-     * Appends all of the elements in the specified collection to the end of this list, in the order that they are
-     * returned by the specified collection's iterator (optional operation).  The behavior of this operation is
-     * unspecified if the specified collection is modified while the operation is in progress.  (Note that this will
-     * occur if the specified collection is this list, and it's nonempty.)
-     *
-     * @param c collection whose elements are to be added to this list.
-     * @return <tt>true</tt> if this list changed as a result of the call.
-     * @throws UnsupportedOperationException if the <tt>addAll</tt> method is not supported by this list.
-     * @throws ClassCastException if the class of an element in the specified collection prevents it from being added to
-     * this list.
-     * @throws NullPointerException if the specified collection contains one or more null elements and this list does
-     * not support null elements, or if the specified collection is <tt>null</tt>.
-     * @throws IllegalArgumentException if some aspect of an element in the specified collection prevents it from being
-     * added to this list.
-     * @see #add(Object)
-     */
-    public boolean addAll(Collection<? extends E> c) {
-        return elements.addAll(c);
-    }
-
-    /**
-     * Returns <tt>true</tt> if this list contains all of the elements of the specified collection.
-     *
-     * @param c collection to be checked for containment in this list.
-     * @return <tt>true</tt> if this list contains all of the elements of the specified collection.
-     * @throws ClassCastException if the types of one or more elements in the specified collection are incompatible with
-     * this list (optional).
-     * @throws NullPointerException if the specified collection contains one or more null elements and this list does
-     * not support null elements (optional).
-     * @throws NullPointerException if the specified collection is <tt>null</tt>.
-     * @see #contains(Object)
-     */
-    public boolean containsAll(Collection<?> c) {
-        return elements.containsAll(c);
-    }
-
-    /**
-     * Removes from this list all the elements that are contained in the specified collection (optional operation).
-     *
-     * @param c collection that defines which elements will be removed from this list.
-     * @return <tt>true</tt> if this list changed as a result of the call.
-     * @throws UnsupportedOperationException if the <tt>removeAll</tt> method is not supported by this list.
-     * @throws ClassCastException if the types of one or more elements in this list are incompatible with the specified
-     * collection (optional).
-     * @throws NullPointerException if this list contains one or more null elements and the specified collection does
-     * not support null elements (optional).
-     * @throws NullPointerException if the specified collection is <tt>null</tt>.
-     * @see #remove(Object)
-     * @see #contains(Object)
-     */
-    public boolean removeAll(Collection<?> c) {
-        return elements.removeAll(c);
-    }
-
-    /**
-     * Retains only the elements in this list that are contained in the specified collection (optional operation).  In
-     * other words, removes from this list all the elements that are not contained in the specified collection.
-     *
-     * @param c collection that defines which elements this set will retain.
-     * @return <tt>true</tt> if this list changed as a result of the call.
-     * @throws UnsupportedOperationException if the <tt>retainAll</tt> method is not supported by this list.
-     * @throws ClassCastException if the types of one or more elements in this list are incompatible with the specified
-     * collection (optional).
-     * @throws NullPointerException if this list contains one or more null elements and the specified collection does
-     * not support null elements (optional).
-     * @throws NullPointerException if the specified collection is <tt>null</tt>.
-     * @see #remove(Object)
-     * @see #contains(Object)
-     */
-    public boolean retainAll(Collection<?> c) {
-        return elements.retainAll(c);
-    }
-
-    /**
-     * Returns a view of the portion of this list between the specified <tt>fromIndex</tt>, inclusive, and
-     * <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex</tt> and <tt>toIndex</tt> are equal, the returned list is empty.)
-     *  The returned list is backed by this list, so non-structural changes in the returned list are reflected in this
-     * list, and vice-versa. The returned list supports all of the optional list operations supported by this list.<p>
-     * <p/> This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays).
-     *  Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole
-     * list.  For example, the following idiom removes a range of elements from a list:
-     * <pre>
-     *     list.subList(from, to).clear();
-     * </pre>
-     * Similar idioms may be constructed for <tt>indexOf</tt> and <tt>lastIndexOf</tt>, and all of the algorithms in the
-     * <tt>Collections</tt> class can be applied to a subList.<p> <p/> The semantics of the list returned by this method
-     * become undefined if the backing list (i.e., this list) is <i>structurally modified</i> in any way other than via
-     * the returned list.  (Structural modifications are those that change the size of this list, or otherwise perturb
-     * it in such a fashion that iterations in progress may yield incorrect results.)
-     *
-     * @param fromIndex low endpoint (inclusive) of the subList.
-     * @param toIndex high endpoint (exclusive) of the subList.
-     * @return a view of the specified range within this list.
-     * @throws IndexOutOfBoundsException for an illegal endpoint index value (fromIndex < 0 || toIndex > size ||
-     * fromIndex > toIndex).
-     */
-    public List<E> subList(int fromIndex, int toIndex) {
-        return elements.subList(fromIndex, toIndex);
-    }
-
-    /**
-     * Returns a list iterator of the elements in this list (in proper sequence).
-     *
-     * @return a list iterator of the elements in this list (in proper sequence).
-     */
-    public ListIterator<E> listIterator() {
-        return elements.listIterator();
-    }
-
-    /**
-     * Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in
-     * this list.  The specified index indicates the first element that would be returned by an initial call to the
-     * <tt>next</tt> method.  An initial call to the <tt>previous</tt> method would return the element with the
-     * specified index minus one.
-     *
-     * @param index index of first element to be returned from the list iterator (by a call to the <tt>next</tt>
-     * method).
-     * @return a list iterator of the elements in this list (in proper sequence), starting at the specified position in
-     *         this list.
-     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).
-     */
-    public ListIterator<E> listIterator(int index) {
-        return elements.listIterator(index);
-    }
-
-    /**
-     * Replaces the element at the specified position in this list with the specified element (optional operation).
-     *
-     * @param index index of element to replace.
-     * @param element element to be stored at the specified position.
-     * @return the element previously at the specified position.
-     * @throws UnsupportedOperationException if the <tt>set</tt> method is not supported by this list.
-     * @throws ClassCastException if the class of the specified element prevents it from being added to this list.
-     * @throws NullPointerException if the specified element is null and this list does not support null elements.
-     * @throws IllegalArgumentException if some aspect of the specified element prevents it from being added to this
-     * list.
-     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).
-     */
-    public E set(int index, E element) {
-        return elements.set(index, element);
-    }
-
-    /**
-     * Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned
-     * array is that of the specified array.  Obeys the general contract of the <tt>Collection.toArray(Object[])</tt>
-     * method.
-     *
-     * @param objectArray the array into which the elements of this list are to be stored, if it is big enough;
-     * otherwise, a new array of the same runtime type is allocated for this purpose.
-     * @return an array containing the elements of this list.
-     * @throws ArrayStoreException if the runtime type of the specified array is not a supertype of the runtime type of
-     * every element in this list.
-     * @throws NullPointerException if the specified array is <tt>null</tt>.
-     */
-    public <T> T[] toArray(T[] objectArray) {
-        return elements.toArray(objectArray);
-    }
-
-    /*
-    This is mainly used for after doing a move. It gives you the current
-    index of all the moved elements. This is useful for UIs that need to
-    reselect the new items.
-
-    @param  elementsToMove the elements that were moved
-    @return                an integer array of the items to select.
-    @author mhunsicker
-    */
-
-    public int[] getIndices(List elementsToMove) {
-        return ListReorderer.getIndices(elements, elementsToMove);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ClientProcess.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ClientProcess.java
deleted file mode 100644
index 83f6281..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ClientProcess.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.basic;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.ConnectException;
-import java.net.Socket;
-
-/**
- * The client of what the ProcessLauncherServer launches. The client makes a connection to the server and sends messages
- * to it. The server responds to those messages, but does not initiate communications otherwise. You implement the
- * Protocol interface to handle the specifics of the communications.
- *
- * @author mhunsicker
- */
-public class ClientProcess {
-    private final Logger logger = Logging.getLogger(ClientProcess.class);
-
-    /**
-     * Implement this to define the behavior of the communication on the client side.
-     */
-    public interface Protocol {
-        /**
-         * Gives your protocol a chance to store this client so it can access its functions.
-         */
-        public void initialize(ClientProcess client);
-
-        /**
-         * Notification that we have connected to the server.
-         *
-         * @return true if we should continue the connection, false if not.
-         */
-        public boolean serverConnected(Socket clientSocket);
-
-        /**
-         * @return true if we should keep the connection alive. False if we should stop communicaiton.
-         */
-        public boolean continueConnection();
-    }
-
-    private ObjectSocketWrapper socketWrapper;
-    private Protocol protocol;
-
-    public ClientProcess(Protocol protocol) {
-        this.protocol = protocol;
-        protocol.initialize(this);
-    }
-
-    /**
-     * Call this to attempt to connect to the server.
-     *
-     * @param port where the server is listening. Since it launched this client, it should have either been passed to it
-     * on the command line or via a system property (-D).
-     * @return true if we connected to the server, false if not.
-     */
-    public boolean start(int port) {
-        Socket clientSocket = null;
-        try {
-            clientSocket = new Socket((String) null, port);
-            socketWrapper = new ObjectSocketWrapper(clientSocket);
-            if (protocol.serverConnected(clientSocket)) {
-                return true;
-            }
-
-            logger.error("Failed to connect to server (might not have returned correct connection string): " + port);
-        }
-        catch (ConnectException e) {
-            logger.error("Failed to connect to server: " + port);
-        }
-        catch (Exception e) {
-            logger.error("Failed to connect to server: " + port, e);
-        }
-
-        try {
-            if (clientSocket != null) {
-                clientSocket.close();
-            }
-            socketWrapper = null;
-        }
-        catch (IOException e1) {
-            logger.error("Failed to close socket", e1);
-        }
-        return false;
-    }
-
-    /**
-     * Call this to stop communications with the server.
-     */
-    public void stop() {
-        if (socketWrapper != null) {
-            socketWrapper.close();
-         }
-    }
-
-    /**
-     * Call this to send a message with some binary data. The protocal and the server must understand the message,
-     * message type, and data.
-     *
-     * @param messageType the message type. Whatever the client and server want.
-     * @param message     the message being sent
-     * @param data        the data being sent. Must be serializable.
-     * @return true if we sent the message, false if not.
-     */
-    public boolean sendMessage(String messageType, String message, Serializable data) {
-        return socketWrapper.sendObject(new MessageObject(messageType, message, data));
-    }
-
-    public boolean sendMessage(String messageType, String message) {
-        return sendMessage(messageType, message, null);
-    }
-
-    /**
-     * Call this to send a message with some binary data and wait for the server's acknowledgement. The protocol and the
-     * server must understand the message, message type, and data.
-     *
-     * @param messageType the message type. Whatever the client and server want.
-     * @param message     the message being sent
-     * @param data        the data being sent. Must be serializable.
-     * @return the reply from the server
-     */
-    public MessageObject sendMessageWaitForReply(String messageType, String message, Serializable data) {
-        if (!socketWrapper.sendObject(new MessageObject(messageType, message, data))) {
-            return null;
-        }
-
-        return readMessage();
-    }
-
-    /**
-     * Call this to listen for a message from the server. This is really only meant to be a response from the server as
-     * a response to our message.
-     *
-     * @return the message returned.
-     */
-    public MessageObject readMessage() {
-        Object object = socketWrapper.readObject();
-        if (object == null) {
-            return null;
-        }
-
-        if (object instanceof MessageObject) {
-            return (MessageObject) object;
-        }
-
-        return new MessageObject("?", object.toString(), null);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/MessageObject.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/MessageObject.java
deleted file mode 100644
index 6a04d44..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/MessageObject.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.basic;
-
-import java.io.Serializable;
-import java.io.IOException;
-import java.io.ObjectStreamException;
-
-/**
- * A holder for a message that is sent over a socket.
- *
- * @author mhunsicker
- */
-public class MessageObject implements Serializable {
-    private String messageType;
-    private String message;
-    private Serializable data;
-
-    public MessageObject(String messageType, String message, Serializable data) {
-        this.messageType = messageType;
-        this.message = message;
-        this.data = data;
-    }
-
-    private void writeObject(java.io.ObjectOutputStream out) throws IOException {
-        out.writeObject(messageType);
-        out.writeObject(message);
-        out.writeObject(data);
-    }
-
-    private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
-        messageType = (String) in.readObject();
-        message = (String) in.readObject();
-        data = (Serializable) in.readObject();
-    }
-
-    private void readObjectNoData() throws ObjectStreamException {
-
-    }
-
-    @Override
-    public String toString() {
-        return "Type='" + messageType + '\'' + " Message='" + message + '\'' + " data=" + data;
-    }
-
-    public String getMessageType() {
-        return messageType;
-    }
-
-    public String getMessage() {
-        return message;
-    }
-
-    public Serializable getData() {
-        return data;
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ObjectSocketWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ObjectSocketWrapper.java
deleted file mode 100644
index f1f3b1e..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ObjectSocketWrapper.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.basic;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.net.Socket;
-import java.net.SocketException;
-
-/**
- * Wrapper around a java.net.Socket just to simplify usage.
- *
- * @author mhunsicker
- */
-public class ObjectSocketWrapper {
-    private Socket socket;
-    private final Logger logger = Logging.getLogger(ObjectSocketWrapper.class);
-
-    public ObjectSocketWrapper(Socket socket) {
-        this.socket = socket;
-    }
-
-    public void setTimeout(int timeoutMilliseconds) {
-        try {
-            socket.setSoTimeout(timeoutMilliseconds);
-        }
-        catch (SocketException e) {
-            logger.error("Failed to set timeout", e);
-        }
-    }
-
-    public Object readObject() {
-
-        ObjectInputStream reader = null;
-
-        try {
-            reader = new ObjectInputStream(socket.getInputStream());
-        } catch (SocketException e) {
-            if (!isIgnorableException(e)) {
-                logger.error("Reading Object", e);
-        }
-            return null;
-        }
-        catch (Exception e) {
-            logger.error("Reading Object", e);
-            return null;
-        }
-
-        try {
-            return reader.readObject();
-        }
-        catch (SocketException e) {
-            //a connection reset is normal if the client quits, so don't dump out this exception and just return null.
-            if (!isIgnorableException(e)) {
-                logger.error("Reading Object", e);
-            }
-            return null;
-        }
-        catch (Exception e) {
-            logger.error("Reading Object", e);
-        }
-
-        return null;
-    }
-
-    private boolean isIgnorableException(SocketException e) {
-        //a connection reset is normal if the client quits.
-        return "Connection reset".equalsIgnoreCase(e.getMessage());
-    }
-
-   /**
-    * Synchronizing this prevents multiple threads from sending messages at the same
-    * time which corrupts the socket. 
-     */
-    public synchronized boolean sendObject(Object object) {
-        ObjectOutputStream writer = null;
-        try {
-            writer = new ObjectOutputStream(socket.getOutputStream());
-        }
-        catch (IOException e) {
-            logger.error("Exception when creating writer sending object: " + object, e);
-            return false;
-        }
-
-        try {
-            writer.reset();
-            writer.flush();
-            writer.writeObject(object);
-            writer.flush();
-
-            return true;
-        }
-        catch (Exception e) {
-            logger.error("Exception when sending object: " + object, e);
-            return false;
-        }
-    }
-
-    public void close() {
-        try {
-            socket.close();
-        }
-        catch (IOException e) {
-            logger.error("Closing", e);
-        }
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ProcessLauncherServer.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ProcessLauncherServer.java
deleted file mode 100644
index 586134b..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ProcessLauncherServer.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.foundation.ipc.basic;
-
-import org.gradle.foundation.common.ObserverLord;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.process.ExecResult;
-import org.gradle.process.internal.ExecHandle;
-import org.gradle.process.internal.ExecHandleBuilder;
-
-import java.io.ByteArrayOutputStream;
-
-/**
- * This launches an application as a separate process then listens for messages from it. You implement the Protocol
- * interface to handle the specifics of the communications. To use this, instantiate it, then call start. When the
- * communications are finished, call requestShutdown(). Your server's protocol can call sendMessage once communication
- * is started to respond to client's messages.
- *
- * @author mhunsicker
- */
-public class ProcessLauncherServer extends Server<ProcessLauncherServer.Protocol, ProcessLauncherServer.ServerObserver> {
-    private volatile ExecHandle externalProcess;
-
-    private static final Logger LOGGER = Logging.getLogger(ProcessLauncherServer.class);
-
-    /**
-     * Implement this to define the behavior of the communication on the server side.
-     */
-    public interface Protocol extends Server.Protocol<ProcessLauncherServer> {
-        public void aboutToKillProcess();
-
-        /**
-         * Fill in the ExecutionInfo object with information needed to execute the other process.
-         * @param serverPort the port the server is listening on. The client should send messages here
-         * @return an executionInfo object containing information about what we execute.
-         */
-        public ExecutionInfo getExecutionInfo(int serverPort );
-
-        /**
-         * Notification that the client has shutdown. Note: this can occur before communications has ever started. You
-         * SHOULD get this notification before receiving serverExited, even if the client fails to launch or locks up.
-         *
-         * @param result the return code of the client application
-         * @param output the standard error and standard output of the client application
-         */
-        public void clientExited(int result, String output);
-    }
-
-    public interface ServerObserver extends Server.ServerObserver {
-        /**
-         * Notification that the client has shutdown. Note: this can occur before communications has ever started. You
-         * SHOULD get this notification before receiving serverExited, even if the client fails to launch or locks up.
-         *
-         * @param result the return code of the client application
-         * @param output the standard error and standard output of the client application
-         */
-        public void clientExited(int result, String output);
-    }
-
-    public ProcessLauncherServer(Protocol protocol) {
-        super(protocol);
-    }
-
-    @Override
-    protected void communicationsStarted() {
-        launchExternalProcess();
-    }
-
-    /**
-     * This launches an external process in a thread and waits for it to exit.
-     */
-    private void launchExternalProcess() {
-        Thread thread = new Thread(new Runnable() {
-            public void run() {
-
-                ExecutionInfo executionInfo = null;
-                ExecHandle execHandle = null;
-                ByteArrayOutputStream output = null;
-                try {
-                    
-                    executionInfo = protocol.getExecutionInfo(getPort() );
-
-                    ExecHandleBuilder builder = new ExecHandleBuilder();
-                    builder.workingDir(executionInfo.getWorkingDirectory());
-                    builder.commandLine((Object[]) executionInfo.getCommandLineArguments());
-                    builder.environment(executionInfo.getEnvironmentVariables());
-                    output = new ByteArrayOutputStream();
-                    builder.setStandardOutput(output);
-                    builder.setErrorOutput(output);
-                    execHandle = builder.build();
-                    setExternalProcess(execHandle);
-
-                    execHandle.start();
-                }
-                catch (Throwable e) {
-                    LOGGER.error("Starting external process", e);
-                    notifyClientExited( -1, e.getMessage() );
-                    setExternalProcess(null);
-                    return;
-                }
-
-                ExecResult result = execHandle.waitForFinish();
-                LOGGER.debug("External process completed with exit code {}", result.getExitValue());
-
-                setExternalProcess(null);   //clear our external process member variable (we're using our local variable below). This is so we know the process has already stopped.
-
-                executionInfo.processExecutionComplete();
-                notifyClientExited( result.getExitValue(), output.toString() );
-            }
-        });
-
-        thread.start();
-    }
-
-    public void stop() {
-        super.stop();
-        killProcess(); //if the process is still running, shut it down
-    }
-
-    public void setExternalProcess(ExecHandle externalProcess) {
-        this.externalProcess = externalProcess;
-    }
-
-    /**
-     * Call this to violently kill the external process. This is NOT a good way to stop it. It is preferable to ask the
-     * thread to stop. However, gradle has no way to do that, so we'll be killing it.
-     */
-    public synchronized void killProcess() {
-        if (externalProcess != null) {
-            requestShutdown();
-            protocol.aboutToKillProcess();
-            externalProcess.abort();
-            setExternalProcess(null);
-            notifyClientExited(-1, "Process Canceled");
-        }
-    }
-
-    private void notifyClientExited(final int result, final String output) {
-        protocol.clientExited(result, output);
-
-        observerLord.notifyObservers(new ObserverLord.ObserverNotification<ServerObserver>() {
-            public void notify(ServerObserver observer) {
-                observer.clientExited(result, output);
-            }
-        });
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/Server.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/Server.java
deleted file mode 100644
index 1b335ed..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/Server.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.basic;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.foundation.common.ObserverLord;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-/**
- * This is a server that talks to a client via sockets (Rudimentary form of Inter-Process Communication (IPC)). This
- * does the work of locating a free socket and starting the connection. To use this, you really only have to define a
- * Protocol that handles the actual messages. You'll want to make your client startup a ClientProcess object that
- * implements a corresponding Protocol.
- *
- * @author mhunsicker
-  */
-public class Server<P extends Server.Protocol, O extends Server.ServerObserver>
-{
-   private final Logger logger = Logging.getLogger( Server.class );
-
-   private ServerSocket serverSocket;
-   private boolean isServerRunning;
-   private boolean hasRequestedShutdown;
-
-   private ObjectSocketWrapper clientSocket;
-   protected P protocol;
-   private Thread communicationThread;
-   private int port;
-
-   protected ObserverLord<O> observerLord = new ObserverLord<O>();
-
-   //
-
-    /**
-     * Implement this to define the behavior of the communication on the server side.
-     */
-    public interface Protocol<S extends Server>
-    {
-        /**
-         * Gives your protocol a chance to store this server so it can access its functions.
-         */
-        public void initialize( S server );
-
-        /**
-         * Notification that the connection was accepted by the client.
-         */
-        public void connectionAccepted();
-
-        /**
-         * @return true if we should keep the connection alive. False if we should stop communication.
-         */
-        public boolean continueConnection();
-
-        /**
-         * Notification that a message has been received.
-         *
-         * @param message the message that was received.
-         */
-        public void messageReceived( MessageObject message );
-
-        /**
-         * Notification that the client has stopped all communications.
-         */
-        public void clientCommunicationStopped();
-
-        /**
-         * Notification that a read failure occurred. This really only exists for debugging purposes when things
-         * go wrong.
-         */
-        void readFailureOccurred();
-    }
-
-    //
-    public interface ServerObserver
-    {
-        /**
-         * Notification that the server has shutdown.
-         */
-        public void serverExited();
-    }
-
-   public Server( P protocol )
-   {
-      this.protocol = protocol;
-      protocol.initialize( this );
-   }
-
-   public int getPort() { return port; }
-
-   /**
-     * Call this to start the server.
-     *
-     * @return true if we started, false if not.
-   */
-   public boolean start()
-   {
-      port = connect();
-        if (port == -1) {
-         return false;
-        }
-
-      communicationThread = new Thread( new Runnable()
-      {
-         public void run()
-         {
-            listenForConnections();
-         }
-      });
-
-      communicationThread.start();
-
-      communicationsStarted();
-
-      return true;
-   }
-
-   /**
-   * this exists solely so it can be overridden. Its an internal notification that communcations have started.
-   * You may want to do some extra processing now.
-   */
-
-    protected void communicationsStarted() {
-
-   }
-
-   /**
-     * This attempts to open a free port. We'll search for an open port until we find one.
-     *
-     * @return the port we opened or -1 if we couldn't open one.
-   */
-   private int connect()
-   {
-       try {
-           serverSocket = new ServerSocket(0);
-           return serverSocket.getLocalPort();
-       } catch (IOException e) {
-           logger.error( "Could not listen on port: " + port, e );
-           return -1;
-       }
-   }
-
-   /**
-     * This sits in a loop and listens for connections. Once a connection has been made, we'll call another function to
-     * process it.
-   */
-   private void listenForConnections()
-   {
-      int consecutiveFailures = 0;
-      while( !hasRequestedShutdown )
-      {
-         Socket socket = null;
-         try
-         {
-            serverSocket.setSoTimeout( 2000 );  //attempt to connect for a few seconds, then try again (so we'll get any shutdown requests).
-            socket = serverSocket.accept();
-
-            clientSocket = new ObjectSocketWrapper( socket );
-            protocol.connectionAccepted();
-            consecutiveFailures = 0;   //reset our consecutive failures.
-            serverSocket.setSoTimeout( 0 );
-
-            processCommunications();
-
-            clientSocket.close();
-         }
-         catch( IOException e )
-         {
-            consecutiveFailures++;
-            if( consecutiveFailures >= 20 )  //if we fail too many times, we'll request to shutdown. It's obviously not working. This is an arbitrary number.
-            {
-               requestShutdown();
-            }
-
-            if( consecutiveFailures > 8 )    //the first few usually fail while we're waiting for the process to startup.
-            {
-               logger.error( "Accept failed (" + consecutiveFailures + ")." );
-            }
-         }
-         catch( Throwable t ) {  //something really bad happened, shut down
-            logger.error( "Listening for connections", t );
-            requestShutdown();
-         }
-      }
-
-      isServerRunning = false;
-
-      stop();
-      notifyServerExited();
-   }
-
-   /**
-     * This is called once a connection is made. We'll listen for messages from the client, notifying the protocol of
-     * them to do whatever it needs.
-   */
-   private void processCommunications()
-   {
-      boolean hasClientStopped = false;
-      int failureCount = 0;
-      while( !hasClientStopped && protocol.continueConnection() && !hasRequestedShutdown )
-      {
-         Object object = clientSocket.readObject();
-
-         if( object == null )
-         {
-            if( !hasRequestedShutdown )   //if we're trying to shutdown, we can get errors here. Just ignore them and move on
-            {
-               failureCount++;
-               protocol.readFailureOccurred();
-               if( failureCount == 3 ) //after 3 failures, assume the client went away.
-               {
-                  hasClientStopped = true;
-                  protocol.clientCommunicationStopped();
-               }
-            }
-         }
-         else
-         {
-            failureCount = 0; //reset our failures
-
-                if (object instanceof String) {
-               protocol.messageReceived( new MessageObject( "?", object.toString(), null ) );
-                } else if (object instanceof MessageObject) {
-                  protocol.messageReceived( (MessageObject) object );
-                }
-          }
-        }
-    }
-
-   public void requestShutdown() { hasRequestedShutdown = true; }
-
-   public boolean isServerRunning() { return isServerRunning; }
-
-   /**
-     * Call this to send a message. The protocal and the client must understand the message and message type.
-     *
-     * @param messageType the message type. Whatever the client and server want.
-     * @param message the message being sent.
-   */
-   public void sendMessage( String messageType, String message )
-   {
-      clientSocket.sendObject( new MessageObject( messageType, message, null ) );
-   }
-
-   /**
-     * Call this to send a message with some binary data. The protocal and the client must understand the message,
-     * message type, and data.
-     *
-     * @param messageType the message type. Whatever the client and server want.
-     * @param message the message being sent
-     * @param data the data being sent. Must be serializable.
-   */
-   public void sendMessage( String messageType, String message, Serializable data )
-   {
-      clientSocket.sendObject( new MessageObject( messageType, message, data ) );
-   }
-
-
-   public void stop()
-   {
-      try
-      {
-         serverSocket.close();
-      }
-      catch( IOException e )
-      {
-         logger.error( "Closing socket", e );
-      }
-   }
-
-   private void notifyServerExited()
-   {
-      observerLord.notifyObservers( new ObserverLord.ObserverNotification<O>()
-      {
-         public void notify( ServerObserver observer )
-         {
-            observer.serverExited();
-         }
-      } );
-   }
-
-   public void addServerObserver( O observer, boolean inEventQueue )
-   {
-      observerLord.addObserver( observer, inEventQueue );
-   }
-
-   public void removeServerObserver( O observer )
-   {
-      observerLord.removeObserver( observer );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/AbstractGradleServerProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/AbstractGradleServerProtocol.java
deleted file mode 100644
index 6a0a6a6..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/AbstractGradleServerProtocol.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.apache.commons.io.IOUtils;
-import org.gradle.initialization.DefaultCommandLineConverter;
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.foundation.CommandLineAssistant;
-import org.gradle.foundation.ipc.basic.MessageObject;
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.ipc.basic.ExecutionInfo;
-import org.gradle.foundation.ipc.basic.ClientProcess;
-import org.gradle.util.OperatingSystem;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * This defines the basic behavior of all gradle protocols for interprocess communication. It manages handshaking,
- * detecting if the client executed prematurely, as well as executing alternate external processes. All you need to do
- * is extend this, implement the abstract functions, and make sure you call setHasReceivedBuildCompleteNotification()
- * when whatever you were doing is complete (so we know any exiting is not premature).
- *
- * @author mhunsicker
-  */
-public abstract class AbstractGradleServerProtocol implements ProcessLauncherServer.Protocol
-{
-   private static final String INIT_SCRIPT_EXTENSION = ".gradle";
-
-   private final Logger logger = Logging.getLogger( AbstractGradleServerProtocol.class );
-
-   protected ProcessLauncherServer server;
-   private boolean continueConnection;
-   private boolean waitingOnHandshakeCompletion;
-   private boolean hasCompletedConnection;
-
-   private boolean hasReceivedBuildCompleteNotification;
-
-   private File currentDirectory;
-   private File gradleHomeDirectory;
-
-   private File customGradleExecutor;
-   private String commandLine;
-   private LogLevel logLevel;
-
-   //all of this is just so we can get gradle to kill itself when we cancel
-   private int killGradleServerPort;
-   private KillGradleClientProtocol killGradleClientProcotol;
-   private ClientProcess killGradleClient;
-
-   protected MessageObject lastMessageReceived; //just for debugging purposes
-
-   /**
-     * @return true if we should keep the connection alive. False if we should stop communicaiton.
-   */
-   public boolean continueConnection()
-   {
-      return continueConnection;
-   }
-
-   private StartParameter.ShowStacktrace stackTraceLevel;
-
-   public AbstractGradleServerProtocol( File currentDirectory, File gradleHomeDirectory, File customGradleExecutor, String fullCommandLine, LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel)
-   {
-      this.currentDirectory = currentDirectory;
-      this.gradleHomeDirectory = gradleHomeDirectory;
-      this.customGradleExecutor = customGradleExecutor;
-      this.commandLine = fullCommandLine;
-      this.logLevel = logLevel;
-      this.stackTraceLevel = stackTraceLevel;
-   }
-
-   /**
-     * Notification that the connection was accepted by the client.
-   */
-   public void connectionAccepted()
-   {
-      //let's make sure we're talking to the right client with some tiny handshaking.
-      server.sendMessage( ProtocolConstants.HANDSHAKE_TYPE, ProtocolConstants.HANDSHAKE_SERVER );
-      continueConnection = true;
-      waitingOnHandshakeCompletion = true;
-   }
-
-   /**
-     * Gives your protocol a chance to store this server so it can access its functions.
-   */
-   public void initialize( ProcessLauncherServer server ) { this.server = server; }
-
-   /**
-     * Call this to stop communication
-   */
-   protected void closeConnection()
-   {
-      this.continueConnection = false;
-   }
-
-   /**
-     * Notification that a message has been received. If we just connected, we'll do a quick handshake to verify the
-     * client, then we just pass the rest on our our output panel.
-     *
-     * @param message the message that was received.
-   */
-   public void messageReceived( MessageObject message )
-   {
-      lastMessageReceived = message;
-      if( waitingOnHandshakeCompletion )  //are we still handshaking?
-      {
-         if( ProtocolConstants.HANDSHAKE_CLIENT.equalsIgnoreCase( message.getMessage() ) )
-         {
-            waitingOnHandshakeCompletion = false;  //we've received what we expected
-            hasCompletedConnection = true;         //and we're now connected
-            if( message.getData() != null )
-            {
-               killGradleServerPort = (Integer) message.getData();
-               killGradleClientProcotol = new KillGradleClientProtocol();
-               killGradleClient = new ClientProcess( killGradleClientProcotol );
-               killGradleClient.start( killGradleServerPort );
-               handShakeCompleted();
-            }
-            else
-            {
-               addStatus( "Invalid handshaking. Missing port number. Stopping connection" );
-               server.sendMessage( "?", "Invalid client handshake protocol!" );
-               closeConnection();
-            }
-         }
-         else
-         {
-            addStatus( "Invalid handshaking. Stopping connection" );
-            server.sendMessage( "?", "Invalid client handshake protocol!" );
-            closeConnection();
-         }
-      }
-      else  //otherwise, its just a normal message, the protocol should handle it.
-      {
-         try
-         {
-            handleMessageReceived( message );
-         }
-         catch( Throwable e )
-         {
-            logger.error( "Problem while handing message :\n" + message, e );
-         }
-      }
-   }
-
-   /**
-     * This provides you with a chance to do something when the handshaking is complete
-    */
-   protected void handShakeCompleted()
-   {
-
-   }
-
-   /**
-     * Notification that a message was received that we didn't process. Implement this to handle the specifics of your
-     * protocol. Basically, the base class handles the handshake. The rest of the conversation is up to you.
-     *
-     * @param message the message we received.
-     * @return true if we handled the message, false if not. If we don't know it, we won't return an acknowlegement.
-   */
-   protected abstract boolean handleMessageReceived( MessageObject message );
-
-   /**
-     * Call this to mark the build as completed (whether successfully or not). This is used to determine if the client
-     * has exited prematurely which indicates a problem.
-   */
-   public void setHasReceivedBuildCompleteNotification() { this.hasReceivedBuildCompleteNotification = true; }
-
-   /**
-     * Notification of any status that might be helpful to the user.
-     *
-     * @param status a status message
-   */
-   protected abstract void addStatus(String status );
-
-            public class MyExecutionInfo implements ExecutionInfo {
-                public String[] commandLineArguments;
-                public File workingDirectory;
-                public HashMap<String, String> environmentVariables = new HashMap<String, String>();
-                public File initStriptPath;
-
-                public String[] getCommandLineArguments() {
-                    return commandLineArguments;
-                }
-
-                public File getWorkingDirectory() {
-                    return workingDirectory;
-                }
-
-                public HashMap<String, String> getEnvironmentVariables() {
-                    return environmentVariables;
-                }
-
-                public void setCommandLineArguments(String[] commandLineArguments) {
-                    this.commandLineArguments = commandLineArguments;
-                }
-
-                public void setWorkingDirectory(File workingDirectory) {
-                    this.workingDirectory = workingDirectory;
-                }
-
-                public void addEnvironmentVariable(String name, String value) {
-                    this.environmentVariables.put(name, value);
-                }
-
-                public void processExecutionComplete() {
-                    if( initStriptPath != null ) {
-                        initStriptPath.delete();
-                    }
-                }
-            }
-
-
-   /**
-     * Fill in the ExecutionInfo object with information needed to execute the other process.
-         * @param serverPort the port the server is listening on. The client should send messages here
-         * @return an executionInfo object containing information about what we execute.
-   */
-   public ExecutionInfo getExecutionInfo( int serverPort )
-   {
-      MyExecutionInfo executionInfo = new MyExecutionInfo();
-
-      //set some environment variables that need to be passed to the script.
-      executionInfo.addEnvironmentVariable( "GRADLE_HOME", getGradleHomeDirectory().getAbsolutePath() );
-      executionInfo.addEnvironmentVariable( "JAVA_HOME", System.getProperty( "java.home" ) );
-
-      executionInfo.setWorkingDirectory( currentDirectory );
-
-      List<String> executionCommandLine = new ArrayList<String>();
-
-      //put the file to execute on the command line
-      File gradleExecutableFile = getGradleExecutableFile();
-      if( gradleExecutableFile == null ) {
-          throw new RuntimeException( "Gradle executable not specified" );
-      }
-      if( !gradleExecutableFile.exists() ) {
-          throw new RuntimeException( "Missing gradle executable. Expected it at: " + gradleExecutableFile );
-      }
-       executionCommandLine.add( gradleExecutableFile.getAbsolutePath() );
-
-      //add the port number we're listenening on
-      executionCommandLine.add( "-D" + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + "=" + Integer.toString( serverPort ) );
-
-      CommandLineAssistant commandLineAssistant = new CommandLineAssistant();
-
-      //add whatever the user ran
-      String[] individualCommandLineArguments = commandLineAssistant.breakUpCommandLine( commandLine );
-      executionCommandLine.addAll( Arrays.asList( individualCommandLineArguments ) );
-
-      File initStriptPath = getInitScriptFile();
-      if( initStriptPath != null )
-      {
-          executionCommandLine.add( "-" + DefaultCommandLineConverter.INIT_SCRIPT );
-          executionCommandLine.add( initStriptPath.getAbsolutePath() );
-          executionInfo.initStriptPath = initStriptPath;
-      }
-
-      //add the log level if its not present
-        if (!commandLineAssistant.hasLogLevelDefined(individualCommandLineArguments)) {
-            String logLevelText = commandLineAssistant.getLoggingCommandLineConverter().getLogLevelCommandLine(logLevel);
-            if (logLevelText != null && !"".equals(logLevelText)) {
-            executionCommandLine.add( '-' + logLevelText );
-      }
-        }
-
-      //add the stack trace level if its not present
-        if (!commandLineAssistant.hasShowStacktraceDefined(individualCommandLineArguments)) {
-            String stackTraceLevelText = commandLineAssistant.getCommandLineConverter().getShowStacktraceCommandLine(stackTraceLevel);
-            if (stackTraceLevelText != null) {
-            executionCommandLine.add( '-' + stackTraceLevelText );
-      }
-        }
-
-      executionInfo.setCommandLineArguments( executionCommandLine.toArray( new String[ executionCommandLine.size() ] ) );
-      return executionInfo;
-   }
-
-   /**
-     * @return the file that should be used to execute gradle. If we've been given a custom file, we use that, otherwise,
-     *         we use the batch or shell script inside the gradle home's bin directory.
-   */
-    protected File getGradleExecutableFile() {
-        if (customGradleExecutor != null) {
-         return customGradleExecutor;
-        }
-
-      return new File( gradleHomeDirectory, "bin" + File.separator + getDefaultGradleExecutableName() );
-   }
-
-   /**
-     * This determines what we're going to execute. Its different based on the OS.
-     *
-     * @return whatever we're going to execute.
-   */
-   private String getDefaultGradleExecutableName()
-   {
-       return OperatingSystem.current().getScriptName("gradle");
-   }
-
-   /**
-     * Notification that the client has stopped all communications.
-   */
-   public void clientCommunicationStopped()
-   {
-      //we don't really care
-   }
-
-   /**
-     * Notification that the client has shutdown. Note: this can occur before communciations has ever started. You SHOULD
-     * get this notification before receiving serverExited, even if the client fails to launch or locks up.
-     *
-     * @param returnCode the return code of the client application
-     * @param output the standard error and standard output of the client application
-    */
-   public void clientExited( int returnCode, String output )
-   {
-      server.requestShutdown();
-
-      boolean wasPremature = false;
-      String message;
-
-      if( !hasCompletedConnection ) //if we never connected, report it
-      {
-         message = "Failed to connect to gradle process for command '" + commandLine +"'\n" + output;
-         wasPremature = true;
-      }
-      else
-         if( !hasReceivedBuildCompleteNotification  )  //this may happen if the client doesn't execute properly or it was killed/canceled. This is just so we don't lose our output (which may yeild clues to the problem).
-         {
-            message = output;
-            wasPremature = true;
-         }
-         else
-         {
-            message = output;
-         }
-
-      reportClientExit( wasPremature, returnCode, message );
-   }
-
-   /**
-     * This is called if the client exits prematurely. That is, we never connected to it or it didn't finish. This can
-     * happen because of setup issues or errors that occur in gradle.
-     *
-     * @param returnCode the return code of the application
-     * @param message Whatever information we can gleen about what went wrong.
-    */
-   protected abstract void reportClientExit( boolean wasPremature, int returnCode, String output );
-
-   /**
-     * This is called before we execute a command. Here, return an init script for this protocol. An init script is a
-     * gradle script that gets run before the other scripts are processed. This is useful here for initiating the gradle
-     * client that talks to the server.
-     *
-     * @return The path to an init script. Null if you have no init script.
-   */
-   public abstract File getInitScriptFile();
-
-   /**
-     * If you do have an init script that's a resource, this will extract it based on the name and write it to a
-     * temporary file and delete it on exit.
-     *
-     * @param resourceClass the class associated with the resource
-     * @param resourceName the name (minus extension or '.') of the resource
-    */
-   protected File extractInitScriptFile( Class resourceClass, String resourceName )
-   {
-       File file = null;
-       try
-       {
-           file = File.createTempFile( resourceName, INIT_SCRIPT_EXTENSION );
-       }
-       catch (IOException e)
-       {
-           logger.error( "Creating init script file temp file", e );
-           return null;
-       }
-       file.deleteOnExit();
-
-        if (extractResourceAsFile(resourceClass, resourceName + INIT_SCRIPT_EXTENSION, file)) {
-         return file;
-        }
-
-      logger.error( "Internal error! Failed to extract init script for executing commands!" );
-
-      return null;
-   }
-
-   /**
-     * This extracts the given class' resource to the specified file if it doesn't already exist.
-     *
-     * @param resourceClass the class associated with the resource
-     * @param name the resource's name
-     * @param file where to put the resource
-     * @return true if successful, false if not.
-   */
-   public boolean extractResourceAsFile( Class resourceClass, String name, File file )
-   {
-      InputStream stream = resourceClass.getResourceAsStream( name );
-        if (stream == null) {
-         return false;
-        }
-
-      byte[] bytes = new byte[0];
-      try
-      {
-         bytes = IOUtils.toByteArray( stream );
-      }
-      catch( IOException e )
-      {
-         logger.error( "Extracting resource as file", e );
-         return false;
-      }
-
-      FileOutputStream fileOutputStream = null;
-      try
-      {
-         fileOutputStream = new FileOutputStream( file );
-          try {
-              IOUtils.write( bytes, fileOutputStream );
-          } finally {
-              fileOutputStream.close();
-          }
-          return true;
-      }
-      catch( IOException e )
-      {
-         logger.error( "Extracting resource as file (writing bytes)", e );
-         return false;
-      }
-      finally
-      {
-         IOUtils.closeQuietly( fileOutputStream );
-      }
-   }
-
-   protected File getGradleHomeDirectory() { return gradleHomeDirectory; }
-
-   /**
-     * Notification that a read failure occurred. This really only exists for debugging purposes when things go wrong.
-    */
-   public void readFailureOccurred()
-   {
-      logger.debug( "Last message received: " + lastMessageReceived );
-   }
-
-   public void aboutToKillProcess()
-   {
-      killGradle();
-   }
-
-    public void killGradle() {
-        if (killGradleClientProcotol != null) {
-         killGradleClientProcotol.sendKillMessage();
-         }
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandClientProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandClientProtocol.java
deleted file mode 100644
index d02826a..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandClientProtocol.java
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.BuildListener;
-import org.gradle.BuildResult;
-import org.gradle.api.Task;
-import org.gradle.api.execution.TaskExecutionGraph;
-import org.gradle.api.execution.TaskExecutionGraphListener;
-import org.gradle.api.execution.TaskExecutionListener;
-import org.gradle.api.initialization.Settings;
-import org.gradle.api.invocation.Gradle;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.api.logging.StandardOutputListener;
-import org.gradle.api.tasks.TaskState;
-import org.gradle.foundation.ipc.basic.ClientProcess;
-import org.gradle.foundation.ipc.basic.MessageObject;
-import org.gradle.foundation.ipc.basic.Server;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-
-import java.net.Socket;
-import java.util.List;
-import java.util.Timer;
-import java.util.TimerTask;
-
-/**
- * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based
- * inter-process communication. This is the client (gradle) side used when executing commands (the most common case). We
- * add gradle listeners and send their notifications as messages back to the server.
- *
- * @author mhunsicker
- */
-public class ExecuteGradleCommandClientProtocol implements ClientProcess.Protocol {
-    private final Logger logger = Logging.getLogger(ExecuteGradleCommandClientProtocol.class);
-    private ClientProcess client;
-    private boolean continueConnection = true;
-    private Gradle gradle;
-
-    private Server localServer;   //this is our server that will listen to the process that started us.
-
-    public ExecuteGradleCommandClientProtocol(Gradle gradle) {
-        this.gradle = gradle;
-    }
-
-    /**
-     * Gives your protocol a chance to store this client so it can access its functions.
-     */
-    public void initialize(ClientProcess client) {
-        this.client = client;
-
-       gradle.addListener( new IPCExecutionListener( client ) );
-    }
-
-    /**
-     * Notification that we have connected to the server. Do minimum handshaking.
-     *
-     * @return true if we should continue the connection, false if not.
-     */
-    public boolean serverConnected(Socket clientSocket) {
-        MessageObject message = client.readMessage();
-        if (message == null) {
-            return false;
-        }
-
-        if (!ProtocolConstants.HANDSHAKE_TYPE.equalsIgnoreCase(message.getMessageType())) {
-            logger.error("Incorrect server handshaking.");
-            return false;
-        }
-
-        localServer = new Server(new KillGradleServerProtocol());
-        localServer.start();
-
-        client.sendMessage(ProtocolConstants.HANDSHAKE_TYPE, ProtocolConstants.HANDSHAKE_CLIENT, localServer.getPort());
-
-        return true;
-    }
-
-    /**
-     * We just keep a flag around for this.
-     *
-     * @return true if we should keep the connection alive. False if we should stop communicaiton.
-     */
-    public boolean continueConnection() {
-        return continueConnection;
-    }
-
-    public void shutdown() {
-        continueConnection = false;
-    }
-
-
-    /**
-     * This converts gradle messages to messages that we send to our server over
-     * a socket. It also tracks the live output and periodically sends it to the
-       server.
-      *
-     */
-    private class IPCExecutionListener implements BuildListener, StandardOutputListener, TaskExecutionGraphListener, TaskExecutionListener
-    {
-        private ClientProcess client;
-
-        private StringBuffer allOutputText = new StringBuffer(); //this is potentially threaded, so use StringBuffer instead of StringBuilder
-        private StringBuffer bufferedLiveOutput = new StringBuffer();
-        private Timer liveOutputTimer;
-        private float totalTasksToExecute;
-        private float totalTasksExecuted;
-        private float percentComplete;
-
-        public IPCExecutionListener(ClientProcess client) {
-            this.client = client;
-
-            //start a timer to periodically send our live output to our server
-            liveOutputTimer = new Timer();
-            liveOutputTimer.scheduleAtFixedRate(new TimerTask() {
-                @Override
-                public void run() {
-                    sendLiveOutput();
-                }
-            }, 500, 500);
-        }
-
-        public void buildStarted(Gradle build) {
-            //we'll never get this message because execution has started before we were instantiated (and before we were able to add our listener).
-        }
-
-        public void graphPopulated( TaskExecutionGraph taskExecutionGraph) {
-           List<Task> taskList = taskExecutionGraph.getAllTasks();
-
-           this.totalTasksToExecute = taskList.size();
-           client.sendMessage( ProtocolConstants.NUMBER_OF_TASKS_TO_EXECUTE, null, new Integer( taskList.size() ) );
-       }
-
-       /**
-        <p>Called when the build settings have been loaded and evaluated. The settings object is fully configured and is
-        ready to use to load the build projects.</p>
-
-        @param settings The settings. Never null.
-        */
-       public void settingsEvaluated( Settings settings ) {
-          //we don't really care
-       }
-
-       /**
-        <p>Called when the projects for the build have been created from the settings. None of the projects have been
-        evaluated.</p>
-
-        @param gradle The build which has been loaded. Never null.
-        */
-       public void projectsLoaded( Gradle gradle ) {
-          //we don't really care
-       }
-
-       /**
-        <p>Called when all projects for the build have been evaluated. The project objects are fully configured and are
-        ready to use to populate the task graph.</p>
-
-        @param gradle The build which has been evaluated. Never null.
-        */
-       public void projectsEvaluated( Gradle gradle ) {
-          //we don't really care
-       }
-
-       public void beforeExecute(Task task) {
-          String currentTaskName = task.getProject().getName() + ":" + task.getName();
-          client.sendMessage(ProtocolConstants.TASK_STARTED_TYPE, currentTaskName, new Float(percentComplete));
-        }
-
-       public void afterExecute(Task task, TaskState state) {
-          totalTasksExecuted++;
-          percentComplete = (totalTasksExecuted / totalTasksToExecute) * 100;
-          String currentTaskName = task.getProject().getName() + ":" + task.getName();
-          client.sendMessage(ProtocolConstants.TASK_COMPLETE_TYPE, currentTaskName, new Float(percentComplete));
-        }
-
-        /**
-        * Called when some output is written by the logging system.
-        *
-        * @param output The text.
-        */
-        public synchronized void onOutput(CharSequence output) {
-            String text = output.toString();
-            this.allOutputText.append( text );
-            this.bufferedLiveOutput.append(text);
-        }
-
-       /**
-        Called on a timer to send the live output to the process that started us. We only send whatever
-        is there since we've last sent output. It was causing some socket problems to send the output
-        immediately upon receiving it. I suspect due to numerous threads adding output. So its now only
-        done periodically and in a more thread-safe manner.
-        */
-        private synchronized void sendLiveOutput() {
-            if (bufferedLiveOutput.length() == 0) {
-                return;  //nothing to send
-            }
-            String text = bufferedLiveOutput.toString();
-            bufferedLiveOutput = new StringBuffer();
-
-            client.sendMessage(ProtocolConstants.LIVE_OUTPUT_TYPE, text);
-        }
-
-        /**
-         * <p>Called when the build is completed. All selected tasks have been executed.</p>
-         * <p>We remove our Log4JAppender as well as our task execution listener. Lastly,
-         * we report the build results.</p>
-         */
-        public void buildFinished(BuildResult buildResult) {
-
-            boolean wasSuccessful = buildResult.getFailure() == null;
-            String output = allOutputText.toString();
-            liveOutputTimer.cancel();  //stop our timer and send whatever live output we have
-            sendLiveOutput();
-
-            //we can't send the exception itself because it might not be serializable (it can include anything from anywhere inside gradle
-            //or one of its dependencies). So format it as text.
-            String details = GradlePluginLord.getGradleExceptionMessage(buildResult.getFailure(), gradle.getStartParameter().getShowStacktrace());
-            output += details;
-
-            client.sendMessage(ProtocolConstants.EXECUTION_COMPLETED_TYPE, output, new Boolean(wasSuccessful));
-
-            client.sendMessage(ProtocolConstants.EXITING, null, null);
-            client.stop();
-        }
-    }
-}
-
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandServerProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandServerProtocol.java
deleted file mode 100644
index ec001c7..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandServerProtocol.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.foundation.ipc.basic.MessageObject;
-
-import java.io.File;
-
-/**
- * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based
- * inter-process communication. This is the server side for executing a gradle command. This listens for messages from
- * the gradle client.
- *
- * @author mhunsicker
- */
-public class ExecuteGradleCommandServerProtocol extends AbstractGradleServerProtocol {
-    private static final String INIT_SCRIPT_NAME = "execute-command-init-script";
-
-    private ExecutionInteraction executionInteraction;
-
-    public interface ExecutionInteraction {
-        /**
-         * Notification that gradle has started execution. This may not get called if some error occurs that prevents
-         * gradle from running.
-        */
-        void reportExecutionStarted();
-
-       /**
-        * Notification of the total number of tasks that will be executed. This is
-        * called after reportExecutionStarted and before any tasks are executed.
-        * @param size the total number of tasks.
-        */
-        void reportNumberOfTasksToExecute( int size );
-        /**
-         * Notification that execution has finished. Note: if the client fails
-         * to launch at all, this should still be called.
-         *
-         * @param  wasSuccessful true if gradle was successful (returned 0)
-         * @param  message       the output of gradle if it ran. If it didn't, an error message.
-         * @param  throwable     an exception if one occurred
-        */
-        void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable);
-
-        void reportTaskStarted(String message, float percentComplete);
-
-        void reportTaskComplete(String message, float percentComplete);
-
-        void reportLiveOutput(String message);
-    }
-
-    public ExecuteGradleCommandServerProtocol(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor, String fullCommandLine, LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, ExecutionInteraction executionInteraction) {
-        super(currentDirectory, gradleHomeDirectory, customGradleExecutor, fullCommandLine, logLevel, stackTraceLevel);
-        this.executionInteraction = executionInteraction;
-    }
-
-    /**
-     * Notification that a message was received that we didn't process. Implement this to handle the specifics of your
-     * protocol. Basically, the base class handles the handshake. The rest of the conversation is up to you.
-     *
-     * @param message the message we received.
-     */
-    @Override
-    protected boolean handleMessageReceived(MessageObject message) {
-        if (ProtocolConstants.EXECUTION_COMPLETED_TYPE.equals(message.getMessageType())) {
-            setHasReceivedBuildCompleteNotification();
-            return true;
-        }
-
-        if (ProtocolConstants.TASK_STARTED_TYPE.equals(message.getMessageType())) {
-            Float percentComplete = (Float) message.getData();
-            executionInteraction.reportTaskStarted(message.getMessage(), percentComplete);
-            return true;
-        }
-
-        if (ProtocolConstants.TASK_COMPLETE_TYPE.equals(message.getMessageType())) {
-            Float percentComplete = (Float) message.getData();
-            executionInteraction.reportTaskComplete(message.getMessage(), percentComplete);
-            return true;
-        }
-
-        if (ProtocolConstants.LIVE_OUTPUT_TYPE.equals(message.getMessageType())) {
-            executionInteraction.reportLiveOutput(message.getMessage());
-            return true;
-        }
-
-        if( ProtocolConstants.NUMBER_OF_TASKS_TO_EXECUTE.equals( message.getMessageType() ) ) {
-            Integer total = (Integer) message.getData();
-            executionInteraction.reportNumberOfTasksToExecute( total.intValue() );
-        }
-
-
-        if (ProtocolConstants.EXITING.equals(message.getMessageType())) {
-            closeConnection();   //the client is done.
-            return true;
-        }
-
-        return false;
-    }
-
-   /**
-    * This is called when when the client exits. This does not mean it succeeded.
-    * This is probably the only way you'll get ALL of the
-    * client's output as it continues to output things like error messages after it sends
-    * us an executionFinished message.
-
-    * @param returnCode the return code of the application
-    * @param output     its total output
-    */
-   protected void reportClientExit( boolean wasPremature, int returnCode, String output )
-   {
-       //Note: we're relying on clientExited to be called to mark a task as complete.
-       //This is because even though gradle sends us a message that it has completed
-       //the build, it hasn't yet output all of its information which is very useful
-       //for debugging.
-       executionInteraction.reportExecutionFinished(returnCode == 0, output, null);
-   }
-
-    /**
-     * Notification of any status that might be helpful to the user.
-     *
-     * @param  status     a status message
-    */
-    protected void addStatus(String status) {
-        executionInteraction.reportLiveOutput(status);
-    }
-
-    /**
-     * This is called before we execute a command. Here, return an init script for this protocol. An init script is a
-     * gradle script that gets run before the other scripts are processed. This is useful here for initiating the gradle
-     * client that talks to the server.
-     *
-     * @return The path to an init script. Null if you have no init script.
-    */
-    public File getInitScriptFile() {
-        return extractInitScriptFile(ExecuteGradleCommandServerProtocol.class, INIT_SCRIPT_NAME);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/GradleClient.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/GradleClient.java
deleted file mode 100644
index 492bfde..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/GradleClient.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.foundation.ipc.basic.ClientProcess;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import java.io.Serializable;
-
-/**
- * <p>This is used to send information from a one process to another process. This one is used by the launched process
- * where the server (the process that launched us) is listening for our messages over a socket connection. The server
- * typically sets the port to listen to via java system properties.</p> <p>To use this, instantiate it, then call start
- * passing in a protocol (which defines the actual communication messages).</p>
- */
-public class GradleClient {
-    private ClientProcess clientProcess;
-    private final Logger logger = Logging.getLogger(GradleClient.class);
-
-    public GradleClient() {
-    }
-
-    /**
-     * Call this to start the client. This version gets the port number as a system property. It does nothing if this
-     * property isn't defined.
-     *
-     * @param protocol the protocol to use to communicate with the server.
-     * @return true if successful, false if not.
-     */
-    public boolean start(ClientProcess.Protocol protocol) {
-        //make sure we've been given the port number to use
-        String portText = System.getProperty(ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY);
-        if (portText == null) {
-            logger.error("No port number specified. Cannot run client");
-            return false;
-        }
-
-        try {
-            int port = Integer.parseInt(portText);
-            return start(protocol, port);
-        } catch (NumberFormatException e) {
-            logger.error("Parsing port '" + portText + "'", e);
-            return false;
-        }
-    }
-
-    /**
-     * Call this to start the client.
-     *
-     * @param protocol the protocol to use to communicate with the server.
-     * @param port the port the server is listening on
-     * @return true if successful, false if not.
-     */
-    public boolean start(ClientProcess.Protocol protocol, int port) {
-        clientProcess = new ClientProcess(protocol);
-
-        if (!clientProcess.start(port)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Call this to send a message and wait for the server to acknowledge siad message.
-     */
-    public boolean sendMessage(String messageType, String message, Serializable data) {
-        return clientProcess.sendMessage(messageType, message, data);
-    }
-
-    public boolean sendMessage(String messageType, String message) {
-        return sendMessage(messageType, message, null);
-    }
-
-    /**
-     * Call this to stop communications with the server.
-     */
-    public void stop() {
-        clientProcess.stop();
-    }
-}
-
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/IPCUtilities.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/IPCUtilities.java
deleted file mode 100644
index 6a9aada..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/IPCUtilities.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.api.invocation.Gradle;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-/**
- * Just some convenience functions to startup a GradleClient. See GradleClient for more information.
- *
- * @author mhunsicker
- */
-public class IPCUtilities {
-    private static final Logger LOGGER = Logging.getLogger(IPCUtilities.class);
-
-    /**
-     * This starts a gradle client for doing regular execution of a command. It expects the port number to set as a
-     * system property. Note: this is using gradle to find the port. See getPort().
-     *
-     * @param gradle the gradle object.
-     */
-    public static void invokeExecuteGradleClient(Gradle gradle) {
-        Integer port = getPort(gradle);
-        if (port == null) {
-            return;
-        }
-
-        ExecuteGradleCommandClientProtocol protocol = new ExecuteGradleCommandClientProtocol(gradle);
-        GradleClient client = new GradleClient();
-        client.start(protocol, port);
-    }
-
-    /**
-     * This gets the port out of the start parameters. Why? Because this is meant to be run from the init script and the
-     * system properties haven't been set yet. That is due to how gradle is run from the bat file/shell script. It has
-     * to manually set the java system properties (-D). I don't this is a desired side-effect.
-     *
-     * @param gradle the gradle object
-     * @return an integer or null if we didn't get the port.
-     */
-    private static Integer getPort(Gradle gradle) {
-        String portText = gradle.getStartParameter().getSystemPropertiesArgs().get(
-                ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY);
-        if (portText == null) {
-            LOGGER.error("Failed to set " + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + " system property");
-            return null;
-        }
-
-        try {
-            return Integer.parseInt(portText);
-        } catch (NumberFormatException e) {
-            LOGGER.error("Invalid " + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + " system property", e);
-            return null;
-        }
-    }
-
-    /**
-     * This starts a gradle client that sends a task list back to the server. It expects the port number to set as a
-     * system property. You probably should be executing the "tasks" command. Note: this is using gradle to find the port.
-     * See getPort().
-     *
-     * @param gradle the gradle launcher object.
-     */
-    public static void invokeTaskListGradleClient(Gradle gradle) {
-        Integer port = getPort(gradle);
-        if (port == null) {
-            return;
-        }
-
-        TaskListClientProtocol protocol = new TaskListClientProtocol(gradle);
-        GradleClient client = new GradleClient();
-        client.start(protocol, port);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleClientProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleClientProtocol.java
deleted file mode 100644
index de08cdc..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleClientProtocol.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.foundation.ipc.basic.ClientProcess;
-
-import java.net.Socket;
-
-/**
- * This protocol is used by the process that launches gradle (the launching server - but in this case its the client) so
- * that it can tell gradle to kill itself. This is used to cancel gradle execution. There is no other clean way to do it
- * but kill it. All this does is send a 'kill' message.
- *
- * @author mhunsicker
- */
-public class KillGradleClientProtocol implements ClientProcess.Protocol {
-    private ClientProcess client;
-
-    public void initialize(ClientProcess client) {
-        this.client = client;
-    }
-
-    public boolean serverConnected(Socket clientSocket) {
-        return true;
-    }
-
-    public boolean continueConnection() {
-        return true;
-    }
-
-    public void sendKillMessage() {
-        client.sendMessage(ProtocolConstants.KILL, ProtocolConstants.KILL);
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleServerProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleServerProtocol.java
deleted file mode 100644
index cb77860..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleServerProtocol.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.foundation.ipc.basic.Server;
-import org.gradle.foundation.ipc.basic.MessageObject;
-
-/**
- * This protocol is used by a client that launches its own server. See KillGradleClientProtocol.
- *
- * @author mhunsicker
- */
-public class KillGradleServerProtocol implements Server.Protocol<Server> {
-    private Server server;
-
-    public void initialize(Server server) {
-        this.server = server;
-    }
-
-    public void connectionAccepted() {
-
-    }
-
-    public boolean continueConnection() {
-        return true;
-    }
-
-    public void messageReceived(MessageObject message) {
-        if (ProtocolConstants.KILL.equals(message.getMessageType())) {
-            killProcess();
-        }
-    }
-
-    private void killProcess() {
-        System.exit(-1);
-    }
-
-    public void clientCommunicationStopped() {
-        killProcess();
-    }
-
-    public void readFailureOccurred() {
-
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListClientProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListClientProtocol.java
deleted file mode 100644
index 4cf4031..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListClientProtocol.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.BuildAdapter;
-import org.gradle.BuildResult;
-import org.gradle.api.invocation.Gradle;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.api.logging.StandardOutputListener;
-import org.gradle.foundation.ProjectConverter;
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.ipc.basic.ClientProcess;
-import org.gradle.foundation.ipc.basic.MessageObject;
-import org.gradle.foundation.ipc.basic.Server;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-
-import java.io.Serializable;
-import java.net.Socket;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This manages the communication between the UI and an externally-launched copy
- * of Gradle when using socket-based inter-process communication. This is the
- * client (gradle) side used to build a task list (tree actually). We add gradle
- * listeners and send their notifications as messages back to the server.
- *
- * @author mhunsicker
- */
-public class TaskListClientProtocol implements ClientProcess.Protocol {
-    private final Logger logger = Logging.getLogger(TaskListClientProtocol.class);
-    private ClientProcess client;
-    private boolean continueConnection = true;
-    private Gradle gradle;
-
-    private Server localServer;   //this is our server that will listen to the process that started us.
-
-    public TaskListClientProtocol(Gradle gradle) {
-        this.gradle = gradle;
-    }
-
-    /**
-     * Gives your protocol a chance to store this client so it can access its functions.
-     */
-    public void initialize(ClientProcess client) {
-        this.client = client;
-       this.gradle.addListener( new RefreshTaskListBuildListener( client ) );
-    }
-
-    /**
-     * Listener used to delegate gradle messages to our listeners.
-     *
-     */
-    private class RefreshTaskListBuildListener extends BuildAdapter implements StandardOutputListener
-    {
-        private ClientProcess client;
-        private StringBuffer allOutputText = new StringBuffer(); //this is potentially threaded, so use StringBuffer instead of StringBuilder
-
-        public RefreshTaskListBuildListener(ClientProcess client) {
-            this.client = client;
-        }
-
-        public synchronized void onOutput(CharSequence output) {
-            String text = output.toString();
-            allOutputText.append(text);
-        }
-
-       /**
-        * <p>Called when the build is completed. All selected tasks have been executed.</p>
-        *
-        * @param buildResult The result of the build. Never null.
-        */
-       @Override
-       public void buildFinished( BuildResult buildResult )
-       {
-         boolean wasSuccessful = buildResult.getFailure() == null;
-         String output = allOutputText.toString();
-
-         if (!wasSuccessful) //if we fail, send the results, otherwise, we'll send the projects.
-         {
-             //we can't send the exception itself because it might not be serializable (it can include anything from anywhere inside gradle
-             //or one of its dependencies). So format it as text.
-             String details = GradlePluginLord.getGradleExceptionMessage(buildResult.getFailure(), gradle.getStartParameter().getShowStacktrace());
-             output += details;
-
-             client.sendMessage(ProtocolConstants.TASK_LIST_COMPLETED_WITH_ERRORS_TYPE, output, wasSuccessful);
-         } else {
-             ProjectConverter buildExecuter = new ProjectConverter();
-             List<ProjectView> projects = new ArrayList<ProjectView>();
-             projects.addAll(buildExecuter.convertProjects(buildResult.getGradle().getRootProject()));
-
-             client.sendMessage(ProtocolConstants.TASK_LIST_COMPLETED_SUCCESSFULLY_TYPE, output, (Serializable) projects);
-         }
-
-         //tell the server we're going to exit.
-         client.sendMessage(ProtocolConstants.EXITING, null, null);
-
-         client.stop();
-       }
-    }
-
-    /**
-     * Notification that we have connected to the server. Do minimum handshaking.
-     *
-     * @return true if we should continue the connection, false if not.
-     */
-    public boolean serverConnected(Socket clientSocket) {
-        MessageObject message = client.readMessage();
-        if (message == null)
-        {
-           return false;
-        }
-
-       if (!ProtocolConstants.HANDSHAKE_TYPE.equalsIgnoreCase(message.getMessageType())) {
-            logger.error("Incorrect server handshaking.");
-            return false;
-        }
-
-        localServer = new Server(new KillGradleServerProtocol());
-        localServer.start();
-
-        client.sendMessage(ProtocolConstants.HANDSHAKE_TYPE, ProtocolConstants.HANDSHAKE_CLIENT, localServer.getPort());
-
-        return true;
-    }
-
-    /**
-     * We just keep a flag around for this.
-     *
-     * @return true if we should keep the connection alive. False if we should
-     *         stop communicaiton.
-     */
-    public boolean continueConnection() {
-        return continueConnection;
-    }
-
-    public void shutdown() {
-        continueConnection = false;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListServerProtocol.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListServerProtocol.java
deleted file mode 100644
index 7fa1313..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListServerProtocol.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.ipc.gradle;
-
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.ipc.basic.MessageObject;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based
- * inter-process communication. This is the server side for building a task list. This listens for messages from the
- * gradle client.
- *
- * @author mhunsicker
- */
-public class TaskListServerProtocol extends AbstractGradleServerProtocol {
-    private final Logger logger = Logging.getLogger(TaskListServerProtocol.class);
-
-    private static final String INIT_SCRIPT_NAME = "refresh-tasks-init-script";
-
-    private ExecutionInteraction executionInteraction;
-
-   public interface ExecutionInteraction {
-        /**
-        * Notification that gradle has started execution. This may not get called
-        * if some error occurs that prevents gradle from running.
-        */
-        void reportExecutionStarted();
-
-        /**
-        * Notification that execution has finished. Note: if the client fails
-        * to launch at all, this should still be called.
-        *
-        * @param  wasSuccessful true if gradle was successful (returned 0)
-        * @param  message       the output of gradle if it ran. If it didn't, an error message.
-        * @param  throwable     an exception if one occurred
-        */
-        void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable);
-
-        void projectsPopulated( List<ProjectView> projects );
-
-        void reportLiveOutput(String message);
-    }
-
-    public TaskListServerProtocol(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor, String fullCommandLine, LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, ExecutionInteraction executionInteraction) {
-        super(currentDirectory, gradleHomeDirectory, customGradleExecutor, fullCommandLine, logLevel, stackTraceLevel);
-        this.executionInteraction = executionInteraction;
-    }
-
-    /**
-    * Notification that a message was received that we didn't process. Implement
-    * this to handle the specifics of your protocol. Basically, the base class
-    * handles the handshake. The rest of the conversation is up to you.
-    *
-    * @param message the message we received.
-    */
-    @Override
-    protected boolean handleMessageReceived(MessageObject message) {
-        if (ProtocolConstants.TASK_LIST_COMPLETED_WITH_ERRORS_TYPE.equals(message.getMessageType())) {  //if we were NOT successful, we'll have a BuildResultsWrapper instead of a project list as our data.
-            setHasReceivedBuildCompleteNotification();
-
-            return true;
-        }
-
-        if (ProtocolConstants.TASK_LIST_COMPLETED_SUCCESSFULLY_TYPE.equals(message.getMessageType())) {  //if we were successful, we'll have a project list instead of a BuildResultsWrapper as our data.
-            setHasReceivedBuildCompleteNotification();
-
-           List<ProjectView> projects = (List<ProjectView>) message.getData();
-           executionInteraction.projectsPopulated( projects );
-
-            return true;
-        }
-
-        if (ProtocolConstants.EXITING.equals(message.getMessageType())) {
-            closeConnection();   //the client is done.
-            return true;
-        }
-
-        return false;
-    }
-
-   /**
-    * This is called when when the client exits. This does not mean it succeeded.
-    * This is probably the only way you'll get ALL of the
-    * client's output as it continues to output things like error messages after it sends
-    * us an executionFinished message.
-    *
-    * @param returnCode the return code of the application
-    * @param output     its total output
-    */
-   protected void reportClientExit( boolean wasPremature, int returnCode, String output )
-   {
-        /**
-        * Note: we're relying on clientExited to be called to mark a task as complete.
-        * This is because even though gradle sends us a message that it has completed
-        * the build, it hasn't yet output all of its information which is very useful
-        * for debugging.
-        */
-        executionInteraction.reportExecutionFinished(returnCode == 0, output, null );
-    }
-
-    /**
-     * Notification of any status that might be helpful to the user.
-     * @param  status     a status message
-    */
-    protected void addStatus(String status) {
-        executionInteraction.reportLiveOutput(status);
-    }
-
-    /**
-     * This is called before we execute a command. Here, return an init script
-     * for this protocol. An init script is a gradle script that gets run before
-     * the other scripts are processed. This is useful here for initiating
-     * the gradle client that talks to the server.
-     *
-     * @return The path to an init script. Null if you have no init script.
-     */
-    public File getInitScriptFile() {
-        return this.extractInitScriptFile(TaskListServerProtocol.class, INIT_SCRIPT_NAME);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/FileLink.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/FileLink.java
deleted file mode 100644
index 401c0b2..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/FileLink.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output;
-
-import org.gradle.foundation.output.definitions.FileLinkDefinition;
-
-import java.io.File;
-
-/**
- This represents a link to a file inside gradle's output. This is so the gradle UI/plugins can
- open the file. This is useful for a user when gradle displays a build error, test failure or
- compile error.
-
- @author mhunsicker
-*/
-public class FileLink
-{
-   private File file;
-   private int lineNumber;
-   private int startingIndex;
-   private int endingIndex;
-   private FileLinkDefinition matchingDefinition;  //useful for debugging.
-
-   public FileLink( File file, int startingIndex, int endingIndex, int lineNumber, FileLinkDefinition matchingDefinition )
-   {
-      this.file = file;
-      this.startingIndex = startingIndex;
-      this.endingIndex = endingIndex;
-      this.lineNumber = lineNumber;
-      this.matchingDefinition = matchingDefinition;
-   }
-
-   public FileLink( File file, int startingIndex, int endingIndex, int lineNumber )
-   {
-      this( file, startingIndex, endingIndex, lineNumber, null );
-   }
-
-   @Override
-   public String toString()
-   {
-      return "file='" + file + "' startingIndex=" + startingIndex + " endingIndex=" + endingIndex + " line: " + lineNumber + ( matchingDefinition != null ? ( " definition: " + matchingDefinition.getName() ) : "" );
-   }
-
-   public int getLength()
-   {
-      return endingIndex - startingIndex;
-   }
-
-   /**
-      @return the file
-   */
-   public File getFile() { return file; }
-
-   /**
-      @return the line number into the file. May be -1 if not specified
-   */
-   public int getLineNumber() { return lineNumber; }
-
-   /**
-      @return the index into the source text where this FileLink begins.
-   */
-   public int getStartingIndex() { return startingIndex; }
-
-   /**
-      @return the index into the source text where this FileLink ends.
-   */
-   public int getEndingIndex() { return endingIndex; }
-
-   /**
-    This moves the starting and ending index by the specified amount. This is
-    useful if you're searching within a portion of larger text. This corrects
-    the original indices.
-    @param amountToMove how much to move it.
-    */
-   /*package*/ void move( int amountToMove )
-   {
-      startingIndex += amountToMove;
-      endingIndex += amountToMove;
-   }
-
-   @Override
-   public boolean equals( Object obj )
-   {
-      if( !( obj instanceof FileLink ) )
-      {
-         return false;
-      }
-
-      FileLink otherFileLink = (FileLink) obj;
-      return otherFileLink.endingIndex == endingIndex &&
-             otherFileLink.startingIndex == startingIndex &&
-             otherFileLink.lineNumber == lineNumber &&
-             otherFileLink.file.equals( file );
-      //we do NOT want to compare the FileLinkDefinition. These aren't set usually for tests and we don't have easy access to them anyway.
-   }
-
-    @Override
-    public int hashCode() {
-        return endingIndex ^ startingIndex ^ lineNumber ^ file.hashCode();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/FileLinkDefinitionLord.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/FileLinkDefinitionLord.java
deleted file mode 100644
index 33020f7..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/FileLinkDefinitionLord.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output;
-
-import org.gradle.foundation.output.definitions.*;
-
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * This class holds on FileLinkDefinitions used for searching output.
- *
- * @author mhunsicker
-
- */
-public class FileLinkDefinitionLord {
-    private List<String> extensions = new ArrayList<String>( );
-
-    //these are definitions where the file is between known tokens.
-    private Map<Pattern,FileLinkDefinition> complexFileLinkDefinitions = new LinkedHashMap<Pattern,FileLinkDefinition>();
-
-    //these are definitions where we only try to match based on the file extension.
-    private Map<Pattern,FileLinkDefinition> extensionFileLinkDefinitions = new LinkedHashMap<Pattern,FileLinkDefinition>();
-
-    private Pattern combinedSearchPattern;  //search pattern consisting of all of our sub search patterns
-
-    public FileLinkDefinitionLord() {
-      //this is where we define what files we find.
-
-      //add all the file extension definitions
-      addFileExtension( ".java", ":" );     //the colon handles compile errors with line numbers
-      addFileExtension( ".groovy", ":" );
-      addFileExtension( ".gradle", ":" );
-      addFileExtension( ".xml", ":" ); //I don't think I've ever seen an xml or html file specified with a line number delimiter, but we'll try it anyway
-      addFileExtension( ".html", ":" );
-      addFileExtension( ".htm", ":" );
-
-      //now add the more complex ones
-      addPrefixedFileLink( "Ant Compiler Error", "[ant:javac]", ".java", ":" );       //handles java compiler errors
-      addPrefixedFileLink( "Compiler Warning", "Note:", ".java", null );               //handles java compiler warnings such as deprecated APIs
-      addCustomComplexFileLink( new OptionalLineNumberFileLinkDefinition( "Build File Errors", "Build file '",".gradle", "line:" ) );       //handles errors in a gradle build file
-      addPrefixedFileLink( "Ant Checkstyle Error/Warning", "[ant:checkstyle]", ".java", ":" );//handles checkstyle errors/warnings
-      addPrefixedFileLink( "Checkstyle Error (report xml)", "See the report at", ".xml", null );   //handles checkstyle errors. Links to the report xml file.
-      addPrefixedFileLink( "Codenarc Error", "See the report at", ".html", null );      //handles Codenarc errors. Links to the report file.
-      addCustomComplexFileLink( new TestReportFileLinkDefinition() );
-    }
-
-    /**
-     Call this to add file extensions to look for in the output. This assumes the file path
-     is the first thing on the line.
-     @param extension the file extension
-     @param lineNumberDelimiter optional delimiter text for line number. Whatever is after
-             this will be assumed to be a line number. We'll only parse the numbers after
-             this so there can be other stuff after the line number. Pass in null to ignore.
-     */
-    public void addFileExtension( String extension, String lineNumberDelimiter )
-    {
-       if( !extension.startsWith( "."  ) ) {
-           extension = "." + extension;
-       }
-
-        extension = extension.toLowerCase();
-       if( extensions.contains( extension ) ) //don't add extensions already added
-       {
-          return;
-       }
-
-       extensions.add( extension );
-
-       String name = extension + " Files";
-       ExtensionFileLinkDefinition linkDefinition = new ExtensionFileLinkDefinition(name, extension, lineNumberDelimiter);
-       addToMap(extensionFileLinkDefinitions, linkDefinition );
-    }
-
-    /**
-     Creates a file link definition to find file paths in the output that have a known prefix and extension.
-     It also allows for an optional line number after a delimiter. This is useful if you know a certain
-     message always precedes a file path.
-     @param name  the name of this file link definition. Used by tests mostly.
-     @param prefix  the text that is before the file path. It should be enough to make it fairly unique
-     @param extension  the expected file extension. If we don't find this extension, we do not consider
-             the text a file's path. If there are multiple extensions, you'll have to add multiples of these.
-     @param lineNumberDelimiter optional delimiter text for line number. Whatever is after
-             this will be assumed to be a line number. We'll only parse the numbers after
-             this so there can be other stuff after the line number. Pass in null to ignore.
-
-     */
-    public void addPrefixedFileLink( String name, String prefix, String extension, String lineNumberDelimiter )
-    {
-        PrefixedFileLinkDefinition linkDefinition = new PrefixedFileLinkDefinition(name, prefix, extension, lineNumberDelimiter);
-        addToMap( complexFileLinkDefinitions, linkDefinition );
-    }
-
-    private void addCustomComplexFileLink( FileLinkDefinition fileLinkDefinition )
-    {
-        addToMap( complexFileLinkDefinitions, fileLinkDefinition );
-    }
-
-    private void addToMap( Map<Pattern,FileLinkDefinition> destinationMap, FileLinkDefinition fileLinkDefinition )
-    {
-        //if you change anything, we'll destroy our combined search pattern. This will recreate it with the
-        //latest settings when its next asked for.
-        combinedSearchPattern = null;
-
-        String searchExpression = fileLinkDefinition.getSearchExpression();
-        Pattern pattern = Pattern.compile( searchExpression, getSearchPatternFlags() );
-        destinationMap.put( pattern, fileLinkDefinition);
-    }
-
-    /**
-     @return a list of known file extensions that are searched for in the output.
-     */
-    public List<String> getFileExtensions() { return Collections.unmodifiableList( extensions ); }
-
-    /**
-      @return a list of our FileLinkDefinitions
-     */
-    public List<FileLinkDefinition> getFileLinkDefinitions()
-    {
-        List<FileLinkDefinition> fileLinkDefinitions = new ArrayList<FileLinkDefinition>();
-
-        fileLinkDefinitions.addAll( complexFileLinkDefinitions.values() );
-        fileLinkDefinitions.addAll( extensionFileLinkDefinitions.values() );
-
-        return Collections.unmodifiableList( fileLinkDefinitions );
-    }
-
-   private int getSearchPatternFlags() { return Pattern.CASE_INSENSITIVE; }
-
-    /**
-     * This returns the FileLinkDefinition whose search pattern 'matches' (as in 'finds', not 'equals') the
-     * specified text. The tricky thing here is that multiple FileLinkDefinitions can match the text. To
-     * assist this we've done two things: we first try to match it with the complex patterns (the ones that
-     * try to match prefixed and suffixed text around a file's path), then if we don't find one, we'll match
-     * it with a simple extension FileLinkDefinitions. The other thing is that we search the definitions in
-     * order. This means the order in which the FileLinkDefinitions are added can be important. Add the more
-     * definitive ones first.
-     * @param text the text to use to find a match.
-     * @return a FileLinkDefinition that matches the text
-     */
-   public FileLinkDefinition getMatchingFileLinkDefinition( String text )
-   {
-       FileLinkDefinition fileLinkDefinition = getMatchingFileLinkDefinition( text, complexFileLinkDefinitions );
-       if( fileLinkDefinition == null ) {
-           fileLinkDefinition = getMatchingFileLinkDefinition( text, extensionFileLinkDefinitions );
-       }
-
-       return fileLinkDefinition;
-   }
-
-   private static FileLinkDefinition getMatchingFileLinkDefinition( String text, Map<Pattern,FileLinkDefinition> map )
-   {
-      Iterator<Pattern> iterator = map.keySet().iterator();
-      while( iterator.hasNext() )
-      {
-         Pattern pattern = iterator.next();
-         Matcher matcher = pattern.matcher( text );
-         if( matcher.find( 0 ) )
-         {
-            return map.get( pattern );
-         }
-      }
-
-      return null;
-   }
-
-    public Pattern getSearchPattern()
-    {
-        if( combinedSearchPattern == null ) //only build it if we need to.
-        {
-            combinedSearchPattern = buildSearchPattern();
-        }
-
-        return combinedSearchPattern;
-    }
-
-    /**
-    This iterates through all the FileLinkDefinitions and builds one giant single RegEx search pattern. This is more
-    efficient than using multiple search patterns.
-    */
-   private Pattern buildSearchPattern()
-   {
-      StringBuilder criteria = new StringBuilder();
-      Iterator<FileLinkDefinition> iterator = getFileLinkDefinitions().iterator();
-      while( iterator.hasNext() )
-      {
-         FileLinkDefinition fileLinkDefinition = iterator.next();
-         String searchExpression = fileLinkDefinition.getSearchExpression();
-
-         criteria.append( "(" ).append( searchExpression ).append( ")" );
-
-         if( iterator.hasNext() )
-         {
-            criteria.append( "|" );
-         }
-      }
-
-      return Pattern.compile( criteria.toString(), getSearchPatternFlags() );
-   }
-
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/LiveOutputParser.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/LiveOutputParser.java
deleted file mode 100644
index f9139b8..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/LiveOutputParser.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Collections;
-
-/**
- This is a special type of OutputParser. It handles tracking live output. The unique thing about live
- output is that we're not guaranteed to get whole lines. Also, we don't want to parse parts that have
- already been parsed. This holds onto the output until a newline is reached, then parses it. It also
- tracks the overall index into the output (even though its only parsing a part of it).
-
- @author mhunsicker
- */
-public class LiveOutputParser
-{
-   private OutputParser parser;
-   private List<FileLink> fileLinks = new ArrayList<FileLink>();
-   private StringBuilder totalTextToParse = new StringBuilder();
-   private int lastNewline;
-
-   public LiveOutputParser( FileLinkDefinitionLord fileLinkDefinitionLord, boolean verifyFileExists )
-   {
-       parser = new OutputParser( fileLinkDefinitionLord, verifyFileExists );
-   }
-
-   /**
-    Removes all text and FileLinks. This is so you can use this on new text
-    */
-   public void reset()
-   {
-       //recreate the parser because its possible the definitions have changed.
-      boolean verifyFileExists = parser.isVerifyFileExists();
-      FileLinkDefinitionLord fileLinkDefinitionLord = parser.getFileLinkDefinitionLord();
-      parser = new OutputParser( fileLinkDefinitionLord, verifyFileExists );
-       
-      lastNewline = 0;
-      totalTextToParse.setLength( 0 );
-      fileLinks.clear();
-   }
-
-   public List<FileLink> appendText( String text )
-   {
-      int oldTotalSize = totalTextToParse.length();
-
-      totalTextToParse.append( text );
-      int indexOfNewline = text.lastIndexOf( '\n' );
-      if( indexOfNewline == -1 )
-      {
-         return Collections.emptyList();  //nothing to search yet
-      }
-
-      //compensate the index for the total size
-      indexOfNewline += oldTotalSize;
-
-      //get everything between the last newline and this one
-      String textToParse = totalTextToParse.substring( lastNewline, indexOfNewline );
-
-      //search it
-      List<FileLink> subFileLinks = parser.parseText( textToParse );
-
-      //for each FileLink we have, we have to correct it's offsets because we didn't search from the beginning.
-      Iterator<FileLink> iterator = subFileLinks.iterator();
-      while( iterator.hasNext() )
-      {
-         FileLink fileLink = iterator.next();
-         fileLink.move( lastNewline );
-      }
-
-      fileLinks.addAll( subFileLinks );
-
-      lastNewline = indexOfNewline;
-
-      return subFileLinks;
-   }
-
-   public List<FileLink> getFileLinks() { return Collections.unmodifiableList( fileLinks ); }
-
-   /**
-    This gets the fileLink at the specified index in the text.
-    @param index the index into the overall text.
-    @return a FileLink if one exists at the index. null if not.
-    */
-   public FileLink getFileLink( int index )
-   {
-      if( index < 0 || index >= totalTextToParse.length() )
-      {
-         return null;
-      }
-
-      Iterator<FileLink> iterator = fileLinks.iterator();
-
-      while( iterator.hasNext() )
-      {
-         FileLink fileLink = iterator.next();
-         if( fileLink.getStartingIndex() <= index && fileLink.getEndingIndex() >= index )
-         {
-            return fileLink;
-         }
-      }
-
-      return null;
-   }
-
-   public String getText() { return totalTextToParse.toString(); }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/OutputParser.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/OutputParser.java
deleted file mode 100644
index 2f85d1d..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/OutputParser.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output;
-
-import org.gradle.foundation.output.definitions.*;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- This parses gradle's output text looking for links to files. We use RegEx to
- do the bulk of  the matching. However, we want this to be 'pluggable' (to a
- degree) so new file links can be added easily. To accomplish this, this works
- with FileLinkDefinitions. They require a basic RegEx pattern to match some
- initial part of the a file link, however, they can be implemented to do more
- advanced parsing of the text. The definitions are built-up and held by
- FileLinkDefinitionLord. This just handles the tedium of matching the
- all-inclusive pattern with text, managing indices, and calling the matching
- FileLinkDefinition to refine the match.
-
- @author mhunsicker
- */
-public class OutputParser
-{
-    private FileLinkDefinitionLord fileLinkDefinitionLord;
-    private boolean verifyFileExists;   //this is really only for testing where the file will not exist.
-
-    public OutputParser( FileLinkDefinitionLord fileLinkDefinitionLord, boolean verifyFileExists )
-   {
-       this.fileLinkDefinitionLord = fileLinkDefinitionLord;
-       this.verifyFileExists = verifyFileExists;
-   }
-
-    public boolean isVerifyFileExists() { return verifyFileExists; }
-    public FileLinkDefinitionLord getFileLinkDefinitionLord() { return fileLinkDefinitionLord; }
-
-   /**
-    This parses the text looking for file links
-    @param text the text to parse
-    @return a list of FileLinks for each file that was found in the text.
-    */
-   public List<FileLink> parseText( String text )
-   {
-      List<FileLink> fileLinks = new ArrayList<FileLink>();
-
-      Pattern combinedSearchPattern = fileLinkDefinitionLord.getSearchPattern();
-      Matcher matcher = combinedSearchPattern.matcher( text );
-
-      int index = 0;
-
-      boolean foundAMatch = matcher.find( index );
-      while( foundAMatch )
-      {
-         // Retrieve matching string
-         String matchedText = matcher.group();
-
-         // Retrieve indices of matching string
-         int start = matcher.start();
-         int end = matcher.end();
-
-         int nextStarting = start;
-
-         //now that we have a match, we have to find the one FileLinkDefinition that actually matches so it
-         //can determine the actual file. This makes the matcher more plugable.
-         FileLinkDefinition fileLinkDefinition = fileLinkDefinitionLord.getMatchingFileLinkDefinition( matchedText );
-         if( fileLinkDefinition != null )
-         {
-            nextStarting = fileLinkDefinition.parseFileLink( text, matchedText, start, end, verifyFileExists, fileLinks );
-         }
-         else
-         {
-            //this is probably a serious problem that needs to be reported. However, we'll continue as if nothing bad happened.
-            System.out.println( "We found a match but didn't find the matching definition. Matched text:\n" + text );
-         }
-
-         if( nextStarting == -1 || nextStarting < start )
-         {
-            nextStarting = start;
-         }
-
-         index = nextStarting + 1;
-         if( index < text.length() )
-         {
-            foundAMatch = matcher.find( index );
-         }
-         else
-         {
-            foundAMatch = false; //don't continue searching if we've found the end
-         }
-      }
-
-      return fileLinks;
-   }
-}
-
-
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/ExtensionFileLinkDefinition.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/ExtensionFileLinkDefinition.java
deleted file mode 100644
index 5f11229..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/ExtensionFileLinkDefinition.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output.definitions;
-
-import org.gradle.foundation.output.FileLink;
-
-import java.io.File;
-import java.util.List;
-
-/**
- This is a basic FileLinkDefinition that uses a file's extension and assumes the file is at the beginning of the line.
- This also allows you to specify an optional line number delimiter. This handles a delimiter after the path to specify a
- line number (the delimiter cannot be before the path).
-
- Here's a sample line output from a compile error:
-       /home/someguy/path/etc/etc.java:186: cannot find symbol
-
- @author mhunsicker
- */
-public class ExtensionFileLinkDefinition implements FileLinkDefinition
-{
-   private String expression;
-   private String lineNumberDelimiter;
-   private String extension;
-   private String name;
-
-   public ExtensionFileLinkDefinition( String name, String extension )
-   {
-      this( name, extension, null );
-   }
-
-   public ExtensionFileLinkDefinition( String name, String extension, String lineNumberDelimiter )
-   {
-      this.name = name;
-      this.lineNumberDelimiter = lineNumberDelimiter;
-      this.extension = extension;
-
-      this.expression = ".*\\" + extension;  //the ending slashes here are to escape the dot on the extension
-
-      if( lineNumberDelimiter != null )
-      {
-         this.expression += generateLineNumberExpression( lineNumberDelimiter );
-      }
-   }
-
-   public String getName() { return name; }
-
-   protected String generateLineNumberExpression( String lineNumberDelimiter )
-   {
-      //there may be a space before the delimiter so we quote the delimiter, possible space,
-      //followed by numbers
-      return PrefixedFileLinkDefinition.quoteLiteral( lineNumberDelimiter ) + "\\s*\\d*";
-   }
-
-   public String getSearchExpression()
-   {
-      return expression;
-   }
-
-   /**
-      This is called for each match. Parse this to turn it into a FileLink.
-
-      <!      Name        Description>
-    @param  fullSearchTest the full text that was searched
-    @param  matchedText the text that was matched
-    @param  start       the index into the entire searched text where the matchedText starts
-    @param  end         the index into the entire searched text where the matchedText ends
-    @param fileLinks
-      @return a FileLink or null if this is a false positive
-   */
-   public int parseFileLink( String fullSearchTest, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks )
-   {
-      int extensionIndex = lastIndexOfCaseInsensitive( matchedText, extension );
-      if( extensionIndex == -1 ) //this shouldn't happen unless the extension is not included
-      {
-         return -1;
-      }
-
-      int prefixIndex = getStartOfFile( matchedText );   //we don't want to jst assume its the very first character. It probably is, but it might have spaces in front of it. This ensures the UI doesn't underline a space.
-      int realPathEnd = extensionIndex + extension.length();
-      String path = matchedText.substring( prefixIndex, realPathEnd ).trim();
-
-      File file = new File( path );
-      if( verifyFileExists && !file.exists() )  //so we can optionally disable this for testing.
-      {
-         return -1;
-      }
-
-      String remainder = matchedText.substring( realPathEnd );
-      int lineNumber = PrefixedFileLinkDefinition.getLineNumber( remainder, lineNumberDelimiter );
-
-      fileLinks.add( new FileLink( file, start + prefixIndex, end, lineNumber, this ) );
-      return end;
-   }
-
-   public static int lastIndexOfCaseInsensitive( String sourceText, String alreadyLowerCaseSoughtText )
-   {
-       sourceText = sourceText.toLowerCase();
-       return sourceText.lastIndexOf( alreadyLowerCaseSoughtText );
-   }
-
-   /**
-    This returns the index character that is the start of the file path. Basically, this skips over
-    whitespace that may be between the prefix and the path.
-    @param matchedText the text that was matched
-    @return the index of the start of the file
-    */
-   private int getStartOfFile( String matchedText )
-   {
-      int index = 0;
-      while( Character.isWhitespace( matchedText.charAt( index ) ) )
-      {
-         index++;
-      }
-
-      return index;
-   }
-
-   @Override
-   public String toString()
-   {
-      return "Name: '" + name + "'" +
-            " Expression ='" + expression + '\'' +
-            " LineNumberDelimter='" + lineNumberDelimiter + '\'' +
-            " Extension='" + extension + '\'';
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/FileLinkDefinition.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/FileLinkDefinition.java
deleted file mode 100644
index cd7fb09..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/FileLinkDefinition.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output.definitions;
-
-import org.gradle.foundation.output.FileLink;
-
-import java.util.List;
-
-/**
-
- .
-
- @author mhunsicker
- */
-public interface FileLinkDefinition
-{
-   /**
-    @return a name that really only useful for debugging
-    */
-   String getName();
-
-   /**
-      @return the regular expression used to find a potential FileLink
-   */
-   String getSearchExpression();
-
-   /**
-      This is called for each match. Parse this to turn it into a FileLink.
-
-      <!    Name        Description>
-    @param  fullSearchText the full text that was searched
-    @param  matchedText the text that was matched
-    @param  start       the index into the entire searched text where the matchedText starts
-    @param  end         the index into the entire searched text where the matchedText ends
-    @param fileLinks
-      @return a FileLink or null if this is a false positive
-   */
-   int parseFileLink( String fullSearchText, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks );
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/OptionalLineNumberFileLinkDefinition.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/OptionalLineNumberFileLinkDefinition.java
deleted file mode 100644
index d394c0a..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/OptionalLineNumberFileLinkDefinition.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output.definitions;
-
-/**
- This is just like BasicFileLinkDefinition except that the line number delimiter is optional and
- it allows spaces between the file and the delimiter.
-
- @author mhunsicker
- */
-public class OptionalLineNumberFileLinkDefinition extends PrefixedFileLinkDefinition
-{
-   public OptionalLineNumberFileLinkDefinition( String name, String prefix, String extension, String lineNumberDelimiter )
-   {
-      super( name, prefix, extension, lineNumberDelimiter );
-   }
-
-   /**
-    This has been overridden to optionally look for a line number delimiter.
-    */
-   @Override
-   protected String generateLineNumberExpression( String lineNumberDelimiter )
-   {
-      return "(.*" + quoteLiteral( lineNumberDelimiter ) + ".*\\d*)?";
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/PrefixedFileLinkDefinition.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/PrefixedFileLinkDefinition.java
deleted file mode 100644
index fcbc7a6..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/PrefixedFileLinkDefinition.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output.definitions;
-
-import org.gradle.foundation.output.FileLink;
-
-import java.io.File;
-import java.util.List;
-
-/**
- This is a basic FileLinkDefinition that uses a prefix, file extension to identify files. This also allows you to
- specify an optional line number delimiter. This will handle files where the error always has a specific prefix
- ([ant:javac]) and always has a known extension (.java). It also handles a delimiter after the path to specify a
- line number (the delimiter cannot be before the path).
-
- Here's a sample line output from an ant compile error:
-       [ant:javac] /home/someguy/path/etc/etc.java:186: cannot find symbol
-
- Here's a sample line output from gradle when it encounters an exception:
-       Build file '/home/someguy/path/etc/etc/build.gradle'
-
- @author mhunsicker
- */
-public class PrefixedFileLinkDefinition implements FileLinkDefinition
-{
-   private String expression;
-   private String prefix;
-   private String lineNumberDelimiter;
-   private String extension;
-   private String name;
-
-   public PrefixedFileLinkDefinition( String name, String prefix, String extension )
-   {
-      this( name, prefix, extension, null );
-   }
-
-   /**
-    @param name  the name of this file link definition. Used by tests mostly.
-    @param prefix  the text that is before the file path. It should be enough to make it fairly unique
-    @param extension  the expected file extension. If we don't find this extension, we do not consider
-            the text a file's path. If there are multiple extensions, you'll have to add multiples of these.
-    @param lineNumberDelimiter optional delimiter text for line number. Whatever is after
-            this will be assumed to be a line number. We'll only parse the numbers after
-            this so there can be other stuff after the line number. Pass in null to ignore.
-    */
-   public PrefixedFileLinkDefinition( String name, String prefix, String extension, String lineNumberDelimiter )
-   {
-      this.name = name;
-      this.prefix = prefix;
-      this.lineNumberDelimiter = lineNumberDelimiter;
-      this.extension = extension;
-
-      String regExLiteralPrefix = quoteLiteral( prefix );
-      this.expression = regExLiteralPrefix + ".*\\" + extension;  //the ending slashes here are to escape the dot on the extension
-
-      if( lineNumberDelimiter != null )
-      {
-         this.expression += generateLineNumberExpression( lineNumberDelimiter );
-      }
-   }
-
-   public String getName() { return name; }
-
-   protected String generateLineNumberExpression( String lineNumberDelimiter )
-   {
-      return quoteLiteral( lineNumberDelimiter ) + "\\d*";
-   }
-
-   //This quotes the literal so it can be used in a regex without worrying about
-   //manually escaping any special characters. This does what Matcher.quoteReplacement()
-   //should do (but that seems to only handle $ and ").
-   public static String quoteLiteral( String literal )
-   {
-      StringBuilder builder = new StringBuilder();
-
-      for( int index = 0; index < literal.length(); index++ )
-      {
-         char c = literal.charAt( index );
-         if( isEscapedCharater( c ) )
-         {
-            builder.append( '\\' ).append( c );
-         }
-         else
-         {
-            builder.append( c );
-         }
-      }
-
-      return builder.toString();
-   }
-
-   private static boolean isEscapedCharater( char c )
-   {
-      return c == '[' ||
-             c == ']' ||
-             c == '(' ||
-             c == ')' ||
-             c == '{' ||
-             c == '}' ||
-             c == '\\' ||
-             c == '"' ||
-             c == '$' ||
-             c == '&' ||
-             c == '|' ||
-             c == '^' ||
-             c == '?' ||
-             c == '*' ||
-             c == '.';
-   }
-
-   public String getSearchExpression()
-   {
-      return expression;
-   }
-
-   /**
-      This is called for each match. Parse this to turn it into a FileLink.
-
-      <!      Name        Description>
-    @param  fullSearchTest the full text that was searched
-    @param  matchedText the text that was matched
-    @param  start       the index into the entire searched text where the matchedText starts
-    @param  end         the index into the entire searched text where the matchedText ends
-    @param fileLinks
-      @return a FileLink or null if this is a false positive
-   */
-   public int parseFileLink( String fullSearchTest, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks )
-   {
-      int extensionIndex = matchedText.lastIndexOf( extension );
-      if( extensionIndex == -1 ) //this shouldn't happen unless the extension is not included
-      {
-         return -1;
-      }
-
-      int prefixIndex = getStartOfFile( matchedText );
-      int realPathEnd = extensionIndex + extension.length();
-      String path = matchedText.substring( prefixIndex, realPathEnd ).trim();
-
-      File file = new File( path );
-      if( verifyFileExists && !file.exists() )  //so we can optionally disable this for testing.
-      {
-         return -1;
-      }
-
-      String remainder = matchedText.substring( realPathEnd );
-      int lineNumber = getLineNumber( remainder, lineNumberDelimiter );
-
-      fileLinks.add( new FileLink( file, start + prefixIndex, end, lineNumber, this ) );
-      return end;
-   }
-
-   /**
-    This returns the index character that is the start of the file path. Basically, this skips over
-    whitespace that may be between the prefix and the path.
-    @param matchedText the text that was matched
-    @return the index of the start of the file
-    */
-   private int getStartOfFile( String matchedText )
-   {
-      int index = prefix.length();
-      while( Character.isWhitespace( matchedText.charAt( index ) ) )
-      {
-         index++;
-      }
-
-      return index;
-   }
-
-   public static int getLineNumber( String textAfterPath, String lineNumberDelimiter )
-   {
-      if( lineNumberDelimiter != null )
-      {
-         int lineDelimterIndex = textAfterPath.indexOf( lineNumberDelimiter );
-         if( lineDelimterIndex != -1 )
-         {
-            String lineNumberText = textAfterPath.substring( lineDelimterIndex + lineNumberDelimiter.length() );
-
-            lineNumberText = lineNumberText.trim();
-            lineNumberText = getConsecutiveNumbers( lineNumberText );
-            if( !"".equals( lineNumberText ) ) {
-               return Integer.parseInt( lineNumberText );
-            }
-         }
-      }
-
-      return -1;
-   }
-
-   /**
-    This returns the first grouping of consecutive numbers. This is used to extract line numbers from a line
-    that may have additional things immediately after the number. This assumes the first character is already
-    a number. If it is not, you'll get a blank string being returned.
-    @param text the text to search
-    @return a string consisting of only numbers.
-    */
-   public static String getConsecutiveNumbers( String text )
-   {
-      StringBuilder numbersOnly = new StringBuilder();
-
-      boolean keepLooking = true;
-      int index = 0;
-      while( keepLooking && index < text.length() )
-      {
-         char c = text.charAt( index );
-         if( Character.isDigit( c ) )
-         {
-            numbersOnly.append( c );
-         }
-         else
-         {
-            keepLooking = false;
-         }
-         index++;
-      }
-
-      return numbersOnly.toString();
-   }
-   
-   @Override
-   public String toString()
-   {
-      return "Name: '" + name + "'" +
-            " Expression ='" + expression + '\'' +
-            " Prefix='" + prefix + '\'' +
-            " LineNumberDelimter='" + lineNumberDelimiter + '\'' +
-            " Extension='" + extension + '\'';
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/TestReportFileLinkDefinition.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/TestReportFileLinkDefinition.java
deleted file mode 100644
index 4bc48b7..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/output/definitions/TestReportFileLinkDefinition.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.output.definitions;
-
-import org.gradle.foundation.output.FileLink;
-
-import java.io.File;
-import java.util.List;
-
-/**
- This is a special FileLinkDefinition for handling test reports. At the time of this writing,
- the test reports error message merely told you the directory to visit, not the actual file.
- So this appends 'index.html' to the directory to generate the file.
-
- @author mhunsicker
-*/
-public class TestReportFileLinkDefinition implements FileLinkDefinition
-{
-   private String expression;
-   private String prefix;
-
-   public TestReportFileLinkDefinition()
-   {
-      prefix = "There were failing tests. See the report at ";
-      expression = prefix + ".*";
-   }
-
-   public String getSearchExpression()
-   {
-      return expression;
-   }
-
-   /**
-      This is called for each match. Parse this to turn it into a FileLink.
-      We're actually looking for a sentence, so we find the period, then get
-      whatever's between it and our prefix, then we have our directory. 
-
-      <!      Name        Description>
-    @param  fullSearchTest the full text that was searched
-    @param  matchedText the text that was matched
-    @param  start       the index into the entire searched text where the matchedText starts
-    @param  end         the index into the entire searched text where the matchedText ends
-    @param fileLinks
-      @return a FileLink or null if this is a false positive
-   */
-   public int parseFileLink( String fullSearchTest, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks )
-   {
-      int indexOfPeriod = matchedText.lastIndexOf( '.' );   //the path ends with a dot
-      if( indexOfPeriod == -1 )
-      {
-         return -1;
-      }
-
-      String path = matchedText.substring( prefix.length(), indexOfPeriod ).trim();
-      File directory = new File( path );
-      if( verifyFileExists && !directory.exists() )
-      {
-         return -1;
-      }
-
-      File file = new File( directory, "index.html" );
-      if( verifyFileExists && !file.exists() )
-      {
-         return -1;
-      }
-
-      fileLinks.add( new FileLink( file, start + prefix.length(), end, -1, this ) );
-      return end;
-   }
-
-   @Override
-   public String toString()
-   {
-      return getName();
-   }
-
-   public String getName()
-   {
-      return "TestReportFileLinkDefinition";
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/queue/ExecutionQueue.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/queue/ExecutionQueue.java
deleted file mode 100644
index 85fbcdf..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/queue/ExecutionQueue.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.queue;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * This class abstracts running multiple tasks consecutively. This exists because I'm not certain that Gradle is
- * thread-safe and on Windows, running tasks that require lots of disk I/O get considerably slower when run
- * concurrently. This will allow requests to be made and they will run as soon as any previous requests have finished.
- *
- * @author mhunsicker
- */
-public class ExecutionQueue<R extends ExecutionQueue.Request> {
-    private final Logger logger = Logging.getLogger(ExecutionQueue.class);
-    private volatile LinkedBlockingQueue<R> requests = new LinkedBlockingQueue<R>();
-
-    private Thread executionThread;
-
-    /**
-     * This removes the complexities of managing queued up requests across threads. Implement this to define what to do
-     * when a request is made.
-    */
-    public interface ExecutionInteraction<R> {
-        /**
-        * When this is called, execute the given request.
-        *
-        * @param  request    the request to execute.
-        */
-        void execute(R request);
-    }
-
-    /**
-    * Marker interface for a request. It contains the command line to execute and some other information.
-    */
-    public interface Request {
-
-
-      /**
-       Marker interface for types. This defines a high-level category of this request (Refresh and Execution are the only types at the moment).
-       */
-      public interface Type {}
-
-      /**
-       @return the type of request.
-       */
-      public Type getType();
-    }
-
-    public ExecutionQueue(ExecutionInteraction<R> executeInteraction) {
-        executionThread = new Thread(new ExecutionThread(executeInteraction));
-
-        //This seems to solve some classloader issues. Actually, I did this in the SwingWorker thread when refreshing the tasks
-        //and it cleared up SOME problems, so I'm doing it here as well.
-        executionThread.setContextClassLoader(getClass().getClassLoader());
-        executionThread.start();
-    }
-
-    /**
-     * Call this to add a task to the execution queue. It will be executed as soon as the current task has completed.
-    *
-    * @param  request      the requested task
-    */
-    public void addRequestToQueue(R request) {
-        requests.offer(request);
-    }
-
-    public boolean removeRequestFromQueue(R request) {
-        return requests.remove(request);
-    }
-
-    public boolean hasRequests() {
-       return !requests.isEmpty();
-    }
-
-    public List<R> getRequests() {
-       return new ArrayList<R>( requests );
-    }
-
-    /**
-    * This waits until the next request is available.
-    * @return the next request.
-    */
-    private R getNextAvailableRequest() {
-        try {
-            return requests.take();
-        }
-        catch (InterruptedException e) {
-            logger.error("Getting next available request", e);
-            return null;
-        }
-    }
-
-    /**
-     * This thread actually launches the gradle commands. It waits until a new request is added, then it executes it.
-    */
-    private class ExecutionThread implements Runnable {
-        private ExecutionInteraction<R> executeInteraction;
-
-        private ExecutionThread(ExecutionInteraction<R> executeInteraction) {
-            this.executeInteraction = executeInteraction;
-        }
-
-        public void run() {
-            while (true) {
-                R request = getNextAvailableRequest();
-                if (request != null) {
-                    executeInteraction.execute(request);
-                }
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/AllProjectsAndTasksVisitor.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/AllProjectsAndTasksVisitor.java
deleted file mode 100644
index 511150f..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/AllProjectsAndTasksVisitor.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.visitors;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.gradleplugin.foundation.filters.AllowAllProjectAndTaskFilter;
-import org.gradle.gradleplugin.foundation.filters.ProjectAndTaskFilter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This visits all projects and their subprojects and tasks in a hierarchal manner. Useful if you need to do some
- * processing with each one.
- *
- * @author mhunsicker
- */
-public class AllProjectsAndTasksVisitor {
-    /*
-          Visitor allowing you to do whatever you like with a project or task.
-       @author mhunsicker
-    */
-
-    public interface Visitor<P, T> {
-        /*
-           This is called for each project.
-         @param  project    the project
-         @param  parentProjectObject whatever you handed back from a prior call to
-            visitProject if this is a sub project. Otherwise, it'll be whatever
-            was passed into the visitPojectsAndTasks function.
-           @return an object that will be handed back to you for each of this
-                   project's tasks.
-           @author mhunsicker
-        */
-
-        public P visitProject(ProjectView project, P parentProjectObject);
-
-        /*
-           This is called for each task.
-
-         @param  task               the task
-         @param  tasksProject       the project for this task
-         @param  userProjectObject  whatever you returned from the parent project's visitProject
-           @author mhunsicker
-        */
-
-        public T visitTask(TaskView task, ProjectView tasksProject, P userProjectObject);
-    }
-
-    /*
-       This visitor will visit each project, sub-project and task that was discovered
-       by the GradleHelper. This is useful for building a list or tree of
-       projects and tasks.
-
-       This is the same as the other version of visitProjectsAndTasks except this
-       one visits everything.
-
-       @author mhunsicker
-    */
-
-    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor,
-                                                   P rootProjectObject) {
-        visitProjectAndTasks(projects, visitor, new AllowAllProjectAndTaskFilter(), rootProjectObject);
-    }
-
-    /*
-       This visitor will visit each project, sub-project and task that was discovered
-       by the GradleHelper. This is useful for building a list or tree of
-       projects and tasks.
-
-       @param  visitor    this notified you of each project and task.
-       @param  filter     allows you to skip projects and tasks as specified by the filter.
-       @param  rootProjectObject whatever you pass here will be passed to the
-                root-level projects as parentProjectObject.
-       @author mhunsicker
-    */
-
-    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor,
-                                                   ProjectAndTaskFilter filter, P rootProjectObject) {
-        visitProjects(visitor, filter, projects, rootProjectObject);
-    }
-
-    public static <P, T> List<P> visitProjects(Visitor<P, T> visitor, ProjectAndTaskFilter filter,
-                                               List<ProjectView> projects, P parentProjectObject) {
-        List<P> projectObjects = new ArrayList<P>();
-
-        Iterator<ProjectView> iterator = projects.iterator();
-        while (iterator.hasNext()) {
-            ProjectView project = iterator.next();
-
-            if (filter.doesAllowProject(project)) {
-                P userProjectObject = visitor.visitProject(project, parentProjectObject);
-                projectObjects.add(userProjectObject);
-
-                //visit sub projects
-                visitProjects(visitor, filter, project.getSubProjects(), userProjectObject);
-
-                //visit tasks
-                visitTasks(visitor, filter, project, userProjectObject);
-            }
-        }
-
-        return projectObjects;
-    }
-
-    /*
-       Add the list of tasks to the parent tree node.
-
-       @author mhunsicker
-    */
-
-    private static <P, T> List<T> visitTasks(Visitor<P, T> visitor, ProjectAndTaskFilter filter, ProjectView project,
-                                             P userProjectObject) {
-        List<T> taskObjects = new ArrayList<T>();
-        Iterator<TaskView> iterator = project.getTasks().iterator();
-        while (iterator.hasNext()) {
-            TaskView task = iterator.next();
-
-            if (filter.doesAllowTask(task)) {
-                T taskObject = visitor.visitTask(task, project, userProjectObject);
-                taskObjects.add(taskObject);
-            }
-        }
-
-        return taskObjects;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/TaskTreePopulationVisitor.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/TaskTreePopulationVisitor.java
deleted file mode 100644
index 9854b56..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/TaskTreePopulationVisitor.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.visitors;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.gradleplugin.foundation.filters.AllowAllProjectAndTaskFilter;
-import org.gradle.gradleplugin.foundation.filters.ProjectAndTaskFilter;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This visits each project and task in a hierarchical manner. This visitor is specifically meant to walk the projects
- * first and tasks second for the purpose of populating a tree where the projects/subprojects are first and the tasks
- * are second.
- *
- * @author mhunsicker
- */
-public class TaskTreePopulationVisitor {
-    public interface Visitor<P, T> {
-        /*
-           This is called for each project.
-         @param  project    the project
-         @param indexOfProject
-         @param  parentProjectObject whatever you handed back from a prior call to
-                 visitProject if this is a sub project. Otherwise, it'll be whatever
-                 was passed into the visitPojectsAndTasks function.
-           @return an object that will be handed back to you for each of this
-                   project's tasks.
-           @author mhunsicker
-        */
-
-        public P visitProject(ProjectView project, int indexOfProject, P parentProjectObject);
-
-        /*
-           This is called for each task.
-
-         @param  task               the task
-         @param indexOfTask
-         @param  tasksProject       the project for this task
-         @param  userProjectObject  whatever you returned from the parent project's visitProject
-           @author mhunsicker
-        */
-
-        public T visitTask(TaskView task, int indexOfTask, ProjectView tasksProject, P userProjectObject);
-
-        /*
-           This is called when a project has been visited completely and is just a
-           notification giving you an opportunity to do whatever you like.
-           This is possibly where you want to delete any nodes that we didn't
-           visit.
-
-           @param  parentProjectObject the object that represents the parent of
-                                       the project and task objects below
-           @param  projectObjects      a list of whatever you returned from visitProject
-           @param  taskObjects         a list of whatever you returned from visitTask
-           @author mhunsicker
-        */
-
-        public void completedVisitingProject(P parentProjectObject, List<P> projectObjects, List<T> taskObjects);
-    }
-
-    /*
-       This visitor will visit each project, sub-project and task that was discovered
-       by the GradleHelper. This is useful for building a list or tree of
-       projects and tasks.
-
-       This is the same as the other version of visitProjectsAndTasks except this
-       one visits everything.
-
-       @author mhunsicker
-    */
-
-    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor,
-                                                   P rootProjectObject) {
-        visitProjectAndTasks(projects, visitor, new AllowAllProjectAndTaskFilter(), rootProjectObject);
-    }
-
-    /*
-       This visitor will visit each project, sub-project and task that was discovered
-       by the GradleHelper. This is useful for building a list or tree of
-       projects and tasks.
-
-       @param  visitor    this notified you of each project and task.
-       @param  filter     allows you to skip projects and tasks as specified by the filter.
-       @param  rootProjectObject whatever you pass here will be passed to the
-                root-level projects as parentProjectObject.
-       @author mhunsicker
-    */
-
-    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor,
-                                                   ProjectAndTaskFilter filter, P rootProjectObject) {
-        List<P> userProjectObjects = visitProjects(visitor, filter, projects, rootProjectObject);
-
-        //notify the visitation of the root projects. There are no tasks for this one, but there are projects.
-        visitor.completedVisitingProject(rootProjectObject, userProjectObjects, Collections.EMPTY_LIST);
-    }
-
-    private static <P, T> List<P> visitProjects(Visitor<P, T> visitor, ProjectAndTaskFilter filter,
-                                                List<ProjectView> projects, P parentProjectObject) {
-        List<P> projectObjects = new ArrayList<P>();
-
-        Iterator<ProjectView> iterator = projects.iterator();
-        int index = 0;
-        while (iterator.hasNext()) {
-            ProjectView project = iterator.next();
-
-            if (filter.doesAllowProject(project)) {
-                P userProjectObject = visitor.visitProject(project, index, parentProjectObject);
-                projectObjects.add(userProjectObject);
-
-                //visit sub projects
-                List<P> subProjectObjects = visitProjects(visitor, filter, project.getSubProjects(), userProjectObject);
-
-                //visit tasks. Notice that we pass in the number of subprojects as a starting index. This is so they'll come afterwards.
-                List<T> taskObjects = visitTasks(visitor, filter, project, subProjectObjects.size(), userProjectObject);
-
-                visitor.completedVisitingProject(userProjectObject, subProjectObjects, taskObjects);
-            }
-            index++;
-        }
-
-        return projectObjects;
-    }
-
-    /*
-       Add the list of tasks to the parent tree node.
-
-       @author mhunsicker
-    */
-
-    private static <P, T> List<T> visitTasks(Visitor<P, T> visitor, ProjectAndTaskFilter filter, ProjectView project,
-                                             int startingIndex, P userProjectObject) {
-        List<T> taskObjects = new ArrayList<T>();
-        Iterator<TaskView> iterator = project.getTasks().iterator();
-        int index = startingIndex;
-        while (iterator.hasNext()) {
-            TaskView task = iterator.next();
-
-            if (filter.doesAllowTask(task)) {
-                T taskObject = visitor.visitTask(task, index, project, userProjectObject);
-                taskObjects.add(taskObject);
-            }
-            index++;
-        }
-
-        return taskObjects;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/UniqueNameProjectAndTaskVisitor.java b/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/UniqueNameProjectAndTaskVisitor.java
deleted file mode 100644
index 44270b0..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/visitors/UniqueNameProjectAndTaskVisitor.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation.visitors;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-
-/**
- * This visitor builds up a list of unqiuely named projects and tasks. The projects will be their full path, so they're
- * all unique.
- *
- * @author mhunsicker
- */
-public class UniqueNameProjectAndTaskVisitor implements AllProjectsAndTasksVisitor.Visitor<Object, Object> {
-    private List<String> taskNames = new ArrayList<String>();
-    private List<String> projectNames = new ArrayList<String>();
-
-    public List<String> getTaskNames() {
-        return taskNames;
-    }
-
-    public List<String> getProjectNames() {
-        return projectNames;
-    }
-
-    public List<String> getSortedTaskNames() {
-        ArrayList<String> tasks = new ArrayList<String>(taskNames);
-        Collections.sort(tasks);
-        return tasks;
-    }
-
-    public List<String> getSortedProjectNames() {
-        ArrayList<String> projects = new ArrayList<String>(projectNames);
-        Collections.sort(projects);
-        return projects;
-    }
-
-    /*
-    This is called for each project.
-    @param project             the project
-    @param parentProjectObject whatever you handed back from a prior call to
-                               visitProject if this is a sub project. Otherwise,
-                               it'll be whatever was passed into the
-                               visitPojectsAndTasks function.
-    @return always null
-    @author mhunsicker
-    */
-
-    public Object visitProject(ProjectView project, Object parentProjectObject) {
-        String name = project.getFullProjectName();
-        if (!projectNames.contains(name)) {
-            projectNames.add(name);
-        }
-
-        return null;
-    }
-
-    /*
-    This is called for each task.
-    @param task              the task
-    @param tasksProject      the project for this task
-    @param userProjectObject always null.
-    @author mhunsicker
-    */
-
-    public Object visitTask(TaskView task, ProjectView tasksProject, Object userProjectObject) {
-        String name = task.getName();
-        if (!taskNames.contains(name)) {
-            taskNames.add(name);
-        }
-
-        return null;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/CommandLineArgumentAlteringListener.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/CommandLineArgumentAlteringListener.java
deleted file mode 100644
index 1b070c8..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/CommandLineArgumentAlteringListener.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation;
-
-/**
- * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is
- * useful if you've customized your gradle build and need to specify, for example, an init script.
- *
- * @author mhunsicker
- */
-public interface CommandLineArgumentAlteringListener {
-    /**
-     * This is called when you can add additional command line arguments. Return any additional arguments to add. This
-     * doesn't modify the existing commands.
-     *
-     * @return any command lines to add or null to leave it alone
-     */
-    public String getAdditionalCommandLineArguments(String commandLineArguments);
-}
-
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/DOM4JSerializer.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/DOM4JSerializer.java
deleted file mode 100644
index 1da21c7..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/DOM4JSerializer.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation;
-
-import org.dom4j.Document;
-import org.dom4j.DocumentHelper;
-import org.dom4j.Element;
-import org.dom4j.io.OutputFormat;
-import org.dom4j.io.SAXReader;
-import org.dom4j.io.XMLWriter;
-import org.gradle.gradleplugin.foundation.settings.DOM4JSettingsNode;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-
-import javax.swing.filechooser.FileFilter;
-import java.io.Closeable;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-/**
- * This saves and reads thing to and from DOM structures.
- *
- * @author mhunsicker
- */
-public class DOM4JSerializer {
-    private static final Logger LOGGER = Logging.getLogger(DOM4JSerializer.class);
-
-    /**
-     * Implement this when you export a file. This allows to interactively ask the user (or automated test) questions as
-     * we need answers.
-     */
-    public interface ExportInteraction {
-        /**
-         * This is called when you should ask the user for a destination file of a save.
-         *
-         * @param fileFilter describes the allowed file type. Suitable for passing to JFileChooser.
-         * @return a file to save to or null to cancel.
-         */
-        public File promptForFile(FileFilter fileFilter);
-
-        /**
-         * Report an error that occurred. The save failed.
-         *
-         * @param error the error message.
-         */
-        public void reportError(String error);
-
-        /**
-         * The file already exists. Confirm whether or not you want to overwrite it.
-         *
-         * @param file the file in question
-         * @return true to overwrite it, false not to.
-         */
-        boolean confirmOverwritingExisingFile(File file);
-    }
-
-    /**
-     * Call this to save the JDOMSerializable to a file. This handles confirming overwriting an existing file as well as
-     * ensuring the extension is correct based on the passed in fileFilter.
-     */
-    public static void exportToFile(String rootElementTag, ExportInteraction exportInteraction,
-                                    ExtensionFileFilter fileFilter, SettingsSerializable... serializables) {
-        File file = promptForFile(exportInteraction, fileFilter);
-        if (file == null)   //the user canceled.
-        {
-            return;
-        }
-
-        FileOutputStream fileOutputStream = null;
-        try {
-            fileOutputStream = new FileOutputStream(file);
-        } catch (FileNotFoundException e) {
-            LOGGER.error("Could not write to file: " + file.getAbsolutePath(), e);
-            exportInteraction.reportError("Could not write to file: " + file.getAbsolutePath());
-            return;
-        }
-
-        try {
-            XMLWriter xmlWriter = new XMLWriter(fileOutputStream, OutputFormat.createPrettyPrint());
-
-            Document document = DocumentHelper.createDocument();
-            Element rootElement = document.addElement(rootElementTag);
-            DOM4JSettingsNode settingsNode = new DOM4JSettingsNode(rootElement);
-            for (int index = 0; index < serializables.length; index++) {
-                SettingsSerializable serializable = serializables[index];
-                try {  //don't let a single serializer stop the entire thing from being written in.
-                    serializable.serializeOut(settingsNode);
-                } catch (Exception e) {
-                    LOGGER.error("serializing", e);
-                }
-            }
-            xmlWriter.write(document);
-        } catch (Throwable t) {
-            LOGGER.error("Failed to save", t);
-            exportInteraction.reportError("Internal error. Failed to save.");
-        } finally {
-            closeQuietly(fileOutputStream);
-        }
-    }
-
-    public static void exportToFile(ExportInteraction exportInteraction, ExtensionFileFilter fileFilter,
-                                    DOM4JSettingsNode settingsNode) {
-        File file = promptForFile(exportInteraction, fileFilter);
-        if (file == null)   //the user canceled.
-        {
-            return;
-        }
-
-        FileOutputStream fileOutputStream = null;
-        try {
-            fileOutputStream = new FileOutputStream(file);
-        } catch (FileNotFoundException e) {
-            LOGGER.error("Could not write to file: " + file.getAbsolutePath(), e);
-            exportInteraction.reportError("Could not write to file: " + file.getAbsolutePath());
-            return;
-        }
-
-        try {
-            XMLWriter xmlWriter = new XMLWriter(fileOutputStream, OutputFormat.createPrettyPrint());
-            Element rootElement = settingsNode.getElement();
-            rootElement.detach();
-
-            Document document = DocumentHelper.createDocument(rootElement);
-
-            xmlWriter.write(document);
-        } catch (Throwable t) {
-            LOGGER.error("Internal error. Failed to save.", t);
-            exportInteraction.reportError("Internal error. Failed to save.");
-        } finally {
-            closeQuietly(fileOutputStream);
-        }
-    }
-
-    /**
-     * This prompts the user for a file. It may exist, so we have to confirm overwriting it. This will sit in a loop
-     * until the user cancels or gives us a valid file. This also makes sure the extension is correct.
-     */
-    private static File promptForFile(ExportInteraction exportInteraction, ExtensionFileFilter fileFilter) {
-        boolean promptAgain = false;
-        File file = null;
-        int counter = 0;
-        do {
-            promptAgain = false;
-            file = exportInteraction.promptForFile(fileFilter);
-            if (file != null) {
-                file = ensureFileHasCorrectExtensionAndCase(file, fileFilter.getExtension());
-
-                if (file.exists()) {
-                    promptAgain = !exportInteraction.confirmOverwritingExisingFile(file);
-                }
-            }
-
-            counter++;
-        } while (promptAgain && counter
-                < 1000);   //the counter is just to make sure any tests that use this don't get stuck in an infinite loop (they may return the same thing from promptForFile).
-
-        return file;
-    }
-
-    //
-
-    /**
-     * Implement this when you import a file. This allows to interactively ask the user (or automated test) questions as
-     * we need answers.
-     */
-    public interface ImportInteraction {
-        /**
-         * This is called when you should ask the user for a source file to read.
-         *
-         * @return a file to read or null to cancel.
-         */
-        public File promptForFile(FileFilter fileFilters);
-
-        /**
-         * Report an error that occurred. The read failed.
-         *
-         * @param error the error message.
-         */
-        public void reportError(String error);
-    }
-
-    /**
-     * Call this to read the JDOMSerializable from a file.
-     */
-    public static boolean importFromFile(ImportInteraction importInteraction, FileFilter fileFilter,
-                                         SettingsSerializable... serializables) {
-        SettingsNode settings = readSettingsFile(importInteraction, fileFilter);
-        if (settings == null) {
-            return false;
-        }
-
-        for (int index = 0; index < serializables.length; index++) {
-            SettingsSerializable serializable = serializables[index];
-
-            try {  //don't let a single serializer stop the entire thing from being read in.
-                serializable.serializeIn(settings);
-            } catch (Exception e) {
-                LOGGER.error("importing file", e);
-            }
-        }
-
-        return true;
-    }
-
-    public static DOM4JSettingsNode readSettingsFile(ImportInteraction importInteraction, FileFilter fileFilter) {
-        File file = importInteraction.promptForFile(fileFilter);
-        if (file == null) {
-            return null;
-        }
-
-        if (!file.exists()) {
-            importInteraction.reportError("File does not exist: " + file.getAbsolutePath());
-            return null;  //we should really sit in a loop until they cancel or give us a valid file.
-        }
-
-        try {
-            SAXReader reader = new SAXReader();
-            Document document = reader.read(file);
-
-            return new DOM4JSettingsNode(document.getRootElement());
-        } catch (Throwable t) {
-            LOGGER.error("Unable to read file: " + file.getAbsolutePath(), t);
-            importInteraction.reportError("Unable to read file: " + file.getAbsolutePath());
-            return null;
-        }
-    }
-
-    private static void closeQuietly(Closeable closeable) {
-        try {
-            if (closeable != null) {
-                closeable.close();
-            }
-        } catch (IOException e) {
-            LOGGER.error("Closing", e);
-        }
-    }
-
-    /**
-     * A convenience function that ensures that the specified file does have a specific extension. You have to tell us
-     * that extension.
-     */
-    private static File ensureFileHasCorrectExtensionAndCase(File file, String requiredExtension) {
-        String name = file.getName();
-        if (!name.toLowerCase().endsWith(requiredExtension.toLowerCase())) {
-            return new File(file.getParentFile(), name + requiredExtension);
-        }
-
-        return file;   //it already ends with the correct extension.
-    }
-
-    public static DOM4JSettingsNode createBlankSettings() {
-        Document document = DocumentHelper.createDocument();
-        Element rootElement = document.addElement("root");
-        DOM4JSettingsNode settings = new DOM4JSettingsNode(rootElement);
-        return settings;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/Dom4JUtility.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/Dom4JUtility.java
deleted file mode 100644
index 851e8f6..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/Dom4JUtility.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation;
-
-import org.dom4j.Attribute;
-import org.dom4j.Element;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-
-/*
- Just some utility functions that really should be in Dom4J already.
-
- @author mhunsicker
-  */
-
-public class Dom4JUtility {
-    /**
-     * This returns the node that is a child of the specified parent that has the specified 'name' and an attribute with
-     * the specified value. This is similar to the below getChild, but this requires a specific tag name.
-     */
-    public static Element getChild(Element parent, String tagName, String attribute, String attributeValue) {
-        Element childElement = null;
-        Iterator iterator = parent.elements(tagName).iterator();
-        while (iterator.hasNext() && childElement == null) {
-            childElement = (Element) iterator.next();
-            String actualValue = childElement.attributeValue(attribute);
-            if (!attributeValue.equals(actualValue)) {
-                childElement = null;
-            }
-        }
-        return childElement;
-    }
-
-    public static List<Element> getChildren(Element parent, String tagName, String attribute, String attributeValue) {
-        List<Element> children = new ArrayList<Element>();
-
-        Iterator iterator = parent.elements(tagName).iterator();
-        while (iterator.hasNext()) {
-            Element childElement = (Element) iterator.next();
-            String actualValue = childElement.attributeValue(attribute);
-            if (attributeValue.equals(actualValue)) {
-                children.add(childElement);
-            }
-        }
-
-        return children;
-    }
-
-    /**
-     * Thie returns the node that is a child of hte specified parent that has the specified attribute with the specified
-     * value. This is similar to the above getChild, but no tag name is required.
-     */
-    public static Element getChild(Element parent, String attribute, String attributeValue) {
-        Element childElement = null;
-        Iterator iterator = parent.elements().iterator();
-        while (iterator.hasNext() && childElement == null) {
-            childElement = (Element) iterator.next();
-            String actualValue = childElement.attributeValue(attribute);
-            if (!attributeValue.equals(actualValue)) {
-                childElement = null;
-            }
-        }
-        return childElement;
-    }
-
-    /**
-     * Thie returns the node that is a child of hte specified parent that has the specified attribute with the specified
-     * value. This is similar to the above getChild, but no tag name is required.
-     */
-    public static List<Element> getChildren(Element parent, String attribute, String attributeValue) {
-        List<Element> children = new ArrayList<Element>();
-
-        Iterator iterator = parent.elements().iterator();
-        while (iterator.hasNext()) {
-            Element childElement = (Element) iterator.next();
-            String actualValue = childElement.attributeValue(attribute);
-            if (attributeValue.equals(actualValue)) {
-                children.add(childElement);
-            }
-        }
-
-        return children;
-    }
-
-    public static void setAttributeAsBoolean(Element element, String attribute, boolean value) {
-        if (value) {
-            element.addAttribute(attribute, "true");
-        } else {
-            element.addAttribute(attribute, "false");
-        }
-    }
-
-    public static boolean getAttributeAsBoolean(Element element, String attributeName, boolean defaultValue) {
-        Attribute attribute = element.attribute(attributeName);
-        if (attribute == null) {
-            return defaultValue;
-        }
-
-        return "true".equals(attribute.getValue());
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/ExtensionFileFilter.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/ExtensionFileFilter.java
deleted file mode 100644
index 16afd5c..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/ExtensionFileFilter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation;
-
-import javax.swing.filechooser.FileFilter;
-import java.io.File;
-
-/**
- * Man! Why doesn't this get put into java's standard library?! Well, they did, but it doesn't hide hidden files. By
- * definition of them being hidden, you probably don't want to see them. <p/> While FileFilter is technically a Swing
- * class, it shouldn't be. The foundation needs to drive what is allowed in the UI.
- *
- * @author mhunsicker
- */
-public class ExtensionFileFilter extends FileFilter {
-    private String extension;
-    private String description;
-
-    public ExtensionFileFilter(String extension, String description) {
-        this.extension = extension.toLowerCase();
-        this.description = description;
-    }
-
-    public boolean accept(File file) {
-        if (file.isHidden()) {
-            return false;
-        }
-
-        if (file.isDirectory()) {
-            return true;
-        }
-
-        return file.getName().toLowerCase().endsWith(extension);
-    }
-
-    public String getDescription() {
-        return description;
-    }
-
-    public String getExtension() {
-        return extension;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/GradlePluginLord.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/GradlePluginLord.java
deleted file mode 100644
index d800afc..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/GradlePluginLord.java
+++ /dev/null
@@ -1,745 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation;
-
-import org.codehaus.groovy.runtime.StackTraceUtils;
-import org.gradle.StartParameter;
-import org.gradle.api.LocationAwareException;
-import org.gradle.api.internal.DefaultClassPathProvider;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.configuration.ImplicitTasksConfigurer;
-import org.gradle.foundation.CommandLineAssistant;
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.foundation.common.ObserverLord;
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.queue.ExecutionQueue;
-import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.util.GUtil;
-
-import java.io.File;
-import java.util.*;
-import java.util.concurrent.LinkedBlockingQueue;
-
-/**
- * This class has nothing to do with plugins inside of gradle, but are related to making a plugin that uses gradle, such
- * as for an IDE. It is also used by the standalone IDE (that way the standalone UI and plugin UIs are kept in synch).
- * <p/> This is the class that stores most of the information that the Gradle plugin works directly with. It is meant to
- * simplify creating a plugin that uses gradle. It maintains a queue of commands to execute and executes them in a
- * separate process due to some complexities with gradle and its dependencies classpaths and potential memory issues.
- *
- * @author mhunsicker
- */
-public class GradlePluginLord {
-    private final Logger logger = Logging.getLogger(GradlePluginLord.class);
-
-    private File gradleHomeDirectory;   //the directory where gradle is installed
-    private File currentDirectory;      //the directory of your gradle-based project
-    private File customGradleExecutor;  //probably will be null. This allows a user to specify a different batch file or shell script to initiate gradle.
-
-    private List<ProjectView> projects = new ArrayList<ProjectView>();
-
-    private FavoritesEditor favoritesEditor;  //an editor for the current favorites. The user can edit this at any time, hence we're using an editor.
-
-    private ExecutionQueue<Request> executionQueue;
-    private LinkedBlockingQueue<Request> currentlyExecutingRequests = new LinkedBlockingQueue<Request>();
-
-    private boolean isStarted;  //this flag is mostly to prevent initialization from firing off repeated refresh requests.
-
-    private StartParameter.ShowStacktrace stackTraceLevel = StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
-    private LogLevel logLevel = LogLevel.LIFECYCLE;
-
-    private ObserverLord<GeneralPluginObserver> generalObserverLord = new ObserverLord<GeneralPluginObserver>();
-    private ObserverLord<RequestObserver> requestObserverLord = new ObserverLord<RequestObserver>();
-    private ObserverLord<SettingsObserver> settingsObserverLord = new ObserverLord<SettingsObserver>();
-
-    private ObserverLord<CommandLineArgumentAlteringListener> commandLineArgumentObserverLord = new ObserverLord<CommandLineArgumentAlteringListener>();
-
-    private long nextRequestID = 1;  //a unique number assigned to requests
-
-    public List<ProjectView> getProjects() {
-        return Collections.unmodifiableList(projects);
-    }
-
-   /**
-    * Sets the current projects. This is only supposed to be called by internal gradle classes.
-    * @param newProjects
-    */
-    public void setProjects(final List<ProjectView> newProjects) {
-        projects.clear();
-        if (newProjects != null) {
-           projects.addAll(newProjects);
-        }
-
-      generalObserverLord.notifyObservers(new ObserverLord.ObserverNotification<GeneralPluginObserver>() {
-            public void notify(GeneralPluginObserver observer) {
-                observer.projectsAndTasksReloaded(newProjects != null);
-            }
-        });
-    }
-
-   public interface GeneralPluginObserver {
-        /**
-        * Notification that we're about to reload the projects and tasks.
-        */
-        public void startingProjectsAndTasksReload();
-
-        /**
-         * Notification that the projects and tasks have been reloaded. You may want
-         * to repopulate or update your views.
-         * @param wasSuccessful true if they were successfully reloaded. False if an error occurred so we no longer can show the projects and tasks (probably an error in a .gradle file).
-        */
-        public void projectsAndTasksReloaded(boolean wasSuccessful);
-    }
-
-   public interface RequestObserver
-   {
-      public void executionRequestAdded( ExecutionRequest request );
-
-      public void refreshRequestAdded( RefreshTaskListRequest request );
-
-        /**
-         * Notification that a command is about to be executed. This is mostly useful
-         * for IDE's that may need to save their files.
-        */
-        public void aboutToExecuteRequest( Request request );
-
-      /**
-       * Notification that the command has completed execution.
-       * @param request the original request containing the command that was executed
-       * @param result the result of the command
-       * @param output the output from gradle executing the command
-       */
-      public void requestExecutionComplete( Request request, int result, String output );
-   }
-
-   public interface SettingsObserver {
-
-       /**
-        * Notification that some settings have changed for the plugin. Settings such as current directory, gradle home
-        * directory, etc. This is useful for UIs that need to update their UIs when this is changed by other means.
-        */
-       public void settingsChanged();
-   }
-
-
-
-    public GradlePluginLord() {
-        favoritesEditor = new FavoritesEditor();
-
-        //create the queue that executes the commands. The contents of this interaction are where we actually launch gradle.
-        executionQueue = new ExecutionQueue<Request>(new ExecutionQueueInteraction());
-
-        currentDirectory = new File(System.getProperty("user.dir"));
-
-        String gradleHomeProperty = System.getProperty("gradle.home");
-        if (gradleHomeProperty != null) {
-           gradleHomeDirectory = new File(gradleHomeProperty);
-        }
-        else {
-           gradleHomeDirectory = new DefaultClassPathProvider().getGradleHome();
-        }
-    }
-
-
-    public File getGradleHomeDirectory() {
-        return gradleHomeDirectory;
-    }
-
-   /**
-    * sets the gradle home directory. You can't just set this here. You must also set the "gradle.home" system property.
-    * This code could do this for you, but at this time, I didn't want this to have side effects and setting "gradle.home"
-    * can affect other things and there may be some timing issues.
-    * @param gradleHomeDirectory the new home directory
-    */
-    public void setGradleHomeDirectory(File gradleHomeDirectory) {
-        if( areEqual( this.gradleHomeDirectory, gradleHomeDirectory ) )    //already set to this. This prevents recursive notifications.
-        {
-            return;
-        }
-       this.gradleHomeDirectory = gradleHomeDirectory;
-        notifySettingsChanged();
-    }
-
-    /**
-    * @return the root directory of your gradle project.
-    */
-    public File getCurrentDirectory() {
-        return currentDirectory;
-    }
-
-    /**
-    * @param  currentDirectory the new root directory of your gradle project.
-    * @returns true if we changed the current directory, false if not (it was already set to this)
-    */
-    public boolean setCurrentDirectory(File currentDirectory) {
-        if( areEqual( this.currentDirectory, currentDirectory ) )    //already set to this. This prevents recursive notifications.
-        {
-            return false;
-        }
-        this.currentDirectory = currentDirectory;
-        notifySettingsChanged();
-        return true;
-    }
-
-    public File getCustomGradleExecutor() {
-        return customGradleExecutor;
-    }
-
-    public boolean setCustomGradleExecutor(File customGradleExecutor) {
-        if( areEqual( this.customGradleExecutor, customGradleExecutor ) )    //already set to this. This prevents recursive notifications.
-        {
-            return false;
-        }
-        this.customGradleExecutor = customGradleExecutor;
-        notifySettingsChanged();
-        return true;
-    }
-
-
-    public FavoritesEditor getFavoritesEditor() {
-        return favoritesEditor;
-    }
-
-   /**
-    * this allows you to change how much information is given when an error occurs.
-    */
-    public void setStackTraceLevel(StartParameter.ShowStacktrace stackTraceLevel) {
-        if( areEqual( this.stackTraceLevel, stackTraceLevel ) )    //already set to this. This prevents recursive notifications.
-        {
-            return;
-        }
-       this.stackTraceLevel = stackTraceLevel;
-        notifySettingsChanged();
-    }
-
-    public StartParameter.ShowStacktrace getStackTraceLevel() {
-        return stackTraceLevel;
-    }
-
-    public LogLevel getLogLevel() {
-        return logLevel;
-    }
-
-    public void setLogLevel(LogLevel logLevel) {
-        if (logLevel == null) {
-           return;
-        }
-
-       if( areEqual( this.logLevel, logLevel ) )    //already set to this. This prevents recursive notifications.
-       {
-           return;
-       }
-       this.logLevel = logLevel;
-       notifySettingsChanged();
-    }
-
-    /**
-     * Call this to start execution. This is done after you've initialized everything.
-    */
-    public void startExecutionQueue() {
-        isStarted = true;
-    }
-
-
-    /**
-      * This gives requests of the queue and then executes them by kicking off gradle
-      * in a separate process. Most of the code here is tedious setup code needed to
-      * start the server. The server is what starts gradle and opens a socket for
-      * interprocess communication so we can receive messages back from gradle.
-    */
-    private class ExecutionQueueInteraction implements ExecutionQueue.ExecutionInteraction<Request> {
-        /**
-         * When this is called, execute the given request.
-         *
-         * @param  request    the request to execute.
-        */
-        public void execute( final Request request) {
-
-            //mark this request as being currently executed
-            currentlyExecutingRequests.add( request );
-
-            notifyAboutToExecuteRequest( request );
-
-           //I'm just putting these in temp variables for easier debugging
-            File currentDirectory = getCurrentDirectory();
-            File gradleHomeDirectory = getGradleHomeDirectory();
-            File customGradleExecutor = getCustomGradleExecutor();
-
-            //the protocol handles the command line to launch gradle and messaging between us and said externally launched gradle.
-            ProcessLauncherServer.Protocol serverProtocol = request.createServerProtocol(logLevel, stackTraceLevel, currentDirectory, gradleHomeDirectory, customGradleExecutor);
-
-            //the server kicks off gradle as an external process and manages the communication with said process
-            ProcessLauncherServer server = new ProcessLauncherServer(serverProtocol);
-            request.setProcessLauncherServer(server);
-
-            //we need to know when this command is finished executing so we can mark it as complete and notify any observers.
-            server.addServerObserver( new ProcessLauncherServer.ServerObserver()
-            {
-               public void clientExited( int result, String output )
-               {
-                  currentlyExecutingRequests.remove( request );
-                  notifyRequestExecutionComplete( request, result, output );
-               }
-
-               public void serverExited() { }
-            }, false );
-
-            server.start();
-        }
-    }
-
-    private void notifyAboutToExecuteRequest( final Request request )
-    {
-      requestObserverLord.notifyObservers( new ObserverLord.ObserverNotification<RequestObserver>()
-      {
-          public void notify( RequestObserver observer )
-          {
-             try { //wrap this in a try/catch block so exceptions in the observer doesn't stop everything
-                observer.aboutToExecuteRequest( request );
-             }
-             catch( Exception e )
-             {
-                logger.error( "notifying aboutToExecuteCommand() " + e.getMessage() );
-             }
-          }
-       } );
-    }
-
-   private void notifyRequestExecutionComplete( final Request request, final int result, final String output )
-   {
-      requestObserverLord.notifyObservers( new ObserverLord.ObserverNotification<RequestObserver>()
-      {
-          public void notify( RequestObserver observer )
-          {
-             try { //wrap this in a try/catch block so exceptions in the observer doesn't stop everything
-                observer.requestExecutionComplete( request, result, output );
-             }
-             catch( Exception e )
-             {
-                logger.error( "notifying requestExecutionComplete() " + e.getMessage() );
-             }
-          }
-       } );
-   }
-
-    /**
-     * Adds an observer for various events. See PluginObserver.
-     *
-     * @param  observer     your observer
-     * @param  inEventQueue true if you want to be notified in the Event Dispatch Thread.
-    */
-    public void addGeneralPluginObserver(GeneralPluginObserver observer, boolean inEventQueue) {
-        generalObserverLord.addObserver(observer, inEventQueue);
-    }
-
-    public void removeGeneralPluginObserver(GeneralPluginObserver observer) {
-        generalObserverLord.removeObserver(observer);
-    }
-
-    public void addRequestObserver( RequestObserver observer, boolean inEventQueue )
-    {
-       requestObserverLord.addObserver( observer, inEventQueue );
-    }
-
-    public void removeRequestObserver( RequestObserver observer )
-    {
-       requestObserverLord.removeObserver( observer );
-    }
-
-    public void addSettingsObserver( SettingsObserver observer, boolean inEventQueue )
-    {
-       settingsObserverLord.addObserver( observer, inEventQueue );
-    }
-
-    public void removeSettingsObserver( SettingsObserver observer )
-    {
-       settingsObserverLord.removeObserver( observer );
-    }
-
-    private void notifySettingsChanged() {
-        settingsObserverLord.notifyObservers(new ObserverLord.ObserverNotification<SettingsObserver>() {
-            public void notify(SettingsObserver observer) {
-                observer.settingsChanged();
-            }
-        });
-    }
-
-    /**
-     * Determines if two are objects are equal and considers them both being null as equal
-     * @param object1 the first object
-     * @param object2 the second object
-     * @return true if they're both null or both equal.
-     */
-   private boolean areEqual( Object object1, Object object2)
-   {
-      if ( object1 == null || object2 == null )
-      {
-         return object2 == object1; //yes, we're not using '.equals', we're making sure they both equal null because one of them is null!
-      }
-
-      return object1.equals(object2);
-   }
-
-    /**
-     * Determines if all required setup is complete based on the current settings.
-     *
-     * @return true if a setup is complete, false if not.
-    */
-    public boolean isSetupComplete() {
-        //return gradleWrapper.getGradleHomeDirectory() != null &&
-        //       gradleWrapper.getGradleHomeDirectory().exists() &&
-        return getCurrentDirectory() != null &&
-                getCurrentDirectory().exists();
-    }
-
-   public Request addExecutionRequestToQueue( String fullCommandLine, String displayName )
-   {
-      return addExecutionRequestToQueue( fullCommandLine, displayName, false );
-   }
-
-   /**
-     * This executes a task in a background thread. This creates or uses
-     * an existing OutputPanel to display the results.
-     *
-     * @param  task       the task to execute.
-     * @param forceOutputToBeShown overrides the user setting onlyShowOutputOnErrors so that the output is shown regardless
-    */
-    public Request addExecutionRequestToQueue(final TaskView task, boolean forceOutputToBeShown, String... additionCommandLineOptions)
-    {
-        if( task == null ) {
-           return null;
-        }
-
-       String fullCommandLine = CommandLineAssistant.appendAdditionalCommandLineOptions(task, additionCommandLineOptions);
-        return addExecutionRequestToQueue(fullCommandLine, task.getFullTaskName(), forceOutputToBeShown );
-    }
-
-   /**
-    * This executes all the tasks together in a background thread. That is, all tasks
-    * are passed to a single gradle call at once. This creates or uses an existing
-    * OutputPanel to display the results.
-    *
-    * @param tasks the tasks to execute
-    * @param forceOutputToBeShown overrides the user setting onlyShowOutputOnErrors so that the output is shown regardless
-    * @param additionCommandLineOptions additional command line options to exeucte.
-    */
-    public Request addExecutionRequestToQueue(final List<TaskView> tasks, boolean forceOutputToBeShown, String... additionCommandLineOptions) {
-
-      if( tasks == null || tasks.isEmpty() ) {
-         return null;
-      }
-
-      if( tasks.size() == 1 ) { //if there's only 1, just treat it as one
-         return addExecutionRequestToQueue( tasks.get( 0 ), forceOutputToBeShown, additionCommandLineOptions );
-      }
-
-      String singleCommandLine = CommandLineAssistant.combineTasks( tasks, additionCommandLineOptions );
-      return addExecutionRequestToQueue(singleCommandLine, tasks.get( 0 ).getName() + "...", forceOutputToBeShown );
-    }
-
-    /**
-     * Executes several favorites commands at once as a single command. This has the affect
-     * of simply concatenating all the favorite command lines into a single line.
-     * @param favorites a list of favorites. If just one favorite, it executes it normally.
-     *                  If multiple favorites, it executes them all at once as a single command.
-     */
-    public Request addExecutionRequestToQueue(List<FavoriteTask> favorites) {
-        if( favorites.isEmpty() ) {
-            return null;
-        }
-
-        FavoriteTask firstFavoriteTask = favorites.get( 0 );
-        String displayName;
-        String fullCommandLine;
-        boolean alwaysShowOutput = firstFavoriteTask.alwaysShowOutput();
-
-        if( favorites.size() == 1 )
-        {
-            displayName = firstFavoriteTask.getDisplayName();
-            fullCommandLine = firstFavoriteTask.getFullCommandLine();
-        }
-        else
-        {
-            displayName = "Multiple (" + firstFavoriteTask.getDisplayName() + ", ... )";
-            fullCommandLine = FavoritesEditor.combineFavoriteCommandLines(favorites);
-        }
-
-        return addExecutionRequestToQueue( fullCommandLine, displayName, alwaysShowOutput );
-    }
-
-   /**
-    * Call this to execute a task in a background thread. This creates or uses
-    * an existing OutputPanel to display the results. This version takes text
-    * instead of a task object.
-    *
-    * @param  fullCommandLine the full command line to pass to gradle.
-    * @param  displayName     what we show on the tab.
-    * @param forceOutputToBeShown overrides the user setting onlyShowOutputOnErrors so that the output is shown regardless
-    */
-    public Request addExecutionRequestToQueue(String fullCommandLine, String displayName, boolean forceOutputToBeShown) {
-        if (!isStarted) {
-           return null;
-        }
-
-      if (fullCommandLine == null){
-           return null;
-        }
-
-      //here we'll give the UI a chance to add things to the command line.
-        fullCommandLine = alterCommandLine(fullCommandLine);
-
-        final ExecutionRequest request = new ExecutionRequest( getNextRequestID(), fullCommandLine, displayName, forceOutputToBeShown, executionQueue );
-        requestObserverLord.notifyObservers( new ObserverLord.ObserverNotification<RequestObserver>()
-        {
-           public void notify( RequestObserver observer )
-           {
-              observer.executionRequestAdded( request );
-           }
-        } );
-        executionQueue.addRequestToQueue(request);
-        return request;
-    }
-
-    private synchronized long getNextRequestID()
-    {
-       return nextRequestID++;
-    }
-
-    /**
-     * This will refresh the project/task tree.
-     * @return the Request that was created. Null if no request created.
-     */
-    public Request addRefreshRequestToQueue() {
-        return addRefreshRequestToQueue( null );
-    }
-
-    /**
-     * This will refresh the project/task tree. This version allows you to specify additional
-     * arguments to be passed to gradle during the refresh (such as -b to specify a build file)
-     * @param additionalCommandLineArguments the arguments to add, or null if none.
-     * @return the Request that was created. Null if no request created.
-     */
-    public Request addRefreshRequestToQueue( String additionalCommandLineArguments ) {
-        if (!isStarted){
-           return null;
-        }
-
-       if( hasRequestOfType( RefreshTaskListRequest.TYPE ) )
-       {
-          return null; //we're already doing a refresh.
-       }
-
-       //we'll request a task list since there is no way to do a no op. We're not really interested
-        //in what's being executed, just the ability to get the task list (which must be populated as
-        //part of executing anything).
-        String fullCommandLine = ImplicitTasksConfigurer.TASKS_TASK;
-
-        if( additionalCommandLineArguments != null )
-        {
-            fullCommandLine += ' ' + additionalCommandLineArguments;
-        }
-
-        //here we'll give the UI a chance to add things to the command line.
-        fullCommandLine = alterCommandLine(fullCommandLine);
-
-        final RefreshTaskListRequest request = new RefreshTaskListRequest( getNextRequestID(), fullCommandLine, executionQueue, this);
-        executionQueue.addRequestToQueue(request);
-        // TODO - fix this race condition - request may already have completed
-        requestObserverLord.notifyObservers( new ObserverLord.ObserverNotification<RequestObserver>()
-        {
-           public void notify( RequestObserver observer )
-           {
-              observer.refreshRequestAdded( request );
-           }
-        } );
-        return request;
-    }
-
-    /**
-     * This is where we notify listeners and give them a chance to add things to the command line.
-     *
-     * @param  fullCommandLine the full command line
-     *
-     * @return the new command line.
-    */
-    private String alterCommandLine(String fullCommandLine) {
-        CommandLineArgumentAlteringNotification notification = new CommandLineArgumentAlteringNotification(fullCommandLine);
-        commandLineArgumentObserverLord.notifyObservers(notification);
-
-        return notification.getFullCommandLine();
-    }
-
-
-    //
-    /**
-     * This class notifies the listeners and modifies the command line by adding
-     * additional commands to it. Each listener will be given the 'new' full command
-     * line, so the order you add things becomes important.
-    */
-    private class CommandLineArgumentAlteringNotification implements ObserverLord.ObserverNotification<CommandLineArgumentAlteringListener> {
-        private StringBuilder fullCommandLineBuilder;
-
-        private CommandLineArgumentAlteringNotification(String fullCommandLine) {
-            this.fullCommandLineBuilder = new StringBuilder(fullCommandLine);
-        }
-
-        public void notify(CommandLineArgumentAlteringListener observer) {
-            String additions = observer.getAdditionalCommandLineArguments(fullCommandLineBuilder.toString());
-            if (additions != null) {
-               fullCommandLineBuilder.append(' ').append(additions);
-            }
-        }
-
-        public String getFullCommandLine() {
-            return fullCommandLineBuilder.toString();
-        }
-    }
-
-
-    /**
-     * This allows you to add a listener that can add additional command line
-     * arguments whenever gradle is executed. This is useful if you've customized
-     * your gradle build and need to specify, for example, an init script.
-     *
-     * param  listener   the listener that modifies the command line arguments.
-    */
-    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener) {
-        commandLineArgumentObserverLord.addObserver(listener, false);
-    }
-
-    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener) {
-        commandLineArgumentObserverLord.removeObserver(listener);
-    }
-
-   /**
-    * This code was copied from BuildExceptionReporter.reportBuildFailure in gradle's source, then modified slightly
-    * to compensate for the fact that we're not driven by options or logging things to a logger object.
-    */
-    public static String getGradleExceptionMessage(Throwable failure, StartParameter.ShowStacktrace stackTraceLevel) {
-        if (failure == null) {
-           return "";
-        }
-
-      Formatter formatter = new Formatter();
-
-        formatter.format("%nBuild failed.%n");
-
-        if (stackTraceLevel == StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS) {
-           formatter.format("Use the stack trace options to get more details.");
-        }
-
-      if (failure != null) {
-            formatter.format("%n");
-
-            if (failure instanceof LocationAwareException) {
-                LocationAwareException scriptException = (LocationAwareException) failure;
-                formatter.format("%s%n%n", scriptException.getLocation());
-                formatter.format("%s", scriptException.getOriginalMessage());
-
-                for (Throwable cause : scriptException.getReportableCauses()) {
-                    formatter.format("%nCause: %s", getMessage(cause));
-                }
-            } else {
-                formatter.format("%s", getMessage(failure));
-            }
-
-            if (stackTraceLevel != StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS) {
-                formatter.format("%n%nException is:\n");
-                if (stackTraceLevel == StartParameter.ShowStacktrace.ALWAYS_FULL) {
-                   return formatter.toString() + getStackTraceAsText(failure);
-                }
-
-               return formatter.toString() + getStackTraceAsText(StackTraceUtils.deepSanitize(failure));
-            }
-        }
-
-        return formatter.toString();
-    }
-
-    private static String getStackTraceAsText(Throwable t) {
-        StringBuilder builder = new StringBuilder();
-        StackTraceElement[] stackTraceElements = t.getStackTrace();
-
-        for (int index = 0; index < stackTraceElements.length; index++) {
-            StackTraceElement stackTraceElement = stackTraceElements[index];
-            builder.append("   ").append(stackTraceElement.toString()).append('\n');
-        }
-
-        return builder.toString();
-    }
-
-    //tries to get a message from a Throwable. Something there's a message and sometimes there's not.
-    private static String getMessage(Throwable throwable) {
-        String message = throwable.getMessage();
-        if (!GUtil.isTrue(message)){
-           message = String.format("%s (no error message)", throwable.getClass().getName());
-        }
-
-       if (throwable.getCause() != null){
-           message += "\nCaused by: " + getMessage(throwable.getCause());
-        }
-
-       return message;
-    }
-
-   /**
-    * Determines if there are tasks executing or waiting to execute.
-    * We only care about execution requests, not refresh requests.
-    * @return true if this is busy, false if not.
-    */
-   public boolean isBusy()
-   {
-      return hasRequestOfType( ExecutionRequest.TYPE );
-   }
-
-   /**
-    Determines if we have an request of the specified type
-    @param type the sought type of request.
-    @return true if it has the request, false if not.
-    */
-   private boolean hasRequestOfType( Request.Type type )
-   {
-      Iterator<Request> iterator = currentlyExecutingRequests.iterator();
-      while( iterator.hasNext() )
-      {
-         ExecutionQueue.Request request = iterator.next();
-         if( request.getType() == type )
-         {
-            return true;
-         }
-      }
-
-      List<Request> pendingRequests = executionQueue.getRequests();
-      iterator = pendingRequests.iterator();
-      while( iterator.hasNext() )
-      {
-         ExecutionQueue.Request request = iterator.next();
-         if( request.getType() == type )
-         {
-            return true;
-         }
-      }
-
-      return false;
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoriteTask.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoriteTask.java
deleted file mode 100644
index a76065d..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoriteTask.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.favorites;
-
-/**
- * This holds onto a favorite task. Note: a user may define a favorite task, but it may or may be not present (or may be
- * hidden because of a temporary error in gradle files). So we hold onto the full name of the task so we can get to the
- * task should it become available.
- *
- * @author mhunsicker
- */
-public class FavoriteTask {
-    private String fullCommandLine;
-    private String displayName;
-    private boolean alwaysShowOutput;
-
-    public FavoriteTask(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
-        this.fullCommandLine = fullCommandLine;
-        this.displayName = displayName;
-        this.alwaysShowOutput = alwaysShowOutput;
-    }
-
-    public String toString() {
-        return displayName;
-    }
-
-    public String getFullCommandLine() {
-        return fullCommandLine;
-    }
-
-    //if you're wanting to set this, go through the FavoritesEditor.
-    /*package*/ void setFullCommandLine(String fullCommandLine) {
-        this.fullCommandLine = fullCommandLine;
-    }
-
-    public String getDisplayName() {
-        return displayName;
-    }
-
-    //if you're wanting to set this, go through the FavoritesEditor.
-    /*package*/ void setDisplayName(String displayName) {
-        this.displayName = displayName;
-    }
-
-    public boolean alwaysShowOutput() {
-        return alwaysShowOutput;
-    }
-
-    //if you're wanting to set this, go through the FavoritesEditor.
-    /*package*/ void setAlwaysShowOutput(boolean alwaysShowOutput) {
-        this.alwaysShowOutput = alwaysShowOutput;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesEditor.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesEditor.java
deleted file mode 100644
index f44c396..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesEditor.java
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.favorites;
-
-import org.gradle.foundation.CommandLineAssistant;
-import org.gradle.foundation.TaskView;
-import org.gradle.foundation.common.ObserverLord;
-import org.gradle.foundation.common.ReorderableList;
-import org.gradle.gradleplugin.foundation.DOM4JSerializer;
-import org.gradle.gradleplugin.foundation.ExtensionFileFilter;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This holds onto and edits favorite tasks. 'Favorite tasks' provides a quick way to run frequently used tasks.
- *
- * @author mhunsicker
- */
-public class FavoritesEditor implements SettingsSerializable {
-    private ReorderableList<FavoriteTask> favoriteTasks = new ReorderableList<FavoriteTask>();
-
-    private ObserverLord<FavoriteTasksObserver> favoriteTasksObserverLord = new ObserverLord<FavoriteTasksObserver>();
-
-    public interface FavoriteTasksObserver {
-        /**
-         * Notification that the favorites list has changed.
-         */
-        public void favoritesChanged();
-
-        /**
-         * Notification that the favorites were re-ordered
-         *
-         * @param favoritesReordered the favorites that were reordered
-         */
-        public void favoritesReordered(List<FavoriteTask> favoritesReordered);
-    }
-
-    public FavoritesEditor() {
-    }
-
-    public List<FavoriteTask> getFavoriteTasks() {
-        return Collections.unmodifiableList(favoriteTasks);
-    }
-
-    public void addFavoriteTasksObserver(FavoritesEditor.FavoriteTasksObserver observer, boolean inEventQueue) {
-        favoriteTasksObserverLord.addObserver(observer, inEventQueue);
-    }
-
-    public void removeFavoriteTasksObserver(FavoritesEditor.FavoriteTasksObserver observer) {
-        favoriteTasksObserverLord.removeObserver(observer);
-    }
-
-    public FavoriteTask getFavorite(String fullCommandLine) {
-        Iterator<FavoriteTask> taskIterator = favoriteTasks.iterator();
-        while (taskIterator.hasNext()) {
-            FavoriteTask favoriteTask = taskIterator.next();
-
-            if (fullCommandLine.equals(favoriteTask.getFullCommandLine())) {
-                return favoriteTask;
-            }
-        }
-
-        return null;
-    }
-
-    public FavoriteTask getFavoriteByDisplayName(String displayName) {
-        Iterator<FavoriteTask> taskIterator = favoriteTasks.iterator();
-        while (taskIterator.hasNext()) {
-            FavoriteTask favoriteTask = taskIterator.next();
-
-            if (displayName.equals(favoriteTask.getDisplayName())) {
-                return favoriteTask;
-            }
-        }
-
-        return null;
-    }
-
-    public FavoriteTask getFavorite(TaskView task) {
-        return getFavorite(task.getFullTaskName());
-    }
-
-    /**
-     * Fires off a notification that the favorite tasks have changed.
-     */
-    private void notifyFavoritesChanged() {
-        favoriteTasksObserverLord.notifyObservers(new ObserverLord.ObserverNotification<FavoriteTasksObserver>() {
-            public void notify(FavoriteTasksObserver observer) {
-                observer.favoritesChanged();
-            }
-        });
-    }
-
-    //
-
-    public enum AddMultipleResult {
-        AddSeparately, AddAsSingleCommand, Cancel
-    }
-
-    ;
-
-    /**
-
-     */
-    public interface AddMultipleFavoritesInteraction {
-        /**
-         * This is called when you try to add multiple tasks at once. You should prompt the user whether or not they
-         * want to add each task separately or together as one task with multiple commands.
-         *
-         * @param tasksSample the individual tasks we will add
-         * @param singleCommandSample a sample of what the single command would look like
-         * @return where or not to combine tasks into a single command line, false to add them as separate commands.
-         *         See AddMultiple.
-         */
-        public AddMultipleResult promptUserToCombineTasks(List<TaskView> tasksSample, String singleCommandSample);
-    }
-
-    /**
-     * Call this to add tasks as favorites. If you pass in multiple tasks, we'll prompt the user whether or not the tasks
-     * should be added as one favorite with multiple tasks or separate tasks.
-     *
-     * @param tasks the tasks to add. Their order in the list becomes the order in the single task if the user chooses
-     * this.
-     * @param interaction how we interact with the user or other UI.
-     */
-    public void addMutlipleFavorites(List<TaskView> tasks, boolean alwaysShowOutput,
-                                     AddMultipleFavoritesInteraction interaction) {
-        if (tasks.isEmpty()) {
-            return;
-        }  //no tasks, bail
-
-        if (tasks.size() == 1) {  //only 1 task. just add it
-            addFavorite(tasks.get(0), alwaysShowOutput);
-            return;
-        }
-
-        //multiple tasks. Ask the user what to do
-        String singleCommandLine = CommandLineAssistant.combineTasks(tasks);
-
-        //prompt the user what to do
-        AddMultipleResult addMultipleResult = interaction.promptUserToCombineTasks(tasks, singleCommandLine);
-        switch (addMultipleResult) {
-            case Cancel:
-                return;
-
-            case AddSeparately:
-                Iterator<TaskView> iterator = tasks.iterator();
-                while (iterator.hasNext()) {
-                    TaskView task = iterator.next();
-                    addFavorite(task, alwaysShowOutput);
-                }
-                break;
-
-            case AddAsSingleCommand:
-                addFavorite(singleCommandLine, alwaysShowOutput);
-                break;
-        }
-    }
-
-    public FavoriteTask addFavorite(TaskView task, boolean alwaysShowOutput) {
-        return addFavorite(task.getFullTaskName(), alwaysShowOutput);
-    }
-
-    public FavoriteTask addFavorite(String fullCommandLine, boolean alwaysShowOutput) {
-        FavoriteTask favorite = addFavorite(fullCommandLine, fullCommandLine, alwaysShowOutput);
-        if (favorite != null) {
-            notifyFavoritesChanged();
-        }
-
-        return favorite;
-    }
-
-    public FavoriteTask addFavorite(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
-        if( ( fullCommandLine == null || fullCommandLine.trim().equals( "" ) ) &&
-            ( displayName == null || displayName.trim().equals( "" ) ) )    //don't allow someone to add a blank favorite.
-        {
-            return null;
-        }
-
-        FavoriteTask favoriteTask = new FavoriteTask(fullCommandLine, displayName, alwaysShowOutput);
-        favoriteTasks.add(favoriteTask);
-        return favoriteTask;
-    }
-
-    /**
-     * Call this to add the specified tasks as favorite tasks
-     *
-     * @param tasks the task to make a favorite.
-     */
-    public void addFavorites(List<TaskView> tasks, boolean alwaysShowOutput) {
-        boolean addedFavorite = false;
-
-        Iterator<TaskView> iterator = tasks.iterator();
-        while (iterator.hasNext()) {
-            TaskView task = iterator.next();
-            String fullTaskName = task.getFullTaskName();
-            if (this.addFavorite(fullTaskName, alwaysShowOutput) != null) {
-                addedFavorite = true;
-            }
-        }
-
-        if (addedFavorite)  //don't notify anyone unless we actually did something.
-        {
-            favoriteTasksObserverLord.notifyObservers(
-                    new ObserverLord.ObserverNotification<FavoritesEditor.FavoriteTasksObserver>() {
-                        public void notify(FavoritesEditor.FavoriteTasksObserver observer) {
-                            observer.favoritesChanged();
-                        }
-                    });
-        }
-    }
-
-    /**
-     * Call this to add a favorite that isn't in the task list. This exists because you can add functionality to gradle
-     * that isn't really a task.
-     *
-     * @param addFavoriteInteraction allows us to interact with the user
-     * @return the favorite that was added, or null if the user canceled
-     */
-    public FavoriteTask addFavorite(EditFavoriteInteraction addFavoriteInteraction) {
-        FavoriteTask newFavorite = new FavoriteTask("", "", false);
-        if (!editInternal(newFavorite, addFavoriteInteraction)) {
-            return null;
-        }
-
-        favoriteTasks.add(newFavorite);
-
-        notifyFavoritesChanged();
-        return newFavorite;
-    }
-
-    /**
-     * This is what you actually edit when you want to edit a favorite. I wanted the FavoriteTask object to be immutable
-     * so the only way to edit it is via this editor. This way any necessary validation or notification will always be
-     * performed
-     */
-    public class EditibleFavoriteTask {
-        public String fullCommandLine;
-        public String displayName;
-        public boolean alwaysShowOutput;
-
-        public EditibleFavoriteTask(FavoriteTask favoriteTask) {
-            this(favoriteTask.getFullCommandLine(), favoriteTask.getDisplayName(), favoriteTask.alwaysShowOutput());
-        }
-
-        public EditibleFavoriteTask(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
-            this.fullCommandLine = fullCommandLine;
-            this.displayName = displayName;
-            this.alwaysShowOutput = alwaysShowOutput;
-        }
-    }
-
-    public interface EditFavoriteInteraction extends ValidationInteraction {
-        public boolean editFavorite(EditibleFavoriteTask favoriteTask);
-    }
-
-    /**
-     * Edits the specified favorite task.
-     *
-     * @param favoriteTask the task to edit.
-     * @param editFavoriteInteraction how we interact with the user
-     * @return true if we made changes, false if not.
-     */
-    public boolean editFavorite(FavoriteTask favoriteTask, EditFavoriteInteraction editFavoriteInteraction) {
-        if (favoriteTask == null) {
-            return false;
-        }
-
-        if (favoriteTasks.indexOf(favoriteTask) == -1) {
-            return false;
-        }  //not our favorite
-
-        if (!editInternal(favoriteTask, editFavoriteInteraction)) {
-            return false;
-        }
-
-        notifyFavoritesChanged();
-        return true;
-    }
-
-    /**
-     * This edits the specified favorite task. We create a EditableFavoriteTask so the user can trash it and cancel and
-     * it won't affect the original. We'll sit in a loop prompting the user to edit it until no errors exist then we'll
-     * set the values on the original task.
-     *
-     * @param favoriteTask the task to edit.
-     * @param editFavoriteInteraction how we interact with the user.
-     * @return true if we edited it, false if not (the user canceled).
-     */
-    private boolean editInternal(FavoriteTask favoriteTask, EditFavoriteInteraction editFavoriteInteraction) {
-        EditibleFavoriteTask workingCopy = new EditibleFavoriteTask(favoriteTask);
-        boolean isValid = true;
-        do {
-            if (!editFavoriteInteraction.editFavorite(workingCopy)) {
-                return false;
-            }
-
-            isValid = validateEditableFavoriteTask(workingCopy, favoriteTask, editFavoriteInteraction);
-        } while (!isValid);
-
-        favoriteTask.setFullCommandLine(workingCopy.fullCommandLine);
-
-        favoriteTask.setDisplayName(workingCopy.displayName);
-        favoriteTask.setAlwaysShowOutput(workingCopy.alwaysShowOutput);
-
-        return true;
-    }
-
-    public interface ValidationInteraction {
-        public void reportError(String error);
-    }
-
-    /**
-     * This validates the editable favorite task. It makes sure the task name is specified and that it's not a
-     * duplicate.
-     *
-     * @param editableFavoriteTask the task your editing.
-     * @param originalFavoriteTaskObject the original object. This is used to test for duplication. If its new and not
-     * in the favorites, that's OK.
-     * @param validationInteraction how we report errors to the user.
-     * @return true if the task is valid, false if not.
-     */
-    private boolean validateEditableFavoriteTask(EditibleFavoriteTask editibleFavoriteTask,
-                                                 FavoriteTask originalFavoriteTaskObject,
-                                                 ValidationInteraction validationInteraction) {
-        if (editibleFavoriteTask.fullCommandLine == null || editibleFavoriteTask.fullCommandLine.trim().equals("")) {
-            validationInteraction.reportError("Full task name must be specified");
-            return false;
-        }
-
-        if (editibleFavoriteTask.displayName == null || editibleFavoriteTask.displayName.trim().equals("")) {
-            validationInteraction.reportError("Display name must be specified");
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Call this to remove the specified favorites from the favorite tasks.
-     *
-     * @param favoritesToRemove the favorite tasks to remove
-     */
-    public void removeFavorites(List<FavoriteTask> favoritesToRemove) {
-        if (favoriteTasks.removeAll(favoritesToRemove)) {
-            notifyFavoritesChanged();
-        }
-    }
-
-    /**
-     * This moves the specified favorites up.
-     *
-     * @param favoritesToMove .
-     */
-    public void moveFavoritesBefore(List<FavoriteTask> favoritesToMove) {
-        moveFavorites(favoritesToMove, true);
-    }
-
-    public void moveFavoritesAfter(List<FavoriteTask> favoritesToMove) {
-        moveFavorites(favoritesToMove, false);
-    }
-
-    private void moveFavorites(final List<FavoriteTask> favoritesToMove, boolean moveBefore) {
-        if (moveBefore) {
-            favoriteTasks.moveBefore(favoritesToMove);
-        } else {
-            favoriteTasks.moveAfter(favoritesToMove);
-        }
-
-        favoriteTasksObserverLord.notifyObservers(new ObserverLord.ObserverNotification<FavoriteTasksObserver>() {
-            public void notify(FavoriteTasksObserver observer) {
-                observer.favoritesReordered(favoriteTasks);
-            }
-        });
-    }
-
-    /**
-     * Call this to save favorites to a file.
-     */
-    public void exportToFile(DOM4JSerializer.ExportInteraction exportInteraction) {
-        DOM4JSerializer.exportToFile("favorites", exportInteraction, createFileFilter(), this);
-    }
-
-    /**
-     * Call this to read favorites from a file. I'm going to use FavoritesSerializable rather than ourselves (even
-     * though we're a JDOMSerializable) so if something goes wrong, we won't wipe out our current settings.
-     */
-    public boolean importFromFile(DOM4JSerializer.ImportInteraction importInteraction) {
-        FavoritesSerializable serializable = new FavoritesSerializable();
-        if (!DOM4JSerializer.importFromFile(importInteraction, createFileFilter(), serializable)) {
-            return false;
-        }
-
-        //only if we succeed should we clear out the existing favorites
-        favoriteTasks.clear();
-        favoriteTasks.addAll(serializable.getFavorites());
-
-        notifyFavoritesChanged();
-
-        return true;
-    }
-
-    private ExtensionFileFilter createFileFilter() {
-        return new ExtensionFileFilter(".favorite-tasks", "Favorite Tasks");
-    }
-
-    /**
-     * Call this to saves the current settings.
-     *
-     * @param settings where you save the settings.
-     */
-    public void serializeOut(SettingsNode settings) {
-        FavoritesSerializable.serializeOut(settings, favoriteTasks);
-    }
-
-    /**
-     * Call this to read in this object's settings. The reverse of serializeOut.
-     *
-     * @param settings where you read your settings.
-     */
-    public void serializeIn(SettingsNode settings) {
-        FavoritesSerializable.serializeIn(settings, favoriteTasks);
-    }
-
-    /**
-     * This makes a copy of all the selected tasks.
-     * @param tasksToCopy the tasks to copy
-     */
-    public void duplicateFavorites(List<FavoriteTask> tasksToCopy) {
-        if( tasksToCopy == null || tasksToCopy.isEmpty() ) {
-            return;
-        }
-
-        Iterator<FavoriteTask> iterator = tasksToCopy.iterator();
-        while( iterator.hasNext() )
-        {
-           FavoriteTask taskToCopy = iterator.next();
-           FavoriteTask newFavoriteTask = new FavoriteTask( taskToCopy.getFullCommandLine(), taskToCopy.getDisplayName(), taskToCopy.alwaysShowOutput() );
-           favoriteTasks.add( newFavoriteTask );
-        }
-
-        notifyFavoritesChanged();
-    }
-
-    /**
-     * This makes a copy of the selected task.
-     * @param taskToCopy the task to copy
-     */
-    public FavoriteTask duplicateFavorite(FavoriteTask taskToCopy) {
-
-        if( taskToCopy == null ) {
-            return null;
-        }
-
-        FavoriteTask newFavoriteTask = new FavoriteTask( taskToCopy.getFullCommandLine(), taskToCopy.getDisplayName(), taskToCopy.alwaysShowOutput() );
-        favoriteTasks.add( newFavoriteTask );
-        notifyFavoritesChanged();
-        return newFavoriteTask;
-    }
-
-    /**
-     * This combines all the command lines of the favorites list into a single command line.
-     * This is useful for allowing a user to execute multiple favorites at once.
-     * Note: this doesn't do anything intelligent by trying to weed out duplicates.
-     * Gradle handles that nicely already.
-     * @param favoriteTasks the favorite tasks to combine
-     * @return a single String of all the command combined.
-     */
-    public static String combineFavoriteCommandLines( List<FavoriteTask> favoriteTasks )
-    {
-        StringBuilder builder = new StringBuilder();
-
-        Iterator<FavoriteTask> iterator = favoriteTasks.iterator();
-        while( iterator.hasNext() )
-        {
-           FavoriteTask favoriteTask = iterator.next();
-
-           builder.append( favoriteTask.getFullCommandLine() );
-           if( iterator.hasNext() )
-           {
-               builder.append( ' ' );
-           }
-        }
-
-        return builder.toString();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesSerializable.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesSerializable.java
deleted file mode 100644
index b69420e..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesSerializable.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.favorites;
-
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Inner class that handles serializing favorites. You can either pass it a favorites list and serialize them out or use
- * the default constructor and serialize it. This allows you to serialize a favorites list with or without an editor.
- *
- * @author mhunsicker
- */
-class FavoritesSerializable implements SettingsSerializable {
-    private List<FavoriteTask> favorites;
-
-    private static final String FAVORITE_ELEMENT_TAG = "favorite";
-    private static final String FULL_COMMAND_LINE = "full-command-line";
-    private static final String DISPLAY_NAME = "display-name";
-    private static final String SHOW_OUTPUT = "show-output";
-    private static final String ROOT_TAG = "favorites";
-    private static final String FAVORITES_SIZE = "favorites-size";
-    private static final String FAVORITE_PREFIX = "favorite_";
-
-    //use this constructor if you're serializing OUT
-
-    public FavoritesSerializable(List<FavoriteTask> favorites) {
-        this.favorites = favorites;
-    }
-
-    //use this constructor if you're serialzing IN
-
-    public FavoritesSerializable() {
-        favorites = new ArrayList<FavoriteTask>();
-    }
-
-    //call this to get the favorites that were serilized in.
-
-    public List<FavoriteTask> getFavorites() {
-        return favorites;
-    }
-
-    /**
-     * Call this to saves the current settings.
-     *
-     * @param settings where you save the settings.
-     */
-    public void serializeOut(SettingsNode settings) {
-        serializeOut(settings, favorites);
-    }
-
-    public static void serializeOut(SettingsNode settings, List<FavoriteTask> favorites) {
-        SettingsNode rootNode = settings.addChildIfNotPresent(ROOT_TAG);
-        rootNode.removeAllChildren(); //clear out whatever may have already been there
-
-        Iterator<FavoriteTask> iterator = favorites.iterator();
-        while (iterator.hasNext()) {
-            FavoriteTask favoriteTask = iterator.next();
-
-            SettingsNode taskNode = rootNode.addChild(FAVORITE_ELEMENT_TAG);
-            taskNode.setValueOfChild(FULL_COMMAND_LINE, favoriteTask.getFullCommandLine());
-            taskNode.setValueOfChild(DISPLAY_NAME, favoriteTask.getDisplayName());
-            taskNode.setValueOfChildAsBoolean(SHOW_OUTPUT, favoriteTask.alwaysShowOutput());
-        }
-    }
-
-    /**
-     * Call this to read in this object's settings. The reverse of serializeOut.
-     *
-     * @param settings where you read your settings.
-     */
-    public void serializeIn(SettingsNode settings) {
-        serializeIn(settings, favorites);
-    }
-
-    public static void serializeIn(SettingsNode settings, List<FavoriteTask> favorites) {
-        favorites.clear();  //remove everything already there
-
-        SettingsNode rootElement = settings.getChildNode(ROOT_TAG);
-        if (rootElement == null) {
-            return;
-        }
-
-        Iterator<SettingsNode> iterator = rootElement.getChildNodes(FAVORITE_ELEMENT_TAG).iterator();
-        while (iterator.hasNext()) {
-            SettingsNode taskNode = iterator.next();
-
-            String fullCommandLine = taskNode.getValueOfChild(FULL_COMMAND_LINE, null);
-            if (fullCommandLine != null) {
-                String displayName = taskNode.getValueOfChild(DISPLAY_NAME, fullCommandLine);
-                boolean showOutput = taskNode.getValueOfChildAsBoolean(SHOW_OUTPUT, false);
-
-                addFavoriteTask(favorites, fullCommandLine, displayName, showOutput);
-            }
-        }
-    }
-
-    private static void addFavoriteTask(List<FavoriteTask> favorites, String fullCommandLine, String displayName,
-                                        boolean alwaysShowOutput) {
-        if (displayName == null) {
-            displayName = fullCommandLine;
-        }
-
-        favorites.add(new FavoriteTask(fullCommandLine, displayName, alwaysShowOutput));
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicFilterEditor.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicFilterEditor.java
deleted file mode 100644
index a714bfa..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicFilterEditor.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.filters;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.foundation.common.ObserverLord;
-import org.gradle.gradleplugin.foundation.DOM4JSerializer;
-import org.gradle.gradleplugin.foundation.ExtensionFileFilter;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-/*
- This allows editing a BasicProjectAndTaskFilter. You don't work directly
- with the BasicProjectAndTaskFilter to alter it. Go through this.
- During the editing process, you often need to fire off notifications that
- normally aren't required. This is where those notifications would come from.
- This also has some extra validation that isn't present in the filter itself.
-
- @author mhunsicker
-  */
-
-public class BasicFilterEditor implements ProjectAndTaskFilter {
-    private List<String> filteredOutProjectNames = new ArrayList<String>();
-    private List<String> filteredOutTaskNames = new ArrayList<String>();
-    private boolean filterOutTasksWithNoDescription;
-    private ObserverLord<FilterEditorObserver> observerLord = new ObserverLord<FilterEditorObserver>();
-
-    public interface FilterEditorObserver {
-        /**
-         * A generic notification that the filter has changed.
-         */
-        public void filterChanged();
-    }
-
-    public BasicFilterEditor() {
-
-    }
-
-    public BasicFilterEditor(BasicProjectAndTaskFilter filter) {
-        initializeFromFilter(filter);
-    }
-
-    public void initializeFromFilter(BasicProjectAndTaskFilter filter) {
-        filteredOutProjectNames.clear();
-        hideProjectsByName(filter.getFilteredOutProjectNames());
-
-        filteredOutTaskNames.clear();
-        hideTasksByName(filter.getFilteredOutTaskNames());
-
-        filterOutTasksWithNoDescription = filter.filterOutTasksWithNoDescription();
-        notifyChanges();
-    }
-
-    public void addFilterEditorObserver(FilterEditorObserver observer, boolean inEventQueue) {
-        observerLord.addObserver(observer, inEventQueue);
-    }
-
-    public void removeFilterEditorObserver(FilterEditorObserver observer) {
-        observerLord.removeObserver(observer);
-    }
-
-    public boolean filterOutTasksWithNoDescription() {
-        return filterOutTasksWithNoDescription;
-    }
-
-    public void setFilterOutTasksWithNoDescription(boolean filterOutTasksWithNoDescription) {
-        this.filterOutTasksWithNoDescription = filterOutTasksWithNoDescription;
-    }
-
-    public void hideProjects(ProjectView... filteredProjects) {
-        hideProjects(Arrays.asList(filteredProjects));
-    }
-
-    public void hideProjects(List<ProjectView> filteredProjects) {
-        Iterator<ProjectView> iterator = filteredProjects.iterator();
-        while (iterator.hasNext()) {
-            ProjectView projectView = iterator.next();
-            if (!filteredOutProjectNames.contains(projectView.getName())) {
-                filteredOutProjectNames.add(projectView.getName());
-            }
-        }
-
-        notifyChanges();
-    }
-
-    public void hideProjectsByName(String... projectNames) {
-        hideProjectsByName(Arrays.asList(projectNames));
-    }
-
-    public void hideProjectsByName(List<String> projectNames) {
-        Iterator<String> iterator = projectNames.iterator();
-        while (iterator.hasNext()) {
-            String gradleProject = iterator.next();
-            if (!filteredOutProjectNames.contains(gradleProject)) {
-                filteredOutProjectNames.add(gradleProject);
-            }
-        }
-        notifyChanges();
-    }
-
-    public void showProjects(ProjectView... filteredProjects) {
-        showProjects(Arrays.asList(filteredProjects));
-    }
-
-    public void showProjects(List<ProjectView> filteredProjects) {
-        Iterator<ProjectView> iterator = filteredProjects.iterator();
-        while (iterator.hasNext()) {
-            ProjectView projectView = iterator.next();
-            filteredOutProjectNames.remove(projectView.getName());
-        }
-        notifyChanges();
-    }
-
-    public void showProjectsByName(String... filteredProjects) {
-        showProjectsByName(Arrays.asList(filteredProjects));
-    }
-
-    public void showProjectsByName(List<String> filteredProjects) {
-        Iterator<String> iterator = filteredProjects.iterator();
-        while (iterator.hasNext()) {
-            String gradleProjectName = iterator.next();
-            filteredOutProjectNames.remove(gradleProjectName);
-        }
-        notifyChanges();
-    }
-
-    /**
-     * Determines if the specified project should be allowed or not.
-     *
-     * @param project the project in question
-     * @return true to allow it, false not to.
-     */
-    public boolean doesAllowProject(ProjectView project) {
-        return !filteredOutProjectNames.contains(project.getName());
-    }
-
-    public boolean doesAllowProject(String projectName) {
-        return !filteredOutProjectNames.contains(projectName);
-    }
-
-    public void hideTasks(TaskView... filteredTasks) {
-        hideTasks(Arrays.asList(filteredTasks));
-    }
-
-    public void hideTasks(List<TaskView> filteredTasks) {
-        Iterator<TaskView> iterator = filteredTasks.iterator();
-        while (iterator.hasNext()) {
-            TaskView taskView = iterator.next();
-            if (!filteredOutTaskNames.contains(taskView.getName())) {
-                filteredOutTaskNames.add(taskView.getName());
-            }
-        }
-        notifyChanges();
-    }
-
-    public void hideTasksByName(String... taskNames) {
-        hideTasksByName(Arrays.asList(taskNames));
-    }
-
-    public void hideTasksByName(List<String> taskNames) {
-        Iterator<String> iterator = taskNames.iterator();
-        while (iterator.hasNext()) {
-            String gradleTask = iterator.next();
-            if (!filteredOutTaskNames.contains(gradleTask)) {
-                filteredOutTaskNames.add(gradleTask);
-            }
-        }
-        notifyChanges();
-    }
-
-    public void showTasks(TaskView... filteredTasks) {
-        showTasks(Arrays.asList(filteredTasks));
-    }
-
-    public void showTasks(List<TaskView> filteredTasks) {
-        Iterator<TaskView> iterator = filteredTasks.iterator();
-        while (iterator.hasNext()) {
-            TaskView taskView = iterator.next();
-            filteredOutTaskNames.remove(taskView.getName());
-        }
-        notifyChanges();
-    }
-
-    public void showTasksByName(String... filteredTasks) {
-        showTasksByName(Arrays.asList(filteredTasks));
-    }
-
-    public void showTasksByName(List<String> filteredTasks) {
-        Iterator<String> iterator = filteredTasks.iterator();
-        while (iterator.hasNext()) {
-            String gradleTaskName = iterator.next();
-            filteredOutTaskNames.remove(gradleTaskName);
-        }
-        notifyChanges();
-    }
-
-    /**
-     * Determines if the specified task should be allowed or not.
-     *
-     * @param task the task in question
-     * @return true to allow it, false not to.
-     */
-    public boolean doesAllowTask(TaskView task) {
-        //since we've got the task here, we can more than just filter it by name. We can
-        //filter it out if it has no description.
-        return BasicProjectAndTaskFilter.doesAllowTask(task, filteredOutTaskNames, filterOutTasksWithNoDescription);
-    }
-
-    public boolean doesAllowTask(String taskName) {
-        return !filteredOutTaskNames.contains(taskName);
-    }
-
-    public BasicProjectAndTaskFilter createFilter() {
-        return new BasicProjectAndTaskFilter(filteredOutProjectNames, filteredOutTaskNames,
-                filterOutTasksWithNoDescription);
-    }
-
-    /**
-     * Call this to save this filter to a file.
-     */
-    public void exportToFile(DOM4JSerializer.ExportInteraction exportInteraction) {
-        BasicProjectAndTaskFilter basicProjectAndTaskFilter = createFilter();
-        DOM4JSerializer.exportToFile("basic-filter", exportInteraction, createFileFilter(), basicProjectAndTaskFilter);
-    }
-
-    /**
-     * Call this to read a filter from a file.
-     */
-    public boolean importFromFile(DOM4JSerializer.ImportInteraction importInteraction) {
-        BasicProjectAndTaskFilter basicProjectAndTaskFilter = new BasicProjectAndTaskFilter();
-        if (!DOM4JSerializer.importFromFile(importInteraction, createFileFilter(), basicProjectAndTaskFilter)) {
-            return false;
-        }
-
-        initializeFromFilter(basicProjectAndTaskFilter);
-        notifyChanges();
-        return true;
-    }
-
-    /**
-     * This creates a file filter suitable for storing/reading this filter.
-     */
-    private ExtensionFileFilter createFileFilter() {
-        return new ExtensionFileFilter(".task-filter", "Task Filter");
-    }
-
-    /**
-     * Call this whenever you make changes so we can notify any observers.
-     */
-    private void notifyChanges() {
-        observerLord.notifyObservers(new ObserverLord.ObserverNotification<FilterEditorObserver>() {
-            public void notify(FilterEditorObserver observer) {
-                observer.filterChanged();
-            }
-        });
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicProjectAndTaskFilter.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicProjectAndTaskFilter.java
deleted file mode 100644
index 24707cd..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicProjectAndTaskFilter.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.filters;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This is a basic filter where you can specify specific projects and tasks that will be filtered out.
- *
- * @author mhunsicker
- */
-public class BasicProjectAndTaskFilter implements ProjectAndTaskFilter, SettingsSerializable {
-    private static final String BASIC_PROJECT_AND_TASK_FILTER = "basic-project-and-task-filter";
-    private static final String FILTERED_OUT_PROJECTS = "filtered-out-projects";
-    private static final String FILTERED_OUT_TASKS = "filtered-out-tasks";
-    private static final String FILTER_OUT_TASKS_WITH_NO_DESCRIPTION = "filter-out-tasks-with-no-description";
-    private static final String ITEM = "item";
-    private static final String VALUE = "value";
-
-    private List<String> filteredOutProjectNames = new ArrayList<String>();
-    private List<String> filteredOutTaskNames = new ArrayList<String>();
-    private boolean filterOutTasksWithNoDescription;
-
-    public BasicProjectAndTaskFilter(List<String> filteredOutProjectNames, List<String> filteredOutTaskNames,
-                                     boolean filterOutTasksWithNoDescription) {
-        this.filterOutTasksWithNoDescription = filterOutTasksWithNoDescription;
-        this.filteredOutProjectNames.addAll(filteredOutProjectNames);
-        this.filteredOutTaskNames.addAll(filteredOutTaskNames);
-    }
-
-    public BasicProjectAndTaskFilter() {
-    }
-
-    public List<String> getFilteredOutProjectNames() {
-        return filteredOutProjectNames;
-    }
-
-    /*package*/
-
-    void setFilteredOutProjectNames(List<String> filteredOutProjectNames) {
-        this.filteredOutProjectNames = filteredOutProjectNames;
-    }
-
-    public List<String> getFilteredOutTaskNames() {
-        return filteredOutTaskNames;
-    }
-
-    /*package*/
-
-    void setFilteredOutTaskNames(List<String> filteredOutTaskNames) {
-        this.filteredOutTaskNames = filteredOutTaskNames;
-    }
-
-    public boolean filterOutTasksWithNoDescription() {
-        return filterOutTasksWithNoDescription;
-    }
-
-    /*package*/
-
-    void setFilterOutTasksWithNoDescription(boolean filterOutTasksWithNoDescription) {
-        this.filterOutTasksWithNoDescription = filterOutTasksWithNoDescription;
-    }
-
-    /**
-     * Determines if the specified project should be allowed or not.
-     *
-     * @param project the project in question
-     * @return true to allow it, false not to.
-     */
-    public boolean doesAllowProject(ProjectView project) {
-        return !filteredOutProjectNames.contains(project.getName());
-    }
-
-    /**
-     * Determines if the specified task should be allowed or not.
-     *
-     * @param task the task in question
-     * @return true to allow it, false not to.
-     */
-    public boolean doesAllowTask(TaskView task) {
-        return doesAllowTask(task, filteredOutTaskNames, filterOutTasksWithNoDescription);
-    }
-
-    /**
-     * Determines if the specified task should be allowed or not.
-     *
-     * This version is static and is shared by this filter and its editor.
-     *
-     * @param task the task in question
-     * @param filteredOutTasks a list of filtered out task names
-     * @param filterOutTasksWithNoDescription whether or not to hide it if it as no description
-     * @return true if the task is allowed, false if not.
-     */
-    public static boolean doesAllowTask(TaskView task, List<String> filteredOutTasks,
-                                        boolean filterOutTasksWithNoDescription) {
-        if (filterOutTasksWithNoDescription) {
-            if (!task.hasDescription()) {
-                return false;
-            }
-        }
-
-        return !filteredOutTasks.contains(task.getName());
-    }
-
-    /**
-     * Call this to saves the current settings.
-     *
-     * @param settings where you save the settings.
-     */
-    public void serializeOut(SettingsNode settings) {
-        SettingsNode rootNode = settings.addChildIfNotPresent(BASIC_PROJECT_AND_TASK_FILTER);
-        rootNode.removeAllChildren(); //clear out whatever may have already been there
-
-        rootNode.setValueOfChildAsBoolean(FILTER_OUT_TASKS_WITH_NO_DESCRIPTION, filterOutTasksWithNoDescription);
-
-        SettingsNode filteredOutProjectsNode = rootNode.addChild(FILTERED_OUT_PROJECTS);
-        serializeOutStringList(filteredOutProjectsNode, filteredOutProjectNames);
-
-        SettingsNode filteredOutTasksNode = rootNode.addChild(FILTERED_OUT_TASKS);
-        serializeOutStringList(filteredOutTasksNode, filteredOutTaskNames);
-    }
-
-    /**
-     * Writes out a list of strings as 'item' element children of parentElement.
-     */
-    private void serializeOutStringList(SettingsNode parentNode, List<String> strings) {
-        Iterator<String> iterator = strings.iterator();
-        while (iterator.hasNext()) {
-            String item = iterator.next();
-            SettingsNode itemNode = parentNode.addChild(ITEM);
-            itemNode.setValue(item);
-        }
-    }
-
-    /**
-     * Call this to read in this object's settings. The reverse of serializeOut.
-     *
-     * @param settings where you read your settings.
-     */
-    public void serializeIn(SettingsNode settings) {
-        filteredOutProjectNames.clear();
-        filteredOutTaskNames.clear();
-
-        SettingsNode rootNode = settings.getChildNode(BASIC_PROJECT_AND_TASK_FILTER);
-        if (rootNode == null) {
-            return;
-        }
-
-        filterOutTasksWithNoDescription = rootNode.getValueOfChildAsBoolean(FILTER_OUT_TASKS_WITH_NO_DESCRIPTION,
-                filterOutTasksWithNoDescription);
-
-        SettingsNode filteredOutProjectsNode = rootNode.getChildNode(FILTERED_OUT_PROJECTS);
-        if (filteredOutProjectsNode != null) {
-            serializeInStringList(filteredOutProjectsNode, filteredOutProjectNames);
-        }
-
-        SettingsNode filteredOutTasksNode = rootNode.getChildNode(FILTERED_OUT_TASKS);
-        if (filteredOutTasksNode != null) {
-            serializeInStringList(filteredOutTasksNode, filteredOutTaskNames);
-        }
-    }
-
-    /**
-     * Reads in a list of strings as 'item' element children of parentElement.
-     */
-    private void serializeInStringList(SettingsNode parentNode, List<String> strings) {
-        Iterator<SettingsNode> iterator = parentNode.getChildNodes(ITEM).iterator();
-        while (iterator.hasNext()) {
-            SettingsNode itemNode = iterator.next();
-            String item = itemNode.getValue();
-            if (item != null) {
-                strings.add(item);
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/AbstractRequest.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/AbstractRequest.java
deleted file mode 100644
index cda1a6a..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/AbstractRequest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.request;
-
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.foundation.queue.ExecutionQueue;
-
-/**
- * This represents a basic reques to gradle that is executed in a separate process using the ProcessLauncherServer. This
- * stores the command line to execute and has the ability to cancel itself by either removing it from the queue if it
- * hasn't started yet, or killing the external process.
- *
- * @author mhunsicker
-*/
-public abstract class AbstractRequest implements Request {
-   private long requestID;
-   private String fullCommandLine;
-    private String displayName;
-    private boolean forceOutputToBeShown;
-    private ExecutionQueue executionQueue;
-    private ProcessLauncherServer server;
-    protected ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction = new DummyExecutionInteraction();
-
-    public AbstractRequest(long requestID, String fullCommandLine, String displayName, boolean forceOutputToBeShown, ExecutionQueue executionQueue) {
-       this.requestID = requestID;
-       this.fullCommandLine = fullCommandLine;
-        this.displayName = displayName;
-        this.forceOutputToBeShown = forceOutputToBeShown;
-        this.executionQueue = executionQueue;
-    }
-
-    public long getRequestID() {
-      return requestID;
-    }
-
-    public String getFullCommandLine() {
-        return fullCommandLine;
-    }
-
-    public String getDisplayName() {
-      return displayName;
-    }
-
-    public boolean forceOutputToBeShown() {
-      return forceOutputToBeShown;
-    }
-
-   /**
-     * Cancels this request.
-     */
-    public synchronized boolean cancel() {
-        if (this.server != null) {
-           server.killProcess();
-        }
-
-      executionQueue.removeRequestFromQueue(this);
-        return true;
-    }
-
-    public synchronized void setProcessLauncherServer(ProcessLauncherServer server) {
-        this.server = server;
-    }
-
-    public void setExecutionInteraction( ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction ) {
-      this.executionInteraction = executionInteraction;
-    }
-   
-   /**
-    * This is a dummy ExecutionInteraction. It does nothing. It exists because the requests require one,
-    * but there's a timing issue about when the Request and ExecutionInteraction are paired. Actually,
-    * this mechanism needs to allow for multiple listeners instead of just a single interaction.
-    * I was in the middle of refactoring other things and didn't want to get into that, so I'm doing
-    * this instead. Its only meant to be temporary, but we'll see.
-    */
-   public class DummyExecutionInteraction implements ExecuteGradleCommandServerProtocol.ExecutionInteraction
-   {
-      /**
-       Notification that gradle has started execution. This may not get called
-       if some error occurs that prevents gradle from running.
-       */
-      public void reportExecutionStarted()
-      {
-
-      }
-
-      /**
-       * Notification of the total number of tasks that will be executed. This is
-       * called after reportExecutionStarted and before any tasks are executed.
-       *
-       * @param size the total number of tasks.
-       */
-      public void reportNumberOfTasksToExecute( int size )
-      {
-
-      }
-
-      /**
-       * Notification that execution has finished. Note: if the client fails
-       * to launch at all, this should still be called.
-       *
-       * @param wasSuccessful true if gradle was successful (returned 0)
-       * @param message       the output of gradle if it ran. If it didn't, an error message.
-       * @param throwable     an exception if one occurred
-       */
-      public void reportExecutionFinished( boolean wasSuccessful, String message, Throwable throwable )
-      {
-
-      }
-
-      public void reportTaskStarted( String message, float percentComplete )
-      {
-
-      }
-
-      public void reportTaskComplete( String message, float percentComplete )
-      {
-
-      }
-
-      public void reportLiveOutput( String message )
-      {
-
-      }
-   }
-
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/ExecutionRequest.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/ExecutionRequest.java
deleted file mode 100644
index 9140dc8..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/ExecutionRequest.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.request;
-
-import org.gradle.StartParameter;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.foundation.queue.ExecutionQueue;
-
-import java.io.File;
-
-/**
- * This represents a reques to gradle that is executed in a separate process using the ProcessLauncherServer. This
- * version is for directly executing commands in gradle (the most common type of request).
- *
- * @author mhunsicker
-*/
-public class ExecutionRequest extends AbstractRequest {
-
-   public static final Type TYPE = new Type() {};
-
-    public ExecutionRequest(long requestID, String fullCommandLine, String displayName, boolean forceOutputToBeShown, ExecutionQueue executionQueue) {
-        super(requestID, fullCommandLine, displayName, forceOutputToBeShown, executionQueue);
-    }
-
-    /**
-     * This is called right before this command is executed (because the settings such as log level and stack trace
-     * level can be changed between the time someone initiates a command and it executes). The execution takes place in
-     * another process so this should create the appropriate Protocol suitable for passing the results of the execution
-     * back to us.
-     *
-     * @param  logLevel             the user's log level.
-     * @param  stackTraceLevel      the user's stack trace level
-     * @param  currentDirectory     the current working directory of your gradle project
-     * @param  gradleHomeDirectory  the gradle home directory
-     * @param  customGradleExecutor the path to a custom gradle executable. May be null.
-     * @return a protocol that our server will use to communicate with the launched gradle process.
-    */
-    public ProcessLauncherServer.Protocol createServerProtocol(LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, File currentDirectory, File gradleHomeDirectory, File customGradleExecutor) {
-        executionInteraction.reportExecutionStarted();  //go ahead and fire off that the execution has started. It has from the user's standpoint.
-
-        return new ExecuteGradleCommandServerProtocol(currentDirectory, gradleHomeDirectory, customGradleExecutor, getFullCommandLine(), logLevel, stackTraceLevel, executionInteraction);
-    }
-
-   public void executeAgain( GradlePluginLord gradlePluginLord )
-   {
-      gradlePluginLord.addExecutionRequestToQueue( getFullCommandLine(), getDisplayName(), forceOutputToBeShown() );
-   }
-
-   public Type getType()
-   {
-      return TYPE;
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/RefreshTaskListRequest.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/RefreshTaskListRequest.java
deleted file mode 100644
index 6afc01e..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/RefreshTaskListRequest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.request;
-
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.foundation.ipc.gradle.TaskListServerProtocol;
-import org.gradle.foundation.queue.ExecutionQueue;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * This represents a request to gradle that is executed in a separate process using the ProcessLauncherServer. This is a
- * special request where the results are to build up a project/task tree.
- *
- * @author mhunsicker
- */
-public class RefreshTaskListRequest extends AbstractRequest {
-
-    public static final Type TYPE = new Type() {};
-
-    private GradlePluginLord gradlePluginLord;
-
-    public RefreshTaskListRequest(long requestID, String fullCommandLine, ExecutionQueue executionQueue, GradlePluginLord gradlePluginLord) {
-        super(requestID, fullCommandLine, "Refresh", false, executionQueue);
-        this.gradlePluginLord = gradlePluginLord;
-    }
-
-   /**
-    * This is called right before this command is executed (because the settings such as log level and stack trace
-    * level can be changed between the time someone initiates a command and it executes). The execution takes place in
-    * another process so this should create the appropriate Protocol suitable for passing the results of the execution
-    * back to us.
-    *
-    * @param  logLevel             the user's log level.
-    * @param  stackTraceLevel      the user's stack trace level
-    * @param  currentDirectory     the current working directory of your gradle project
-    * @param  gradleHomeDirectory  the gradle home directory
-    * @param  customGradleExecutor the path to a custom gradle executable. May be null.
-    * @return a protocol that our server will use to communicate with the launched gradle process.
-    */
-    public ProcessLauncherServer.Protocol createServerProtocol(LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, File currentDirectory, File gradleHomeDirectory, File customGradleExecutor) {
-        executionInteraction.reportExecutionStarted();  //go ahead and fire off that the execution has started. It has from the user's standpoint.
-
-        ExecutionInteractionWrapper wrapper = new ExecutionInteractionWrapper(executionInteraction);
-
-        return new TaskListServerProtocol(currentDirectory, gradleHomeDirectory, customGradleExecutor, getFullCommandLine(), logLevel, stackTraceLevel, wrapper);
-    }
-
-    private class ExecutionInteractionWrapper implements TaskListServerProtocol.ExecutionInteraction {
-        private ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction;
-
-        private ExecutionInteractionWrapper(ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction) {
-            this.executionInteraction = executionInteraction;
-        }
-
-        /**
-         * Notification that gradle has started execution. This may not get called if some error occurs that prevents
-         * gradle from running.
-        */
-        public void reportExecutionStarted() {
-            executionInteraction.reportExecutionStarted();
-        }
-
-        /**
-         * Notification that execution has finished. Note: if the client fails to launch at all, this should still be
-         * called.
-         *
-         * @param wasSuccessful true if gradle was successful (returned 0)
-         * @param message       the output of gradle if it ran. If it didn't, an error message.
-         * @param throwable     an exception if one occurred
-         */
-        public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
-            executionInteraction.reportExecutionFinished(wasSuccessful, message, throwable);
-        }
-
-       public void projectsPopulated( List<ProjectView> projects )
-       {
-          gradlePluginLord.setProjects(projects);
-       }
-
-       public void reportLiveOutput(String message) {
-            executionInteraction.reportLiveOutput(message);
-        }
-    }
-
-   public void executeAgain( GradlePluginLord gradlePluginLord )
-   {
-      gradlePluginLord.addRefreshRequestToQueue();
-   }
-
-   public Type getType()
-   {
-      return TYPE;
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/Request.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/Request.java
deleted file mode 100644
index eb55d3a..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/request/Request.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.request;
-
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.foundation.queue.ExecutionQueue;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.StartParameter;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-
-import java.io.File;
-
-/**
- * This represents a reques to gradle that is executed in a separate process using the ProcessLauncherServer.
- *
- * @author mhunsicker
-  */
-public interface Request extends ExecutionQueue.Request {
-
-    public long getRequestID();
-
-    public String getFullCommandLine();
-
-    public String getDisplayName();
-
-    public boolean forceOutputToBeShown();
-
-    /**
-    * This is called internally to link the request with the server that is
-    * running the gradle process.
-    *
-    * @param  server     the server.
-    */
-    public void setProcessLauncherServer(ProcessLauncherServer server);
-
-    /**
-    * Cancels this request.
-    *
-    * @return true if you can cancel or it or if it has already ran. This return code is mainly meant to prevent you from
-    */
-    public boolean cancel();
-
-    public void setExecutionInteraction( ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction );
-
-    /**
-    * This is called right before this command is executed (because the settings such as log level and stack trace
-    * level can be changed between the time someone initiates a command and it executes). The execution takes place in
-    * another process so this should create the appropriate Protocol suitable for passing the results of the execution
-    * back to us.
-    *
-    * @param  logLevel             the user's log level.
-    * @param  stackTraceLevel      the user's stack trace level
-    * @param  currentDirectory     the current working directory of your gradle project
-    * @param  gradleHomeDirectory  the gradle home directory
-    * @param  customGradleExecutor the path to a custom gradle executable. May be null.
-    * @return a protocol that our server will use to communicate with the launched gradle process.
-    */
-    public ProcessLauncherServer.Protocol createServerProtocol(LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, File currentDirectory, File gradleHomeDirectory, File customGradleExecutor);
-
-   public void executeAgain( GradlePluginLord gradlePluginLord );
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/runner/GradleRunner.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/runner/GradleRunner.java
deleted file mode 100644
index 2e2aece..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/runner/GradleRunner.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.runner;
-
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-
-import java.io.File;
-
-/**
- * This executes a command line in an external process.
- *
- * @author mhunsicker
- */
-public class GradleRunner {
-    private File currentDirectory;
-    private File gradleHomeDirectory;
-    private File customGradleExecutor;
-    private ProcessLauncherServer server;
-
-    public GradleRunner(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor) {
-        this.currentDirectory = currentDirectory;
-        this.gradleHomeDirectory = gradleHomeDirectory;
-        this.customGradleExecutor = customGradleExecutor;
-    }
-
-    public synchronized void executeCommand(String commandLine, LogLevel logLevel,
-                                            StartParameter.ShowStacktrace stackTraceLevel,
-                                            ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction) {
-        //the protocol manages the command line and messaging observers
-        ExecuteGradleCommandServerProtocol serverProtocol = new ExecuteGradleCommandServerProtocol(currentDirectory,
-                gradleHomeDirectory, customGradleExecutor, commandLine, logLevel, stackTraceLevel,
-                executionInteraction);
-
-        //the server kicks off gradle as an external process and manages the communication with said process
-        server = new ProcessLauncherServer(serverProtocol);
-        server.addServerObserver(new ProcessLauncherServer.ServerObserver() {
-            public void clientExited(int result, String output) {
-            }
-
-            public void serverExited() {
-                clearServer();
-            }
-        }, false);
-
-        executionInteraction.reportExecutionStarted();  //go ahead and fire off that the execution has started. Normally, this is done by the request, but we don't have a request in this case.
-        server.start();
-    }
-
-    /**
-     * Call this to stop the gradle process.
-     */
-    public synchronized void killProcess() {
-        if (server != null) {
-            server.killProcess();
-        }
-    }
-
-    private synchronized void clearServer() {
-        server = null;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsNode.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsNode.java
deleted file mode 100644
index 424fae7..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsNode.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.settings;
-
-import java.util.List;
-
-/**
- * This provides a mechanism for storing settings. It is a hybrid of a DOM (like xml) and something much simpler like
- * the java preferences. It is first meant to be easy to use. Second, it is supposed to abstract how the settings are
- * actually stored. The point is to allow IDEs and such to store this is whatever manner they choose. Thus, this is
- * vague. Third, it is meant to be relatively easy to implement.
- *
- * While this is a hiearchy, it is not meant to be as complex as XML with arbitrary attributes. Instead, it is only
- * meant to be a key-value pairing. However, the hiearchy allows you to easily have lists and other complex structures
- * without having to worry about name collisions as you would if this were a pure key-value pair.
- *
- * This is meant to be a single tree for the entire application. You shouldn't create these on your own. A node for your
- * use should be given to you by your parent. Only the highest level object should directly create an instance of one of
- * these. It should manage saving and restore these settings.
- *
- * Due to how some 'owners' of the settings work, you should save your settings immediately here (think of this as you
- * would a database). Why? Well, for example: when Idea is the owner in the gradle Idea plugin, it attempts to store its
- * settings very frequently and uses differences in the results to determine if changes have been made to a plugin. As a
- * result, we store things in the setting immediately.
- *
- * This node consists to 3 things: - name: this is the 'key' of key-value pair. It is required. - value: this is the
- * 'value' of key-value pair. It is NOT required. - child nodes: each node can have children nodes.
- *
- * Using these you can create a tree structure storing whatever you like. If you need multiple attributes like XML has,
- * you should create children instead. So if, in xml, you wanted to do:
- *
- * <setting name="myname" value="myvalue" myotherattribute="attribute1" somethingelse="attribute2" >
- *
- * do this instead:
- *
- * node name="myName" value="myvalue" node name="myotherattribute" value="attribute1" node name="somethingelse"
- * value="attribute2"
- *
- * This has several convenience functions for setting and getting values from child nodes. These are meant to be used in
- * more of a java preferences replacement. You should create your own root node of your settings (by call
- * addChildIfNotPresent from a node that is given to you) then you can use these functions and you only need to worry
- * about uniqueness within your own node.
- *
- * @author mhunsicker
- */
-public interface SettingsNode {
-    /**
-     * Sets the name of this node. This is used as its identifier.
-     *
-     * @param name the new name. Cannot be null!
-     */
-    public void setName(String name);
-
-    public String getName();
-
-    /**
-     * Sets the value of this node. This is whatever you like, but is always internally text.
-     *
-     * @param value the new value. Can be null.
-     */
-    public void setValue(String value);
-
-    public String getValue();
-
-    /**
-     * Sets the value of the child node, adding it if it is not already present. This is a convenience function
-     * providing more java preferences-like behavior.
-     *
-     * @param name the name of the child node.
-     * @param value the new value.
-     */
-    public void setValueOfChild(String name, String value);
-
-    /**
-     * Gets the value of the child node. If it is not present, the defaultValue is returned. This is a convenience
-     * function providing more java preferences-like behavior.
-     *
-     * @param name the name of the child node.
-     * @param defaultValue the value to return if the child node is not present
-     * @return the value.
-     */
-    public String getValueOfChild(String name, String defaultValue);
-
-    /**
-     * Sets the value of the child node as an integer, adding it if it is not already present. This is a convenience
-     * function providing more java preferences-like behavior.
-     *
-     * @param name the name of the child node.
-     * @param value the new value.
-     */
-    public void setValueOfChildAsInt(String name, int value);
-
-    /**
-     * Gets the value of the child node as an integer. If it is not present or the value is cannot be interpretted as an
-     * integer, the defaultValue is returned. This is a convenience function providing more java preferences-like
-     * behavior.
-     *
-     * @param name the name of the child node.
-     * @param defaultValue the value to return if the child node is not present or cannot be interpretted as an
-     * integer.
-     * @return the value.
-     */
-    public int getValueOfChildAsInt(String name, int defaultValue);
-
-    //same as setValueOfChildAsInt but with a boolean
-
-    public void setValueOfChildAsBoolean(String name, boolean value);
-
-    //same as getValueOfChildAsInt but with a boolean
-
-    public boolean getValueOfChildAsBoolean(String name, boolean defaultValue);
-
-    //same as setValueOfChildAsInt but with a long
-
-    public void setValueOfChildAsLong(String name, long value);
-
-    //same as getValueOfChildAsInt but with a long
-
-    public long getValueOfChildAsLong(String name, long defaultValue);
-
-    /**
-     * @return a list of all child nodes of this node.
-     */
-    public List<SettingsNode> getChildNodes();
-
-    /**
-     * @param name the names of the sought child nodes.
-     * @return a list of all child nodes of this node that have the specified name. If none are found, this should
-     *         return an empty list. Never null.
-     */
-    public List<SettingsNode> getChildNodes(String name);
-
-    /**
-     * Returns the child node with the specified name.
-     *
-     * @param name the name of the sought node
-     * @return the child settings node or null if no match found.
-     */
-    public SettingsNode getChildNode(String name);
-
-    /**
-     * Call this to add a child node to this node.
-     *
-     * @param name the name of the node
-     * @return the child settings node.
-     */
-    public SettingsNode addChild(String name);
-
-    /**
-     * This adds a child node with the specified name or returns the existing child node if one already exists with said
-     * name.
-     *
-     * @param name the name.
-     * @return the child settings node. Never null.
-     */
-    public SettingsNode addChildIfNotPresent(String name);
-
-    /**
-     * Returns a node at the specified path starting at 'this' node.
-     *
-     * @param pathPortions an array of 'names' of the nodes. The first item corresponds to a direct child of this node.
-     * The second item would be the grand child of this node. etc. etc.
-     * @return a node if it exists. Null if not.
-     */
-    public SettingsNode getNodeAtPath(String... pathPortions);
-
-    /**
-     * Removes this node from its parent.
-     */
-    public void removeFromParent();
-
-    /**
-     * Deletes all the children of this node.
-     */
-    public void removeAllChildren();
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsSerializable.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsSerializable.java
deleted file mode 100644
index a1fab38..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsSerializable.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.foundation.settings;
-
-/**
- * Something that can be serialized to an XML structure. This is meant to store any preferences or settings (lightweight
- * and heavyweight).
- *
- * @author mhunsicker
- */
-public interface SettingsSerializable {
-    /**
-     * Call this to saves the current settings.
-     *
-     * @param settings where you save the settings.
-     */
-    public void serializeOut(SettingsNode settings);
-
-    /**
-     * Call this to read in this object's settings. The reverse of serializeOut.
-     *
-     * @param settings where you read your settings.
-     * @author mhunsicker
-     */
-    public void serializeIn(SettingsNode settings);
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/AlternateUIInteraction.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/AlternateUIInteraction.java
deleted file mode 100644
index 5f9ac3a..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/AlternateUIInteraction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface;
-
-import java.io.File;
-
-/**
- * This allows this plugin to interact with alternative UIs. Specifically, this has callbacks for IDE's so tell it to
- * edit a project file or the like. This is the 'alternate' UI interaction because it interacts with other UIs (other
- * than the built-in UI).
- *
- * @author mhunsicker
- */
-public interface AlternateUIInteraction {
-
-   /**
-    Notification that you should open the specified file and go to the specified line. Its up to the
-    application to determine if this file should be opened for editing or simply displayed. The difference
-    comes into play for things like xml or html files where a user may want to open them in a browser vs
-    a source code file where they may want to open it directly in an IDE.
-
-    @param file the file to opened
-    @param line the line to go to. -1 if no line is specified.
-    */
-    public void openFile( File file, int line );
-
-    /*
-      This is called when we should open the specified file for editing. This version explicitly wants them
-      edited versus just opened.
-
-      @param  file      the file to open
-      @param line the line to go to. -1 if no line is specified.
-      @author mhunsicker
-   */
-    public void editFile( File file, int line );
-
-    /**
-     * Determines if we can call editFile or openFile. This is not a dynamic answer and should always return either true of false.
-     * If you want to change the answer, return true and then handle the files differently in editFiles.
-     *
-     * @return true if support editing files, false otherwise.
-     */
-    public boolean doesSupportEditingOpeningFiles();
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageButton.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageButton.java
deleted file mode 100644
index 63d39ff..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageButton.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.common;
-
-import javax.swing.Action;
-import javax.swing.Icon;
-import javax.swing.InputMap;
-import javax.swing.JButton;
-import javax.swing.KeyStroke;
-import javax.swing.plaf.metal.MetalButtonUI;
-import java.awt.Color;
-import java.awt.Dimension;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.geom.Rectangle2D;
-
-/**
- * This is button that has no border and only an image. It highlights when the user moves over it. This style was
- * modeled after Idea. This was used because the borders on toolbars can get a little busy and this looks a little
- * cleaner.
- *
- * @author mhunsicker
- */
-public class BorderlessImageButton extends JButton {
-    private Color oldBackgroundColor;
-
-    public BorderlessImageButton(Action action, Icon icon) {
-        super(action);
-        setUI();
-
-        // If icon exist use icon otherwise let button use text ( if available ?).
-        if (action.getValue(Action.SMALL_ICON) != null) {
-            setText(null);
-        }
-
-        String name = (String) action.getValue(action.NAME);
-        InputMap inputMap = this.getInputMap(this.WHEN_IN_FOCUSED_WINDOW);
-        KeyStroke keyStroke = (KeyStroke) action.getValue(action.ACCELERATOR_KEY);
-        inputMap.put(keyStroke, name);
-
-        init(icon);
-    }
-
-    private void setUI() {
-        // This fixes an issue where the WindowsButtonUI wants to draw a border
-        // around a button that isn't in a toolbar.  This occurs even if you set
-        // an empty border because it ignores your border and draws its own.
-        setUI(MetalButtonUI.createUI(this));
-    }
-
-    private void init(Icon icon) {
-        setBorder(BorderlessUtility.DEFAULT_BORDER);
-        addMouseListener(new HighlightMouseListener());
-
-        setText(null);
-
-        if (icon != null) {
-            setIcon(icon);
-
-            int height = icon.getIconHeight();
-            int width = icon.getIconWidth();
-            Dimension preferredSize = new Dimension(width + 2, height + 2); //plus 2 for the border
-
-            setMinimumSize(preferredSize);
-            setMaximumSize(preferredSize);
-            setPreferredSize(preferredSize);
-            setFocusPainted(false);
-        }
-    }
-
-    private class HighlightMouseListener extends MouseAdapter {
-        private HighlightMouseListener() {
-        }
-
-        public void mouseEntered(MouseEvent event) {
-            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
-                oldBackgroundColor = BorderlessImageButton.this.getBackground();
-                BorderlessImageButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
-                BorderlessImageButton.this.setBorder(BorderlessUtility.ON_MOUSEOVER_BORDER);
-            }
-        }
-
-        public void mousePressed(MouseEvent event) {
-            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
-                BorderlessImageButton.this.setBackground(BorderlessUtility.ON_BUTTON_PRESSED_BACKGROUND);
-            }
-        }
-
-        public void mouseReleased(MouseEvent event) {
-            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
-                // do a hit test to make sure the mouse is being released inside the button
-                Rectangle2D buttonRect = BorderlessImageButton.this.getBounds();
-                if (buttonRect.contains(event.getPoint())) {
-                    BorderlessImageButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
-                }
-            }
-        }
-
-        public void mouseExited(MouseEvent event) {
-            BorderlessImageButton.this.setBackground(oldBackgroundColor);
-            BorderlessImageButton.this.setBorder(BorderlessUtility.DEFAULT_BORDER);
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageToggleButton.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageToggleButton.java
deleted file mode 100644
index b4a968b..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageToggleButton.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.common;
-
-import javax.swing.Action;
-import javax.swing.BorderFactory;
-import javax.swing.Icon;
-import javax.swing.JToggleButton;
-import javax.swing.border.Border;
-import javax.swing.plaf.metal.MetalButtonUI;
-import java.awt.Dimension;
-import java.awt.Color;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.geom.Rectangle2D;
-
-/**
- * This is button that has no border and only an image. It highlights when the user moves over it. This version is a
- * toggle button. This style was modeled after Idea. This was used because the borders on toolbars can get a little busy
- * and this looks a little cleaner.
- *
- * @author mhunsicker
- */
-public class BorderlessImageToggleButton extends JToggleButton {
-    public Border selectedBorder = BorderFactory.createLoweredBevelBorder();
-    private Color defaultBackground;
-
-    public BorderlessImageToggleButton(Action action, Icon icon) {
-        super(action);
-        setUI();
-
-        this.init(icon);
-    }
-
-    private void setUI() {
-        // This fixes an issue where the WindowsButtonUI wants to draw a border
-        // around a button that isn't in a toolbar.  This occurs even if you set
-        // an empty border because it ignores your border and draws its own.
-        setUI(MetalButtonUI.createUI(this));
-    }
-
-    private void init(Icon icon) {
-        this.setBorder(BorderlessUtility.DEFAULT_BORDER);
-        defaultBackground = this.getBackground();
-        this.addMouseListener(new HighlightMouseListener());
-
-        setText(null);
-
-        if (icon != null) {
-            setIcon(icon);
-
-            int height = icon.getIconHeight();
-            int width = icon.getIconWidth();
-            Dimension preferredSize = new Dimension(width + 2, height + 2); //plus 2 for the border
-
-            setMinimumSize(preferredSize);
-            setMaximumSize(preferredSize);
-            setPreferredSize(preferredSize);
-            setFocusPainted(false);
-        }
-    }
-
-    public void setSelected(boolean select) {
-        super.setSelected(select);
-        setBorder(null);
-    }
-
-    /**
-     * I added this to correct an architecture
-     * problem. Whenever this button was removed or added to a parent container the underlying swing architecture was
-     * resetting the border and it wasn't taking into account our need to change the border depending on the selection
-     * state of the button. This overrides negates that effect causing the button to behave as intended.
-     *
-     * @param border The new border to set for this button the we disregard and replace with our own.
-     * @author wwhitaker
-     */
-    public void setBorder(Border border) {
-        super.setBorder(
-                BorderlessImageToggleButton.this.isSelected() ? selectedBorder : BorderlessUtility.DEFAULT_BORDER);
-    }
-
-    private class HighlightMouseListener extends MouseAdapter {
-        public HighlightMouseListener() {
-        }
-
-        public void mouseEntered(MouseEvent event) {
-            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
-                BorderlessImageToggleButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
-                BorderlessImageToggleButton.this.setBorder(BorderlessUtility.ON_MOUSEOVER_BORDER);
-            }
-        }
-
-        public void mousePressed(MouseEvent event) {
-            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
-                BorderlessImageToggleButton.this.setBackground(BorderlessUtility.ON_BUTTON_PRESSED_BACKGROUND);
-            }
-        }
-
-        public void mouseReleased(MouseEvent event) {
-            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
-                // do a hit test to make sure the mouse is being released inside the button
-                Rectangle2D buttonRect = BorderlessImageToggleButton.this.getBounds();
-                if (buttonRect.contains(event.getPoint())) {
-                    BorderlessImageToggleButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
-                }
-            }
-        }
-
-        public void mouseExited(MouseEvent event) {
-            BorderlessImageToggleButton.this.setBackground(defaultBackground );
-
-            if (BorderlessImageToggleButton.this.isSelected()) {
-                BorderlessImageToggleButton.this.setBorder(selectedBorder);
-            } else {
-                BorderlessImageToggleButton.this.setBorder(BorderlessUtility.DEFAULT_BORDER);
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessUtility.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessUtility.java
deleted file mode 100644
index 77e6db5..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessUtility.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.common;
-
-import javax.swing.BorderFactory;
-import javax.swing.UIManager;
-import javax.swing.border.Border;
-import java.awt.Color;
-
-/**
- * Utility functions/constants for borderless buttons
- *
- * @author mhunsicker
- */
-public class BorderlessUtility {
-    public static final Color ON_MOUSE_OVER_BACKGROUND = new Color(181, 190, 214);
-    public static final Color ON_BUTTON_PRESSED_BACKGROUND = new Color(130, 146, 185);
-    public static final Border ON_MOUSEOVER_BORDER = BorderFactory.createLineBorder(new Color(8, 36, 107));
-
-    //make the default border NOT an EMPTY border (so things don't resize), but make it appear clear by using the panel background color
-    public static final Border DEFAULT_BORDER = BorderFactory.createLineBorder(UIManager.getColor("Panel.background"));
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/PreferencesAssistant.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/PreferencesAssistant.java
deleted file mode 100644
index eb32e60..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/PreferencesAssistant.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.common;
-
-import org.gradle.api.UncheckedIOException;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-
-import javax.swing.JFileChooser;
-import javax.swing.JFrame;
-import javax.swing.JSplitPane;
-import java.awt.Dimension;
-import java.awt.Point;
-import java.awt.Window;
-import java.io.File;
-import java.io.IOException;
-
-/**
- * This class just helps do some of the mundane tasks of saving and restoring the location of something.
- *
- * @author mhunsicker
- */
-public class PreferencesAssistant {
-    private static final String WINDOW_X = "window_x";
-    private static final String WINDOW_Y = "window_y";
-    private static final String WINDOW_WIDTH = "window_width";
-    private static final String WINDOW_HEIGHT = "window_height";
-    private static final String EXTENDED_STATE = "extended-state";
-    private static final String DIVIDER_LOCATION = "divider_location";
-    private static final String DIRECTORY_NAME = "directory_name";
-
-    public static SettingsNode saveSettings(SettingsNode settingsNode, Window window, String id, Class windowClass) {
-        Point p = window.getLocation();
-        Dimension size = window.getSize();
-
-        SettingsNode childNode = settingsNode.addChildIfNotPresent(getPrefix(windowClass, id));
-
-        childNode.setValueOfChildAsInt(WINDOW_X, p.x);
-        childNode.setValueOfChildAsInt(WINDOW_Y, p.y);
-        childNode.setValueOfChildAsInt(WINDOW_WIDTH, size.width);
-        childNode.setValueOfChildAsInt(WINDOW_HEIGHT, size.height);
-
-        return childNode;
-    }
-
-    /**
-     * This version works for frames. It makes sure it doesn't save the extended state (maximized, iconified, etc) if
-     * its iconified. Doing so, causes problems when its restored.
-     */
-    public static void saveSettings(SettingsNode settingsNode, JFrame frame, String id, Class windowClass) {
-        if (frame.getExtendedState() == JFrame.ICONIFIED) {
-            return;
-        }
-
-        SettingsNode childNode = saveSettings(settingsNode, (Window) frame, id, windowClass);
-
-        if (frame.getExtendedState() != JFrame.ICONIFIED) {
-            childNode.setValueOfChildAsInt(EXTENDED_STATE, frame.getExtendedState());
-        }
-    }
-
-    /**
-     * Call this to restore the preferences that were saved via a call to save settings. Note: if no preferences are
-     * found it doesn't do anything.
-     *
-     * @param window the window who's settings to save
-     * @param id a unique ID for these settings.
-     * @param windowClass Any class. Just used for the preferences mechanism to obtain an instance. Making this an
-     * argument gives you more flexibility.
-     */
-    public static SettingsNode restoreSettings(SettingsNode settingsNode, Window window, String id, Class windowClass) {
-        SettingsNode childNode = settingsNode.getChildNode(getPrefix(windowClass, id));
-        if (childNode == null) {
-            return null;
-        }
-
-        int x = childNode.getValueOfChildAsInt(WINDOW_X, window.getLocation().x);
-        int y = childNode.getValueOfChildAsInt(WINDOW_Y, window.getLocation().y);
-        int width = childNode.getValueOfChildAsInt(WINDOW_WIDTH, window.getSize().width);
-        int height = childNode.getValueOfChildAsInt(WINDOW_HEIGHT, window.getSize().height);
-
-        window.setLocation(x, y);
-        window.setSize(width, height);
-
-        return childNode;
-    }
-
-    /**
-     * This restores the position of a frame. We not only restore the size, but we'll maximize it if its was maximized
-     * when saved.
-     */
-    public static void restoreSettings(SettingsNode settingsNode, JFrame frame, String id, Class windowClass) {
-        SettingsNode childNode = restoreSettings(settingsNode, (Window) frame, id, windowClass);
-        if (childNode == null) {
-            return;
-        }
-
-        int extendedState = childNode.getValueOfChildAsInt(EXTENDED_STATE, frame.getExtendedState());
-
-        if (extendedState != JFrame.ICONIFIED) {
-            frame.setExtendedState(extendedState);
-        }
-    }
-
-    public static void saveSettings(SettingsNode settingsNode, JSplitPane splitter, String id, Class splitterClass) {
-        SettingsNode childNode = settingsNode.addChildIfNotPresent(getPrefix(splitterClass, id));
-
-        childNode.setValueOfChildAsInt(DIVIDER_LOCATION, splitter.getDividerLocation());
-    }
-
-    public static void restoreSettings(SettingsNode settingsNode, JSplitPane splitter, String id, Class splitterClass) {
-        SettingsNode childNode = settingsNode.getChildNode(getPrefix(splitterClass, id));
-        if (childNode == null) {
-            return;
-        }
-
-        int location = childNode.getValueOfChildAsInt(DIVIDER_LOCATION, splitter.getDividerLocation());
-        splitter.setDividerLocation(location);
-    }
-
-    private static String getPrefix(Class aClass, String id) {
-        return aClass.getSimpleName() + '_' + id;
-    }
-
-    /**
-     * Saves the settings of the file chooser; and by settings I mean the 'last visited directory'.
-     *
-     * @param saveCurrentDirectoryVsSelectedFilesParent this should be true true if you're selecting only directories,
-     * false if you're selecting only files. I don't know what if you allow both.
-     */
-    public static void saveSettings(SettingsNode settingsNode, JFileChooser fileChooser, String id,
-                                    Class fileChooserClass, boolean saveCurrentDirectoryVsSelectedFilesParent) {
-        SettingsNode childNode = settingsNode.addChildIfNotPresent(getPrefix(fileChooserClass, id));
-
-        String save;
-        try {
-            if (saveCurrentDirectoryVsSelectedFilesParent) {
-                save = fileChooser.getCurrentDirectory().getCanonicalPath();
-            } else {
-                save = fileChooser.getSelectedFile().getCanonicalPath();
-            }
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-        if (save != null) {
-            childNode.setValueOfChild(DIRECTORY_NAME, save);
-        }
-    }
-
-    public static void restoreSettings(SettingsNode settingsNode, JFileChooser fileChooser, String id,
-                                       Class fileChooserClass) {
-        SettingsNode childNode = settingsNode.getChildNode(getPrefix(fileChooserClass, id));
-        if (childNode == null) {
-            return;
-        }
-
-        String lastDirectory = childNode.getValueOfChild(DIRECTORY_NAME, null);
-
-        if (lastDirectory != null) {
-            fileChooser.setCurrentDirectory(new File(lastDirectory));
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/AbstractGradleUIInstance.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/AbstractGradleUIInstance.java
deleted file mode 100644
index 81b7538..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/AbstractGradleUIInstance.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Font;
-import java.io.File;
-
-/**
- A simple UI for gradle that is meant to be embedded into an IDE. This doesn't
- have it own output since most IDEs have their own mechanism for that.
- @author mhunsicker
-*/
-public abstract class AbstractGradleUIInstance implements BasicGradleUI {
-    protected MainGradlePanel gradlePanel;
-    protected GradlePluginLord gradlePluginLord;
-    protected SettingsNode settings;
-    protected AlternateUIInteraction alternateUIInteraction;
-
-    protected JPanel mainPanel;
-
-   public AbstractGradleUIInstance()
-    {
-      gradlePluginLord = new GradlePluginLord();
-    }
-
-   public void initialize( SettingsNode settings, AlternateUIInteraction alternateUIInteraction ) {
-        this.settings = settings;
-        this.alternateUIInteraction = alternateUIInteraction;
-
-        setupUI();
-    }
-
-    public JComponent getComponent() {
-        return mainPanel;
-    }
-
-    protected void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-        mainPanel.add( createMainGradlePanel(), BorderLayout.CENTER);
-    }
-
-    protected Component createMainGradlePanel() {
-        gradlePanel = new MainGradlePanel(gradlePluginLord, getOutputUILord(), settings, alternateUIInteraction);
-        return gradlePanel;
-    }
-
-    public abstract OutputUILord getOutputUILord();
-
-    /**
-       Call this whenever you're about to show this panel. We'll do whatever
-       initialization is necessary.
-    */
-    public void aboutToShow() {
-        gradlePanel.aboutToShow();
-    }
-
-    /**
-       Call this to deteremine if you can close this pane. if we're busy, we'll
-       ask the user if they want to close.
-
-       @param  closeInteraction allows us to interact with the user
-       @return true if we can close, false if not.
-    */
-    public boolean canClose(CloseInteraction closeInteraction) {
-        if( !gradlePluginLord.isBusy() ) {
-           return true;
-        }
-
-       return closeInteraction.promptUserToConfirmClosingWhileBusy();
-    }
-
-    /**
-       Call this before you close the pane. This gives it an opportunity to do
-       cleanup. You probably should call canClose before this. It gives the
-       app a chance to cancel if its busy.
-    */
-    public void close() {
-        gradlePanel.aboutToClose();
-    }
-
-    public File getCurrentDirectory() {
-        return gradlePluginLord.getCurrentDirectory();
-    }
-
-    public void setCurrentDirectory(File currentDirectory) {
-        gradlePluginLord.setCurrentDirectory(currentDirectory);
-    }
-
-    /**
-       Call this to add one of your own tabs to this. You can call this at any
-       time.
-       @param  index      where to add the tab
-       @param  gradleTab  the tab to add
-    */
-    public void addGradleTab(int index, GradleTab gradleTab) {
-        gradlePanel.addGradleTab(index, gradleTab);
-    }
-
-    /**
-       Call this to remove one of your own tabs from this.
-       @param  gradleTab  the tab to remove
-    */
-    public void removeGradleTab(GradleTab gradleTab) {
-        gradlePanel.removeGradleTab(gradleTab);
-    }
-
-    /**
-       @return the total number of tabs.
-    */
-    public int getGradleTabCount() {
-        return gradlePanel.getGradleTabCount();
-    }
-
-    /**
-       @param  index      the index of the tab
-       @return the name of the tab at the specified index.
-    */
-    public String getGradleTabName(int index) {
-        return gradlePanel.getGradleTabName(index);
-    }
-
-    public GradlePluginLord getGradlePluginLord() {
-        return gradlePluginLord;
-    }
-
-    /**
-     * Returns the index of the gradle tab with the specified name.
-     *
-     * @param name the name of the tab
-     * @return the index of the tab or -1 if not found
-     */
-    public int getGradleTabIndex(String name) {
-        return gradlePanel.getGradleTabIndex(name);
-    }
-
-    /**
-     * @return the currently selected tab
-     */
-    public int getCurrentGradleTab() {
-        return gradlePanel.getCurrentGradleTab();
-    }
-
-    /**
-     * Makes the specified tab the current tab.
-     *
-     * @param index the index of the tab.
-     */
-    public void setCurrentGradleTab(int index) {
-        gradlePanel.setCurrentGradleTab( index );
-    }
-
-    /*
-      This executes the given gradle command.
-
-      @param  commandLineArguments the command line arguments to pass to gradle.
-      @param displayName           the name displayed in the UI for this command
-      @author mhunsicker
-   */
-   public void executeCommand( String commandLineArguments, String displayName )
-   {
-      gradlePluginLord.addExecutionRequestToQueue( commandLineArguments, displayName );
-   }
-
-   /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    */
-   public void refreshTaskTree()
-   {
-      gradlePluginLord.addRefreshRequestToQueue();
-   }
-
-    /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    @param additionalCommandLineArguments additional command line arguments to be passed to gradle when
-                                          refreshing the task tree.
-    */
-   public void refreshTaskTree( String additionalCommandLineArguments )
-   {
-      gradlePluginLord.addRefreshRequestToQueue( additionalCommandLineArguments );
-   }
-
-   /**
-    Determines if commands are currently being executed or not.
-
-    @return true if we're busy, false if not.
-    */
-   public boolean isBusy()
-   {
-      return gradlePluginLord.isBusy();
-   }
-
-   /**
-    This adds the specified component to the setup panel. It is added below the last
-    'default' item. You can only add 1 component here, so if you need to add multiple
-    things, you'll have to handle adding that to yourself to the one component.
-    @param component the component to add.
-    */
-   public void setCustomPanelToSetupTab( JComponent component ) {
-      gradlePanel.setCustomPanelToSetupTab( component );
-   }
-
-   /**
-    Sets the font for the output text
-    @param font the new font
-    */
-   public void setOutputTextFont( Font font ) {
-      getOutputUILord().setOutputTextFont( font );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/BasicGradleUI.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/BasicGradleUI.java
deleted file mode 100644
index b1758b9..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/BasicGradleUI.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
-
-import javax.swing.JComponent;
-import java.awt.Font;
-
-/**
- .
-
- @author mhunsicker
- */
-public interface BasicGradleUI
-{
-   public GradlePluginLord getGradlePluginLord();
-
-/*
-      @return the panel for this pane. This can be inserted directly into your UI.
-      @author mhunsicker
-   */
-   public JComponent getComponent();
-
-   /*
-      Call this whenever you're about to show this panel. We'll do whatever
-      initialization is necessary.
-      @author mhunsicker
-   */
-   public void aboutToShow();
-
-   //
-            public interface CloseInteraction
-            {
-               /*
-                  This is called if gradle tasks are being executed and you want to know if
-                  we can close. Ask the user.
-                  @return true if the user confirms cancelling the current tasks. False if not.
-                  @author mhunsicker
-               */
-               public boolean promptUserToConfirmClosingWhileBusy();
-            }
-
-   /*
-      Call this to deteremine if you can close this pane. if we're busy, we'll
-      ask the user if they want to close.
-
-      @param  closeInteraction allows us to interact with the user
-      @return true if we can close, false if not.
-      @author mhunsicker
-   */
-   public boolean canClose( CloseInteraction closeInteraction );
-
-   /*
-      Call this before you close the pane. This gives it an opportunity to do
-      cleanup. You probably should call canClose before this. It gives the
-      app a chance to cancel if its busy.
-      @author mhunsicker
-   */
-   public void close();
-
-   /*
-      @return the total number of tabs.
-      @author mhunsicker
-   */
-   public int getGradleTabCount();
-
-   /*
-      @param  index      the index of the tab
-      @return the name of the tab at the specified index.
-      @author mhunsicker
-   */
-   public String getGradleTabName( int index );
-
-    /**
-     * Returns the index of the gradle tab with the specified name.
-     * @param name the name of the tab
-     * @return the index of the tab or -1 if not found
-     */
-    public int getGradleTabIndex( String name );
-
-    /**
-     * @return the currently selected tab
-     */
-    public int getCurrentGradleTab();
-
-    /**
-     * Makes the specified tab the current tab.
-     * @param index the index of the tab.
-     */
-    public void setCurrentGradleTab( int index );
-
-   /*
-      Call this to execute the given gradle command.
-
-      @param  commandLineArguments the command line arguments to pass to gradle.
-      @param displayName           the name displayed in the UI for this command
-      @author mhunsicker
-   */
-   public void executeCommand( String commandLineArguments, String displayName );
-
-   /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    */
-   public void refreshTaskTree();
-
-    /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    @param additionalCommandLineArguments additional command line arguments to be passed to gradle when
-                                          refreshing the task tree.
-    */
-   public void refreshTaskTree( String additionalCommandLineArguments );
-
-   /**
-       Call this to add one of your own tabs to this. You can call this at any
-       time.
-       @param  index      where to add the tab
-       @param  gradleTab  the tab to add
-    */
-   public void addGradleTab(int index, GradleTab gradleTab);
-
-    /**
-       Call this to remove one of your own tabs from this.
-       @param  gradleTab  the tab to remove
-    */
-    public void removeGradleTab(GradleTab gradleTab);
-
-    public OutputUILord getOutputUILord();
-
-   /**
-      Determines if commands are currently being executed or not.
-      @return true if we're busy, false if not.
-   */
-   public boolean isBusy();
-
-   /**
-    This adds the specified component to the setup panel. It is added below the last
-    'default' item. You must call this after initialize
-    @param component the component to add.
-    */
-   public void setCustomPanelToSetupTab( JComponent component );
-
-   /**
-    Sets the font for the output text
-    @param font the new font
-    */
-   public void setOutputTextFont( Font font );
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/DualPaneUIInstance.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/DualPaneUIInstance.java
deleted file mode 100644
index c981310..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/DualPaneUIInstance.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-
-import javax.swing.JPanel;
-import java.awt.BorderLayout;
-import java.awt.Component;
-
-/**
- A simple UI for gradle. This has two panels that can be inserted into a
- stand-alone application or an IDE. This is meant to hide most of the complexities
- of gradle. The two panes are a tabbed pane for executing tasks and an output pane.
-
- @author mhunsicker
-  */
-public class DualPaneUIInstance extends AbstractGradleUIInstance
-{
-   private OutputPanelLord outputPanelLord;
-
-   public DualPaneUIInstance() { }
-
-
-    public void initialize( SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
-
-        outputPanelLord = new OutputPanelLord( gradlePluginLord, alternateUIInteraction );
-
-        super.initialize( settings, alternateUIInteraction );
-    }
-
-   /**
-    We've overridden this to setup our splitter and our output window.
-    */
-   @Override
-    protected void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-        mainPanel.add( createMainGradlePanel(), BorderLayout.CENTER);
-    }
-
-   public OutputUILord getOutputUILord() {
-      return outputPanelLord;
-   }
-
-   public Component getOutputPanel() {
-      return outputPanelLord.getMainPanel();
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/MainGradlePanel.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/MainGradlePanel.java
deleted file mode 100644
index 216d95f..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/MainGradlePanel.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.CommandLineTab;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.FavoriteTasksTab;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.SetupTab;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.TaskTreeTab;
-
-import javax.swing.*;
-import javax.swing.event.ChangeListener;
-import javax.swing.event.ChangeEvent;
-import java.awt.BorderLayout;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This is a tabbed pane meant to handle several tabs of gradle-related things. To use this, instantiate it, place it
- * some Swing container (dialog, frame), then call aboutToShow() before you show the parent container. You can also add
- * your own tabs to this (just call addGradleTab before calling aboutToShow()). When you shut down, call aboutToClose()
- * before doing so.
- *
- * @author mhunsicker
-  */
-public class MainGradlePanel extends JPanel {
-    private static final String CURRENT_TAB = "current-tab";
-    private static final String MAIN_PANEL = "main_panel";
-
-    private GradlePluginLord gradlePluginLord;
-
-    private SettingsNode settings;
-    private AlternateUIInteraction alternateUIInteraction;
-
-    private List<GradleTab> gradleTabs = new ArrayList<GradleTab>();
-
-    private JTabbedPane tabbedPane;
-   private SetupTab setupTab;
-
-   public MainGradlePanel(GradlePluginLord gradlePluginLord, OutputUILord outputUILord, SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
-        this.alternateUIInteraction = alternateUIInteraction;
-        this.gradlePluginLord = gradlePluginLord;
-        this.settings = settings;
-        addDefaultTabs( outputUILord, alternateUIInteraction);
-    }
-
-    private void addDefaultTabs(OutputUILord outputUILord, AlternateUIInteraction alternateUIInteraction) {
-        //we'll give each tab their own settings node just so we don't have to worry about collisions.
-        gradleTabs.add(new TaskTreeTab(gradlePluginLord, settings.addChildIfNotPresent("task-tab"), alternateUIInteraction));
-        gradleTabs.add(new FavoriteTasksTab(gradlePluginLord, settings.addChildIfNotPresent("favorites-tab")));
-        gradleTabs.add(new CommandLineTab(gradlePluginLord, settings.addChildIfNotPresent("command_line-tab")));
-        setupTab = new SetupTab(gradlePluginLord, outputUILord, settings.addChildIfNotPresent("setup-tab"));
-        gradleTabs.add( setupTab );
-    }
-
-    private int getGradleTabIndex(Class soughtClass) {
-        for (int index = 0; index < gradleTabs.size(); index++) {
-            GradleTab gradleTab = gradleTabs.get(index);
-            if (gradleTab.getClass() == soughtClass) {
-               return index;
-            }
-        }
-        return -1;
-    }
-
-    public int getGradleTabIndex(String name) {
-        if (name != null) {
-            for (int index = 0; index < gradleTabs.size(); index++) {
-                GradleTab gradleTab = gradleTabs.get(index);
-                if (name.equals(gradleTab.getName())) {
-                   return index;
-                }
-            }
-        }
-        return -1;
-    }
-
-    /**
-     * @return the currently selected tab
-     */
-    public int getCurrentGradleTab() {
-        return tabbedPane.getSelectedIndex();
-    }
-
-
-    public void setCurrentGradleTab(int index) {
-        if( index >= 0 && index < getGradleTabCount() ) {
-            tabbedPane.setSelectedIndex( index );
-        }
-    }
-
-
-    /**
-     * Call this to add one of your own tabs to this. You must call this before you call aboutToShow.
-    */
-    public void addGradleTab(int index, GradleTab gradleTab) {
-        //this can ultimately be called via external APIs so let's add a little extra error checking.
-        if (index < 0) {
-           index = 0;
-        }
-       if (index > gradleTabs.size()) {
-           index = gradleTabs.size();
-        }
-
-       gradleTabs.add(index, gradleTab);
-
-        if (tabbedPane != null) {   //if we've already displayed the tabs, we'll need to manually add it now to the tabbed pane.
-           addGradleTabToTabbedPane(index, gradleTab);
-        }
-    }
-
-    //this adds the tab. This is only to be used when adding a tab after the tabbed
-    //pane has already been displayed and populated with tabs.
-    private void addGradleTabToTabbedPane(int index, GradleTab gradleTab) {
-        tabbedPane.add(gradleTab.createComponent(), index);
-        tabbedPane.setTitleAt(index, gradleTab.getName());
-    }
-
-    public void removeGradleTab(GradleTab gradleTab) {
-        int existingIndex = gradleTabs.indexOf(gradleTab);
-        if (existingIndex == -1) {
-           return;
-        }
-
-       gradleTabs.remove(gradleTab);
-
-        tabbedPane.remove(existingIndex);
-
-        tabbedPane.invalidate();
-        tabbedPane.revalidate();
-        tabbedPane.repaint();
-    }
-
-    /**
-     * @return the total number of tabs.
-    */
-    public int getGradleTabCount() {
-        return gradleTabs.size();
-    }
-
-    /**
-     * @param index the index of the tab
-     * @return the name of the tab at the specified index.
-    */
-    public String getGradleTabName(int index) {
-        return gradleTabs.get(index).getName();
-    }
-
-    /**
-     * This is called when this about to displayed. Do any kind of initialization you need to do here.
-    */
-    public void aboutToShow() {
-        setupUI();
-
-        Iterator<GradleTab> iterator = gradleTabs.iterator();
-        while (iterator.hasNext()) {
-            GradleTab gradleTab = iterator.next();
-            gradleTab.aboutToShow();
-        }
-
-        //now start up the plugin now that everything has been initialized
-        gradlePluginLord.startExecutionQueue();
-    }
-
-    /**
-     * Notification that we're about to be closed. Here we're going to save our current settings.
-    */
-    public void aboutToClose() {
-    }
-
-    private void setupUI() {
-        setLayout(new BorderLayout());
-
-        tabbedPane = new JTabbedPane();
-        add(tabbedPane, BorderLayout.CENTER);
-
-        addTabs();
-
-        restoreLastTab();
-
-        //add a listener so we can store the current tab when it changes.
-        tabbedPane.addChangeListener(new ChangeListener() {
-            public void stateChanged(ChangeEvent e) {
-                int selection = tabbedPane.getSelectedIndex();
-                if (selection >= 0 && selection < gradleTabs.size()) {
-                    SettingsNode rootNode = settings.addChildIfNotPresent(MAIN_PANEL);
-                    rootNode.setValueOfChild(CURRENT_TAB, gradleTabs.get(selection).getName());
-                }
-            }
-        });
-    }
-
-    private void restoreLastTab() {
-        //if they're not setup, make the setup tab visible first.
-        if (!gradlePluginLord.isSetupComplete()) {
-            int tabToSelect = getGradleTabIndex(SetupTab.class);
-            if (tabToSelect != -1) {
-               tabbedPane.setSelectedIndex(tabToSelect);
-            }
-        } else {  //otherwise, try to get the last-used tab
-            int lastTabIndex = -1;
-
-            //all this is to just restore the last selected tab
-            SettingsNode rootNode = settings.getChildNode(MAIN_PANEL);
-            if (rootNode != null) {
-                String lastTabName = rootNode.getValueOfChild(CURRENT_TAB, "");
-                lastTabIndex = getGradleTabIndex(lastTabName);
-            }
-
-            if (lastTabIndex != -1) {
-               tabbedPane.setSelectedIndex(lastTabIndex);
-            }
-        }
-    }
-
-    private void addTabs() {
-        Iterator<GradleTab> iterator = gradleTabs.iterator();
-        while (iterator.hasNext()) {
-            GradleTab gradleTab = iterator.next();
-            tabbedPane.add(gradleTab.getName(), gradleTab.createComponent());
-        }
-    }
-
-   /**
-    This adds the specified component to the setup panel. It is added below the last
-    'default' item. You can only add 1 component here, so if you need to add multiple
-    things, you'll have to handle adding that to yourself to the one component.
-    @param component the component to add.
-    */
-   public void setCustomPanelToSetupTab( JComponent component ) {
-      setupTab.setCustomPanel( component );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanel.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanel.java
deleted file mode 100644
index 55429a4..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanel.java
+++ /dev/null
@@ -1,501 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.BuildResult;
-import org.gradle.StartParameter;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.foundation.output.FileLinkDefinitionLord;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JProgressBar;
-import javax.swing.SwingUtilities;
-import javax.swing.UIManager;
-import javax.swing.JButton;
-import javax.swing.AbstractAction;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Font;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.ActionEvent;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.io.File;
-
-/**
- * This is a panel that displays the results of executing a gradle command. It shows gradle's output as well as
- * progress.
- *
- * @author mhunsicker
- */
-public class OutputPanel extends JPanel implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
-
-    private OutputPanelParent parent;
-    private AlternateUIInteraction alternateUIInteraction;
-
-    private JPanel gradleOutputTextPanel;
-    private OutputTextPane gradleOutputTextPane;
-
-    private JPanel progressPanel;
-    private JLabel progressLabel;
-    private JProgressBar progressBar;
-
-    private JPanel statusPanel;
-    private JLabel statusLabel;
-
-    private JButton executeAgainButton;
-
-    private JLabel forceShowOutputButtonLabel;   //a label that acts like a button
-
-    private boolean isBusy;     //is this actively showing output?
-    private boolean isPending;  //is this waitin got show output?
-    private boolean isPinned;   //keeps this panel open and disallows it from being re-used.
-    private boolean showProgress = true;
-    private boolean onlyShowOutputOnErrors;
-
-    private Request request;
-
-   public interface OutputPanelParent {
-
-       public void removeOutputPanel( OutputPanel outputPanel );
-
-       void reportExecuteFinished( Request request, boolean wasSuccessful );
-
-       void executeAgain( Request request, OutputPanel outputPanel );
-
-       public FileLinkDefinitionLord getFileLinkDefinitionLord();
-   }
-
-    public OutputPanel( OutputPanelParent parent, AlternateUIInteraction alternateUIInteraction ) {
-       this.parent = parent;
-       this.alternateUIInteraction = alternateUIInteraction;
-    }
-
-   /**
-    Call this after initializing this, but after setting any additional swing properties (actually, just the font for now).
-    I really only added this as an optimization. Since we'll always be setting the font, I didn't want the various style
-    objects created only to be thrown away and re-created. This way, you can set the font before we create the styles.
-
-    */
-   public void initialize() {
-      setupUI();
-   }
-
-   /**
-    * This is called whenever a new request is made. It associates this request with this output panel.
-    *
-    * @param request
-    * @param onlyShowOutputOnErrors
-    */
-   public void setRequest( Request request, boolean onlyShowOutputOnErrors )
-   {
-      this.request = request;
-      if( request.forceOutputToBeShown() ) {
-         setOnlyShowOutputOnErrors(false);
-      }
-      else {
-         setOnlyShowOutputOnErrors( onlyShowOutputOnErrors );
-      }
-
-      //set this to indeterminate until we figure out how many tasks to execute.
-      progressBar.setIndeterminate( true );
-      progressBar.setStringPainted( false ); //And don't show '0%' in the mean time.
-
-      setPending(true);
-      showProgress(true);   //make sure the progress is shown. It may have been turned off if we're reusing this component
-
-      appendGradleOutput( getPrefixText() );
-   }
-
-   /**
-    * Returns a string stating the command we're currently executing. This is placed at the beginning of
-    * the output text. This is called when we start and when the command is finished (where we replace all
-    * of our text with the total output)
-    */
-   private String getPrefixText() {return "Executing command: \"" + request.getFullCommandLine() + "\"\n";}
-
-   public boolean isPinned() {
-        return isPinned;
-    }
-
-    public void setPinned(boolean pinned) {
-        isPinned = pinned;
-    }
-
-    public boolean isBusy() {
-        return isBusy;
-    }
-
-    protected void setBusy(boolean busy) {
-        isBusy = busy;
-    }   //this should be the only way to isBusy.
-
-    public boolean isPending() {
-        return isPending;
-    }
-
-    private void setPending(boolean pending) {
-        isPending = pending;
-        if (isPending) {
-           statusLabel.setText("Waiting to execute");
-        }
-
-       progressBar.setVisible(!isPending);
-    }
-
-    public Request getRequest() {
-        return request;
-    }
-
-    private void setupUI() {
-        setLayout(new BorderLayout());
-
-        add(createInfoPanel(), BorderLayout.NORTH);
-        add(createGradleOutputPanel(), BorderLayout.CENTER);
-    }
-
-    private Component createGradleOutputPanel() {
-        gradleOutputTextPanel = new JPanel(new BorderLayout());
-
-        gradleOutputTextPane = new OutputTextPane( new OutputTextPane.Interaction()
-        {
-           public void fileClicked( File file, int line )
-           {
-              alternateUIInteraction.openFile( file, line );
-           }
-        }, alternateUIInteraction.doesSupportEditingOpeningFiles(), getFont(), parent.getFileLinkDefinitionLord() );
-
-        gradleOutputTextPanel.add( gradleOutputTextPane.asComponent(), BorderLayout.CENTER);
-
-        return gradleOutputTextPanel;
-    }
-
-    private Component createInfoPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        panel.add(createStatusPanel());
-        panel.add(createProgressPanel());
-
-        return panel;
-    }
-
-    private Component createProgressPanel() {
-        progressPanel = new JPanel(new BorderLayout());
-        progressLabel = new JLabel("Progress");
-        progressBar = new JProgressBar();
-        progressBar.setStringPainted(true);
-
-        progressPanel.add(progressBar, BorderLayout.NORTH);
-        progressPanel.add(progressLabel, BorderLayout.SOUTH);
-
-        progressPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
-
-        progressPanel.setVisible(false);
-        return progressPanel;
-    }
-
-    private Component createStatusPanel() {
-        statusPanel = new JPanel();
-        statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));
-        statusLabel = new JLabel();
-       executeAgainButton = Utility.createButton( OutputPanel.class, "/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png", "Execute Again", new AbstractAction()
-        {
-           public void actionPerformed( ActionEvent e )
-           {
-              parent.executeAgain( request, OutputPanel.this );
-           }
-        });
-        executeAgainButton.setVisible( false );
-
-        //this button is only shown when the output is hidden
-        forceShowOutputButtonLabel = new JLabel("Show Output");
-
-        forceShowOutputButtonLabel.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent e) {
-                forciblyShowOutput();
-            }
-
-            public void mouseEntered(MouseEvent e) {
-                forceShowOutputButtonLabel.setForeground(UIManager.getColor("textHighlightText"));
-            }
-
-            public void mouseExited(MouseEvent e) {
-                forceShowOutputButtonLabel.setForeground(UIManager.getColor("Label.foreground"));
-            }
-        });
-
-        statusPanel.add( executeAgainButton );
-        statusPanel.add( Box.createHorizontalStrut( 2 ) );
-        statusPanel.add(statusLabel);
-        statusPanel.add(Box.createHorizontalGlue());
-        statusPanel.add(forceShowOutputButtonLabel);
-
-        statusPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
-        return statusPanel;
-    }
-
-    /**
-    * Call this if you're going to reuse this. it resets its output.
-    */
-    public void reset() {
-        executeAgainButton.setVisible( false );
-        statusLabel.setText("");
-        statusLabel.setForeground(UIManager.getColor("Label.foreground"));
-        gradleOutputTextPane.setText("");
-        progressLabel.setText("");
-    }
-
-    /**
-       * Call this to append text to the gradle output field. We'll also move the caret to the end.
-       *
-       * @param  text       the text to add
-    */
-    private void appendGradleOutput(final String text) {
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                gradleOutputTextPane.appendText( text );
-            }
-        });
-    }
-
-    private void setProgress( final String text, final float percentComplete) {
-       SwingUtilities.invokeLater( new Runnable()
-       {
-          public void run()
-          {
-              progressBar.setValue((int) percentComplete);
-              progressLabel.setText(text);
-          }
-       } );
-    }
-
-    /**
-       Notification that execution of a task or tasks has been started.
-    */
-    public void reportExecutionStarted() {
-       SwingUtilities.invokeLater( new Runnable()
-       {
-          public void run()
-          {
-             setPending(false);
-             setBusy(true);
-             setProgress("Starting", 0);
-             if (showProgress) {
-                progressPanel.setVisible(true);
-             }
-
-             statusLabel.setText("Executing");
-
-             //give the user the option to override this.
-             forceShowOutputButtonLabel.setVisible(onlyShowOutputOnErrors);
-          }
-       } );
-    }
-
-   /**
-    * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
-    *
-    * @param size the total number of tasks.
-    */
-   public void reportNumberOfTasksToExecute( final int size )
-   {  //if we only have a single task, then the intire process will be indeterminately long (it'll just from 0 to 100)
-      SwingUtilities.invokeLater( new Runnable()
-       {
-          public void run()
-          {
-            boolean isIndeterminate = size == 1;
-            progressBar.setIndeterminate( isIndeterminate );
-            progressBar.setStringPainted( !isIndeterminate );
-          }
-      } );
-   }
-
-   /**
-     * Notification that execution of all tasks has completed. This is only called once at the end.
-     *
-     * @param wasSuccessful whether or not gradle encountered errors.
-     * @param buildResult   contains more detailed information about the result of a build.
-     * @param output        the text that gradle produced. May contain error information, but is usually just status.
-     */
-    public void reportExecutionFinished(boolean wasSuccessful, BuildResult buildResult, String output) {
-        reportExecutionFinished(wasSuccessful, output, buildResult.getFailure());
-    }
-
-    /**
-     * Notification that execution of a task has completed. This is the task you initiated and not for each subtask or dependent task.
-     *
-     * @param  wasSuccessful whether or not gradle encountered errors.
-     * @param  output        the text that gradle produced. May contain error information, but is usually just status.
-     *
-     * @param throwable
-    */
-    public void reportExecutionFinished( final boolean wasSuccessful, final String output, final Throwable throwable) {
-       SwingUtilities.invokeLater( new Runnable()
-       {
-          public void run()
-          {
-              setPending(false); //this can be called before we actually get a start message if it fails early. This clears the pending flag so we know we can reuse it.
-              setBusy(false);
-              progressPanel.setVisible(false);
-
-              //Make the output equal to all of our output. There are some timing issues where we don't get the last live output from gradle.
-              //This 'output' is the entire text. This way we always get all output.
-              String newText = getPrefixText() + output;
-              gradleOutputTextPane.setText( newText );
-
-              //show the user the time we finished this.
-              SimpleDateFormat formatter = new SimpleDateFormat("h:mm:ss aa");
-              String formattedTime = formatter.format(Calendar.getInstance().getTime());
-
-              if (wasSuccessful) {
-                  statusLabel.setText("Completed successfully at " + formattedTime);
-                  appendGradleOutput("\nCompleted Successfully");
-              } else {
-                  statusLabel.setText("Completed with errors at " + formattedTime);
-                  statusLabel.setForeground(Color.red.darker());
-
-                  //since errors occurred, show the output. If onlyShowOutputOnErrors is false, this textPanel will already be visible.
-                  gradleOutputTextPanel.setVisible(true);
-              }
-
-              executeAgainButton.setVisible( true );
-
-              appendThrowable(throwable);
-
-              //lastly, if the text output is not visible, make the 'show output' button visible
-              forceShowOutputButtonLabel.setVisible(!gradleOutputTextPanel.isVisible());
-
-              parent.reportExecuteFinished( request, wasSuccessful );
-
-          }
-       } );
-    }
-
-    private void appendThrowable(Throwable throwable) {
-        if (throwable != null) {
-            String output = GradlePluginLord.getGradleExceptionMessage(throwable, StartParameter.ShowStacktrace.ALWAYS_FULL);
-            appendGradleOutput(output);
-        }
-    }
-
-    /**
-     * Notification that a single task has completed. Note: the task you kicked off probably executes other tasks.
-     *
-     * @param currentTaskName the task being executed
-     * @param percentComplete the percent complete of all the tasks that make up the task you requested.
-    */
-    public void reportTaskStarted(String currentTaskName, float percentComplete) {
-        setProgress(currentTaskName, percentComplete);
-    }
-
-    public void reportTaskComplete(String currentTaskName, float percentComplete) {
-        setProgress(currentTaskName, percentComplete);
-    }
-
-    public void reportFatalError(String message) {
-        appendGradleOutput('\n' + message + "\n\nFailed.\n");
-    }
-
-    /**
-     * Report real-time output from gradle and its subsystems (such as ant).
-     *
-     * @param output a single line of text to show.
-     * @author mhunsicker
-    */
-    public void reportLiveOutput(String output) {
-        appendGradleOutput(output);
-    }
-
-    /**
-     * Determines if this panel is ready to be reused. Currently, if its not busy or pinned, it can be reused.
-     *
-     * @author mhunsicker
-    */
-    public boolean canBeReusedNow() {
-        return !isPending && !isBusy && !isPinned;
-    }
-
-    /**
-     * Call this to show progress. Some tasks have no useful progress, so this allows you to disable it.
-     *
-     * @param showProgress true to show a progress bar, false not to.
-    */
-    private void showProgress(boolean showProgress) {
-        this.showProgress = showProgress;
-        progressPanel.setVisible(showProgress);
-    }
-
-    /**
-     * This overrides the onlyShowOutputOnErrors
-    */
-    private void forciblyShowOutput() {
-        gradleOutputTextPanel.setVisible(true);
-        forceShowOutputButtonLabel.setVisible(false);
-    }
-
-    public void setOnlyShowOutputOnErrors(boolean value) {
-        this.onlyShowOutputOnErrors = value;
-        gradleOutputTextPanel.setVisible(!value);
-    }
-
-    public boolean getOnlyShowOutputOnErrors() {
-        return onlyShowOutputOnErrors;
-    }
-
-    public boolean close() {
-        if (request != null)   //if we have a request, we can only close if it allows us to.
-        {
-            if (!request.cancel()) {
-               return false;
-            }
-        }
-
-        parent.removeOutputPanel( this );
-
-        setPinned(false);  //unpin it when it is removed
-        return true;
-    }
-
-   /**
-    Sets the font for this component.
-
-    @param font the desired <code>Font</code> for this component
-    @beaninfo preferred: true
-    bound: true
-    attribute: visualUpdate true
-    description: The font for the component.
-    @see Component#getFont
-    */
-   @Override
-   public void setFont( Font font )
-   {
-      super.setFont( font );
-      if( gradleOutputTextPane != null )  //this gets called by internal Swing APIs, so we may not have this yet.
-      {
-         gradleOutputTextPane.setFont( font );
-      }
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanelLord.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanelLord.java
deleted file mode 100644
index ee3db53..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanelLord.java
+++ /dev/null
@@ -1,474 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.foundation.output.FileLinkDefinitionLord;
-import org.gradle.foundation.queue.ExecutionQueue;
-import org.gradle.foundation.common.ObserverLord;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-
-import javax.swing.*;
-import java.awt.BorderLayout;
-import java.awt.Point;
-import java.awt.Font;
-import java.awt.event.ActionEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This class manages displaying the results of a gradle execution in a panel
- * inside a JTabbedPane. It can reuse existing tabs but creates new ones if you
- * run multiple things concurrently.
- * @author mhunsicker
- */
-public class OutputPanelLord implements OutputUILord, GradlePluginLord.RequestObserver, OutputPanel.OutputPanelParent {
-
-    private JPanel mainPanel;
-    private JTabbedPane tabbedPane;
-
-    private JPopupMenu popupMenu;
-
-    private boolean onlyShowOutputOnErrors;
-    private JMenuItem closeMenuItem;
-    private JMenuItem closeAllMenuItem;
-    private JMenuItem closeAllButThisMenuItem;
-    private JMenuItem togglePinStateMenuItem;
-
-   private ObserverLord<OutputObserver> observerLord = new ObserverLord<OutputObserver>();
-   private GradlePluginLord gradlePluginLord;
-   private AlternateUIInteraction alternateUIInteraction;
-   private Font font;
-
-    private FileLinkDefinitionLord fileLinkDefinitionLord;
-
-    private ExecutionRequest lastExecutionRequest;
-
-    public OutputPanelLord( GradlePluginLord gradlePluginLord, AlternateUIInteraction alternateUIInteraction ) {
-      this.gradlePluginLord = gradlePluginLord;
-      this.alternateUIInteraction = alternateUIInteraction;
-
-       fileLinkDefinitionLord = new FileLinkDefinitionLord();
-
-      //add the OutputPanelLord as a request observer so it can create new tabs when new requests are added.
-        gradlePluginLord.addRequestObserver( this, true );
-
-        setupUI();
-
-       //gradle formats some output in 'ascii art' fashion. This ensures things line up properly.
-       Font font = new Font("Monospaced", Font.PLAIN, UIManager.getDefaults().getFont("Label.font").getSize());
-
-       setOutputTextFont( font );
-    }
-
-   public JPanel getMainPanel() {
-        return mainPanel;
-    }
-
-    private void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-
-        tabbedPane = new JTabbedPane();
-        mainPanel.add(tabbedPane, BorderLayout.CENTER);
-
-        setupPopupMenu();
-    }
-
-    private void setupPopupMenu() {
-        popupMenu = new JPopupMenu();
-
-        closeMenuItem = new JMenuItem(new AbstractAction("Close") {
-            public void actionPerformed(ActionEvent e) {
-                closeSelectedTab();
-            }
-        });
-        popupMenu.add(closeMenuItem);
-
-        closeAllMenuItem = new JMenuItem(new AbstractAction("Close All") {
-            public void actionPerformed(ActionEvent e) {
-                closeAllTabs();
-            }
-        });
-        popupMenu.add(closeAllMenuItem);
-
-        closeAllButThisMenuItem = new JMenuItem(new AbstractAction("Close All But This") {
-            public void actionPerformed(ActionEvent e) {
-                closeAllButSelectedTab();
-            }
-        });
-
-        popupMenu.add(closeAllButThisMenuItem);
-        popupMenu.addSeparator();
-
-        togglePinStateMenuItem = new JMenuItem(new AbstractAction("Pin") {
-            public void actionPerformed(ActionEvent e) {
-                togglePinSelectedTab();
-            }
-        });
-
-        popupMenu.add(togglePinStateMenuItem);
-
-        tabbedPane.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent e) {
-                if (e.getClickCount() == 1 && e.getButton() == MouseEvent.BUTTON3) {
-                    enablePopupMenuAppropriately();
-                    Point point = e.getPoint();
-                    popupMenu.show(tabbedPane, point.x, e.getPoint().y);
-                }
-            }
-        });
-    }
-
-    private void enablePopupMenuAppropriately() {
-        OutputPanel panel = getSelectedOutputPanel();
-        if (panel == null) {
-            closeMenuItem.setEnabled(false);
-            togglePinStateMenuItem.setEnabled(false);
-        } else {
-            closeMenuItem.setEnabled(true);
-
-            //change the name of this to reflect what is actually happening.
-            if (panel.isPinned()) {
-               togglePinStateMenuItem.setText("Unpin");
-            }
-            else {
-               togglePinStateMenuItem.setText("Pin");
-            }
-        }
-    }
-
-    /**
-       This obtains an output panel for executing a task. It will try to reuse
-       an existing tab.
-
-       I don't like how this mechanism works. Its not obvious what you're going
-       to get and how the tabs will be reused (from a user's standpoint). IntelliJ
-       Idea doesn't allow multiple compiles/builds at a time, so they don't have
-       this issue there. They do have it on Find where they have an option to
-       explicitly display in a new tab. I don't think that quite works here
-       as you don't normally think about the output. This is only an issue if
-       you run multiple tasks at once or try to run new tasks while others are
-       still executing. Ultimately, I don't think tabs are the way to go because
-       closing a bunch of tabs is a pain.
-
-       @param  description          the title we'll give to the output.
-       @param selectOutputPanel true to select the output panel after we setup
-                                the tab, false if not. This is really only useful
-                                if you're calling this for multiple tasks one
-                                right after the other. Pass in false for all but
-                                the first (or last) one depending on what you want.
-       @param reuseSelectedOutputPanelFirst true to attempt to reuse the current
-                                output tab. Otherwise, we'll go from left to right
-                                looking for a tab to reuse. This is really only
-                                useful if you're calling this for multiple tasks
-                                one after the other. In that case, you probably
-                                want to pass in false.
-       @return an output panel.
-    */
-    private OutputPanel getOutputPanelForExecution(String description, boolean selectOutputPanel, boolean reuseSelectedOutputPanelFirst) {
-        OutputTab outputPanel = findExistingOutputPanelForExecution(reuseSelectedOutputPanelFirst);
-        if (outputPanel != null) {
-            outputPanel.setTabHeaderText(description);
-            outputPanel.reset();
-        } else {  //we don't have an existing tab. Create a new one.
-            outputPanel = new OutputTab( this, description, alternateUIInteraction );
-            outputPanel.setFont( font );
-            outputPanel.initialize();
-            tabbedPane.addTab(description, outputPanel);
-            if (selectOutputPanel) {
-               tabbedPane.setSelectedComponent(outputPanel);
-            }
-
-           Utility.setTabComponent15Compatible(tabbedPane, tabbedPane.getTabCount() - 1, outputPanel.getTabHeader());
-        }
-
-        return outputPanel;
-    }
-
-    /**
-       This locates an existing panel to reuse.
-    */
-    private OutputTab findExistingOutputPanelForExecution(boolean considerSelectedTabFirst) {
-        OutputTab outputPanel = null;
-        if (considerSelectedTabFirst) {
-            outputPanel = (OutputTab) tabbedPane.getSelectedComponent();
-            if (outputPanel != null && outputPanel.canBeReusedNow()) {
-               return outputPanel;
-            }
-        }
-
-        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
-        while (iterator.hasNext()) {
-            outputPanel = (OutputTab) iterator.next();
-            if (outputPanel.canBeReusedNow()) {
-               return outputPanel;
-            }
-        }
-
-        return null;
-    }
-
-    /**
-       @return a list of all the output panels currenly in the tabbed pane.
-    */
-    private List<OutputPanel> getOutputPanels() {
-        List<OutputPanel> panels = new ArrayList<OutputPanel>();
-        for (int index = 0; index < tabbedPane.getTabCount(); index++) {
-            OutputPanel outputPanel = (OutputPanel) tabbedPane.getComponentAt(index);
-            panels.add(outputPanel);
-        }
-
-        return panels;
-    }
-
-   /**
-    This formats a display name so it isn't too long. The actual size is purely arbitrary.
-    @param displayName the current display name
-    @return a display name that isn't too long to display on tabs.
-    */
-   private String reformatDisplayName( String displayName )
-   {
-      if( displayName.length() <= 20 ) {
-         return displayName;   //its fine
-      }
-
-       //I'm going 6 characters less because it looks stupid to replace 3 characters with 3 characters.
-       //There's no absolute amount here, this just seems to look better.
-      return displayName.substring( 0, 14 ) + "...";
-   }
-
-   /**
-       Determines if any tasks are currently being run. We check all of our
-       OutputPanels.
-       @return true if we're busy, false if not.
-    */
-    public boolean isBusy() {
-        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
-        while (iterator.hasNext()) {
-            OutputPanel outputPanel = iterator.next();
-            if (outputPanel.isBusy()) {
-               return true;
-            }
-        }
-        return false;
-    }
-
-    public void setOnlyShowOutputOnErrors(boolean value) {
-        this.onlyShowOutputOnErrors = value;
-    }
-
-    public boolean getOnlyShowOutputOnErrors() {
-        return onlyShowOutputOnErrors;
-    }
-
-    private void closeSelectedTab() {
-        OutputTab component = getSelectedOutputPanel();
-        if (component != null) {
-           component.close();
-        }
-    }
-
-    private void closeAllTabs() {
-        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
-        while (iterator.hasNext()) {
-            OutputPanel outputPanel = iterator.next();
-            outputPanel.close();
-        }
-    }
-
-    private void closeAllButSelectedTab() {
-        OutputTab component = getSelectedOutputPanel();
-        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
-        while (iterator.hasNext()) {
-            OutputPanel outputPanel = iterator.next();
-            if (outputPanel != component) {
-               outputPanel.close();
-            }
-        }
-    }
-
-    /**
-       Changes the current pinned status of the selected tab.
-    */
-    private void togglePinSelectedTab() {
-        OutputTab component = getSelectedOutputPanel();
-        if (component != null) {
-           component.setPinned(!component.isPinned());
-        }
-    }
-
-    private OutputTab getSelectedOutputPanel() {
-        return (OutputTab) tabbedPane.getSelectedComponent();
-    }
-
-    //return the output panel for the specified request.
-    private OutputPanel getOutputPanel(ExecutionQueue.Request request) {
-        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
-        while (iterator.hasNext()) {
-            OutputPanel outputPanel = iterator.next();
-            if (outputPanel.getRequest() == request) {
-               return outputPanel;
-            }
-        }
-        return null;
-    }
-
-   public void executeAgain( Request request, OutputPanel outputPanel )
-   {
-      //this needs to work better. It needs to do the execute again in the same
-      //OutputPanel. However, because this generically listens for requests and
-      //adds them to this panel, things are more complicated.
-      request.executeAgain( gradlePluginLord );
-   }
-
-   public void reportExecuteFinished( final Request request, final boolean wasSuccessful )
-   {
-      observerLord.notifyObservers( new ObserverLord.ObserverNotification<OutputObserver>()
-      {
-         public void notify( OutputObserver observer )
-         {
-            observer.reportExecuteFinished( request, wasSuccessful );
-         }
-      } );
-   }
-
-   public void removeOutputPanel( final OutputPanel outputPanel )
-   {
-      tabbedPane.remove( outputPanel );
-
-      observerLord.notifyObservers( new ObserverLord.ObserverNotification<OutputObserver>()
-      {
-         public void notify( OutputObserver observer )
-         {
-            observer.outputTabClosed( outputPanel.getRequest() );
-         }
-      } );
-   }
-
-   public void executionRequestAdded( final ExecutionRequest request )
-   {
-       lastExecutionRequest = request;
-
-      String displayName = reformatDisplayName( request.getDisplayName() );
-      requestAdded( request, "Execute '" + displayName + "'" );
-      observerLord.notifyObservers( new ObserverLord.ObserverNotification<OutputObserver>()
-      {
-         public void notify( OutputObserver observer )
-         {
-            observer.executionRequestAdded( request );
-         }
-      } );
-   }
-
-   public void refreshRequestAdded( final RefreshTaskListRequest request )
-   {
-      requestAdded( request, "Refresh" );
-      observerLord.notifyObservers( new ObserverLord.ObserverNotification<OutputObserver>()
-      {
-         public void notify( OutputObserver observer )
-         {
-            observer.refreshRequestAdded( request );
-         }
-      } );
-   }
-
-   private void requestAdded( Request request, String name )
-   {
-      OutputPanel outputPanel = getOutputPanelForExecution(name, false, true );
-
-      outputPanel.setRequest( request, onlyShowOutputOnErrors );
-      request.setExecutionInteraction( outputPanel );
-   }
-
-   /**
-    Notification that a command is about to be executed. This is mostly useful
-    for IDE's that may need to save their files.
-
-    @param request the request to be executed
-    @author mhunsicker
-    */
-   public void aboutToExecuteRequest( Request request )
-   {
-   }
-
-   /**
-    Notification that the command has completed execution.
-
-    @param request the original request containing the command that was executed
-    @param result  the result of the command
-    @param output  the output from gradle executing the command
-    */
-   public void requestExecutionComplete( Request request, int result, String output )
-   {
-
-   }
-
-   public void addOutputObserver( OutputObserver observer, boolean inEventQueue )
-   {
-      observerLord.addObserver( observer, inEventQueue );
-   }
-
-   public void removeOutputObserver( OutputObserver observer )
-   {
-      observerLord.removeObserver( observer );
-   }
-
-   public int getTabCount()
-   {
-      return tabbedPane.getTabCount();
-   }
-
-   /**
-    Sets the font for the output text
-    @param font the new font
-    */
-   public void setOutputTextFont( Font font ) {
-
-      this.font = font;
-      Iterator<OutputPanel> iterator = getOutputPanels().iterator();
-      while( iterator.hasNext() )
-      {
-         OutputPanel outputPanel = iterator.next();
-         outputPanel.setFont( font );
-      }
-   }
-
-    public Font getOutputTextFont() {
-        return font;
-    }
-
-    public FileLinkDefinitionLord getFileLinkDefinitionLord() {
-        return fileLinkDefinitionLord;
-    }
-
-    /*
-    This re-executes the last execution command (ignores refresh commands).
-    This is potentially useful for IDEs to hook into (hotkey to execute last command).
-     */
-    public void reExecuteLastCommand()
-    {
-        ExecutionRequest executionRequest = lastExecutionRequest;
-        if( executionRequest != null ) {
-            gradlePluginLord.addExecutionRequestToQueue( executionRequest.getFullCommandLine(), executionRequest.getDisplayName(), executionRequest.forceOutputToBeShown() );
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTab.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTab.java
deleted file mode 100644
index 95a64a2..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTab.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.ImageIcon;
-import javax.imageio.ImageIO;
-import java.awt.Component;
-import java.awt.image.BufferedImage;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * This just wraps up an OutputPanel so it has a tab header that can be dynamic. The current (rather awkward) JTabbedPane
- * implementation is to separate the tab contents from its component. This only works with java 1.6 or later.
- *
- * @author mhunsicker
- */
-public class OutputTab extends OutputPanel {
-
-    private static final Logger LOGGER = Logging.getLogger(OutputTab.class);
-
-    private JPanel mainPanel;
-    private JLabel mainTextLabel;
-    private JLabel pinnedLabel;
-    private JLabel closeLabel;
-
-   private static ImageIcon closeIcon;
-   private static ImageIcon closeHighlightIcon;
-
-   public OutputTab(OutputPanelParent parent, String header, AlternateUIInteraction alternateUIInteraction) {
-        super( parent, alternateUIInteraction );
-        mainPanel = new JPanel();
-        mainPanel.setOpaque(false);
-        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.X_AXIS));
-
-        mainTextLabel = new JLabel(header);
-        pinnedLabel = new JLabel("(Pinned) ");
-        pinnedLabel.setVisible(isPinned());
-
-        setupCloseLabel();
-
-        mainPanel.add(mainTextLabel);
-        mainPanel.add(Box.createHorizontalStrut(5));
-        mainPanel.add(pinnedLabel);
-        mainPanel.add(closeLabel);
-    }
-
-   private void setupCloseLabel()
-   {
-      if( closeIcon == null )
-      {
-          BufferedImage closeImage = getImageResource( "close.png" );
-          BufferedImage closeHighlightImage = getImageResource( "close-highlight.png" );
-
-          if( closeImage != null ) {
-             closeIcon = new ImageIcon( closeImage );
-          }
-
-         if( closeHighlightImage != null ) {
-            closeHighlightIcon = new ImageIcon( closeHighlightImage );
-         }
-      }
-
-      closeLabel = new JLabel( closeIcon );
-      closeLabel.addMouseListener( new MouseAdapter() {
-         @Override
-         public void mouseEntered( MouseEvent e ) {
-            closeLabel.setIcon( closeHighlightIcon );
-         }
-
-         @Override
-         public void mouseExited( MouseEvent e ) {
-            closeLabel.setIcon( closeIcon );
-         }
-
-         public void mouseClicked(MouseEvent e) {
-             close();
-         }
-      } );
-   }
-
-   private BufferedImage getImageResource( String imageResourceName )
-    {
-       InputStream inputStream = getClass().getResourceAsStream(imageResourceName);
-       if (inputStream != null) {
-          try {
-              BufferedImage image = ImageIO.read(inputStream);
-             return image;
-          }
-          catch ( IOException e) {
-              LOGGER.error("Reading image " + imageResourceName, e);
-          }
-       }
-
-       return null;
-    }
-
-    /**
-     * Call this if you're going to reuse this. it resets its output.
-     *
-     * @author mhunsicker
-     */
-    @Override
-    public void reset() {
-        super.reset();
-        closeLabel.setEnabled(true);
-    }
-
-    public Component getTabHeader() {
-        return mainPanel;
-    }
-
-    public void setTabHeaderText(String newText) {
-        mainTextLabel.setText(newText);
-    }
-
-    public boolean close() {
-        closeLabel.setEnabled(false); // provide feedback to the user that we received their click
-
-        boolean result = super.close();
-        if( result ) {
-           closeLabel.setEnabled(true);
-        }
-
-       return result;
-    }
-
-    /**
-     * Overridden so we can indicate the pinned state.
-     *
-     * @param pinned whether or not we're pinned
-     * @author mhunsicker
-    */
-    @Override
-    public void setPinned(boolean pinned) {
-        pinnedLabel.setVisible(pinned);
-
-        super.setPinned(pinned);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTextPane.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTextPane.java
deleted file mode 100644
index 236f81c..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTextPane.java
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.foundation.output.FileLinkDefinitionLord;
-import org.gradle.foundation.output.LiveOutputParser;
-import org.gradle.foundation.output.FileLink;
-
-import javax.swing.*;
-import javax.swing.text.*;
-
-import java.awt.*;
-import java.awt.datatransfer.StringSelection;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.awt.event.ActionEvent;
-import java.util.List;
-import java.util.Iterator;
-import java.io.File;
-
-/**
-  Rich text pane meant to simplify adding text, scrolling, prevent line wrapping, and highlighting FileLinks.
- */
-public class OutputTextPane
-{
-   private JScrollPane scroll;
-   private final TextPane textPane;
-   private DefaultStyledDocument document;
-
-   private Font font;
-
-   private AttributeSet defaultStyle;  //the style of most text
-   private AttributeSet fileStyle;     //the style of file links
-
-   private LiveOutputParser liveOutputParser;
-
-   private Interaction interaction;
-   private boolean hasClickableFiles;  //determines whether or not we allow the user to click on files. We'll highlight them if we allow this.
-
-   private JPopupMenu popupMenu;
-
-   /**
-    This allows us to interact with our parent control.
-    */
-   public interface Interaction {
-      /**
-       Notification that the user clicked a file link
-       @param file the file that was clicked
-       @param line the line number the file link points to. Will be -1 if no line was specified
-       */
-      public void fileClicked( File file, int line );
-   }
-
-   public OutputTextPane( Interaction interaction, boolean hasClickableFiles, Font font, FileLinkDefinitionLord fileLinkDefinitionLord ) {
-      this.interaction = interaction;
-      this.hasClickableFiles = hasClickableFiles;
-      this.font = font;
-
-      document = new DefaultStyledDocument();
-      textPane = new TextPane( document );
-      textPane.setEditable( false );
-      textPane.setAutoscrolls( false );
-
-      scroll = new JScrollPane( textPane );
-      scroll.setAutoscrolls( false );
-      scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
-      scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
-
-      //we have to set a new caret so we can force it not to scroll. We want to control the scrolling.
-      //this is so a user can scroll up to look at the constantly updating output and not have it continue
-      //scrolling. It also allows them to select something while the output is being updated. Without
-      //this, their selection would be removed with each update.
-      DefaultCaret caret = new DefaultCaret();
-      caret.setUpdatePolicy( DefaultCaret.NEVER_UPDATE );
-      textPane.setCaret( caret );
-
-      Color background = Color.white;
-      textPane.setBackground( background );  //its not editable, but it looks better with a white background. (I tried using UI.Manager.getColor( "TextArea.background" ) (and others) but it was showing up as gray when using inside Idea. I think the L&F remapped some things and we want it white.
-      scroll.setBackground( background );    //the scroll pane was showing up as grey in the Idea plugin. Not sure why. This should fix it.
-      scroll.getViewport().setBackground( background );    //this makes the non-text area of the scroll pane appear white on Windows (if you have short text).
-      resetFontStyles();
-
-      textPane.addMouseListener( new MouseAdapter()
-      {
-         @Override
-         public void mouseReleased( MouseEvent e )
-         {
-            handleClick( e.getButton() == MouseEvent.BUTTON3, e.getPoint() );
-         }
-      } );
-       liveOutputParser = new LiveOutputParser( fileLinkDefinitionLord, true );
-   }
-
-   private void resetFontStyles()
-   {
-      //setup the fileStyle
-      StyleContext styleContent = StyleContext.getDefaultStyleContext();
-
-      defaultStyle = createDefaultAttributeSet();
-
-      //modify the default to have a blue color and an underline
-      fileStyle = createDefaultAttributeSet();
-      fileStyle = styleContent.addAttribute( fileStyle, StyleConstants.Foreground, Color.blue);
-      fileStyle = styleContent.addAttribute( fileStyle, StyleConstants.Underline, true );
-   }
-
-   /**
-    This creates a standard attribute set for the current text pane's font.
-    @return an attribute set
-    */
-   private AttributeSet createDefaultAttributeSet()
-   {
-      StyleContext styleContent = StyleContext.getDefaultStyleContext();
-      AttributeSet attributeSet = styleContent.addAttribute( SimpleAttributeSet.EMPTY, StyleConstants.FontFamily, font.getName());
-      attributeSet = styleContent.addAttribute( attributeSet, StyleConstants.FontSize, font.getSize() );
-      return attributeSet;
-   }
-
-   public JComponent asComponent() { return scroll; }
-
-   public String getText() { return textPane.getText(); }
-
-   /**
-    When a user clicks, we determine if a FileLink was clicked on and if so, notify our interaction.
-    @param point
-    */
-   private void handleClick( boolean isRightButton, Point point )
-   {
-      if( isRightButton )
-      {
-         showPopup( point );
-      }
-      else
-      {
-         if( hasClickableFiles )
-         {
-            FileLink fileLink = getFileLinkAt( point );
-            if( fileLink != null )
-            {
-               interaction.fileClicked( fileLink.getFile(), fileLink.getLineNumber() );
-            }
-         }
-      }
-   }
-
-   private void showPopup( Point point )
-   {
-      buildPopup();
-
-      popupMenu.show( textPane, point.x, point.y );
-   }
-
-   private void buildPopup()
-   {
-      if( popupMenu != null )
-      {
-         return;
-      }
-
-      popupMenu = new JPopupMenu( );
-
-      popupMenu.add( new AbstractAction( "Copy")
-      {
-         public void actionPerformed( ActionEvent e )
-         {
-            String text = textPane.getSelectedText();
-            if( text != null )
-            {
-               Toolkit.getDefaultToolkit().getSystemClipboard().setContents( new StringSelection( text ), null );
-            }
-         }
-      } );
-
-      popupMenu.add( new AbstractAction( "Select All")
-      {
-         public void actionPerformed( ActionEvent e )
-         {
-            textPane.selectAll();
-         }
-      } );
-   }
-
-   /**
-    This appends the text to gradle's output window.
-    */
-   public void appendText( String text ) {
-      appendText( text, false );
-   }
-
-
-   /**
-   This sets the full text of this control, removing existing text.
-    @param text the new text of this control
-    */
-   public void setText( String text ) {
-      liveOutputParser.reset();
-      appendText( text, true );
-   }
-
-   /**
-    This appends or replaces the text to gradle's output window. This should be simple, but we've got a
-    complication: We want to scroll nicely. By default, adding text doesn't scroll at all. We want to
-    scroll so the user can see the latest output. However, if the user scrolls manually to see older
-    output, we don't want to keep scrolling to the end on them. This behavior is surprisingly complicated
-    to achieve. We have to determine if we're at the end of the viewport. If we are, we can scroll.
-    However, we have to perform the actual scroll in an invokeLater because the text control's size
-    hasn't been updated yet. Also, this is where we parse the text looking for FileLinks
-
-    @param text the text to add
-    @param replaceExisting true to replace the existing text completely, false to just append to the end.
-    */
-   private void appendText( String text, boolean replaceExisting ) {
-
-      Rectangle viewBounds = scroll.getViewport().getViewRect();  //the bounds of what we can see
-      Dimension viewSize = scroll.getViewport().getViewSize();    //the total bounds of the text
-
-      int maxViewBoundsY = viewBounds.y + viewBounds.height;
-
-      //if they're close to the end, we should scroll. I could have said if viewSize.height == maxViewBoundsY
-      //but this allows the user to scroll close to the end and get the same results
-      boolean shouldScroll = viewSize.height - maxViewBoundsY < 20;
-
-      try
-      {
-         if( replaceExisting )   //if we're supposed to be replacing, then do so.
-         {
-            document.remove( 0, document.getLength() );
-         }
-
-         document.insertString( document.getLength(), text, defaultStyle );
-      }
-      catch( BadLocationException e )
-      {
-         e.printStackTrace();
-      }
-
-      //parse this text and apply the styles accordingly. Note: the LiveOutputParser only returns FileLinks for full lines. The text
-      //we add may contain a FileLink, but it won't parse it until it reaches a new line.
-      if( hasClickableFiles ) {
-         List<FileLink> fileLinks = liveOutputParser.appendText( text );
-         highlightFileLinks( fileLinks );
-      }
-
-      if( shouldScroll ) {
-         SwingUtilities.invokeLater( new Runnable() {
-            public void run() {
-               scrollToBottom();
-            }
-         } );
-      }
-   }
-
-   /**
-    This applies a text style to the text where the FileLinks are. This makes them appear to be
-    clickable hotspots.
-    @param fileLinks the FileLinks to apply
-    */
-   private void highlightFileLinks( List<FileLink> fileLinks ) {
-      Iterator<FileLink> iterator = fileLinks.iterator();
-      while( iterator.hasNext() ) {
-         FileLink fileLink = iterator.next();
-
-         document.setCharacterAttributes( fileLink.getStartingIndex(), fileLink.getLength(), fileStyle, true );
-      }
-   }
-
-   /**
-   This scrolls to the bottom of the output text. To do this, we can't just
-   set the scroll bar to the maximum position. That would be too easy. We have
-   to consider the height of the scrollbar 'thumb'. This way also preserves
-   whatever horizontal scrolling the user has done.
-    */
-   private void scrollToBottom() {
-      int height = scroll.getVerticalScrollBar().getHeight();
-      int maximum = scroll.getVerticalScrollBar().getMaximum();
-      int newValue = maximum - height;
-      scroll.getVerticalScrollBar().setValue( newValue );
-   }
-
-   /**
-    Returns the FileLink at the specified point.
-    @param point the point where a FileLink may or may not be
-    @return a FileLink object if one exists at the specified point, null otherwise.
-    */
-   public FileLink getFileLinkAt( Point point ) {
-      int index = textPane.viewToModel( point );
-      return liveOutputParser.getFileLink( index );
-   }
-
-   /**
-    This is only overridden to prevent line wrapping
-    */
-   private class TextPane extends JTextPane {
-
-      private TextPane( DefaultStyledDocument doc )
-      {
-         super( doc );
-      }
-
-      /**
-       Overridden to prevent line wrapping
-       @return always false
-       */
-      @Override
-      public boolean getScrollableTracksViewportWidth() {
-         return false;
-      }
-   }
-
-   public void setFont( Font font )
-   {
-      this.font = font;
-      resetFontStyles();
-      resetText();
-   }
-
-   /**
-    This resets the text using the current font styles. This is useful if you change fonts.
-    The simplest way to do this is just re-add our text.
-    */
-   private void resetText()
-   {
-      String text = liveOutputParser.getText();
-      liveOutputParser.reset();
-      appendText( text, true );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputUILord.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputUILord.java
deleted file mode 100644
index 8adafdf..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputUILord.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.foundation.output.FileLinkDefinitionLord;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-
-import java.awt.Font;
-
-/**
- This interface manages the output of executing gradle tasks.
- */
-public interface OutputUILord
-{
-   void setOnlyShowOutputOnErrors( boolean show );
-
-   boolean getOnlyShowOutputOnErrors();
-
-
-         public interface OutputObserver
-         {
-            /**
-               Notification that a request was added to the output. This means we've got some output
-               that is useful to display.
-
-               Note: this is slightly different from the GradlePluginLord.RequestObserver. While
-               these are directly related, this one really means that it has been added to the UI.
-               <!      Name            Description>
-               @param  request         the request that was added.
-            */
-            void executionRequestAdded( ExecutionRequest request );
-
-            /**
-              Notification that a refresh task list request was added to the output. This means
-              we've got some output that is useful to display.
-
-              Note: this is slightly different from the GradlePluginLord.RequestObserver. While
-              these are directly related, this one really means that it has been added to the UI.
-               <!      Name            Description>
-               @param  request         the request that was added.
-             */
-            void refreshRequestAdded( RefreshTaskListRequest request );
-
-            /**
-             Notification that an output tab was closed. You might want to know this if you want to close your
-             IDE output window when all tabs are closed
-             */
-            public void outputTabClosed( Request request );
-
-            /**
-             Notification that execution of a request is complete
-             @param request the original request
-             @param wasSuccessful
-             */
-            public void reportExecuteFinished( Request request, boolean wasSuccessful );
-         }
-
-   public void addOutputObserver( OutputObserver observer, boolean inEventQueue );
-   public void removeOutputObserver( OutputObserver observer );
-
-   public int getTabCount();
-
-   /**
-    Sets the font for the output text
-    @param font the new font
-    */
-   public void setOutputTextFont( Font font );
-   public Font getOutputTextFont();
-
-    /**
-     * @return the object this is used to handle parsing of files in the output.
-     */
-   public FileLinkDefinitionLord getFileLinkDefinitionLord();
-
-    /*
-    This re-executes the last execution command (ignores refresh commands).
-    This is potentially useful for IDEs to hook into (hotkey to execute last command).
-     */
-    public void reExecuteLastCommand();
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SinglePaneUIInstance.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SinglePaneUIInstance.java
deleted file mode 100644
index 899616f..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SinglePaneUIInstance.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-import org.gradle.gradleplugin.userinterface.swing.common.PreferencesAssistant;
-
-import javax.swing.JPanel;
-import javax.swing.JSplitPane;
-import javax.swing.SwingUtilities;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Window;
-import java.awt.event.HierarchyEvent;
-import java.awt.event.HierarchyListener;
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-/**
- * A simple UI for gradle. This is a single panel that can be inserted into a stand-alone application or an IDE. This is
- * meant to hide most of the complexities of gradle. 'single pane' means that both the tabbed pane and the output pane
- * are contained within a single pane that this maintains. Meaning, you add this to a UI and its a self-contained gradle
- * UI. This is opposed to a multi-pane concept where the output would be separated from the tabbed pane.
- *
- * @author mhunsicker
-  */
-public class SinglePaneUIInstance extends AbstractGradleUIInstance
-{
-    private static final String SPLITTER_PREFERENCES_ID = "splitter-id";
-
-    private JSplitPane splitter;
-   private OutputPanelLord outputPanelLord;
-
-   public SinglePaneUIInstance() { }
-
-
-    public void initialize(SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
-
-        outputPanelLord = new OutputPanelLord( gradlePluginLord, alternateUIInteraction );
-
-        super.initialize( settings, alternateUIInteraction );
-    }
-
-   /**
-    We've overridden this to setup our splitter and our output window.
-    */
-   @Override
-    protected void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-        mainPanel.add(createCenterPanel(), BorderLayout.CENTER);
-    }
-
-    public OutputUILord getOutputUILord() {
-      return outputPanelLord;
-   }
-
-   private Component createCenterPanel() {
-        splitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
-
-        splitter.setTopComponent( createMainGradlePanel());
-        splitter.setBottomComponent( outputPanelLord.getMainPanel());
-
-        splitter.setContinuousLayout(true);
-
-        //This little bit of tedium is so we can set our size based on window's size. This listens
-        //for when the window is actually shown. It then adds a listen to store the location.
-        splitter.addHierarchyListener(new HierarchyListener() {
-            public void hierarchyChanged(HierarchyEvent e) {
-                if (HierarchyEvent.SHOWING_CHANGED == (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)) {
-                    splitter.removeHierarchyListener(this); //we only want the first one of these, so remove ourselves as a listener.
-                    Window window = SwingUtilities.getWindowAncestor(splitter);
-                    if (window != null) {
-                        Dimension dimension = window.getSize();
-                        int halfHeight = dimension.height / 2; //we'll just make ourselves half the height of the window
-                        splitter.setDividerLocation(halfHeight);
-                    }
-                    PreferencesAssistant.restoreSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);
-
-
-                    //Now that we're visible, this is so we save the location when the splitter is moved.
-                    splitter.addPropertyChangeListener(new PropertyChangeListener() {
-                        public void propertyChange(PropertyChangeEvent evt) {
-                            if (JSplitPane.DIVIDER_LOCATION_PROPERTY.equals(evt.getPropertyName())) {
-                               PreferencesAssistant.saveSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);
-                            }
-                        }
-                    });
-                }
-            }
-        });
-
-
-        splitter.setResizeWeight(1);   //this keeps the bottom the same size when resizing the window. Extra space is added/removed from the top.
-
-        return splitter;
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingAddMultipleFavoritesInteraction.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingAddMultipleFavoritesInteraction.java
deleted file mode 100644
index 16c09e9..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingAddMultipleFavoritesInteraction.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-import org.gradle.foundation.TaskView;
-
-import javax.swing.*;
-import java.awt.Window;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.event.*;
-import java.util.List;
-
-/**
- * This handles prompting the user how to handle adding multiple tasks as favorites.
- *
- * @author mhunsicker
- */
-public class SwingAddMultipleFavoritesInteraction implements FavoritesEditor.AddMultipleFavoritesInteraction {
-    private Window parent;
-
-    public SwingAddMultipleFavoritesInteraction(Window parent) {
-        this.parent = parent;
-    }
-
-    public FavoritesEditor.AddMultipleResult promptUserToCombineTasks(List<TaskView> tasksSample,
-                                                                      String singleCommandSample) {
-        PromptToCombineTasksDialog dialog = new PromptToCombineTasksDialog();
-        return dialog.show(parent, tasksSample, singleCommandSample);
-    }
-
-    public class PromptToCombineTasksDialog {
-        private JDialog dialog;
-        private FavoritesEditor.AddMultipleResult addMultipleResult;
-        private JRadioButton separatelyRadioButton;
-        private JRadioButton combinedRadioButton;
-        private ButtonGroup buttonGroup;
-
-        private JLabel separateLine1;
-        private JLabel separateLine2;
-        private JLabel separateLine3;
-
-        private JLabel combinedLine1;
-
-        public FavoritesEditor.AddMultipleResult show(Window parent, List<TaskView> tasksSample,
-                                                      String singleCommandSample) {
-            setupUI(parent);
-            populateValues(tasksSample, singleCommandSample);
-            dialog.setVisible(true);
-            return this.addMultipleResult;
-        }
-
-        /**
-         * this populates the dialog's sample values. Most of this function is trying to be very explicit about
-         * showing precisely what we're going to do (but for space reasons, we'll only show 3 commands in the
-         * list.
-         */
-        private void populateValues(List<TaskView> tasksSample, String singleCommandSample) {
-            separatelyRadioButton.setText("Add as separate " + tasksSample.size() + " commands:");
-
-            separateLine1.setText('\"' + tasksSample.get(0).getFullTaskName() + "\",");
-            String secondTask = '\"' + tasksSample.get(1).getFullTaskName() + "\"";
-            String thirdTask = "";
-
-            if (tasksSample.size() > 2) {
-                secondTask += ",";   //add a comma
-
-                thirdTask = '\"' + tasksSample.get(2).getFullTaskName() + "\"";
-                if (tasksSample.size() > 3)  //if there are more, show a comma and ellipses
-                {
-                    thirdTask += ", ... ";
-                }
-            }
-
-            separateLine2.setText(secondTask);
-            separateLine3.setText(thirdTask);
-            separateLine3.setVisible(tasksSample.size() > 2);   //only show this if there are more than 2 samples
-
-            combinedLine1.setText('\"' + singleCommandSample + '\"');
-        }
-
-        private void setupUI(Window parent) {
-            dialog = Utility.createDialog(parent, "Add Multiple Tasks", true);
-            dialog.setSize(400, 350);
-
-            dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
-            dialog.addWindowListener(new WindowAdapter() {
-                public void windowClosing(WindowEvent e) {
-                    close(FavoritesEditor.AddMultipleResult.Cancel);
-                }
-            });
-
-            JPanel panel = new JPanel(new BorderLayout());
-            dialog.getContentPane().add(panel);
-
-            panel.add(createMainPanel(), BorderLayout.CENTER);
-            panel.add(createButtonPanel(), BorderLayout.SOUTH);
-
-            panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-
-            dialog.setLocationRelativeTo(dialog.getParent());
-        }
-
-        private Component createMainPanel() {
-            JPanel panel = new JPanel();
-            panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-            separatelyRadioButton = new JRadioButton();
-            combinedRadioButton = new JRadioButton("Add as a single command:");
-            buttonGroup = new ButtonGroup();
-
-            buttonGroup.add(separatelyRadioButton);
-            buttonGroup.add(combinedRadioButton);
-            separatelyRadioButton.setSelected(true);
-
-            panel.add(Utility.addLeftJustifiedComponent(new JLabel("How you do want to add multiple tasks?")));
-            panel.add(Box.createVerticalStrut(20));
-            panel.add(Utility.addLeftJustifiedComponent(separatelyRadioButton));
-            panel.add(Box.createVerticalStrut(5));
-            panel.add(createSeparateSamplePanel());
-            panel.add(Box.createVerticalStrut(20));
-            panel.add(Utility.addLeftJustifiedComponent(combinedRadioButton));
-            panel.add(Box.createVerticalStrut(5));
-            panel.add(createCombinedSamplePanel());
-            panel.add(Box.createVerticalGlue());
-
-            return panel;
-        }
-
-        private JPanel createSeparateSamplePanel() {
-            separateLine1 = new JLabel();   //we'll use at most three samples (actually 2 with ellipses)
-            separateLine2 = new JLabel();
-            separateLine3 = new JLabel();
-
-            JPanel separateSamplePanel = new JPanel();
-            separateSamplePanel.setLayout(new BoxLayout(separateSamplePanel, BoxLayout.Y_AXIS));
-            separateSamplePanel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
-            separateSamplePanel.add(Utility.addLeftJustifiedComponent(separateLine1));
-            separateSamplePanel.add(Utility.addLeftJustifiedComponent(separateLine2));
-            separateSamplePanel.add(Utility.addLeftJustifiedComponent(separateLine3));
-
-            return separateSamplePanel;
-        }
-
-        private JPanel createCombinedSamplePanel() {
-            combinedLine1 = new JLabel();
-
-            JPanel combinedSamplePanel = new JPanel();
-            combinedSamplePanel.setLayout(new BoxLayout(combinedSamplePanel, BoxLayout.Y_AXIS));
-            combinedSamplePanel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
-            combinedSamplePanel.add(Utility.addLeftJustifiedComponent(combinedLine1));
-
-            return combinedSamplePanel;
-        }
-
-        private FavoritesEditor.AddMultipleResult getCurrentSelection() {
-            if (separatelyRadioButton.isSelected()) {
-                return FavoritesEditor.AddMultipleResult.AddSeparately;
-            }
-            return FavoritesEditor.AddMultipleResult.AddAsSingleCommand;
-        }
-
-        private Component createButtonPanel() {
-            JPanel panel = new JPanel();
-            panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-            JButton okButton = new JButton(new AbstractAction("OK") {
-                public void actionPerformed(ActionEvent e) {
-                    close(getCurrentSelection());
-                }
-            });
-
-            //make OK the default button
-            dialog.getRootPane().setDefaultButton(okButton);
-
-            JButton cancelButton = new JButton(new AbstractAction("Cancel") {
-                public void actionPerformed(ActionEvent e) {
-                    close(FavoritesEditor.AddMultipleResult.Cancel);
-                }
-            });
-
-            //equate escape with cancle
-            dialog.getRootPane().registerKeyboardAction(new ActionListener() {
-                public void actionPerformed(ActionEvent actionEvent) {
-                    close(FavoritesEditor.AddMultipleResult.Cancel);
-                }
-            }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
-
-            panel.add(Box.createHorizontalGlue());
-            panel.add(okButton);
-            panel.add(Box.createHorizontalStrut(10));
-            panel.add(cancelButton);
-            panel.add(Box.createHorizontalGlue());
-
-            panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
-
-            return panel;
-        }
-
-        private void close(FavoritesEditor.AddMultipleResult addMultipleResult) {
-            this.addMultipleResult = addMultipleResult;
-            dialog.setVisible(false);
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingEditFavoriteInteraction.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingEditFavoriteInteraction.java
deleted file mode 100644
index 41fe46b..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingEditFavoriteInteraction.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-
-import javax.swing.*;
-import javax.swing.text.BadLocationException;
-import javax.swing.event.DocumentListener;
-import javax.swing.event.DocumentEvent;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Window;
-import java.awt.event.*;
-
-/**
- * This edits the properties of a single favorite task.
- *
- * @author mhunsicker
- */
-public class SwingEditFavoriteInteraction implements FavoritesEditor.EditFavoriteInteraction {
-    private JDialog dialog;
-    private JTextField fullCommandLineTextField;
-    private JTextField displayNameTextField;
-    private JCheckBox alwaysShowOutputCheckBox;
-    private boolean saveResults;
-    private boolean synchronizeDisplayNameWithCommand;
-
-    //pass in true to synchronizeDisplayNameWithCommand for new favorites.
-
-    public SwingEditFavoriteInteraction(Window parent, String title, boolean synchronizeDisplayNameWithCommand) {
-        this.synchronizeDisplayNameWithCommand = synchronizeDisplayNameWithCommand;
-        setupUI(parent, title);
-    }
-
-    private void setupUI(Window parent, String title) {
-        dialog = Utility.createDialog(parent, title, true);
-
-        dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
-        dialog.addWindowListener(new WindowAdapter() {
-            public void windowClosing(WindowEvent e) {
-                close(false);
-            }
-        });
-
-        JPanel panel = new JPanel(new BorderLayout());
-        dialog.getContentPane().add(panel);
-
-        panel.add(createMainPanel(), BorderLayout.CENTER);
-        panel.add(createButtonPanel(), BorderLayout.SOUTH);
-
-        panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-
-        dialog.pack();
-    }
-
-    private Component createMainPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        fullCommandLineTextField = new JTextField();
-        displayNameTextField = new JTextField();
-        alwaysShowOutputCheckBox = new JCheckBox("Always Show Live Output");
-
-        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Command Line")));
-        panel.add(Utility.addLeftJustifiedComponent(fullCommandLineTextField));
-        panel.add(Box.createVerticalStrut(10));
-        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Display Name")));
-        panel.add(Utility.addLeftJustifiedComponent(displayNameTextField));
-        panel.add(Box.createVerticalStrut(10));
-        panel.add(Utility.addLeftJustifiedComponent(alwaysShowOutputCheckBox));
-        panel.add(Box.createVerticalGlue());
-
-        synchronizeDisplayNameWithCommand();
-
-        return panel;
-    }
-
-    /**
-     * This synchronizes the display name with the command line. This is so when you're adding a new favorite, the
-     * display name is automatic. If you type anything in the display name, we'll cancel synchronization.
-     */
-    private void synchronizeDisplayNameWithCommand() {
-        if (!synchronizeDisplayNameWithCommand) {
-            return;
-        }
-
-        final DocumentListener documentListener = new DocumentListener() {
-            public void insertUpdate(DocumentEvent documentEvent) {
-                setDisplayNameTextToCommandLineText();
-            }
-
-            public void removeUpdate(DocumentEvent documentEvent) {
-                setDisplayNameTextToCommandLineText();
-            }
-
-            public void changedUpdate(DocumentEvent documentEvent) {
-                setDisplayNameTextToCommandLineText();
-            }
-        };
-
-        fullCommandLineTextField.getDocument().addDocumentListener(documentListener);
-        displayNameTextField.addKeyListener(new KeyAdapter() {
-            @Override
-            public void keyPressed(KeyEvent keyEvent) {  //the user typed someting. Remove the document listener
-                fullCommandLineTextField.getDocument().removeDocumentListener(documentListener);
-            }
-        });
-    }
-
-    private void setDisplayNameTextToCommandLineText() {
-        try {
-            String text = fullCommandLineTextField.getDocument().getText(0,
-                    fullCommandLineTextField.getDocument().getLength());
-            displayNameTextField.setText(text);
-        } catch (BadLocationException e) {
-            e.printStackTrace();
-        }
-    }
-
-    private Component createButtonPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        JButton okButton = new JButton(new AbstractAction("OK") {
-            public void actionPerformed(ActionEvent e) {
-                close(true);
-            }
-        });
-
-        //make OK the default button
-        dialog.getRootPane().setDefaultButton(okButton);
-
-        JButton cancelButton = new JButton(new AbstractAction("Cancel") {
-            public void actionPerformed(ActionEvent e) {
-                close(false);
-            }
-        });
-
-        //equate escape with cancle
-        dialog.getRootPane().registerKeyboardAction(new ActionListener() {
-            public void actionPerformed(ActionEvent actionEvent) {
-                close(false);
-            }
-        }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
-
-        panel.add(Box.createHorizontalGlue());
-        panel.add(okButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(cancelButton);
-        panel.add(Box.createHorizontalGlue());
-
-        panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
-
-        return panel;
-    }
-
-    private void close(boolean saveResults) {
-        this.saveResults = saveResults;
-        dialog.setVisible(false);
-    }
-
-    public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
-        saveResults = false;
-
-        fullCommandLineTextField.setText(favoriteTask.fullCommandLine);
-        displayNameTextField.setText(favoriteTask.displayName);
-        alwaysShowOutputCheckBox.setSelected(favoriteTask.alwaysShowOutput);
-
-        dialog.pack();
-        dialog.setLocationRelativeTo(dialog.getParent());
-        dialog.setVisible(true);
-
-        if (saveResults) {
-            favoriteTask.fullCommandLine = fullCommandLineTextField.getText();
-            favoriteTask.displayName = displayNameTextField.getText();
-            favoriteTask.alwaysShowOutput = alwaysShowOutputCheckBox.isSelected();
-        }
-
-        return saveResults;
-    }
-
-    public void reportError(String error) {
-        if (dialog.isVisible()) {
-            JOptionPane.showMessageDialog(dialog, error);
-        } else {
-            JOptionPane.showMessageDialog(dialog.getParent(), error);
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingExportInteraction.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingExportInteraction.java
deleted file mode 100644
index cedd57d..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingExportInteraction.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.DOM4JSerializer;
-
-import javax.swing.JFileChooser;
-import javax.swing.JOptionPane;
-import javax.swing.SwingUtilities;
-import javax.swing.filechooser.FileFilter;
-import java.awt.Window;
-import java.io.File;
-
-/**
- * Swing implementation of ExportInteraction. This prompts the user for a file via the JFileChooser and handles
- * reporting errors.
- *
- * @author mhunsicker
- */
-public class SwingExportInteraction implements DOM4JSerializer.ExportInteraction {
-    private Window parent;
-
-    public SwingExportInteraction(Window parent) {
-        this.parent = parent;
-    }
-
-    /**
-     * This is called when you should ask the user for a source file to read.
-     *
-     * @return a file to read or null to cancel.
-     */
-    public File promptForFile(FileFilter fileFilter) {
-        JFileChooser chooser = new JFileChooser();
-        chooser.addChoosableFileFilter(fileFilter);
-
-        if (chooser.showSaveDialog(parent) != JFileChooser.APPROVE_OPTION) {
-            return null;
-        }
-
-        return chooser.getSelectedFile();
-    }
-
-    /**
-     * Report an error that occurred. The read failed.
-     *
-     * @param error the error message.
-     */
-    public void reportError(String error) {
-        JOptionPane.showMessageDialog(parent, error, "Error", JOptionPane.ERROR_MESSAGE);
-    }
-
-    /**
-     * The file already exists. Confirm whether or not you want to overwrite it.
-     *
-     * @param file the file in question
-     * @return true to overwrite it, false not to.
-     */
-    public boolean confirmOverwritingExisingFile(File file) {
-        int result = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(parent),
-                "The file '" + file.getAbsolutePath() + "' already exists. Overwrite?", "Confirm Overwriting File",
-                JOptionPane.YES_NO_OPTION);
-        return result == JOptionPane.YES_OPTION;
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingImportInteraction.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingImportInteraction.java
deleted file mode 100644
index 9b92746..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingImportInteraction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.gradleplugin.foundation.DOM4JSerializer;
-
-import javax.swing.JOptionPane;
-import javax.swing.JFileChooser;
-import javax.swing.filechooser.FileFilter;
-import java.awt.Window;
-import java.io.File;
-
-/**
- * Swing implementation of ImportInteraction. This prompts the user for a file via the JFileChooser and handles
- * reporting errors.
- *
- * @author mhunsicker
- */
-public class SwingImportInteraction implements DOM4JSerializer.ImportInteraction {
-    private Window parent;
-
-    public SwingImportInteraction(Window parent) {
-        this.parent = parent;
-    }
-
-    /**
-     * This is called when you should ask the user for a source file to read.
-     *
-     * @return a file to read or null to cancel.
-     */
-    public File promptForFile(FileFilter fileFilter) {
-        JFileChooser chooser = new JFileChooser();
-        chooser.addChoosableFileFilter(fileFilter);
-
-        if (chooser.showOpenDialog(parent) != JFileChooser.APPROVE_OPTION) {
-            return null;
-        }
-
-        return chooser.getSelectedFile();
-    }
-
-    /**
-     * Report an error that occurred. The read failed.
-     *
-     * @param error the error message.
-     */
-    public void reportError(String error) {
-        JOptionPane.showMessageDialog(parent, error, "Error", JOptionPane.ERROR_MESSAGE);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/TaskTreeComponent.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/TaskTreeComponent.java
deleted file mode 100644
index bae1a91..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/TaskTreeComponent.java
+++ /dev/null
@@ -1,708 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.foundation.visitors.TaskTreePopulationVisitor;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.filters.ProjectAndTaskFilter;
-
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JComponent;
-import javax.swing.JPanel;
-import javax.swing.JTree;
-import javax.swing.KeyStroke;
-import javax.swing.SwingUtilities;
-import javax.swing.ToolTipManager;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeCellRenderer;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeCellRenderer;
-import javax.swing.tree.TreeNode;
-import javax.swing.tree.TreePath;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.Font;
-import java.awt.Point;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.awt.event.KeyEvent;
-import java.awt.event.MouseAdapter;
-import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Enumeration;
-
-/**
- * This displays a tree of projects, subprojects, and tasks. You implement the Interaction to detemine how to handle
- * right clicks and double clicking tasks. To use this, call populate and pass it a filter (allows you to change exactly
- * what is displayed). There are several functions to obtaining the selected items, plus you can get the tree directly
- * for any advanced functionality.
- *
- * @author mhunsicker
- */
-public class TaskTreeComponent {
-    private GradlePluginLord gradlePluginLord;
-    private Interaction interaction;
-
-    private JTree tree;
-    private DefaultTreeModel model;
-    private TaskTreeBaseNode rootNode;
-
-    private boolean isPopulated;
-
-    private TaskTreeComponent.Renderer renderer;
-
-    public interface Interaction {
-        void rightClick(JTree tree, int x, int y);
-
-        /**
-         * Notification that a project was invoked (double-clicked). Do whatever you like, such as execute its default
-         * task.
-         *
-         * @param project the project that was invoked.
-         */
-        void projectInvoked(ProjectView project);
-
-        /**
-         * Notification that a task was invoked (double-clicked). Do whatever you like, such as execute it.
-         *
-         * @param task the task that was invoked.
-         * @param isCtrlKeyDown true if the CTRL key was pressed at the time
-         */
-        void taskInvoked(TaskView task, boolean isCtrlKeyDown);
-    }
-
-    public TaskTreeComponent(GradlePluginLord gradlePluginLord, Interaction interaction) {
-        this.gradlePluginLord = gradlePluginLord;
-        this.interaction = interaction;
-
-        createTreePanel();
-    }
-
-    private void createTreePanel() {
-        rootNode = new TaskTreeBaseNode();
-
-        model = new DefaultTreeModel(rootNode);
-        tree = new JTree(model);
-
-        tree.setRootVisible(false);
-        tree.setShowsRootHandles(true);
-
-        renderer = new Renderer();
-        tree.setCellRenderer(renderer);
-
-        ToolTipManager.sharedInstance().registerComponent(tree);
-
-        tree.setToggleClickCount(
-                99);  //prevents double clicks from expanding/collapsing the tree. We want to treat them as double-clicks
-
-        tree.addMouseListener(new MyMouseListener());
-
-        //make hitting Enter and CTRL Enter on a node equal executing it (the first node at least)
-        tree.registerKeyboardAction(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                executeFirstSelectedNode(false);
-            }
-        }, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
-
-        tree.registerKeyboardAction(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                executeFirstSelectedNode(true);
-            }
-        }, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.CTRL_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
-    }
-
-    public JTree getTree() {
-        return tree;
-    }
-
-    public void setTreeCellRenderer(TreeCellRenderer renderer) {
-        tree.setCellRenderer(renderer);
-    }
-
-    /**
-     * This renders our projects and tasks. This removes the icon and optionally shows the description in a different
-     * color. Since there's quite a bit of code for handling rendering tree cells, I'm just going to mooch off of the
-     * DefaultTreeCellRenderer. I'll just modify it's behavior a little (I probably don't need that or the description
-     * since it's not going to draw a selection or highlight).
-     */
-    private class Renderer implements TreeCellRenderer {
-        private JPanel panel;
-        private DefaultTreeCellRenderer nameRenderer;
-        private DefaultTreeCellRenderer descriptionRenderer;
-        private Color descriptionColor;
-        private boolean showDescription = true;
-        private Component seperator;
-        private Font normalFont;
-        private Font boldFont;
-
-        private Renderer() {
-            setupRendererUI();
-            setShowDescription(true);
-
-            descriptionColor = Color.blue;
-        }
-
-        private void setupRendererUI() {
-            panel = new JPanel();
-            panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-            nameRenderer = new DefaultTreeCellRenderer();
-            descriptionRenderer = new DefaultTreeCellRenderer();
-
-            panel.add(nameRenderer);
-            seperator = Box.createHorizontalStrut(10);
-            panel.add(seperator);
-            panel.add(descriptionRenderer);
-
-            panel.setOpaque(false);
-
-            setupFonts();
-        }
-
-        /**
-         * Setup the fonts. On some platforms, bold is the typical version. We explicitly don't want that. So we'll make
-         * the fonts plain and use the bold for our own purposes (indicating default tasks).
-         */
-        private void setupFonts() {
-            normalFont = nameRenderer.getFont().deriveFont(Font.PLAIN);
-            boldFont = normalFont.deriveFont(Font.BOLD);
-
-            nameRenderer.setFont(normalFont);
-            descriptionRenderer.setFont(normalFont);
-        }
-
-        public boolean showDescription() {
-            return showDescription;
-        }
-
-        //the easiest thing to do is just hide the description and its separator
-
-        public void setShowDescription(boolean showDescription) {
-            this.showDescription = showDescription;
-            seperator.setVisible(showDescription);
-            descriptionRenderer.setVisible(showDescription);
-            seperator.invalidate();
-            nameRenderer.invalidate();
-            descriptionRenderer.invalidate();
-            panel.invalidate();
-
-            //have to tell the tree each node changed. This is so it will recalculate its size. Without this, if the description is
-            //initially disabled, the tree is populated and expanded, then description is enabled, nothing shows up because the tree
-            //caches the node's size for some dumb reason.
-            Enumeration enumeration = rootNode.breadthFirstEnumeration();
-            while (enumeration.hasMoreElements()) {
-                TaskTreeBaseNode treeNode = (TaskTreeBaseNode) enumeration.nextElement();
-                model.nodeChanged(treeNode);
-            }
-
-            tree.repaint();
-        }
-
-        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean isSelected, boolean expanded,
-                                                      boolean leaf, int row, boolean hasFocus) {
-            TaskTreeBaseNode node = (TaskTreeBaseNode) value;
-
-            String description = node.getDescription();
-
-            //we've already added these components to our panel. We know they're just labels. Calling getTreeCell... just sets their text and colors correctly.
-            this.nameRenderer.getTreeCellRendererComponent(tree, node.toString(), isSelected, expanded, leaf, row,
-                    hasFocus);
-            this.descriptionRenderer.getTreeCellRendererComponent(tree, description, isSelected, expanded, leaf, row,
-                    false);
-
-            //set the tooltip. This must be on the component we return not our sub renderers
-            panel.setToolTipText(description);
-
-            //just remove the icon entirely
-            nameRenderer.setIcon(null);
-            this.descriptionRenderer.setIcon(null);
-
-            if (node.isBold()) {
-                nameRenderer.setFont(boldFont);
-            } else {
-                nameRenderer.setFont(normalFont);
-            }
-
-            //set the description color. If its selected, make it the name renderer's color
-            //so we know the colors won't conflict (they do on Windows XP).
-            if (!isSelected) {
-                this.descriptionRenderer.setForeground(descriptionColor);
-            } else {
-                this.descriptionRenderer.setForeground(nameRenderer.getForeground());
-            }
-
-            nameRenderer.invalidate();
-            descriptionRenderer.invalidate();
-            seperator.invalidate();
-            panel.invalidate();
-            panel.validate();
-
-            return panel;
-        }
-    }
-
-    private class MyMouseListener extends MouseAdapter {
-        public void mousePressed(MouseEvent e) {
-            if (e.getButton() == MouseEvent.BUTTON3) {  //This is here just to select a node that we right click on.
-                //The tree really needs to handle this for us.
-                Point point = e.getPoint();
-                int row = tree.getRowForLocation(point.x, point.y);
-                if (row != -1) {
-                    if (tree.isRowSelected(row)) {
-                        return;
-                    }  //if its already selected, just leave it alone. This prevents us from changing selecting when a user right-clicks on one of many selected items.
-
-                    //we need to determine if we move the selection, or just add it to the existing selection.
-                    if (isAddToSelectionKey(e)) {
-                        tree.addSelectionRow(row);
-                    } else {
-                        tree.setSelectionRow(row);
-                    }
-                }
-            }
-        }
-
-        private boolean isAddToSelectionKey(
-                MouseEvent e) {  //this is actually OS-specific, but for now, I'll just use CTRL.
-            return (e.getModifiers() & MouseEvent.CTRL_MASK) != 0;
-        }
-
-        public void mouseClicked(MouseEvent e) {
-            if (e.getClickCount() == 1) {
-                if (e.getButton() == MouseEvent.BUTTON3) {
-                    Point point = e.getPoint();
-                    interaction.rightClick(tree, point.x, point.y);
-                }
-            } else if (e.getClickCount() == 2) {
-                TaskTreeBaseNode node = getNodeAtPoint(e.getPoint());
-                if (node != null) {
-                    boolean isCtrlKeyDown = (e.getModifiers() & MouseEvent.CTRL_MASK) != 0;
-                    node.executeTask(isCtrlKeyDown);
-                }
-            }
-        }
-    }
-
-    /**
-     * This populates (and repopulates) the tree. This is surprisingly tedious in an effort to make the tree collapse as
-     * little as possible.
-     */
-    public void populate(ProjectAndTaskFilter filter) {
-        TaskTreePopulationVisitor.visitProjectAndTasks(gradlePluginLord.getProjects(), new PopulateTreeVisitor(),
-                filter, rootNode);
-
-        model.reload();
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {  //this expands the 'root' project
-                tree.expandRow(0);
-            }
-        });
-
-        isPopulated = true;
-    }
-
-    public boolean isPopulated() {
-        return isPopulated;
-    }
-
-    /**
-     * This visitor populates the tree as we walk projects and tasks. This jumpts through quite a bit of hoops in an
-     * effort to keep the tree from collapsing. It still does, but not completely. In order to keep it from collapsing,
-     * you must track some additional information that frankly the tree could and should do for you.
-     */
-    private class PopulateTreeVisitor implements TaskTreePopulationVisitor.Visitor<TaskTreeBaseNode, TaskTreeNode> {
-        /**
-         * This is called for each project.
-         *
-         * @param project the project
-         * @param parentProjectObject whatever you handed back from a prior call to visitProject if this is a sub
-         * project. Otherwise, it'll be whatever was passed into the visitPojectsAndTasks function.
-         * @return an object that will be handed back to you for each of this project's tasks.
-         */
-        public TaskTreeBaseNode visitProject(ProjectView project, int indexOfProject,
-                                             TaskTreeBaseNode parentProjectObject) {
-            ProjectTreeNode projectTreeNode = findProjectChild(parentProjectObject, project.getName());
-            if (projectTreeNode == null) {
-                projectTreeNode = new ProjectTreeNode(project);
-            }
-
-            int actualIndex = parentProjectObject.getIndex(projectTreeNode);
-            if (actualIndex != indexOfProject) //this will be -1 for a new node
-            {
-                if (actualIndex != -1) //only try to remove it if its already there. Swing doesn't like this otherwise.
-                {
-                    model.removeNodeFromParent(projectTreeNode);
-                }
-
-                insertChildNode(parentProjectObject, projectTreeNode, indexOfProject);
-            }
-
-            return projectTreeNode;
-        }
-
-        private ProjectTreeNode findProjectChild(TaskTreeBaseNode parentNode, String projectName) {
-            for (int index = 0; index < parentNode.getChildCount(); index++) {
-                TreeNode child = parentNode.getChildAt(index);
-                if (child instanceof ProjectTreeNode) {
-                    if (((ProjectTreeNode) child).getProject().getName().equals(projectName)) {
-                        return (ProjectTreeNode) child;
-                    }
-                }
-            }
-            return null;
-        }
-
-        /**
-         * This is called for each task.
-         *
-         * @param task the task
-         * @param indexOfTask index
-         * @param tasksProject the project for this task
-         */
-        public TaskTreeNode visitTask(TaskView task, int indexOfTask, ProjectView tasksProject,
-                                      TaskTreeBaseNode parentTreeNode) {
-            TaskTreeNode taskTreeNode = findTaskChild((ProjectTreeNode) parentTreeNode, task.getName());
-
-            if (taskTreeNode == null) {
-                taskTreeNode = new TaskTreeNode(task);
-            }
-
-            int actualIndex = parentTreeNode.getIndex(taskTreeNode);
-            if (actualIndex != indexOfTask) //this will be -1 for a new node
-            {
-                if (actualIndex != -1) //only try to remove it if its already there. Swing doesn't like this otherwise.
-                {
-                    model.removeNodeFromParent(taskTreeNode);
-                }
-
-                insertChildNode(parentTreeNode, taskTreeNode, indexOfTask);
-            }
-
-            return taskTreeNode;
-        }
-
-        //This only exists so we can call insert or add appropriately.
-        //The stupid tree isn't smart enough to do this for you.
-
-        private void insertChildNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child, int index) {
-            if (parent.getChildCount() < index) {
-                parent.add(child);
-                model.nodesWereInserted(parent, new int[]{parent.getChildCount() - 1});
-            } else {
-                parent.insert(child, index);
-                model.nodesWereInserted(parent, new int[]{index});
-            }
-        }
-
-        private TaskTreeNode findTaskChild(ProjectTreeNode parentNode, String taskName) {
-            for (int index = 0; index < parentNode.getChildCount(); index++) {
-                TreeNode child = parentNode.getChildAt(index);
-                if (child instanceof TaskTreeNode) {
-                    if (((TaskTreeNode) child).getTask().getName().equals(taskName)) {
-                        return (TaskTreeNode) child;
-                    }
-                }
-            }
-            return null;
-        }
-
-        /**
-         * This is called when a project has been visited completely and is just a notification giving you an
-         * opportunity to do whatever you like.
-         *
-         * Here, we're going to remove any nodes that aren't in either of the lists. This is when a task or project is
-         * hidden or when things simply change.
-         *
-         * @param parentProjectObject the object that represents the parent of the project and task objects below
-         * @param projectObjects a list of whatever you returned from visitProject
-         * @param taskObjects a list of whatever you returned from visitTask
-         */
-        public void completedVisitingProject(TaskTreeBaseNode parentProjectObject,
-                                             List<TaskTreeBaseNode> projectObjects, List<TaskTreeNode> taskObjects) {
-            int index = 0;
-            while (index < parentProjectObject.getChildCount()) {
-                TaskTreeBaseNode child = (TaskTreeBaseNode) parentProjectObject.getChildAt(index);
-                if (!projectObjects.contains(child) && !taskObjects.contains(child)) {
-                    model.removeNodeFromParent(child);
-                } else {
-                    index++;
-                }
-            }
-        }
-    }
-
-    private void expandNode(TreeNode node) {
-        tree.expandPath(new TreePath(node));
-    }
-
-    /**
-     * This is a basic tree node. All nodes in this tree must extend this. This is so we don't have to deal with all the
-     * differing types of things that may be in this tree.
-     */
-    public class TaskTreeBaseNode extends DefaultMutableTreeNode {
-        public void executeTask(boolean isCtrlKeyDown) {
-        }  //do nothing by default.
-
-        public String toString() {
-            return "hidden-root";
-        }  //by default, its the root.
-
-        public String getDescription() {
-            return null;
-        }
-
-        public boolean isBold() {
-            return false;
-        }
-    }
-
-    /**
-     * This represents a project.
-     */
-    public class ProjectTreeNode extends TaskTreeBaseNode {
-        private ProjectView project;
-
-        private ProjectTreeNode(ProjectView project) {
-            this.project = project;
-        }
-
-        public String toString() {
-            return project.getName();
-        }
-
-        @Override
-        public void executeTask(boolean isCtrlKeyDown) {
-            interaction.projectInvoked(project);
-        }
-
-        @Override
-        public String getDescription() {
-            return project.getDescription();
-        }
-
-        public ProjectView getProject() {
-            return project;
-        }
-    }
-
-    /**
-     * This represents a single task.
-     */
-    public class TaskTreeNode extends TaskTreeBaseNode {
-        private TaskView task;
-
-        private TaskTreeNode(TaskView task) {
-            this.task = task;
-        }
-
-        public String toString() {
-            return task.getName();
-        }
-
-        @Override
-        public void executeTask(boolean isCtrlKeyDown) {
-            interaction.taskInvoked(task, isCtrlKeyDown);
-        }
-
-        public TaskView getTask() {
-            return task;
-        }
-
-        @Override
-        public String getDescription() {
-            return task.getDescription();
-        }
-
-        @Override
-        public boolean isBold() {
-            return task.isDefault();
-        }
-    }
-
-    /**
-     * Returns the node at the specified point.
-     */
-    public TaskTreeBaseNode getNodeAtPoint(Point point) {
-        int row = tree.getRowForLocation(point.x, point.y);
-        if (row == -1) {
-            return null;
-        }
-
-        TreePath path = tree.getPathForLocation(point.x, point.y);
-        if (path == null) {
-            return null;
-        }
-        return (TaskTreeBaseNode) path.getLastPathComponent();
-    }
-
-    /**
-     * @return the first selected node or null if nothing is selected.
-     */
-    public TaskTreeBaseNode getFirstSelectedNode() {
-        TreePath path = tree.getSelectionPath();
-        if (path == null) {
-            return null;
-        }
-
-        return (TaskTreeBaseNode) path.getLastPathComponent();
-    }
-
-    /**
-     * @return a list of TaskTabTreeNode based on what is selected in the tree or an empty list if nothing is selected.
-     */
-    public List<TaskTreeBaseNode> getSelectedNodes() {
-        TreePath[] treePaths = tree.getSelectionPaths();
-        if (treePaths == null) {
-            return Collections.emptyList();
-        }
-
-        List<TaskTreeBaseNode> nodes = new ArrayList<TaskTreeBaseNode>();
-
-        for (int index = 0; index < treePaths.length; index++) {
-            TreePath treePath = treePaths[index];
-            nodes.add((TaskTreeBaseNode) treePath.getLastPathComponent());
-        }
-
-        return nodes;
-    }
-
-    /**
-     * Determines if we have any projects selected. This ignores selected tasks.
-     *
-     * @return true if we have projects selected, false otherwise.
-     */
-    public boolean hasProjectsSelected() {
-        TreePath[] treePaths = tree.getSelectionPaths();
-        if (treePaths == null) {
-            return false;
-        }
-
-        for (int index = 0; index < treePaths.length; index++) {
-            TreePath treePath = treePaths[index];
-
-            Object o = treePath.getLastPathComponent();
-            if (o instanceof ProjectTreeNode) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Determines if we have any tasks selected. This ignores selected projects.
-     *
-     * @return true if we have tasks selected, false otherwise.
-     */
-    public boolean hasTasksSelected() {
-        TreePath[] treePaths = tree.getSelectionPaths();
-        if (treePaths == null) {
-            return false;
-        }
-
-        for (int index = 0; index < treePaths.length; index++) {
-            TreePath treePath = treePaths[index];
-
-            Object o = treePath.getLastPathComponent();
-            if (o instanceof TaskTreeNode) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * This returns a list of selected tasks. This ignores selected projects.
-     *
-     * @return the selected tasks. Will return an empty list if no tasks are selected.
-     */
-    public List<TaskView> getSelectedTasks() {
-        TreePath[] treePaths = tree.getSelectionPaths();
-        if (treePaths == null) {
-            return Collections.emptyList();
-        }
-
-        List<TaskView> tasks = new ArrayList<TaskView>();
-
-        for (int index = 0; index < treePaths.length; index++) {
-            TreePath treePath = treePaths[index];
-
-            Object o = treePath.getLastPathComponent();
-            if (o instanceof TaskTreeNode) {
-                tasks.add(((TaskTreeNode) o).task);
-            }
-        }
-
-        return tasks;
-    }
-
-    /**
-     * Object to hold onto mutliple selections, but not just multiples of the same type of node. This separates the
-     * selected nodes by type. You can have multiple projects and tasks selected.
-     */
-    public class MultipleSelection {
-        public List<ProjectView> projects = new ArrayList<ProjectView>();
-        public List<TaskView> tasks = new ArrayList<TaskView>();
-    }
-
-    /**
-     * This returns the current selection broken up into projects and tasks.
-     *
-     * @return the selected projects and tasks. This never returns null and the contained lists are never null.
-     */
-    public MultipleSelection getSelectedProjectsAndTasks() {
-        MultipleSelection multipleSelection = new MultipleSelection();
-
-        TreePath[] treePaths = tree.getSelectionPaths();
-        if (treePaths == null) {
-            return multipleSelection;
-        }
-
-        for (int index = 0; index < treePaths.length; index++) {
-            TreePath treePath = treePaths[index];
-
-            Object o = treePath.getLastPathComponent();
-            if (o instanceof TaskTreeNode) {
-                multipleSelection.tasks.add(((TaskTreeNode) o).getTask());
-            } else if (o instanceof ProjectTreeNode) {
-                multipleSelection.projects.add(((ProjectTreeNode) o).getProject());
-            }
-        }
-
-        return multipleSelection;
-    }
-
-    public boolean showDescription() {
-        return renderer.showDescription();
-    }
-
-    public void setShowDescription(boolean showDescription) {
-        this.renderer.setShowDescription(showDescription);
-    }
-
-    private void executeFirstSelectedNode(boolean isCtrlKeyDown) {
-        TaskTreeComponent.TaskTreeBaseNode node = getFirstSelectedNode();
-        if (node != null) {
-            node.executeTask(isCtrlKeyDown);
-        }
-    }
-}
\ No newline at end of file
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/Utility.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/Utility.java
deleted file mode 100644
index 0f1644f..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/Utility.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.gradleplugin.userinterface.swing.common.BorderlessImageButton;
-import org.gradle.gradleplugin.userinterface.swing.common.BorderlessImageToggleButton;
-
-import javax.imageio.ImageIO;
-import javax.swing.Action;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.ImageIcon;
-import javax.swing.JButton;
-import javax.swing.JDialog;
-import javax.swing.JFrame;
-import javax.swing.JPanel;
-import javax.swing.JTabbedPane;
-import javax.swing.JToggleButton;
-import javax.swing.JMenuItem;
-import java.awt.Component;
-import java.awt.Window;
-import java.awt.event.InputEvent;
-import java.awt.image.BufferedImage;
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.Method;
-
-/**
- * Just some utility functions.
- *
- * @author mhunsicker
- */
-public class Utility {
-    private static final Logger LOGGER = Logging.getLogger(Utility.class);
-
-   public static Component addLeftJustifiedComponent(Component component) {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        panel.add(component);
-        panel.add(Box.createHorizontalGlue());
-
-        return panel;
-    }
-
-    public static Component addRightJustifiedComponent(Component component) {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        panel.add(Box.createHorizontalGlue());
-        panel.add(component);
-
-        return panel;
-    }
-
-    /**
-     * This creates a dialog. I only created this because I was using JDK 1.6, then realized I needed to use 1.5 and one
-     * of the most useful features of 1.6 is dialogs taking Windows as parents. This abstracts that so I don't have to
-     * make major changes to the code by passing around JFrames and JDialogs explicitly.
-       *
-       * @param  parent     the parent window
-       * @param  isModal    true if its modal, false if not.
-       * @return a dialog
-    */
-    public static JDialog createDialog(Window parent, String title, boolean isModal) {
-        if (parent instanceof JDialog) {
-           return new JDialog((JDialog) parent, title, isModal);
-        }
-        else if (parent instanceof JFrame) {
-           return new JDialog((JFrame) parent, title, isModal);
-        }
-
-       throw new RuntimeException("Unknown window type!");
-    }
-
-    /**
-     * This uses reflection to set the tab component if we're running under 1.6. It does nothing if you're running under
-     * 1.5. This is so you can run this on java 1.6 and get this benefit, but its not required to compile.
-       *
-       * This is the same as calling JTabbedPane.setTabComponentAt(). It just does so using reflection.
-    */
-    public static void setTabComponent15Compatible(JTabbedPane tabbedPane, int index, Component component) {
-        try {
-            Method method = tabbedPane.getClass().getMethod("setTabComponentAt", new Class[]{Integer.TYPE, Component.class});
-            method.invoke(tabbedPane, index, component);
-        }
-        catch (NoSuchMethodException e) {
-            //e.printStackTrace();
-            //we're not requiring 1.6, so its not a problem if we don't find the method. We just don't get this feature.
-        }
-        catch (Exception e) {
-            LOGGER.error("Setting tab component", e);
-        }
-    }
-
-    /**
-     * This creates a button with the specified action, image, and tooltip text. The main issue here is that it doesn't
-     * crash if the image is missing (which is just something that happens in real life from time to time). You probably
-     * should specify a name on the action just in case.
-    *
-    * @param  imageResourceName the image resource
-    * @param  tooltip           the tooltip to display
-    * @param  action            the action to perform
-    * @return the button that was created.
-    */
-    public static JButton createButton(Class resourceClass, String imageResourceName, String tooltip, Action action) {
-
-       JButton button = null;
-       if (imageResourceName != null) {
-            InputStream inputStream = resourceClass.getResourceAsStream(imageResourceName);
-            if (inputStream != null) {
-                try {
-                    BufferedImage image = ImageIO.read(inputStream);
-
-                    button = new BorderlessImageButton( action, new ImageIcon(image) );
-                }
-                catch (IOException e) {
-                    LOGGER.error("Reading image " + imageResourceName, e);
-                }
-            }
-        }
-
-       if( button == null ) {
-          button = new JButton( action );
-       }
-
-       if (tooltip != null) {
-          button.setToolTipText(tooltip);
-       }
-
-       return button;
-    }
-
-   public static JToggleButton createToggleButton( Class resourceClass, String imageResourceName, String tooltip, Action action ) {
-
-      JToggleButton button = null;
-
-       if (imageResourceName != null) {
-          ImageIcon icon = getImageIcon( resourceClass, imageResourceName );
-          if( icon != null ) {
-             button = new BorderlessImageToggleButton( action, icon );
-          }
-       }
-
-       if( button == null ) {
-          button = new JToggleButton( action );
-       }
-
-      if (tooltip != null) {
-         button.setToolTipText(tooltip);
-      }
-
-      return button;
-   }
-
-   public static JMenuItem createMenuItem( Class resourceClass, String name, String imageResourceName, Action action )
-    {
-       JMenuItem item = new JMenuItem( action );
-       item.setText( name );
-
-       if( imageResourceName != null )
-       {
-          ImageIcon icon = getImageIcon( resourceClass, imageResourceName );
-          item.setIcon( icon );
-       }
-
-       return item;
-    }
-
-   /**
-   * this determines if the CTRL key is down based on the modifiers from an event.
-   * This actualy needs to be checking for different things. CTRL doesn't meant the
-   * same thing on each platform.
-   */
-   public static boolean isCTRLDown( int eventModifiersEx )
-   {
-      return ( eventModifiersEx & InputEvent.CTRL_DOWN_MASK ) == InputEvent.CTRL_DOWN_MASK;
-   }
-
-   public static ImageIcon getImageIcon( Class resourceClass, String imageResourceName )
-   {
-      InputStream inputStream = resourceClass.getResourceAsStream(imageResourceName);
-      if (inputStream != null) {
-          try {
-              BufferedImage image = ImageIO.read(inputStream);
-              return new ImageIcon( image );
-             }
-          catch (IOException e) {
-              LOGGER.error("Reading image " + imageResourceName, e);
-          }
-      }
-
-      return null;
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/AbstractFilterEditorPanel.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/AbstractFilterEditorPanel.java
deleted file mode 100644
index 55d8bf7..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/AbstractFilterEditorPanel.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic.filter;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.DefaultListCellRenderer;
-import javax.swing.DefaultListModel;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JList;
-import javax.swing.JPanel;
-import javax.swing.JScrollPane;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import java.awt.BorderLayout;
-import java.awt.Color;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This panel displays something that is filtered. Its really just a list with show/hide buttons. You populate it with
- * whatever you like (in String form).
- *
- * @author mhunsicker
- */
-public abstract class AbstractFilterEditorPanel {
-    private JPanel mainPanel;
-    private DefaultListModel model;
-    private JList list;
-
-    private JButton hideButton;
-    private JButton showButton;
-
-    public AbstractFilterEditorPanel() {
-        setupUI();
-    }
-
-    public JComponent getComponent() {
-        return mainPanel;
-    }
-
-    private void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-
-        mainPanel.add(createOptionsPanel(), BorderLayout.NORTH);
-        mainPanel.add(createListPanel(), BorderLayout.CENTER);
-    }
-
-    private Component createOptionsPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        hideButton = new JButton(new AbstractAction("Hide") {
-            public void actionPerformed(ActionEvent e) {
-                hideSelected();
-            }
-        });
-
-        showButton = new JButton(new AbstractAction("Show") {
-            public void actionPerformed(ActionEvent e) {
-                showSelected();
-            }
-        });
-
-        panel.add(showButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(hideButton);
-        panel.add(Box.createHorizontalGlue());
-        panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
-
-        return panel;
-    }
-
-    private Component createListPanel() {
-        model = new DefaultListModel();
-        list = new JList(model);
-
-        list.setCellRenderer(new FilterRenderer());
-
-        list.addListSelectionListener(new ListSelectionListener() {
-            public void valueChanged(ListSelectionEvent e) {
-                if (!e.getValueIsAdjusting()) {
-                    enableAppropriately();
-                }
-            }
-        });
-
-        return new JScrollPane(list);
-    }
-
-    private class FilterRenderer extends DefaultListCellRenderer {
-        private Color defaultForegroundColor;
-
-        private FilterRenderer() {
-            defaultForegroundColor = getForeground();
-        }
-
-        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected,
-                                                      boolean cellHasFocus) {
-            Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
-
-            setIcon(null);  //just remove the icon entirely
-
-            boolean isAllowed = isAllowed((String) value);
-
-            if (isAllowed) {
-                setForeground(defaultForegroundColor);
-            } else {
-                setForeground(Color.red);
-            }
-
-            return component;
-        }
-    }
-
-    /**
-     * Implement this to determine if this item is filtered or not. This is used by the list to indicate if this item is
-     * filtered or not.
-     *
-     * @param item the item in question
-     * @return true if its filtered, false if not.
-     */
-    protected abstract boolean isAllowed(String item);
-
-    public void enableAppropriately() {
-        boolean isShowEnabled = false;
-        boolean isHideEnabled = false;
-
-        List<String> selectedObjects = getSelectedValues();
-        if (selectedObjects.isEmpty()) {
-            isShowEnabled = false;
-            isHideEnabled = false;
-        } else {  //we've got something selected, figure out how things should be enabled based on the state of what is selected.
-            StateHolder stateHolder = new StateHolder();
-            determineShowHideEnabledState(stateHolder, selectedObjects);
-
-            //now reverse them. show is enabled, if hidden things are present.
-            isShowEnabled = stateHolder.containsHiddenObjects;
-            isHideEnabled = stateHolder.containsShownObjects;
-        }
-
-        showButton.setEnabled(isShowEnabled);
-        hideButton.setEnabled(isHideEnabled);
-    }
-
-    /**
-     * This determines the state of the show hide buttons. We only want to enable one if its appropriate. Because we
-     * have to handle multiple selection, we look for both hidden and shown items. We stop as soon as we find both or
-     * we're done with the list.
-     *
-     * @param stateHolder where we store our state.
-     * @param selectedObjects the objects to search.
-     */
-    protected void determineShowHideEnabledState(StateHolder stateHolder, List<String> selectedObjects) {
-        Iterator<String> iterator = selectedObjects.iterator();
-
-        //iterate through them all or until we've found both a hidden and shown object.
-        while (iterator.hasNext() && (!stateHolder.containsHiddenObjects || !stateHolder.containsShownObjects)) {
-            String object = iterator.next();
-            if (isAllowed(object)) {
-                stateHolder.containsShownObjects = true;
-            } else {
-                stateHolder.containsHiddenObjects = true;
-            }
-        }
-    }
-
-    /**
-     * Just a holder for 2 variables.
-     */
-    protected class StateHolder {
-        boolean containsHiddenObjects;
-        boolean containsShownObjects;
-    }
-
-    protected List<String> getSelectedValues() {
-        Object[] objects = list.getSelectedValues();
-        if (objects == null || objects.length == 0) {
-            return Collections.emptyList();
-        }
-
-        List<String> nodes = new ArrayList<String>();
-
-        for (int index = 0; index < objects.length; index++) {
-            Object object = objects[index];
-            nodes.add((String) object);
-        }
-
-        return nodes;
-    }
-
-    private void hideSelected() {
-        List<String> selection = getSelectedValues();
-
-        hideSelected(selection);
-
-        enableAppropriately();  //now update the buttons to reflect the change
-
-        list.repaint();
-    }
-
-    protected abstract void hideSelected(List<String> selection);
-
-    private void showSelected() {
-        List<String> selection = getSelectedValues();
-
-        showSelected(selection);
-
-        enableAppropriately();  //now update the buttons to reflect the change
-
-        list.repaint();
-    }
-
-    protected abstract void showSelected(List<String> selection);
-
-    public void populate(List<String> items) {
-        model.clear();
-
-        Iterator<String> iterator = items.iterator();
-
-        while (iterator.hasNext()) {
-            String item = iterator.next();
-            model.addElement(item);
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/ProjectAndTaskFilterDialog.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/ProjectAndTaskFilterDialog.java
deleted file mode 100644
index 8313fe2..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/ProjectAndTaskFilterDialog.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic.filter;
-
-import org.gradle.foundation.visitors.AllProjectsAndTasksVisitor;
-import org.gradle.foundation.visitors.UniqueNameProjectAndTaskVisitor;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.filters.BasicFilterEditor;
-import org.gradle.gradleplugin.foundation.filters.BasicProjectAndTaskFilter;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingExportInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingImportInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JDialog;
-import javax.swing.JPanel;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Window;
-import java.awt.event.ActionEvent;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.util.List;
-
-/**
- * This dialog allows you to edit what tasks and projects are visible when a filter is enabled. Filters are used to weed
- * out rarely-used things to make finding things easier.
- *
- * @author mhunsicker
- */
-public class ProjectAndTaskFilterDialog {
-    private JDialog dialog;
-    private JPanel mainPanel;
-    private TaskFilterEditorPanel taskFilterEditorPanel;
-    private ProjectFilterEditorPanel projectFilterEditorPanel;
-
-    private JCheckBox filterOutTasksWithNoDescriptionCheckBox;
-
-    private BasicFilterEditor editor;
-    private GradlePluginLord gradlePluginLord;
-
-    private boolean saveResults;
-
-    public ProjectAndTaskFilterDialog(Window parent, GradlePluginLord gradlePluginLord) {
-        this.gradlePluginLord = gradlePluginLord;
-        this.dialog = Utility.createDialog(parent, "Filter", true);
-
-        setupUI();
-    }
-
-    /**
-     * Call this to start editing the given filter.
-     *
-     * @param filter the filter to edit
-     * @return a filter if the user OKs the changes, null if they cancel
-     */
-    public BasicProjectAndTaskFilter show(BasicProjectAndTaskFilter filter) {
-        this.editor = new BasicFilterEditor(filter);
-
-        if (mainPanel == null) {
-            setupUI();
-        }
-
-        populate();
-
-        taskFilterEditorPanel.enableAppropriately();
-        projectFilterEditorPanel.enableAppropriately();
-
-        dialog.setVisible(true);
-
-        if (this.saveResults) {
-            return editor.createFilter();
-        }
-
-        return null;
-    }
-
-    private void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-        dialog.getContentPane().add(mainPanel);
-
-        mainPanel.add(createOptionsPanel(), BorderLayout.NORTH);
-        mainPanel.add(createCenterPanel(), BorderLayout.CENTER);
-        mainPanel.add(createOkCancelPanel(), BorderLayout.SOUTH);
-
-        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-
-        dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
-        dialog.addWindowListener(new WindowAdapter() {
-            public void windowClosing(WindowEvent e) {
-                close(false);
-            }
-        });
-
-        dialog.setSize(600, 750);
-        dialog.setLocationRelativeTo(dialog.getParent());
-    }
-
-    private Component createOptionsPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        JButton importButton = new JButton(new AbstractAction("Import...") {
-            public void actionPerformed(ActionEvent e) {
-                importFilter();
-            }
-        });
-
-        JButton exportButton = new JButton(new AbstractAction("Export...") {
-            public void actionPerformed(ActionEvent e) {
-                exportFilter();
-            }
-        });
-
-        filterOutTasksWithNoDescriptionCheckBox = new JCheckBox(new AbstractAction("Hide Tasks With No Description") {
-            public void actionPerformed(ActionEvent e) {
-                filterOutTasksWithNoDescription();
-            }
-        });
-
-        panel.add(filterOutTasksWithNoDescriptionCheckBox);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(importButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(exportButton);
-        panel.add(Box.createHorizontalGlue());
-
-        panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
-
-        return panel;
-    }
-
-    private Component createOkCancelPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        JButton okButton = new JButton(new AbstractAction("OK") {
-            public void actionPerformed(ActionEvent e) {
-                close(true);
-            }
-        });
-
-        JButton cancelButton = new JButton(new AbstractAction("Cancel") {
-            public void actionPerformed(ActionEvent e) {
-                close(false);
-            }
-        });
-
-        panel.add(Box.createHorizontalGlue());
-        panel.add(okButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(cancelButton);
-        panel.add(Box.createHorizontalGlue());
-
-        panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
-
-        return panel;
-    }
-
-    /**
-     * This creates the two list panels. This may seem odd, but I'm putting each of them into a BoxLayout then inside
-     * another BorderLayout. This is to make each of them as large as they can be and divide the space evenly between
-     * them.
-     */
-    private Component createCenterPanel() {
-        JPanel outterPanel = new JPanel();
-        outterPanel.setLayout(new BoxLayout(outterPanel, BoxLayout.Y_AXIS));
-
-        JPanel projectPanel = new JPanel(new BorderLayout());
-        JPanel taskPanel = new JPanel(new BorderLayout());
-
-        projectPanel.add(createProjectPanel(), BorderLayout.CENTER);
-        taskPanel.add(createTasksPanel(), BorderLayout.CENTER);
-
-        projectPanel.setBorder(BorderFactory.createTitledBorder("Projects"));
-        taskPanel.setBorder(BorderFactory.createTitledBorder("Tasks"));
-
-        outterPanel.add(projectPanel);
-        outterPanel.add(Box.createVerticalStrut(10));
-        outterPanel.add(taskPanel);
-
-        return outterPanel;
-    }
-
-    private Component createTasksPanel() {
-        taskFilterEditorPanel = new TaskFilterEditorPanel();
-
-        return taskFilterEditorPanel.getComponent();
-    }
-
-    private Component createProjectPanel() {
-        projectFilterEditorPanel = new ProjectFilterEditorPanel();
-
-        return projectFilterEditorPanel.getComponent();
-    }
-
-    private void close(boolean saveResults) {
-        this.saveResults = saveResults;
-        dialog.setVisible(false);
-    }
-
-    /**
-     * This imports a filter from a file.
-     */
-    private void importFilter() {
-        if (editor.importFromFile(new SwingImportInteraction(dialog))) {
-            taskFilterEditorPanel.getComponent().repaint();
-            projectFilterEditorPanel.getComponent().repaint();
-        }
-    }
-
-    /**
-     * This exports a filter to a file.
-     */
-    private void exportFilter() {
-        editor.exportToFile(new SwingExportInteraction(dialog));
-    }
-
-    /**
-     * Populates our lists. We'll use a visitor to build up a list of unique names of projects and tasks. Then we'll
-     * sort them and add them to each filter editor panel.
-     */
-    private void populate() {
-        UniqueNameProjectAndTaskVisitor visitor = new UniqueNameProjectAndTaskVisitor();
-
-        AllProjectsAndTasksVisitor.visitProjectAndTasks(gradlePluginLord.getProjects(), visitor, null);
-
-        List<String> taskNames = visitor.getSortedTaskNames();
-        List<String> projectNames = visitor.getSortedProjectNames();
-
-        taskFilterEditorPanel.populate(taskNames);
-        projectFilterEditorPanel.populate(projectNames);
-
-        filterOutTasksWithNoDescriptionCheckBox.setSelected(editor.filterOutTasksWithNoDescription());
-    }
-
-    private class TaskFilterEditorPanel extends AbstractFilterEditorPanel {
-        protected boolean isAllowed(String item) {
-            return editor.doesAllowTask(item);
-        }
-
-        protected void hideSelected(List<String> selection) {
-            editor.hideTasksByName(selection);
-        }
-
-        protected void showSelected(List<String> selection) {
-            editor.showTasksByName(selection);
-        }
-    }
-
-    private class ProjectFilterEditorPanel extends AbstractFilterEditorPanel {
-        protected boolean isAllowed(String item) {
-            return editor.doesAllowProject(item);
-        }
-
-        protected void hideSelected(List<String> selection) {
-            editor.hideProjectsByName(selection);
-        }
-
-        protected void showSelected(List<String> selection) {
-            editor.showProjectsByName(selection);
-        }
-    }
-
-    private void filterOutTasksWithNoDescription() {
-        editor.setFilterOutTasksWithNoDescription(filterOutTasksWithNoDescriptionCheckBox.isSelected());
-        taskFilterEditorPanel.getComponent().repaint();
-        projectFilterEditorPanel.getComponent().repaint();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/CommandLineTab.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/CommandLineTab.java
deleted file mode 100644
index b9b357c..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/CommandLineTab.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JComponent;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import javax.swing.KeyStroke;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
-
-/**
- * A tab that allows you to just type a straight command line that is sent to Gradle.
- *
- * @author mhunsicker
-  */
-public class CommandLineTab implements GradleTab {
-    private GradlePluginLord gradlePluginLord;
-    private FavoritesEditor favoritesEditor;
-
-    private JPanel mainPanel;
-    private JTextField commandLineField;
-
-    private JButton executeButton;
-    private JButton addToFavoritesButton;
-
-   public CommandLineTab(GradlePluginLord gradlePluginLord, SettingsNode settingsNode) {
-        this.gradlePluginLord = gradlePluginLord;
-
-        this.favoritesEditor = gradlePluginLord.getFavoritesEditor();
-    }
-
-    /**
-    * @return the name of this tab
-    */
-    public String getName() {
-        return "Command Line";
-    }
-
-    /**
-     * Notification that this component is about to be shown. Do whatever initialization you choose.
-    */
-    public void aboutToShow() {
-
-    }
-
-    /**
-    * This is where we should create your component.
-    *
-    * @return the component
-    */
-    public Component createComponent() {
-        JPanel mainPanel = new JPanel(new BorderLayout());
-
-        mainPanel.add(createCommandLinePanel(), BorderLayout.NORTH);
-        mainPanel.add(Box.createVerticalGlue(), BorderLayout.CENTER);
-
-        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-
-        return mainPanel;
-    }
-
-    private Component createCommandLinePanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        commandLineField = new JTextField();
-
-        //make Enter execute the command line.
-        commandLineField.registerKeyboardAction(new ExecuteAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
-
-        //we'll put 'gradle' in from the command line to make it more obvious that its not needed.
-        JPanel commandLinePanel = new JPanel();
-        commandLinePanel.setLayout(new BoxLayout(commandLinePanel, BoxLayout.X_AXIS));
-        commandLinePanel.add(new JLabel("gradle "));
-        commandLinePanel.add(commandLineField);
-
-        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Command Line:")));
-        panel.add(Box.createVerticalStrut(5));
-        panel.add(commandLinePanel);
-        panel.add(Box.createVerticalStrut(5));
-        panel.add(createButtonPanel());
-
-        return panel;
-    }
-
-    private class ExecuteAction extends AbstractAction {
-        private ExecuteAction() {
-            super("Execute");
-        }
-
-        public void actionPerformed(ActionEvent e) {
-            executeCommandLine();
-        }
-    }
-
-
-    private Component createButtonPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        executeButton = new JButton(new ExecuteAction());
-
-        addToFavoritesButton = new JButton(new AbstractAction("Add To Favorites") {
-            public void actionPerformed(ActionEvent e) {
-                addToFavorites();
-            }
-        });
-
-        panel.add(Box.createHorizontalGlue());
-        panel.add(executeButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(addToFavoritesButton);
-
-        return panel;
-    }
-
-    private void addToFavorites() {
-        String commandLineText = commandLineField.getText();
-        favoritesEditor.addFavorite(commandLineText, false);
-    }
-
-    private void executeCommandLine() {
-        String commandLineText = commandLineField.getText();
-        gradlePluginLord.addExecutionRequestToQueue(commandLineText, "Command Line" );
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/FavoriteTasksTab.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/FavoriteTasksTab.java
deleted file mode 100644
index 2ad49e6..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/FavoriteTasksTab.java
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingEditFavoriteInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingExportInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingImportInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
-
-import javax.swing.*;
-import javax.swing.event.ListSelectionEvent;
-import javax.swing.event.ListSelectionListener;
-import java.awt.*;
-import java.awt.event.*;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This displays a list of favorites and allows the user to add/remove items as well as change their order.
- *
- * @author mhunsicker
-  */
-public class FavoriteTasksTab implements GradleTab, GradlePluginLord.GeneralPluginObserver, FavoritesEditor.FavoriteTasksObserver {
-    private GradlePluginLord gradlePluginLord;
-    private FavoritesEditor favoritesEditor;
-
-    private SettingsNode settingsNode;
-
-    private JPanel mainPanel;
-    private DefaultListModel model;
-    private JList list;
-
-    private JPopupMenu popupMenu;
-    private JMenuItem executeMenuItem;
-    private JMenuItem editMenuItem;
-    private JMenuItem removeFavoritesMenuItem;
-    private JMenuItem copyFavoritesMenuItem;
-
-    private JButton executeButton;
-    private JButton addButton;
-    private JButton editButton;
-    private JButton removeButton;
-    private JButton moveUpButton;
-    private JButton moveDownButton;
-    private JButton importButton;
-    private JButton exportButton;
-
-   public FavoriteTasksTab(GradlePluginLord gradlePluginLord, SettingsNode settingsNode) {
-        this.gradlePluginLord = gradlePluginLord;
-        this.settingsNode = settingsNode;
-
-        this.favoritesEditor = gradlePluginLord.getFavoritesEditor();
-
-        gradlePluginLord.addGeneralPluginObserver(this, true);
-        favoritesEditor.addFavoriteTasksObserver(this, true);
-
-        //read in our settings before we populate things
-        favoritesEditor.serializeIn(settingsNode);
-    }
-
-    public String getName() {
-        return "Favorites";
-    }
-
-    public Component createComponent() {
-        setupUI();
-        enableThingsAppropriately();
-        return mainPanel;
-    }
-
-    /**
-    * Notification that this component is about to be shown. Do whatever initialization you choose.
-    */
-    public void aboutToShow() {
-        populate();
-    }
-
-    private void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-
-        mainPanel.add(createButtonPanel(), BorderLayout.NORTH);
-        mainPanel.add(createListPanel(), BorderLayout.CENTER);
-
-        setupPopupMenu();
-    }
-
-    private Component createButtonPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        executeButton = Utility.createButton(getClass(), "execute.png", "Execute the selected command", new AbstractAction("Execute") {
-            public void actionPerformed(ActionEvent e) {
-                executeSelectedTasks();
-            }
-        });
-
-        addButton = Utility.createButton(getClass(), "add.png", "Adds a new favorite gradle command", new AbstractAction("Add...") {
-            public void actionPerformed(ActionEvent e) {
-                addTask();
-            }
-        });
-
-        editButton = Utility.createButton(getClass(), "edit.png", "Edit the selected favorite", new AbstractAction("Edit...") {
-            public void actionPerformed(ActionEvent e) {
-                editTask();
-            }
-        });
-
-        removeButton = Utility.createButton(getClass(), "remove.png", "Delete the selected favorite", new AbstractAction("Remove") {
-            public void actionPerformed(ActionEvent e) {
-                removeSelectedFavorites();
-            }
-        });
-
-        moveUpButton = Utility.createButton(getClass(), "move-up.png", "Moves the selected favorites up", new AbstractAction("Move Up") {
-            public void actionPerformed(ActionEvent e) {
-                favoritesEditor.moveFavoritesBefore(getSelectedFavoriteTasks());
-            }
-        });
-
-        moveDownButton = Utility.createButton(getClass(), "move-down.png", "Moves the selected favorites down", new AbstractAction("Move Down") {
-            public void actionPerformed(ActionEvent e) {
-                favoritesEditor.moveFavoritesAfter(getSelectedFavoriteTasks());
-            }
-        });
-
-        importButton = Utility.createButton(getClass(), "import.png", "Imports current favorite settings", new AbstractAction("Import...") {
-            public void actionPerformed(ActionEvent e) {
-                importFavorites();
-            }
-        });
-
-        exportButton = Utility.createButton(getClass(), "export.png", "Exports current favorite settings", new AbstractAction("Export...") {
-            public void actionPerformed(ActionEvent e) {
-                exportFavorites();
-            }
-        });
-
-        panel.add(executeButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(addButton);
-        panel.add(Box.createHorizontalStrut(5));
-        panel.add(editButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(removeButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(moveUpButton);
-        panel.add(Box.createHorizontalStrut(5));
-        panel.add(moveDownButton);
-        panel.add(Box.createHorizontalGlue());
-        panel.add(importButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(exportButton);
-
-        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-
-        return panel;
-    }
-
-    private Component createListPanel() {
-        model = new DefaultListModel();
-        list = new JList(model);
-
-        list.addMouseListener(new MouseAdapter() {
-            public void mouseClicked(MouseEvent e) {
-                if (e.getClickCount() == 2) {
-                   executeSelectedTasks();
-                }
-                else
-                   if( e.getButton() == MouseEvent.BUTTON3 ) {
-                      handleRightClick( e );
-                   }
-            }
-        });
-
-        list.addListSelectionListener(new ListSelectionListener() {
-            public void valueChanged(ListSelectionEvent e) {
-                if (!e.getValueIsAdjusting()) {
-                   enableThingsAppropriately();
-                }
-            }
-        });
-
-       //hook 'enter' so it runs the selected tasks.
-       list.registerKeyboardAction(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                executeSelectedTasks();
-            }
-        }, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
-
-        return new JScrollPane(list);
-    }
-
-    private void populate() {
-        model.clear();
-
-        Iterator<FavoriteTask> taskIterator = favoritesEditor.getFavoriteTasks().iterator();
-        while (taskIterator.hasNext()) {
-            FavoriteTask favoriteTask = taskIterator.next();
-            model.addElement(favoriteTask);
-        }
-    }
-
-
-  private void handleRightClick( MouseEvent e )
-  {
-     Point point = e.getPoint();
-     int index = list.locationToIndex( point );
-     if( index != -1 )  //all of this is because the JList won't select things on right-click. Which means you won't be acting upon what you think you're acting upon.
-     {
-        if( !list.isSelectedIndex( index ) )
-        {
-           if( Utility.isCTRLDown( e.getModifiersEx() ) ) {
-              list.addSelectionInterval( index, index ); //the CTRL key is down, just add this to our selection
-           }
-           else {
-              list.setSelectedIndex( index );            //the CTRL key is not down, just replace the selection
-           }
-           //we're not handling SHIFT! Nor are we handling OS X.
-        }
-     }
-     enableThingsAppropriately();
-     popupMenu.show( list, point.x, point.y );
-  }
-
-    /**
-    * Notification that we're about to reload the projects and tasks.
-    */
-    public void startingProjectsAndTasksReload() {
-        //we don't really care.
-    }
-
-    /**
-     * Notification that the projects and tasks have been reloaded. You may want to repopulate or update your views.
-     *
-     * @param wasSuccessful true if they were successfully reloaded. False if an error occurred so we no longer can show
-     * the projects and tasks (probably an error in a .gradle file).
-    */
-    public void projectsAndTasksReloaded(boolean wasSuccessful) {
-        //We need to repaint in case any are in error now, or no longer in error.
-        list.repaint();
-
-        //and possible change what is enabled
-        enableThingsAppropriately();
-    }
-
-   /**
-     * Notification that the favorites list has changed. We'll repopulate and then save our changes immediately. The
-     * save is useful for IDE integration where we don't control the settings.
-    */
-    public void favoritesChanged() {
-        populate();
-        favoritesEditor.serializeOut(settingsNode);
-    }
-
-    /**
-     * Notification that the favorites were re-ordered. We'll update our list and save our changes immediately. The save
-     * is useful for IDE integration where we don't control the settings.
-    *
-    * @param favoritesReordered the favorites that were reordered
-    */
-    public void favoritesReordered(List<FavoriteTask> favoritesReordered) {
-        Object[] previouslySelectedObjects = list.getSelectedValues();
-
-        populate();
-
-        list.clearSelection();
-        //now go re-select the things that were moved
-        if (previouslySelectedObjects != null) {
-           for (int index = 0; index < previouslySelectedObjects.length; index++) {
-                           Object previouslySelectedObject = previouslySelectedObjects[index];
-                           int listIndex = model.indexOf(previouslySelectedObject);
-                           if (listIndex != -1) {
-                              list.addSelectionInterval(listIndex, listIndex);
-                           }
-           }
-        }
-
-       favoritesEditor.serializeOut(settingsNode);
-    }
-
-    private void setupPopupMenu() {
-        popupMenu = new JPopupMenu();
-
-        executeMenuItem = Utility.createMenuItem( this.getClass(),"Execute", "execute.png", new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                executeSelectedTasks();
-            }
-        });
-
-        popupMenu.add(executeMenuItem);
-
-        editMenuItem = Utility.createMenuItem( this.getClass(),"Edit...", "edit.png", new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                editTask();
-            }
-        });
-
-        popupMenu.add(editMenuItem);
-
-        copyFavoritesMenuItem = Utility.createMenuItem( this.getClass(),"Duplicate ", "blank.png", new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                duplicateTasks();
-            }
-        });
-
-        popupMenu.add(copyFavoritesMenuItem);
-
-        removeFavoritesMenuItem = Utility.createMenuItem( this.getClass(), "Remove", "remove.png", new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                removeSelectedFavorites();
-            }
-        });
-
-        popupMenu.add(removeFavoritesMenuItem);
-    }
-
-    /**
-     * Executes the selected tasks. If only one is selected, we execute it as normal. If
-     * however, multiples are selected, we'll execute that all at once.
-     */
-    private void executeSelectedTasks() {
-        List<FavoriteTask> favorites = getSelectedFavoriteTasks();
-        gradlePluginLord.addExecutionRequestToQueue( favorites );
-    }
-
-    private void removeSelectedFavorites() {
-        List<FavoriteTask> favorites = getSelectedFavoriteTasks();
-        favoritesEditor.removeFavorites(favorites);
-    }
-
-    private List<FavoriteTask> getSelectedFavoriteTasks() {
-        Object[] objects = list.getSelectedValues();
-        if (objects == null) {
-           return Collections.emptyList();
-        }
-
-       List<FavoriteTask> favorites = new ArrayList<FavoriteTask>();
-        for (int index = 0; index < objects.length; index++) {
-           favorites.add((FavoriteTask) objects[index]);
-        }
-
-       return favorites;
-    }
-
-    private FavoriteTask getFirstSelectedFavoriteTask() {
-        return (FavoriteTask) list.getSelectedValue();
-    }
-
-    /**
-     * Enables buttons and menu items based on what is selected.
-    */
-    private void enableThingsAppropriately() {
-        Object[] objects = list.getSelectedValues();
-        boolean hasSelection = objects != null && objects.length != 0;
-        boolean hasSingleSelection = objects != null && objects.length == 1;
-
-        executeMenuItem.setEnabled(hasSelection);
-        removeFavoritesMenuItem.setEnabled(hasSelection);
-
-        executeButton.setEnabled(hasSelection);
-        removeButton.setEnabled(hasSelection);
-        moveUpButton.setEnabled(hasSelection);
-        moveDownButton.setEnabled(hasSelection);
-        copyFavoritesMenuItem.setEnabled(hasSelection);
-
-        editButton.setEnabled(hasSingleSelection);  //only can edit if a single task is selected
-    }
-
-    /**
-    * This imports favorites from a file.
-    */
-    private void importFavorites() {
-        favoritesEditor.importFromFile(new SwingImportInteraction(SwingUtilities.getWindowAncestor(mainPanel)));
-    }
-
-    /**
-    * This exports the favorites to a file.
-    */
-    private void exportFavorites() {
-        favoritesEditor.exportToFile(new SwingExportInteraction(SwingUtilities.getWindowAncestor(mainPanel)));
-    }
-
-    /**
-    * Call this to prompt the user for a task to add.
-    */
-    private void addTask() {
-        favoritesEditor.addFavorite(new SwingEditFavoriteInteraction(SwingUtilities.getWindowAncestor(mainPanel), "Add Favorite", true ));
-    }
-
-    private void editTask() {
-        FavoriteTask selectedFavoriteTask = getFirstSelectedFavoriteTask();
-       //if the user has kept these two in synch, we'll continue to keep them in synch.
-        boolean synchronizeDisplayNameWithCommand = selectedFavoriteTask.getDisplayName().equals( selectedFavoriteTask.getFullCommandLine() );
-        favoritesEditor.editFavorite(selectedFavoriteTask, new SwingEditFavoriteInteraction(SwingUtilities.getWindowAncestor(mainPanel), "Edit Favorite", synchronizeDisplayNameWithCommand ));
-    }
-
-    /**
-     * This duplicates all the selected tasks
-     */
-    private void duplicateTasks() {
-        favoritesEditor.duplicateFavorites( getSelectedFavoriteTasks() );
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/GradleTab.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/GradleTab.java
deleted file mode 100644
index b5746e3..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/GradleTab.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
-
-import java.awt.Component;
-
-/**
- * Interface for a tab in the gradle UI.
- *
- * @author mhunsicker
- */
-public interface GradleTab {
-    /**
-     * @return the name of this tab
-     * @author mhunsicker
-     */
-    public String getName();
-
-    /**
-     * This is where we should create the component.
-     *
-     * @return the component
-     */
-    public Component createComponent();
-
-    /**
-     * Notification that this component is about to be shown. Do whatever initialization you choose.
-     */
-    public void aboutToShow();
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/SetupTab.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/SetupTab.java
deleted file mode 100644
index 8c1f2ea..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/SetupTab.java
+++ /dev/null
@@ -1,627 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
-
-import org.gradle.initialization.DefaultCommandLineConverter;
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.swing.generic.OutputUILord;
-import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
-import org.gradle.logging.internal.LoggingCommandLineConverter;
-
-import javax.swing.AbstractAction;
-import javax.swing.AbstractButton;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.ButtonGroup;
-import javax.swing.ButtonModel;
-import javax.swing.DefaultComboBoxModel;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JComboBox;
-import javax.swing.JComponent;
-import javax.swing.JFileChooser;
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JRadioButton;
-import javax.swing.JTextField;
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.File;
-import java.util.*;
-
-/**
- * This tab contains general settings for the plugin.
- *
- * @author mhunsicker
-  */
-public class SetupTab implements GradleTab, GradlePluginLord.SettingsObserver {
-    private final Logger logger = Logging.getLogger(SetupTab.class);
-
-    private static final String STACK_TRACE_LEVEL_CLIENT_PROPERTY = "stack-trace-level-client-property";
-    private static final String SETUP = "setup";
-    private static final String STACK_TRACE_LEVEL = "stack-trace-level";
-    private static final String SHOW_OUTPUT_ON_ERROR = "show-output-on-error";
-    private static final String LOG_LEVEL = "log-level";
-    private static final String CURRENT_DIRECTORY = "current-directory";
-    private static final String CUSTOM_GRADLE_EXECUTOR = "custom-gradle-executor";
-
-    private GradlePluginLord gradlePluginLord;
-    private OutputUILord outputUILord;
-    private SettingsNode settingsNode;
-
-    private JPanel mainPanel;
-
-    private JRadioButton showNoStackTraceRadioButton;
-    private JRadioButton showStackTrackRadioButton;
-    private JRadioButton showFullStackTrackRadioButton;
-
-    private JComboBox logLevelComboBox;
-
-    private JCheckBox onlyShowOutputOnErrorCheckBox;
-
-    private ButtonGroup stackTraceButtonGroup;
-
-    private JTextField currentDirectoryTextField;
-
-    private JCheckBox useCustomGradleExecutorCheckBox;
-    private JTextField customGradleExecutorField;
-    private JButton browseForCustomGradleExecutorButton;
-
-   private JPanel customPanelPlaceHolder;
-
-   public SetupTab(GradlePluginLord gradlePluginLord, OutputUILord outputUILord, SettingsNode settingsNode) {
-        this.gradlePluginLord = gradlePluginLord;
-      this.outputUILord = outputUILord;
-      this.settingsNode = settingsNode.addChildIfNotPresent(SETUP);
-    }
-
-    public String getName() {
-        return "Setup";
-    }
-
-    public Component createComponent() {
-        setupUI();
-
-        return mainPanel;
-    }
-
-    /**
-    * Notification that this component is about to be shown. Do whatever initialization you choose.
-    */
-    public void aboutToShow() {
-        updatePluginLordSettings();
-        gradlePluginLord.addSettingsObserver( this, true );
-    }
-
-    private void setupUI() {
-        mainPanel = new JPanel();
-        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
-
-        mainPanel.add(createCurrentDirectoryPanel());
-        mainPanel.add(Box.createVerticalStrut(10));
-        mainPanel.add(createLogLevelPanel());
-        mainPanel.add(Box.createVerticalStrut(10));
-        mainPanel.add(createStackTracePanel());
-        mainPanel.add(Box.createVerticalStrut(10));
-        mainPanel.add(createOptionsPanel());
-        mainPanel.add(Box.createVerticalStrut(10));
-        mainPanel.add(createCustomExecutorPanel());
-        mainPanel.add(Box.createVerticalStrut(10));
-
-        //add a panel that can be used to add custom things to the setup tab
-        customPanelPlaceHolder = new JPanel( new BorderLayout() );
-        mainPanel.add( customPanelPlaceHolder );
-
-        //Glue alone doesn't work in this situation. This forces everything to the top.
-        JPanel expandingPanel = new JPanel(new BorderLayout());
-        expandingPanel.add(Box.createVerticalGlue(), BorderLayout.CENTER);
-        mainPanel.add(expandingPanel);
-
-        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-    }
-
-    private Component createCurrentDirectoryPanel() {
-        currentDirectoryTextField = new JTextField();
-        currentDirectoryTextField.setEditable(false);
-
-        String currentDirectory = settingsNode.getValueOfChild(CURRENT_DIRECTORY, null);
-        if (currentDirectory == null || "".equals(currentDirectory.trim())) {
-           currentDirectory = gradlePluginLord.getCurrentDirectory().getAbsolutePath();
-        }
-
-       currentDirectoryTextField.setText(currentDirectory);
-        gradlePluginLord.setCurrentDirectory(new File(currentDirectory));
-
-        JButton browseButton = new JButton(new AbstractAction("Browse...") {
-            public void actionPerformed(ActionEvent e) {
-                File file = browseForDirectory( gradlePluginLord.getCurrentDirectory() );
-                if (file != null) {
-                    setCurrentDirectory( file );
-                }
-            }
-        });
-
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Current Directory")));
-        panel.add(createSideBySideComponent(currentDirectoryTextField, browseButton));
-
-        return panel;
-    }
-
-    private void setCurrentDirectory(File file) {
-
-        if( file == null ) {
-            currentDirectoryTextField.setText("");
-            settingsNode.setValueOfChild(CURRENT_DIRECTORY, "" );
-        } else {
-            currentDirectoryTextField.setText( file.getAbsolutePath() );
-            settingsNode.setValueOfChild(CURRENT_DIRECTORY, file.getAbsolutePath());
-        }
-
-        if( gradlePluginLord.setCurrentDirectory(file) )
-        {
-            //refresh the tasks only if we actually changed the current directory
-            gradlePluginLord.addRefreshRequestToQueue();
-        }
-    }
-
-    /**
-    * this creates a panel where the right component is its preferred size. This is useful for putting on
-    * a button on the right and a text field on the left.
-    */
-    public static JComponent createSideBySideComponent(Component leftComponent, Component rightComponent) {
-        JPanel xLayoutPanel = new JPanel();
-        xLayoutPanel.setLayout(new BoxLayout(xLayoutPanel, BoxLayout.X_AXIS));
-
-        Dimension preferredSize = leftComponent.getPreferredSize();
-        leftComponent.setMaximumSize(new Dimension(Integer.MAX_VALUE, preferredSize.height));
-
-        xLayoutPanel.add(leftComponent);
-        xLayoutPanel.add(Box.createHorizontalStrut(5));
-        xLayoutPanel.add(rightComponent);
-
-        return xLayoutPanel;
-    }
-
-    /**
-     * Browses for a file using the text value from the text field as the current value.
-     * @param fileTextField where we get the current value
-     * @return
-     */
-    private File browseForDirectory(File initialFile ) {
-
-        if( initialFile == null ) {
-            initialFile = new File( System.getProperty("user.dir") );
-        }
-
-        JFileChooser chooser = new JFileChooser(initialFile);
-        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-        chooser.setMultiSelectionEnabled(false);
-
-        File file = null;
-        if (chooser.showOpenDialog(mainPanel) == JFileChooser.APPROVE_OPTION) {
-            file = chooser.getSelectedFile();
-        }
-
-        return file;
-    }
-
-    /**
-     * Creates a panel that has a combo box to select a log level
-    */
-    private Component createLogLevelPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        logLevelComboBox = new JComboBox(getLogLevelWrappers());
-
-        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Log Level")));
-        panel.add(Utility.addLeftJustifiedComponent(logLevelComboBox));
-
-        //initialize our value
-        String logLevelName = settingsNode.getValueOfChild(LOG_LEVEL, null);
-        LogLevel logLevel = gradlePluginLord.getLogLevel();
-        if (logLevelName != null) {
-            try {
-                logLevel = LogLevel.valueOf(logLevelName);
-            }
-            catch (IllegalArgumentException e) //this may happen if the enum changes. We don't want this to stop the whole UI
-            {
-                logger.error("Converting log level text to log level enum '" + logLevelName + "'", e);
-            }
-        }
-
-        gradlePluginLord.setLogLevel(logLevel);
-        setLogLevelComboBoxSetting(logLevel);
-
-        logLevelComboBox.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                LogLevelWrapper wrapper = (LogLevelWrapper) logLevelComboBox.getSelectedItem();
-                if (wrapper != null) {
-                    gradlePluginLord.setLogLevel(wrapper.logLevel);
-                    settingsNode.setValueOfChild(LOG_LEVEL, wrapper.logLevel.name());
-                }
-            }
-        });
-
-        return panel;
-    }
-
-    /**
-    * This creates an array of wrapper objects suitable for passing to the constructor of the log level combo box.
-    */
-    private Vector<LogLevelWrapper> getLogLevelWrappers() {
-        Collection<LogLevel> collection = new LoggingCommandLineConverter().getLogLevels();
-
-        Vector<LogLevelWrapper> wrappers = new Vector<LogLevelWrapper>();
-
-        Iterator<LogLevel> iterator = collection.iterator();
-
-        while (iterator.hasNext()) {
-            LogLevel level = iterator.next();
-            wrappers.add(new LogLevelWrapper(level));
-        }
-
-        Collections.sort(wrappers, new Comparator<LogLevelWrapper>() {
-            public int compare(LogLevelWrapper o1, LogLevelWrapper o2) {
-                return o1.toString().compareToIgnoreCase(o2.toString());
-            }
-        });
-
-        return wrappers;
-    }
-
-    /**
-     * This exists solely for overriding toString to something nicer. We'll captilize the first letter. The rest become
-     * lower case. Ultimately, this should probably move into LogLevel. We'll also put the log level shortcut in parenthesis
-    */
-    private class LogLevelWrapper {
-        private LogLevel logLevel;
-        private String toString;
-
-        private LogLevelWrapper(LogLevel logLevel) {
-            this.logLevel = logLevel;
-
-            String temp = logLevel.toString().toLowerCase().replace('_', ' '); //replace underscores in the name with spaces
-            this.toString = Character.toUpperCase(temp.charAt(0)) + temp.substring(1);
-
-            //add the command line character to the end (so if an error message says use a log level, you can easily translate)
-            String commandLineCharacter = new LoggingCommandLineConverter().getLogLevelCommandLine( logLevel );
-            if( commandLineCharacter != null && !commandLineCharacter.equals( "" ))
-            {
-               this.toString += " (-" + commandLineCharacter + ")";
-            }
-        }
-
-        public String toString() {
-            return toString;
-        }
-    }
-
-    /**
-    * Sets the log level combo box to the specified log level.
-    *
-    * @param  logLevel   the log level in question.
-    */
-    private void setLogLevelComboBoxSetting(LogLevel logLevel) {
-        DefaultComboBoxModel model = (DefaultComboBoxModel) logLevelComboBox.getModel();
-        for (int index = 0; index < model.getSize(); index++) {
-            LogLevelWrapper wrapper = (LogLevelWrapper) model.getElementAt(index);
-            if (wrapper.logLevel == logLevel) {
-                logLevelComboBox.setSelectedIndex(index);
-                return;
-            }
-        }
-    }
-
-    /**
-     * Creates a panel with stack trace level radio buttons that allow you to specify how much info is given when an
-     * error occurs.
-    */
-    private Component createStackTracePanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        panel.setBorder(BorderFactory.createTitledBorder("Stack Trace Output"));
-
-        showNoStackTraceRadioButton = new JRadioButton("Exceptions Only");
-        showStackTrackRadioButton = new JRadioButton("Standard Stack Trace (-" + DefaultCommandLineConverter.STACKTRACE + ")");  //add the command line character to the end (so if an error message says use a stack trace level, you can easily translate)
-        showFullStackTrackRadioButton = new JRadioButton("Full Stack Trace (-" + DefaultCommandLineConverter.FULL_STACKTRACE + ")" );
-
-        showNoStackTraceRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS);
-        showStackTrackRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.ALWAYS);
-        showFullStackTrackRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.ALWAYS_FULL);
-
-        stackTraceButtonGroup = new ButtonGroup();
-        stackTraceButtonGroup.add(showNoStackTraceRadioButton);
-        stackTraceButtonGroup.add(showStackTrackRadioButton);
-        stackTraceButtonGroup.add(showFullStackTrackRadioButton);
-
-        showNoStackTraceRadioButton.setSelected(true);
-
-        ActionListener radioButtonListener = new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                updateStackTraceSetting(true);
-            }
-        };
-
-        showNoStackTraceRadioButton.addActionListener(radioButtonListener);
-        showStackTrackRadioButton.addActionListener(radioButtonListener);
-        showFullStackTrackRadioButton.addActionListener(radioButtonListener);
-
-        panel.add(Utility.addLeftJustifiedComponent(showNoStackTraceRadioButton));
-        panel.add(Utility.addLeftJustifiedComponent(showStackTrackRadioButton));
-        panel.add(Utility.addLeftJustifiedComponent(showFullStackTrackRadioButton));
-
-        String stackTraceLevel = settingsNode.getValueOfChild(STACK_TRACE_LEVEL, getSelectedStackTraceLevel().name());
-        if (stackTraceLevel != null) {
-            try {
-                setSelectedStackTraceLevel(StartParameter.ShowStacktrace.valueOf(stackTraceLevel));
-                updateStackTraceSetting(false);   //false because we're serializing this in
-            }
-            catch (Exception e) {  //this can happen if the stack trace levels change because you're moving between versions.
-                logger.error("Converting stack trace level text to stack trace level enum '" + stackTraceLevel + "'", e);
-            }
-        }
-
-
-        return panel;
-    }
-
-    /**
-    * This stores the current stack trace setting (based on the UI controls) in the plugin.
-    */
-    private void updateStackTraceSetting(boolean saveSetting) {
-        StartParameter.ShowStacktrace stackTraceLevel = getSelectedStackTraceLevel();
-        gradlePluginLord.setStackTraceLevel(stackTraceLevel);
-
-        if (saveSetting) {
-           settingsNode.setValueOfChild(STACK_TRACE_LEVEL, stackTraceLevel.name());
-        }
-    }
-
-    /**
-     * Sets the selected strack trace level on the radio buttons. The radio buttons store their stack trace level as a
-     * client property and I'll look for a match using that. This way, we don't have to edit this if new levels are
-     * created.
-    *
-    *  @param  newStackTraceLevel   the new stack trace level.
-    */
-    private void setSelectedStackTraceLevel(StartParameter.ShowStacktrace newStackTraceLevel) {
-        Enumeration<AbstractButton> buttonEnumeration = stackTraceButtonGroup.getElements();
-        while (buttonEnumeration.hasMoreElements()) {
-            JRadioButton radioButton = (JRadioButton) buttonEnumeration.nextElement();
-            StartParameter.ShowStacktrace level = (StartParameter.ShowStacktrace) radioButton.getClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY);
-            if (newStackTraceLevel == level) {
-                radioButton.setSelected(true);
-                return;
-            }
-        }
-    }
-
-    /**
-     * Returns the currently selected stack trace level.  The radio buttons store their stack trace level as a client
-     * property so once we get the selected button, we know the level. This way, we don't have to edit this if new
-     * levels are created. Unfortunately, Swing doesn't have an easy way to get the actual button from the group.
-     *
-    *  @return the selected stack trace level
-    */
-    private StartParameter.ShowStacktrace getSelectedStackTraceLevel() {
-        ButtonModel selectedButtonModel = stackTraceButtonGroup.getSelection();
-        if (selectedButtonModel != null) {
-            Enumeration<AbstractButton> buttonEnumeration = stackTraceButtonGroup.getElements();
-            while (buttonEnumeration.hasMoreElements()) {
-                JRadioButton radioButton = (JRadioButton) buttonEnumeration.nextElement();
-                if (radioButton.getModel() == selectedButtonModel) {
-                    StartParameter.ShowStacktrace level = (StartParameter.ShowStacktrace) radioButton.getClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY);
-                    return level;
-                }
-            }
-        }
-
-        return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
-    }
-
-    private Component createOptionsPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        onlyShowOutputOnErrorCheckBox = new JCheckBox("Only Show Output When Errors Occur");
-
-        onlyShowOutputOnErrorCheckBox.addActionListener(new ActionListener() {
-         public void actionPerformed(ActionEvent e) {
-             updateShowOutputOnErrorsSetting();
-             settingsNode.setValueOfChildAsBoolean(SHOW_OUTPUT_ON_ERROR, onlyShowOutputOnErrorCheckBox.isSelected());
-         }
-        });
-
-        //initialize its default value
-        boolean valueAsBoolean = settingsNode.getValueOfChildAsBoolean(SHOW_OUTPUT_ON_ERROR, onlyShowOutputOnErrorCheckBox.isSelected());
-        onlyShowOutputOnErrorCheckBox.setSelected(valueAsBoolean);
-
-        updateShowOutputOnErrorsSetting();
-
-        panel.add(Utility.addLeftJustifiedComponent(onlyShowOutputOnErrorCheckBox));
-
-        return panel;
-    }
-
-   private void updateShowOutputOnErrorsSetting()
-   {
-      boolean value = onlyShowOutputOnErrorCheckBox.isSelected();
-
-       outputUILord.setOnlyShowOutputOnErrors(value);
-   }
-
-    private Component createCustomExecutorPanel() {
-        useCustomGradleExecutorCheckBox = new JCheckBox("Use Custom Gradle Executor");
-
-        customGradleExecutorField = new JTextField();
-        customGradleExecutorField.setEditable(false);
-
-        browseForCustomGradleExecutorButton = new JButton(new AbstractAction("Browse...") {
-            public void actionPerformed(ActionEvent e) {
-                browseForCustomGradleExecutor();
-            }
-        });
-
-        String customExecutorPath = settingsNode.getValueOfChild(CUSTOM_GRADLE_EXECUTOR, null);
-        if (customExecutorPath == null) {
-           setCustomGradleExecutor(null);
-        }
-        else {
-           setCustomGradleExecutor(new File(customExecutorPath));
-        }
-
-       JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
-
-        panel.add(Utility.addLeftJustifiedComponent(useCustomGradleExecutorCheckBox));
-        JComponent sideBySideComponent = createSideBySideComponent(customGradleExecutorField, browseForCustomGradleExecutorButton);
-        sideBySideComponent.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
-        panel.add(sideBySideComponent);
-
-        useCustomGradleExecutorCheckBox.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                if (useCustomGradleExecutorCheckBox.isSelected()) { //if they checked it, browse for a custom executor immediately
-                   browseForCustomGradleExecutor();
-                }
-                else {
-                   setCustomGradleExecutor(null);
-                }
-            }
-        });
-
-        return panel;
-    }
-
-    /**
-    * Call this to browse for a custom gradle executor.
-    */
-    private void browseForCustomGradleExecutor() {
-        File startingDirectory = new File(System.getProperty("user.home"));
-        File currentFile = gradlePluginLord.getCustomGradleExecutor();
-        if (currentFile != null) {
-           startingDirectory = currentFile.getAbsoluteFile();
-        }
-        else {
-            if (gradlePluginLord.getCurrentDirectory() != null) {
-               startingDirectory = gradlePluginLord.getCurrentDirectory();
-            }
-        }
-
-        JFileChooser chooser = new JFileChooser(startingDirectory);
-        chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
-        chooser.setMultiSelectionEnabled(false);
-
-        File file = null;
-        if (chooser.showOpenDialog(mainPanel) == JFileChooser.APPROVE_OPTION) {
-           file = chooser.getSelectedFile();
-        }
-
-       if (file != null) {
-          setCustomGradleExecutor(file);
-       }
-       else {  //if they canceled, and they have no custom gradle executor specified, then we must clear things
-            //This will reset the UI back to 'not using a custom executor'. We can't have them check the
-            //field and not have a value here.
-            if (gradlePluginLord.getCustomGradleExecutor() == null) {
-               setCustomGradleExecutor(null);
-            }
-       }
-    }
-
-    /**
-    * Call this to set a custom gradle executor. We'll enable all fields appropriately and setup the foundation settings. We'll also fire off a refresh.
-    *
-    * @param  file       the file to use as a custom executor. Null not to use one.
-    */
-    private void setCustomGradleExecutor(File file) {
-        String storagePath;
-        boolean isUsingCustom = false;
-        if (file == null) {
-            isUsingCustom = false;
-            storagePath = null;
-        } else {
-            isUsingCustom = true;
-            storagePath = file.getAbsolutePath();
-        }
-
-        //set the executor in the foundation
-        if( gradlePluginLord.setCustomGradleExecutor(file) )
-        {
-            //refresh the tasks only if we actually changed the executor
-            gradlePluginLord.addRefreshRequestToQueue();
-        }
-
-        //set the UI values
-        useCustomGradleExecutorCheckBox.setSelected(isUsingCustom);
-        customGradleExecutorField.setText(storagePath);
-
-        //enable the UI appropriately.
-        browseForCustomGradleExecutorButton.setEnabled(isUsingCustom);
-        customGradleExecutorField.setEnabled(isUsingCustom);
-
-        //store the settings
-        settingsNode.setValueOfChild(CUSTOM_GRADLE_EXECUTOR, storagePath);
-    }
-
-   /**
-    This adds the specified component to the setup panel. It is added below the last
-    'default' item. You can only add 1 component here, so if you need to add multiple
-    things, you'll have to handle adding that to yourself to the one component.
-    @param component the component to add.
-    */
-    public void setCustomPanel( JComponent component ) {
-       customPanelPlaceHolder.add( component, BorderLayout.CENTER );
-       customPanelPlaceHolder.invalidate();
-       mainPanel.validate();
-    }
-
-    /**
-    * Notification that some settings have changed for the plugin. Settings such as current directory, gradle home
-    * directory, etc. This is useful for UIs that need to update their UIs when this is changed by other means.
-    */
-    public void settingsChanged() {
-        updatePluginLordSettings();
-    }
-
-    /**
-     * Called upon start up and whenever GradlePluginLord settings are changed. We'll update our values.
-     * Note: this actually gets called several times in a row for each settings during initialization. Its
-     * not optimal, but functional and I didn't want to deal with numerous, specific-field notifications.
-     */
-    private void updatePluginLordSettings() {
-        setCustomGradleExecutor( gradlePluginLord.getCustomGradleExecutor() );
-
-        setCurrentDirectory( gradlePluginLord.getCurrentDirectory() );
-
-        setSelectedStackTraceLevel(gradlePluginLord.getStackTraceLevel());
-
-        setLogLevelComboBoxSetting(gradlePluginLord.getLogLevel());
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/TaskTreeTab.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/TaskTreeTab.java
deleted file mode 100644
index a0dcdc5..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/TaskTreeTab.java
+++ /dev/null
@@ -1,598 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
-
-import org.gradle.api.logging.Logger;
-import org.gradle.api.logging.Logging;
-import org.gradle.foundation.CommandLineAssistant;
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.gradleplugin.foundation.filters.AllowAllProjectAndTaskFilter;
-import org.gradle.gradleplugin.foundation.filters.BasicFilterEditor;
-import org.gradle.gradleplugin.foundation.filters.BasicProjectAndTaskFilter;
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingAddMultipleFavoritesInteraction;
-import org.gradle.gradleplugin.userinterface.swing.generic.TaskTreeComponent;
-import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
-import org.gradle.gradleplugin.userinterface.swing.generic.filter.ProjectAndTaskFilterDialog;
-
-import javax.swing.AbstractAction;
-import javax.swing.BorderFactory;
-import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.JButton;
-import javax.swing.JCheckBox;
-import javax.swing.JLabel;
-import javax.swing.JMenuItem;
-import javax.swing.JPanel;
-import javax.swing.JPopupMenu;
-import javax.swing.JScrollPane;
-import javax.swing.JToggleButton;
-import javax.swing.JTree;
-import javax.swing.SwingUtilities;
-import javax.swing.UIManager;
-import javax.swing.event.TreeSelectionEvent;
-import javax.swing.event.TreeSelectionListener;
-import java.awt.*;
-import java.awt.datatransfer.StringSelection;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * This displays a tree of projects and tasks.
- *
- * @author mhunsicker
-  */
-public class TaskTreeTab implements GradleTab, GradlePluginLord.GeneralPluginObserver, GradlePluginLord.RequestObserver {
-    private final Logger logger = Logging.getLogger(TaskTreeTab.class);
-
-    private static final String SHOW_DESCRIPTION = "show-description";
-    private static final String BLANK_PNG = "blank.png"; //a blank image used as a spacer on the context menu.
-    private static final String EXECUTE_PNG = "execute.png";
-
-    private JPanel mainPanel;
-    private GradlePluginLord gradlePluginLord;
-    private AlternateUIInteraction alternateUIInteraction;
-
-    private TaskTreeComponent treeComponent;
-
-    private JPopupMenu popupMenu;
-    private JMenuItem addToFavoritesMenuItem;
-    private JMenuItem executeMenuItem;
-    private JMenuItem executeOnlyThisMenuItem;
-    private JMenuItem filterOutMenuItem;
-    private JMenuItem editFileMenuItem;
-    private JMenuItem copyTaskNameMenuItem;
-
-    private JButton refreshButton;
-    private JButton executeButton;
-    private JToggleButton toggleFilterButton;
-    private JButton editFilterButton;
-
-    private JCheckBox showDescriptionCheckBox;
-
-    private BasicFilterEditor editor;
-
-    private boolean isRefreshing;
-
-    private Color defaultTreeBackground;
-    private Color workingBackgroundColor = UIManager.getDefaults().getColor("Panel.background"); //just something to provide better feedback that we're working.
-    private JScrollPane treeScrollPane;
-
-    private SettingsNode settingsNode;
-
-   public TaskTreeTab(GradlePluginLord gradlePluginLord, SettingsNode settingsNode, AlternateUIInteraction alternateUIInteraction) {
-        this.gradlePluginLord = gradlePluginLord;
-        this.settingsNode = settingsNode;
-        this.alternateUIInteraction = alternateUIInteraction;
-
-        gradlePluginLord.addGeneralPluginObserver( this, true );
-        gradlePluginLord.addRequestObserver( this, true );
-
-        initializeFilterEditor();
-    }
-
-    /**
-     * This initializes our filter editor. We create a filter, serialize in our settings and then use that to create the
-     * editor. Lastly, we add an observer to the editor so we can save our changes immediately (useful for IDE
-     * integration where we don't control the settings).
-    */
-    private void initializeFilterEditor() {
-        BasicProjectAndTaskFilter filter = new BasicProjectAndTaskFilter();
-        filter.serializeIn(settingsNode);
-        editor = new BasicFilterEditor(filter);
-
-        editor.addFilterEditorObserver(new BasicFilterEditor.FilterEditorObserver() {
-            public void filterChanged() {  //whenever changes are made, save them.
-                editor.createFilter().serializeOut(settingsNode);
-            }
-        }, false);
-    }
-
-    public String getName() {
-        return "Task Tree";
-    }
-
-    public Component createComponent() {
-        setupUI();
-
-        enableThingsAppropriately();
-
-        return mainPanel;
-    }
-
-    /**
-    * Notification that this component is about to be shown. Do whatever initialization you choose.
-    */
-    public void aboutToShow() {
-        resetShowDescription(); //make sure that our setting is pushed to the tree's setting.
-
-        //when we start up, refresh our list.
-        SwingUtilities.invokeLater(new Runnable() {
-            public void run() {
-                if (gradlePluginLord.isSetupComplete()) {
-                   refresh();
-                }
-                else {
-                   showTextInViewport("Cannot show tasks until configuration is complete. See Setup tab.");
-                }
-            }
-        });
-    }
-
-    public void setupUI() {
-        mainPanel = new JPanel(new BorderLayout());
-
-        mainPanel.add(createTopPanel(), BorderLayout.NORTH);
-        mainPanel.add(createTreePanel(), BorderLayout.CENTER);
-
-        setupPopupMenu();
-    }
-
-    private Component createTopPanel() {
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-
-        refreshButton = Utility.createButton(getClass(), "refresh.png", "Refreshes the task tree", new AbstractAction("Refresh") {
-            public void actionPerformed(ActionEvent e) {
-                refresh();
-            }
-        });
-
-        executeButton = Utility.createButton(getClass(), EXECUTE_PNG, "Execute the selected tasks", new AbstractAction("Execute") {
-            public void actionPerformed(ActionEvent e) {
-                executeSelectedTasks();
-            }
-        });
-
-        toggleFilterButton = Utility.createToggleButton( getClass(), "filter.png", "Toggles the view to show either everything or only the filtered items", new AbstractAction("Filter") {
-            public void actionPerformed(ActionEvent e) {
-                populate();
-            }
-        });
-
-        toggleFilterButton.setSelected(true);
-
-        editFilterButton = Utility.createButton(getClass(), "edit-filter.png", "Edits the filter to control what is visible", new AbstractAction("Edit Filter...") {
-            public void actionPerformed(ActionEvent e) {
-                configureFilter();
-            }
-        });
-
-        showDescriptionCheckBox = new JCheckBox("Description", true);
-        showDescriptionCheckBox.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                resetShowDescription();
-            }
-        });
-
-        showDescriptionCheckBox.setSelected(settingsNode.getValueOfChildAsBoolean(SHOW_DESCRIPTION, showDescriptionCheckBox.isSelected()));
-
-        panel.add(refreshButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(executeButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(toggleFilterButton);
-        panel.add(Box.createHorizontalStrut(10));
-        panel.add(showDescriptionCheckBox);
-        panel.add(Box.createHorizontalGlue());
-        panel.add(editFilterButton);
-
-        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
-
-        return panel;
-    }
-
-    private Component createTreePanel() {
-        treeComponent = new TaskTreeComponent(gradlePluginLord, new TaskTreeComponent.Interaction() {
-            public void rightClick(JTree tree, int x, int y) {
-                enableThingsAppropriately();
-                popupMenu.show(tree, x, y);
-            }
-
-            public void taskInvoked(TaskView task, boolean isCtrlKeyDown) {
-                if (isCtrlKeyDown) {
-                   gradlePluginLord.addExecutionRequestToQueue(task, false, "-a");
-                }
-                else {
-                   gradlePluginLord.addExecutionRequestToQueue(task, false);
-                }
-            }
-
-            public void projectInvoked(ProjectView project) {
-                executeDefaultTasksInProject(project);
-            }
-        });
-
-        treeComponent.getTree().addTreeSelectionListener(new TreeSelectionListener() {
-            public void valueChanged(TreeSelectionEvent e) {
-                enableThingsAppropriately();
-            }
-        });
-
-        defaultTreeBackground = treeComponent.getTree().getBackground();
-
-        treeScrollPane = new JScrollPane();
-
-        treeComponent.getTree().setBackground(workingBackgroundColor);  //change the color to better indicate that
-        showTextInViewport("Has not built projects/tasks yet.");
-
-        return treeScrollPane;
-    }
-
-    /**
-     * Replaces the tree with a label of text. This is used when there's nothing in the tree, but perhaps a 'working' or
-     * error message.
-    *
-    * @param  text       the text to display
-    */
-    private void showTextInViewport(String text) {
-        treeScrollPane.getViewport().removeAll();
-
-        JPanel panel = new JPanel();
-        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
-        panel.add(Box.createHorizontalGlue());
-        panel.add(new JLabel(text));
-        panel.add(Box.createHorizontalGlue());
-
-        treeScrollPane.getViewport().add(panel);
-        treeScrollPane.revalidate();
-    }
-
-    /**
-     * Puts the tree in the main view. This is used once we've gathered the projects and tasks and want to display them
-     * in the tree.
-    */
-    private void showTreeInViewport() {
-        treeScrollPane.getViewport().removeAll();
-        treeScrollPane.getViewport().add(treeComponent.getTree());
-        treeScrollPane.revalidate();
-    }
-
-   public void executionRequestAdded( ExecutionRequest request )
-   {
-      //we don't really care
-   }
-
-   public void refreshRequestAdded( RefreshTaskListRequest request )
-   {
-      //when someone adds a refresh request, update the UI to reflect this.
-      isRefreshing = true;
-
-      enableThingsAppropriately();
-
-      treeComponent.getTree().setBackground(workingBackgroundColor);
-      showTextInViewport("Refreshing projects and tasks.");
-   }
-
-   /**
-   * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files.
-   *
-   * @param request the request that's about to be executed.
-   * @author mhunsicker
-    */
-   public void aboutToExecuteRequest( Request request )
-   {
-      //we don't really care
-   }
-
-   /**
-    * Notification that the command has completed execution.
-    *
-    * @param request the original request containing the command that was executed
-    * @param result  the result of the command
-    * @param output  the output from gradle executing the command
-    */
-   public void requestExecutionComplete( Request request, int result, String output )
-   {
-      if( request instanceof RefreshTaskListRequest )
-      {
-         isRefreshing = false;
-         enableThingsAppropriately();
-         if( result != 0 ) { //if something went wrong, let the user know
-            showTextInViewport("Error");
-         }
-      }
-   }
-
-   /**
-     * Call this to repopulate the tree. Useful if new tasks have been created.
-    */
-    private void refresh() {
-        gradlePluginLord.addRefreshRequestToQueue();
-    }
-
-    /**
-     * This populates (and repopulates) the tree.
-    */
-    private void populate() {
-        if (toggleFilterButton.isSelected()) {
-           treeComponent.populate(editor.createFilter());
-        }
-        else {
-           treeComponent.populate(new AllowAllProjectAndTaskFilter());
-        }
-
-       //reset the background to indicate that we're populated
-        treeComponent.getTree().setBackground(defaultTreeBackground);
-
-        showTreeInViewport();
-    }
-
-    private void executeSelectedTasks(String... additionCommandLineOptions) {
-        List<TaskView> taskViews = treeComponent.getSelectedTasks();
-        String singleCommandLine = CommandLineAssistant.combineTasks( taskViews, additionCommandLineOptions  );
-        if( singleCommandLine == null ) {
-           return;
-        }
-
-       gradlePluginLord.addExecutionRequestToQueue( singleCommandLine, singleCommandLine, false );
-    }
-
-    /**
-    * Notification that we're about to reload the projects and tasks.
-    */
-    public void startingProjectsAndTasksReload() {
-        treeComponent.getTree().setBackground(workingBackgroundColor);
-        showTextInViewport("Building projects/tasks.");
-    }
-
-    /**
-     * Notification that the projects and tasks have been reloaded. You may want to repopulate or update your views.
-     *
-     * @param wasSuccessful true if they were successfully reloaded. False if an error occurred so we no longer can show
-     * the projects and tasks (probably an error in a .gradle file).
-    */
-    public void projectsAndTasksReloaded(boolean wasSuccessful) {
-        isRefreshing = false;
-        enableThingsAppropriately();
-
-        if (!wasSuccessful) {
-           showTextInViewport("Error");
-        }
-        else {
-           populate();
-        }
-    }
-
-    /**
-     * Builds the popup menu
-    */
-    private void setupPopupMenu() {
-        popupMenu = new JPopupMenu();
-
-        executeMenuItem = Utility.createMenuItem( this.getClass(), "Execute", EXECUTE_PNG, new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                executeSelectedTasks();
-            }
-        });
-        popupMenu.add(executeMenuItem);
-
-        executeOnlyThisMenuItem = Utility.createMenuItem( this.getClass(), "Execute Ignoring Dependencies (-a)", BLANK_PNG, new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                executeSelectedTasks("-a");
-            }
-        });
-        popupMenu.add(executeOnlyThisMenuItem);
-
-        popupMenu.addSeparator();
-
-        addToFavoritesMenuItem = Utility.createMenuItem( this.getClass(), "Add To Favorites", BLANK_PNG, new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                addSelectedToFavorites();
-            }
-        });
-        popupMenu.add(addToFavoritesMenuItem);
-
-        filterOutMenuItem = Utility.createMenuItem( this.getClass(), "Hide", BLANK_PNG, new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                hideSelection();
-            }
-        });
-        popupMenu.add(filterOutMenuItem);
-
-        editFileMenuItem = Utility.createMenuItem( this.getClass(), "Edit File", BLANK_PNG, new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                editSelectedFiles();
-            }
-        });
-        popupMenu.add(editFileMenuItem);
-
-        copyTaskNameMenuItem = Utility.createMenuItem( this.getClass(), "Copy Task Name", BLANK_PNG, new AbstractAction() {
-            public void actionPerformed(ActionEvent e) {
-                copySelectedTaskNames();
-            }
-        });
-
-        popupMenu.addSeparator();
-        popupMenu.add(copyTaskNameMenuItem);
-    }
-
-    /**
-     * Enables buttons and menu items based on what is selected.
-    */
-    private void enableThingsAppropriately() {
-        boolean hasSelection = treeComponent.getTree().getSelectionPath() != null;
-        boolean hasTaskSelection = treeComponent.hasTasksSelected();
-        boolean canDoThings = !isRefreshing && treeComponent.isPopulated() && hasSelection; //can't be refreshing, is populated, and  hasSelections
-
-        refreshButton.setEnabled(!isRefreshing);
-
-        addToFavoritesMenuItem.setEnabled(canDoThings);
-        executeMenuItem.setEnabled(canDoThings);
-        executeOnlyThisMenuItem.setEnabled(canDoThings);
-
-        executeButton.setEnabled(canDoThings);
-
-        if (alternateUIInteraction.doesSupportEditingOpeningFiles())   //I'll allow this to be dynamic. If we start supporting editing while running (say a user configured a setting to use a specific external tool), then we'll allow it.
-        {
-            editFileMenuItem.setVisible(true);
-            boolean hasProjectsSelected = treeComponent.hasProjectsSelected();
-            editFileMenuItem.setEnabled(hasProjectsSelected && canDoThings);
-        } else {
-           editFileMenuItem.setVisible(false);  //just hide it if we don't support this
-        }
-
-        copyTaskNameMenuItem.setVisible( !isRefreshing && hasTaskSelection );
-    }
-
-    /**
-     * Adds whatever is selected to the favorites.
-    */
-    private void addSelectedToFavorites() {
-       List<TaskView> tasks = treeComponent.getSelectedTasks();
-
-       gradlePluginLord.getFavoritesEditor().addMutlipleFavorites( tasks, false, new SwingAddMultipleFavoritesInteraction( SwingUtilities.getWindowAncestor(mainPanel) ) );
-    }
-
-    /**
-     * This displays a dialog that allows the user to determine what shows up in the tree. We give the filter dialog a
-     * filter rather than handing it out editor so teh user can cancel. That is, the dialog uses its own editor which it
-     * modifies freely and throws away. This way, if the user cancels, we dodon't have to deal with restoring the
-     * previous values in our local editor.
-    */
-    private void configureFilter() {
-        ProjectAndTaskFilterDialog dialog = new ProjectAndTaskFilterDialog(SwingUtilities.getWindowAncestor(mainPanel), gradlePluginLord);
-
-        BasicProjectAndTaskFilter newFilter = dialog.show(editor.createFilter());
-        if (newFilter != null) //if the user didn't cancel...
-        {
-            editor.initializeFromFilter(newFilter);
-            populate();
-        }
-    }
-
-    /**
-     * Call this to filter out the currently selected items.
-    */
-    private void hideSelection() {
-        TaskTreeComponent.MultipleSelection multipleSelection = treeComponent.getSelectedProjectsAndTasks();
-        if (!multipleSelection.projects.isEmpty() || !multipleSelection.tasks.isEmpty()) {
-            editor.hideProjects(multipleSelection.projects);
-            editor.hideTasks(multipleSelection.tasks);
-
-            populate(); //unfortunately, we have to repopulate now.
-        }
-    }
-
-    /**
-     * This resets whether the description is shown or not based on the check box. The tree component does the real
-     * work.
-    */
-    private void resetShowDescription() {
-        settingsNode.setValueOfChildAsBoolean(SHOW_DESCRIPTION, showDescriptionCheckBox.isSelected());   //save it immediately
-        treeComponent.setShowDescription(showDescriptionCheckBox.isSelected());
-    }
-
-    /**
-     * This opens the selected files. This gets the 'parent' of this to do it for us. This facilitates using this inside
-     * an IDE (you get the IDE to open it).
-    */
-    private void editSelectedFiles() {
-        TaskTreeComponent.MultipleSelection tasks = treeComponent.getSelectedProjectsAndTasks();
-
-        Iterator<ProjectView> iterator = tasks.projects.iterator();
-        while (iterator.hasNext()) {
-            ProjectView projectView = iterator.next();
-            File file = projectView.getBuildFile();
-            if( file != null ) {
-               alternateUIInteraction.editFile(file, -1 );
-            }
-        }
-    }
-
-
-    /**
-     * This executes all default tasks in the specified project.
-     *
-     * @param  project    the project to execute.
-    */
-    private void executeDefaultTasksInProject(ProjectView project) {
-        Iterator<TaskView> iterator = project.getDefaultTasks().iterator();
-        while (iterator.hasNext()) {
-            TaskView task = iterator.next();
-            gradlePluginLord.addExecutionRequestToQueue(task, false);
-        }
-    }
-
-
-    /**
-     * Copies the selected tasks names to the clipboard
-     */
-    private void copySelectedTaskNames() {
-
-        String names = getSelectedTaskNames();
-        if (names.length() == 0) {
-            return;
-        }
-
-        Toolkit.getDefaultToolkit().getSystemClipboard().setContents( new StringSelection( names ), null );
-    }
-
-    /**
-     * This puts all the selected task names in a space-delimited String
-     * @return a string of all the tasks
-     */
-    private String getSelectedTaskNames() {
-        List<TaskView> tasks = treeComponent.getSelectedTasks();
-        if( tasks.isEmpty() ) {
-            return null;
-        }
-
-        StringBuilder taskString = new StringBuilder();
-        Iterator<TaskView> iterator = tasks.iterator();
-        while( iterator.hasNext() )
-        {
-           TaskView taskView = iterator.next();
-
-            taskString.append( taskView.getFullTaskName() );
-            if( iterator.hasNext() ) {
-                taskString.append( ' ' );
-            }
-        }
-
-        return taskString.toString();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/Application.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/Application.java
deleted file mode 100644
index 1255e43..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/Application.java
+++ /dev/null
@@ -1,396 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.standalone;
-
-import org.gradle.gradleplugin.foundation.DOM4JSerializer;
-import org.gradle.gradleplugin.foundation.ExtensionFileFilter;
-import org.gradle.gradleplugin.foundation.settings.DOM4JSettingsNode;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-import org.gradle.gradleplugin.userinterface.swing.common.PreferencesAssistant;
-import org.gradle.gradleplugin.userinterface.swing.generic.SinglePaneUIInstance;
-import org.gradle.util.UncheckedException;
-
-import javax.swing.*;
-import javax.swing.filechooser.FileFilter;
-import java.awt.*;
-import java.awt.event.WindowAdapter;
-import java.awt.event.WindowEvent;
-import java.io.File;
-import java.lang.reflect.Method;
-import java.net.URI;
-
-/**
- * The main entry point for a stand-alone application for Gradle. The real work is not done here. This is just a UI
- * containing components that are meant to be reuseable in other UIs (say an IDE plugin). Those other components do the
- * real work. Most of the work is wrapped inside SinglePaneUIInstance.
- *
- * @author mhunsicker
- */
-public class Application implements AlternateUIInteraction {
-    private static final int DEFAULT_WIDTH = 800;
-    private static final int DEFAULT_HEIGHT = 800;
-
-    private static final String WINDOW_PREFERENCES_ID = "window-id";
-    private static final String SETTINGS_EXTENSION = ".setting";
-
-    private JFrame frame;
-    private SinglePaneUIInstance singlePaneUIInstance;
-
-    private boolean doesSupportEditingFiles;
-
-    private LifecycleListener lifecycleListener;
-    private DOM4JSettingsNode rootSettingsNode;
-
-   /**
-     * Interface that allows the caller to do post shutdown processing. For example, you may want to exit the VM. You
-     * may not.
-     */
-    public interface LifecycleListener {
-        /**
-         * Notification that the application has started successfully. This is fired within the same thread that
-         * instantiates us.
-         */
-        public void hasStarted();
-
-        /**
-         * Notification that the application has shut down. This is fired from the Event Dispatch Thread.
-         */
-        public void hasShutDown();
-    }
-
-    public static void main(String[] args) {
-        new Application(new LifecycleListener() {
-            public void hasStarted() {
-                //we don't care
-            }
-
-            public void hasShutDown() {
-                System.exit(0);
-            }
-        });
-    }
-
-    public Application(LifecycleListener lifecycleListener) {
-        this.lifecycleListener = lifecycleListener;
-
-        try {   //try and make it look like a native app
-            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-        } catch (Exception e) {
-            throw UncheckedException.asUncheckedException(e);
-        }
-
-        this.doesSupportEditingFiles = determineIfSupportsEditingFiles();
-
-        //read in the settings
-        rootSettingsNode = DOM4JSerializer.readSettingsFile(new SettingsImportInteraction(), createFileFilter());
-        if (rootSettingsNode == null) {
-            rootSettingsNode = DOM4JSerializer.createBlankSettings();
-        }
-
-        singlePaneUIInstance = new SinglePaneUIInstance();
-        singlePaneUIInstance.initialize( rootSettingsNode, this);
-
-        setupUI();
-
-        restoreSettings();
-
-        frame.setVisible(true);
-
-        lifecycleListener.hasStarted();  //notify listeners that we have successfully started
-    }
-
-    private void setupUI() {
-        frame = new JFrame("Gradle");
-
-        JPanel mainPanel = new JPanel(new BorderLayout());
-        frame.getContentPane().add(mainPanel);
-
-        mainPanel.add(singlePaneUIInstance.getComponent());
-        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-
-        singlePaneUIInstance.aboutToShow();
-
-        frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
-        frame.addWindowListener(new WindowAdapter() {
-            public void windowClosing(WindowEvent e) {
-                close();
-            }
-        });
-
-        frame.setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
-        frame.setLocationByPlatform(true);
-    }
-
-    private void close() {
-        boolean canClose = singlePaneUIInstance.canClose(new SinglePaneUIInstance.CloseInteraction() {
-            public boolean promptUserToConfirmClosingWhileBusy() {
-                int result = JOptionPane.showConfirmDialog(frame,
-                        "Gradle tasks are being currently being executed. Exit anyway?", "Exit While Busy?",
-                        JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
-                return result == JOptionPane.YES_OPTION;
-            }
-        });
-
-        if (!canClose) {
-            return;
-        }
-
-        singlePaneUIInstance.close();
-
-        saveSettings();
-        frame.setVisible(false);
-
-        if (lifecycleListener != null) {
-            lifecycleListener.hasShutDown();
-        } else {
-            System.exit(0);
-        }
-    }
-
-    private void saveSettings() {
-        PreferencesAssistant.saveSettings(rootSettingsNode, frame, WINDOW_PREFERENCES_ID, Application.class);
-
-        DOM4JSerializer.exportToFile(new SettingsExportInteraction(), createFileFilter(), rootSettingsNode);
-    }
-
-    private void restoreSettings() {
-        PreferencesAssistant.restoreSettings(rootSettingsNode, frame, WINDOW_PREFERENCES_ID, Application.class);
-    }
-
-   /**
-    Notification that you should open the specified file and go to the specified line. Its up to the
-    application to determine if this file should be opened for editing or simply displayed. The difference
-    comes into play for things like xml or html files where a user may want to open them in a browser vs
-    a source code file where they may want to open it directly in an IDE.
-
-    @param file the file to edit
-    @param line the line to go to. -1 if no line is specified.
-    */
-   public void openFile( File file, int line ) {
-      String name = file.getName().toLowerCase();
-      if( name.endsWith( ".html" ) || name.endsWith( ".htm" ) )
-      {
-         browseFile( file );
-      }
-      else
-      {
-         editFile( file, line );
-      }
-   }
-
-   public void browseFile( File file ) {
-      if( !file.exists())  //the file might not exist. This happens if its just using the default settings (no file is required).
-         {
-            JOptionPane.showMessageDialog(frame, "File does not exist '" + file.getAbsolutePath() + "'");
-         } else {
-
-         if( !invokeDesktopFunction( "browse", URI.class, file.toURI() ) )
-         {
-            String extension = getFileNameExtension( file.getName() );
-            JOptionPane.showMessageDialog(frame, "Cannot browse file. Do you have an application assocated with '" + extension + "' files?");
-         }
-       }
-   }
-
-
-   /**
-     * This is called when we should edit the specified file. Open it in the current IDE or some external editor.
-     *
-     * @param file
-    @param line
-     */
-    public void editFile( File file, int line )  {
-      editFileInExternalApplication( file, true );
-    }
-
-   /**
-    This edits the application using java.awt.Desktop. Since we're compiling with 1.5 and this is a 1.6 feature,
-    this is done using reflection making this much uglier than it needs to be.
-    @param file the file to edit
-    @param attemptToOpen true if we should attempt to just open the file is editing it fails. Often, file associations
-    don't distinguish edit from open and open is the default.
-    */
-    public void editFileInExternalApplication( File file, boolean attemptToOpen )  {
-        if( !file.exists())  //the file might not exist. This happens if its just using the default settings (no file is required).
-         {
-            JOptionPane.showMessageDialog(frame, "File does not exist '" + file.getAbsolutePath() + "'");
-         } else {
-         if( !invokeDesktopFunction( "edit", File.class, file ) )
-         {
-            openFileInExternalApplication( file );
-         }
-       }
-   }
-
-   public void openFileInExternalApplication( File file )  {
-
-        if( !file.exists())  //the file might not exist. This happens if its just using the default settings (no file is required).
-         {
-            JOptionPane.showMessageDialog(frame, "File does not exist '" + file.getAbsolutePath() + "'");
-         } else {
-         if( !invokeDesktopFunction( "open", File.class, file ) )
-         {
-            String extension = getFileNameExtension( file.getName() );
-            JOptionPane.showMessageDialog(frame, "Cannot open file. Do you have an application assocated with '" + extension + "' files?");
-         }
-       }
-   }
-
-   /**
-    This invokes one of the java.awt.Desktop functions. Since we're compiling with 1.5 and this is a 1.6 feature,
-    this is done using reflection making this much uglier than it needs to be. This is for calling one of the
-    'edit', 'browse', 'open' or even 'mail' functions that always take a single argument.
-
-    @param name  the function to invoke
-    @param argumentClass  the class of the argument of the above function. 
-    @param argument the argument itself.
-    @return true if it worked, false if not. It might fail if the platform doesn't support editing/opening
-    the file passed in, for example.
-    */
-   public boolean invokeDesktopFunction( String name, Class argumentClass, Object argument )  {
-      try {
-            Class<?> desktopClass = Class.forName("java.awt.Desktop");
-            Method getDesktopMethod = desktopClass.getDeclaredMethod("getDesktop", (Class<?>[]) null);
-            Object desktopObject = getDesktopMethod.invoke(null, (Object[]) null);
-            if (desktopObject != null)   //may be null if this plaform doesn't support this.
-            {
-                Method method = desktopClass.getMethod( name, new Class[]{ argumentClass });
-                method.invoke(desktopObject, argument );
-               return true;
-            }
-       } catch (Exception e) {
-            //ignore this. Just return false. This is relatively normal to get these and if you look at where this is called with 'edit', if it fails, we'll try again with open.
-       }
-      return false;
-   }
-
-
-   /**<!===== getFileNameExtension ===========================================>
-      Returns the file extension preserving its case.
-
-      <!      Name       Description>
-      @param  fileName   the file name
-      @return its extension.
-      @author mhunsicker
-   <!=======================================================================>*/
-   public static String getFileNameExtension( String fileName )
-   {
-      String result = fileName;
-      int indexOfDot = fileName.lastIndexOf('.');
-      if ( indexOfDot > 0 ) {
-          result = fileName.substring( indexOfDot + 1, result.length() );
-      }
-
-       return result;
-   }
-
-    /**
-     * Determines if we can call editFiles. This is not a dynamic answer and should always return either true of false.
-     * If you want to change the answer, return true and then handle the files differently in editFiles.
-     *
-     * @return true if support editing files, false otherwise.
-     */
-    public boolean doesSupportEditingOpeningFiles() {
-        return doesSupportEditingFiles;
-    }
-
-    /**
-     * Determines if we support editing files. At the time of this writing, we were mooching off of java 1.6's ability
-     * to get the OS to do this. If we're running on 1.5, this will fail.
-     *
-     * @return true if we support it, false if not.
-     */
-    public boolean determineIfSupportsEditingFiles() {
-        try {
-            Class<?> desktopClass = Class.forName("java.awt.Desktop");
-            Method getDesktopMethod = desktopClass.getDeclaredMethod("isDesktopSupported", (Class<?>[]) null);
-            Object desktopObject = getDesktopMethod.invoke(null, (Object[]) null);
-            return (Boolean) desktopObject;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    private ExtensionFileFilter createFileFilter() {
-        return new ExtensionFileFilter(SETTINGS_EXTENSION, "Setting");
-    }
-
-    /**
-     * @return the file that we save our settings to.
-     */
-    private File getSettingsFile() {
-        return new File(System.getProperty("user.dir"), "gradle-app" + SETTINGS_EXTENSION);
-    }
-
-    private class SettingsImportInteraction implements DOM4JSerializer.ImportInteraction {
-        /**
-         * This is called when you should ask the user for a source file to read.
-         *
-         * @return a file to read or null to cancel.
-         */
-        public File promptForFile(FileFilter fileFilters) {
-            File settingsFile = getSettingsFile();
-            if (!settingsFile
-                    .exists())  //if its not present (first time we've run on this machine), just cancel the read.
-            {
-                return null;
-            }
-            return settingsFile;
-        }
-
-        /**
-         * Report an error that occurred. The read failed.
-         *
-         * @param error the error message.
-         */
-        public void reportError(String error) {
-            JOptionPane.showMessageDialog(frame, "Failed to read settings: " + error);
-        }
-    }
-
-    /**
-     * This interaction is for saving our settings. As such, its not all that interactive unless errors occur.
-     */
-    private class SettingsExportInteraction implements DOM4JSerializer.ExportInteraction {
-        /**
-         * This is called when you should ask the user for a destination file of a save.
-         *
-         * @return a file to save to or null to cancel.
-         */
-        public File promptForFile(FileFilter fileFilters) {
-            return getSettingsFile();
-        }
-
-        /**
-         * The file already exists. Confirm whether or not you want to overwrite it.
-         *
-         * @param file the file in question
-         * @return true to overwrite it, false not to.
-         */
-        public boolean confirmOverwritingExisingFile(File file) {
-            return true;   //It's most likely going to exist. Always overwrite it.
-        }
-
-        /**
-         * Report an error that occurred. The save failed.
-         *
-         * @param error the error message.
-         */
-        public void reportError(String error) {
-            JOptionPane.showMessageDialog(frame, "Failed to save settings: " + error);
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java b/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java
deleted file mode 100644
index 9b2ebff..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.gradleplugin.userinterface.swing.standalone;
-
-import org.gradle.util.UncheckedException;
-
-import javax.swing.*;
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * This is the same as Application, but this version blocks the calling thread until the Application shuts down.
- *
- * @author mhunsicker
- */
-public class BlockingApplication {
-
-    /**
-     * This launches this application and blocks until it closes. Useful for being called from the gradle command line.
-     * We launch this in the Event Dispatch Thread and block the calling thread.
-     */
-    public static void launchAndBlock() {
-        if (SwingUtilities.isEventDispatchThread()) {
-            throw new RuntimeException("Cannot launch and block from the Event Dispatch Thread!");
-        }
-
-        //create a lock to wait on
-        final WaitingLock waitingLock = new WaitingLock();
-
-        //instantiate the app in the Event Dispatch Thread
-        try {
-            SwingUtilities.invokeAndWait(new Runnable() {
-                public void run() {
-                    new Application(new Application.LifecycleListener() {
-                        /**
-                         Notification that the application has started successfully. This is
-                         fired within the same thread that instantiates us.
-                         */
-                        public void hasStarted() {  //only lock if we start
-                            waitingLock.lock();
-                        }
-
-                        /**
-                         Notification that the application has shut down. This is fired from the
-                         Event Dispatch Thread.
-                         */
-                        public void hasShutDown() {  //when we shutdown we'll unlock
-                            waitingLock.unlock();
-                        }
-                    });
-                }
-            });
-        } catch (InterruptedException e) {
-            throw UncheckedException.asUncheckedException(e);
-        } catch (InvocationTargetException e) {
-            throw UncheckedException.asUncheckedException(e.getCause());
-        }
-
-        //the calling thread will now block until the caller is complete.
-        waitingLock.waitOnLock();
-    }
-
-    /**
-     * Lock so the calling thread can wait on the Application to exit.
-     */
-    private static class WaitingLock {
-        private boolean isLocked;
-
-        public synchronized void lock() {
-            isLocked = true;
-
-            //Notify status has changed.
-            notifyAll();
-        }
-
-        public synchronized void unlock() {
-            isLocked = false;
-
-            //Notify status has changed.
-            notifyAll();
-        }
-
-        public synchronized void waitOnLock() {
-            //Wait only if we're locked
-            while (isLocked) {
-                try {
-                    wait();
-                } catch (InterruptedException e) {
-                    throw new UncheckedException(e);
-                }
-            }
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/RunnerWrapperFactory.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/RunnerWrapperFactory.java
deleted file mode 100644
index 32a4a66..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/RunnerWrapperFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers;
-
-import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1;
-import org.gradle.openapi.external.runner.GradleRunnerVersion1;
-import org.gradle.openapi.wrappers.runner.GradleRunnerWrapper;
-
-import java.io.File;
-
-/**
-* This factory instantiates GradleRunnerWrappers by an external process. It is meant to be
-* called via the Open API GradleRunnerFactory class using reflection. This is because it is
-* called dynamically. It is also meant to help shield a Gradle user from changes to different
-* versions of the GradleRunner. It does so by using wrappers that can dynamically choose
-* what/how to implement. The wrappers usually use the latest, however, some of the
-* functionality requires a matching Open API jar (which will be included with the external
-* process trying to use this). If the matching functionality is not found (a NoClassDefFoundError
-* is thrown), it will fall back to earlier versions.
-*
-* This class should not be moved or renamed, nor should its functions be renamed or have arguments
-* added to/removed from them. This is to ensure forward/backward compatibility with multiple
-* versions of IDE plugins. Instead, consider changing the interaction that is passed to the functions
-* as a means of having the caller provide different functionality.
-*
-* @author mhunsicker
-*/
-public class RunnerWrapperFactory {
-
-    /*
-      Call this to instantiate an object that you can use to execute gradle
-      commands directly.
-
-      Note: this function is meant to be backward and forward compatible. So
-      this signature should not change at all, however, it may take and return
-      objects that implement ADDITIONAL interfaces. That is, it will always
-      return a GradleRunnerVersion1, but it may also be an object that implements
-      GradleRunnerVersion2 (notice the 2). The caller will need to dynamically
-      determine that. The GradleRunnerInteractionVersion1 may take an object
-      that also implements GradleRunnerInteractionVersion2. If so, we'll
-      dynamically determine that and handle it. Of course, this all depends on
-      what happens in the future.
-
-      @param  gradleHomeDirectory  the root directory of a gradle installation
-      @param  interaction          this is how we interact with the caller.
-      @param  showDebugInfo        true to show some additional information that
-                                   may be helpful diagnosing problems is this
-                                   fails
-      @return a gradle runner
-      @author mhunsicker
-   */
-   public static GradleRunnerVersion1 createGradleRunner( File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception {
-       return new GradleRunnerWrapper( gradleHomeDirectory, interaction );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/UIWrapperFactory.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/UIWrapperFactory.java
deleted file mode 100644
index 5f53527..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/UIWrapperFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers;
-
-import org.gradle.openapi.external.ui.DualPaneUIInteractionVersion1;
-import org.gradle.openapi.external.ui.DualPaneUIVersion1;
-import org.gradle.openapi.external.ui.SinglePaneUIInteractionVersion1;
-import org.gradle.openapi.external.ui.SinglePaneUIVersion1;
-import org.gradle.openapi.wrappers.ui.DualPaneUIWrapper;
-import org.gradle.openapi.wrappers.ui.SinglePaneUIWrapper;
-
-
-/**
-* This factory instantiates Gradle UIs used in IDE plugins. It is meant to be called via the
-* Open API UIFactory class using reflection. This is because it is called dynamically. It is
-* also meant to help shield a Gradle user from changes to different versions of UI. It does
-* so by using wrappers that can dynamically choose what/how to implement. The wrappers usually
-* use the latest, however, some of the functionality requires a matching Open API jar (which
-* will be included with the plugin trying to use this). If the matching functionality is not
-* found (a NoClassDefFoundError is thrown), it will fall back to earlier versions.
-*
-* This class should not be moved or renamed, nor should its functions be renamed or have arguments
-* added to/removed from them. This is to ensure forward/backward compatibility with multiple
-* versions of IDE plugins. Instead, consider changing the interaction that is passed to the functions
-* as a means of having the caller provide different functionality.
-*
-* @author mhunsicker
-*/
-public class UIWrapperFactory {
-
-    /**
-     * Creates a single-pane Gradle UI. The main UI and output panes are self-contained.
-     * @param interaction    this is how we interact with the caller.
-       @param showDebugInfo  true to show some additional information that may be helpful
-                             diagnosing problems is this fails
-     * @return a single pane UI.
-     * @throws Exception
-     */
-    public static SinglePaneUIVersion1 createSinglePaneUI( final SinglePaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception {
-        return new SinglePaneUIWrapper(interaction);
-    }
-
-    /**
-     * Creates a dual-pane Gradle UI, consisting of a main panel (containing task tree,
-     * favorites, etc) and a separate panel containing the output.
-     * @param interaction    this is how we interact with the caller.
-       @param showDebugInfo  true to show some additional information that may be helpful
-                             diagnosing problems is this fails
-     * @return a dual pane UI.
-     * @throws Exception
-     */
-    public static DualPaneUIVersion1 createDualPaneUI( final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo ) throws Exception {
-        return new DualPaneUIWrapper( interaction );
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion1.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion1.java
deleted file mode 100644
index b203672..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion1.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.openapi.external.foundation.GradleInterfaceVersion1;
-import org.gradle.openapi.external.foundation.ProjectVersion1;
-import org.gradle.openapi.external.foundation.RequestObserverVersion1;
-import org.gradle.openapi.external.ui.CommandLineArgumentAlteringListenerVersion1;
-import org.gradle.openapi.wrappers.ui.CommandLineArgumentAlteringListenerWrapper;
-import org.gradle.util.GradleVersion;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Implementation of GradleInterfaceVersion1 meant to help shield external users from internal changes.
- * @author mhunsicker
- */
-public class GradleInterfaceWrapperVersion1 implements GradleInterfaceVersion1 {
-
-    protected GradlePluginLord gradlePluginLord;
-    private Map<CommandLineArgumentAlteringListenerVersion1, CommandLineArgumentAlteringListenerWrapper> commandLineListenerMap = new HashMap<CommandLineArgumentAlteringListenerVersion1, CommandLineArgumentAlteringListenerWrapper>();
-    private Map<RequestObserverVersion1, RequestObserverWrapper> requestObserverMap = new HashMap<RequestObserverVersion1, RequestObserverWrapper>();
-
-    public GradleInterfaceWrapperVersion1(GradlePluginLord gradlePluginLord) {
-        this.gradlePluginLord = gradlePluginLord;
-    }
-
-    /**
-     * @return the version of gradle being run. This is basically the version from the jar file.
-     */
-    public String getVersion() {
-        return new GradleVersion().getVersion();
-    }
-
-    /**
-     * @return the root projects wrapped in a ProjectWrapper
-     */
-    public List<ProjectVersion1> getRootProjects() {
-
-        return ProjectWrapper.convertProjects( gradlePluginLord.getProjects() );
-    }
-
-    /**
-      Determines if commands are currently being executed or not. Refreshing
-      tasks is not considered busy.
-      @return true if we're busy, false if not.
-   */
-    public boolean isBusy() {
-        return gradlePluginLord.isBusy();
-    }
-
-    public void refreshTaskTree() {
-        gradlePluginLord.addRefreshRequestToQueue();
-    }
-
-    public void executeCommand(String commandLineArguments, String displayName) {
-        gradlePluginLord.addExecutionRequestToQueue( commandLineArguments, displayName );
-    }
-
-    public File getCurrentDirectory() {
-        return gradlePluginLord.getCurrentDirectory();
-    }
-
-    public void setCurrentDirectory(File currentDirectory) {
-        gradlePluginLord.setCurrentDirectory( currentDirectory );
-    }
-
-    public File getGradleHomeDirectory() {
-        return gradlePluginLord.getGradleHomeDirectory();
-    }
-
-    public File getCustomGradleExecutable() {
-        return gradlePluginLord.getCustomGradleExecutor();
-    }
-
-    /**
-     * Sets a custom gradle executable. See getCustomGradleExecutable
-     *
-     * @param customGradleExecutor the path to an executable (or script/batch file)
-     */
-    public void setCustomGradleExecutable(File customGradleExecutor) {
-        gradlePluginLord.setCustomGradleExecutor(customGradleExecutor);
-    }
-
-    /**
-     * This allows you to add a listener that can add additional command line
-     * arguments whenever gradle is executed. This is useful if you've customized
-     * your gradle build and need to specify, for example, an init script.
-     *
-     * @param listener the listener that modifies the command line arguments.
-     */
-    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
-        CommandLineArgumentAlteringListenerWrapper wrapper = new CommandLineArgumentAlteringListenerWrapper(listener);
-
-        //we have to store our wrapper so you can call remove the listener using your passed-in object
-        commandLineListenerMap.put(listener, wrapper);
-
-        gradlePluginLord.addCommandLineArgumentAlteringListener(wrapper);
-    }
-
-    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
-        CommandLineArgumentAlteringListenerWrapper wrapper = commandLineListenerMap.remove(listener);
-        if (wrapper != null) {
-           gradlePluginLord.removeCommandLineArgumentAlteringListener(wrapper);
-        }
-    }
-
-    /**
-     * Adds an observer that is notified when Gradle commands are executed and
-     * completed.
-     *
-     * @param observer the observer that is notified
-     */
-    public void addRequestObserver(RequestObserverVersion1 observer) {
-        RequestObserverWrapper wrapper = new RequestObserverWrapper(observer);
-
-        //we have to store our wrapper so you can call remove the listener using your passed-in object
-        requestObserverMap.put(observer, wrapper);
-
-        gradlePluginLord.addRequestObserver(wrapper, false );
-    }
-
-    /**
-     * Removes a request observer when you no longer wish to receive notifications
-     * about Gradle command being executed.
-     *
-     * @param observer the observer to remove
-     */
-    public void removeRequestObserver(RequestObserverVersion1 observer) {
-        RequestObserverWrapper wrapper = requestObserverMap.remove(observer);
-        if (wrapper != null) {
-           gradlePluginLord.removeRequestObserver(wrapper);
-        }
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion2.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion2.java
deleted file mode 100644
index a2786cc..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion2.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.openapi.external.foundation.GradleInterfaceVersion2;
-import org.gradle.openapi.external.foundation.RequestVersion1;
-import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
-import org.gradle.openapi.wrappers.foundation.favorites.FavoriteTaskWrapper;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
-* Implementation of GradleInterfaceVersion2 meant to help shield external users from internal changes.
-* This adds new functionality to GradleInterfaceWrapperVersion1.
-*
-* @author mhunsicker
- */
-public class GradleInterfaceWrapperVersion2 extends GradleInterfaceWrapperVersion1 implements GradleInterfaceVersion2 {
-
-    public GradleInterfaceWrapperVersion2(GradlePluginLord gradlePluginLord) {
-        super(gradlePluginLord);
-    }
-
-    private RequestVersion1 wrapRequest( Request request ) {
-        if( request == null ) {
-            return null;
-        }
-
-        return new RequestWrapper(request );
-    }
-
-
-    public RequestVersion1 refreshTaskTree2() {
-        return wrapRequest( gradlePluginLord.addRefreshRequestToQueue() );
-    }
-
-    /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    @param additionalCommandLineArguments additional command line arguments to be passed to gradle when
-                                          refreshing the task tree.
-    */
-   public RequestVersion1 refreshTaskTree2( String additionalCommandLineArguments ) {
-        return wrapRequest( gradlePluginLord.addRefreshRequestToQueue(additionalCommandLineArguments) );
-    }
-
-    public RequestVersion1 executeCommand2(String commandLineArguments, String displayName) {
-        return wrapRequest( gradlePluginLord.addExecutionRequestToQueue( commandLineArguments, displayName ) );
-    }
-
-    /**
-     * Executes several favorites commands at once as a single command. This has the affect
-     * of simply concatenating all the favorite command lines into a single line.
-     *
-     * @param favorites a list of favorites. If just one favorite, it executes it normally.
-     *                  If multiple favorites, it executes them all at once as a single command.
-     */
-    public RequestVersion1 executeFavorites(List<FavoriteTaskVersion1> favorites) {
-        List<FavoriteTask> tasks = new ArrayList<FavoriteTask>();
-
-        Iterator<FavoriteTaskVersion1> iterator = favorites.iterator();
-        while( iterator.hasNext() )
-        {
-           FavoriteTaskVersion1 favoriteTaskVersion1 = iterator.next();
-           FavoriteTaskWrapper wrapper = (FavoriteTaskWrapper) favoriteTaskVersion1;
-           tasks.add( wrapper.getFavoriteTask() );
-        }
-
-        return wrapRequest( gradlePluginLord.addExecutionRequestToQueue( tasks ) );
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/ProjectWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/ProjectWrapper.java
deleted file mode 100644
index f9c7c27..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/ProjectWrapper.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation;
-
-import org.gradle.foundation.ProjectView;
-import org.gradle.foundation.TaskView;
-import org.gradle.openapi.external.foundation.ProjectVersion1;
-import org.gradle.openapi.external.foundation.TaskVersion1;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Implementation of ProjectVersion1 meant to help shield external users from internal changes.
- * @author mhunsicker
- */
-public class ProjectWrapper implements ProjectVersion1 {
-
-    private ProjectView projectView;
-
-    public ProjectWrapper(ProjectView projectView) {
-        this.projectView = projectView;
-    }
-
-    public String getName() {
-        return projectView.getName();
-    }
-
-    public File getFile() {
-        return projectView.getBuildFile();
-    }
-
-    public List<TaskVersion1> getTasks() {
-        return TaskWrapper.convertTasks( projectView.getTasks() );
-    }
-
-    public List<ProjectVersion1> getSubProjects() {
-        return convertProjects( projectView.getSubProjects() );
-    }
-
-    public ProjectVersion1 getParentProject() {
-        return new ProjectWrapper( projectView.getParentProject() );
-    }
-
-    public List<ProjectVersion1> getDependantProjects() {
-        return convertProjects( projectView.getDependsOnProjects() );
-    }
-
-    public ProjectVersion1 getSubProject( String name )
-    {
-        ProjectView subProject = projectView.getSubProject(name);
-        if( subProject == null ) {
-            return null;
-        }
-
-        return new ProjectWrapper(subProject);
-    }
-
-    public String getFullProjectName() {
-        return projectView.getFullProjectName();
-    }
-
-    public ProjectVersion1 getSubProjectFromFullPath(String fullProjectName) {
-        ProjectView projectFromFullPath = projectView.getSubProjectFromFullPath(fullProjectName);
-        if( projectFromFullPath == null ) {
-            return null;
-        }
-        return new ProjectWrapper( projectFromFullPath );
-    }
-
-    public TaskVersion1 getTask(String name) {
-        TaskView taskView = projectView.getTask(name);
-        if( taskView == null ) {
-            return null;
-        }
-        return new TaskWrapper( taskView );
-    }
-
-    /**
-     * Builds a list of default tasks. These are defined by specifying
-     *
-     * defaultTasks 'task name'
-     *
-     * in the gradle file. There can be multiple default tasks. This only returns default tasks directly for this
-     * project and does not return them for subprojects.
-     *
-     * @return a list of default tasks or an empty list if none exist
-     */
-    public List<TaskVersion1> getDefaultTasks() {
-            return TaskWrapper.convertTasks( projectView.getDefaultTasks() );
-        }
-
-    public TaskVersion1 getTaskFromFullPath(String fullTaskName) {
-        TaskView taskView = projectView.getTaskFromFullPath(fullTaskName );
-        if( taskView == null ) {
-            return null;
-        }
-
-        return new TaskWrapper( taskView );
-    }
-
-    /**
-     * Converts the list of ProjectView objects to ProjectVersion1 objects. It just wraps them.
-     * @param projectViewList the source projects
-     * @return the projects wrapped in ProjectWrappers.
-     */
-    public static List<ProjectVersion1> convertProjects( List<ProjectView> projectViewList )
-    {
-        List<ProjectVersion1> returnProjects = new ArrayList<ProjectVersion1>();
-        if( projectViewList != null )
-        {
-            Iterator<ProjectView> projectViewIterator = projectViewList.iterator();
-            while (projectViewIterator.hasNext()) {
-                ProjectView projectView = projectViewIterator.next();
-                returnProjects.add( new ProjectWrapper( projectView ) );
-            }
-        }
-
-        return returnProjects;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if( !( obj instanceof ProjectWrapper ) ) {
-            return false;
-        }
-
-        ProjectWrapper otherProjectWrapper = (ProjectWrapper) obj;
-        return otherProjectWrapper.projectView.equals( projectView );
-    }
-
-    @Override
-    public int hashCode() {
-        return projectView.hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return projectView.toString();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestObserverWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestObserverWrapper.java
deleted file mode 100644
index 10df9a5..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestObserverWrapper.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.openapi.external.foundation.RequestObserverVersion1;
-
-/**
- * * Implementation of RequestObserverVersion1 meant to help shield external users from internal changes.
- *
- * @author mhunsicker
- */
-public class RequestObserverWrapper implements GradlePluginLord.RequestObserver {
-
-    private RequestObserverVersion1 requestObserver;
-
-    public RequestObserverWrapper(RequestObserverVersion1 requestObserver) {
-        this.requestObserver = requestObserver;
-    }
-
-    public void executionRequestAdded(ExecutionRequest request) {
-        requestObserver.executionRequestAdded( new RequestWrapper( request ) );
-    }
-
-    public void refreshRequestAdded(RefreshTaskListRequest request) {
-        requestObserver.refreshRequestAdded( new RequestWrapper( request ) );
-    }
-
-    /**
-     * Notification that a command is about to be executed. This is mostly useful
-     * for IDE's that may need to save their files.
-     */
-    public void aboutToExecuteRequest(Request request) {
-        requestObserver.aboutToExecuteRequest( new RequestWrapper( request ) );
-    }
-
-    /**
-     * Notification that the command has completed execution.
-     *
-     * @param request the original request containing the command that was executed
-     * @param result  the result of the command
-     * @param output  the output from gradle executing the command
-     */
-    public void requestExecutionComplete(Request request, int result, String output) {
-        requestObserver.requestExecutionComplete( new RequestWrapper( request ), result, output );
-    }
-
-    @Override
-    public int hashCode() {
-        return requestObserver.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object otherObject ) {
-        if( !(otherObject instanceof RequestObserverWrapper ) ) {
-            return false;
-        }
-
-        return ( (RequestObserverWrapper) otherObject ).requestObserver.equals( requestObserver );
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestWrapper.java
deleted file mode 100644
index 593fb11..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestWrapper.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation;
-
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.openapi.external.foundation.RequestVersion1;
-
-/**
- * Implementation of RequestVersion1 meant to help shield external users from internal changes.
- *
- * @author mhunsicker
- */
-public class RequestWrapper implements RequestVersion1 {
-    private Request request;
-
-    public RequestWrapper(Request request) {
-        this.request = request;
-    }
-
-    /**
-     * @return the full gradle command line of this request
-     */
-    public String getFullCommandLine() {
-        return request.getFullCommandLine();
-    }
-
-    /**
-     * @return the display name of this request. Often this is the same as the full
-     *         command line, but favorites may specify something more user-friendly.
-     */
-    public String getDisplayName() {
-        return request.getDisplayName();
-    }
-
-    /**
-     * @return whether or not output should always be shown. If false, only show it when
-     *         errors occur.
-     */
-    public boolean forceOutputToBeShown() {
-        return request.forceOutputToBeShown();
-    }
-
-    /**
-     * Cancels this request.
-     */
-    public boolean cancel() {
-        return request.cancel();
-    }
-
-    @Override
-    public int hashCode() {
-        return request.hashCode();
-    }
-
-    @Override
-    public boolean equals(Object otherObject ) {
-        if( !( otherObject instanceof RequestWrapper ) ) {
-            return false;
-        }
-
-        return ((RequestWrapper) otherObject).request.equals( request );
-    }
-
-    /**
-     * @return the type of the request. Either EXECUTION or REFRESH
-     */
-    public String getType() {
-        if( request.getType() == ExecutionRequest.TYPE ) {
-            return EXECUTION_TYPE;
-        }
-
-        if( request.getType() == RefreshTaskListRequest.TYPE ) {
-            return REFRESH_TYPE;
-        }
-
-        return UNKNOWN_TYPE_PREFIX + request.getType();
-    }
-
-    @Override
-    public String toString() {
-        return request.toString();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/TaskWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/TaskWrapper.java
deleted file mode 100644
index d7ceb3c..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/TaskWrapper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation;
-
-import org.gradle.foundation.TaskView;
-import org.gradle.openapi.external.foundation.ProjectVersion1;
-import org.gradle.openapi.external.foundation.TaskVersion1;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Implementation of TaskVersion1 meant to help shield external users from internal changes.
- * @author mhunsicker
- */
-public class TaskWrapper implements TaskVersion1 {
-
-    private TaskView taskView;
-
-    public TaskWrapper(TaskView taskView) {
-        this.taskView = taskView;
-    }
-
-    public String getName() {
-        return taskView.getName();
-    }
-
-    public String getDescription() {
-        return taskView.getDescription();
-    }
-
-    public boolean isDefault() {
-        return taskView.isDefault();
-    }
-
-    public String getFullTaskName() {
-        return taskView.getFullTaskName();
-    }
-
-    public ProjectVersion1 getProject() {
-        return new ProjectWrapper( taskView.getProject() );
-    }
-
-    /**
-     * Converts the list of TaskView objects to TaskVersion1 objects. It just wraps them.
-     * @param taskViewList the source tasks
-     * @return the tasks wrapped in TaskWrappers.
-     */
-    public static List<TaskVersion1> convertTasks( List<TaskView> taskViewList)
-    {
-        List<TaskVersion1> returnTasks = new ArrayList<TaskVersion1>();
-        Iterator<TaskView> taskViewIterator = taskViewList.iterator();
-        while (taskViewIterator.hasNext()) {
-            TaskView taskView = taskViewIterator.next();
-            returnTasks.add( new TaskWrapper( taskView ) );
-        }
-
-        return returnTasks;
-    }
-
-    @Override
-    public boolean equals(Object obj) {
-        if( !(obj instanceof TaskWrapper ) ) {
-            return false;
-        }
-
-        TaskWrapper otherTaskWrapper = (TaskWrapper) obj;
-        return otherTaskWrapper.taskView.equals( taskView );
-    }
-
-    @Override
-    public int hashCode() {
-        return taskView.hashCode();
-    }
-
-    @Override
-    public String toString() {
-        return taskView.toString();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoriteTaskWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoriteTaskWrapper.java
deleted file mode 100644
index 75a08ff..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoriteTaskWrapper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation.favorites;
-
-import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
-import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
-
-/**
- * Implementation of FavoriteTaskVersion1 meant to help shield external users from internal changes.
- *
- * @author mhunsicker
-
- */
-public class FavoriteTaskWrapper implements FavoriteTaskVersion1 {
-
-    private FavoriteTask favoriteTask;
-
-    public FavoriteTaskWrapper(FavoriteTask favoriteTask) {
-        this.favoriteTask = favoriteTask;
-    }
-
-    @Override
-    public boolean equals(Object otherObject ) {
-        if( !( otherObject instanceof FavoriteTaskWrapper ) ) {
-            return false;
-        }
-
-        FavoriteTaskWrapper otherFavoritesTask = (FavoriteTaskWrapper) otherObject;
-        return otherFavoritesTask.favoriteTask.equals( favoriteTask );
-    }
-
-    public String getFullCommandLine() {
-        return favoriteTask.getFullCommandLine();
-    }
-
-    public String getDisplayName() {
-        return favoriteTask.getDisplayName();
-    }
-
-    public boolean alwaysShowOutput() {
-        return favoriteTask.alwaysShowOutput();
-    }
-
-    //Only to be used internally to get the favorite task this represents
-    public FavoriteTask getFavoriteTask() {
-        return favoriteTask;
-    }
-
-    @Override
-    public int hashCode() {
-        return favoriteTask.hashCode();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoritesEditorWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoritesEditorWrapper.java
deleted file mode 100644
index eb0e686..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoritesEditorWrapper.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.foundation.favorites;
-
-import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
-import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
-import org.gradle.gradleplugin.userinterface.swing.generic.SwingEditFavoriteInteraction;
-import org.gradle.openapi.external.foundation.TaskVersion1;
-import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
-import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1;
-
-import java.awt.*;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Implementation of FavoritesEditorVersion1 meant to help shield external users from internal changes.
- * @author mhunsicker
- */
-public class FavoritesEditorWrapper implements FavoritesEditorVersion1 {
-    private FavoritesEditor favoritesEditor;
-
-    public FavoritesEditorWrapper(FavoritesEditor favoritesEditor) {
-        this.favoritesEditor = favoritesEditor;
-    }
-
-    public FavoriteTaskVersion1 addFavorite(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
-        return convertFavoriteTask( favoritesEditor.addFavorite(fullCommandLine, displayName, alwaysShowOutput ) );
-    }
-
-    public String editFavorite(FavoriteTaskVersion1 favoriteTaskVersion1, final String newFullCommandLine, final String newDisplayName, final boolean newAlwaysShowOutput) {
-        final StringHolder stringHolder = new StringHolder();
-        FavoriteTask favoriteTask = getFavoriteTask( favoriteTaskVersion1 );
-        favoritesEditor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
-            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
-                favoriteTask.fullCommandLine = newFullCommandLine;
-                favoriteTask.displayName = newDisplayName;
-                favoriteTask.alwaysShowOutput = newAlwaysShowOutput;
-                return true;
-            }
-
-            public void reportError(String error) {
-                stringHolder.string = error;
-            }
-        } );
-
-        return stringHolder.string;
-    }
-
-    //
-            private class StringHolder {
-                private String string;
-            }
-
-    private FavoriteTaskVersion1 convertFavoriteTask( FavoriteTask favoriteTask ) {
-        if( favoriteTask == null )
-        {
-            return null;
-        }
-
-        return new FavoriteTaskWrapper( favoriteTask );
-    }
-
-
-    public List<FavoriteTaskVersion1> getFavoriteTasks() {
-        List<FavoriteTaskVersion1> returnedTasks = new ArrayList<FavoriteTaskVersion1>();
-        Iterator<FavoriteTask> taskIterator = favoritesEditor.getFavoriteTasks().iterator();
-        while (taskIterator.hasNext()) {
-            FavoriteTask favoriteTask = taskIterator.next();
-            returnedTasks.add( new FavoriteTaskWrapper( favoriteTask ) );
-        }
-        return returnedTasks;
-    }
-
-    public FavoriteTaskVersion1 getFavorite(String fullCommandLine) {
-        return convertFavoriteTask( favoritesEditor.getFavorite( fullCommandLine ) );
-    }
-
-    public FavoriteTaskVersion1 getFavoriteByDisplayName(String displayName) {
-        return convertFavoriteTask( favoritesEditor.getFavoriteByDisplayName( displayName ) );
-    }
-
-    public FavoriteTaskVersion1 getFavorite(TaskVersion1 task) {
-        return convertFavoriteTask( favoritesEditor.getFavorite( task.getFullTaskName() ) );
-    }
-
-    public FavoriteTaskVersion1 promptUserToAddFavorite(Window parent) {
-        FavoriteTask favoriteTask = favoritesEditor.addFavorite( new SwingEditFavoriteInteraction( parent, "Add Favorite", true ) );
-        return convertFavoriteTask( favoriteTask );
-    }
-
-    public boolean promptUserToEditFavorite(Window parent, FavoriteTaskVersion1 favorite) {
-        FavoriteTask favoriteTask = getFavoriteTask(favorite);
-        return favoritesEditor.editFavorite( favoriteTask, new SwingEditFavoriteInteraction( parent, "Edit Favorite", true ) );
-    }
-
-    public void removeFavorites( List<FavoriteTaskVersion1> favoritesToRemove) {
-        List<FavoriteTask> favoriteTasksToRemove = new ArrayList<FavoriteTask>();
-
-        Iterator<FavoriteTaskVersion1> iterator = favoritesToRemove.iterator();
-        while( iterator.hasNext() )
-        {
-           FavoriteTaskVersion1 favoriteTaskVersion1 = iterator.next();
-           favoriteTasksToRemove.add( getFavoriteTask( favoriteTaskVersion1 ) );
-        }
-
-        favoritesEditor.removeFavorites(favoriteTasksToRemove);
-    }
-
-    //gets the favorite task out of a FavoriteTaskVersion1.
-    private FavoriteTask getFavoriteTask( FavoriteTaskVersion1 favoriteTaskVersion1 ) {
-        return ((FavoriteTaskWrapper) favoriteTaskVersion1 ).getFavoriteTask();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerInteractionWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerInteractionWrapper.java
deleted file mode 100644
index a5052bb..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerInteractionWrapper.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.runner;
-
-import org.gradle.StartParameter;
-import org.gradle.api.logging.LogLevel;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1;
-
-import java.io.File;
-
-/**
- * Wrapper to shield version changes in GradleRunnerInteractionVersion1
- * from an external user of gradle open API.
- *
- * @author mhunsicker
- */
-public class GradleRunnerInteractionWrapper implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
-    private GradleRunnerInteractionVersion1 interactionVersion1;
-
-    public GradleRunnerInteractionWrapper(GradleRunnerInteractionVersion1 interactionVersion1) {
-        this.interactionVersion1 = interactionVersion1;
-    }
-
-    /**
-    * @return the log level. This determines the detail level of information reported via reportLiveOutput and reportExecutionFinished.
-    */
-    public LogLevel getLogLevel() {
-        GradleRunnerInteractionVersion1.LogLevel logLevel = interactionVersion1.getLogLevel();
-        switch (logLevel) {
-            case Quiet:
-                return LogLevel.QUIET;
-            case Lifecycle:
-                return LogLevel.LIFECYCLE;
-            case Debug:
-                return LogLevel.DEBUG;
-        }
-
-        return LogLevel.LIFECYCLE;
-    }
-
-    /**
-    * @return the stack trace level. This determines the detail level of any stack traces should an exception occur.
-    */
-    public StartParameter.ShowStacktrace getStackTraceLevel() {
-        GradleRunnerInteractionVersion1.StackTraceLevel stackTraceLevel = interactionVersion1.getStackTraceLevel();
-        switch (stackTraceLevel) {
-            case InternalExceptions:
-                return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
-            case Always:
-                return StartParameter.ShowStacktrace.ALWAYS;
-            case AlwaysFull:
-                return StartParameter.ShowStacktrace.ALWAYS_FULL;
-        }
-
-        return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
-    }
-
-    /**
-     * Notification that overall execution has been started. This is only called once at the end.
-     */
-    public void reportExecutionStarted() {
-        this.interactionVersion1.reportExecutionStarted();
-    }
-
-   /**
-    * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
-    *
-    * @param size the total number of tasks.
-    */
-   public void reportNumberOfTasksToExecute( int size ) {
-      this.interactionVersion1.reportNumberOfTasksToExecute( size );
-   }
-
-   /**
-     * Notification that a single task has completed. Note: the task you kicked
-     * off probably executes other tasks and this notifies you of those tasks
-     * and provides completion progress.
-     *
-     * @param currentTaskName the task being executed
-     * @param percentComplete the percent complete of all the tasks that make
-     *                        up the task you requested.
-     */
-    public void reportTaskStarted(String currentTaskName, float percentComplete) {
-        this.interactionVersion1.reportTaskStarted(currentTaskName, percentComplete);
-    }
-
-    public void reportTaskComplete(String currentTaskName, float percentComplete) {
-        this.interactionVersion1.reportTaskComplete(currentTaskName, percentComplete);
-    }
-
-    /**
-     * Report real-time output from gradle and its subsystems (such as ant).
-     *
-     * @param output a single line of text to show.
-     */
-    public void reportLiveOutput(String output) {
-        this.interactionVersion1.reportLiveOutput(output);
-    }
-
-    public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
-        this.interactionVersion1.reportExecutionFinished(wasSuccessful, message, throwable);
-    }
-
-    /*
-    * This is called to get a custom gradle executable file. If you don't run
-    * gradle.bat or gradle shell script to run gradle, use this to specify
-    * what you do run. Note: we're going to pass it the arguments that we would
-    * pass to gradle so if you don't like that, see alterCommandLineArguments.
-    * Normaly, this should return null.
-    * @return the Executable to run gradle command or null to use the default
-    */
-    public File getCustomGradleExecutable() {
-        return interactionVersion1.getCustomGradleExecutable();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerWrapper.java
deleted file mode 100644
index fa9d93e..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerWrapper.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.runner;
-
-import org.gradle.gradleplugin.foundation.runner.GradleRunner;
-import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1;
-import org.gradle.openapi.external.runner.GradleRunnerVersion1;
-
-import java.io.File;
-
-/**
- * Wrapper to shield version changes in GradleRunner from an external user of gradle open API.
- *
- * @author mhunsicker
- */
-public class GradleRunnerWrapper implements GradleRunnerVersion1 {
-    private GradleRunner gradleRunner;
-    private File gradleHomeDirectory;
-    private File workingDirectory;
-    private GradleRunnerInteractionWrapper interactionWrapper;
-
-    public GradleRunnerWrapper(File gradleHomeDirectory, GradleRunnerInteractionVersion1 interactionVersion1) {
-        this.gradleHomeDirectory = gradleHomeDirectory;
-        this.workingDirectory = interactionVersion1.getWorkingDirectory();
-        interactionWrapper = new GradleRunnerInteractionWrapper(interactionVersion1);
-        File customGradleExecutable = interactionVersion1.getCustomGradleExecutable();
-
-        gradleRunner = new GradleRunner(workingDirectory, gradleHomeDirectory, customGradleExecutable);
-    }
-
-    public void executeCommand(String commandLine) {
-        gradleRunner.executeCommand(commandLine, interactionWrapper.getLogLevel(),
-                interactionWrapper.getStackTraceLevel(), interactionWrapper);
-    }
-
-    /*
-       Call this to stop the gradle command. This is killing the process, not
-       gracefully exiting.
-    */
-
-    public void killProcess() {
-        gradleRunner.killProcess();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/AbstractOpenAPIUIWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/AbstractOpenAPIUIWrapper.java
deleted file mode 100644
index a60d891..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/AbstractOpenAPIUIWrapper.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.gradleplugin.userinterface.swing.generic.BasicGradleUI;
-import org.gradle.openapi.external.foundation.GradleInterfaceVersion1;
-import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1;
-import org.gradle.openapi.external.ui.*;
-import org.gradle.openapi.wrappers.foundation.favorites.FavoritesEditorWrapper;
-
-import javax.swing.*;
-import java.awt.*;
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
-* Implementation of BasicGradleUI meant to help shield external users from internal changes.
-* This also provides the basics for the UI regardless of whether the output is in a separate
- * pane or not.
- @author mhunsicker
-*/
-public abstract class AbstractOpenAPIUIWrapper<U extends BasicGradleUI>
-{
-    private U basicGradleUI;
-    private Map<GradleTabVersion1, GradleTabVersionWrapper> tabMap = new HashMap<GradleTabVersion1, GradleTabVersionWrapper>();
-
-    protected SettingsNodeVersionWrapper settingsVersionWrapper;
-    protected AlternateUIInteractionVersionWrapper alternateUIInteractionVersionWrapper;
-    protected GradleInterfaceVersion1 gradleInterfaceWrapper;
-
-    private OutputUILordWrapper outputUILordWrapper;
-
-   public AbstractOpenAPIUIWrapper( SettingsNodeVersion1 settings, AlternateUIInteractionVersion1 alternateUIInteraction)
-   {
-      settingsVersionWrapper = new SettingsNodeVersionWrapper(settings);
-      alternateUIInteractionVersionWrapper = new AlternateUIInteractionVersionWrapper(alternateUIInteraction, settingsVersionWrapper );
-   }
-
-   public void initialize( U basicGradleUI ) {
-        this.basicGradleUI = basicGradleUI;
-        basicGradleUI.getGradlePluginLord().addRequestObserver( new GradlePluginLord.RequestObserver()
-        {
-           /**
-            Notification that a command is about to be executed. This is mostly useful
-            for IDE's that may need to save their files.
-
-            @param request the request that's about to be executed
-            @author mhunsicker
-            */
-           public void aboutToExecuteRequest( Request request )
-           {
-               alternateUIInteractionVersionWrapper.aboutToExecuteCommand( request.getFullCommandLine() );
-           }
-
-           public void executionRequestAdded( ExecutionRequest request ) { }
-           public void refreshRequestAdded( RefreshTaskListRequest request ) { }
-           public void requestExecutionComplete( Request request, int result, String output ) { }
-        }, false );
-
-       outputUILordWrapper = new OutputUILordWrapper( basicGradleUI.getOutputUILord() );
-       gradleInterfaceWrapper = instantiateGradleInterfaceWrapper();
-
-    }
-
-    /**
-     * This instantiates our GradleInterfaceVersion object. Additions have been made
-     * to it -- making new versions, so we have a choice of which one to load. We'll
-     * try to load the latest one first, if that fails, we'll fall back on older
-     * versions. The latest version would fail to load because it depends on classes
-     * that are part of the Open API project and it can't find those classes. It
-     * might not find them because this is loaded from the Open API and if its an
-     * older version, those classes won't exist.
-     * @return a version of GradleInterfaceVersionX
-     */
-    protected GradleInterfaceVersion1 instantiateGradleInterfaceWrapper()
-    {
-       try
-       {
-           //try to load the latest version. I'm explicitly using the full package name so any NoClassDefFoundErrors will only
-           //occur within this try/catch block.
-           return new org.gradle.openapi.wrappers.foundation.GradleInterfaceWrapperVersion2( basicGradleUI.getGradlePluginLord() );
-       }
-       catch( NoClassDefFoundError e )
-       {  //if that's not found, fall back to version 1
-          return new org.gradle.openapi.wrappers.foundation.GradleInterfaceWrapperVersion1( basicGradleUI.getGradlePluginLord() );
-       }
-    }
-
-    public U getGradleUI() {
-      return basicGradleUI;
-   }
-
-    /**
-       Call this whenever you're about to show this panel. We'll do whatever
-       initialization is necessary.
-    */
-    public void aboutToShow() {
-        basicGradleUI.aboutToShow();
-    }
-
-    /**
-     * Call this to deteremine if you can close this pane. if we're busy, we'll
-     * ask the user if they want to close.
-     *
-     * @param closeInteraction allows us to interact with the user
-     * @return true if we can close, false if not.
-     */
-    public boolean canClose(final BasicGradleUIVersion1.CloseInteraction closeInteraction) {
-        return basicGradleUI.canClose(new BasicGradleUI.CloseInteraction() {
-            public boolean promptUserToConfirmClosingWhileBusy() {
-                return closeInteraction.promptUserToConfirmClosingWhileBusy();
-            }
-        });
-    }
-
-    /**
-       Call this before you close the pane. This gives it an opportunity to do
-       cleanup. You probably should call canClose before this. It gives the
-       app a chance to cancel if its busy.
-    */
-    public void close() {
-        basicGradleUI.close();
-    }
-
-
-   /**
-      @return the root directory of your gradle project.
-   */
-   public File getCurrentDirectory() {
-       return gradleInterfaceWrapper.getCurrentDirectory();
-   }
-
-   /**
-      @param  currentDirectory the new root directory of your gradle project.
-   */
-   public void setCurrentDirectory(File currentDirectory) {
-       gradleInterfaceWrapper.setCurrentDirectory(currentDirectory);
-   }
-
-   /**
-    * @return the gradle home directory. Where gradle is installed.
-    */
-   public File getGradleHomeDirectory() {
-       return gradleInterfaceWrapper.getGradleHomeDirectory();
-   }
-
-   /**
-    * This is called to get a custom gradle executable file. If you don't run
-    * gradle.bat or gradle shell script to run gradle, use this to specify
-    * what you do run. Note: we're going to pass it the arguments that we would
-    * pass to gradle so if you don't like that, see alterCommandLineArguments.
-    * Normally, this should return null.
-    *
-    * @return the Executable to run gradle command or null to use the default
-    */
-   public File getCustomGradleExecutable() {
-       return gradleInterfaceWrapper.getCustomGradleExecutable();
-   }
-
-    /**
-       Call this to add an additional tab to the gradle UI. You can call this
-       at any time.
-       @param  index             the index of where to add the tab.
-       @param  gradleTabVersion1 the tab to add.
-    */
-    public void addTab(int index, GradleTabVersion1 gradleTabVersion1) {
-        GradleTabVersionWrapper gradleVersionWrapper = new GradleTabVersionWrapper(gradleTabVersion1);
-
-        //we have to store our wrapper so you can call remove tab using your passed-in object
-        tabMap.put(gradleTabVersion1, gradleVersionWrapper);
-
-        basicGradleUI.addGradleTab(index, gradleVersionWrapper);
-    }
-
-    /**
-       Call this to remove one of your own tabs from this.
-
-       @param  gradleTabVersion1 the tab to remove
-    */
-    public void removeTab(GradleTabVersion1 gradleTabVersion1) {
-        GradleTabVersionWrapper gradleTabVersionWrapper = tabMap.remove(gradleTabVersion1);
-        if (gradleTabVersionWrapper != null) {
-           basicGradleUI.removeGradleTab(gradleTabVersionWrapper);
-        }
-    }
-
-    public int getGradleTabCount() {
-       return basicGradleUI.getGradleTabCount();
-    }
-
-    /**
-       @param  index      the index of the tab
-       @return the name of the tab at the specified index.
-    */
-    public String getGradleTabName(int index) {
-        return basicGradleUI.getGradleTabName(index);
-    }
-
-     /**
-      * Returns the index of the gradle tab with the specified name.
-      * @param name the name of the tab
-      * @return the index of the tab or -1 if not found
-      */
-     public int getGradleTabIndex( String name ) {
-         return basicGradleUI.getGradleTabIndex( name );
-     }
-
-    /**
-     * @return the currently selected tab
-     */
-    public int getCurrentGradleTab() {
-        return basicGradleUI.getCurrentGradleTab();
-    }
-
-    /**
-     * Makes the specified tab the current tab.
-     * @param index the index of the tab.
-     */
-    public void setCurrentGradleTab( int index ) {
-        basicGradleUI.setCurrentGradleTab( index );
-    }
-
-    /**
-     * This allows you to add a listener that can add additional command line
-     * arguments whenever gradle is executed. This is useful if you've customized
-     * your gradle build and need to specify, for example, an init script.
-     *
-     * @param listener the listener that modifies the command line arguments.
-     */
-    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
-        gradleInterfaceWrapper.addCommandLineArgumentAlteringListener(listener);
-    }
-
-    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
-        gradleInterfaceWrapper.removeCommandLineArgumentAlteringListener(listener);
-    }
-
-    public OutputUILordVersion1 getOutputLord()
-    {
-        return new OutputUILordWrapper( basicGradleUI.getOutputUILord() );
-    }
-
-
-    public void addOutputObserver( OutputObserverVersion1 observer )
-    {
-        outputUILordWrapper.addOutputObserver( observer );
-    }
-
-    public void removeOutputObserver( OutputObserverVersion1 observer )
-    {
-       outputUILordWrapper.removeOutputObserver( observer );
-    }
-
-    /**
-    Call this to execute the given gradle command.
-
-    @param commandLineArguments  the command line arguments to pass to gradle.
-    @param displayName           the name displayed in the UI for this command
-    */
-    public void executeCommand(String commandLineArguments, String displayName) {
-        //we go through the Swing version because it allows you to specify a display name
-        //for the command.
-        basicGradleUI.executeCommand( commandLineArguments, displayName );
-    }
-
-
-   /**
-    This refreshes the task tree. Useful if you know you've changed something behind
-    gradle's back or when first displaying this UI.
-    */
-   public void refreshTaskTree()
-   {
-      basicGradleUI.refreshTaskTree();
-   }
-
-   /**
-    Determines if commands are currently being executed or not.
-
-    @return true if we're busy, false if not.
-    */
-   public boolean isBusy()
-   {
-      return getGradleUI().isBusy();
-   }
-
-   /**
-    Determines whether output is shown only when errors occur or always
-    @return true to only show output if errors occur, false to show it always.
-    */
-   public boolean getOnlyShowOutputOnErrors()
-   {
-      return getGradleUI().getOutputUILord().getOnlyShowOutputOnErrors();
-   }
-
-   /**
-    This adds the specified component to the setup panel. It is added below the last
-    'default' item. You can only add 1 component here, so if you need to add multiple
-    things, you'll have to handle adding that to yourself to the one component.
-    @param component the component to add.
-    */
-   public void setCustomPanelToSetupTab( JComponent component )
-   {
-      getGradleUI().setCustomPanelToSetupTab( component );
-   }
-
-   /**
-    Sets the font for the output text
-    @param font the new font
-    */
-   public void setOutputTextFont( Font font )
-   {
-      getGradleUI().setOutputTextFont( font );
-   }
-
-    /**
-     * @return an object that works with lower level gradle and contains the current projects and tasks.
-     */
-   public GradleInterfaceVersion1 getGradleInterfaceVersion1()
-   {
-      return gradleInterfaceWrapper;
-   }
-
-   /**
-     * Returns a FavoritesEditor. This is useful for getting a list of all favorites or
-     * modifying them.
-     * @return a FavoritesEditorVersion1. Use this to interact with the favorites.
-     */
-   public FavoritesEditorVersion1 getFavoritesEditor() {
-      return new FavoritesEditorWrapper( basicGradleUI.getGradlePluginLord().getFavoritesEditor() );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/AlternateUIInteractionVersionWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/AlternateUIInteractionVersionWrapper.java
deleted file mode 100644
index d7b6b2e..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/AlternateUIInteractionVersionWrapper.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.gradleplugin.foundation.settings.SettingsNode;
-import org.gradle.openapi.external.ui.AlternateUIInteractionVersion1;
-import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
-
-import java.io.File;
-
-/**
- * Wrapper to shield version changes in AlternateUIInteraction from an external user of gradle open API.
- *
- * @author mhunsicker
-*/
-public class AlternateUIInteractionVersionWrapper implements AlternateUIInteraction {
-    private AlternateUIInteractionVersion1 alternateUIInteractionVersion1;
-    private SettingsNode settings;
-
-    public AlternateUIInteractionVersionWrapper(AlternateUIInteractionVersion1 alternateUIInteractionVersion1, SettingsNode settings) {
-        this.alternateUIInteractionVersion1 = alternateUIInteractionVersion1;
-        this.settings = settings;
-
-      //when future versions are added, doing the following and then delegating
-      //the new functions to AlternateUIInteractionVersion2 keeps things compatible.
-      //try
-      //{
-      //   if( alternateUIInteractionVersion1 instanceof AlternateUIInteractionVersion2 )
-      //      alternateUIInteractionVersion2 = (AlternateUIInteractionVersion2) alternateUIInteractionVersion1;
-      //}
-      //catch( NoClassDefFoundError e )
-      //{
-      //   //this just means that we're being run with an old version of the open API. We have no alternateUIInteractionVersion2
-      //}
-    }
-
-   public void openFile( File file, int line ) {
-      alternateUIInteractionVersion1.openFile(file, line );
-   }
-
-   public void editFile( File file, int line ) {
-        alternateUIInteractionVersion1.editFile( file, line );
-    }
-
-    public boolean doesSupportEditingOpeningFiles() {
-        return alternateUIInteractionVersion1.doesSupportEditingOpeningFiles();
-    }
-
-    public void aboutToExecuteCommand( String fullCommandLine ) {
-       alternateUIInteractionVersion1.aboutToExecuteCommand( fullCommandLine );
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/CommandLineArgumentAlteringListenerWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/CommandLineArgumentAlteringListenerWrapper.java
deleted file mode 100644
index 36da1cd..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/CommandLineArgumentAlteringListenerWrapper.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.openapi.external.ui.CommandLineArgumentAlteringListenerVersion1;
-import org.gradle.gradleplugin.foundation.CommandLineArgumentAlteringListener;
-
-/**
- * Wrapper to shield version changes in GradleTab from an external user of the gradle open API.
- *
- * @author mhunsicker
- */
-public class CommandLineArgumentAlteringListenerWrapper implements CommandLineArgumentAlteringListener {
-    private CommandLineArgumentAlteringListenerVersion1 listenerVersion1;
-
-    public CommandLineArgumentAlteringListenerWrapper(CommandLineArgumentAlteringListenerVersion1 listenerVersion1) {
-        this.listenerVersion1 = listenerVersion1;
-    }
-
-    /**
-     * This is called when you can add additional command line arguments. Return any additional arguments to add. This
-     * doesn't modify the existing commands.
-     *
-     * @param commandLineArguments the command line to execute.
-     * @return any command lines to add or null to leave it alone
-     */
-    public String getAdditionalCommandLineArguments(String commandLineArguments) {
-        return listenerVersion1.getAdditionalCommandLineArguments(commandLineArguments);
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/DualPaneUIWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/DualPaneUIWrapper.java
deleted file mode 100644
index 8bd5e37..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/DualPaneUIWrapper.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.gradleplugin.userinterface.swing.generic.DualPaneUIInstance;
-import org.gradle.openapi.external.ui.DualPaneUIInteractionVersion1;
-import org.gradle.openapi.external.ui.DualPaneUIVersion1;
-
-import javax.swing.JComponent;
-import java.awt.Component;
-
-/**
-This wraps a DualPaneUIVersion1 for the purpose of being instantiated for
- an external tool such an IDE plugin. It wraps several interfaces and uses
- delegation in an effort to make this backward and forward compatible.
- Most of the work is done in AbstractOpenAPIUIWrapper
-
- @author mhunsicker
- */
-public class DualPaneUIWrapper extends AbstractOpenAPIUIWrapper<DualPaneUIInstance> implements DualPaneUIVersion1
-{
-   public DualPaneUIWrapper( DualPaneUIInteractionVersion1 dualPaneUIArguments ) {
-
-       super( dualPaneUIArguments.instantiateSettings(), dualPaneUIArguments.instantiateAlternateUIInteraction() );
-
-       //the main thing this does in instantiate the DualPaneUIInstance.
-       DualPaneUIInstance uiInstance = new DualPaneUIInstance();
-       uiInstance.initialize( settingsVersionWrapper, alternateUIInteractionVersionWrapper );
-       initialize( uiInstance );
-    }
-
-   /**
-    Returns a component that shows the task tree tab, favorites tab, etc.
-    suitable for inserting in your UI.
-
-    @return the main component
-    */
-   public JComponent getMainComponent()
-   {
-      return getGradleUI().getComponent();
-   }
-
-   /**
-    Returns a component that shows the output of the tasks being executed.
-
-    @return the output component
-    */
-   public Component getOutputPanel()
-   {
-      return getGradleUI().getOutputPanel();
-   }
-
-   public int getNumberOfOpenedOutputTabs()
-   {
-      return getGradleUI().getOutputUILord().getTabCount();
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/GradleTabVersionWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/GradleTabVersionWrapper.java
deleted file mode 100644
index 533e078..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/GradleTabVersionWrapper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.openapi.external.ui.GradleTabVersion1;
-import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
-
-import java.awt.Component;
-
-/**
- * Wrapper to shield version changes in GradleTab from an external user of the gradle open API.
- *
- * @author mhunsicker
- */
-public class GradleTabVersionWrapper implements GradleTab {
-    private GradleTabVersion1 gradleTabVersion1;
-
-    GradleTabVersionWrapper(GradleTabVersion1 gradleTabVersion1) {
-        this.gradleTabVersion1 = gradleTabVersion1;
-
-        //when future versions are added, doing the following and then delegating
-        //the new functions to GradleTabVersion2 keeps things compatible.
-        //if( gradleTabVersion1 instanceof GradleTabVersion2 )
-        //   gradleTabVersion2 = (GradleTabVersion2) gradleTabVersion1;
-    }
-
-    public String getName() {
-        return gradleTabVersion1.getName();
-    }
-
-    public Component createComponent() {
-        return gradleTabVersion1.createComponent();
-    }
-
-    public void aboutToShow() {
-        gradleTabVersion1.aboutToShow();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputObserverWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputObserverWrapper.java
deleted file mode 100644
index 05a9b23..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputObserverWrapper.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.gradleplugin.userinterface.swing.generic.OutputUILord;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.openapi.external.ui.OutputObserverVersion1;
-
-/**
-   Wrapper to shield version changes in OutputUILord.OutputObserver from an external user of the
-   gradle open API.
-
-   @author mhunsicker
- */
-public class OutputObserverWrapper implements OutputUILord.OutputObserver
-{
-   private OutputObserverVersion1 outputObserverVersion1;
-
-   public OutputObserverWrapper( OutputObserverVersion1 outputObserverVersion1 )
-   {
-      this.outputObserverVersion1 = outputObserverVersion1;
-
-     //when future versions are added, doing the following and then delegating
-     //the new functions to OutputObserverVersion2 keeps things compatible.
-     //if( outputObserverVersion1 instanceof OutputObserverVersion2 )
-     //   outputObserverVersion2 = (OutputObserverVersion2) outputObserverVersion1;
-   }
-
-   /**
-    Notification that a request was added to the output. This means we've got some output
-    that is useful to display.
-
-    Note: this is slightly different from the GradlePluginLord.RequestObserver. While
-    these are directly related, this one really means that it has been added to the UI.
-    <!      Name            Description>
-
-    @param request the request that was added.
-    */
-   public void executionRequestAdded( ExecutionRequest request )
-   {
-      //Note: I don't like passing the request itself here, but a user might need an ID and trying to
-      //map the requests to something else when they can live for an indeterminate amount of time was too complex.
-      //I considered using a straight unique ID
-      outputObserverVersion1.executionRequestAdded( request.getRequestID(), request.getFullCommandLine(), request.getDisplayName(), request.forceOutputToBeShown() );
-   }
-
-   /**
-    Notification that a refresh task list request was added to the output. This means
-    we've got some output that is useful to display.
-
-    Note: this is slightly different from the GradlePluginLord.RequestObserver. While
-    these are directly related, this one really means that it has been added to the UI.
-    <!      Name            Description>
-
-    @param request the request that was added.
-    */
-   public void refreshRequestAdded( RefreshTaskListRequest request )
-   {
-      outputObserverVersion1.refreshRequestAdded( request.getRequestID(), request.forceOutputToBeShown() );
-   }
-
-
-   /**
-    Notification that an output tab was closed. You might want to know this if you want to close your
-    IDE output window when all tabs are closed
-
-    @param remainingTabCount the number of open tabs
-    */
-   public void outputTabClosed( Request request )
-   {
-      outputObserverVersion1.outputTabClosed( request.getRequestID() );
-   }
-
-   /**
-    Notification that execution of a request is complete
-
-    @param request       the original request
-    @param wasSuccessful  */
-   public void reportExecuteFinished( Request request, boolean wasSuccessful )
-   {
-      outputObserverVersion1.requestComplete( request.getRequestID(), wasSuccessful );
-   }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputUILordWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputUILordWrapper.java
deleted file mode 100644
index d70470c..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputUILordWrapper.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.gradleplugin.userinterface.swing.generic.OutputUILord;
-import org.gradle.openapi.external.ui.OutputObserverVersion1;
-import org.gradle.openapi.external.ui.OutputUILordVersion1;
-
-import java.awt.*;
-import java.util.*;
-import java.util.List;
-
-/**
- * Wrapper to shield version changes in OutputUILord from an external user of gradle open API.
- *
- * @author mhunsicker
-  */
-public class OutputUILordWrapper implements OutputUILordVersion1 {
-
-    private OutputUILord outputUILord;
-    private Map<OutputObserverVersion1,OutputObserverWrapper> outputObserverMap = new HashMap<OutputObserverVersion1, OutputObserverWrapper>( );
-
-    public OutputUILordWrapper( OutputUILord outputUILord ) {
-        this.outputUILord = outputUILord;
-    }
-
-    public void setOutputTextFont(Font font) {
-        outputUILord.setOutputTextFont(font);
-    }
-
-    public Font getOutputTextFont() {
-        return outputUILord.getOutputTextFont();
-    }
-
-    public void addFileExtension(String extension, String lineNumberDelimiter) {
-        outputUILord.getFileLinkDefinitionLord().addFileExtension( extension, lineNumberDelimiter );
-    }
-
-    public void addPrefixedFileLink(String name, String prefix, String extension, String lineNumberDelimiter) {
-        outputUILord.getFileLinkDefinitionLord().addPrefixedFileLink( name, prefix, extension, lineNumberDelimiter );
-    }
-
-    public List<String> getFileExtensions() {
-        return outputUILord.getFileLinkDefinitionLord().getFileExtensions();
-    }
-
-    public void addOutputObserver( OutputObserverVersion1 observer )
-    {
-       //to avoid versioning conflicts, we have to wrap the observer. This means we have to track the observers.
-       OutputObserverWrapper wrapper = new OutputObserverWrapper( observer );
-       outputObserverMap.put( observer, wrapper );
-
-       outputUILord.addOutputObserver( wrapper, false );
-    }
-
-    public void removeOutputObserver( OutputObserverVersion1 observer )
-    {
-       OutputObserverWrapper wrapper = outputObserverMap.remove(  observer );
-       if( wrapper != null ) {
-          outputUILord.removeOutputObserver( wrapper );
-       }
-    }
-
-    /*
-    This re-executes the last execution command (ignores refresh commands).
-    This is potentially useful for IDEs to hook into (hotkey to execute last command).
-     */
-    public void reExecuteLastCommand()
-    {
-        outputUILord.reExecuteLastCommand();
-    }
-}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/SinglePaneUIWrapper.java b/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/SinglePaneUIWrapper.java
deleted file mode 100644
index f1332a6..0000000
--- a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/SinglePaneUIWrapper.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright 2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.openapi.wrappers.ui;
-
-import org.gradle.gradleplugin.userinterface.swing.generic.SinglePaneUIInstance;
-import org.gradle.openapi.external.ui.SinglePaneUIInteractionVersion1;
-import org.gradle.openapi.external.ui.SinglePaneUIVersion1;
-
-import javax.swing.JComponent;
-
-/**
- This wraps a SinglePaneUIVersion1 for the purpose of being instantiated for
- an external tool such an IDE plugin. It wraps several interfaces and uses
- delegation in an effort to make this backward and forward compatible.
- Most of the work is done in AbstractOpenAPIUIWrapper
-
- @author mhunsicker
-  */
-public class SinglePaneUIWrapper extends AbstractOpenAPIUIWrapper<SinglePaneUIInstance> implements SinglePaneUIVersion1 {
-    public SinglePaneUIWrapper( SinglePaneUIInteractionVersion1 singlePaneUIArguments ) {
-
-       super( singlePaneUIArguments.instantiateSettings(), singlePaneUIArguments.instantiateAlternateUIInteraction() );
-
-       //the main thing this does in instantiate the SinglePaneUIInstance.
-       SinglePaneUIInstance singlePaneUIInstance = new SinglePaneUIInstance();
-       singlePaneUIInstance.initialize( settingsVersionWrapper, alternateUIInteractionVersionWrapper );
-       initialize( singlePaneUIInstance );
-    }
-
-   /**
-    Returns this panel as a Swing object suitable for inserting in your UI.
-
-    @return the main component
-    */
-   public JComponent getComponent()
-   {
-      return getGradleUI().getComponent();
-   }
-}
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FileLinkTests.java b/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FileLinkTests.java
deleted file mode 100644
index 511d7de..0000000
--- a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FileLinkTests.java
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import junit.framework.TestCase;
-import org.gradle.foundation.output.FileLink;
-import org.gradle.foundation.output.FileLinkDefinitionLord;
-import org.gradle.foundation.output.OutputParser;
-
-import java.io.File;
-import java.util.List;
-
-/**
- These test several aspects of parsing output looking for files.
- @author mhunsicker
- */
-public class FileLinkTests extends TestCase
-{
-   public static void parseOutputTest( String textToSearch, FileLink ... expectedResults )
-   {
-      parseTest( textToSearch, false, expectedResults );
-   }
-
-   public static void parseTest( String textToSearch, boolean verifyFileExists, FileLink ... expectedResults )
-   {
-      OutputParser outputParser = new OutputParser( new FileLinkDefinitionLord(), verifyFileExists );
-      List<FileLink> fileLinks = outputParser.parseText( textToSearch );
-
-      TestUtility.assertListContents( fileLinks, expectedResults );
-   }
-
-   public void testCompileErrors()
-   {
-      String outputText = ":distributionDiskResources SKIPPED\n" +
-            ":installDiskResources SKIPPED\n" +
-            ":idea-plugins:ideagradle:compileJava\n" +
-            "[ant:javac] /home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java:186: cannot find symbol\n" +
-            "[ant:javac] symbol  : constructor Integer()\n" +
-            "[ant:javac] location: class java.lang.Integer\n" +
-            "[ant:javac]       SwingUtilities.invokeLater( new Integer() );\n" +
-            "[ant:javac]                                   ^\n";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java" ), 114, 215, 186 ) );
-   }
-
-   public void testNotes()
-   {
-      String outputText = ":distributionDiskResources SKIPPED\n" +
-            ":installDiskResources SKIPPED\n" +
-            ":idea-plugins:ideagradle:compileJava\n" +
-            "[ant:javac] Note: /home/user/project/modules/plugins/gradle/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java uses or overrides a deprecated API.\n" +
-            "[ant:javac] Note: Recompile with -Xlint:deprecation for details.\n" +
-            "[ant:javac] 1 error\n" +
-            "Total time: 4.622 secs";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/project/modules/plugins/gradle/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java" ), 120, 224, -1 ) );
-   }
-
-   /**
-    Tests to see if we can find gradle files in the output. This message shows up when the build fails. We'll test two types (that probably wouldn't
-    occur naturally together. One with the line number, one without.
-    */
-   public void testGradleBuildFile()
-   {
-      String outputText = "FAILURE: Build failed with an exception.\n" +
-            "\n" +
-            "* Where:\n" +
-            "Build file '/home/user/gradle/build.gradle' line: 431\n" +
-            "\n" +
-            "* What went wrong:\n" +
-            "blah blah blah\n" +
-            "Build file '/home/user/gradle/build.gradle'" +
-            "Total time: 4.622 secs";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/gradle/build.gradle" ), 63, 104, 431 ),
-                                               new FileLink( new File( "/home/user/gradle/build.gradle" ), 152, 182, -1 ) );
-   }
-
-
-   /**
-    This attempts to find a single ant:checkstyle error that occurs when the checkstyle fails. This error consists of
-    the file, the line of the problem, and the cause.
-    */
-   public void testCheckstyleSingleErrorOutput()
-   {
-      String outputText = ":processResources\n" +
-            ":idea-plugins:compile\n" +
-            ":compile\n" +
-            ":copyNativeLibs\n" +
-            ":distributionDiskResources SKIPPED\n" +
-            ":installDiskResources SKIPPED\n" +
-            "[ant:checkstyle] /home/user/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s." +
-            "FAILURE: Build failed with an exception.\n" +
-            "\n" +
-            "* What went wrong:\n" +
-            "blah blah blah\n" +
-            "Total time: 4.622 secs";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java" ), 147, 262, 38 ) );
-   }
-
-   /**
-    This attemps to find the checkstyle error report file. This file will list all errors and where they are located.
-    The file link we're looking for just has the file's path
-    */
-   public void testCheckstyleReportErrorFile()
-   {
-      String outputText = ":processResources\n" +
-            ":plugins:compile\n" +
-            ":compile\n" +
-            ":copyNativeLibs\n" +
-            ":distributionDiskResources SKIPPED\n" +
-            ":installDiskResources SKIPPED\n" +
-            "FAILURE: Build failed with an exception.\n" +
-            "\n" +
-            "* What went wrong:\n" +
-            "Cause: Checkstyle check violations were found in main Java source. See the report at /home/user/gradle/subprojects/gradle-core/build/checkstyle/main.xml\n" +
-            "Total time: 4.622 secs" +
-            "blah blah blah";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/gradle/subprojects/gradle-core/build/checkstyle/main.xml" ), 271, 338, -1 ) );
-   }
-
-   /**
-    Tests that any HTML reports (prefixed with "See the report at ") are found.
-    */
-   public void testHTMLReport()
-   {
-      String outputText = "* What went wrong:\n" +
-            "Execution failed for task ':ui:codenarcTest'.\n" +
-            "Cause: CodeNarc check violations were found in test Groovy source. See the report at /home/user/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n" +
-            "\n" +
-            "* Try:\n" +
-            "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html" ), 150, 222, -1 ) );
-   }
-
-   /**
-    This tests a bug I discovered while coding this where the path matched by the Note: would start with the space
-    before the '/', but the Build file would start at the '/'. This test is here because my first attempt
-    I tracked the problem down to BasicFileLinkDefintion. It was assuming the file started at immediately after
-    the prefix. This was incorrect. There may be spaces between the prefix and the file (and I didn't want to put
-    spaces in the prefix). So I added BasicFileLinkDefintion.getStartOfFile() to skip over these spaces.
-    */
-   public void testOffByOneCharacterBug()
-   {
-      String outputText = "[ant:javac] Note: /home/user/modules/f1j/src/main/java/com/thing/DesignerManager.java uses or overrides a deprecated API.\n" +
-                          "Build file '/home/user/modules/build.gradle'";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/modules/f1j/src/main/java/com/thing/DesignerManager.java" ), 18, 85, -1 ),
-                                         new FileLink( new File( "/home/user/modules/build.gradle" ), 134, 165, -1 ) );
-   }
-
-   /**
-      This test that test reports file is found. This is a special case since we're not given
-      the actual file path and instead given only its parent path. The code assumes the report file
-      is present.
-      */
-   public void testFailedTestsReportFile()
-   {
-      String outputText = "FAILURE: Build failed with an exception.\n" +
-            "\n" +
-            "* Where:\n" +
-            "Build file '/home/user/gradle/gradle/build.gradle'\n" +
-            "\n" +
-            "* What went wrong:\n" +
-            "Execution failed for task ':integTest'.\n" +
-            "Cause: There were failing tests. See the report at /home/user/gradle/gradle/build/reports/tests.\n" +
-            "Total time: 4.622 secs\n" +
-            "blah blah blah";
-
-      parseOutputTest( outputText, new FileLink( new File( "/home/user/gradle/gradle/build.gradle" ), 63, 100, -1 ),
-                                         new FileLink( new File( "/home/user/gradle/gradle/build/reports/tests/index.html" ), 213, 258, -1 ) );
-   }
-
-   /**
-    This tests for multiple files found in a single output.
-    */
-   public void testMultiples()
-   {
-      String outputText = ":distributionDiskResources SKIPPED\n" +
-            ":installDiskResources SKIPPED\n" +
-            ":idea-plugins:ideagradle:compileJava\n\n" +
-            "[ant:checkstyle] /home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n" +
-            "Note: /home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java uses or overrides a deprecated API.\n" +
-            "\n" +
-            "Cause: Checkstyle check violations were found in main Java source. See the report at /home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml.\n" +
-            "\n" +
-            "\n" +
-            "Build file '/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle'\n" +
-            "\n" +
-            "* What went wrong:\n" +
-            "Execution failed for task ':ui:codenarcTest'.\n" +
-            "Cause: CodeNarc check violations were found in test Groovy source. See the report at /home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n" +
-            "\n" +
-            "* Try:\n" +
-            "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
-
-            parseOutputTest( outputText, new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java" ), 120, 243, 38 ),
-                                                       new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java" ), 282, 408, -1 ),
-                                                       new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml" ), 531, 606, -1 ),
-                                                       new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle" ), 622, 679, -1 ),
-                                                       new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html" ), 832, 912, -1 ) );
-   }
-
-    /**
-     * This tests that different cases of file extensions do not prevent files from being found. I
-     * want to explicitly test this because I had to explicitly search for case insensitive matches.
-     */
-   public void testFileExtensionCaseSensitivity()
-   {
-       String outputText = ":distributionDiskResources SKIPPED\n" +
-            ":installDiskResources SKIPPED\n" +
-            "/home/user/files/Thing.java:38: 'if' construct must use '{}'s.\n" +
-            "/home/user/files/Thing2.JAVA:929: cannot find symbol\n" +
-            "/home/user/files/Thing3.JaVa:77: incompatible types\n" +
-            "* Try:\n" +
-            "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
-       
-       parseOutputTest( outputText, new FileLink( new File( "/home/user/files/Thing.java" ), 65, 95, 38 ),
-                                    new FileLink( new File( "/home/user/files/Thing2.JAVA" ), 128, 160, 929 ),
-                                    new FileLink( new File( "/home/user/files/Thing3.JaVa" ), 181, 212, 77 ) );
-   }
-}
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/LiveOutputParserTests.java b/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/LiveOutputParserTests.java
deleted file mode 100644
index 4843027..0000000
--- a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/LiveOutputParserTests.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import junit.framework.TestCase;
-import junit.framework.AssertionFailedError;
-import org.gradle.foundation.output.FileLink;
-import org.gradle.foundation.output.FileLinkDefinitionLord;
-import org.gradle.foundation.output.LiveOutputParser;
-
-import java.io.File;
-import java.util.List;
-
-/**
- Tests aspects of LiveOutputParser. This finds FileLinks within text that
- is being output constantly.
-
- @author mhunsicker
- */
-public class LiveOutputParserTests extends TestCase
-{
-   private LiveOutputParser parser;
-    private FileLinkDefinitionLord definitionLord;
-
-    @Override
-   protected void setUp() throws Exception
-   {
-       definitionLord = new FileLinkDefinitionLord();
-       parser = new LiveOutputParser(definitionLord, false );
-   }
-
-   @Override
-   protected void tearDown() throws Exception
-   {
-      definitionLord = null;
-      parser = null; //clean up after ourselves. Some test runners keep all tests in memory. This makes sure our parser isn't consuming any.
-   }
-
-   /**
-    This does a basic test. Text is output in several waves breaking within lines.
-    There is a single file link in it. We should find it. Specifically, this is going
-    to break up the file so it comes in multiple parts.
-    */
-   public void testBasic()
-   {
-      FileLink expectedFileLink = new FileLink( new File( "/home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java" ), 114, 215, 186 );
-
-      appendTextWithoutFileLinks( ":distributionDiskResources " );
-      appendTextWithoutFileLinks( "SKIPPED\n:installDiskResources SKIPPED\n" );
-      appendTextWithoutFileLinks( ":idea-plugins:ideagradle:compileJava\n" );
-      appendTextWithoutFileLinks( "[ant:javac] /home/user/project/modules/plugins");
-      appendTextWithoutFileLinks( "/src/main/java/com/thing/plugins/gradle/ui/Gradle" );
-      appendTextWithFileLinks( "Component.java:186: cannot find symbol\n", expectedFileLink );  //here's where we expect to get some results
-      appendTextWithoutFileLinks( "[ant:javac] symbol  : constructor Integer()\n" );
-      appendTextWithoutFileLinks( "[ant:javac] location: class java.lang.Integer\n"  );
-      appendTextWithoutFileLinks( "[ant:javac]       SwingUtilities.invokeLater( new Integer() );\n" );
-      appendTextWithoutFileLinks( "[ant:javac]                                   ^\n" );
-
-      //at the end, verify we only found what was expected 
-      TestUtility.assertListContents( parser.getFileLinks(), expectedFileLink );
-   }
-
-   private void appendTextWithoutFileLinks( String text )
-   {
-      List<FileLink> fileLinks = parser.appendText( text );
-      if( !fileLinks.isEmpty() )
-      {
-         throw new AssertionFailedError( "FileLinks list is erroneously not empty: " + TestUtility.dumpList( fileLinks ) );
-      }
-   }
-
-   private void appendTextWithFileLinks( String text, FileLink ... expectedResults )
-   {
-      List<FileLink> fileLinks = parser.appendText( text );
-      TestUtility.assertListContents( fileLinks, expectedResults );
-   }
-
-   /**
-    This tests live output coming in where the result is multiple FileLinks. We'll just add many lines
-    some have FileLinks some don't. We want to make sure the LiveOutputParser tracks all of them correctly.
-    */
-   public void testMultipleFiles()
-   {
-      FileLink fileLink1 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java" ), 120, 243, 38 );
-      FileLink fileLink2 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java" ), 282, 408, -1 );
-      FileLink fileLink3 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml" ), 531, 606, -1 );
-      FileLink fileLink4 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle" ), 622, 679, -1 );
-      FileLink fileLink5 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html" ), 832, 912, -1 );
-
-      appendTextWithoutFileLinks( ":distributionDiskResources SKIPPED\n:installDiskResources" );
-      appendTextWithoutFileLinks( " SKIPPED\n:idea-plugins:ideagradle:compileJava\n\n" );
-      appendTextWithoutFileLinks( "[ant:checkstyle] /home/user/modules/gradle/subprojects" );
-      appendTextWithFileLinks( "/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink1 );
-      appendTextWithFileLinks( "Note: /home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java uses or overrides a deprecated API.\n", fileLink2 );
-      appendTextWithoutFileLinks( "\n" );
-      appendTextWithoutFileLinks( "Cause: Checkstyle check violations were found in main " );
-      appendTextWithoutFileLinks( "Java source. See the report " );
-      appendTextWithFileLinks( "at /home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml.\n", fileLink3 );
-      appendTextWithoutFileLinks( "\n" );
-      appendTextWithoutFileLinks( "\n" );
-      appendTextWithFileLinks( "Build file '/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle'\n", fileLink4 );
-      appendTextWithoutFileLinks( "\n" );
-      appendTextWithoutFileLinks( "* What went wrong:\n" );
-      appendTextWithoutFileLinks( "Execution failed for task ':ui:codenarcTest'.\n" );
-      appendTextWithoutFileLinks( "Cause: CodeNarc check " );
-      appendTextWithFileLinks( "violations were found in test Groovy source. See the report at /home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n", fileLink5 );
-      appendTextWithoutFileLinks( "\n" );
-      appendTextWithoutFileLinks( "* Try:\n" );
-      appendTextWithoutFileLinks( "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace." );
-
-      //at the end, verify we only found what was expected
-      TestUtility.assertListContents( parser.getFileLinks(), fileLink1, fileLink2, fileLink3, fileLink4, fileLink5 );
-   }
-
-   /**
-    This tests is we can successfully find FileLinks if several of them come in at once in one big block of multi-lined text.
-    We'll add some text one line at a time, then add a single FileLink (on a single line), then add many many lines at once that
-    has 4 FileLinks in it.
-    */
-   public void testMultiplesAtOnce()
-   {
-      FileLink fileLink1 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java" ), 120, 243, 38 );
-      FileLink fileLink2 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java" ), 282, 408, -1 );
-      FileLink fileLink3 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml" ), 531, 606, -1 );
-      FileLink fileLink4 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle" ), 622, 679, -1 );
-      FileLink fileLink5 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html" ), 832, 912, -1 );
-
-      appendTextWithoutFileLinks( ":distributionDiskResources SKIPPED\n" );
-      appendTextWithoutFileLinks( ":installDiskResources SKIPPED\n" );
-      appendTextWithoutFileLinks( ":idea-plugins:ideagradle:compileJava\n\n" );
-      appendTextWithFileLinks( "[ant:checkstyle] /home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink1 );
-      appendTextWithoutFileLinks( "Note: /home/user/modules/gradle/" ); //does NOT end with a newline. This is just to push a potential edge case
-
-      String remaindingOutputText = "subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java uses or overrides a deprecated API.\n" +
-            "\n" +
-            "Cause: Checkstyle check violations were found in main Java source. See the report at /home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml.\n" +
-            "\n" +
-            "\n" +
-            "Build file '/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle'\n" +
-            "\n" +
-            "* What went wrong:\n" +
-            "Execution failed for task ':ui:codenarcTest'.\n" +
-            "Cause: CodeNarc check violations were found in test Groovy source. See the report at /home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n" +
-            "\n" +
-            "* Try:\n" +
-            "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
-
-      //now add that one large chunk. We should find the last four
-      appendTextWithFileLinks( remaindingOutputText, fileLink2, fileLink3, fileLink4, fileLink5 );
-
-      //at the end, verify we only found what was expected
-      TestUtility.assertListContents( parser.getFileLinks(), fileLink1, fileLink2, fileLink3, fileLink4, fileLink5 );
-   }
-
-    /**
-     * This verifies that we can find a link to a groovy file as well as its line number. This was actually
-     * a bug and this test is based off of actual data (tests failed due to a compile error in groovy).
-     * I tracked the problem down to the space after the delimiter (".groovy: 24" vs. ".groovy:24" ).
-     * After running this test with actual data, I'm going to test it with a line that doesn't have a space
-     * just to make sure both work.
-     */
-   public void testGroovyFileLineDelimiter()
-   {
-       FileLink fileLink1 = new FileLink( new File( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy" ), 183, 306, 24 );
-       FileLink fileLink2 = new FileLink( new File( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy" ), 481, 603, 85 );
-
-       appendTextWithoutFileLinks( ":distributionDiskResources SKIPPED\n" );
-       appendTextWithoutFileLinks( ":installDiskResources SKIPPED\n" );
-       appendTextWithoutFileLinks( ":idea-plugins:ideagradle:compileJava\n\n" );
-       appendTextWithoutFileLinks( "org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n" );
-
-       //notice the space between "GradleRunnerFactoryTest.groovy:" and "24:". That was causing our problem
-       appendTextWithFileLinks( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy: 24: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n", fileLink1 );
-       appendTextWithoutFileLinks( " @ line 24, column 10.\n" );
-       appendTextWithoutFileLinks( "   @RunWith(DistributionIntegrationTestRunner.class)\n" );
-
-       //now test it without a space between the delimiter and line number to make sure it works both ways
-       appendTextWithFileLinks( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy:85: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n", fileLink2 );
-   }
-
-    /**
-     * This tests that you can dynamically add file extensions to the parser.
-     * We're going to add 2 fake extensions (one with line number delimiter, one without)
-     * then verify that the parser correctly parses the output with said extensions.
-     */
-   public void testAddingFileExtensions()
-   {
-       String myExtension1 = ".mytxtextension";
-       String myExtension2 = ".othertxtextension";
-
-       //make sure this fake extension isn't already in use
-       assertFalse( "Fake extension 1 already present. This test is not setup correctly!", definitionLord.getFileExtensions().contains(myExtension1) );
-       assertFalse( "Fake extension 2 already present. This test is not setup correctly!", definitionLord.getFileExtensions().contains(myExtension2) );
-
-       definitionLord.addFileExtension(myExtension1, ":" );
-       definitionLord.addFileExtension(myExtension2, null ); //this one has no line delimiter
-
-       //make sure it was added
-       assertTrue( "Fake extension 1 was not added. ", definitionLord.getFileExtensions().contains(myExtension1) );
-       assertTrue( "Fake extension 2 was not added. ", definitionLord.getFileExtensions().contains(myExtension2) );
-
-       //now verify the extension is used
-
-       FileLink fileLink1 = new FileLink( new File( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.mytxtextension" ), 183, 313, 24 );
-       FileLink fileLink2 = new FileLink( new File( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.othertxtextension" ), 488, 618, -1 );
-       FileLink fileLink3 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java" ), 632, 755, 38 );
-
-       appendTextWithoutFileLinks( ":distributionDiskResources SKIPPED\n" );
-       appendTextWithoutFileLinks( ":installDiskResources SKIPPED\n" );
-       appendTextWithoutFileLinks( ":idea-plugins:ideagradle:compileJava\n\n" );
-       appendTextWithoutFileLinks( "org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n" );
-       appendTextWithFileLinks( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.mytxtextension:24: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n", fileLink1 );
-       appendTextWithoutFileLinks( " @ line 24, column 10.\n" );
-       appendTextWithoutFileLinks( "   @RunWith(DistributionIntegrationTestRunner.class)\n" );
-       appendTextWithFileLinks( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.othertxtextension: other error\n", fileLink2 );
-
-       //do this just to make sure adding our custom extension didn't break existing extensions
-       appendTextWithFileLinks( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink3 );
-   }
-
-   /**
-   * This tests that you can dynamically add file prefixes to the parser.
-   * We're going to add 2 fake prefixes (one with line number delimiter, one without)
-   * then verify that the parser correctly parses the output with said prefixes.
-   */
-   public void testAddingPrefixedFileLink()
-   {
-       definitionLord.addPrefixedFileLink( "Test Crap 1", "Some Garbage:", ".txt", ":" );
-       definitionLord.addPrefixedFileLink( "Test Crap 2", "Some Trash:", ".txt", null );    //no line delimiter on this one
-
-       FileLink fileLink1 = new FileLink( new File( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt" ), 206, 325, 24 );
-       FileLink fileLink2 = new FileLink( new File( "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt" ), 517, 633, -1 );
-       FileLink fileLink3 = new FileLink( new File( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java" ), 651, 774, 38 );
-
-
-       appendTextWithoutFileLinks( ":distributionDiskResources SKIPPED\n" );
-       appendTextWithoutFileLinks( ":installDiskResources SKIPPED\n" );
-       appendTextWithoutFileLinks( ":idea-plugins:ideagradle:compileJava\n\n" );
-       appendTextWithoutFileLinks( "org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n" );
-       appendTextWithFileLinks( "Blah blah Some Garbage:/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt:24: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n", fileLink1 );
-       appendTextWithoutFileLinks( " @ line 24, column 10.\n" );
-       appendTextWithoutFileLinks( "   @RunWith(DistributionIntegrationTestRunner.class)\n" );
-       appendTextWithFileLinks( "Blah Some Trash: /home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt Some other error\n", fileLink2 );
-
-       //do this just to make sure adding our prefixed links didn't break existing extensions
-       appendTextWithFileLinks( "/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink3 );
-   }
-}
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/TestUtility.java b/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/TestUtility.java
deleted file mode 100644
index f2c6647..0000000
--- a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/TestUtility.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.foundation;
-
-import junit.framework.Assert;
-import junit.framework.AssertionFailedError;
-import org.gradle.api.Project;
-import org.gradle.api.Task;
-import org.gradle.api.tasks.TaskContainer;
-import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
-import org.gradle.gradleplugin.foundation.DOM4JSerializer;
-import org.gradle.gradleplugin.foundation.GradlePluginLord;
-import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
-import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
-import org.gradle.gradleplugin.foundation.request.Request;
-import org.gradle.util.UncheckedException;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JUnit4Mockery;
-
-import javax.swing.filechooser.FileFilter;
-import java.io.File;
-import java.util.*;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-/**
- * Utility class for initializing various test objects related.
- *
- * @author mhunsicker
- */
-public class TestUtility {
-    private static long uniqueNameCounter = 1; //used to make unique names for JMock objects.
-
-    /**
-     * Creates a mock project with the specified properties.
-     *
-     * Note: depth is 0 for a root project. 1 for a root project's subproject, etc.
-    */
-    public static Project createMockProject(JUnit4Mockery context, final String name, final String buildFilePath, final int depth, Project[] subProjectArray, Task[] tasks, String[] defaultTasks, Project... dependsOnProjects) {
-        final Project project = context.mock(Project.class, "[project]_" + name + '_' + uniqueNameCounter++);
-
-        context.checking(new Expectations() {{
-            allowing(project).getName();
-            will(returnValue(name));
-            allowing(project).getDescription();
-            will(returnValue(null));
-            allowing(project).getBuildFile();
-            will(returnValue(new File(buildFilePath)));
-            allowing(project).getDepth();
-            will(returnValue(depth));
-        }});
-
-        attachSubProjects(context, project, subProjectArray);
-        attachTasks(context, project, tasks);
-        assignDefaultTasks(context, project, defaultTasks);
-        assignDependsOnProjects(context, project, dependsOnProjects);
-
-        return project;
-    }
-
-    /**
-     * This makes the sub projects children of the parent project. If you call this repeatedly on the same
-     * parentProject, any previous sub projects will be replaced with the new ones.
-     *
-     * @param context the mock context
-     * @param parentProject where to attach the sub projects. This must be a mock object.
-     * @param subProjectArray the sub projects to attach to the parent. These must be mock objects. Pass in null or an
-     * empty array to set no sub projects.
-    */
-    public static void attachSubProjects(JUnit4Mockery context, final Project parentProject, Project... subProjectArray) {
-        final Map<String, Project> childProjects = new LinkedHashMap<String, Project>();
-        if (subProjectArray != null) {
-            for (final Project subProject : subProjectArray) {
-                childProjects.put(String.valueOf(childProjects.size()), subProject);
-                context.checking(new Expectations() {{
-                    allowing(subProject).getParent();
-                    will(returnValue(parentProject));
-                }});
-            }
-        }
-
-        //populate the subprojects (this may be an empty set)
-        context.checking(new Expectations() {{
-            allowing(parentProject).getChildProjects();
-            will(returnValue(childProjects));
-        }});
-    }
-
-    /**
-     * Creates a mock task with the specified properites.
-    */
-    public static Task createTask(JUnit4Mockery context, final String name, final String description) {
-        final Task task = context.mock(Task.class, "[task]_" + name + '_' + uniqueNameCounter++);
-
-        context.checking(new Expectations() {{
-            allowing(task).getName();
-            will(returnValue(name));
-            allowing(task).getDescription();
-            will(returnValue(description));
-        }});
-
-        return task;
-    }
-
-    /**
-     * This makes the tasks children of the parent project. If you call this repeatedly on the same parentProject, any
-     * previous tasks will be replaced with the new ones.
-     *
-     * @param context the mock context
-     * @param parentProject where to attach the sub projects. This must be a mock object.
-     * @param taskArray the tasks to attach to the parent. these must be mock objects. Pass in null or an empty array to
-     * set no tasks.
-    */
-    public static void attachTasks(JUnit4Mockery context, final Project parentProject, Task... taskArray) {
-        //first, make our project return our task container
-        final TaskContainer taskContainer = context.mock(TaskContainer.class, "[taskcontainer]_" + parentProject.getName() + '_' + uniqueNameCounter++);
-
-        context.checking(new Expectations() {{
-            allowing(parentProject).getTasks();
-            will(returnValue(taskContainer));
-        }});
-
-        final Set<Task> set = new LinkedHashSet<Task>();   //using a LinkedHashSet rather than TreeSet (which is what gradle uses) so I don't have to deal with compareTo() being called on mock objects.
-
-        if (taskArray != null && taskArray.length != 0) {
-            set.addAll(Arrays.asList(taskArray));
-
-            //set the parent project of the tasks
-            for (int index = 0; index < taskArray.length; index++) {
-                final Task task = taskArray[index];
-
-                context.checking(new Expectations() {{
-                    allowing(task).getProject();
-                    will(returnValue(parentProject));
-                }});
-            }
-        }
-
-        //populate the task container (this may be an empty set)
-        context.checking(new Expectations() {{
-            allowing(taskContainer).iterator();
-            will(returnIterator(set));
-        }});
-    }
-
-    private static void assignDefaultTasks(JUnit4Mockery context, final Project project, final String... defaultTasksArray) {
-        final List<String> defaultTaskList = new ArrayList<String>();
-
-        if (defaultTasksArray != null && defaultTasksArray.length != 0) {
-            defaultTaskList.addAll(Arrays.asList(defaultTasksArray));
-        }
-
-        context.checking(new Expectations() {{
-            allowing(project).getDefaultTasks();
-            will(returnValue(defaultTaskList));
-        }});
-    }
-
-    private static void assignDependsOnProjects(JUnit4Mockery context, final Project project, final Project... dependsOnProjects) {
-        final Set<Project> set = new LinkedHashSet<Project>();   //using a LinkedHashSet rather than TreeSet (which is what gradle uses) so I don't have to deal with compareTo() being called on mock objects.
-
-        if (dependsOnProjects != null && dependsOnProjects.length != 0) {
-            set.addAll(Arrays.asList(dependsOnProjects));
-        }
-
-        //populate the subprojects (this may be an empty set)
-        context.checking(new Expectations() {{
-            allowing(project).getDependsOnProjects();
-            will(returnValue(set));
-        }});
-    }
-
-    public static <T> void assertListContents(List<T> actualObjects, T... expectedObjectsArray) {
-        assertListContents(actualObjects, Arrays.asList(expectedObjectsArray));
-    }
-
-    public static <T> void assertListContents(List<T> actualObjects, List<T> expectedObjects) {
-        assertUnorderedListContents(actualObjects, expectedObjects);
-    }
-
-    /**
-     * This asserts the contents of the list are as expected. The important aspect of this function is that we don't
-     * care about ordering. We just want to make sure the contents are the same.
-     *
-     * @param actualObjecs the list to check
-     * @param expectedObjects what we expect in the list
-    */
-    public static <T> void assertUnorderedListContents(List<T> actualObjecs, List<T> expectedObjects) {
-        List<T> expectedObjecsList = new ArrayList<T>(expectedObjects);   //make a copy of it, so we can modify it.
-
-        while (!expectedObjecsList.isEmpty()) {
-            T expectedObject = expectedObjecsList.remove(0);
-
-            if (!actualObjecs.contains(expectedObject)) {
-                throw new AssertionFailedError(
-                        "Failed to locate object. Sought object:\n" + expectedObject + "\n\nExpected:\n" + dumpList(
-                                expectedObjects) + "\nActual:\n" + dumpList(actualObjecs));
-        }
-        }
-
-        if (actualObjecs.size() != expectedObjects.size()) {
-            throw new AssertionFailedError(
-                    "Expected " + expectedObjects.size() + " items but found " + actualObjecs.size() + "\nExpected:\n"
-                            + dumpList(expectedObjects) + "\nActual:\n" + dumpList(actualObjecs));
-    }
-    }
-
-    //function for getting a prettier dump of a list.
-
-    public static String dumpList(List list) {
-        if (list == null) {
-            return "[null]";
-        }
-        if (list.isEmpty()) {
-            return "[empty]";
-        }
-
-        StringBuilder builder = new StringBuilder();
-        Iterator iterator = list.iterator();
-        while (iterator.hasNext()) {
-            Object object = iterator.next();
-            if (object == null) {
-                builder.append("**** [null object in list] ****\n");
-            } else {
-                builder.append(object.toString()).append('\n');
-        }
-        }
-
-        return builder.toString();
-    }
-
-    /**
-     * This is an ExportInteraction implemention meant to be used by tests. You pass it a file to use and we'll return
-     * that in promptForFile. This also checks to ensure something doesn't happen where we get into an endless loop if
-     * promptForFile is called repeatedly. This can happen if promptForFile is called and its return value fails some
-     * form of validation which makes promptForFile get called again or if you deny overwriting the file. You'll get
-     * prompted again.
-    */
-    public static class TestExportInteraction implements DOM4JSerializer.ExportInteraction {
-        private File file;
-        private boolean confirmOverwrite;
-        private int promptCount;
-
-        public TestExportInteraction(File file, boolean confirmOverwrite) {
-            this.file = file;
-            this.confirmOverwrite = confirmOverwrite;
-        }
-
-        public File promptForFile(FileFilter fileFilters) {
-            if (promptCount == 100) {
-                throw new AssertionFailedError("Possible endless loop. PromptForFile has been called 100 times.");
-            }
-
-            promptCount++;
-            return file;
-        }
-
-        /**
-         * The file already exists. Confirm whether or not you want to overwrite it.
-         *
-         * @param file the file in question
-         * @return true to overwrite it, false not to.
-        */
-        public boolean confirmOverwritingExisingFile(File file) {
-            return confirmOverwrite;
-        }
-
-        public void reportError(String error) {
-            throw new AssertionFailedError("Unexpected error: " + error);
-        }
-    }
-
-    /**
-     * This is an ImportInteraction implementation meant to be used by tests. See TestExportInteraction for more
-     * information.
-    */
-    public static class TestImportInteraction implements DOM4JSerializer.ImportInteraction {
-        private File file;
-        private int promptCount;
-
-        public TestImportInteraction(File file) {
-            this.file = file;
-        }
-
-        public File promptForFile(FileFilter fileFilters) {
-            if (promptCount == 100) {
-                throw new AssertionFailedError("Possible endless loop. PromptForFile has been called 100 times.");
-            }
-
-            promptCount++;
-            return file;
-        }
-
-        public void reportError(String error) {
-            throw new AssertionFailedError("Unexpected error: " + error);
-        }
-    }
-
-    //wrapper around File.createTempFile just so we don't have to deal with the exception for tests.
-
-    /**
-     * This refreshes the projects but blocks until it is complete (its being executed in a separate process).
-     *
-     * @param gradlePluginLord the plugin lord (will be used to execute the command and store the results).
-    */
-    public static void refreshProjectsBlocking(GradlePluginLord gradlePluginLord, int maximumWaitValue, TimeUnit maximumWaitUnits) {
-        refreshProjectsBlocking(gradlePluginLord, new ExecuteGradleCommandServerProtocol.ExecutionInteraction() {
-            public void reportExecutionStarted() {
-            }
-
-           public void reportNumberOfTasksToExecute( int size ) {
-           }
-
-           public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
-            }
-
-            public void reportTaskStarted(String message, float percentComplete) {
-            }
-
-            public void reportTaskComplete(String message, float percentComplete) {
-            }
-
-            public void reportLiveOutput(String message) {
-            }
-        }, maximumWaitValue, maximumWaitUnits);
-    }
-
-    private static void refreshProjectsBlocking(GradlePluginLord gradlePluginLord, final ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction, int maximumWaitValue, TimeUnit maximumWaitUnits) {
-        gradlePluginLord.startExecutionQueue();   //make sure its started
-
-        final CountDownLatch complete = new CountDownLatch(1);
-
-        GradlePluginLord.RequestObserver observer = new GradlePluginLord.RequestObserver() {
-           public void executionRequestAdded( ExecutionRequest request ) {}
-           public void refreshRequestAdded( RefreshTaskListRequest request )
-           {
-              request.setExecutionInteraction( executionInteraction );
-           }
-           public void aboutToExecuteRequest( Request request ) { }
-
-           public void requestExecutionComplete( Request request, int result, String output ) {
-               complete.countDown();
-           }
-        };
-
-        gradlePluginLord.addRequestObserver( observer, false );   //add the observer before we add the request due to timing issues. It's possible for it to completely execute before we return from addRefreshRequestToQueue.
-        Request request = gradlePluginLord.addRefreshRequestToQueue();
-
-        //make sure we've got a request
-        Assert.assertNotNull(request);
-
-        //now wait until we're complete, but bail if we wait too long
-        boolean completed;
-        try {
-            completed = complete.await(maximumWaitValue, maximumWaitUnits);
-        } catch (InterruptedException e) {
-            throw UncheckedException.asUncheckedException(e);
-        }
-
-        gradlePluginLord.removeRequestObserver( observer );
-
-        if (!completed) //its still running. Something is wrong.
-        {
-            request.cancel(); //just to clean up after ourselves a little, cancel the request.
-            throw new AssertionFailedError("Failed to complete refresh in alotted time: " + maximumWaitValue + " " + maximumWaitUnits + ". Considering this failed.");
-        }
-    }
-
-   /**
-    This executes a command and waits until it is finished.
-
-    @param gradlePluginLord the plugin lord
-    @param fullCommandLine the command to execute
-    @param displayName the display name of the command. It doesn't usuall matter.
-    @param executionInteraction this gets the results of the execution
-    @param maximumWaitSeconds the maximum time to wait before considering it failed.
-    */
-    public static void executeBlocking(GradlePluginLord gradlePluginLord, String fullCommandLine, String displayName, final ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction, int maximumWaitSeconds) {
-        gradlePluginLord.startExecutionQueue();   //make sure its started
-
-        final CountDownLatch complete = new CountDownLatch(1);
-
-        GradlePluginLord.RequestObserver observer = new GradlePluginLord.RequestObserver() {
-           public void executionRequestAdded( ExecutionRequest request )
-           {
-              request.setExecutionInteraction( executionInteraction );
-           }
-           public void refreshRequestAdded( RefreshTaskListRequest request ) { }
-           public void aboutToExecuteRequest( Request request ) { }
-
-           public void requestExecutionComplete( Request request, int result, String output ) {
-               complete.countDown();
-           }
-        };
-
-        gradlePluginLord.addRequestObserver( observer, false );   //add the observer before we add the request due to timing issues. It's possible for it to completely execute before we return from addExecutionRequestToQueue.
-        Request request = gradlePluginLord.addExecutionRequestToQueue( fullCommandLine, displayName );
-
-        //make sure we've got a request
-        Assert.assertNotNull(request);
-
-        //now sleep until we're complete, but bail if we wait too long
-        boolean timeout;
-        try {
-            timeout = !complete.await(maximumWaitSeconds, TimeUnit.SECONDS);
-        } catch (InterruptedException e) {
-            throw UncheckedException.asUncheckedException(e);
-        }
-
-        gradlePluginLord.removeRequestObserver( observer );
-
-        if (timeout) //its still running. Something is wrong.
-        {
-            request.cancel(); //just to clean up after ourselves a little, cancel the request.
-            throw new AssertionFailedError("Failed to comlete execution in alotted time: " + maximumWaitSeconds + " seconds. Considering this failed.");
-        }
-    }
-}
-
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/WrapperScriptGenerator.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/WrapperScriptGenerator.java
deleted file mode 100644
index 041935a..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/WrapperScriptGenerator.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.api.tasks.wrapper.internal;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.tools.ant.taskdefs.Chmod;
-import org.gradle.api.UncheckedIOException;
-import org.gradle.util.AntUtil;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-
-/**
- * @author Hans Dockter
- */
-public class WrapperScriptGenerator {
-    public static final String UNIX_NL = "\n";
-    public static final String CURRENT_DIR_UNIX = "`dirname \"$0\"`";
-    public static final String WINDOWS_NL = "\n";
-    public static final String CURRENT_DIR_WINDOWS = "%DIRNAME%";
-    private static final String FULLY_QUALIFIED_WRAPPER_NAME = "org.gradle.wrapper.GradleWrapperMain";
-
-    public void generate(String jarPath, String wrapperPropertiesPath, File scriptFile) {
-        try {
-            createUnixScript(jarPath, scriptFile, wrapperPropertiesPath);
-            createWindowsScript(jarPath, scriptFile, wrapperPropertiesPath);
-        } catch (IOException e) {
-            throw new UncheckedIOException(e);
-        }
-    }
-
-    private void createUnixScript(String jarPath, File scriptFile, String wrapperPropertiesPath) throws IOException {
-        String unixWrapperScriptHead = IOUtils.toString(getClass().getResourceAsStream("unixWrapperScriptHead.txt"));
-        String unixWrapperScriptTail = IOUtils.toString(getClass().getResourceAsStream("unixWrapperScriptTail.txt"));
-
-        String fillingUnix = "" + UNIX_NL +
-                "STARTER_MAIN_CLASS=" + FULLY_QUALIFIED_WRAPPER_NAME + UNIX_NL +
-                "CLASSPATH=" + CURRENT_DIR_UNIX + "/" + FilenameUtils.separatorsToUnix(jarPath) + UNIX_NL +
-                "WRAPPER_PROPERTIES=" + CURRENT_DIR_UNIX + "/" + FilenameUtils.separatorsToUnix(wrapperPropertiesPath) + UNIX_NL;
-
-        String unixScript = unixWrapperScriptHead + fillingUnix + unixWrapperScriptTail;
-        File unixScriptFile = scriptFile;
-        FileUtils.writeStringToFile(unixScriptFile, unixScript);
-        createExecutablePermission(unixScriptFile);
-    }
-
-    private void createExecutablePermission(File unixScriptFile) {
-        Chmod chmod = new Chmod();
-        chmod.setProject(AntUtil.createProject());
-        chmod.setFile(unixScriptFile);
-        chmod.setPerm("ugo+rx");
-        chmod.execute();
-    }
-
-    private void createWindowsScript(String jarPath, File scriptFile, String wrapperPropertiesPath) throws IOException {
-        String windowsWrapperScriptHead = IOUtils.toString(getClass().getResourceAsStream("windowsWrapperScriptHead.txt"));
-        String windowsWrapperScriptTail = IOUtils.toString(getClass().getResourceAsStream("windowsWrapperScriptTail.txt"));
-        String fillingWindows = "" + WINDOWS_NL +
-                "set STARTER_MAIN_CLASS=" + FULLY_QUALIFIED_WRAPPER_NAME + WINDOWS_NL +
-                "set CLASSPATH=" + CURRENT_DIR_WINDOWS + "\\" + FilenameUtils.separatorsToWindows(jarPath) + WINDOWS_NL +
-                "set WRAPPER_PROPERTIES=" + CURRENT_DIR_WINDOWS + "\\" + FilenameUtils.separatorsToWindows(wrapperPropertiesPath) + WINDOWS_NL;
-        String windowsScript = windowsWrapperScriptHead + fillingWindows + windowsWrapperScriptTail;
-        File windowsScriptFile = new File(scriptFile.getParentFile(), scriptFile.getName() + ".bat");
-        FileUtils.writeStringToFile(windowsScriptFile, transformIntoWindowsNewLines(windowsScript));
-    }
-
-    private String transformIntoWindowsNewLines(String s) {
-        StringWriter writer = new StringWriter();
-        for (char c : s.toCharArray()) {
-            if (c == '\n') {
-                writer.write('\r');
-                writer.write('\n');
-            } else if (c != '\r') {
-                writer.write(c);
-            }
-        }        
-        return writer.toString();
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/BootstrapMainStarter.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/BootstrapMainStarter.java
deleted file mode 100644
index 0026397..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/BootstrapMainStarter.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.wrapper;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-/**
- * @author Hans Dockter
- */
-public class BootstrapMainStarter {
-    public void start(String[] args, File gradleHome) throws Exception {
-        boolean debug = GradleWrapperMain.isDebug();
-        File gradleJar = findLauncherJar(gradleHome);
-        if (debug) {
-            System.out.println("gradleJar = " + gradleJar.getAbsolutePath());
-        }
-        URLClassLoader contextClassLoader = new URLClassLoader(new URL[] { gradleJar.toURI().toURL() });
-        Thread.currentThread().setContextClassLoader(contextClassLoader);
-        Class<?> mainClass = contextClassLoader.loadClass("org.gradle.launcher.GradleMain");
-        Method mainMethod = mainClass.getMethod("main", String[].class);
-        mainMethod.invoke(null, new Object[] {args});
-    }
-
-    private File findLauncherJar(File gradleHome) {
-        for (File file : new File(gradleHome, "lib").listFiles()) {
-            if (file.getName().matches("gradle-launcher-.*\\.jar")) {
-                return file;
-            }
-        }
-        throw new RuntimeException(String.format("Could not locate the Gradle launcher JAR in Gradle distribution '%s'.", gradleHome));
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Download.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Download.java
deleted file mode 100644
index 831e850..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Download.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright 2007-2009 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.wrapper;
-
-import java.io.*;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLConnection;
-
-/**
- * @author Hans Dockter
- */
-class Download implements IDownload {
-    private static final int PROGRESS_CHUNK = 20000;
-    private static final int BUFFER_SIZE = 10000;
-
-    public void download(URI address, File destination) throws Exception {
-        if (destination.exists()) {
-            return;
-        }
-        destination.getParentFile().mkdirs();
-
-        downloadInternal(address, destination);
-    }
-
-    private void downloadInternal(URI address, File destination) throws Exception {
-        OutputStream out = null;
-        URLConnection conn;
-        InputStream in = null;
-        try {
-            URL url = address.toURL();
-            out = new BufferedOutputStream(
-                    new FileOutputStream(destination));
-            conn = url.openConnection();
-            in = conn.getInputStream();
-            byte[] buffer = new byte[BUFFER_SIZE];
-            int numRead;
-            long progressCounter = 0;
-            while ((numRead = in.read(buffer)) != -1) {
-                progressCounter += numRead;
-                if (progressCounter / PROGRESS_CHUNK > 0) {
-                    System.out.print(".");
-                    progressCounter = progressCounter - PROGRESS_CHUNK;
-                }
-                out.write(buffer, 0, numRead);
-            }
-        } finally {
-            System.out.println("");
-            if (in != null) {
-                in.close();
-            }
-            if (out != null) {
-                out.close();
-            }
-        }
-    }
-
-
-}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/GradleWrapperMain.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/GradleWrapperMain.java
deleted file mode 100644
index 0656b20..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/GradleWrapperMain.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.wrapper;
-
-import java.io.File;
-
-/**
- * @author Hans Dockter
- */
-public class GradleWrapperMain {
-    public static final String ALWAYS_UNPACK_ENV = "GRADLE_WRAPPER_ALWAYS_UNPACK";
-    public static final String ALWAYS_DOWNLOAD_ENV = "GRADLE_WRAPPER_ALWAYS_DOWNLOAD";
-    public static final String DEFAULT_GRADLE_USER_HOME = System.getProperty("user.home") + "/.gradle";
-    public static final String GRADLE_USER_HOME_PROPERTY_KEY = "gradle.user.home";
-    public static final String GRADLE_USER_HOME_ENV_KEY = "GRADLE_USER_HOME";
-    public static final String DEBUG_PROPERTY_KEY = "gradle.wrapper.debug";
-
-    public static void main(String[] args) throws Exception {
-        addSystemProperties(args);
-        
-        if (isDebug()) {
-            System.out.println(ALWAYS_UNPACK_ENV + " env variable: " + System.getenv(ALWAYS_UNPACK_ENV));
-            System.out.println(ALWAYS_DOWNLOAD_ENV + " env variable: " + System.getenv(ALWAYS_DOWNLOAD_ENV));
-        }
-        boolean alwaysDownload = Boolean.parseBoolean(System.getenv(ALWAYS_DOWNLOAD_ENV));
-        boolean alwaysUnpack = Boolean.parseBoolean(System.getenv(ALWAYS_UNPACK_ENV));
-
-        new Wrapper().execute(
-                args,
-                new Install(alwaysDownload, alwaysUnpack, new Download(), new PathAssembler(gradleUserHome())),
-                new BootstrapMainStarter());
-    }
-
-    private static void addSystemProperties(String[] args) {
-        System.getProperties().putAll(SystemPropertiesHandler.getSystemProperties(args));
-        System.getProperties().putAll(SystemPropertiesHandler.getSystemProperties(new File(gradleUserHome(), "gradle.properties")));
-        System.getProperties().putAll(SystemPropertiesHandler.getSystemProperties(new File("gradle.properties")));
-    }
-
-    private static String gradleUserHome() {
-        String gradleUserHome = System.getProperty(GRADLE_USER_HOME_PROPERTY_KEY);
-        if (gradleUserHome != null) {
-            return gradleUserHome;
-        } else if((gradleUserHome = System.getenv(GRADLE_USER_HOME_ENV_KEY)) != null) {
-            return gradleUserHome;
-        } else {
-            return DEFAULT_GRADLE_USER_HOME;
-        }
-    }
-
-    static boolean isDebug() {
-        String prop = System.getProperty(DEBUG_PROPERTY_KEY);
-        return prop != null && !prop.toUpperCase().equals("FALSE");
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Install.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Install.java
deleted file mode 100644
index 900dd7d..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Install.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.wrapper;
-
-import java.io.*;
-import java.net.URI;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-/**
- * @author Hans Dockter
- */
-public class Install {
-    private IDownload download = new Download();
-
-    private boolean alwaysDownload;
-    private boolean alwaysUnpack;
-    private PathAssembler pathAssembler;
-
-    public Install(boolean alwaysDownload, boolean alwaysUnpack, IDownload download, PathAssembler pathAssembler) {
-        this.alwaysDownload = alwaysDownload;
-        this.alwaysUnpack = alwaysUnpack;
-        this.download = download;
-        this.pathAssembler = pathAssembler;
-    }
-
-    public File createDist(URI distributionUrl, String distBase, String distPath, String zipBase, String zipPath) throws Exception {
-        File gradleHome = pathAssembler.gradleHome(distBase, distPath, distributionUrl);
-        if (!alwaysDownload && !alwaysUnpack && gradleHome.isDirectory()) {
-            return gradleHome;
-        }
-        File localZipFile = pathAssembler.distZip(zipBase, zipPath, distributionUrl);
-        if (alwaysDownload || !localZipFile.exists()) {
-            File tmpZipFile = new File(localZipFile.getParentFile(), localZipFile.getName() + ".part");
-            tmpZipFile.delete();
-            System.out.println("Downloading " + distributionUrl);
-            download.download(distributionUrl, tmpZipFile);
-            tmpZipFile.renameTo(localZipFile);
-        }
-        if (gradleHome.isDirectory()) {
-            System.out.println("Deleting directory " + gradleHome.getAbsolutePath());
-            deleteDir(gradleHome);
-        }
-        File distDest = gradleHome.getParentFile();
-        System.out.println("Unzipping " + localZipFile.getAbsolutePath() + " to " + distDest.getAbsolutePath());
-        unzip(localZipFile, distDest);
-        if (!gradleHome.isDirectory()) {
-            throw new RuntimeException(String.format(
-                    "Gradle distribution '%s' does not contain expected directory '%s'.", distributionUrl,
-                    gradleHome.getName()));
-        }
-        setExecutablePermissions(gradleHome);
-        return gradleHome;
-    }
-
-    private void setExecutablePermissions(File gradleHome) {
-        if (isWindows()) {
-            return;
-        }
-        File gradleCommand = new File(gradleHome, "bin/gradle");
-        String errorMessage = null;
-        try {
-            ProcessBuilder pb = new ProcessBuilder("chmod", "755", gradleCommand.getCanonicalPath());
-            Process p = pb.start();
-            if (p.waitFor() == 0) {
-                System.out.println("Set executable permissions for: " + gradleCommand.getAbsolutePath());
-            } else {
-                BufferedReader is = new BufferedReader(new InputStreamReader(p.getInputStream()));
-                errorMessage = "";
-                String line;
-                while ((line = is.readLine()) != null) {
-                    errorMessage += line + System.getProperty("line.separator");
-                }
-            }
-        } catch (IOException e) {
-            errorMessage = e.getMessage();
-        } catch (InterruptedException e) {
-            errorMessage = e.getMessage();
-        }
-        if (errorMessage != null) {
-            System.out.println("Could not set executable permissions for: " + gradleCommand.getAbsolutePath());
-            System.out.println("Please do this manually if you want to use the Gradle UI.");
-        }
-    }
-
-    private boolean isWindows() {
-        String osName = System.getProperty("os.name").toLowerCase(Locale.US);
-        if (osName.indexOf("windows") > -1) {
-            return true;
-        }
-        return false;
-    }
-
-    private boolean deleteDir(File dir) {
-        if (dir.isDirectory()) {
-            String[] children = dir.list();
-            for (int i = 0; i < children.length; i++) {
-                boolean success = deleteDir(new File(dir, children[i]));
-                if (!success) {
-                    return false;
-                }
-            }
-        }
-
-        // The directory is now empty so delete it
-        return dir.delete();
-    }
-
-    public void unzip(File zip, File dest) throws IOException {
-        Enumeration entries;
-        ZipFile zipFile;
-
-        zipFile = new ZipFile(zip);
-
-        entries = zipFile.entries();
-
-        while (entries.hasMoreElements()) {
-            ZipEntry entry = (ZipEntry) entries.nextElement();
-
-            if (entry.isDirectory()) {
-                (new File(dest, entry.getName())).mkdirs();
-                continue;
-            }
-
-            copyInputStream(zipFile.getInputStream(entry),
-                    new BufferedOutputStream(new FileOutputStream(new File(dest, entry.getName()))));
-        }
-        zipFile.close();
-    }
-
-    public void copyInputStream(InputStream in, OutputStream out) throws IOException {
-        byte[] buffer = new byte[1024];
-        int len;
-
-        while ((len = in.read(buffer)) >= 0) {
-            out.write(buffer, 0, len);
-        }
-
-        in.close();
-        out.close();
-    }
-
-}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/PathAssembler.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/PathAssembler.java
deleted file mode 100644
index f3b4bec..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/PathAssembler.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.wrapper;
-
-import java.io.File;
-import java.net.URI;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author Hans Dockter
- */
-public class PathAssembler {
-    public static final String GRADLE_USER_HOME_STRING = "GRADLE_USER_HOME";
-    public static final String PROJECT_STRING = "PROJECT";
-
-    public String gradleUserHome;
-
-    public PathAssembler() {
-    }
-
-    public PathAssembler(String gradleUserHome) {
-        this.gradleUserHome = gradleUserHome;
-    }
-
-    public File gradleHome(String distBase, String distPath, URI distUrl) {
-        return new File(getBaseDir(distBase), distPath + "/" + getDistHome(distUrl));
-    }
-
-    public File distZip(String zipBase, String zipPath, URI distUrl) {
-        return new File(getBaseDir(zipBase), zipPath + "/" + getDistName(distUrl));
-    }
-
-    private String getDistHome(URI distUrl) {
-        String name = getDistName(distUrl);
-        Matcher matcher = Pattern.compile("(\\p{Alpha}+-\\d+\\.\\d+.*?)(-\\p{Alpha}+)?\\.zip").matcher(name);
-        if (!matcher.matches()) {
-            throw new RuntimeException(String.format("Cannot determine Gradle version from distribution URL '%s'.",
-                    distUrl));
-        }
-        return matcher.group(1);
-    }
-
-    private String getDistName(URI distUrl) {
-        String path = distUrl.getPath();
-        int p = path.lastIndexOf("/");
-        if (p < 0) {
-            return path;
-        }
-        return path.substring(p + 1);
-    }
-
-    private String getBaseDir(String base) {
-        if (base.equals(GRADLE_USER_HOME_STRING)) {
-            return gradleUserHome;
-        } else if (base.equals(PROJECT_STRING)) {
-            return System.getProperty("user.dir");
-        } else {
-            throw new RuntimeException("Base: " + base + " is unknown");
-        }
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Wrapper.java b/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Wrapper.java
deleted file mode 100644
index f9d0eef..0000000
--- a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/Wrapper.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.wrapper;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Properties;
-
-/**
- * @author Hans Dockter
- */
-public class Wrapper {
-    public static final String WRAPPER_PROPERTIES_PROPERTY = "org.gradle.wrapper.properties";
-    
-    public static final String DISTRIBUTION_URL_PROPERTY = "distributionUrl";
-    public static final String DISTRIBUTION_BASE_PROPERTY = "distributionBase";
-    public static final String ZIP_STORE_BASE_PROPERTY = "zipStoreBase";
-    public static final String DISTRIBUTION_PATH_PROPERTY = "distributionPath";
-    public static final String ZIP_STORE_PATH_PROPERTY = "zipStorePath";
-
-    public void execute(String[] args, Install install, BootstrapMainStarter bootstrapMainStarter) throws Exception {
-        Properties wrapperProperties = new Properties();
-        InputStream inStream = new FileInputStream(getWrapperPropertiesFile());
-        try {
-            wrapperProperties.load(inStream);
-        } finally {
-            inStream.close();
-        }
-        if (GradleWrapperMain.isDebug()) {
-            System.out.println("wrapperProperties = " + wrapperProperties);
-        }
-        File gradleHome = install.createDist(
-                new URI(getProperty(wrapperProperties, DISTRIBUTION_URL_PROPERTY)),
-                getProperty(wrapperProperties, DISTRIBUTION_BASE_PROPERTY),
-                getProperty(wrapperProperties, DISTRIBUTION_PATH_PROPERTY),
-                getProperty(wrapperProperties, ZIP_STORE_BASE_PROPERTY),
-                getProperty(wrapperProperties, ZIP_STORE_PATH_PROPERTY)
-        );
-        if (GradleWrapperMain.isDebug()) {
-            System.out.println("args = " + Arrays.asList(args));
-        }
-        bootstrapMainStarter.start(args, gradleHome);
-    }
-
-    private File getWrapperPropertiesFile() {
-        return new File(System.getProperty(WRAPPER_PROPERTIES_PROPERTY));
-    }
-
-    private String getProperty(Properties wrapperProperties, String propertyName) {
-        String value = wrapperProperties.getProperty(propertyName);
-        if (value == null) {
-            throw new RuntimeException(String.format(
-                    "No value with key '%s' specified in wrapper properties file '%s'.", propertyName,
-                    getWrapperPropertiesFile()));
-        }
-        return value;
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptHead.txt b/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptHead.txt
deleted file mode 100644
index d646f03..0000000
--- a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptHead.txt
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-##                                                                          ##
-##  Gradle wrapper script for UN*X                                         ##
-##                                                                          ##
-##############################################################################
-
-# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
-# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
-# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
-
-GRADLE_APP_NAME=Gradle
-
-warn ( ) {
-    echo "${PROGNAME}: $*"
-}
-
-die ( ) {
-    warn "$*"
-    exit 1
-}
-
-
-# OS specific support (must be 'true' or 'false').
-cygwin=false
-msys=false
-darwin=false
-case "`uname`" in
-  CYGWIN* )
-    cygwin=true
-    ;;
-  Darwin* )
-    darwin=true
-    ;;
-  MINGW* )
-    msys=true
-    ;;
-esac
-
-# Attempt to set JAVA_HOME if it's not already set.
-if [ -z "$JAVA_HOME" ] ; then
-    if $darwin ; then
-        [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
-        [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
-    else
-        javaExecutable="`which javac`"
-        [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
-        # readlink(1) is not available as standard on Solaris 10.
-        readLink=`which readlink`
-        [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
-        javaExecutable="`readlink -f \"$javaExecutable\"`"
-        javaHome="`dirname \"$javaExecutable\"`"
-        javaHome=`expr "$javaHome" : '\(.*\)/bin'`
-        export JAVA_HOME="$javaHome"
-    fi
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched.
-if $cygwin ; then
-    [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-fi
diff --git a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptTail.txt b/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptTail.txt
deleted file mode 100644
index 5ef1777..0000000
--- a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptTail.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-# Determine the Java command to use to start the JVM.
-if [ -z "$JAVACMD" ] ; then
-    if [ -n "$JAVA_HOME" ] ; then
-        if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-            # IBM's JDK on AIX uses strange locations for the executables
-            JAVACMD="$JAVA_HOME/jre/sh/java"
-        else
-            JAVACMD="$JAVA_HOME/bin/java"
-        fi
-    else
-        JAVACMD="java"
-    fi
-fi
-if [ ! -x "$JAVACMD" ] ; then
-    die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD"
-fi
-if [ -z "$JAVA_HOME" ] ; then
-    warn "JAVA_HOME environment variable is not set"
-fi
-
-# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
-if $darwin; then
-    JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
-# we may also want to set -Xdock:image
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
-    JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
-    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
-    # We build the pattern for arguments to be converted via cygpath
-    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
-    SEP=""
-    for dir in $ROOTDIRSRAW ; do
-        ROOTDIRS="$ROOTDIRS$SEP$dir"
-        SEP="|"
-    done
-    OURCYGPATTERN="(^($ROOTDIRS))"
-    # Add a user-defined pattern to the cygpath arguments
-    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
-        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
-    fi
-    # Now convert the arguments - kludge to limit ourselves to /bin/sh
-    i=0
-    for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
-
-        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
-            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
-        else
-            eval `echo args$i`="\"$arg\""
-        fi
-        i=$((i+1))
-    done 
-    case $i in
-        (0) set -- ;;
-        (1) set -- "$args0" ;;
-        (2) set -- "$args0" "$args1" ;;
-        (3) set -- "$args0" "$args1" "$args2" ;;
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
-    esac
-fi
-
-GRADLE_APP_BASE_NAME=`basename "$0"`
-
-"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
-        -classpath "$CLASSPATH" \
-        -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
-        -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
-        $STARTER_MAIN_CLASS \
-        "$@"
diff --git a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptHead.txt b/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptHead.txt
deleted file mode 100644
index e6be5b6..0000000
--- a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptHead.txt
+++ /dev/null
@@ -1,101 +0,0 @@
- at if "%DEBUG%" == "" @echo off
- at rem ##########################################################################
- at rem                                                                         ##
- at rem  Gradle startup script for Windows                                      ##
- at rem                                                                         ##
- at rem ##########################################################################
-
- at rem
- at rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $
- at rem
-
- at rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
- at rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
- at rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
- at rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.\
-
- at rem Determine the command interpreter to execute the "CD" later
-set COMMAND_COM="cmd.exe"
-if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
-if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"
-
- at rem Use explicit find.exe to prevent cygwin and others find.exe from being used
-set FIND_EXE="find.exe"
-if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
-if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"
-
-:check_JAVA_HOME
- at rem Make sure we have a valid JAVA_HOME
-if not "%JAVA_HOME%" == "" goto have_JAVA_HOME
-
-echo.
-echo ERROR: Environment variable JAVA_HOME has not been set.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-echo.
-goto end
-
-:have_JAVA_HOME
- at rem Validate JAVA_HOME
-%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
-if not errorlevel 1 goto init
-
-echo.
-echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation if there are problems.
-echo.
-
-:init
- at rem get name of script to launch with full path
- at rem Get command-line arguments, handling Windowz variants
-SET _marker=%JAVA_HOME: =%
- at rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems.
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%eval[2+2]" == "4" goto 4NT_args
-
-IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args
-
-set _FIXPATH=
-call :fixpath "%JAVA_HOME%"
-set JAVA_HOME=%_FIXPATH:~1%
-
-goto win9xME_args
-
-:fixpath
-if not %1.==. (
-for /f "tokens=1* delims=;" %%a in (%1) do (
-call :shortfilename "%%a" & call :fixpath "%%b"
-)
-)
-goto :EOF
-:shortfilename
-for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi
-goto :EOF
-
-
-:win9xME_args
- at rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
- at rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
- at rem Setup the command line
diff --git a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptTail.txt b/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptTail.txt
deleted file mode 100644
index 9311656..0000000
--- a/subprojects/gradle-wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptTail.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-set JAVA_EXE=%JAVA_HOME%\bin\java.exe
-
-set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
-
-"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
-
-:end
- at rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
-
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
-exit /b "%ERRORLEVEL%"
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
\ No newline at end of file
diff --git a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/InstallTest.groovy b/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/InstallTest.groovy
deleted file mode 100644
index ac1aa97..0000000
--- a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/InstallTest.groovy
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright 2007 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.gradle.wrapper
-
-import org.gradle.api.tasks.wrapper.Wrapper.PathBase
-import org.gradle.util.TemporaryFolder
-import org.junit.Before
-import org.junit.Rule
-import org.junit.Test
-import static org.junit.Assert.*
-
-/**
- * @author Hans Dockter
- */
-class InstallTest {
-    File testDir
-    Install install
-    String testZipBase
-    String testZipPath
-    String testDistBase
-    String testDistPath
-    URI testDistUrl
-    IDownload downloadMock
-    PathAssembler pathAssemblerMock;
-    boolean downloadCalled
-    File zip
-    File distributionDir
-    File zipStore
-    File gradleScript
-    File gradleHomeDir
-    File zipDestination
-    @Rule
-    public TemporaryFolder tmpDir = new TemporaryFolder();
-
-    @Before public void setUp() {
-        downloadCalled = false
-        testDir = tmpDir.dir
-        testZipBase = PathBase.PROJECT.toString()
-        testZipPath = 'someZipPath'
-        testDistBase = PathBase.GRADLE_USER_HOME.toString()
-        testDistPath = 'someDistPath'
-        testDistUrl = new URI('http://server/gradle-0.9.zip')
-        distributionDir = new File(testDir, testDistPath)
-        gradleHomeDir = new File(distributionDir, 'gradle-0.9')
-        zipStore = new File(testDir, 'zips');
-        zipDestination = new File(zipStore, 'gradle-0.9.zip')
-        install = new Install(false, false, createDownloadMock(), createPathAssemblerMock())
-    }
-
-    IDownload createDownloadMock() {
-        [download: {URI url, File destination ->
-            assertEquals(testDistUrl, url)
-            assertEquals(zipDestination.getAbsolutePath() + '.part', destination.getAbsolutePath())
-            zip = createTestZip()
-            downloadCalled = true
-        }] as IDownload
-    }
-
-    PathAssembler createPathAssemblerMock() {
-        [gradleHome: {String distBase, String distPath, URI distUrl ->
-            assertEquals(testDistBase, distBase)
-            assertEquals(testDistPath, distPath)
-            assertEquals(testDistUrl, distUrl)
-            gradleHomeDir},
-         distZip: { String zipBase, String zipPath, URI distUrl ->
-            assertEquals(testZipBase, zipBase)
-            assertEquals(testZipPath, zipPath)
-             assertEquals(testDistUrl, distUrl)
-            zipDestination
-        }] as PathAssembler
-    }
-
-    @Test public void testInit() {
-        assert !install.alwaysDownload
-        assert !install.alwaysUnpack
-    }
-
-    File createTestZip() {
-        File explodedZipDir = new File(testDir, 'explodedZip')
-        File binDir = new File(explodedZipDir, 'bin')
-        binDir.mkdirs()
-        gradleScript = new File(binDir, 'gradle')
-        gradleScript.write('something')
-        zipStore.mkdirs()
-        AntBuilder antBuilder = new AntBuilder()
-        antBuilder.zip(destfile: zipDestination.absolutePath + '.part') {
-            zipfileset(dir: explodedZipDir, prefix: 'gradle-0.9')
-        }
-        (zipDestination.absolutePath + '.part') as File
-    }
-
-    @Test public void testCreateDist() {
-        assertEquals(gradleHomeDir, install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath))
-        assert downloadCalled
-        assert distributionDir.isDirectory()
-        assert zipDestination.exists()
-        assert gradleScript.exists()
-//        assert new File(gradleHomeDir, "bin/gradle").canExecute()
-    }
-
-    @Test public void testCreateDistWithExistingRoot() {
-        distributionDir.mkdirs()
-        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
-        assert downloadCalled
-        assert gradleHomeDir.isDirectory()
-        assert gradleScript.exists()
-    }
-
-    @Test public void testCreateDistWithExistingDist() {
-        gradleHomeDir.mkdirs()
-        long lastModified = gradleHomeDir.lastModified()
-        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
-        assert !downloadCalled
-        assert lastModified == gradleHomeDir.lastModified()
-    }
-
-    @Test public void testCreateDistWithExistingDistAndZipAndAlwaysUnpackTrue() {
-        install = new Install(false, true, createDownloadMock(), createPathAssemblerMock())
-        createTestZip().renameTo(zipDestination)
-        gradleHomeDir.mkdirs()
-        File testFile = new File(gradleHomeDir, 'testfile')
-        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
-        assert distributionDir.isDirectory()
-        assert gradleScript.exists()
-        assert !testFile.exists()
-        assert !downloadCalled
-    }
-
-    @Test public void testCreateDistWithExistingZipAndDistAndAlwaysDownloadTrue() {
-        install = new Install(true, false, createDownloadMock(), createPathAssemblerMock())
-        createTestZip().renameTo(zipDestination)
-        distributionDir.mkdirs()
-        File testFile = new File(gradleHomeDir, 'testfile')
-        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
-        assert gradleHomeDir.isDirectory()
-        assert gradleScript.exists()
-        assert !testFile.exists()
-        assert downloadCalled
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/PathAssemblerTest.java b/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/PathAssemblerTest.java
deleted file mode 100644
index 8b0cd66..0000000
--- a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/PathAssemblerTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.wrapper;
-
-import org.junit.Test;
-
-import java.io.File;
-import java.net.URI;
-
-import static org.junit.Assert.*;
-
-/**
- * @author Hans Dockter
- */
-public class PathAssemblerTest {
-    public static final String TEST_GRADLE_USER_HOME = "someUserHome";
-    private PathAssembler pathAssembler = new PathAssembler(TEST_GRADLE_USER_HOME);
-
-    @Test
-    public void gradleHomeWithGradleUserHomeBase() throws Exception {
-        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/dist/gradle-0.9-bin.zip"));
-        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9"), gradleHome);
-    }
-
-    @Test
-    public void gradleHomeWithProjectBase() throws Exception {
-        File gradleHome = pathAssembler.gradleHome(PathAssembler.PROJECT_STRING, "somePath", new URI("http://server/dist/gradle-0.9-bin.zip"));
-        assertEquals(file(currentDirPath() + "/somePath/gradle-0.9"), gradleHome);
-    }
-
-    @Test
-    public void gradleHomeForUriWithNoPath() throws Exception {
-        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-0.9-bin.zip"));
-        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9"), gradleHome);
-    }
-
-    @Test
-    public void gradleHomeForSnapshotVersion() throws Exception {
-        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-0.9-some-branch-2010+1100-bin.zip"));
-        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9-some-branch-2010+1100"), gradleHome);
-    }
-
-    @Test
-    public void gradleHomeForUrlWithNoClassifier() throws Exception {
-        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-0.9.zip"));
-        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9"), gradleHome);
-    }
-
-    @Test
-    public void gradleHomeForUrlWithNoVersion() throws Exception {
-        try {
-            pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-bin.zip"));
-            fail();
-        } catch (RuntimeException e) {
-            assertEquals("Cannot determine Gradle version from distribution URL 'http://server/gradle-bin.zip'.", e.getMessage());
-        }
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void gradleHomeWithUnknownBase() throws Exception {
-        pathAssembler.gradleHome("unknownBase", "somePath", new URI("http://server/gradle.zip"));
-    }
-
-    @Test
-    public void distZipWithGradleUserHomeBase() throws Exception {
-        File dist = pathAssembler.distZip(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/dist/gradle.zip"));
-        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle.zip"), dist);
-    }
-
-    @Test
-    public void distZipWithProjectBase() throws Exception {
-        File dist = pathAssembler.distZip(PathAssembler.PROJECT_STRING, "somePath", new URI("http://server/dist/gradle.zip"));
-        assertEquals(file(currentDirPath() + "/somePath/gradle.zip"), dist);
-    }
-
-    @Test(expected = RuntimeException.class)
-    public void distZipWithUnknownBase() throws Exception {
-        pathAssembler.distZip("unknownBase", "somePath", new URI("http://server/dist/gradle.zip"));
-    }
-
-    private File file(String path) {
-        return new File(path);
-    }
-    
-    private String currentDirPath() {
-        return System.getProperty("user.dir");
-    }
-}
diff --git a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/WrapperTest.java b/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/WrapperTest.java
deleted file mode 100644
index 0d17aea..0000000
--- a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/WrapperTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright 2007-2008 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.gradle.wrapper;
-
-import org.gradle.util.JUnit4GroovyMockery;
-import org.gradle.util.SetSystemProperties;
-import org.gradle.util.TemporaryFolder;
-import org.jmock.Expectations;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URI;
-import java.util.Properties;
-
-/**
- * @author Hans Dockter
- */
- at RunWith(org.jmock.integration.junit4.JMock.class)
-public class WrapperTest {
-    Wrapper wrapper;
-    BootstrapMainStarter bootstrapMainStarterMock;
-    Install installMock;
-    final JUnit4Mockery context = new JUnit4GroovyMockery();
-    @Rule
-    public final SetSystemProperties systemProperties = new SetSystemProperties();
-    @Rule
-    public final TemporaryFolder tmpDir = new TemporaryFolder();
-    private File propertiesDir = tmpDir.getDir();
-    private File propertiesFile = new File(propertiesDir, "wrapper.properties");
-
-    @Before
-    public void setUp() throws IOException {
-        wrapper = new Wrapper();
-        bootstrapMainStarterMock = context.mock(BootstrapMainStarter.class);
-        installMock = context.mock(Install.class);
-        Properties testProperties = new Properties();
-        testProperties.load(WrapperTest.class.getResourceAsStream("/org/gradle/wrapper/wrapper.properties"));
-        testProperties.store(new FileOutputStream(propertiesFile), null);
-        System.setProperty(Wrapper.WRAPPER_PROPERTIES_PROPERTY, propertiesFile.getCanonicalPath());
-    }
-
-    @Test
-    public void execute() throws Exception {
-        final String[] expectedArgs = { "arg1", "arg2" };
-        final File expectedGradleHome = new File("somepath");
-        context.checking(new Expectations() {{
-          one(installMock).createDist(
-                  new URI("http://server/test/gradle.zip"),
-                  "testDistBase",
-                  "testDistPath",
-                  "testZipBase",
-                  "testZipPath"
-          ); will(returnValue(expectedGradleHome));
-          one(bootstrapMainStarterMock).start(expectedArgs, expectedGradleHome);
-        }});
-        wrapper.execute(expectedArgs, installMock, bootstrapMainStarterMock);
-    }
-}
diff --git a/subprojects/gradle-wrapper/wrapper.gradle b/subprojects/gradle-wrapper/wrapper.gradle
deleted file mode 100644
index 9ca7d06..0000000
--- a/subprojects/gradle-wrapper/wrapper.gradle
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-apply plugin: 'groovy'
-
-dependencies {
-    groovy libraries.groovy_depends
-    compile project(':core')
-
-    compile libraries.commons_io, libraries.ant, libraries.ant_nodeps
-
-    testCompile project(path: ':core', configuration: 'testFixtures')
-    testRuntime project(path: ':core', configuration: 'testFixturesRuntime')
-}
-
-jar {
-    exclude 'org/gradle/wrapper/**'
-}
-
-task wrapperJar(type: Jar) {
-    dependsOn compileJava, processResources
-    from sourceSets.main.classesDir
-    include 'org/gradle/wrapper/**'
-    archiveName = 'gradle-wrapper.jar'
-    destinationDir = sourceSets.main.classesDir
-    manifest.mainAttributes("Main-Class": 'org.gradle.wrapper.GradleWrapperMain')
-}
-
-classes {
-    dependsOn wrapperJar
-}
diff --git a/subprojects/gradle-idea/idea.gradle b/subprojects/idea/idea.gradle
similarity index 100%
rename from subprojects/gradle-idea/idea.gradle
rename to subprojects/idea/idea.gradle
diff --git a/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaModule.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaModule.groovy
new file mode 100644
index 0000000..7c6cb3c
--- /dev/null
+++ b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaModule.groovy
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.idea
+
+import org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency
+import org.gradle.api.specs.Specs
+import org.gradle.plugins.idea.model.ModuleLibrary
+import org.gradle.plugins.idea.model.Path
+import org.gradle.plugins.idea.model.PathFactory
+import org.gradle.api.tasks.*
+import org.gradle.plugins.idea.model.Module
+import org.gradle.api.artifacts.ProjectDependency
+import org.gradle.api.artifacts.ExternalDependency
+import org.gradle.api.artifacts.ResolvedConfiguration
+import org.gradle.api.artifacts.SelfResolvingDependency
+import org.gradle.api.artifacts.ResolvedDependency
+import org.gradle.api.artifacts.Dependency
+import org.gradle.api.artifacts.Configuration
+
+/**
+ * Generates an IDEA module file.
+ *
+ * @author Hans Dockter
+ */
+public class IdeaModule extends XmlGeneratorTask<Module> {
+    /**
+     * The content root directory of the module.
+     */
+    @InputFiles
+    File moduleDir
+
+    /**
+     * The dirs containing the production sources.
+     */
+    @InputFiles
+    Set<File> sourceDirs
+
+    /**
+     * The dirs containing the test sources.
+     */
+    @InputFiles
+    Set<File> testSourceDirs
+
+    /**
+     * The dirs to be excluded by idea.
+     */
+    @InputFiles
+    Set<File> excludeDirs
+
+    /**
+     * The idea output dir for the production sources. If {@code null} no entry for output dirs is created.
+     */
+    @InputFiles @Optional
+    File outputDir
+
+    /**
+     * The idea output dir for the test sources. If {@code null} no entry for test output dirs is created.
+     */
+    @InputFiles @Optional
+    File testOutputDir
+
+    /**
+     * The JDK to use for this module. If this is {@code null} the value of the existing or default ipr XML (inherited)
+     * is used. If it is set to <code>inherited</code>, the project SDK is used. Otherwise the SDK for the corresponding
+     * value of java version is used for this module
+     */
+    @Input @Optional
+    String javaVersion = org.gradle.plugins.idea.model.Module.INHERITED
+
+    /**
+     * Whether to download and add sources associated with the dependency jars.
+     */
+    @Input
+    boolean downloadSources = true
+
+    /**
+     * Whether to download and add javadoc associated with the dependency jars.
+     */
+    @Input
+    boolean downloadJavadoc = false
+
+    /**
+     * The variables to be used for replacing absolute paths in the iml entries. For example, you might add a
+     * {@code GRADLE_USER_HOME} variable to point to the Gradle user home dir.
+     */
+    Map<String, File> variables = [:]
+
+    /**
+     * The keys of this map are the Intellij scopes. Each key points to another map that has two keys, plus and minus.
+     * The values of those keys are sets of  {@link org.gradle.api.artifacts.Configuration}  objects. The files of the
+     * plus configurations are added minus the files from the minus configurations.
+     */
+    Map<String, Map<String, Configuration>> scopes = [:]
+
+    @Override protected Module create() {
+        return new Module(xmlTransformer, pathFactory)
+    }
+
+    @Override protected void configure(Module module) {
+        module.configure(getContentPath(), getSourcePaths(), getTestSourcePaths(), getExcludePaths(), getOutputPath(), getTestOutputPath(),
+                getDependencies(), javaVersion)
+    }
+
+    protected Path getContentPath() {
+        getPath(project.projectDir)
+    }
+
+    protected Path getOutputPath() {
+        getOutputDir() ? getPath(getOutputDir()) : null
+    }
+
+    protected Path getTestOutputPath() {
+        getTestOutputDir() ? getPath(getTestOutputDir()) : null
+    }
+
+    protected Set getSourcePaths() {
+        getSourceDirs().collect { getPath(it) }
+    }
+
+    protected Set getTestSourcePaths() {
+        getTestSourceDirs().collect { getPath(it) }
+    }
+
+    protected Set getExcludePaths() {
+
+        getExcludeDirs().collect { getPath(it) }
+    }
+
+    protected Set getDependencies() {
+        scopes.keySet().inject([] as LinkedHashSet) {result, scope ->
+            result + (getModuleLibraries(scope) + getModules(scope))
+        }
+    }
+
+    protected Set getModules(String scope) {
+        if (scopes[scope]) {
+            return getScopeDependencies(scopes[scope], { it instanceof ProjectDependency}).collect { ProjectDependency projectDependency ->
+                projectDependency.dependencyProject
+            }.collect { project ->
+                new org.gradle.plugins.idea.model.ModuleDependency(project.name, scope)
+            }
+        }
+        return []
+    }
+
+    protected Set getModuleLibraries(String scope) {
+        if (scopes[scope]) {
+            Set firstLevelDependencies = getScopeDependencies(scopes[scope], { it instanceof ExternalDependency})
+
+            ResolvedConfiguration resolvedConfiguration = project.configurations.detachedConfiguration((firstLevelDependencies as Dependency[])).resolvedConfiguration
+            def allResolvedDependencies = getAllDeps(resolvedConfiguration.firstLevelModuleDependencies)
+
+            Set sourceDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
+                addSourceArtifact(dependency)
+            }
+            Map sourceFiles = downloadSources ? getFiles(sourceDependencies, "sources") : [:]
+
+            Set javadocDependencies = getResolvableDependenciesForAllResolvedDependencies(allResolvedDependencies) { dependency ->
+                addJavadocArtifact(dependency)
+            }
+            Map javadocFiles = downloadJavadoc ? getFiles(javadocDependencies, "javadoc") : [:]
+
+            List moduleLibraries = resolvedConfiguration.getFiles(Specs.SATISFIES_ALL).collect { File binaryFile ->
+                File sourceFile = sourceFiles[binaryFile.name]
+                File javadocFile = javadocFiles[binaryFile.name]
+                new ModuleLibrary([getPath(binaryFile)] as Set, javadocFile ? [getPath(javadocFile)] as Set : [] as Set, sourceFile ? [getPath(sourceFile)] as Set : [] as Set, [] as Set, scope)
+            }
+            moduleLibraries.addAll(getSelfResolvingFiles(getScopeDependencies(scopes[scope],
+                    { it instanceof SelfResolvingDependency && !(it instanceof ProjectDependency)}), scope))
+            return moduleLibraries as LinkedHashSet
+        }
+        return []
+    }
+
+    private def getSelfResolvingFiles(Collection dependencies, String scope) {
+        dependencies.inject([] as LinkedHashSet) { result, SelfResolvingDependency selfResolvingDependency ->
+            result.addAll(selfResolvingDependency.resolve().collect { File file ->
+                new ModuleLibrary([getPath(file)] as Set, [] as Set, [] as Set, [] as Set, scope)
+            })
+            result
+        }
+    }
+
+    private Set getScopeDependencies(Map<String, Configuration> configurations, Closure filter) {
+        Set firstLevelDependencies = new LinkedHashSet()
+        configurations.plus.each { Configuration configuration ->
+            firstLevelDependencies.addAll(configuration.getAllDependencies().findAll(filter))
+        }
+        configurations.minus.each { Configuration configuration ->
+            configuration.getAllDependencies().findAll(filter).each { minusDep ->
+                // This deals with dependencies that are defined in different scopes with different
+                // artifacts. Right now we accept the fact, that in such a situation some artifacts
+                // might be duplicated in Idea (they live in different scopes then). 
+                if (minusDep instanceof ExternalDependency) {
+                    ExternalDependency removeCandidate = firstLevelDependencies.find { it == minusDep }
+                    if (removeCandidate && removeCandidate.artifacts == minusDep.artifacts) {
+                        firstLevelDependencies.remove(removeCandidate)
+                    }
+                } else {
+                    firstLevelDependencies.remove(minusDep)
+                }
+            }
+        }
+        return firstLevelDependencies
+    }
+
+    private def getFiles(Set dependencies, String classifier) {
+        return project.configurations.detachedConfiguration((dependencies as Dependency[])).files.inject([:]) { result, sourceFile ->
+            String key = sourceFile.name.replace("-${classifier}.jar", '.jar')
+            result[key] = sourceFile
+            result
+        }
+    }
+
+    private List getResolvableDependenciesForAllResolvedDependencies(Set allResolvedDependencies, Closure configureClosure) {
+        return allResolvedDependencies.collect { ResolvedDependency resolvedDependency ->
+            def dependency = new DefaultExternalModuleDependency(resolvedDependency.moduleGroup, resolvedDependency.moduleName, resolvedDependency.moduleVersion,
+                    resolvedDependency.configuration)
+            dependency.transitive = false
+            configureClosure.call(dependency)
+            dependency
+        }
+    }
+
+    protected Set getAllDeps(Set deps, Set allDeps = []) {
+        deps.each { ResolvedDependency resolvedDependency ->
+            def notSeenBefore = allDeps.add(resolvedDependency)
+            if (notSeenBefore) { // defend against circular dependencies
+                getAllDeps(resolvedDependency.children, allDeps)
+            }
+        }
+        allDeps
+    }
+
+    protected def addSourceArtifact(DefaultExternalModuleDependency dependency) {
+        dependency.artifact { artifact ->
+            artifact.name = dependency.name
+            artifact.type = 'source'
+            artifact.extension = 'jar'
+            artifact.classifier = 'sources'
+        }
+    }
+
+    protected def addJavadocArtifact(DefaultExternalModuleDependency dependency) {
+        dependency.artifact { artifact ->
+            artifact.name = dependency.name
+            artifact.type = 'javadoc'
+            artifact.extension = 'jar'
+            artifact.classifier = 'javadoc'
+        }
+    }
+
+    protected Path getPath(File file) {
+        return pathFactory.path(file)
+    }
+
+    protected PathFactory getPathFactory() {
+        PathFactory factory = new PathFactory()
+        factory.addPathVariable('MODULE_DIR', getOutputFile().parentFile)
+        variables.each { key, value ->
+            factory.addPathVariable(key, value)
+        }
+        return factory
+    }
+}
\ No newline at end of file
diff --git a/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaPlugin.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaPlugin.groovy
new file mode 100644
index 0000000..ef37623
--- /dev/null
+++ b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaPlugin.groovy
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.idea;
+
+
+import org.gradle.api.JavaVersion
+import org.gradle.api.Project
+import org.gradle.api.internal.plugins.IdePlugin
+import org.gradle.api.plugins.JavaPlugin
+
+/**
+ * @author Hans Dockter
+ *
+ * When applied to a project, this plugin add one IdeaModule task. If the project is the root project, the plugin
+ * adds also an IdeaProject task.
+ *
+ * If the java plugin is or has been added to a project where this plugin is applied to, the IdeaModule task gets some
+ * Java specific configuration.
+ */
+class IdeaPlugin extends IdePlugin {
+    @Override protected String getLifecycleTaskName() {
+        return 'idea'
+    }
+
+    @Override protected void onApply(Project project) {
+        lifecycleTask.description = 'Generates IDEA project files (IML, IPR, IWS)'
+        cleanTask.description = 'Cleans IDEA project files (IML, IPR)'
+        configureIdeaWorkspace(project)
+        configureIdeaProject(project)
+        configureIdeaModule(project)
+        configureForJavaPlugin(project)
+    }
+
+    private def configureIdeaWorkspace(Project project) {
+        if (isRoot(project)) {
+            def task = project.task('ideaWorkspace', description: 'Generates an IDEA workspace file (IWS)', type: IdeaWorkspace) {
+                outputFile = new File(project.projectDir, project.name + ".iws")
+            }
+            addWorker(task)
+        }
+    }
+
+    private def configureIdeaModule(Project project) {
+        def task = project.task('ideaModule', description: 'Generates IDEA module files (IML)', type: IdeaModule) {
+            conventionMapping.outputFile = { new File(project.projectDir, project.name + ".iml") }
+            conventionMapping.moduleDir = { project.projectDir }
+            conventionMapping.sourceDirs = { [] as LinkedHashSet }
+            conventionMapping.excludeDirs = { [project.buildDir, project.file('.gradle')] as LinkedHashSet }
+            conventionMapping.testSourceDirs = { [] as LinkedHashSet }
+        }
+        addWorker(task)
+    }
+
+    private def configureIdeaProject(Project project) {
+        if (isRoot(project)) {
+            def task = project.task('ideaProject', description: 'Generates IDEA project file (IPR)', type: IdeaProject) {
+                outputFile = new File(project.projectDir, project.name + ".ipr")
+                subprojects = project.rootProject.allprojects
+                javaVersion = JavaVersion.VERSION_1_6.toString()
+                wildcards = ['!?*.java', '!?*.groovy']
+            }
+            addWorker(task)
+        }
+    }
+
+    private def configureForJavaPlugin(Project project) {
+        project.plugins.withType(JavaPlugin) {
+            configureIdeaProjectForJava(project)
+            configureIdeaModuleForJava(project)
+        }
+    }
+
+    private def configureIdeaProjectForJava(Project project) {
+        if (isRoot(project)) {
+            project.ideaProject {
+                javaVersion = project.sourceCompatibility
+            }
+        }
+    }
+
+    private def configureIdeaModuleForJava(Project project) {
+        project.ideaModule {
+            conventionMapping.sourceDirs = { project.sourceSets.main.allSource.sourceTrees.srcDirs.flatten() as LinkedHashSet }
+            conventionMapping.testSourceDirs = { project.sourceSets.test.allSource.sourceTrees.srcDirs.flatten() as LinkedHashSet }
+            conventionMapping.outputDir = { new File("$project.projectDir/out/production/$project.name") }
+            conventionMapping.testOutputDir = { new File("$project.projectDir/out/test/$project.name") }
+            def configurations = project.configurations
+            scopes = [
+                    COMPILE: [plus: [configurations.compile], minus: []],
+                    RUNTIME: [plus: [configurations.runtime], minus: [configurations.compile]],
+                    TEST: [plus: [configurations.testRuntime], minus: [configurations.runtime]]
+            ]
+        }
+    }
+
+    private boolean isRoot(Project project) {
+        return project.parent == null
+    }
+}
+
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaProject.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaProject.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaProject.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaProject.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaWorkspace.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaWorkspace.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/IdeaWorkspace.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/IdeaWorkspace.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Dependency.java b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Dependency.java
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Dependency.java
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Dependency.java
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/JarDirectory.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/JarDirectory.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/JarDirectory.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/JarDirectory.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Jdk.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Jdk.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Jdk.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Jdk.groovy
diff --git a/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Module.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Module.groovy
new file mode 100644
index 0000000..27fefd9
--- /dev/null
+++ b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Module.groovy
@@ -0,0 +1,317 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.idea.model
+
+import org.gradle.api.internal.XmlTransformer
+import org.gradle.api.internal.tasks.generator.XmlPersistableConfigurationObject
+
+/**
+ * Represents the customizable elements of an iml (via XML hooks everything of the iml is customizable).
+ *
+ * @author Hans Dockter
+ */
+class Module extends XmlPersistableConfigurationObject {
+    static final String INHERITED = "inherited"
+
+    /**
+     * The dir for the content root of the module.  Defaults to the projectDir for the project.  If null,
+     * the directory that contains the output file will be used.
+     */
+    Path contentPath;
+
+    /**
+     * The foldes for the production code. Must not be null.
+     */
+    Set sourceFolders = [] as LinkedHashSet
+
+    /**
+     * The folders for the test code. Must not be null.
+     */
+    Set testSourceFolders = [] as LinkedHashSet
+
+    /**
+     * Folders to be excluded. Must not be null.
+     */
+    Set excludeFolders = [] as LinkedHashSet
+
+    /**
+     * The dir for the production source classes. If null this output dir element is not added.
+     */
+    Path outputDir
+
+    /**
+     * The dir for the compiled test source classes. If null this output element is not added.
+     */
+    Path testOutputDir
+
+    /**
+     * The dependencies of this module. Must not be null. Has instances of type    {@link Dependency}   .
+     */
+    Set dependencies = [] as LinkedHashSet
+
+    String javaVersion
+
+    private final PathFactory pathFactory
+
+    def Module(XmlTransformer withXmlActions, PathFactory pathFactory) {
+        super(withXmlActions)
+        this.pathFactory = pathFactory
+    }
+
+    @Override protected String getDefaultResourceName() {
+        return 'defaultModule.xml'
+    }
+
+    @Override protected void load(Node xml) {
+        readJdkFromXml()
+        readSourceAndExcludeFolderFromXml()
+        readOutputDirsFromXml()
+        readDependenciesFromXml()
+    }
+
+    private def readJdkFromXml() {
+        def jdk = findOrderEntries().find { it. at type == 'jdk' }
+        if (jdk) {
+            this.javaVersion = jdk. at jdkName
+        } else {
+            this.javaVersion = INHERITED
+        }
+    }
+
+    private def readOutputDirsFromXml() {
+        def outputDirUrl = findOutputDir()?. at url
+        def testOutputDirUrl = findTestOutputDir()?. at url
+        this.outputDir = outputDirUrl ? pathFactory.path(outputDirUrl) : null
+        this.testOutputDir = testOutputDirUrl ? pathFactory.path(testOutputDirUrl) : null
+    }
+
+    private def readDependenciesFromXml() {
+        return findOrderEntries().each { orderEntry ->
+            switch (orderEntry. at type) {
+                case "module-library":
+                    Set classes = orderEntry.library.CLASSES.root.collect {
+                        pathFactory.path(it. at url)
+                    }
+                    Set javadoc = orderEntry.library.JAVADOC.root.collect {
+                        pathFactory.path(it. at url)
+                    }
+                    Set sources = orderEntry.library.SOURCES.root.collect {
+                        pathFactory.path(it. at url)
+                    }
+                    Set jarDirectories = orderEntry.library.jarDirectory.collect { new JarDirectory(pathFactory.path(it. at url), Boolean.parseBoolean(it. at recursive)) }
+                    def moduleLibrary = new ModuleLibrary(classes, javadoc, sources, jarDirectories, orderEntry. at scope)
+                    dependencies.add(moduleLibrary)
+                    break
+                case "module":
+                    dependencies.add(new ModuleDependency(orderEntry.@'module-name', orderEntry. at scope))
+            }
+        }
+    }
+
+    private def readSourceAndExcludeFolderFromXml() {
+        findSourceFolder().each { sourceFolder ->
+            if (sourceFolder. at isTestSource == 'false') {
+                this.sourceFolders.add(pathFactory.path(sourceFolder. at url))
+            } else {
+                this.testSourceFolders.add(pathFactory.path(sourceFolder. at url))
+            }
+        }
+        findExcludeFolder().each { excludeFolder ->
+            this.excludeFolders.add(pathFactory.path(excludeFolder. at url))
+        }
+    }
+
+    def configure(Path contentPath, Set sourceFolders, Set testSourceFolders, Set excludeFolders, Path outputDir, Path testOutputDir, Set dependencies,
+                  String javaVersion) {
+        this.contentPath = contentPath
+        this.sourceFolders.addAll(sourceFolders);
+        this.testSourceFolders.addAll(testSourceFolders);
+        this.excludeFolders.addAll(excludeFolders);
+        if (outputDir) {
+            this.outputDir = outputDir
+        }
+        if (testOutputDir) {
+            this.testOutputDir = testOutputDir;
+        }
+        this.dependencies = dependencies; // overwrite rather than append dependencies
+        if (javaVersion) {
+            this.javaVersion = javaVersion
+        }
+    }
+
+    @Override protected void store(Node xml) {
+        addJdkToXml()
+        setContentURL()
+        removeSourceAndExcludeFolderFromXml()
+        addSourceAndExcludeFolderToXml()
+        addOutputDirsToXml()
+
+        removeDependenciesFromXml()
+        addDependenciesToXml()
+    }
+
+    private def addJdkToXml() {
+        assert javaVersion != null
+        Node moduleJdk = findOrderEntries().find { it. at type == 'jdk' }
+        if (javaVersion != INHERITED) {
+            Node inheritedJdk = findOrderEntries().find { it. at type == "inheritedJdk" }
+            if (inheritedJdk) {
+                inheritedJdk.parent().remove(inheritedJdk)
+            }
+            if (moduleJdk) {
+                findNewModuleRootManager().remove(moduleJdk)
+            }
+            findNewModuleRootManager().appendNode("orderEntry", [type: "jdk", jdkName: javaVersion, jdkType: "JavaSDK"])
+        } else if (!(findOrderEntries().find { it. at type == "inheritedJdk" })) {
+            if (moduleJdk) {
+                findNewModuleRootManager().remove(moduleJdk)
+            }
+            findNewModuleRootManager().appendNode("orderEntry", [type: "inheritedJdk"])
+        }
+    }
+
+    private def setContentURL() {
+        if (contentPath != null) {
+            findContent(). at url = contentPath.url
+        }
+    }
+
+    private def addOutputDirsToXml() {
+        if (outputDir) {
+            findOrCreateOutputDir(). at url = outputDir.url
+        }
+        if (testOutputDir) {
+            findOrCreateTestOutputDir(). at url = testOutputDir.url
+        }
+    }
+
+    private Node findOrCreateOutputDir() {
+        return findOutputDir() ?: findNewModuleRootManager().appendNode("output")
+    }
+
+    private Node findOrCreateTestOutputDir() {
+        return findTestOutputDir() ?: findNewModuleRootManager().appendNode("output-test")
+    }
+
+    private Set addDependenciesToXml() {
+        return dependencies.each { Dependency dependency ->
+            dependency.addToNode(findNewModuleRootManager())
+        }
+    }
+
+    private def addSourceAndExcludeFolderToXml() {
+        sourceFolders.each { Path path ->
+            findContent().appendNode('sourceFolder', [url: path.url, isTestSource: 'false'])
+        }
+        testSourceFolders.each { Path path ->
+            findContent().appendNode('sourceFolder', [url: path.url, isTestSource: 'true'])
+        }
+        excludeFolders.each { Path path ->
+            findContent().appendNode('excludeFolder', [url: path.url])
+        }
+    }
+
+    private def removeSourceAndExcludeFolderFromXml() {
+        findSourceFolder().each { sourceFolder ->
+            findContent().remove(sourceFolder)
+        }
+        findExcludeFolder().each { excludeFolder ->
+            findContent().remove(excludeFolder)
+        }
+    }
+
+    private def removeDependenciesFromXml() {
+        return findOrderEntries().each { orderEntry ->
+            if (isDependencyOrderEntry(orderEntry)) {
+                findNewModuleRootManager().remove(orderEntry)
+            }
+        }
+    }
+
+    protected boolean isDependencyOrderEntry(def orderEntry) {
+        ['module-library', 'module'].contains(orderEntry. at type)
+    }
+
+    private Node findContent() {
+        findNewModuleRootManager().content[0]
+    }
+
+    private def findSourceFolder() {
+        return findContent().sourceFolder
+    }
+
+    private def findExcludeFolder() {
+        return findContent().excludeFolder
+    }
+
+    private Node findOutputDir() {
+        return findNewModuleRootManager().output[0]
+    }
+
+    private Node findNewModuleRootManager() {
+        return xml.component.find { it. at name == 'NewModuleRootManager'}
+    }
+
+    private Node findTestOutputDir() {
+        return findNewModuleRootManager().'output-test'[0]
+    }
+
+    private def findOrderEntries() {
+        return findNewModuleRootManager().orderEntry
+    }
+
+
+    boolean equals(o) {
+        if (this.is(o)) { return true }
+
+        if (getClass() != o.class) { return false }
+
+        Module module = (Module) o;
+
+        if (dependencies != module.dependencies) { return false }
+        if (excludeFolders != module.excludeFolders) { return false }
+        if (outputDir != module.outputDir) { return false }
+        if (sourceFolders != module.sourceFolders) { return false }
+        if (testOutputDir != module.testOutputDir) { return false }
+        if (testSourceFolders != module.testSourceFolders) { return false }
+
+        return true;
+    }
+
+    int hashCode() {
+        int result;
+
+        result = (sourceFolders != null ? sourceFolders.hashCode() : 0);
+        result = 31 * result + (testSourceFolders != null ? testSourceFolders.hashCode() : 0);
+        result = 31 * result + (excludeFolders != null ? excludeFolders.hashCode() : 0);
+        result = 31 * result + outputDir.hashCode();
+        result = 31 * result + testOutputDir.hashCode();
+        result = 31 * result + (dependencies != null ? dependencies.hashCode() : 0);
+        return result;
+    }
+
+
+    public String toString() {
+        return "Module{" +
+                "dependencies=" + dependencies +
+                ", sourceFolders=" + sourceFolders +
+                ", testSourceFolders=" + testSourceFolders +
+                ", excludeFolders=" + excludeFolders +
+                ", outputDir=" + outputDir +
+                ", testOutputDir=" + testOutputDir +
+                '}';
+    }
+}
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleDependency.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleDependency.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleDependency.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleDependency.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleLibrary.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleLibrary.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleLibrary.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/ModuleLibrary.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/ModulePath.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/ModulePath.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/ModulePath.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/ModulePath.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Path.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Path.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Path.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Path.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/PathFactory.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/PathFactory.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/PathFactory.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/PathFactory.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Project.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Project.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Project.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Project.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Workspace.groovy b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Workspace.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/Workspace.groovy
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/Workspace.groovy
diff --git a/subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/package-info.java b/subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/package-info.java
similarity index 100%
rename from subprojects/gradle-idea/src/main/groovy/org/gradle/plugins/idea/model/package-info.java
rename to subprojects/idea/src/main/groovy/org/gradle/plugins/idea/model/package-info.java
diff --git a/subprojects/gradle-idea/src/main/resources/META-INF/gradle-plugins/idea.properties b/subprojects/idea/src/main/resources/META-INF/gradle-plugins/idea.properties
similarity index 100%
rename from subprojects/gradle-idea/src/main/resources/META-INF/gradle-plugins/idea.properties
rename to subprojects/idea/src/main/resources/META-INF/gradle-plugins/idea.properties
diff --git a/subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/model/defaultModule.xml b/subprojects/idea/src/main/resources/org/gradle/plugins/idea/model/defaultModule.xml
similarity index 100%
rename from subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/model/defaultModule.xml
rename to subprojects/idea/src/main/resources/org/gradle/plugins/idea/model/defaultModule.xml
diff --git a/subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/model/defaultProject.xml b/subprojects/idea/src/main/resources/org/gradle/plugins/idea/model/defaultProject.xml
similarity index 100%
rename from subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/model/defaultProject.xml
rename to subprojects/idea/src/main/resources/org/gradle/plugins/idea/model/defaultProject.xml
diff --git a/subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/model/defaultWorkspace.xml b/subprojects/idea/src/main/resources/org/gradle/plugins/idea/model/defaultWorkspace.xml
similarity index 100%
rename from subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/model/defaultWorkspace.xml
rename to subprojects/idea/src/main/resources/org/gradle/plugins/idea/model/defaultWorkspace.xml
diff --git a/subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/package-info.java b/subprojects/idea/src/main/resources/org/gradle/plugins/idea/package-info.java
similarity index 100%
rename from subprojects/gradle-idea/src/main/resources/org/gradle/plugins/idea/package-info.java
rename to subprojects/idea/src/main/resources/org/gradle/plugins/idea/package-info.java
diff --git a/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/IdeaPluginTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/IdeaPluginTest.groovy
new file mode 100644
index 0000000..32ea2a1
--- /dev/null
+++ b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/IdeaPluginTest.groovy
@@ -0,0 +1,134 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.idea
+
+import org.gradle.api.JavaVersion
+import org.gradle.api.Project
+import org.gradle.api.Task
+import org.gradle.api.internal.project.DefaultProject
+import org.gradle.api.tasks.Delete
+import org.gradle.util.HelperUtil
+import spock.lang.Specification
+
+/**
+ * @author Hans Dockter
+ */
+class IdeaPluginTest extends Specification {
+    private final DefaultProject project = HelperUtil.createRootProject()
+    private final Project childProject = HelperUtil.createChildProject(project, "child", new File("."))
+    private final IdeaPlugin ideaPlugin = new IdeaPlugin()
+
+    def addsIdeaProjectToRootProject() {
+        when:
+        applyPluginToProjects()
+
+        then:
+        assertThatCleanIdeaDependsOnDeleteTask(project, project.cleanIdeaProject)
+        IdeaProject ideaProjectTask = project.ideaProject
+        ideaProjectTask instanceof IdeaProject
+        ideaProjectTask.outputFile == new File(project.projectDir, project.name + ".ipr")
+        ideaProjectTask.subprojects == project.rootProject.allprojects
+        ideaProjectTask.javaVersion == JavaVersion.VERSION_1_6.toString()
+        ideaProjectTask.wildcards == ['!?*.java', '!?*.groovy'] as Set
+
+        childProject.tasks.findByName('ideaProject') == null
+        childProject.tasks.findByName('cleanIdeaProject') == null
+    }
+
+    def addsIdeaWorkspaceToRootProject() {
+        when:
+        applyPluginToProjects()
+
+        then:
+        project.ideaWorkspace instanceof IdeaWorkspace
+        assertThatCleanIdeaDependsOnDeleteTask(project, project.cleanIdeaWorkspace)
+
+        childProject.tasks.findByName('ideaWorkspace') == null
+        childProject.tasks.findByName('cleanIdeaWorkspace') == null
+    }
+
+    def addsIdeaModuleToProjects() {
+        when:
+        applyPluginToProjects()
+
+        then:
+        assertThatIdeaModuleIsProperlyConfigured(project)
+        assertThatIdeaModuleIsProperlyConfigured(childProject)
+    }
+
+    def addsSpecialConfigurationIfJavaPluginIsApplied() {
+        when:
+        applyPluginToProjects()
+        project.apply(plugin: 'java')
+
+        then:
+        project.ideaProject.javaVersion == project.sourceCompatibility.toString()
+
+        IdeaModule ideaModuleTask = project.ideaModule
+        ideaModuleTask.sourceDirs == project.sourceSets.main.allSource.sourceTrees.srcDirs.flatten() as Set
+        ideaModuleTask.testSourceDirs == project.sourceSets.test.allSource.sourceTrees.srcDirs.flatten() as Set
+        ideaModuleTask.outputDir == project.file("out/production/$project.name")
+        ideaModuleTask.testOutputDir == project.file("out/test/$project.name")
+        def configurations = project.configurations
+        ideaModuleTask.scopes == [
+                COMPILE: [plus: [configurations.compile], minus: []],
+                RUNTIME: [plus: [configurations.runtime], minus: [configurations.compile]],
+                TEST: [plus: [configurations.testRuntime], minus: [configurations.runtime]]
+        ]
+    }
+
+    void assertThatIdeaModuleIsProperlyConfigured(Project project) {
+        IdeaModule ideaModuleTask = project.ideaModule
+        assert ideaModuleTask instanceof IdeaModule
+        assert ideaModuleTask.outputFile == new File(project.projectDir, project.name + ".iml")
+        assert ideaModuleTask.moduleDir == project.projectDir
+        assert ideaModuleTask.sourceDirs == [] as Set
+        assert ideaModuleTask.testSourceDirs == [] as Set
+        assert ideaModuleTask.excludeDirs == [project.buildDir, project.file('.gradle')] as Set
+        assert ideaModuleTask.variables == [:]
+        assertThatCleanIdeaDependsOnDeleteTask(project, project.cleanIdeaModule)
+    }
+
+    void shouldPickUpLateChangesToBuildDir() {
+        when:
+        applyPluginToProjects()
+        project.apply(plugin: 'java')
+        project.buildDir = project.file('target')
+
+        then:
+        project.ideaModule.excludeDirs == [project.buildDir, project.file('.gradle')] as Set
+        project.ideaModule.outputDir == project.file("out/production/$project.name")
+    }
+
+    void assertThatCleanIdeaDependsOnDeleteTask(Project project, Task dependsOnTask) {
+        assert dependsOnTask instanceof Delete
+        assert project.cleanIdea.taskDependencies.getDependencies(project.cleanIdea).contains(dependsOnTask)
+    }
+
+    def addsCleanIdeaToProjects() {
+        when:
+        applyPluginToProjects()
+
+        then:
+        project.cleanIdea instanceof Task
+        childProject.cleanIdea instanceof Task
+    }
+
+    private def applyPluginToProjects() {
+        ideaPlugin.apply(project)
+        ideaPlugin.apply(childProject)
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleDependencyTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleDependencyTest.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleDependencyTest.groovy
rename to subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleDependencyTest.groovy
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleLibraryTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleLibraryTest.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleLibraryTest.groovy
rename to subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleLibraryTest.groovy
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModulePathTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModulePathTest.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ModulePathTest.groovy
rename to subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModulePathTest.groovy
diff --git a/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleTest.groovy
new file mode 100644
index 0000000..7f411e1
--- /dev/null
+++ b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ModuleTest.groovy
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.idea.model
+
+import org.gradle.api.internal.XmlTransformer
+import spock.lang.Specification
+
+/**
+ * @author Hans Dockter
+ */
+class ModuleTest extends Specification {
+    final PathFactory pathFactory = new PathFactory()
+    final XmlTransformer xmlTransformer = new XmlTransformer()
+    final customSourceFolders = [path('file://$MODULE_DIR$/src')] as LinkedHashSet
+    final customTestSourceFolders = [path('file://$MODULE_DIR$/srcTest')] as LinkedHashSet
+    final customExcludeFolders = [path('file://$MODULE_DIR$/target')] as LinkedHashSet
+    final customDependencies = [
+            new ModuleLibrary([path('file://$MODULE_DIR$/gradle/lib')] as Set,
+                    [path('file://$MODULE_DIR$/gradle/javadoc')] as Set, [path('file://$MODULE_DIR$/gradle/src')] as Set,
+                    [] as Set, null),
+            new ModuleLibrary([path('file://$MODULE_DIR$/ant/lib'), path('jar://$GRADLE_CACHE$/gradle.jar!/')] as Set, [] as Set, [] as Set,
+                    [new JarDirectory(path('file://$MODULE_DIR$/ant/lib'), false)] as Set, "RUNTIME"),
+            new ModuleDependency('someModule', null)]
+
+    Module module = new Module(xmlTransformer, pathFactory)
+
+    def loadFromReader() {
+        when:
+        module.load(customModuleReader)
+
+        then:
+        module.javaVersion == "1.6"
+        module.sourceFolders == customSourceFolders
+        module.testSourceFolders == customTestSourceFolders
+        module.excludeFolders == customExcludeFolders
+        module.outputDir == path('file://$MODULE_DIR$/out')
+        module.testOutputDir == path('file://$MODULE_DIR$/outTest')
+        (module.dependencies as List) == customDependencies
+    }
+
+    def configureOverwritesDependenciesAndAppendsAllOtherEntries() {
+        def constructorSourceFolders = [path('a')] as Set
+        def constructorTestSourceFolders = [path('b')] as Set
+        def constructorExcludeFolders = [path('c')] as Set
+        def constructorOutputDir = path('someOut')
+        def constructorJavaVersion = '1.6'
+        def constructorTestOutputDir = path('someTestOut')
+        def constructorModuleDependencies = [
+                customDependencies[0],
+                new ModuleLibrary([path('x')], [], [], [new JarDirectory(path('y'), false)], null)] as LinkedHashSet
+
+        when:
+        module.load(customModuleReader)
+        module.configure(null, constructorSourceFolders, constructorTestSourceFolders, constructorExcludeFolders, constructorOutputDir, constructorTestOutputDir, constructorModuleDependencies, constructorJavaVersion)
+
+        then:
+        module.sourceFolders == customSourceFolders + constructorSourceFolders
+        module.testSourceFolders == customTestSourceFolders + constructorTestSourceFolders
+        module.excludeFolders == customExcludeFolders + constructorExcludeFolders
+        module.outputDir == constructorOutputDir
+        module.testOutputDir == constructorTestOutputDir
+        module.javaVersion == constructorJavaVersion
+        module.dependencies == constructorModuleDependencies
+    }
+
+    def loadDefaults() {
+        when:
+        module.loadDefaults()
+
+        then:
+        module.javaVersion == Module.INHERITED
+        module.sourceFolders == [] as Set
+        module.dependencies.size() == 0
+    }
+
+    def generatedXmlShouldContainCustomValues() {
+        def constructorSourceFolders = [new Path('a')] as Set
+        def constructorOutputDir = new Path('someOut')
+        def constructorTestOutputDir = new Path('someTestOut')
+
+        when:
+        module.loadDefaults()
+        module.configure(null, constructorSourceFolders, [] as Set, [] as Set, constructorOutputDir, constructorTestOutputDir, [] as Set, null)
+        def xml = toXmlReader
+        def newModule = new Module(xmlTransformer, pathFactory)
+        newModule.load(xml)
+
+        then:
+        this.module == newModule
+    }
+
+    private InputStream getToXmlReader() {
+        ByteArrayOutputStream toXmlText = new ByteArrayOutputStream()
+        module.store(toXmlText)
+        return new ByteArrayInputStream(toXmlText.toByteArray())
+    }
+
+    private InputStream getCustomModuleReader() {
+        return getClass().getResourceAsStream('customModule.xml')
+    }
+
+    private Path path(String url) {
+        pathFactory.path(url)
+    }
+}
\ No newline at end of file
diff --git a/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/PathFactoryTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/PathFactoryTest.groovy
new file mode 100644
index 0000000..c0c611a
--- /dev/null
+++ b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/PathFactoryTest.groovy
@@ -0,0 +1,170 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.plugins.idea.model
+
+import org.gradle.util.TemporaryFolder
+import org.junit.Rule
+import spock.lang.Specification
+import org.gradle.util.TestFile
+
+class PathFactoryTest extends Specification {
+    @Rule TemporaryFolder tmpDir = new TemporaryFolder()
+    final PathFactory factory = new PathFactory()
+
+    def createsPathForAFileUnderARootDir() {
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+        def path = factory.path(tmpDir.file('a', 'b'))
+        path.url == 'file://$ROOT_DIR$/a/b'
+    }
+
+    def createsPathForAFileNotUnderARootDir() {
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+        def file = tmpDir.dir.parentFile.file('a')
+        def relpath = relpath(file)
+
+        expect:
+        def path = factory.path(file)
+        path.url == "file://$relpath"
+    }
+
+    def usesTheClosestAncestorRootDirForAFileUnderMultipleRootDirs() {
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+        factory.addPathVariable('SUB_DIR', tmpDir.file('sub'))
+
+        expect:
+        def path = factory.path(tmpDir.file('sub', 'a'))
+        path.url == 'file://$SUB_DIR$/a'
+    }
+
+    def createsPathForARootDir() {
+        factory.addPathVariable('SUB_DIR', tmpDir.file('sub'))
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+        def rootDir = factory.path(tmpDir.dir)
+        rootDir.url == 'file://$ROOT_DIR$/'
+
+        def subDir = factory.path(tmpDir.file('sub'))
+        subDir.url == 'file://$SUB_DIR$/'
+    }
+
+    def createsPathForAJarFile() {
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+        def path = factory.path(tmpDir.file('a.jar'))
+        path.url == 'jar://$ROOT_DIR$/a.jar!/'
+    }
+
+    def createsRelativePath() {
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+        def path = factory.relativePath('ROOT_DIR', tmpDir.file('a/b'))
+        path.url == 'file://$ROOT_DIR$/a/b'
+
+        def parentPath = factory.relativePath('ROOT_DIR', tmpDir.dir.parentFile.parentFile.file('a/b'))
+        parentPath.url == 'file://$ROOT_DIR$/../../a/b'
+    }
+    
+    def createsPathForAFileUrl() {
+        expect:
+        def path = factory.path('file://a/b/c')
+        path.url == 'file://a/b/c'
+    }
+
+    def createsPathForAJarUrl() {
+        expect:
+        def path = factory.path('jar://a/b/c.jar!/some/entry')
+        path.url == 'jar://a/b/c.jar!/some/entry'
+    }
+
+    def createsPathForAUrlWithUnknownScheme() {
+        expect:
+        def path = factory.path('other:abc')
+        path.url == 'other:abc'
+    }
+
+    def createsPathForAUrlWithPathVariables() {
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+        def path = factory.path('file://$ROOT_DIR$/c')
+        path.url == 'file://$ROOT_DIR$/c'
+    }
+
+    def filePathsAreEqualWhenTheyPointToTheSameFile() {
+        TestFile subDir = tmpDir.file('sub')
+        TestFile childFile = tmpDir.file('sub/a/b')
+
+        factory.addPathVariable('SUB_DIR', subDir)
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+
+        // Using files
+        factory.path(subDir) == factory.path(subDir)
+        factory.path(childFile) == factory.path(childFile)
+        factory.path(childFile) != factory.path(subDir)
+
+        // Using normalised absolute urls
+        factory.path(subDir) == factory.path("file://${relpath(subDir)}")
+        factory.path(subDir) == factory.path("file://${relpath(childFile)}/../..")
+        factory.path("file://${relpath(subDir)}") != factory.path("file://${relpath(childFile)}")
+
+        // Using absolute paths
+        factory.path(subDir) == factory.path("file://${subDir.absolutePath}")
+
+        // Using replacement variables
+        factory.path(childFile) == factory.path('file://$SUB_DIR$/a/b')
+        factory.path(childFile) == factory.path('file://$SUB_DIR$/c/../a/b')
+        factory.path('file://$ROOT_DIR$/sub') == factory.path('file://$SUB_DIR$')
+        factory.path('file://$ROOT_DIR$') != factory.path('file://$SUB_DIR$')
+    }
+
+    def filePathsAreEqualWhenTheyPointToTheSameEntryInTheSameFile() {
+        TestFile subDir = tmpDir.file('sub')
+        TestFile childFile = tmpDir.file('sub/a/b.jar')
+
+        factory.addPathVariable('SUB_DIR', subDir)
+        factory.addPathVariable('ROOT_DIR', tmpDir.dir)
+
+        expect:
+
+        // Using files
+        factory.path(childFile) == factory.path(childFile)
+        factory.path(childFile) != factory.path(subDir)
+
+        // Using normalised absolute urls
+        factory.path(childFile) == factory.path("jar://${relpath(childFile)}!/")
+        factory.path("jar://${relpath(childFile)}!/entry") == factory.path("jar://${relpath(childFile)}!/entry")
+        factory.path(childFile) != factory.path("jar://${relpath(childFile)}!/entry")
+
+        // Using replacement variables
+        factory.path(childFile) == factory.path('jar://$SUB_DIR$/a/b.jar!/')
+        factory.path(childFile) == factory.path('jar://$SUB_DIR$/c/../a/b.jar!/')
+
+        factory.path(childFile) != factory.path('jar://$SUB_DIR$/a/b.jar')
+        factory.path(childFile) != factory.path("file://${relpath(childFile)}")
+    }
+
+    private String relpath(File file) {
+        return file.absolutePath.replace(File.separator, '/')
+    }
+
+}
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/PathTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/PathTest.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/PathTest.groovy
rename to subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/PathTest.groovy
diff --git a/subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ProjectTest.groovy b/subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ProjectTest.groovy
similarity index 100%
rename from subprojects/gradle-idea/src/test/groovy/org/gradle/plugins/idea/model/ProjectTest.groovy
rename to subprojects/idea/src/test/groovy/org/gradle/plugins/idea/model/ProjectTest.groovy
diff --git a/subprojects/gradle-idea/src/test/resources/org/gradle/plugins/idea/model/customModule.xml b/subprojects/idea/src/test/resources/org/gradle/plugins/idea/model/customModule.xml
similarity index 100%
rename from subprojects/gradle-idea/src/test/resources/org/gradle/plugins/idea/model/customModule.xml
rename to subprojects/idea/src/test/resources/org/gradle/plugins/idea/model/customModule.xml
diff --git a/subprojects/gradle-idea/src/test/resources/org/gradle/plugins/idea/model/customProject.xml b/subprojects/idea/src/test/resources/org/gradle/plugins/idea/model/customProject.xml
similarity index 100%
rename from subprojects/gradle-idea/src/test/resources/org/gradle/plugins/idea/model/customProject.xml
rename to subprojects/idea/src/test/resources/org/gradle/plugins/idea/model/customProject.xml
diff --git a/subprojects/gradle-idea/src/test/resources/org/gradle/plugins/idea/model/customWorkspace.xml b/subprojects/idea/src/test/resources/org/gradle/plugins/idea/model/customWorkspace.xml
similarity index 100%
rename from subprojects/gradle-idea/src/test/resources/org/gradle/plugins/idea/model/customWorkspace.xml
rename to subprojects/idea/src/test/resources/org/gradle/plugins/idea/model/customWorkspace.xml
diff --git a/subprojects/gradle-jetty/jetty.gradle b/subprojects/jetty/jetty.gradle
similarity index 100%
rename from subprojects/gradle-jetty/jetty.gradle
rename to subprojects/jetty/jetty.gradle
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/AbstractJettyRunTask.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/AbstractJettyRunTask.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/AbstractJettyRunTask.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/AbstractJettyRunTask.java
diff --git a/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPlugin.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPlugin.java
new file mode 100644
index 0000000..2d7353b
--- /dev/null
+++ b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPlugin.java
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.jetty;
+
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.internal.IConventionAware;
+import org.gradle.api.plugins.Convention;
+import org.gradle.api.plugins.JavaPluginConvention;
+import org.gradle.api.plugins.WarPlugin;
+import org.gradle.api.plugins.WarPluginConvention;
+import org.gradle.api.tasks.ConventionValue;
+import org.gradle.api.tasks.SourceSet;
+import org.gradle.api.tasks.bundling.War;
+
+import java.io.File;
+
+/**
+ * <p>A {@link Plugin} which extends the {@link WarPlugin} to add tasks which run the web application using an embedded
+ * Jetty web container.</p>
+ *
+ * @author Hans Dockter
+ */
+public class JettyPlugin implements Plugin<Project> {
+    public static final String JETTY_RUN = "jettyRun";
+    public static final String JETTY_RUN_WAR = "jettyRunWar";
+    public static final String JETTY_STOP = "jettyStop";
+
+    public static final String RELOAD_AUTOMATIC = "automatic";
+    public static final String RELOAD_MANUAL = "manual";
+
+    public void apply(Project project) {
+        project.getPlugins().apply(WarPlugin.class);
+        JettyPluginConvention jettyConvention = new JettyPluginConvention();
+        Convention convention = project.getConvention();
+        convention.getPlugins().put("jetty", jettyConvention);
+
+        configureMappingRules(project, jettyConvention);
+        configureJettyRun(project);
+        configureJettyRunWar(project);
+        configureJettyStop(project, jettyConvention);
+    }
+
+    private void configureMappingRules(final Project project, final JettyPluginConvention jettyConvention) {
+        project.getTasks().withType(AbstractJettyRunTask.class, new Action<AbstractJettyRunTask>() {
+            public void execute(AbstractJettyRunTask abstractJettyRunTask) {
+                configureAbstractJettyTask(project, jettyConvention, abstractJettyRunTask);
+            }
+        });
+    }
+
+    private void configureJettyRunWar(final Project project) {
+        project.getTasks().withType(JettyRunWar.class, new Action<JettyRunWar>() {
+            public void execute(JettyRunWar jettyRunWar) {
+                jettyRunWar.dependsOn(WarPlugin.WAR_TASK_NAME);
+                jettyRunWar.getConventionMapping().map("webApp", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return ((War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME)).getArchivePath();
+                    }
+                });
+            }
+        });
+
+        JettyRunWar jettyRunWar = project.getTasks().add(JETTY_RUN_WAR, JettyRunWar.class);
+        jettyRunWar.setDescription("Assembles the webapp into a war and deploys it to Jetty.");
+        jettyRunWar.setGroup(WarPlugin.WEB_APP_GROUP);
+    }
+
+    private void configureJettyStop(Project project, final JettyPluginConvention jettyConvention) {
+        JettyStop jettyStop = project.getTasks().add(JETTY_STOP, JettyStop.class);
+        jettyStop.setDescription("Stops Jetty.");
+        jettyStop.setGroup(WarPlugin.WEB_APP_GROUP);
+        jettyStop.getConventionMapping().map("stopPort", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return jettyConvention.getStopPort();
+            }
+        });
+        jettyStop.getConventionMapping().map("stopKey", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return jettyConvention.getStopKey();
+            }
+        });
+    }
+
+    private void configureJettyRun(final Project project) {
+        project.getTasks().withType(JettyRun.class, new Action<JettyRun>() {
+            public void execute(JettyRun jettyRun) {
+                jettyRun.getConventionMapping().map("webXml", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return getWebXml(project);
+                    }
+                });
+                jettyRun.getConventionMapping().map("classpath", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return getJavaConvention(project).getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
+                    }
+                });
+                jettyRun.getConventionMapping().map("webAppSourceDirectory", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return getWarConvention(project).getWebAppDir();
+                    }
+                });
+            }
+        });
+
+        JettyRun jettyRun = project.getTasks().add(JETTY_RUN, JettyRun.class);
+        jettyRun.setDescription("Uses your files as and where they are and deploys them to Jetty.");
+        jettyRun.setGroup(WarPlugin.WEB_APP_GROUP);
+    }
+
+    private Object getWebXml(Project project) {
+        War war = (War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME);
+        File webXml;
+        if (war.getWebXml() != null) {
+            webXml = war.getWebXml();
+        } else {
+            webXml = new File(getWarConvention(project).getWebAppDir(), "WEB-INF/web.xml");
+        }
+        return webXml;
+    }
+
+    private void configureAbstractJettyTask(final Project project, final JettyPluginConvention jettyConvention, AbstractJettyRunTask jettyTask) {
+        jettyTask.setDaemon(false);
+        jettyTask.setReload(RELOAD_AUTOMATIC);
+        jettyTask.setScanIntervalSeconds(0);
+        jettyTask.getConventionMapping().map("contextPath", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return ((War) project.getTasks().getByName(WarPlugin.WAR_TASK_NAME)).getBaseName();
+            }
+        });
+        jettyTask.getConventionMapping().map("httpPort", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return jettyConvention.getHttpPort();
+            }
+        });
+        jettyTask.getConventionMapping().map("stopPort", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return jettyConvention.getStopPort();
+            }
+        });
+        jettyTask.getConventionMapping().map("stopKey", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return jettyConvention.getStopKey();
+            }
+        });
+    }
+
+    public JavaPluginConvention getJavaConvention(Project project) {
+        return project.getConvention().getPlugin(JavaPluginConvention.class);
+    }
+
+    public WarPluginConvention getWarConvention(Project project) {
+        return project.getConvention().getPlugin(WarPluginConvention.class);
+    }
+}
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPluginConvention.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPluginConvention.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPluginConvention.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyPluginConvention.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRun.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRun.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRun.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRun.java
diff --git a/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRunWar.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRunWar.java
new file mode 100644
index 0000000..98886d5
--- /dev/null
+++ b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyRunWar.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins.jetty;
+
+import org.gradle.api.plugins.jetty.internal.Jetty6PluginServer;
+import org.mortbay.util.Scanner;
+import org.mortbay.xml.XmlConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.gradle.api.tasks.InputFile;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * <p>Deploys a WAR to an embedded Jetty web container.</p>
+ *
+ * <p> Once started, the web container can be configured to run continuously, scanning for changes to the war file and automatically performing a hot redeploy when necessary. </p>
+ */
+public class JettyRunWar extends AbstractJettyRunTask {
+    private static Logger logger = LoggerFactory.getLogger(JettyRunWar.class);
+
+    /**
+     * The location of the war file.
+     */
+    private File webApp;
+
+    public void configureWebApplication() throws Exception {
+        super.configureWebApplication();
+
+        getWebAppConfig().setWar(getWebApp().getCanonicalPath());
+        getWebAppConfig().configure();
+    }
+
+    public void validateConfiguration() {
+    }
+
+    /* (non-Javadoc)
+    * @see org.mortbay.jetty.plugin.util.AbstractJettyTask#configureScanner()
+    */
+    public void configureScanner() {
+        List<File> scanList = new ArrayList<File>();
+        scanList.add(getProject().getBuildFile());
+        scanList.add(getWebApp());
+        getScanner().setScanDirs(scanList);
+
+        ArrayList listeners = new ArrayList();
+        listeners.add(new Scanner.BulkListener() {
+            public void filesChanged(List changes) {
+                try {
+                    boolean reconfigure = changes.contains(getProject().getBuildFile().getCanonicalPath());
+                    restartWebApp(reconfigure);
+                } catch (Exception e) {
+                    logger.error("Error reconfiguring/restarting webapp after change in watched files", e);
+                }
+            }
+        });
+        setScannerListeners(listeners);
+    }
+
+    public void restartWebApp(boolean reconfigureScanner) throws Exception {
+        logger.info("Restarting webapp ...");
+        logger.debug("Stopping webapp ...");
+        getWebAppConfig().stop();
+        logger.debug("Reconfiguring webapp ...");
+
+        validateConfiguration();
+
+        // check if we need to reconfigure the scanner
+        if (reconfigureScanner) {
+            logger.info("Reconfiguring scanner ...");
+            List<File> scanList = new ArrayList<File>();
+            scanList.add(getProject().getBuildFile());
+            scanList.add(getWebApp());
+            getScanner().setScanDirs(scanList);
+        }
+
+        logger.debug("Restarting webapp ...");
+        getWebAppConfig().start();
+        logger.info("Restart completed.");
+    }
+
+    public void finishConfigurationBeforeStart() {
+    }
+
+    /**
+     * Returns the web application to deploy.
+     */
+    @InputFile
+    public File getWebApp() {
+        return webApp;
+    }
+
+    public void setWebApp(File webApp) {
+        this.webApp = webApp;
+    }
+
+    public void applyJettyXml() throws Exception {
+
+        if (getJettyConfig() == null) {
+            return;
+        }
+
+        logger.info("Configuring Jetty from xml configuration file = {}", getJettyConfig());
+        XmlConfiguration xmlConfiguration = new XmlConfiguration(getJettyConfig().toURI().toURL());
+        xmlConfiguration.configure(getServer().getProxiedObject());
+    }
+
+    public org.gradle.api.plugins.jetty.internal.JettyPluginServer createServer() throws Exception {
+        return new Jetty6PluginServer();
+    }
+}
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyStop.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyStop.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/JettyStop.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/JettyStop.java
diff --git a/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/ScanTargetPattern.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/ScanTargetPattern.java
new file mode 100644
index 0000000..58dbf35
--- /dev/null
+++ b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/ScanTargetPattern.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins.jetty;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * Patterns for scanning for file changes.
+ */
+public class ScanTargetPattern {
+    private File directory;
+    private List includes = Collections.EMPTY_LIST;
+    private List excludes = Collections.EMPTY_LIST;
+
+    public File getDirectory() {
+        return directory;
+    }
+
+    public void setDirectory(File directory) {
+        this.directory = directory;
+    }
+
+    public void setIncludes(List includes) {
+        this.includes = includes;
+    }
+
+    public void setExcludes(List excludes) {
+        this.excludes = excludes;
+    }
+
+    public List getIncludes() {
+        return includes;
+    }
+
+    public List getExcludes() {
+        return excludes;
+    }
+}
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/ConsoleScanner.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/ConsoleScanner.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/ConsoleScanner.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/ConsoleScanner.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Jetty6PluginServer.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Jetty6PluginServer.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Jetty6PluginServer.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Jetty6PluginServer.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyConfiguration.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyConfiguration.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyConfiguration.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyConfiguration.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginServer.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginServer.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginServer.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginServer.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginWebAppContext.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginWebAppContext.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginWebAppContext.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/JettyPluginWebAppContext.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Monitor.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Monitor.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Monitor.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Monitor.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Proxy.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Proxy.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Proxy.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/internal/Proxy.java
diff --git a/subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/package-info.java b/subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/package-info.java
similarity index 100%
rename from subprojects/gradle-jetty/src/main/java/org/gradle/api/plugins/jetty/package-info.java
rename to subprojects/jetty/src/main/java/org/gradle/api/plugins/jetty/package-info.java
diff --git a/subprojects/gradle-jetty/src/main/resources/META-INF/gradle-plugins/jetty.properties b/subprojects/jetty/src/main/resources/META-INF/gradle-plugins/jetty.properties
similarity index 100%
rename from subprojects/gradle-jetty/src/main/resources/META-INF/gradle-plugins/jetty.properties
rename to subprojects/jetty/src/main/resources/META-INF/gradle-plugins/jetty.properties
diff --git a/subprojects/gradle-jetty/src/test/groovy/org/gradle/api/plugins/jetty/JettyPluginTest.groovy b/subprojects/jetty/src/test/groovy/org/gradle/api/plugins/jetty/JettyPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-jetty/src/test/groovy/org/gradle/api/plugins/jetty/JettyPluginTest.groovy
rename to subprojects/jetty/src/test/groovy/org/gradle/api/plugins/jetty/JettyPluginTest.groovy
diff --git a/subprojects/gradle-launcher/launcher.gradle b/subprojects/launcher/launcher.gradle
similarity index 100%
rename from subprojects/gradle-launcher/launcher.gradle
rename to subprojects/launcher/launcher.gradle
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/CommandLineActionFactory.java b/subprojects/launcher/src/main/java/org/gradle/launcher/CommandLineActionFactory.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/CommandLineActionFactory.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/CommandLineActionFactory.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonBuildAction.java b/subprojects/launcher/src/main/java/org/gradle/launcher/DaemonBuildAction.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonBuildAction.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/DaemonBuildAction.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonClientAction.java b/subprojects/launcher/src/main/java/org/gradle/launcher/DaemonClientAction.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonClientAction.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/DaemonClientAction.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonConnector.java b/subprojects/launcher/src/main/java/org/gradle/launcher/DaemonConnector.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonConnector.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/DaemonConnector.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonMain.java b/subprojects/launcher/src/main/java/org/gradle/launcher/DaemonMain.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/DaemonMain.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/DaemonMain.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/ExecutionListener.java b/subprojects/launcher/src/main/java/org/gradle/launcher/ExecutionListener.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/ExecutionListener.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/ExecutionListener.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/GradleDaemon.java b/subprojects/launcher/src/main/java/org/gradle/launcher/GradleDaemon.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/GradleDaemon.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/GradleDaemon.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/GradleMain.java b/subprojects/launcher/src/main/java/org/gradle/launcher/GradleMain.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/GradleMain.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/GradleMain.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/IncomingConnectionHandler.java b/subprojects/launcher/src/main/java/org/gradle/launcher/IncomingConnectionHandler.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/IncomingConnectionHandler.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/IncomingConnectionHandler.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/Main.java b/subprojects/launcher/src/main/java/org/gradle/launcher/Main.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/Main.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/Main.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/ProcessBootstrap.java b/subprojects/launcher/src/main/java/org/gradle/launcher/ProcessBootstrap.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/ProcessBootstrap.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/ProcessBootstrap.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/RunBuildAction.java b/subprojects/launcher/src/main/java/org/gradle/launcher/RunBuildAction.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/RunBuildAction.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/RunBuildAction.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/StopDaemonAction.java b/subprojects/launcher/src/main/java/org/gradle/launcher/StopDaemonAction.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/StopDaemonAction.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/StopDaemonAction.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/Build.java b/subprojects/launcher/src/main/java/org/gradle/launcher/protocol/Build.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/Build.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/protocol/Build.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/Command.java b/subprojects/launcher/src/main/java/org/gradle/launcher/protocol/Command.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/Command.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/protocol/Command.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/CommandComplete.java b/subprojects/launcher/src/main/java/org/gradle/launcher/protocol/CommandComplete.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/CommandComplete.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/protocol/CommandComplete.java
diff --git a/subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/Stop.java b/subprojects/launcher/src/main/java/org/gradle/launcher/protocol/Stop.java
similarity index 100%
rename from subprojects/gradle-launcher/src/main/java/org/gradle/launcher/protocol/Stop.java
rename to subprojects/launcher/src/main/java/org/gradle/launcher/protocol/Stop.java
diff --git a/subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/CommandLineActionFactoryTest.groovy b/subprojects/launcher/src/test/groovy/org/gradle/launcher/CommandLineActionFactoryTest.groovy
similarity index 100%
rename from subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/CommandLineActionFactoryTest.groovy
rename to subprojects/launcher/src/test/groovy/org/gradle/launcher/CommandLineActionFactoryTest.groovy
diff --git a/subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/DaemonBuildActionTest.groovy b/subprojects/launcher/src/test/groovy/org/gradle/launcher/DaemonBuildActionTest.groovy
similarity index 100%
rename from subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/DaemonBuildActionTest.groovy
rename to subprojects/launcher/src/test/groovy/org/gradle/launcher/DaemonBuildActionTest.groovy
diff --git a/subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/MainTest.groovy b/subprojects/launcher/src/test/groovy/org/gradle/launcher/MainTest.groovy
similarity index 100%
rename from subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/MainTest.groovy
rename to subprojects/launcher/src/test/groovy/org/gradle/launcher/MainTest.groovy
diff --git a/subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/RunBuildActionTest.groovy b/subprojects/launcher/src/test/groovy/org/gradle/launcher/RunBuildActionTest.groovy
similarity index 100%
rename from subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/RunBuildActionTest.groovy
rename to subprojects/launcher/src/test/groovy/org/gradle/launcher/RunBuildActionTest.groovy
diff --git a/subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/StopDaemonActionTest.groovy b/subprojects/launcher/src/test/groovy/org/gradle/launcher/StopDaemonActionTest.groovy
similarity index 100%
rename from subprojects/gradle-launcher/src/test/groovy/org/gradle/launcher/StopDaemonActionTest.groovy
rename to subprojects/launcher/src/test/groovy/org/gradle/launcher/StopDaemonActionTest.groovy
diff --git a/subprojects/gradle-maven/maven.gradle b/subprojects/maven/maven.gradle
similarity index 100%
rename from subprojects/gradle-maven/maven.gradle
rename to subprojects/maven/maven.gradle
diff --git a/subprojects/maven/src/main/groovy/org/gradle/api/plugins/MavenPlugin.java b/subprojects/maven/src/main/groovy/org/gradle/api/plugins/MavenPlugin.java
new file mode 100644
index 0000000..de81654
--- /dev/null
+++ b/subprojects/maven/src/main/groovy/org/gradle/api/plugins/MavenPlugin.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins;
+
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.ResolverContainer;
+import org.gradle.api.artifacts.dsl.RepositoryHandler;
+import org.gradle.api.artifacts.maven.Conf2ScopeMappingContainer;
+import org.gradle.api.internal.IConventionAware;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.tasks.ConventionValue;
+import org.gradle.api.tasks.Upload;
+import org.gradle.util.GUtil;
+import org.gradle.util.WrapUtil;
+
+import java.util.Map;
+
+/**
+ * <p>A {@link org.gradle.api.Plugin} which allows project artifacts to be deployed to a Maven repository, or installed
+ * to the local Maven cache.</p>
+ *
+ * @author Hans Dockter
+ */
+public class MavenPlugin implements Plugin<Project> {
+    public static final int COMPILE_PRIORITY = 300;
+    public static final int RUNTIME_PRIORITY = 200;
+    public static final int TEST_COMPILE_PRIORITY = 150;
+    public static final int TEST_RUNTIME_PRIORITY = 100;
+
+    public static final int PROVIDED_COMPILE_PRIORITY = COMPILE_PRIORITY + 100;
+    public static final int PROVIDED_RUNTIME_PRIORITY = COMPILE_PRIORITY + 150;
+
+    public static final String INSTALL_TASK_NAME = "install";
+
+    public void apply(final Project project) {
+        setConventionMapping(project);
+        addConventionObject(project);
+        PluginContainer plugins = project.getPlugins();
+        plugins.withType(JavaPlugin.class, new Action<JavaPlugin>() {
+            public void execute(JavaPlugin javaPlugin) {
+                configureJavaScopeMappings(project.getRepositories(), project.getConfigurations());
+                configureInstall(project);
+            }
+        });
+        plugins.withType(WarPlugin.class, new Action<WarPlugin>() {
+            public void execute(WarPlugin warPlugin) {
+                configureWarScopeMappings(project.getRepositories(), project.getConfigurations());
+            }
+        });
+    }
+
+    private void setConventionMapping(final Project project) {
+        Map mapping = GUtil.map(
+                "mavenPomDir", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return convention.getPlugin(MavenPluginConvention.class).getPomDir();
+                    }
+                },
+                "configurationContainer", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return project.getConfigurations();
+                    }
+                },
+                "fileResolver", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return ((ProjectInternal) project).getFileResolver();
+                    }
+                },
+                "mavenScopeMappings", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return convention.getPlugin(MavenPluginConvention.class).getConf2ScopeMappings();
+                    }
+                });
+        ((IConventionAware) project.getRepositories()).getConventionMapping().map(mapping);
+    }
+
+    private void addConventionObject(Project project) {
+        MavenPluginConvention mavenConvention = new MavenPluginConvention((ProjectInternal) project);
+        Convention convention = project.getConvention();
+        convention.getPlugins().put("maven", mavenConvention);
+    }
+
+    private void configureJavaScopeMappings(ResolverContainer resolverFactory, ConfigurationContainer configurations) {
+        resolverFactory.getMavenScopeMappings().addMapping(COMPILE_PRIORITY, configurations.getByName(JavaPlugin.COMPILE_CONFIGURATION_NAME),
+                Conf2ScopeMappingContainer.COMPILE);
+        resolverFactory.getMavenScopeMappings().addMapping(RUNTIME_PRIORITY, configurations.getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME),
+                Conf2ScopeMappingContainer.RUNTIME);
+        resolverFactory.getMavenScopeMappings().addMapping(TEST_COMPILE_PRIORITY, configurations.getByName(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME),
+                Conf2ScopeMappingContainer.TEST);
+        resolverFactory.getMavenScopeMappings().addMapping(TEST_RUNTIME_PRIORITY, configurations.getByName(JavaPlugin.TEST_RUNTIME_CONFIGURATION_NAME),
+                Conf2ScopeMappingContainer.TEST);
+    }
+
+    private void configureWarScopeMappings(ResolverContainer resolverContainer, ConfigurationContainer configurations) {
+        resolverContainer.getMavenScopeMappings().addMapping(PROVIDED_COMPILE_PRIORITY, configurations.getByName(WarPlugin.PROVIDED_COMPILE_CONFIGURATION_NAME),
+                Conf2ScopeMappingContainer.PROVIDED);
+        resolverContainer.getMavenScopeMappings().addMapping(PROVIDED_RUNTIME_PRIORITY, configurations.getByName(WarPlugin.PROVIDED_RUNTIME_CONFIGURATION_NAME),
+                Conf2ScopeMappingContainer.PROVIDED);
+    }
+
+    private void configureInstall(Project project) {
+        Upload installUpload = project.getTasks().add(INSTALL_TASK_NAME, Upload.class);
+        Configuration configuration = project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION);
+        installUpload.dependsOn(configuration.getBuildArtifacts());
+        installUpload.setConfiguration(configuration);
+        installUpload.getRepositories().mavenInstaller(WrapUtil.toMap("name", RepositoryHandler.DEFAULT_MAVEN_INSTALLER_NAME));
+        installUpload.setDescription("Does a maven install of the archives artifacts into the local .m2 cache.");
+    }
+}
diff --git a/subprojects/gradle-maven/src/main/groovy/org/gradle/api/plugins/MavenPluginConvention.java b/subprojects/maven/src/main/groovy/org/gradle/api/plugins/MavenPluginConvention.java
similarity index 100%
rename from subprojects/gradle-maven/src/main/groovy/org/gradle/api/plugins/MavenPluginConvention.java
rename to subprojects/maven/src/main/groovy/org/gradle/api/plugins/MavenPluginConvention.java
diff --git a/subprojects/gradle-maven/src/main/resources/META-INF/gradle-plugins/maven.properties b/subprojects/maven/src/main/resources/META-INF/gradle-plugins/maven.properties
similarity index 100%
rename from subprojects/gradle-maven/src/main/resources/META-INF/gradle-plugins/maven.properties
rename to subprojects/maven/src/main/resources/META-INF/gradle-plugins/maven.properties
diff --git a/subprojects/maven/src/test/groovy/org/gradle/api/plugins/MavenPluginConventionTest.groovy b/subprojects/maven/src/test/groovy/org/gradle/api/plugins/MavenPluginConventionTest.groovy
new file mode 100644
index 0000000..5083b0d
--- /dev/null
+++ b/subprojects/maven/src/test/groovy/org/gradle/api/plugins/MavenPluginConventionTest.groovy
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins
+
+import org.gradle.api.internal.artifacts.publish.maven.DefaultMavenPom
+import org.gradle.api.internal.artifacts.publish.maven.dependencies.DefaultConf2ScopeMappingContainer
+import org.gradle.api.internal.project.DefaultProject
+import org.gradle.util.HelperUtil
+import spock.lang.Specification
+
+/**
+ * @author Hans Dockter
+ */
+class MavenPluginConventionTest extends Specification {
+    DefaultProject project = HelperUtil.createRootProject()
+    MavenPluginConvention mavenPluginConvention = new MavenPluginConvention(project)
+
+    def pomShouldCreateMavenPom() {
+        mavenPluginConvention.conf2ScopeMappings = new DefaultConf2ScopeMappingContainer();
+        project.group = 'someGroup'
+        project.version = '1.0'
+        DefaultMavenPom mavenPom = mavenPluginConvention.pom()
+
+        expect:
+        !mavenPluginConvention.conf2ScopeMappings.is(mavenPom.scopeMappings)
+        mavenPluginConvention.conf2ScopeMappings == mavenPom.scopeMappings
+        mavenPom.mavenProject != null
+        mavenPom.pomDependenciesConverter != null
+        mavenPom.configurations.is(project.getConfigurations())
+        mavenPom.fileResolver == project.fileResolver
+        mavenPom.groupId == project.group
+        mavenPom.artifactId == project.name
+        mavenPom.version == project.version
+    }
+
+    def pomShouldCreateAndConfigureMavenPom() {
+        mavenPluginConvention.conf2ScopeMappings = new DefaultConf2ScopeMappingContainer();
+        DefaultMavenPom mavenPom = mavenPluginConvention.pom {
+            project {
+                inceptionYear '1999'
+            }
+        }
+
+        expect:
+        mavenPom.mavenProject.inceptionYear == '1999'
+
+    }
+}
diff --git a/subprojects/gradle-maven/src/test/groovy/org/gradle/api/plugins/MavenPluginTest.java b/subprojects/maven/src/test/groovy/org/gradle/api/plugins/MavenPluginTest.java
similarity index 100%
rename from subprojects/gradle-maven/src/test/groovy/org/gradle/api/plugins/MavenPluginTest.java
rename to subprojects/maven/src/test/groovy/org/gradle/api/plugins/MavenPluginTest.java
diff --git a/subprojects/gradle-open-api/open-api.gradle b/subprojects/open-api/open-api.gradle
similarity index 100%
rename from subprojects/gradle-open-api/open-api.gradle
rename to subprojects/open-api/open-api.gradle
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/BlockingRequestObserver.java b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/BlockingRequestObserver.java
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/BlockingRequestObserver.java
rename to subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/BlockingRequestObserver.java
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionBuilder.java b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionBuilder.java
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionBuilder.java
rename to subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionBuilder.java
diff --git a/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest.groovy b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest.groovy
new file mode 100644
index 0000000..599450f
--- /dev/null
+++ b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest.groovy
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.openapi
+
+import org.gradle.api.internal.AbstractClassPathProvider
+import org.gradle.integtests.fixtures.BasicGradleDistribution
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.util.Jvm
+import org.junit.Assert
+import org.junit.Rule
+import org.junit.Test
+import org.slf4j.Logger
+import org.slf4j.LoggerFactory
+
+class CrossVersionCompatibilityIntegrationTest {
+    private final Logger logger = LoggerFactory.getLogger(CrossVersionCompatibilityIntegrationTest)
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final TestResources resources = new TestResources()
+
+    private final BasicGradleDistribution gradle09rc1 = dist.previousVersion('0.9-rc-1')
+    private final BasicGradleDistribution gradle09rc2 = dist.previousVersion('0.9-rc-2')
+    private final BasicGradleDistribution gradle09rc3 = dist.previousVersion('0.9-rc-3')
+    private final BasicGradleDistribution gradle09 = dist.previousVersion('0.9')
+    private final BasicGradleDistribution gradle091 = dist.previousVersion('0.9.1')
+
+    @Test
+    public void canUseOpenApiFromCurrentVersionToBuildUsingAnOlderVersion() {
+        [gradle09rc1, gradle09rc2, gradle09rc3, gradle09, gradle091].each {
+            checkCanBuildUsing(dist, it)
+        }
+    }
+
+    @Test
+    public void canUseOpenApiFromOlderVersionToBuildUsingCurrentVersion() {
+        [gradle09rc1, gradle09rc2, gradle09rc3, gradle09, gradle091].each {
+            checkCanBuildUsing(it, dist)
+        }
+    }
+
+    def checkCanBuildUsing(BasicGradleDistribution openApiVersion, BasicGradleDistribution buildVersion) {
+        try {
+            if (!buildVersion.worksWith(Jvm.current())) {
+                System.out.println("skipping $buildVersion as it does not work with ${Jvm.current()}.")
+                return
+            }
+            if (!openApiVersion.worksWith(Jvm.current())) {
+                System.out.println("skipping $openApiVersion as it does not work with ${Jvm.current()}.")
+                return
+            }
+            def testClasses = AbstractClassPathProvider.getClasspathForClass(CrossVersionBuilder.class)
+            def junitJar = AbstractClassPathProvider.getClasspathForClass(Assert.class)
+            def classpath = [testClasses, junitJar] + openApiVersion.gradleHomeDir.file('lib').listFiles().findAll { it.name =~ /gradle-open-api.*\.jar/ }
+            logger.info('Using Open API classpath {}', classpath)
+            def classloader = new URLClassLoader(classpath.collect { it.toURI().toURL() } as URL[], ClassLoader.systemClassLoader.parent)
+            def builder = classloader.loadClass(CrossVersionBuilder.class.name).newInstance()
+            builder.targetGradleHomeDir = buildVersion.gradleHomeDir
+            builder.currentDir = dist.testDir
+            builder.version = buildVersion.version
+            builder.build()
+        } catch (Throwable throwable) {
+            throw new RuntimeException("Failed to build using $buildVersion via the open API of $openApiVersion", throwable)
+        }
+    }
+}
diff --git a/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/GradleRunnerTest.groovy b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/GradleRunnerTest.groovy
new file mode 100644
index 0000000..416b039
--- /dev/null
+++ b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/GradleRunnerTest.groovy
@@ -0,0 +1,259 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.openapi
+
+import junit.framework.AssertionFailedError
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.openapi.external.runner.GradleRunnerFactory
+import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1
+import org.gradle.openapi.external.runner.GradleRunnerVersion1
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+
+class GradleRunnerTest {
+
+  static final String JAVA_PROJECT_NAME = 'javaproject'
+  static final String SHARED_NAME = 'shared'
+  static final String API_NAME = 'api'
+  static final String WEBAPP_NAME = 'webservice'
+  static final String SERVICES_NAME = 'services'
+  static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
+
+  private File javaprojectDir
+
+  @Rule public final GradleDistribution dist = new GradleDistribution()
+  @Rule public final TestResources resources = new TestResources('testproject')
+
+  @Before
+  void setUp() {
+      javaprojectDir = dist.testDir
+  }
+
+  /**
+   * We just want to make sure we can instantiate a GradleRunner here. That's all
+  */
+  @Test
+  public void testInstantiation()
+  {
+    TestGradleRunnerInteractionVersion1 interaction = new TestGradleRunnerInteractionVersion1(javaprojectDir)
+
+    GradleRunnerVersion1 runner = GradleRunnerFactory.createGradleRunner(getClass().getClassLoader(), dist.getGradleHomeDir(), interaction, true)
+
+    Assert.assertNotNull( "Failed to instantiate runner", runner )
+  }
+
+  /**
+   * This does a basic execution. It also checks to make sure that the notifications were fired
+   * correctly.
+  */
+  @Test
+  public void testExecution()
+  {
+    TestGradleRunnerInteractionVersion1 interaction = new TestGradleRunnerInteractionVersion1( javaprojectDir )
+
+    GradleRunnerVersion1 runner = GradleRunnerFactory.createGradleRunner(getClass().getClassLoader(), dist.getGradleHomeDir(), interaction, true)
+
+    Assert.assertNotNull( "Failed to instantiate runner", runner )
+
+    runner.executeCommand( "clean build" )
+
+        //wait for it to complete
+    int totalWaitTime = 0;
+    int maximumWaitTime = 80
+    while ( !interaction.executionFinished && totalWaitTime <= maximumWaitTime ) {
+        try {
+            Thread.sleep(1000);
+        }
+        catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+
+        totalWaitTime += 1;
+    }
+
+    if( totalWaitTime > maximumWaitTime ) {
+      throw new AssertionFailedError( "Waited " + totalWaitTime + " seconds and failed to finish executing command. This is taking too long, so assuming something is wrong.\nCurrent project directory: '" + interaction.getWorkingDirectory() + "'\nOutput:\n" + interaction.output.toString() )
+    }
+
+    //now make sure we were notified of things correctly:
+
+    //it should have fired a message that execution has started
+    Assert.assertTrue( "Execution did not report started", interaction.executionStarted )
+    
+    //it should have finished
+    Assert.assertTrue( "Execution did not report finished", interaction.executionFinished )
+
+    //it should have been successful
+    Assert.assertTrue( "Did not execute command successfully", interaction.wasSuccessful )
+
+    //we should have output
+    Assert.assertTrue( "Missing output", interaction.output.length() > 0 )
+
+    //we should have a message when we finished (basically the full output)
+    Assert.assertTrue( "Missing finish message", interaction.finishMessage != null )
+
+    //there should have been multiple tasks to execute
+    Assert.assertTrue( "Not enough tasks executed. Expected multiple. Found " + interaction.numberOfTasksToExecute, interaction.numberOfTasksToExecute > 1 )
+
+    //we should have been notified that tasks started and completed (we're not interested in tracking how many times or specific tasks as that might change too often with releases of gradle.
+    Assert.assertTrue( "No tasks reported started", interaction.taskStarted )
+    Assert.assertTrue( "No tasks reported completed", interaction.taskCompleted )
+  }
+
+  /**
+   * This tests killing a task. We'll start a build task then kill it after it starts executing.
+   * Note: the kill interaction actually kills execution. It waits for a certain number of tasks
+   * to be executed.
+  */
+  @Test
+  public void testKill()
+  {
+    KillTestInteraction interaction = new KillTestInteraction(javaprojectDir)
+
+    GradleRunnerVersion1 runner = GradleRunnerFactory.createGradleRunner(getClass().getClassLoader(), dist.getGradleHomeDir(), interaction, true)
+
+    interaction.runner = runner
+
+    Assert.assertNotNull( "Failed to instantiate runner", runner )
+
+    runner.executeCommand( "build" )
+
+        //wait for it to complete
+    int totalWaitTime = 0;
+    int maximumWaitTime = 80
+    while ( !interaction.executionFinished && totalWaitTime <= maximumWaitTime ) {
+        try {
+            Thread.sleep(1000);
+        }
+        catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+
+        totalWaitTime += 1;
+    }
+
+    if( totalWaitTime > maximumWaitTime ) {
+      throw new AssertionFailedError( "Waited " + totalWaitTime + " seconds and failed to finish executing command. This is taking too long, so assuming something is wrong.\nCurrent project directory: '" + interaction.getWorkingDirectory() + "'\nOutput:\n" + interaction.output.toString() )
+    }
+
+    //make sure we tried to kill the task
+    Assert.assertTrue( "Did not attempt to kill execution", interaction.killedTask )
+
+    //now make sure we were notified of things correctly:
+
+    //it should NOT have been successful
+    Assert.assertFalse( "Erroneously executed successfully (was not killed)", interaction.wasSuccessful )
+
+    //it should have fired a message that execution has started
+    Assert.assertTrue( "Execution did not report started", interaction.executionStarted )
+
+    //it should have finished
+    Assert.assertTrue( "Execution did not report finished", interaction.executionFinished )
+  }
+}
+
+  //Inner class used to track what has been called
+  public class TestGradleRunnerInteractionVersion1 implements GradleRunnerInteractionVersion1
+  {
+    private File workingDirectory
+    private StringBuilder output = new StringBuilder()
+    private String finishMessage
+    boolean wasSuccessful
+    boolean executionStarted
+    int numberOfTasksToExecute
+    boolean executionFinished
+    boolean taskCompleted
+    boolean taskStarted
+
+
+    public TestGradleRunnerInteractionVersion1(File workingDirectory) {
+      this.workingDirectory = workingDirectory;
+    }
+
+    def TestGradleRunnerInteractionVersion1() {
+    }
+
+    File getWorkingDirectory() { return workingDirectory }
+
+    GradleRunnerInteractionVersion1.LogLevel getLogLevel() { return GradleRunnerInteractionVersion1.LogLevel.Lifecycle }
+
+    GradleRunnerInteractionVersion1.StackTraceLevel getStackTraceLevel() { return GradleRunnerInteractionVersion1.StackTraceLevel.InternalExceptions }
+
+    void reportExecutionStarted() { executionStarted = true }
+    void reportNumberOfTasksToExecute(int size) { numberOfTasksToExecute = size }
+
+    //both of these will be fired often. We're not going to try to track that.
+    void reportTaskStarted(String currentTaskName, float percentComplete) { taskStarted = true; }
+    void reportTaskComplete(String currentTaskName, float percentComplete) { taskCompleted = true }
+
+    void reportLiveOutput(String output) { this.output.append( output ) }
+
+    void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+      this.executionFinished = true;
+      this.wasSuccessful = wasSuccessful
+      this.finishMessage = message;
+    }
+
+    File getCustomGradleExecutable() { return null; }
+  }
+
+
+  //class to track that has class was started and then kills it. 
+  private class KillTestInteraction implements GradleRunnerInteractionVersion1
+  {
+    private GradleRunnerVersion1 runner
+    int tasks = 0
+    boolean killedTask
+
+    //after at least 2 tasks start, try to kill the process. This simulates someone killing it while
+    //its in the middle of running
+    def void reportTaskStarted(String currentTaskName, float percentComplete) {
+      tasks++
+      if( tasks == 2 ) {
+        killedTask = true
+        runner.killProcess();
+      }
+    }
+    private File workingDirectory
+    boolean wasSuccessful
+    boolean executionStarted
+    boolean executionFinished
+
+    public KillTestInteraction(File workingDirectory) {
+      this.workingDirectory = workingDirectory;
+    }
+
+    File getWorkingDirectory() { return workingDirectory }
+
+    GradleRunnerInteractionVersion1.LogLevel getLogLevel() { return GradleRunnerInteractionVersion1.LogLevel.Lifecycle }
+
+    GradleRunnerInteractionVersion1.StackTraceLevel getStackTraceLevel() { return GradleRunnerInteractionVersion1.StackTraceLevel.InternalExceptions }
+
+    void reportExecutionStarted() { executionStarted = true }
+    void reportNumberOfTasksToExecute(int size) { }
+
+    void reportTaskComplete(String currentTaskName, float percentComplete) {}
+    void reportLiveOutput(String output) {}
+    File getCustomGradleExecutable() { return null; }
+
+    void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+      this.executionFinished = true;
+      this.wasSuccessful = wasSuccessful
+    }
+  }
\ No newline at end of file
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiFixture.java b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiFixture.java
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiFixture.java
rename to subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiFixture.java
diff --git a/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiUiTest.groovy b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiUiTest.groovy
new file mode 100644
index 0000000..629f056
--- /dev/null
+++ b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OpenApiUiTest.groovy
@@ -0,0 +1,983 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.openapi
+
+import java.awt.Component
+import java.awt.event.HierarchyEvent
+import java.awt.event.HierarchyListener
+import java.util.concurrent.TimeUnit
+import javax.swing.JFrame
+import javax.swing.JLabel
+import junit.framework.AssertionFailedError
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.openapi.external.ExternalUtility
+import org.gradle.openapi.external.foundation.GradleInterfaceVersion2
+import org.gradle.openapi.external.foundation.ProjectVersion1
+import org.gradle.openapi.external.foundation.RequestVersion1
+import org.gradle.openapi.external.foundation.TaskVersion1
+import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1
+import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1
+import org.gradle.util.OperatingSystem
+import org.junit.Assert
+import org.junit.Rule
+import org.junit.Test
+import org.gradle.openapi.external.ui.*
+import static org.hamcrest.Matchers.*
+
+/**
+ * This tests numerous aspects of the Open API UI. This is how the Idea plugin extracts the UI from
+ * Gradle.
+ */
+public class OpenApiUiTest {
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final TestResources resources = new TestResources('testproject')
+    @Rule public final OpenApiFixture openApi = new OpenApiFixture()
+
+    /**
+     This tests to see if we can call the UIFactory to create a single pane UI.
+     This is only testing that extracting the UI returns something without giving
+     errors and that it has a component. This is just a good general-case test
+     to make sure the basics are working.
+     */
+    @Test
+    public void testSinglePaneBasic() {
+        SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+
+        //make sure we got something
+        Assert.assertNotNull(singlePane)
+
+        //tell it we're about to show it, so it'll create a component
+        singlePane.aboutToShow();
+
+        //make sure we now have that component
+        Assert.assertNotNull(singlePane.getComponent())
+    }
+
+  /**
+   * This tests to see if we can call the UIFactory to create a dual pane UI.
+      This is only testing that extracting the UI returns something without giving
+      errors and that it has its dual components. This is just a good general-case test
+      to make sure the basics are working.
+   */
+    @Test
+    public void testDualPaneBasic()
+    {
+        DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+
+        //make sure we got something
+        Assert.assertNotNull( dualPane )
+
+        //tell it we're about to show it, so it'll create a component
+        dualPane.aboutToShow();
+
+        //make sure we now have the main component
+        Assert.assertNotNull( dualPane.getMainComponent() )
+
+        //and the output component
+        Assert.assertNotNull( dualPane.getOutputPanel() )
+    }
+
+    /**
+    * This verifies that favorites are working for some basics. We're going to test this with both
+     * the single and dual pane UIs (they actually use the same editor then for other tests we'll
+     * assume they're same).
+    */
+    @Test
+    public void testFavoritesBasic()
+    {
+      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+      checkFavoritesBasic( singlePane )
+
+      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+      checkFavoritesBasic( dualPane )
+    }
+
+    /**
+    * This verifies that we favorites are basically working based on the given UI. We're going to add one, then
+    * do some 'gets' to find the just-added favorite.
+    */
+    private void checkFavoritesBasic( BasicGradleUIVersion1 basicGradleUI )
+    {
+      FavoritesEditorVersion1 editor = basicGradleUI.getFavoritesEditor()
+
+      //there should be no favorites as of yet
+      Assert.assertTrue( editor.getFavoriteTasks().isEmpty() )
+
+      //add one (doesn't really matter what it is)
+      def fullCommandLine = "-t -S"
+      def displayName = "Task List With Stack trace"
+      FavoriteTaskVersion1 favorite = editor.addFavorite( fullCommandLine, displayName, true )
+
+      //make sure something was added
+      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
+
+      //get the newly-added favorite by command line.
+      FavoriteTaskVersion1 matchingFavorite1 = editor.getFavorite( fullCommandLine )
+      Assert.assertEquals( favorite, matchingFavorite1 )
+
+      //get the newly-added favorite by displayName.
+      FavoriteTaskVersion1 matchingFavorite2 = editor.getFavoriteByDisplayName( displayName )
+      Assert.assertEquals( favorite, matchingFavorite2 )
+
+      Assert.assertTrue( matchingFavorite2.alwaysShowOutput() )
+    }
+
+    /**
+    * This verifies that we can edit favorites. We're going to add a favorite then edit its
+     * command line, display name, and 'show output' setting.
+    */
+    @Test
+    public void testEditingFavorites()
+    {
+      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+      FavoritesEditorVersion1 editor = singlePane.getFavoritesEditor()
+
+      def originalFullCommandLine = "-t -S"
+      def originalDisplayName = "Task List With Stack trace"
+      FavoriteTaskVersion1 addedFavorite = editor.addFavorite(originalFullCommandLine, originalDisplayName, true)
+
+      //make sure we can find the just-added favorite
+      Assert.assertNotNull( editor.getFavorite( originalFullCommandLine ) )
+      Assert.assertNotNull( editor.getFavoriteByDisplayName( originalDisplayName ) )
+
+      String newFullCommandLine = "-t -S -d"
+      String newDisplayName = "new task list"
+      String error = editor.editFavorite( addedFavorite, newFullCommandLine, newDisplayName, false )
+      Assert.assertNull( error )  //we should get no error
+
+      //now we shouldn't be able to find the favorite using the original values. This is part of verifying the values were in fact changed.
+      Assert.assertNull( editor.getFavorite( originalFullCommandLine ) )
+      Assert.assertNull( editor.getFavoriteByDisplayName( originalDisplayName ) )
+
+      //make sure we can find it using the new values. This is part of verifying the values were in fact changed.
+      Assert.assertNotNull( editor.getFavorite( newFullCommandLine ) )
+      Assert.assertNotNull( editor.getFavoriteByDisplayName( newDisplayName ) )
+
+      //there should just be 1 favorite
+      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
+    }
+
+    /**
+    * This verifies that we can remove favorites. We're going to add some favorites then remove them
+     * verifying that they've gone.
+    */
+    @Test
+    public void testRemovingFavorites()
+    {
+      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+      FavoritesEditorVersion1 editor = singlePane.getFavoritesEditor()
+
+      //there should be no favorites as of yet
+      Assert.assertTrue( editor.getFavoriteTasks().isEmpty() )
+
+      //add one (doesn't really matter what it is)
+      String command1 = "build"
+      FavoriteTaskVersion1 favorite1 = editor.addFavorite( command1, command1, true )
+
+      //make sure it was added
+      Assert.assertNotNull( editor.getFavorite( command1 ) )
+      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
+
+      //add another one
+      String command2 = "build -xtest"
+      FavoriteTaskVersion1 favorite2 = editor.addFavorite( command2, command2, true )
+
+      //make sure it was added
+      Assert.assertNotNull( editor.getFavorite( command2 ) )
+      Assert.assertEquals( 2, editor.getFavoriteTasks().size() )
+
+      String command3 = "clean"
+      FavoriteTaskVersion1 favorite3 = editor.addFavorite( command3, command3, true )
+
+      //make sure it was added
+      Assert.assertNotNull( editor.getFavorite( command3 ) )
+      Assert.assertEquals( 3, editor.getFavoriteTasks().size() )
+
+      String command4 = "docs"
+      FavoriteTaskVersion1 favorite4 = editor.addFavorite( command4, command4, true )
+
+      //make sure it was added
+      Assert.assertNotNull( editor.getFavorite( command4 ) )
+      Assert.assertEquals( 4, editor.getFavoriteTasks().size() )
+
+      //now remove one of them
+      List removed1 = [ favorite2 ]
+      editor.removeFavorites( removed1 )
+
+      //make sure it was removed
+      Assert.assertNull( editor.getFavorite( command2 ) )
+      Assert.assertEquals( 3, editor.getFavoriteTasks().size() )
+
+      //now remove multiples
+      List removed2 = [ favorite1, favorite4 ]
+      editor.removeFavorites( removed2 )
+
+      //make sure they were both removed
+      Assert.assertNull( editor.getFavorite( command1 ) )
+      Assert.assertNull( editor.getFavorite( command4 ) )
+      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
+    }
+
+    /**
+   * This tests executing multiple favorites at once. We'll add two favorites, then execute both of them
+   * via GradleInterfaceVersion1.executeFavorites(). This should execute both as a single command
+   * concatenating them together.
+   */
+    @Test
+    public void testExecutingFavorites()
+    {
+      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+      FavoritesEditorVersion1 editor = singlePane.getFavoritesEditor()
+
+      //this starts the execution queue
+      singlePane.aboutToShow()
+
+      //there should be no favorites as of yet
+      Assert.assertTrue( editor.getFavoriteTasks().isEmpty() )
+
+      //add one (doesn't really matter what it is)
+      String command1 = "build"
+      FavoriteTaskVersion1 favorite1 = editor.addFavorite( command1, command1, true )
+
+      //make sure it was added
+      Assert.assertNotNull( editor.getFavorite( command1 ) )
+      Assert.assertEquals( 1, editor.getFavoriteTasks().size() )
+
+      //add another one
+      String command2 = "clean"
+      FavoriteTaskVersion1 favorite2 = editor.addFavorite( command2, command2, true )
+
+      //make sure it was added
+      Assert.assertNotNull( editor.getFavorite( command2 ) )
+      Assert.assertEquals( 2, editor.getFavoriteTasks().size() )
+
+      //add a request observer so we can observe when the command is finished. This allows us to
+      //see what was actually executed.
+      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.EXECUTION_TYPE )
+      ((GradleInterfaceVersion2)singlePane.getGradleInterfaceVersion1()).addRequestObserver( testRequestObserver )
+
+      //now execute both favorites
+      List<FavoriteTaskVersion1> favorites = [ favorite1, favorite2 ]
+      RequestVersion1 request = ( (GradleInterfaceVersion2) singlePane.getGradleInterfaceVersion1() ).executeFavorites(favorites)
+
+      Assert.assertNotNull( request )
+
+      //verify that the actual command that was executed is a concatenation of both favorites
+      Assert.assertThat( request.getFullCommandLine(), startsWith("build clean") )
+    }
+
+    /**
+    * This tests getting projects and tasks from gradle. It then goes through a series of tests
+    * related to projects and tasks (such as making sure their description is returned, their
+    * parent is returned, etc).
+    */
+    @Test
+    public void testProjectsAndTasks()
+    {
+      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
+
+      //make sure our samples directory exists
+      Assert.assertTrue( gradleInterface.getCurrentDirectory().isDirectory() )
+
+      //add a request observer so we can observe when the command is finished. This allows us to
+      //see what was actually executed.
+      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.REFRESH_TYPE )
+      gradleInterface.addRequestObserver( testRequestObserver )
+
+      //this starts the execution queue
+      dualPane.aboutToShow()
+
+      gradleInterface.refreshTaskTree()
+
+      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
+
+      Assert.assertEquals( "Execution Failed: " + testRequestObserver.output, 0, testRequestObserver.result)
+
+      List<ProjectVersion1> rootProjects = gradleInterface.getRootProjects();
+      Assert.assertFalse( rootProjects.isEmpty() );   //do we have any root projects?
+
+      ProjectVersion1 rootProject = rootProjects.get( 0 );
+      Assert.assertNotNull( rootProject );
+      Assert.assertThat( rootProject.getSubProjects().size(), equalTo(3))
+
+      //Quick check to make sure there are tasks on each of the sub projects.
+      //The exact task names will change over time, so I don't want to try
+      //to test for those. I'll just make sure there are several.
+      Iterator<ProjectVersion1> iterator = rootProjects.get(0).getSubProjects().iterator();
+      while( iterator.hasNext() )
+      {
+         ProjectVersion1 projectVersion1 = iterator.next();
+         Assert.assertTrue( projectVersion1.getTasks().size() > 4 );
+      }
+
+      //there should be a 'services' project
+      ProjectVersion1 servicesProject = rootProjects.get(0).getSubProject("services" );
+      Assert.assertNotNull( servicesProject );
+
+      //and it contains a 'webservice' sub project
+      ProjectVersion1 webserviceProject = servicesProject.getSubProject("webservice");
+      Assert.assertNotNull( webserviceProject );
+
+      ProjectVersion1 apiProject = rootProjects.get(0).getSubProject("api");
+      Assert.assertNotNull( apiProject );
+
+      //verify the parent project is set correctly
+      Assert.assertEquals( servicesProject, webserviceProject.getParentProject() )
+
+      //verify its full name is correct (this might should be prefixed with a colon)
+      Assert.assertEquals( "services:webservice", webserviceProject.getFullProjectName() )
+
+      //verify getSubProjectFromFullPath works
+      ProjectVersion1 foundProject = rootProject.getSubProjectFromFullPath("services:webservice")
+      Assert.assertNotNull( "Failed to find services:webservice", foundProject )
+      Assert.assertEquals( webserviceProject, foundProject )
+
+      //verify that are multiple tasks here (we know their should be)
+      Assert.assertTrue( webserviceProject.getTasks().size() > 4 );
+
+      //verify getTaskFromFullPath works
+      TaskVersion1 apiBuildTask = rootProject.getTaskFromFullPath(":api:build")
+      Assert.assertNotNull( "Failed to find :api:build", apiBuildTask )
+
+      Assert.assertEquals( apiProject, apiBuildTask.getProject() )
+
+      //then make sure it has a description
+      Assert.assertNotNull( apiBuildTask.getDescription() )
+
+      //and that its not marked as the default (we need a task to be the default so we can verify it returns true)
+      Assert.assertFalse( apiBuildTask.isDefault() )
+
+      //there are no default tasks here
+      Assert.assertTrue( apiProject.getDefaultTasks().isEmpty() )
+
+      //this build task is a child of the api project. Should be the same task we got earlier
+      TaskVersion1 buildTask = apiProject.getTask("build")
+      Assert.assertNotNull( "Failed to find build task", buildTask )
+      Assert.assertEquals( apiBuildTask, buildTask )
+    }
+
+   /**
+    * This verifies that the GradleInterfaceVersion1.refreshTaskTree that takes
+    * additional arguments works. We're not really interested in what those additional
+    * arguments are, just that it passes them along.
+    */
+    @Test
+    public void testRefreshWithArguments()
+    {
+      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
+
+      //make sure our samples directory exists
+      if( !gradleInterface.getCurrentDirectory().exists() ) {
+        throw new AssertionFailedError('sample project missing. Expected it at: ' + gradleInterface.getCurrentDirectory())
+      }
+
+      //this starts the execution queue
+      dualPane.aboutToShow()
+
+      //add a request observer so we can observe when the command is finished. This allows us to
+      //see what was actually executed.
+      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.REFRESH_TYPE )
+      gradleInterface.addRequestObserver( testRequestObserver )
+
+      RequestVersion1 request = gradleInterface.refreshTaskTree2("-xtest")
+
+      //make sure that the actual request is the normal refresh request with our
+      //(this line is really what we're trying to test)
+      Assert.assertThat( request.getFullCommandLine(), startsWith("tasks -xtest") )
+
+      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
+
+      Assert.assertEquals( "Execution Failed: " + testRequestObserver.output, 0, testRequestObserver.result)
+
+      Assert.assertEquals( "Not our request", request, testRequestObserver.request );
+    }
+
+    /**
+    * This verifies that you can add custom stuff to the setup tab. This is a UI test and is kinda tricky. We're going
+    * to use a HierarchyListener to see if our component is made visible. This will confirm if it was added or not
+    * because it must be added to be made visible. To do this, however, we'll need to actually show the UI. All we're
+    * really doing here, is adding a 'custom' component to the UI, then adding the UI to a frame, then showing the frame,
+    * so we can verify that our component was shown.
+    */
+    @Test
+    public void testAddingComponentToSetupTab()
+    {
+      if ( java.awt.GraphicsEnvironment.isHeadless() ) {
+        return;  // Can't run this test in headless mode!
+       }
+
+      JLabel label = new JLabel("Testing Testing 123")
+      TestVisibilityHierarchyListener hierarchyAdapter = new TestVisibilityHierarchyListener()
+      label.addHierarchyListener( hierarchyAdapter )
+
+      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+
+      //make sure we haven't been told the component was shown or hidden yet
+      Assert.assertFalse( hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( hierarchyAdapter.componentWasHidden )
+
+      singlePane.aboutToShow();
+
+      singlePane.setCustomPanelToSetupTab( label )
+
+      //this still should not show the component (at this point, we're probably more testing that our hierarchyAdapter is working)
+      Assert.assertFalse( hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( hierarchyAdapter.componentWasHidden )
+
+      //now create a frame, place the UI in it, then show it briefly
+      JFrame frame = openApi.open(singlePane)
+
+      //set the Setup tab as the current tab. This is required to actually show the component.
+      int setupTabIndex = singlePane.getGradleTabIndex( "Setup" );
+      Assert.assertTrue( "Failed to get index of setup tab", setupTabIndex != -1 )
+      singlePane.setCurrentGradleTab( setupTabIndex );
+
+      //still should not show the component (its not yet visible, but is about to be)
+      Assert.assertFalse( hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( hierarchyAdapter.componentWasHidden )
+
+
+      //This shows and hides the UI, giving it time to actually show itself and empty the event dispatch
+      //queue. This is required for the setup tab to become current as well as show the custom component we added.
+      openApi.flushEventQueue( frame )
+
+      Assert.assertEquals( "The setup tab was not selected", setupTabIndex, singlePane.getCurrentGradleTab() )
+
+      //now the label should have been made visible then invisible
+      Assert.assertTrue( hierarchyAdapter.componentWasShown )
+      Assert.assertTrue( hierarchyAdapter.componentWasHidden )
+    }
+
+    /**
+    * This verifies that you can add a custom tab to the UI. This is a UI test and is kinda tricky. We're going
+    * to use a HierarchyListener to see if our tab component is made visible. This will confirm if it was added or not
+    * because it must be added to be made visible. To do this, however, we'll need to actually show the UI. All we're
+    * really doing here, is adding a tab to the UI, then adding the UI to a frame, then showing the frame so we can
+    * then verify that our tab was shown (actually using our tab's component).
+    */
+    @Test
+    public void testAddingCustomTab()
+    {
+      if ( java.awt.GraphicsEnvironment.isHeadless() ) {
+        return;  // Can't run this test in headless mode!
+      }
+
+      TestTab testTab = new TestTab()
+
+      SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+
+      //make sure we haven't been told the component was shown or hidden yet
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
+
+      //make sure things are initialized properly. These should all be false
+      Assert.assertFalse( testTab.nameRetrieved );
+      Assert.assertFalse( testTab.informedAboutToShow );
+      Assert.assertFalse( testTab.componentCreated );
+
+      int originalCount = singlePane.getGradleTabCount();
+
+      singlePane.addTab( 99, testTab ) //I don't really care about the index. It should accept a number that is too large and handle it appropriately.
+
+      singlePane.aboutToShow()
+
+      //this still should not show the component (at this point, we're probably more testing that our hierarchyAdapter is working)
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
+
+      //now create a frame, place the UI in it, then show it briefly
+      JFrame frame = openApi.open( singlePane )
+
+      String testTabName = "Test Tab"
+
+      //set the test tab as the current tab. This is required to actually show the component.
+      int testTabIndex = singlePane.getGradleTabIndex( testTabName )
+      Assert.assertTrue( "Failed to get index of test tab", testTabIndex != -1 )
+      singlePane.setCurrentGradleTab( testTabIndex )
+
+      //just to test getGradleTabName, make sure it returns our tab name
+      Assert.assertEquals( testTabName, singlePane.getGradleTabName( testTabIndex ) )
+
+      //to test getGradleTabCount, make sure the tab count went up by 1
+      Assert.assertEquals( originalCount + 1, singlePane.getGradleTabCount() )
+
+      //still should not show the component (its not yet visible, but is about to be)
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
+
+      //This shows and hides the UI, giving it time to actually show itself and empty the event dispatch
+      //queue. This is required for the test tab to become current.
+      openApi.flushEventQueue( frame )
+
+      Assert.assertEquals( "The test tab was not selected", testTabIndex, singlePane.getCurrentGradleTab() )
+
+      //now the label should have been made visible then invisible
+      Assert.assertTrue( testTab.hierarchyAdapter.componentWasShown )
+      Assert.assertTrue( testTab.hierarchyAdapter.componentWasHidden )
+
+      //at the end, the name should have been queried, we should have been told we were about to shown, and the component should be created
+      Assert.assertTrue( testTab.nameRetrieved );
+      Assert.assertTrue( testTab.informedAboutToShow );
+      Assert.assertTrue( testTab.componentCreated );
+
+      //reset the test tab (resets the listener so we can remove the tab and verify that it no longer shows up, as well as some of our test variables)
+      testTab.reset()
+      singlePane.removeTab( testTab )
+
+      //I'm going to set the current tab, but this shouldn't do anything because the tab was removed
+      singlePane.setCurrentGradleTab( testTabIndex );
+
+      //part of showing the UI is telling it its about to be shown. In this case, nothing should happen
+      //related to the test tab. It has been removed
+      singlePane.aboutToShow()
+
+      //This shows and hides the UI, giving it time to actually show itself and empty the event
+      //dispatch queue. This is required for the test tab to become current (were it still present).
+      openApi.flushEventQueue( frame )
+
+      //try to get the test tab
+      testTabIndex = singlePane.getGradleTabIndex( "Test Tab" );
+      Assert.assertTrue( "Erroneously got index of test tab. It was removed", testTabIndex == -1 )
+
+      //we've removed it, so it shouldn't have been polled about or informed of anything
+      Assert.assertFalse( testTab.nameRetrieved );
+      Assert.assertFalse( testTab.informedAboutToShow );
+      Assert.assertFalse( testTab.componentCreated );
+
+      //It was not shown after the reset, these should both be false
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasShown )
+      Assert.assertFalse( testTab.hierarchyAdapter.componentWasHidden )
+    }
+
+    /**
+    * We want to make sure the settings are working correctly here. This is the mechanism that
+     * handles saving/restoring the values within the UI and can be stored in different ways
+     * depending on how the UI integrated with its parent (its up to whoever implements
+     * SettingsNodeVersion1). Here, to spot check that the basics are working, we'll create a
+     * UI, set a value, close it, then recreate it using the same settings object. The values
+     * should be saved upon close and then restored.
+    */
+    @Test
+    public void testSettings()
+    {
+      TestSettingsNodeVersion1 settingsNode = new TestSettingsNodeVersion1();
+
+      TestSingleDualPaneUIInteractionVersion1 testSingleDualPaneUIInteractionVersion1 = new TestSingleDualPaneUIInteractionVersion1( new TestAlternateUIInteractionVersion1(), settingsNode );
+        SinglePaneUIVersion1 singlePane = null;
+        try {
+            singlePane = UIFactory.createSinglePaneUI(getClass().getClassLoader(), dist.getGradleHomeDir(), testSingleDualPaneUIInteractionVersion1, false );
+        } catch (Exception e) {
+            throw new AssertionFailedError( "Failed to extract single pane: Caused by " + e.getMessage() )
+        }
+
+        File illegalDirectory = dist.testFile( "non-existant" ).createDir();
+        if( illegalDirectory.equals( singlePane.getCurrentDirectory() ) ) {
+          throw new AssertionFailedError( "Directory already set to 'test' directory. The test is not setup correctly." );
+        }
+
+        //this is required to get the ball rolling
+        singlePane.aboutToShow();
+
+        //set the current directory after calling aboutToShow (otherwise, it'll stomp over us when it restores its default settings)
+        singlePane.setCurrentDirectory( illegalDirectory );
+
+        //close the UI. This saves the current settings.
+        singlePane.close();
+
+        //now instantiate it again
+        testSingleDualPaneUIInteractionVersion1 = new TestSingleDualPaneUIInteractionVersion1( new TestAlternateUIInteractionVersion1(), settingsNode );
+        try {
+            singlePane = UIFactory.createSinglePaneUI(getClass().getClassLoader(), dist.getGradleHomeDir(), testSingleDualPaneUIInteractionVersion1, false );
+        } catch (Exception e) {
+            throw new AssertionFailedError( "Failed to extract single pane (second time): Caused by " + e.getMessage() )
+        }
+
+        //this should restore the previous settings
+        singlePane.aboutToShow();
+
+        Assert.assertEquals( illegalDirectory, singlePane.getCurrentDirectory() );
+    }
+
+    /**
+     * This tests that the command line altering mechanism works. This adds additional
+     * things to the command line being executed. This is used by gradle build systems
+     * that need custom, system-specific arguments passed to it that aren't known by gradle
+     * proper. For example: you're working with a large project made of MANY subprojects, a
+     * custom IDE plugin can track which projects you're focusing on and pass that information
+     * to the build system via this mechanism, so it only builds appropriate projects.
+     * This is awkward to test because its real use requires a customized build system,
+     * so I'm going to pass an argument that is illegal by itself -- meaning no tasks
+     * are specified. Then I'll alter the command line by adding an actual task. Then
+     * wait for it to complete and verify what was executed
+    */
+    @Test
+    public void testCommandLineAlteringListener()
+    {
+      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
+
+      //this starts the execution queue. This also initiates a refresh that we'll ignore later.
+      dualPane.aboutToShow()
+
+      //add a request observer so we can observe when the command is finished. This allows us to
+      //see what was actually executed.
+      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.EXECUTION_TYPE )
+      gradleInterface.addRequestObserver( testRequestObserver )
+
+      //now that we know that command is illegal by itself, try it again but the listener will append 'build'
+      //to the command line which makes it legal (again, we don't really care what we execute.
+      TestCommandLineArgumentAlteringListenerVersion1 commandLineArgumentAlteringListener = new TestCommandLineArgumentAlteringListenerVersion1("classes")
+      gradleInterface.addCommandLineArgumentAlteringListener( commandLineArgumentAlteringListener )
+
+      //execute this before we do our test. This is not legal by itself. It should fail. That means our
+      //test is setup correctly. For example: if someone adds a default task to this project, this will
+      //generate NO error and thus, our test will prove nothing. If you get a test failure here, you
+      //can try changing the command line to something that's illegal by itself (we don't care what).
+      RequestVersion1 request = gradleInterface.executeCommand2("-s", "test command")
+
+      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
+
+      Assert.assertThat( testRequestObserver.request.getFullCommandLine(), startsWith( "-s " ) )
+      Assert.assertThat( testRequestObserver.request.getFullCommandLine(), endsWith( " classes" ) )
+
+      //make sure it completed execution correctly
+      Assert.assertEquals( "Execution failed with return code: " + testRequestObserver.result + "\nOutput:\n" + testRequestObserver.output , 0, testRequestObserver.result )
+
+      //the request that was executed should be equal to our original command with our 'altered' command added to it
+      Assert.assertNotNull( "Missing 'execution completed' request", testRequestObserver.request )
+
+      //just to be paranoid, let's make sure it was actually our request. If this fails, it probably represents something
+      //fundamentally flawed with the request or request wrapper mechanism.
+      Assert.assertEquals( request, testRequestObserver.request )
+
+      gradleInterface.removeRequestObserver( testRequestObserver )
+      gradleInterface.removeCommandLineArgumentAlteringListener( commandLineArgumentAlteringListener )
+    }
+
+   /**
+    * This tests that getVersion returns the same thing as the jar's suffix.
+    * We'll get the gradle jar, then strip off its extension and verify that
+    * the jar's name ends with the version number.
+    */
+  @Test
+  public void testVersion()
+  {
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+    String version = ( (GradleInterfaceVersion2) singlePane.getGradleInterfaceVersion1()).getVersion()
+
+    Assert.assertNotNull( "null version number", version )
+
+    Assert.assertFalse( "Empty version number", version.trim().equals( "" ) )       //shouldn't be empty
+
+    File gradleJar = ExternalUtility.getGradleJar(dist.gradleHomeDir)
+
+    Assert.assertNotNull( "Missing gradle jar", gradleJar )                         //we should have a gradle jar
+
+    int indexOfExtension = gradleJar.getName().toLowerCase().lastIndexOf( ".jar" )  //get the index of its extension
+
+    Assert.assertTrue( "Has no '.jar' extension", indexOfExtension != -1 )          //it had better have an extension
+
+    String name = gradleJar.getName().substring( 0, indexOfExtension )              //get its name minus the extension
+
+    Assert.assertTrue( "Jar name doesn't end with version", name.endsWith( version ) )  //the name (minus extension) should end with the version
+  }
+
+  /**
+   * This is just a spot check that getGradleHomeDirectory works. Its based off
+   * of the gradle you're running.
+   */
+  @Test
+  public void testGradleHomeDirectory()
+  {
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+
+    Assert.assertEquals( dist.gradleHomeDir, singlePane.getGradleHomeDirectory() )
+  }
+
+
+  /**
+   * This is just a spot check that we can get an instance of the OutputUILord.
+   * Other tests cover its functionality more thoroughly. This is just to make sure
+   * its working when accessed via the Open API.
+   */
+  @Test
+  public void testOutputUILord()
+  {
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
+    Assert.assertNotNull( outputUILord )
+  }
+
+  /**
+   * This tests that you can correctly obtain the number of output tabs from a
+   * dual pane UI. This
+   */
+  @Test
+  public void testDualPaneOutputPaneNumber()
+  {
+    if ( java.awt.GraphicsEnvironment.isHeadless() ) {
+      return;  // Can't run this test in headless mode!
+    }
+
+    DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+
+    //now create a frame, place the UI in it, then show it briefly
+    JFrame frame = openApi.open(dualPane)
+
+    //make sure we got something
+    Assert.assertNotNull( dualPane )
+
+    //tell it we're about to show it, so it'll create a component
+    dualPane.aboutToShow()
+
+    dualPane.refreshTaskTree()
+
+    openApi.flushEventQueue( frame )
+
+    //there should be one opened output tab for the refresh
+    Assert.assertEquals( 1, dualPane.getNumberOfOpenedOutputTabs() )
+
+    dualPane.executeCommand( "build", "build" )
+
+    openApi.flushEventQueue( frame )
+
+    //there should be 2 opened output tabs. One for refresh, one for build
+    Assert.assertEquals( 2, dualPane.getNumberOfOpenedOutputTabs() )
+  }
+
+   /**
+  * This tests whether or not a the UI is considered busy. Its busy if its
+    * executing a command. To test this, we'll execute a command and verify
+    * we're busy. When it finishes, we'll verify we're not longer busy.
+    * We'll also check that canClose works properly. If we're busy, calling
+    * canClose should prompt the user to confirm closing and return their
+    * answer. If we're not busy, it should not prompt the user and return
+    * true.
+   */
+  @Test
+  public void testBusy()
+  {
+      DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
+
+      //this starts the execution queue. This also initiates a refresh that we'll ignore later.
+      dualPane.aboutToShow()
+
+      //add a request observer so we can observe when the command is finished.
+      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.EXECUTION_TYPE )
+      gradleInterface.addRequestObserver( testRequestObserver )
+
+      gradleInterface.executeCommand("build", "test command")
+
+      //now that there's a real command in the queue, we should be considered busy
+      Assert.assertTrue( dualPane.isBusy() )
+      Assert.assertTrue( gradleInterface.isBusy() )
+
+      //we're busy, we shouldn't be able to close
+      TestCloseInteraction testCloseInteraction = new TestCloseInteraction( false )
+      Assert.assertFalse( dualPane.canClose( testCloseInteraction ) )
+
+      //since we just asked to close and we're busy, make sure we prompted the user
+      Assert.assertTrue( testCloseInteraction.wasPromptedToConfirmClose )
+
+      testRequestObserver.waitForRequestExecutionComplete(120, TimeUnit.SECONDS)
+
+      Assert.assertThat( testRequestObserver.request.getFullCommandLine(), startsWith( "build" ) )
+
+      //make sure it completed execution correctly
+      Assert.assertEquals( "Execution failed with return code: " + testRequestObserver.result + "\nOutput:\n" + testRequestObserver.output , 0, testRequestObserver.result )
+
+      //make sure we're not longer considered busy
+      Assert.assertFalse( dualPane.isBusy() )
+      Assert.assertFalse( gradleInterface.isBusy() )
+
+      //make sure we can close now
+      testCloseInteraction = new TestCloseInteraction( false )
+      Assert.assertTrue( dualPane.canClose( testCloseInteraction ) )
+
+      //since we just asked to close and we're NOT busy, make sure we did NOT prompt the user
+      Assert.assertFalse( testCloseInteraction.wasPromptedToConfirmClose )
+
+      gradleInterface.removeRequestObserver( testRequestObserver )
+  }
+
+   /**
+   * This tests that we can set a custom gradle executor.
+    */
+    @Test
+    public void testSettingCustomGradleExecutor()
+    {
+       DualPaneUIVersion1 dualPane = openApi.createDualPaneUI()
+      GradleInterfaceVersion2 gradleInterface = (GradleInterfaceVersion2) dualPane.getGradleInterfaceVersion1()
+
+      //it should be null by default
+      Assert.assertNull( gradleInterface.getCustomGradleExecutable() )
+
+      //now let's set it to a custom gradle executable. Actually, we're not going to really get
+      //a custom one; we'll use the normal one. Why? Because a real custom one would probably
+      //become a pain for maintaining this test. Here, we're interested that the basics are working
+      //from an open-api standpoint.
+      File gradleExecutor = getCustomGradleExecutable()
+
+      gradleInterface.setCustomGradleExecutable( gradleExecutor )
+
+      //make sure it was set
+      Assert.assertEquals( gradleExecutor, gradleInterface.getCustomGradleExecutable() )
+      Assert.assertEquals( gradleExecutor, dualPane.getCustomGradleExecutable() ) //just another way to get it
+
+      //add a request observer so we can observe when the command is finished.
+      BlockingRequestObserver testRequestObserver = new BlockingRequestObserver( RequestVersion1.REFRESH_TYPE )
+      gradleInterface.addRequestObserver( testRequestObserver )
+
+      //this starts the execution queue
+      dualPane.aboutToShow()
+
+      dualPane.refreshTaskTree()
+
+      testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
+
+      //make sure it completed execution correctly
+      Assert.assertEquals( "Execution failed with return code: " + testRequestObserver.result + "\nOutput:\n" + testRequestObserver.output , 0, testRequestObserver.result )
+
+      gradleInterface.removeRequestObserver( testRequestObserver )
+    }
+
+   /**
+    * This gets a gradle executable. That is, a way to launch gradle (shell script or batch file).
+    */
+    private File getCustomGradleExecutable()
+    {
+      //now let's set it to a custom gradle executable. We'll just point it to the regular
+      //gradle file (but it'll be the custom one.
+      String name = OperatingSystem.current().getScriptName("bin/gradle");
+
+      File gradleExecutor = new File( dist.getGradleHomeDir(), name )
+
+      //make sure the executable exists
+      Assert.assertTrue( "Missing gradle executable at: " + gradleExecutor, gradleExecutor.exists() )
+
+      return gradleExecutor
+    }
+}
+
+  /**
+   * Inner class for tracking a component's visiblity has changed.
+   * A HierarchyListener is how Swing notifies you that a component's visibility has changed.
+   * We'll use it to track if the component was shown and then hidden.
+   */
+    private class TestVisibilityHierarchyListener implements HierarchyListener
+    {
+      private boolean componentWasShown = false;
+      private boolean componentWasHidden = false;
+
+       public void hierarchyChanged(HierarchyEvent e)
+       {
+         if((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)!=0)
+         {
+            if( e.getComponent().isShowing() ) {
+              componentWasShown = true;
+            }
+            else {
+              componentWasHidden = true;
+            }
+         }
+       }
+     }
+
+ /**
+ * A class that manages a dummy gradle tab. It just consists of a label,
+ *  but tracks that certain fields were called.
+  */
+  public class TestTab implements GradleTabVersion1
+  {
+    private JLabel label = new JLabel("Testing Testing 123")
+    private TestVisibilityHierarchyListener hierarchyAdapter = new TestVisibilityHierarchyListener()
+    private boolean nameRetrieved
+    private boolean informedAboutToShow
+    private boolean componentCreated
+
+    def TestTab() {
+      label.addHierarchyListener( hierarchyAdapter )
+    }
+
+    private void reset() {
+      label.removeHierarchyListener( hierarchyAdapter )         //remove the existing listener
+      hierarchyAdapter = new TestVisibilityHierarchyListener()  //create a new one
+      label.addHierarchyListener( hierarchyAdapter )            //add it
+
+      nameRetrieved = false
+      informedAboutToShow = false
+      componentCreated = false
+    }
+
+    String getName() {
+      nameRetrieved = true;
+      return "Test Tab";
+    }
+
+    Component createComponent() {
+      componentCreated = true;
+      return label;
+    }
+
+    void aboutToShow() {
+      informedAboutToShow = true;
+    }
+  }
+
+  /**
+   * Class that tracks whether we were prompted to confirm close. It also returns a specific
+   * value to that prompt.
+   */
+    private class TestCloseInteraction implements BasicGradleUIVersion1.CloseInteraction
+    {
+      boolean wasPromptedToConfirmClose
+      boolean promptResult
+
+
+
+      def TestCloseInteraction(promptResult) {
+        this.promptResult = promptResult;
+      }
+
+      boolean promptUserToConfirmClosingWhileBusy() {
+        wasPromptedToConfirmClose = true
+        return promptResult
+      }
+    }
+
+  /**
+   * This appends a specified string to the command line when executing a command. 
+   */
+  private class TestCommandLineArgumentAlteringListenerVersion1 implements CommandLineArgumentAlteringListenerVersion1
+  {
+    private final String additionalArguments;
+
+    def TestCommandLineArgumentAlteringListenerVersion1(additionalArguments) {
+      this.additionalArguments = additionalArguments;
+    }
+
+    String getAdditionalCommandLineArguments(String commandLineArguments) {
+      if( commandLineArguments.startsWith( "-s " ) ) {  //we're only interested in altering this one command
+        return additionalArguments;
+      }
+
+      return null;
+    }
+  }
diff --git a/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OutputUILordTest.groovy b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OutputUILordTest.groovy
new file mode 100644
index 0000000..85d6439
--- /dev/null
+++ b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/OutputUILordTest.groovy
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.openapi;
+
+
+import java.awt.Font
+import java.util.concurrent.TimeUnit
+import javax.swing.UIManager
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.TestResources
+import org.gradle.openapi.external.ui.OutputUILordVersion1
+import org.gradle.openapi.external.ui.SinglePaneUIVersion1
+import org.junit.Assert
+import org.junit.Rule
+import org.junit.Test
+import static org.hamcrest.Matchers.startsWith
+
+/**
+ * Tests aspects of the OutputUILord in OpenAPI
+ *
+ * @author mhunsicker
+ */
+public class OutputUILordTest  {
+  @Rule public final GradleDistribution dist = new GradleDistribution()
+  @Rule public final OpenApiFixture openApi = new OpenApiFixture()
+  @Rule public final TestResources resources = new TestResources('testProject')
+
+  /**
+  * This verifies that you can add file extension to the output lord. This is for
+  * highlighting file links in the output. Here, we're just interested in whether
+  * or not the functions work via/exists in the Open API. The actual functionality
+  * is tested elsewhere.
+  */
+  @Test
+  public void testAddingFileExtension()
+  {
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
+
+    outputUILord.addFileExtension( '.txt', ':' )
+    List extensions = outputUILord.getFileExtensions()
+    Assert.assertTrue( extensions.contains( '.txt' ) )
+  }
+
+  /**
+  * This verifies that you can add prefixed file extensions to the output lord. This
+  * is for highlighting file links in the output. Here, we're just interested in whether
+  * or not the functions work via/exists in the Open API. The actual functionality is tested elsewhere.
+  */
+  @Test
+  public void testAddingPrefixedFileLink()
+  {
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
+
+    outputUILord.addPrefixedFileLink( "Error Text", "The error is:", ".txt", ":" )
+  }
+
+  /**
+  * This tests setting the font. There's not much here to do other than set it and then
+  * get it, making sure its the same. This isn't worried so much about the font itself as
+  * much as the open API doesn't have a problem with setting the font.
+  */
+  @Test
+  public void testFont()
+  {
+    if ( java.awt.GraphicsEnvironment.isHeadless() ) {
+       return;  // Can't run this test in headless mode!
+    }
+
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
+    Font font = UIManager.getFont( "Button.font" )  //this specific font is not important
+
+    //make sure that the above font doesn't happen to be the default font for the output lord. If it
+    //is, this test will silently succeed even if it should fail.
+    Assert.assertNotSame( "Fonts are the same. This test is not setup correctly.", font, outputUILord.getOutputTextFont() )
+
+    //now set the new font and then make sure it worked
+    outputUILord.setOutputTextFont( font )
+  }
+
+  /**
+  *
+  */
+  @Test
+  public void testReExecute()
+  {
+    SinglePaneUIVersion1 singlePane = openApi.createSinglePaneUI()
+    OutputUILordVersion1 outputUILord = singlePane.getOutputLord()
+
+    //this starts the execution queue. This also initiates a refresh that we'll ignore later.
+    singlePane.aboutToShow()
+
+    BlockingRequestObserver testRequestObserver = new BlockingRequestObserver()
+    singlePane.getGradleInterfaceVersion1().addRequestObserver( testRequestObserver )
+
+    //now execute a command
+    singlePane.executeCommand( "build", "test build")
+
+    //wait for it to complete
+    testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
+    testRequestObserver.reset()
+
+    //now the single command we're trying to test
+    outputUILord.reExecuteLastCommand();
+
+    //wait again for it exit
+    testRequestObserver.waitForRequestExecutionComplete(80, TimeUnit.SECONDS)
+
+    //make sure it executed the correct request
+    Assert.assertThat( testRequestObserver.request.getFullCommandLine(), startsWith('build') )
+  }
+}
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestAlternateUIInteractionVersion1.java b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestAlternateUIInteractionVersion1.java
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestAlternateUIInteractionVersion1.java
rename to subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestAlternateUIInteractionVersion1.java
diff --git a/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSettingsNodeVersion1.java b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSettingsNodeVersion1.java
new file mode 100644
index 0000000..63cb847
--- /dev/null
+++ b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSettingsNodeVersion1.java
@@ -0,0 +1,247 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests.openapi;
+
+import org.gradle.openapi.external.ui.SettingsNodeVersion1;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Implementation of settings node. It basically mirrors a DOM.
+ *
+ * @author mhunsicker
+ */
+public class TestSettingsNodeVersion1 implements SettingsNodeVersion1 {
+
+    private String name;
+    private String value;
+    private HashMap<String, String> attributes = new HashMap<String, String>();
+    private SettingsNodeVersion1 parent;
+    private List<SettingsNodeVersion1> children = new ArrayList<SettingsNodeVersion1>();
+
+    public TestSettingsNodeVersion1() {
+        //this creates a root settings node.
+    }
+
+    public TestSettingsNodeVersion1(SettingsNodeVersion1 parent) {
+        this.parent = parent;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValueOfChild(String name, String value) {
+        SettingsNodeVersion1 settingsNode = addChildIfNotPresent(name);
+        settingsNode.setValue(value);
+    }
+
+    public String getValueOfChild(String name, String defaultValue) {
+        SettingsNodeVersion1 settingsNode = getChildNode(name);
+        if (settingsNode != null) {
+            String value = settingsNode.getValue();
+            if (value != null) {
+                return value;
+            }
+        }
+        return defaultValue;
+    }
+
+    public SettingsNodeVersion1 getChildNode(String name) {
+        Iterator<SettingsNodeVersion1> iterator = children.iterator();
+        while (iterator.hasNext()) {
+            SettingsNodeVersion1 childNode = iterator.next();
+            if (name.equals(childNode.getName())) {
+                return childNode;
+            }
+        }
+        return null;
+    }
+
+    public List<SettingsNodeVersion1> getChildNodes() {
+        return children;
+    }
+
+    public List<SettingsNodeVersion1> getChildNodes(String name) {
+        List<SettingsNodeVersion1> children = new ArrayList<SettingsNodeVersion1>();
+
+        Iterator<SettingsNodeVersion1> iterator = children.iterator();
+        while (iterator.hasNext()) {
+            SettingsNodeVersion1 childNode = iterator.next();
+            if (name.equals(childNode.getName())) {
+                children.add(childNode);
+            }
+        }
+
+        return children;
+    }
+
+    public int getValueOfChildAsInt(String name, int defaultValue) {
+        SettingsNodeVersion1 settingsNode = getChildNode(name);
+        if (settingsNode != null) {
+            String value = settingsNode.getValue();
+
+            try {
+                if (value != null) {
+                    return Integer.parseInt(value);
+                }
+            } catch (NumberFormatException e) {
+                //we couldn't parse it. Just return the default.
+            }
+        }
+        return defaultValue;
+    }
+
+    public void setValueOfChildAsInt(String name, int value) {
+        setValueOfChild(name, Integer.toString(value));
+    }
+
+    public long getValueOfChildAsLong(String name, long defaultValue) {
+        SettingsNodeVersion1 settingsNode = getChildNode(name);
+        if (settingsNode != null) {
+            String value = settingsNode.getValue();
+
+            try {
+                if (value != null) {
+                    return Long.parseLong(value);
+                }
+            } catch (NumberFormatException e) {
+                //we couldn't parse it. Just return the default.
+            }
+        }
+        return defaultValue;
+    }
+
+    public void setValueOfChildAsLong(String name, long value) {
+        setValueOfChild(name, Long.toString(value));
+    }
+
+    public boolean getValueOfChildAsBoolean(String name, boolean defaultValue) {
+        SettingsNodeVersion1 settingsNode = getChildNode(name);
+        if (settingsNode != null) {
+            String value = settingsNode.getValue();
+
+            //I'm not calling 'Boolean.parseBoolean( value )' because it will return false if the value isn't true/false
+            //and we want it to return whatever the default is if its not a boolean.
+            if (value != null) {
+                if ("true".equalsIgnoreCase(value)) {
+                    return true;
+                }
+
+                if ("false".equalsIgnoreCase(value)) {
+                    return false;
+                }
+            }
+        }
+
+        return defaultValue;
+    }
+
+    public void setValueOfChildAsBoolean(String name, boolean value) {
+        setValueOfChild(name, Boolean.toString(value));
+    }
+
+    public SettingsNodeVersion1 addChild(String name) {
+        SettingsNodeVersion1 childNode = new TestSettingsNodeVersion1(this);
+        childNode.setName(name);
+
+        children.add(childNode);
+        return childNode;
+    }
+
+    public SettingsNodeVersion1 addChildIfNotPresent(String name) {
+        SettingsNodeVersion1 settingsNode = getChildNode(name);
+        if (settingsNode == null) {
+            settingsNode = addChild(name);
+        }
+
+        return settingsNode;
+    }
+
+    public SettingsNodeVersion1 getNodeAtPath(String... pathPortions) {
+        if (pathPortions == null || pathPortions.length == 0) {
+            return null;
+        }
+
+        String firstPathPortion = pathPortions[0];
+
+        SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
+
+        int index = 1; //Skip the first one. we've already used that one.
+        while (index < pathPortions.length && currentNode != null) {
+            String pathPortion = pathPortions[index];
+            currentNode = currentNode.getChildNode(pathPortion);
+            index++;
+        }
+
+        return currentNode;
+    }
+
+    private SettingsNodeVersion1 getNodeAtPathCreateIfNotFound(String... pathPortions) {
+        if (pathPortions == null || pathPortions.length == 0) {
+            return null;
+        }
+
+        String firstPathPortion = pathPortions[0];
+
+        SettingsNodeVersion1 currentNode = getChildNode(firstPathPortion);
+        if (currentNode == null) {
+            currentNode = addChild(firstPathPortion);
+        }
+
+        int index = 1;
+        while (index < pathPortions.length) {
+            String pathPortion = pathPortions[index];
+            currentNode = currentNode.getChildNode(pathPortion);
+            if (currentNode == null) {
+                currentNode = addChild(firstPathPortion);
+            }
+
+            index++;
+        }
+
+        return currentNode;
+    }
+
+    public void removeFromParent() {
+        ((TestSettingsNodeVersion1) this.parent).children.remove(this);
+        this.parent = null;
+    }
+
+    public void removeAllChildren() {
+        children.clear();
+    }
+
+    @Override
+    public String toString() {
+        return getName() + "='" + getValue() + "' " + children.size() + " children";
+    }
+}
diff --git a/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSingleDualPaneUIInteractionVersion1.java b/subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSingleDualPaneUIInteractionVersion1.java
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSingleDualPaneUIInteractionVersion1.java
rename to subprojects/open-api/src/integTest/groovy/org/gradle/integtests/openapi/TestSingleDualPaneUIInteractionVersion1.java
diff --git a/subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/build.gradle b/subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/build.gradle
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/build.gradle
rename to subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/build.gradle
diff --git a/subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/settings.gradle b/subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/settings.gradle
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/settings.gradle
rename to subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/CrossVersionCompatibilityIntegrationTest/shared/settings.gradle
diff --git a/subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/build.gradle b/subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/build.gradle
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/build.gradle
rename to subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/build.gradle
diff --git a/subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/settings.gradle b/subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/settings.gradle
similarity index 100%
rename from subprojects/gradle-open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/settings.gradle
rename to subprojects/open-api/src/integTest/resources/org/gradle/integtests/openapi/testproject/settings.gradle
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/foundation/BootstrapLoader.java b/subprojects/open-api/src/main/groovy/org/gradle/foundation/BootstrapLoader.java
new file mode 100644
index 0000000..1c30952
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/foundation/BootstrapLoader.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ This handles the work of loading gradle dynamically. Due to jar version issues,
+ you can't just load all jar files.
+
+ This does NOT require any system or environment variables to be set.
+
+ To use this, instantiate this, then call one of the initialize functions.
+ Now you can get the class loader to load whatever classes you like.
+
+ @author mhunsicker
+  */
+public class BootstrapLoader {
+    private URLClassLoader libClassLoader;
+
+    public void initialize(File gradleHome, boolean bootStrapDebug) throws Exception {
+        initialize(ClassLoader.getSystemClassLoader().getParent(), gradleHome, false, true, bootStrapDebug);
+    }
+
+    /*
+      Call this to initialize gradle.
+      @param  parentClassloader    a parent class loader. Probably whatever class loader
+                                   is used by the caller.
+      @param  gradleHome           the root directory where gradle is installed. This
+                                   directory should have a 'bin' child directory.
+      @param  useParentLastClassLoader true to use a class loader that will delegate
+                                   to the parent only if it can't find it locally. This
+                                   should only be true if you're trying to load gradle
+                                   dynamically from another application.
+      @param  loadOpenAPI          True to load the gradle open API, false not to.
+                                   If you're calling this from a tool using the OpenAPI,
+                                   then you've probably already loaded it, so pass in false
+                                   here, otherwise, pass in true.
+      @param  bootStrapDebug       true to output debug information about the loading
+                                   process.
+      @throws Exception            if something goes wrong.
+      @author mhunsicker
+   */
+    public void initialize(ClassLoader parentClassloader, File gradleHome, boolean useParentLastClassLoader, boolean loadOpenAPI, boolean bootStrapDebug) throws Exception {
+        if (gradleHome == null || !gradleHome.exists()) {
+            throw new RuntimeException("Gradle home not defined!");
+        }
+
+        if (bootStrapDebug) {
+            System.out.println("Gradle Home is declared by system property gradle.home to: " + gradleHome.getAbsolutePath());
+        }
+
+        System.setProperty("gradle.home", gradleHome.getAbsolutePath());
+
+        List<URL> loggingJars = toUrl(getLoggingJars());
+
+        List<File> nonLoggingJarFiles = getNonLoggingJars();
+        removeUnwantedJarFiles(nonLoggingJarFiles, loadOpenAPI);
+        List<URL> nonLoggingJars = toUrl(nonLoggingJarFiles);
+
+        if (bootStrapDebug) {
+            System.out.println("Parent Classloader of new context classloader is: " + parentClassloader);
+            System.out.println("Adding the following files to new logging classloader: " + loggingJars);
+            System.out.println("Adding the following files to new lib classloader: " + nonLoggingJars);
+        }
+
+        URLClassLoader loggingClassLoader = new URLClassLoader(loggingJars.toArray(new URL[loggingJars.size()]), parentClassloader);
+
+        if (useParentLastClassLoader) {
+            libClassLoader = new ParentLastClassLoader(nonLoggingJars.toArray(new URL[nonLoggingJars.size()]), loggingClassLoader);
+        } else {
+            libClassLoader = new URLClassLoader(nonLoggingJars.toArray(new URL[nonLoggingJars.size()]), loggingClassLoader);
+        }
+
+        if (bootStrapDebug) {
+            System.out.println("Logging class loader: " + loggingClassLoader);
+            System.out.println("Lib class loader: " + libClassLoader);
+        }
+    }
+
+    public static File[] getGradleHomeLibClasspath() {
+        File gradleHomeLib = new File(System.getProperty("gradle.home") + "/lib");
+        if (gradleHomeLib.isDirectory()) {
+            return gradleHomeLib.listFiles();
+        }
+        return new File[0];
+    }
+
+    public static List<File> getNonLoggingJars() {
+        List<File> pathElements = new ArrayList<File>();
+        for (File file : getGradleClasspath()) {
+            if (!isLogLib(file)) {
+                pathElements.add(file);
+            }
+        }
+        return pathElements;
+    }
+
+    public static List<File> getLoggingJars() {
+        List<File> pathElements = new ArrayList<File>();
+        for (File file : getGradleClasspath()) {
+            if (isLogLib(file)) {
+                pathElements.add(file);
+            }
+        }
+        return pathElements;
+    }
+
+    private static boolean isLogLib(File file) {
+        return file.getName().startsWith("logback") || file.getName().startsWith("slf4j");
+    }
+
+    public static List<File> getGradleClasspath() {
+        File customGradleBin = null;
+        List<File> pathElements = new ArrayList<File>();
+        if (System.getProperty("gradle.bootstrap.gradleBin") != null) {
+            customGradleBin = new File(System.getProperty("gradle.bootstrap.gradleBin"));
+            pathElements.add(customGradleBin);
+        }
+        for (File homeLibFile : getGradleHomeLibClasspath()) {
+            if (homeLibFile.isFile() && !(customGradleBin != null && homeLibFile.getName().startsWith("gradle-"))) {
+                pathElements.add(homeLibFile);
+            }
+        }
+        return pathElements;
+    }
+
+    /*
+      This removes unwanted jar files. At the time of this writing, we're only
+      interested in the open api jar.
+
+      @param  nonLoggingJarFiles a list of jar files
+      @param  loadOpenAPI        true to keep the open api jar, false to remove it.
+      @author mhunsicker
+   */
+    private void removeUnwantedJarFiles(List<File> nonLoggingJarFiles, boolean loadOpenAPI) {
+        if (loadOpenAPI) {
+            return;
+        }
+
+        Iterator<File> iterator = nonLoggingJarFiles.iterator();
+        while (iterator.hasNext()) {
+            File file = iterator.next();
+            if (file.getName().startsWith("gradle-open-api-")) {
+                iterator.remove();
+            }
+        }
+    }
+
+    /*
+      Call this to get the class loader you can use to load gradle classes.
+      @return a URLClassLoader
+      @author mhunsicker
+   */
+    public URLClassLoader getClassLoader() {
+        return libClassLoader;
+    }
+
+    public Class load(String classPath) throws Exception {
+        return libClassLoader.loadClass(classPath);
+    }
+
+    private static List<URL> toUrl(List<File> files) throws MalformedURLException {
+        List<URL> result = new ArrayList<URL>();
+        for (File file : files) {
+            result.add(file.toURI().toURL());
+        }
+        return result;
+    }
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/foundation/ParentLastClassLoader.java b/subprojects/open-api/src/main/groovy/org/gradle/foundation/ParentLastClassLoader.java
new file mode 100644
index 0000000..2cbcb49
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/foundation/ParentLastClassLoader.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import java.net.URLClassLoader;
+import java.net.URL;
+import java.net.URLStreamHandlerFactory;
+
+/**
+ * <p>This class loader delegates to the parent class loader ONLY if it cannot find it itself. This is meant to solve classloading issues when running something as, say, a plugin inside an application
+ * that may have already loaded a different version of some required jars. This makes sure it looks locally first. This is the opposite of a ClassLoader's typical behavior, but it necessary when you
+ * can't control the environment in which you're running.
+ *
+ * <p>Using this class can be very dangerous. You must carefully make sure you understand the ramifications of using this. You should also probably make this the first class loader between your plugin
+ * and the plugin's owner.
+ *
+ * @author mhunsicker
+ */
+public class ParentLastClassLoader extends URLClassLoader {
+    public ParentLastClassLoader(URL[] urls, ClassLoader parent) {
+        super(urls, parent);
+    }
+
+    public ParentLastClassLoader(URL[] urls) {
+        super(urls);
+    }
+
+    public ParentLastClassLoader(URL[] urls, ClassLoader parent, URLStreamHandlerFactory factory) {
+        super(urls, parent, factory);
+    }
+
+    /*
+    This has been overridden to look at the parent class loader last.
+    @author mhunsicker
+    */
+    @Override
+    public Class<?> loadClass(String name) throws ClassNotFoundException {
+        // First check whether it's already been loaded, if so use it
+        Class loadedClass = findLoadedClass(name);
+
+        // Not loaded, try to load it
+        if (loadedClass == null) {
+            try {
+                // Ignore parent delegation and just try to load locally
+                loadedClass = findClass(name);
+            } catch (ClassNotFoundException e) {
+                // Swallow exception - does not exist locally
+            }
+
+            // If not found locally, use normal parent delegation in URLClassloader
+            if (loadedClass == null) {
+                // throws ClassNotFoundException if not found in delegation hierarchy at all
+                loadedClass = super.loadClass(name);
+            }
+        }
+        // will never return null (ClassNotFoundException will be thrown)
+        return loadedClass;
+    }
+}
+
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ExternalUtility.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ExternalUtility.java
new file mode 100644
index 0000000..a10de5d
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ExternalUtility.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external;
+
+import org.gradle.foundation.BootstrapLoader;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.regex.Pattern;
+
+/**
+ * Utility functions required by the OpenAPI
+ *
+ * @author mhunsicker
+ */
+public class ExternalUtility {
+    private static final Pattern GRADLE_CORE_PATTERN = Pattern.compile("^gradle-core-\\d.*\\.jar$");
+
+    /**
+     * Call this to get a classloader that has loaded gradle.
+     *
+     * @param parentClassLoader Your classloader. Probably the classloader of whatever class is calling this.
+     * @param gradleHomeDirectory the root directory of a gradle installation
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     * @return a classloader that has loaded gradle and all of its dependencies.
+     * @author mhunsicker
+     */
+
+    public static ClassLoader getGradleClassloader(ClassLoader parentClassLoader, File gradleHomeDirectory, boolean showDebugInfo) throws Exception {
+        File gradleJarFile = getGradleJar(gradleHomeDirectory);
+        if (gradleJarFile == null) {
+            throw new RuntimeException("Not a valid gradle home directory '" + gradleHomeDirectory.getAbsolutePath() + "'");
+        }
+
+        System.setProperty("gradle.home", gradleHomeDirectory.getAbsolutePath());
+
+        BootstrapLoader bootstrapLoader = new BootstrapLoader();
+        bootstrapLoader.initialize(parentClassLoader, gradleHomeDirectory, true, false, showDebugInfo);
+        return bootstrapLoader.getClassLoader();
+    }
+
+    /**
+     * This locates the gradle jar. We do NOT want the gradle-wrapper jar.
+     *
+     * @param gradleHomeDirectory the root directory of a gradle installation. We're expecting this to have a child directory named 'lib'.
+     * @return the gradle jar file. Null if we didn't find it.
+     * @author mhunsicker
+     */
+    public static File getGradleJar(File gradleHomeDirectory) {
+        File libDirectory = new File(gradleHomeDirectory, "lib");
+        if (!libDirectory.exists()) {
+            return null;
+        }
+
+        //try to get the gradle.jar. It'll be "gradle-[version].jar"
+        File[] files = libDirectory.listFiles(new FileFilter() {
+            public boolean accept(File file) {
+                return GRADLE_CORE_PATTERN.matcher(file.getName()).matches();
+            }
+        });
+
+        if (files == null || files.length == 0) {
+            return null;
+        }
+
+        //if they've given us a directory with multiple gradle jars, tell them. We won't know which one to use.
+        if (files.length > 1) {
+            throw new RuntimeException("Installation has multiple gradle jars. Cannot determine which one to use. Found files: " + createFileNamesString(files));
+        }
+
+        return files[0];
+    }
+
+    private static StringBuilder createFileNamesString(File[] files) {
+        StringBuilder fileNames = new StringBuilder();
+        for (File f : files) {
+            fileNames.append(f.getName() + ", ");
+        }
+        fileNames.delete(fileNames.length() - 2, fileNames.length()); // Remove the trailing ', '
+        return fileNames;
+    }
+
+    //just a function to help debugging. If we can't find the constructor we want, this dumps out what is available.
+
+    public static String dumpConstructors(Class classInQuestion) {
+        StringBuilder builder = new StringBuilder();
+        Constructor[] constructors = classInQuestion.getConstructors();
+        for (int index = 0; index < constructors.length; index++) {
+            Constructor constructor = constructors[index];
+            builder.append(constructor).append('\n');
+        }
+
+        return builder.toString();
+    }
+
+    public static String dumpMethods(Class classInQuestion) {
+        StringBuilder builder = new StringBuilder();
+
+        Method[] methods = classInQuestion.getMethods();
+        for (int index = 0; index < methods.length; index++) {
+            Method method = methods[index];
+            builder.append(method).append('\n');
+        }
+
+        return builder.toString();
+    }
+
+    /**
+     * This attempts to load the a class from the specified gradle home directory.
+     *
+     * @param classToLoad the full path to the class to load
+     * @param parentClassLoader Your classloader. Probably the classloader of whatever class is calling this.
+     * @param gradleHomeDirectory the root directory of a gradle installation
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     */
+    public static Class loadGradleClass(String classToLoad, ClassLoader parentClassLoader, File gradleHomeDirectory, boolean showDebugInfo) throws Exception {
+        ClassLoader bootStrapClassLoader = getGradleClassloader(parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
+
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        try {
+            return bootStrapClassLoader.loadClass(classToLoad);
+        } catch (NoClassDefFoundError e) {  //might be a version mismatch
+            e.printStackTrace();
+            return null;
+        } catch (Throwable e) {  //might be a version mismatch
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    /**
+     * This wraps up invoking a static method into a single call.
+     *
+     * @param classToInvoke the class that has the method
+     * @param methodName the name of the method to invoke
+     * @param argumentsClasses the classes of the arguments (we can't determine this from the argumentValues because they can be of class A, but implement class B and B is be the argument type of the
+     * method in question
+     * @param argumentValues the values of the arguments.
+     * @return the return value of invoking the method.
+     */
+    public static Object invokeStaticMethod(Class classToInvoke, String methodName, Class[] argumentsClasses, Object... argumentValues) throws Exception {
+        Method method = null;
+        try {
+            method = classToInvoke.getDeclaredMethod(methodName, argumentsClasses);
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            System.out.println("Dumping available methods on " + classToInvoke.getName() + "\n" + ExternalUtility.dumpMethods(classToInvoke));
+            throw e;
+        }
+        return method.invoke(null, argumentValues);
+    }
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion1.java
new file mode 100644
index 0000000..6142d85
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion1.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.foundation;
+
+import org.gradle.openapi.external.ui.CommandLineArgumentAlteringListenerVersion1;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is an abstraction from Gradle that allows you to retrieve projects and views from it.
+ *
+ * This is a mirror of GradlePluginLord inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface GradleInterfaceVersion1 {
+
+    /**
+     * @return the root projects. It probably only has one.
+     */
+    public List<ProjectVersion1> getRootProjects();
+
+    /**
+     * This refreshes the projects and task list.
+     */
+    public void refreshTaskTree();
+
+    /**
+     * Determines if commands are currently being executed or not.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy();
+
+    /**
+     * Call this to execute the given gradle command.
+     *
+     * @param commandLineArguments the command line arguments to pass to gradle.
+     * @param displayName the name displayed in the UI for this command
+     */
+    public void executeCommand(String commandLineArguments, String displayName);
+
+    /**
+     * @return the root directory of your gradle project.
+     */
+    public File getCurrentDirectory();
+
+    /**
+     * @param currentDirectory the new root directory of your gradle project.
+     */
+    public void setCurrentDirectory(File currentDirectory);
+
+    /**
+     * @return the gradle home directory. Where gradle is installed.
+     */
+    public File getGradleHomeDirectory();
+
+    /**
+     * This is called to get a custom gradle executable file. If you don't run gradle.bat or gradle shell script to run gradle, use this to specify what you do run. Note: we're going to pass it the
+     * arguments that we would pass to gradle so if you don't like that, see alterCommandLineArguments. Normally, this should return null.
+     *
+     * @return the Executable to run gradle command or null to use the default
+     */
+    public File getCustomGradleExecutable();
+
+    /**
+     * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for
+     * example, an init script.
+     *
+     * @param listener the listener that modifies the command line arguments.
+     */
+    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener);
+
+    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener);
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion2.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion2.java
new file mode 100644
index 0000000..dbc817e
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/GradleInterfaceVersion2.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.foundation;
+
+import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is an abstraction from Gradle that allows you to retrieve projects and views from it.
+ *
+ * This is a mirror of GradlePluginLord inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface GradleInterfaceVersion2 extends GradleInterfaceVersion1 {
+
+    /**
+     * @return the version of gradle being run. This is basically the version from the jar file.
+     */
+    public String getVersion();
+
+    /**
+     * This refreshes the projects and task list.
+     */
+    public RequestVersion1 refreshTaskTree2();
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     *
+     * @param additionalCommandLineArguments additional command line arguments to be passed to gradle when refreshing the task tree.
+     * @return the request object. Useful if you want to track its completion via a RequestObserver
+     */
+    public RequestVersion1 refreshTaskTree2(String additionalCommandLineArguments);
+
+    /**
+     * Call this to execute the given gradle command.
+     *
+     * @param commandLineArguments the command line arguments to pass to gradle.
+     * @param displayName the name displayed in the UI for this command
+     * @return the request object. Useful if you want to track its completion via a RequestObserver
+     * @author mhunsicker
+     */
+    public RequestVersion1 executeCommand2(String commandLineArguments, String displayName);
+
+    /**
+     * Executes several favorites commands at once as a single command. This has the affect of simply concatenating all the favorite command lines into a single line.
+     *
+     * @param favorites a list of favorites. If just one favorite, it executes it normally. If multiple favorites, it executes them all at once as a single command. This blindly concatenates them so
+     * it may wind up with duplicate tasks on the command line.
+     * @return the request object. Useful if you want to track its completion via a RequestObserver
+     */
+    public RequestVersion1 executeFavorites(List<FavoriteTaskVersion1> favorites);
+
+    /**
+     * Sets a custom gradle executable. See getCustomGradleExecutable
+     *
+     * @param customGradleExecutor the path to an executable (or script/batch file)
+     */
+    public void setCustomGradleExecutable(File customGradleExecutor);
+
+    /**
+     * Adds an observer that is notified when Gradle commands are executed and completed.
+     *
+     * @param observer the observer that is notified
+     */
+    public void addRequestObserver(RequestObserverVersion1 observer);
+
+    /**
+     * Removes a request observer when you no longer wish to receive notifications about Gradle command being executed.
+     *
+     * @param observer the observer to remove
+     */
+    public void removeRequestObserver(RequestObserverVersion1 observer);
+}
\ No newline at end of file
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/ProjectVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/ProjectVersion1.java
new file mode 100644
index 0000000..366fe5c
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/ProjectVersion1.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.foundation;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is an abstraction of a Gradle project
+ *
+ * This is a mirror of ProjectView inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface ProjectVersion1 {
+
+    /**
+     * @return the name of this project
+     */
+    public String getName();
+
+    /**
+     * @return The full project name. This is just the project name if its off of the root. Otherwise, its all of its ancestors separated by colons with this project being last.
+     */
+    public String getFullProjectName();
+
+    /**
+     * @return the TaskVersion1 objects associated with this project
+     */
+    public List<TaskVersion1> getTasks();
+
+    /**
+     * @return the .gradle file this project is defined in
+     */
+    public File getFile();
+
+    /**
+     * @return the sub projects of this project
+     */
+    public List<ProjectVersion1> getSubProjects();
+
+    /**
+     * @return the parent of this project if this is a sub project. Otherwise, null
+     */
+    public ProjectVersion1 getParentProject();
+
+    /**
+     * @return a list of projects that this project depends on.
+     */
+    public List<ProjectVersion1> getDependantProjects();
+
+    public ProjectVersion1 getSubProject(String name);
+
+    public ProjectVersion1 getSubProjectFromFullPath(String fullProjectName);
+
+    public TaskVersion1 getTask(String name);
+
+    /**
+     * Builds a list of default tasks. These are defined by specifying
+     *
+     * defaultTasks 'task name'
+     *
+     * in the gradle file. There can be multiple default tasks. This only returns default tasks directly for this project and does not return them for subprojects.
+     *
+     * @return a list of default tasks or an empty list if none exist
+     */
+    public List<TaskVersion1> getDefaultTasks();
+
+    public TaskVersion1 getTaskFromFullPath(String fullTaskName);
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestObserverVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestObserverVersion1.java
new file mode 100644
index 0000000..97a7c30
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestObserverVersion1.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.foundation;
+
+/**
+ * This allows you to observer when Gradle commands are executed/complete. It is an abstraction of a GradlePluginLord.RequestObserver.
+ *
+ * <p>This is a mirror of GradlePluginLord.RequestObserver inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface RequestObserverVersion1 {
+
+    /**
+     * Notification that an execution request was added to the queue. This is the normal request that initiates a gradle command.
+     *
+     * @param request the request that was added
+     */
+    public void executionRequestAdded(RequestVersion1 request);
+
+    /**
+     * Notification that a refresh request was added to the queue. This type of request updates the task tree.
+     */
+    public void refreshRequestAdded(RequestVersion1 request);
+
+    /**
+     * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files. This is always called after a request has been added to the queue.
+     */
+    public void aboutToExecuteRequest(RequestVersion1 request);
+
+    /**
+     * Notification that a request has completed execution.
+     *
+     * @param request the original request containing the command that was executed
+     * @param result the result of the command
+     * @param output the output from gradle executing the command
+     */
+    public void requestExecutionComplete(RequestVersion1 request, int result, String output);
+}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestVersion1.java
similarity index 100%
rename from subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestVersion1.java
rename to subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/RequestVersion1.java
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/TaskVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/TaskVersion1.java
similarity index 100%
rename from subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/foundation/TaskVersion1.java
rename to subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/TaskVersion1.java
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoriteTaskVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoriteTaskVersion1.java
new file mode 100644
index 0000000..5b086f3
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoriteTaskVersion1.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.foundation.favorites;
+
+/**
+ * This is an abstraction from Gradle that allows you to work with a 'favorite' task.
+ *
+ * This is a mirror of FavoriteTask inside Gradle, but this is meant
+ * to aid backward and forward compatibility by shielding you from direct
+ * changes within gradle.
+ *
+ * You should not implement this yourself. Only use an implementation coming from Gradle.
+ *
+ * @author mhunsicker
+ */
+public interface FavoriteTaskVersion1 {
+    /**<!====== getFullCommandLine ============================================>
+       @return the command line that is executed
+       @author mhunsicker
+    <!=======================================================================>*/
+    public String getFullCommandLine();
+
+    /**<!====== getDisplayName ================================================>
+       @return a display name for this command
+       @author mhunsicker
+    <!=======================================================================>*/
+    public String getDisplayName();
+
+    /**<!====== alwaysShowOutput ==============================================>
+       @return true if executing this command should always show the output, false
+               to only show output if an error occurs.
+       @author mhunsicker
+    <!=======================================================================>*/
+    public boolean alwaysShowOutput();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoritesEditorVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoritesEditorVersion1.java
new file mode 100644
index 0000000..3e45cde
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/foundation/favorites/FavoritesEditorVersion1.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.foundation.favorites;
+
+import org.gradle.openapi.external.foundation.TaskVersion1;
+
+import java.awt.*;
+import java.util.List;
+
+/**
+ * This is an abstraction from Gradle that allows you to obtain and edit favorites.
+ *
+ * <p>This is a mirror of FavoritesEditor inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface FavoritesEditorVersion1 {
+
+    /**
+     * Adds the specified favorite.
+     *
+     * @param fullCommandLine the command line that this favorite executes
+     * @param displayName a more user-friendly name for the command
+     * @param alwaysShowOutput true to always show output when this favorite is executed. False to only show output when errors occur.
+     * @return the favorite added
+     */
+    public FavoriteTaskVersion1 addFavorite(String fullCommandLine, String displayName, boolean alwaysShowOutput);
+
+    /**
+     * Sets new values on the specified favorite task. This provides a simple way to programmatically edit favorite tasks.
+     *
+     * @param favoriteTask the favorite to edit
+     * @param newFullCommandLine the new command line
+     * @param newDisplayName the new display name
+     * @param newAlwaysShowOutput the new value for whether or not to always show output (vs only showing it when an error occurs).
+     * @returns null if successful otherwise, an error suitable for displaying to the user.
+     */
+    public String editFavorite(FavoriteTaskVersion1 favoriteTask, String newFullCommandLine, String newDisplayName, boolean newAlwaysShowOutput);
+
+    /**
+     * @return a list of all favorites in the system
+     */
+    public List<FavoriteTaskVersion1> getFavoriteTasks();
+
+    /**
+     * Returns the favorite with the specified command line
+     *
+     * @param fullCommandLine the command line of the sought favorite
+     * @return the matching favorite or null if no match found.
+     */
+    public FavoriteTaskVersion1 getFavorite(String fullCommandLine);
+
+    /**
+     * Returns the favorite with the specified display name
+     *
+     * @param displayName the display name of the sought favorite
+     * @return the matching favorite or null if no match found.
+     */
+    public FavoriteTaskVersion1 getFavoriteByDisplayName(String displayName);
+
+    /**
+     * Returns the favorite with the specified task
+     *
+     * @param task the task of the sought favorite
+     * @return the matching favorite or null if no match found.
+     */
+    public FavoriteTaskVersion1 getFavorite(TaskVersion1 task);
+
+    /**
+     * Display a Swing dialog prompting the user to enter a favorite.
+     *
+     * @param parent the parent window of the dialog.
+     * @return the favorite that was added or null if the user canceled
+     */
+    public FavoriteTaskVersion1 promptUserToAddFavorite(Window parent);
+
+    /**
+     * Display a Swing dialog prompting the user to edit the specified favorite
+     *
+     * @param parent the parent window of the dialog
+     * @param favorite the favorite to edit
+     * @return true if the user made changes and accepted them, false if the user canceled.
+     */
+    public boolean promptUserToEditFavorite(Window parent, FavoriteTaskVersion1 favorite);
+
+    /**
+     * Removes the specified favorites.
+     *
+     * @param favoritesToRemove the favorites to remove
+     */
+    public void removeFavorites(List<FavoriteTaskVersion1> favoritesToRemove);
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerFactory.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerFactory.java
new file mode 100644
index 0000000..0d78555
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerFactory.java
@@ -0,0 +1,132 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.runner;
+
+import org.gradle.openapi.external.ExternalUtility;
+
+import java.io.File;
+import java.lang.reflect.Constructor;
+
+/**
+ * This provides a simple way to execute gradle commands from an external process. call createGradleRunner to instantiate a gradle runner. You can then use that to execute commands.
+ *
+ * @author mhunsicker
+ */
+public class GradleRunnerFactory {
+    /**
+     * Call this to instantiate an object that you can use to execute gradle commands directly.
+     *
+     * Note: this function is meant to be backward and forward compatible. So this signature should not change at all, however, it may take and return objects that implement ADDITIONAL interfaces. That
+     * is, it will always return a GradleRunnerVersion1, but it may also be an object that implements GradleRunnerVersion2 (notice the 2). The caller will need to dynamically determine that. The
+     * GradleRunnerInteractionVersion1 may take an object that also implements GradleRunnerInteractionVersion2. If so, we'll dynamically determine that and handle it. Of course, this all depends on
+     * what happens in the future.
+     *
+     * @param parentClassLoader Your classloader. Probably the classloader of whatever class is calling this.
+     * @param gradleHomeDirectory the root directory of a gradle installation
+     * @param interaction this is how we interact with the caller.
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     * @return a gradle runner
+     * @author mhunsicker
+     */
+    public static GradleRunnerVersion1 createGradleRunner(ClassLoader parentClassLoader, File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        //much of this function is exception handling so if we can't obtain it via the newer factory method, then
+        //we'll try the old way, but we want to report the original exception if we can't do it either way.
+        Exception viaFactoryException = null;
+        GradleRunnerVersion1 gradleRunner = null;
+
+        //first, try it the new way
+        try {
+            gradleRunner = createGradleRunnerViaFactory(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
+        } catch (Exception e) {
+            //we might ignore this. It means we're probably using an older version of gradle. That case is handled below.
+            //If not, this exception will be thrown at the end.
+            viaFactoryException = e;
+        }
+
+        //try it the old way
+        if (gradleRunner == null) {
+            gradleRunner = createGradleRunnerOldWay(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
+        }
+
+        //if we still don't have a gradle runner and we have an exception from using the factory, throw it. If we
+        //got an exception using the 'old way', it would have been thrown already and we wouldn't be here.
+        if (gradleRunner == null && viaFactoryException != null) {
+            throw viaFactoryException;
+        }
+
+        return gradleRunner;
+    }
+
+    /**
+     * This function uses a factory to instantiate a GradleRunner. The factory is located with the version of gradle pointed to by gradleHomeDirectory and thus allows the version of gradle being loaded
+     * to make decisions about how to instantiate the runner. This is needed as multiple versions of the runner are being used.
+     */
+    private static GradleRunnerVersion1 createGradleRunnerViaFactory(ClassLoader parentClassLoader, File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        Class soughtClass = ExternalUtility.loadGradleClass("org.gradle.openapi.wrappers.RunnerWrapperFactory", parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        if (soughtClass == null) {
+            return null;
+        }
+
+        Class[] argumentClasses = new Class[]{File.class, GradleRunnerInteractionVersion1.class, boolean.class};
+
+        Object gradleRunner = ExternalUtility.invokeStaticMethod(soughtClass, "createGradleRunner", argumentClasses, gradleHomeDirectory, interaction, showDebugInfo);
+        return (GradleRunnerVersion1) gradleRunner;
+    }
+
+    /**
+     * This function uses an early way (early 0.9 pre-release and sooner) of instantiating the GradleRunner and should no longer be used. It unfortunately is tied to a single wrapper class instance
+     * (which it tries to directly instantiate). This doesn't allow the GradleRunner to adaptively determine what to instantiate.
+     */
+    private static GradleRunnerVersion1 createGradleRunnerOldWay(ClassLoader parentClassLoader, File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        ClassLoader bootStrapClassLoader = ExternalUtility.getGradleClassloader(parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
+
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        Class soughtClass = null;
+        try {
+            soughtClass = bootStrapClassLoader.loadClass("org.gradle.openapi.wrappers.runner.GradleRunnerWrapper");
+        } catch (NoClassDefFoundError e) {  //might be a version mismatch
+            e.printStackTrace();
+            return null;
+        } catch (ClassNotFoundException e) {  //might be a version mismatch
+            e.printStackTrace();
+            return null;
+        }
+
+        if (soughtClass == null) {
+            return null;
+        }
+
+        //instantiate it.
+        Constructor constructor = null;
+        try {
+            constructor = soughtClass.getDeclaredConstructor(File.class, GradleRunnerInteractionVersion1.class);
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            System.out.println("Dumping available constructors on " + soughtClass.getName() + "\n" + ExternalUtility.dumpConstructors(soughtClass));
+
+            throw e;
+        }
+
+        Object gradleRunner = constructor.newInstance(gradleHomeDirectory, interaction);
+
+        return (GradleRunnerVersion1) gradleRunner;
+    }
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerInteractionVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerInteractionVersion1.java
new file mode 100644
index 0000000..1931e83
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerInteractionVersion1.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.runner;
+
+import java.io.File;
+
+/**
+ * .
+ *
+ * @author mhunsicker
+ */
+public interface GradleRunnerInteractionVersion1 {
+    /**
+     * @return The root directory of your gradle project. The same directory Where you would run gradle from the command.
+     */
+    public File getWorkingDirectory();
+
+    public enum LogLevel {Quiet, Lifecycle, Debug}
+
+    public enum StackTraceLevel {InternalExceptions, Always, AlwaysFull}
+
+    /**
+     * @return the log level. This determines the detail level of information reported via reportLiveOutput and reportExecutionFinished.
+     */
+    public LogLevel getLogLevel();
+
+    /**
+     * @return the stack trace level. This determines the detail level of any stack traces should an exception occur.
+     */
+    public StackTraceLevel getStackTraceLevel();
+
+    /**
+     * Notification that overall execution has been started. This is only called once at the end.
+     */
+    public void reportExecutionStarted();
+
+    /**
+     * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
+     *
+     * @param size the total number of tasks.
+     */
+    public void reportNumberOfTasksToExecute(int size);
+
+    /**
+     * Notification that a single task has completed. Note: the task you kicked off probably executes other tasks and this notifies you of those tasks and provides completion progress.
+     *
+     * @param currentTaskName the task being executed
+     * @param percentComplete the percent complete of all the tasks that make up the task you requested.
+     */
+    public void reportTaskStarted(String currentTaskName, float percentComplete);
+
+    public void reportTaskComplete(String currentTaskName, float percentComplete);
+
+    /**
+     * Report real-time output from gradle and its subsystems (such as ant).
+     *
+     * @param output a single line of text to show.
+     */
+    public void reportLiveOutput(String output);
+
+    public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable);
+
+    /**
+     * This is called to get a custom gradle executable file. If you don't run gradle.bat or gradle shell script to run gradle, use this to specify what you do run. Note: we're going to pass it the
+     * arguments that we would pass to gradle so if you don't like that, see alterCommandLineArguments. Normaly, this should return null.
+     *
+     * @return the Executable to run gradle command or null to use the default
+     */
+    public File getCustomGradleExecutable();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerVersion1.java
new file mode 100644
index 0000000..3e04b04
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/runner/GradleRunnerVersion1.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.runner;
+
+/**
+ * This executes gradle commands in an external process.
+ *
+ * @author mhunsicker
+ */
+public interface GradleRunnerVersion1 {
+    /**
+     * Call this to execute the specified command line.
+     *
+     * @param commandLine the command to execute
+     */
+    public void executeCommand(String commandLine);
+
+    /**
+     * Call this to stop the gradle command. This is killing the process, not gracefully exiting.
+     */
+    public void killProcess();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/AlternateUIInteractionVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/AlternateUIInteractionVersion1.java
new file mode 100644
index 0000000..daf64ea
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/AlternateUIInteractionVersion1.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import java.io.File;
+
+/**
+ * This is how the gradle UI panel interacts with the UI that is holding it.
+ *
+ * This is a mirror of AlternateUIInteraction inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface AlternateUIInteractionVersion1 {
+    /**
+     * Notification that you should open the specified file and go to the specified line. Its up to the application to determine if this file should be opened for editing or simply displayed. The
+     * difference comes into play for things like xml or html files where a user may want to open them in a browser vs a source code file where they may want to open it directly in an IDE.
+     *
+     * @param file the file to edit
+     * @param line the line to go to. -1 if no line is specified.
+     */
+    public void openFile(File file, int line);
+
+    /**
+     * This is called when we should open the specified file for editing. This version explicitly wants them edited versus just opened.
+     *
+     * @param file the file to open
+     * @param line the line to go to. -1 if no line is specified.
+     */
+    public void editFile(File file, int line);
+
+    /**
+     * Determines if we can call editFiles or openFile. This is not a dynamic answer and should always return either true of false. If you want to change the answer, return true and then handle the
+     * files differently in editFiles.
+     *
+     * @return true if support editing files, false otherwise.
+     */
+    public boolean doesSupportEditingOpeningFiles();
+
+    /**
+     * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files.
+     *
+     * @param fullCommandLine the command that's about to be executed.
+     */
+    public void aboutToExecuteCommand(String fullCommandLine);
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/BasicGradleUIVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/BasicGradleUIVersion1.java
new file mode 100644
index 0000000..d251165
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/BasicGradleUIVersion1.java
@@ -0,0 +1,199 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import org.gradle.openapi.external.foundation.GradleInterfaceVersion1;
+import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1;
+
+import javax.swing.*;
+import java.io.File;
+
+/**
+ * This represents a basic gradle UI
+ *
+ * To use this, you'll want to get an instance of this from Gradle. Then setup your UI and add this to it via getComponent. Then call aboutToShow before you display your UI. Call close before you hide
+ * your UI. You'll need to set the current directory (at any time) so gradle knows where your project is located.
+ *
+ * @author mhunsicker
+ */
+public interface BasicGradleUIVersion1 {
+    /**
+     * Call this whenever you're about to show this panel. We'll do whatever initialization is necessary.
+     */
+    public void aboutToShow();
+
+    //
+    public interface CloseInteraction {
+        /**
+         * This is called if gradle tasks are being executed and you want to know if we can close. Ask the user.
+         *
+         * @return true if the user confirms cancelling the current tasks. False if not.
+         */
+        public boolean promptUserToConfirmClosingWhileBusy();
+    }
+
+    /**
+     * Call this to determine if you can close this pane. if we're busy, we'll ask the user if they want to close.
+     *
+     * @param closeInteraction allows us to interact with the user
+     * @return true if we can close, false if not.
+     */
+    public boolean canClose(CloseInteraction closeInteraction);
+
+    /**
+     * Call this before you close the pane. This gives it an opportunity to do cleanup. You probably should call canClose before this. It gives the app a chance to cancel if its busy.
+     */
+    public void close();
+
+    /**
+     * @return the root directory of your gradle project.
+     */
+    public File getCurrentDirectory();
+
+    /**
+     * @param currentDirectory the new root directory of your gradle project.
+     */
+    public void setCurrentDirectory(File currentDirectory);
+
+    /**
+     * @return the gradle home directory. Where gradle is installed.
+     */
+    public File getGradleHomeDirectory();
+
+    /**
+     * This is called to get a custom gradle executable file. If you don't run gradle.bat or gradle shell script to run gradle, use this to specify what you do run. Note: we're going to pass it the
+     * arguments that we would pass to gradle so if you don't like that, see alterCommandLineArguments. Normally, this should return null.
+     *
+     * @return the Executable to run gradle command or null to use the default
+     */
+    public File getCustomGradleExecutable();
+
+    /**
+     * Call this to add an additional tab to the gradle UI. You can call this at any time.
+     *
+     * @param index the index of where to add the tab.
+     * @param gradleTabVersion1 the tab to add.
+     */
+    public void addTab(int index, GradleTabVersion1 gradleTabVersion1);
+
+    /**
+     * Call this to remove one of your own tabs from this.
+     *
+     * @param gradleTabVersion1 the tab to remove
+     */
+    public void removeTab(GradleTabVersion1 gradleTabVersion1);
+
+    /**
+     * @return the total number of tabs.
+     */
+    public int getGradleTabCount();
+
+    /**
+     * @param index the index of the tab
+     * @return the name of the tab at the specified index.
+     */
+    public String getGradleTabName(int index);
+
+    /**
+     * Returns the index of the gradle tab with the specified name.
+     *
+     * @param name the name of the tab
+     * @return the index of the tab or -1 if not found
+     */
+    public int getGradleTabIndex(String name);
+
+    /**
+     * @return the currently selected tab
+     */
+    public int getCurrentGradleTab();
+
+    /**
+     * Makes the specified tab the current tab.
+     *
+     * @param index the index of the tab.
+     */
+    public void setCurrentGradleTab(int index);
+
+    /**
+     * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for
+     * example, an init script.
+     *
+     * @param listener the listener that modifies the command line arguments.
+     */
+    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener);
+
+    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener);
+
+    /**
+     * Call this to execute the given gradle command.
+     *
+     * @param commandLineArguments the command line arguments to pass to gradle.
+     * @param displayName the name displayed in the UI for this command
+     */
+    public void executeCommand(String commandLineArguments, String displayName);
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     */
+    public void refreshTaskTree();
+
+    /**
+     * @return the output lord which shows the live output of all commands being executed. You can add observers to this as well as alter how it finds file links.
+     */
+    public OutputUILordVersion1 getOutputLord();
+
+    //these were moved to OutputUILordVersion1, but remain here for backward compatibility
+    public void addOutputObserver(OutputObserverVersion1 outputObserverVersion1);
+
+    public void removeOutputObserver(OutputObserverVersion1 outputObserverVersion1);
+
+    /**
+     * Determines if commands are currently being executed or not.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy();
+
+    /**
+     * Determines whether output is shown only when errors occur or always
+     *
+     * @return true to only show output if errors occur, false to show it always.
+     */
+    public boolean getOnlyShowOutputOnErrors();
+
+    /**
+     * This adds the specified component to the setup panel. It is added below the last 'default' item. You can only add 1 component here, so if you need to add multiple things, you'll have to handle
+     * adding that to yourself to the one component.
+     *
+     * @param component the component to add.
+     */
+    public void setCustomPanelToSetupTab(JComponent component);
+
+    /**
+     * This returns an object that works with lower level gradle and contains the current projects and tasks. You can also execute tasks from it and perform certain setup.
+     *
+     * @return a GradleInterfaceVersion1 object. It may also be GradleInterfaceVersion2 or a future version. You can check its type and then cast it as appropriate. This allows the caller to be
+     *         backward compatible.
+     */
+    public GradleInterfaceVersion1 getGradleInterfaceVersion1();
+
+    /**
+     * Returns a FavoritesEditor. This is useful for getting a list of all favorites or modifying them.
+     *
+     * @return a FavoritesEditorVersion1. Use this to interact with the favorites.
+     */
+    public FavoritesEditorVersion1 getFavoritesEditor();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/CommandLineArgumentAlteringListenerVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/CommandLineArgumentAlteringListenerVersion1.java
new file mode 100644
index 0000000..50a8ef0
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/CommandLineArgumentAlteringListenerVersion1.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+/**
+ * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for example,
+ * an init script.
+ *
+ * @author mhunsicker
+ */
+public interface CommandLineArgumentAlteringListenerVersion1 {
+    /**
+     * This is called when you can add additional command line arguments. Return any additional arguments to add. This doesn't modify the existing commands.
+     *
+     * @param commandLineArguments the command line to execute.
+     * @return any command lines to add or null to leave it alone
+     */
+    public String getAdditionalCommandLineArguments(String commandLineArguments);
+}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIInteractionVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIInteractionVersion1.java
similarity index 100%
rename from subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIInteractionVersion1.java
rename to subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIInteractionVersion1.java
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIVersion1.java
new file mode 100644
index 0000000..153cf1c
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/DualPaneUIVersion1.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import javax.swing.JComponent;
+import java.awt.Component;
+
+/**
+This is a gradle UI that is broken into two panels: one contains a tabbed pane
+ of tasks, favorites, command line, etc. The other pane contains the output.
+ This is meant to simplify how an IDE plugin can interact with gradle. Specifically,
+ this allows the 'main' pane to be vertical and the output pane to be horizontal.
+
+ To use this, you'll want to get an instance of this from Gradle. Then setup
+ your UI and add this to it via getComponent. Then call aboutToShow before
+ you display your UI. Call close before you hide your UI. You'll need to set
+ the current directory (at any time) so gradle knows where your project is
+ located.
+ */
+public interface DualPaneUIVersion1 extends BasicGradleUIVersion1 {
+   /**
+      Returns a component that shows the task tree tab, favorites tab, etc.
+      suitable for inserting in your UI.
+      @return the main component
+    */
+   public JComponent getMainComponent();
+
+   /**
+      Returns a component that shows the output of the tasks being executed.
+      This is suitable for inserting in your UI.
+      @return the output component
+   */
+   public Component getOutputPanel();
+
+    /**
+     * This gets the number of opened output tabs. This is used by the Idea plugin
+     * to determine if it should close the entire output pane when a tab is closed
+     * This doesn't determine whether or not the tabs are busy. See
+     * GradleInterfaceVersion1.isBusy for that 
+     * @return the number of opened output tabs.
+     */
+   public int getNumberOfOpenedOutputTabs();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleTabVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleTabVersion1.java
new file mode 100644
index 0000000..02a1cf5
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleTabVersion1.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import java.awt.Component;
+
+/**
+
+ This represents a tab that the caller can add to the gradle UI.
+
+  This is a mirror of GradleTab inside Gradle, but this is meant to aid
+  backward and forward compatibility by shielding you from direct changes
+  within gradle.
+
+ @author mhunsicker
+  */
+public interface GradleTabVersion1 {
+   /*
+      @return the name of this tab
+      @author mhunsicker
+   */
+   public String getName();
+
+   /*
+      This is where we should create your component.
+
+      @return the component
+      @author mhunsicker
+   */
+   public Component createComponent();
+
+   /*
+      Notification that this component is about to be shown. Do whatever
+      initialization you choose.
+      @author mhunsicker
+   */
+   public void aboutToShow();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleUIInteractionVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleUIInteractionVersion1.java
new file mode 100644
index 0000000..b0ff6e7
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/GradleUIInteractionVersion1.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+/**
+ This interface holds onto our options and allows us to interact with the
+ caller. This is meant to interact with the Gradle UI across class loader
+ and version boundaries. That is, the open API has a single entry point
+ that shouldn't change across versions. New interfaces can be expected, but
+ we'll always allow 'version1'. This is to provide backward/forward compatibility.
+
+ @author mhunsicker
+*/
+public interface GradleUIInteractionVersion1 {
+   /*
+      This is only called once and is how we get a hold of the AlternateUIInteraction.
+      @return an AlternateUIInteraction object. This cannot be null.
+      @author mhunsicker
+   */
+   public AlternateUIInteractionVersion1 instantiateAlternateUIInteraction();
+
+   /*
+      This is only called once and is how we get a hold of how the owner wants
+      to store preferences.
+      @return a settings object. This cannot be null.
+      @author mhunsicker
+   */
+   public SettingsNodeVersion1 instantiateSettings();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputObserverVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputObserverVersion1.java
new file mode 100644
index 0000000..8d90b9d
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputObserverVersion1.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+/**
+ * <p>This interface informs you when the output pane is displaying requests. This is NOT for general output of gradle commands.
+ *
+ * <p>This is a mirror of OutputUILord.OutputObserver inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ */
+public interface OutputObserverVersion1 {
+    /**
+     * Notification that a request was added to the output. This means we've got some output that is useful to display. <!      Name             Description>
+     *
+     * @param requestID an ID you can use to identify this request when it is complete.
+     * @param fullCommandLine the command line for the request that was added
+     * @param displayName the display name of this command (often the same as the full command line)
+     * @param forceOutputToBeShown true if this request wants to force its output to be shown
+     */
+    public void executionRequestAdded(long requestID, String fullCommandLine, String displayName, boolean forceOutputToBeShown);
+
+    /**
+     * Notification that a refresh task list request was added to the output. This means we've got some output that is useful to display.
+     *
+     * @param requestID an ID you can use to identify this request when it is complete.
+     * @param forceOutputToBeShown true if this request wants to force its output to be shown
+     */
+    public void refreshRequestAdded(long requestID, boolean forceOutputToBeShown);
+
+    /**
+     * Notification that a request is complete. Note: if its canceled, you'll just get an outputTabClosed notification.
+     *
+     * @param requestID the ID of the request that is complete. It is given to you in executionRequestAdded or refreshRequestAdded.
+     * @param wasSuccessful true if was successful, false if not or was cancelled.
+     */
+    public void requestComplete(long requestID, boolean wasSuccessful);
+
+    /**
+     * Notification that an output tab was closed, possibly because it was canceled. You might want to know this if you want to close your IDE output window when all tabs are closed.
+     *
+     * @param requestID the ID of the request associated with this tab. It is given to you in executionRequestAdded or refreshRequestAdded.
+     */
+    public void outputTabClosed(long requestID);
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputUILordVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputUILordVersion1.java
new file mode 100644
index 0000000..42522d6
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/OutputUILordVersion1.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import java.util.List;
+import java.awt.Font;
+
+/**
+ * Provides access to aspects of gradle's output
+ *
+ * @author mhunsicker
+ */
+public interface OutputUILordVersion1 {
+
+    public void setOutputTextFont(Font font);
+
+    public Font getOutputTextFont();
+
+    /**
+     * Call this to add file extensions to look for in the output. The files will be highlighted and are clickable by the user. This results in AlternateUIInteractionVersion1.editFile or openFile
+     * being called. This assumes the file path is the first thing on the line.
+     *
+     * @param extension the file extension
+     * @param lineNumberDelimiter optional delimiter text for line number. Whatever is after this will be assumed to be a line number. We'll only parse the numbers after this so there can be other
+     * stuff after the line number. Pass in null to ignore.
+     */
+    public void addFileExtension(String extension, String lineNumberDelimiter);
+
+    /**
+     * Creates a file link definition to find file paths in the output that have a known prefix and extension. The files will be highlighted and are clickable by the user. This results in
+     * AlternateUIInteractionVersion1.editFile or openFile being called. It also allows for an optional line number after a delimiter. This is useful if you know a certain message always precedes a
+     * file path.
+     *
+     * @param name the name of this file link definition. Used by tests mostly.
+     * @param prefix the text that is before the file path. It should be enough to make it fairly unique
+     * @param extension the expected file extension. If we don't find this extension, we do not consider the text a file's path. If there are multiple extensions, you'll have to add multiples of
+     * these.
+     * @param lineNumberDelimiter optional delimiter text for line number. Whatever is after this will be assumed to be a line number. We'll only parse the numbers after this so there can be other
+     * stuff after the line number. Pass in null to ignore.
+     */
+    public void addPrefixedFileLink(String name, String prefix, String extension, String lineNumberDelimiter);
+
+    /**
+     * @return a list of file extensions that are highlighted in the output
+     */
+    public List<String> getFileExtensions();
+
+    public void addOutputObserver(OutputObserverVersion1 outputObserverVersion1);
+
+    public void removeOutputObserver(OutputObserverVersion1 outputObserverVersion1);
+
+    /*
+    This re-executes the last execution command (ignores refresh commands).
+    This is potentially useful for IDEs to hook into (hotkey to execute last command).
+     */
+    public void reExecuteLastCommand();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SettingsNodeVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SettingsNodeVersion1.java
new file mode 100644
index 0000000..5cbba26
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SettingsNodeVersion1.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import java.util.List;
+
+/**
+ * Abstraction of how settings are stored. If you're implementing this, see SettingsNode for more information.
+ *
+ * This is a mirror of SettingsNode inside Gradle, but this is meant to aid backward and forward compatibility by shielding you from direct changes within gradle.
+ *
+ * @author mhunsicker
+ */
+public interface SettingsNodeVersion1 {
+    public void setName(String name);
+
+    public String getName();
+
+    public void setValue(String value);
+
+    public String getValue();
+
+    public void setValueOfChild(String name, String value);
+
+    public String getValueOfChild(String name, String defaultValue);
+
+    public int getValueOfChildAsInt(String name, int defaultValue);
+
+    public void setValueOfChildAsInt(String name, int value);
+
+    public boolean getValueOfChildAsBoolean(String name, boolean defaultValue);
+
+    public void setValueOfChildAsBoolean(String name, boolean value);
+
+    public long getValueOfChildAsLong(String name, long defaultValue);
+
+    public void setValueOfChildAsLong(String name, long value);
+
+    public List<SettingsNodeVersion1> getChildNodes();
+
+    public List<SettingsNodeVersion1> getChildNodes(String name);
+
+    public SettingsNodeVersion1 addChild(String name);
+
+    public SettingsNodeVersion1 addChildIfNotPresent(String name);
+
+    public SettingsNodeVersion1 getChildNode(String name);
+
+    public SettingsNodeVersion1 getNodeAtPath(String... pathPortions);
+
+    public void removeFromParent();
+
+    public void removeAllChildren();
+}
diff --git a/subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIInteractionVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIInteractionVersion1.java
similarity index 100%
rename from subprojects/gradle-open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIInteractionVersion1.java
rename to subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIInteractionVersion1.java
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIVersion1.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIVersion1.java
new file mode 100644
index 0000000..4d452d7
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/SinglePaneUIVersion1.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import javax.swing.JComponent;
+
+/*
+ This is a gradle UI that is entirely within a single panel (and only a panel;
+ no dialog or frame). This is meant to simplify how a plugin can interact with
+ gradle.
+
+ To use this, you'll want to get an instance of this from Gradle. Then setup
+ your UI and add this to it via getComponent. Then call aboutToShow before
+ you display your UI. Call close before you hide your UI. You'll need to set
+ the current directory (at any time) so gradle knows where your project is
+ located.
+
+ @author mhunsicker
+  */
+public interface SinglePaneUIVersion1 extends BasicGradleUIVersion1 {
+   /**
+   Returns this panel as a Swing object suitable for inserting in your UI.
+   @return the main component
+      */
+   public JComponent getComponent();
+}
diff --git a/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/UIFactory.java b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/UIFactory.java
new file mode 100644
index 0000000..f8469db
--- /dev/null
+++ b/subprojects/open-api/src/main/groovy/org/gradle/openapi/external/ui/UIFactory.java
@@ -0,0 +1,233 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.external.ui;
+
+import org.gradle.openapi.external.ExternalUtility;
+
+import java.io.File;
+import java.lang.reflect.Constructor;
+
+/**
+ * This loads up the main gradle UI. This is intended to be used as a plugin inside another application (like an IDE) in a dynamic fashion. If you're always going to ship the entire plugin with the
+ * entire Gradle dist, you don't need to use this. This is meant to dynamically load Gradle from its dist. The idea is that you point your plugin to a Gradle dist and then can always load the latest
+ * version.
+ *
+ * @author mhunsicker
+ */
+public class UIFactory {
+    private static final String UIWRAPPER_FACTORY_CLASS_NAME = "org.gradle.openapi.wrappers.UIWrapperFactory";
+
+    /**
+     * Call this to instantiate a self-contained gradle UI. That is, everything in the UI is in a single panel (versus 2 panels one for the tasks and one for the output). This will load gradle via
+     * reflection, instantiate the UI and all required gradle-related classes.
+     *
+     * <p>Note: this function is meant to be backward and forward compatible. So this signature should not change at all, however, it may take and return objects that implement ADDITIONAL interfaces.
+     * That is, it will always return SinglePaneUIVersion1, but it may also be an object that implements SinglePaneUIVersion2 (notice the 2). The caller will need to dynamically determine that. The
+     * SinglePaneUIInteractionVersion1 may take an object that also implements SinglePaneUIInteractionVersion2. If so, we'll dynamically determine that and handle it. Of course, this all depends on
+     * what happens in the future.
+     *
+     * @param parentClassLoader Your classloader. Probably the classloader of whatever class is calling this.
+     * @param gradleHomeDirectory the root directory of a gradle installation
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     * @return the UI object.
+     */
+    public static SinglePaneUIVersion1 createSinglePaneUI(ClassLoader parentClassLoader, File gradleHomeDirectory, final SinglePaneUIInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        //much of this function is exception handling so if we can't obtain it via the newer factory method, then
+        //we'll try the old way, but we want to report the original exception if we can't do it either way.
+        Exception viaFactoryException = null;
+        SinglePaneUIVersion1 gradleUI = null;
+
+        //first, try it the new way
+        try {
+            gradleUI = createSinglePaneUIViaFactory(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
+        } catch (Exception e) {
+            //we might ignore this. It means we're probably using an older version of gradle. That case is handled below.
+            //If not, this exception will be thrown at the end.
+            viaFactoryException = e;
+        }
+
+        //try it the old way
+        if (gradleUI == null) {
+            gradleUI = createSinglePaneUIOldWay(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
+        }
+
+        //if we still don't have a gradle ui and we have an exception from using the factory, throw it. If we
+        //got an exception using the 'old way', it would have been thrown already and we wouldn't be here.
+        if (gradleUI == null && viaFactoryException != null) {
+            throw viaFactoryException;
+        }
+
+        return gradleUI;
+    }
+
+    /**
+     * This function uses a factory to instantiate the UI. The factory is located with the version of gradle pointed to by gradleHomeDirectory and thus allows the version of gradle being loaded to make
+     * decisions about how to instantiate the UI. This is needed as multiple versions of the UI are being used.
+     */
+    private static SinglePaneUIVersion1 createSinglePaneUIViaFactory(ClassLoader parentClassLoader, File gradleHomeDirectory, final SinglePaneUIInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        Class soughtClass = ExternalUtility.loadGradleClass(UIWRAPPER_FACTORY_CLASS_NAME, parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        if (soughtClass == null) {
+            return null;
+        }
+
+        Class[] argumentClasses = new Class[]{SinglePaneUIInteractionVersion1.class, boolean.class};
+
+        Object gradleUI = ExternalUtility.invokeStaticMethod(soughtClass, "createSinglePaneUI", argumentClasses, interaction, showDebugInfo);
+        return (SinglePaneUIVersion1) gradleUI;
+    }
+
+    /**
+     * This function uses an early way (early 0.9 pre-release and sooner) of instantiating the UI and should no longer be used. It unfortunately is tied to a single wrapper class instance (which it
+     * tries to directly instantiate). This doesn't allow the Gradle UI to adaptively determine what to instantiate.
+     */
+    private static SinglePaneUIVersion1 createSinglePaneUIOldWay(ClassLoader parentClassLoader, File gradleHomeDirectory, final SinglePaneUIInteractionVersion1 singlePaneUIArguments,
+                                                                 boolean showDebugInfo) throws Exception {
+        ClassLoader bootStrapClassLoader = ExternalUtility.getGradleClassloader(parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
+
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        Class soughtClass = null;
+        try {
+            soughtClass = bootStrapClassLoader.loadClass("org.gradle.openapi.wrappers.ui.SinglePaneUIWrapper");
+        } catch (NoClassDefFoundError e) {  //might be a version mismatch
+            e.printStackTrace();
+            return null;
+        } catch (ClassNotFoundException e) {  //might be a version mismatch
+            e.printStackTrace();
+        }
+        if (soughtClass == null) {
+            return null;
+        }
+
+        //instantiate it.
+        Constructor constructor = null;
+        try {
+            constructor = soughtClass.getDeclaredConstructor(SinglePaneUIInteractionVersion1.class);
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            System.out.println("Dumping available constructors on " + soughtClass.getName() + "\n" + ExternalUtility.dumpConstructors(soughtClass));
+
+            throw e;
+        }
+        Object singlePaneUI = constructor.newInstance(singlePaneUIArguments);
+        return (SinglePaneUIVersion1) singlePaneUI;
+    }
+
+    /**
+     * Call this to instantiate a gradle UI that contains the main tab control separate from the output panel. This allows you to position the output however you like. For example: you can place the
+     * main pane along the side going vertically and you can place the output pane along the bottom going horizontally. This will load gradle via reflection, instantiate the UI and all required
+     * gradle-related classes.
+     *
+     * <p>Note: this function is meant to be backward and forward compatible. So this signature should not change at all, however, it may take and return objects that implement ADDITIONAL interfaces.
+     * That is, it will always return SinglePaneUIVersion1, but it may also be an object that implements SinglePaneUIVersion2 (notice the 2). The caller will need to dynamically determine that. The
+     * SinglePaneUIInteractionVersion1 may take an object that also implements SinglePaneUIInteractionVersion2. If so, we'll dynamically determine that and handle it. Of course, this all depends on
+     * what happens in the future.
+     *
+     * @param parentClassLoader Your classloader. Probably the classloader of whatever class is calling this.
+     * @param gradleHomeDirectory the root directory of a gradle installation
+     * @param interaction this is how we interact with the caller.
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     * @return the UI object.
+     * @author mhunsicker
+     */
+    public static DualPaneUIVersion1 createDualPaneUI(ClassLoader parentClassLoader, File gradleHomeDirectory, final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        //much of this function is exception handling so if we can't obtain it via the newer factory method, then
+        //we'll try the old way, but we want to report the original exception if we can't do it either way.
+        Exception viaFactoryException = null;
+        DualPaneUIVersion1 gradleUI = null;
+
+        //first, try it the new way
+        try {
+            gradleUI = createDualPaneUIViaFactory(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
+        } catch (Exception e) {
+            //we might ignore this. It means we're probably using an older version of gradle. That case is handled below.
+            //If not, this exception will be thrown at the end.
+            viaFactoryException = e;
+        }
+
+        //try it the old way
+        if (gradleUI == null) {
+            gradleUI = createDualPaneUIOldWay(parentClassLoader, gradleHomeDirectory, interaction, showDebugInfo);
+        }
+
+        //if we still don't have a gradle ui and we have an exception from using the factory, throw it. If we
+        //got an exception using the 'old way', it would have been thrown already and we wouldn't be here.
+        if (gradleUI == null && viaFactoryException != null) {
+            throw viaFactoryException;
+        }
+
+        return gradleUI;
+    }
+
+    /**
+     * This function uses a factory to instantiate the UI. The factory is located with the version of gradle pointed to by gradleHomeDirectory and thus allows the version of gradle being loaded to make
+     * decisions about how to instantiate the UI. This is needed as multiple versions of the UI are being used.
+     */
+    public static DualPaneUIVersion1 createDualPaneUIViaFactory(ClassLoader parentClassLoader, File gradleHomeDirectory, final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        Class soughtClass = ExternalUtility.loadGradleClass(UIWRAPPER_FACTORY_CLASS_NAME, parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        if (soughtClass == null) {
+            return null;
+        }
+
+        Class[] argumentClasses = new Class[]{DualPaneUIInteractionVersion1.class, boolean.class};
+
+        Object gradleUI = ExternalUtility.invokeStaticMethod(soughtClass, "createDualPaneUI", argumentClasses, interaction, showDebugInfo);
+        return (DualPaneUIVersion1) gradleUI;
+    }
+
+    /**
+     * This function uses an early way (early 0.9 pre-release and sooner) of instantiating the UI and should no longer be used. It unfortunately is tied to a single wrapper class instance (which it
+     * tries to directly instantiate). This doesn't allow the Gradle UI to adaptively determine what to instantiate.
+     */
+    private static DualPaneUIVersion1 createDualPaneUIOldWay(ClassLoader parentClassLoader, File gradleHomeDirectory, final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo)
+            throws Exception {
+        ClassLoader bootStrapClassLoader = ExternalUtility.getGradleClassloader(parentClassLoader, gradleHomeDirectory, showDebugInfo);
+        Thread.currentThread().setContextClassLoader(bootStrapClassLoader);
+
+        //load the class in gradle that wraps our return interface and handles versioning issues.
+        Class soughtClass = null;
+        try {
+            soughtClass = bootStrapClassLoader.loadClass("org.gradle.openapi.wrappers.ui.DualPaneUIWrapper");
+        } catch (NoClassDefFoundError e) {  //might be a version mismatch
+            e.printStackTrace();
+            return null;
+        } catch (ClassNotFoundException e) {  //might be a version mismatch
+            e.printStackTrace();
+        }
+        if (soughtClass == null) {
+            return null;
+        }
+
+        //instantiate it.
+        Constructor constructor = null;
+        try {
+            constructor = soughtClass.getDeclaredConstructor(DualPaneUIInteractionVersion1.class);
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            System.out.println("Dumping available constructors on " + soughtClass.getName() + "\n" + ExternalUtility.dumpConstructors(soughtClass));
+
+            throw e;
+        }
+        Object gradleUI = constructor.newInstance(interaction);
+        return (DualPaneUIVersion1) gradleUI;
+    }
+}
diff --git a/subprojects/gradle-open-api/src/test/groovy/org/gradle/openapi/external/ExternalUtilityTest.groovy b/subprojects/open-api/src/test/groovy/org/gradle/openapi/external/ExternalUtilityTest.groovy
similarity index 100%
rename from subprojects/gradle-open-api/src/test/groovy/org/gradle/openapi/external/ExternalUtilityTest.groovy
rename to subprojects/open-api/src/test/groovy/org/gradle/openapi/external/ExternalUtilityTest.groovy
diff --git a/subprojects/gradle-osgi/osgi.gradle b/subprojects/osgi/osgi.gradle
similarity index 100%
rename from subprojects/gradle-osgi/osgi.gradle
rename to subprojects/osgi/osgi.gradle
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/ContainedVersionAnalyzer.java b/subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/ContainedVersionAnalyzer.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/ContainedVersionAnalyzer.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/ContainedVersionAnalyzer.java
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactory.java b/subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactory.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactory.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactory.java
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifest.java b/subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifest.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifest.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifest.java
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/OsgiHelper.java b/subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/OsgiHelper.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/OsgiHelper.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/internal/plugins/osgi/OsgiHelper.java
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiManifest.java b/subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiManifest.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiManifest.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiManifest.java
diff --git a/subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPlugin.groovy b/subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPlugin.groovy
new file mode 100644
index 0000000..6d8b65a
--- /dev/null
+++ b/subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPlugin.groovy
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.osgi;
+
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaBasePlugin
+import org.gradle.api.plugins.JavaPlugin
+import org.gradle.api.tasks.SourceSet
+
+/**
+ * <p>A {@link Plugin} which extends the {@link JavaPlugin} to add OSGi meta-information to the project JARs.</p>
+ *
+ * @author Hans Dockter
+ */
+public class OsgiPlugin implements Plugin<Project> {
+    public void apply(Project project) {
+        project.getPlugins().apply(JavaBasePlugin.class);
+
+        OsgiPluginConvention osgiConvention = new OsgiPluginConvention(project);
+        project.convention.plugins.osgi = osgiConvention
+
+        project.plugins.withType(JavaPlugin.class) {javaPlugin ->
+            OsgiManifest osgiManifest = osgiConvention.osgiManifest {
+                from project.manifest
+                classesDir = project.convention.plugins.java.sourceSets[SourceSet.MAIN_SOURCE_SET_NAME].classesDir
+                classpath = project.configurations[JavaPlugin.RUNTIME_CONFIGURATION_NAME]
+            }
+            project.jar.manifest = osgiManifest
+        }
+    }
+}
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPluginConvention.java b/subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPluginConvention.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPluginConvention.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/OsgiPluginConvention.java
diff --git a/subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/package-info.java b/subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/package-info.java
similarity index 100%
rename from subprojects/gradle-osgi/src/main/groovy/org/gradle/api/plugins/osgi/package-info.java
rename to subprojects/osgi/src/main/groovy/org/gradle/api/plugins/osgi/package-info.java
diff --git a/subprojects/gradle-osgi/src/main/resources/META-INF/gradle-plugins/osgi.properties b/subprojects/osgi/src/main/resources/META-INF/gradle-plugins/osgi.properties
similarity index 100%
rename from subprojects/gradle-osgi/src/main/resources/META-INF/gradle-plugins/osgi.properties
rename to subprojects/osgi/src/main/resources/META-INF/gradle-plugins/osgi.properties
diff --git a/subprojects/osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactoryTest.java b/subprojects/osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactoryTest.java
new file mode 100644
index 0000000..64258a8
--- /dev/null
+++ b/subprojects/osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultAnalyzerFactoryTest.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.internal.plugins.osgi;
+
+import org.junit.Test;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * @author Hans Dockter
+ */
+public class DefaultAnalyzerFactoryTest {
+    @Test
+    public void create() {
+        ContainedVersionAnalyzer analyzer = new DefaultAnalyzerFactory().create();
+        assertNotNull(analyzer);
+    }
+}
diff --git a/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifestTest.java b/subprojects/osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifestTest.java
similarity index 100%
rename from subprojects/gradle-osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifestTest.java
rename to subprojects/osgi/src/test/groovy/org/gradle/api/internal/plugins/osgi/DefaultOsgiManifestTest.java
diff --git a/subprojects/osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginConventionTest.groovy b/subprojects/osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginConventionTest.groovy
new file mode 100644
index 0000000..66c9242
--- /dev/null
+++ b/subprojects/osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginConventionTest.groovy
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.osgi
+
+import spock.lang.Specification
+import org.gradle.util.HelperUtil
+import org.gradle.api.internal.project.DefaultProject
+import org.gradle.api.internal.plugins.osgi.DefaultOsgiManifest
+import org.gradle.api.internal.plugins.osgi.OsgiHelper
+import org.gradle.api.plugins.JavaBasePlugin
+
+/**
+ * @author Hans Dockter
+ */
+class OsgiPluginConventionTest extends Specification {
+    DefaultProject project = HelperUtil.createRootProject()
+    OsgiPluginConvention osgiPluginConvention = new OsgiPluginConvention(project)
+
+    def setup() {
+        new JavaBasePlugin().apply(project)
+    }
+
+    def osgiManifestWithNoClosure() {
+        OsgiManifest osgiManifest = osgiPluginConvention.osgiManifest()
+
+        expect:
+        matchesExpectedConfig(osgiManifest)
+    }
+
+    def osgiManifestWithClosure() {
+        OsgiManifest osgiManifest = osgiPluginConvention.osgiManifest {
+            description = 'myDescription'    
+        }
+
+        expect:
+        matchesExpectedConfig(osgiManifest)
+        osgiManifest.description == 'myDescription'
+    }
+
+    void matchesExpectedConfig(DefaultOsgiManifest osgiManifest) {
+        OsgiHelper osgiHelper = new OsgiHelper();
+        assert osgiManifest.version == osgiHelper.getVersion((String) project.version)
+        assert osgiManifest.name == project.archivesBaseName
+        assert osgiManifest.symbolicName == osgiHelper.getBundleSymbolicName(project)
+    }
+}
diff --git a/subprojects/gradle-osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginTest.groovy b/subprojects/osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginTest.groovy
rename to subprojects/osgi/src/test/groovy/org/gradle/api/plugins/osgi/OsgiPluginTest.groovy
diff --git a/subprojects/gradle-plugins/plugins.gradle b/subprojects/plugins/plugins.gradle
similarity index 100%
rename from subprojects/gradle-plugins/plugins.gradle
rename to subprojects/plugins/plugins.gradle
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/plugins/ProcessResources.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/plugins/ProcessResources.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/plugins/ProcessResources.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/plugins/ProcessResources.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSet.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSet.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSet.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSet.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSet.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSet.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSet.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSet.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainer.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainer.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainer.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainer.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDepend.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDepend.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDepend.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDepend.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDependsStaleClassCleaner.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDependsStaleClassCleaner.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDependsStaleClassCleaner.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntDependsStaleClassCleaner.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntGroovyCompiler.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntGroovyCompiler.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntGroovyCompiler.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntGroovyCompiler.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntJavaCompiler.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntJavaCompiler.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntJavaCompiler.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/AntJavaCompiler.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/Compiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/Compiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/Compiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/Compiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyJavaJointCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyJavaJointCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyJavaJointCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/GroovyJavaJointCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalGroovyCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalGroovyCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalGroovyCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalGroovyCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaSourceCompiler.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaSourceCompiler.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaSourceCompiler.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/JavaSourceCompiler.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleaner.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleaner.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleaner.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleaner.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/StaleClassCleaner.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/StaleClassCleaner.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/StaleClassCleaner.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/compile/StaleClassCleaner.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/AbstractTestDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/AbstractTestDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/AbstractTestDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/AbstractTestDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DecoratingTestDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DecoratingTestDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DecoratingTestDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DecoratingTestDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassRunInfo.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassRunInfo.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassRunInfo.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassRunInfo.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestMethodDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestMethodDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestMethodDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestMethodDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassRunInfo.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassRunInfo.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassRunInfo.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestClassRunInfo.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestCompleteEvent.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestCompleteEvent.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestCompleteEvent.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestCompleteEvent.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestDescriptorInternal.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestDescriptorInternal.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestDescriptorInternal.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestDescriptorInternal.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestFramework.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestFramework.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestFramework.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestFramework.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestOutputEvent.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestOutputEvent.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestOutputEvent.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestOutputEvent.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestResultProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestResultProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestResultProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestResultProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestStartEvent.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestStartEvent.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestStartEvent.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestStartEvent.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestSuiteExecutionException.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestSuiteExecutionException.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestSuiteExecutionException.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/TestSuiteExecutionException.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/WorkerTestClassProcessorFactory.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/WorkerTestClassProcessorFactory.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/WorkerTestClassProcessorFactory.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/WorkerTestClassProcessorFactory.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/AbstractTestFrameworkDetector.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/AbstractTestFrameworkDetector.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/AbstractTestFrameworkDetector.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/AbstractTestFrameworkDetector.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/ClassFileExtractionManager.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/ClassFileExtractionManager.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/ClassFileExtractionManager.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/ClassFileExtractionManager.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScanner.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScanner.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScanner.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScanner.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestExecuter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestExecuter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestExecuter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestExecuter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageListener.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageListener.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageListener.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageListener.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageLister.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageLister.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageLister.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/JarFilePackageLister.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestClassVisitor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestClassVisitor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestClassVisitor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestClassVisitor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestExecuter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestExecuter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestExecuter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestExecuter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestFrameworkDetector.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestFrameworkDetector.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestFrameworkDetector.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/detection/TestFrameworkDetector.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/AntJUnitReport.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/AntJUnitReport.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/AntJUnitReport.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/AntJUnitReport.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JULRedirector.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JULRedirector.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JULRedirector.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JULRedirector.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnit4TestResultProcessorAdapter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnit4TestResultProcessorAdapter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnit4TestResultProcessorAdapter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnit4TestResultProcessorAdapter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitDetector.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitDetector.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitDetector.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitDetector.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassDetecter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassDetecter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassDetecter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassDetecter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecuter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecuter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecuter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassExecuter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessor.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFramework.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFramework.java
new file mode 100644
index 0000000..cb8be74
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFramework.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.tasks.testing.junit;
+
+import org.gradle.api.Action;
+import org.gradle.api.internal.project.ServiceRegistry;
+import org.gradle.api.internal.tasks.testing.TestClassProcessor;
+import org.gradle.api.internal.tasks.testing.TestFramework;
+import org.gradle.api.internal.tasks.testing.WorkerTestClassProcessorFactory;
+import org.gradle.api.tasks.testing.Test;
+import org.gradle.api.tasks.testing.junit.JUnitOptions;
+import org.gradle.process.internal.WorkerProcessBuilder;
+import org.gradle.util.IdGenerator;
+
+import java.io.File;
+import java.io.Serializable;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class JUnitTestFramework implements TestFramework {
+    private AntJUnitReport antJUnitReport;
+    private JUnitOptions options;
+    private JUnitDetector detector;
+    private final Test testTask;
+
+    public JUnitTestFramework(Test testTask) {
+        this.testTask = testTask;
+        antJUnitReport = new AntJUnitReport();
+        options = new JUnitOptions();
+        detector = new JUnitDetector(testTask.getTestClassesDir(), testTask.getClasspath());
+    }
+
+    public WorkerTestClassProcessorFactory getProcessorFactory() {
+        final File testResultsDir = testTask.getTestResultsDir();
+        return new TestClassProcessorFactoryImpl(testResultsDir);
+    }
+
+    public Action<WorkerProcessBuilder> getWorkerConfigurationAction() {
+        return new Action<WorkerProcessBuilder>() {
+            public void execute(WorkerProcessBuilder workerProcessBuilder) {
+                workerProcessBuilder.sharedPackages("junit.framework");
+                workerProcessBuilder.sharedPackages("junit.extensions");
+                workerProcessBuilder.sharedPackages("org.junit");
+            }
+        };
+    }
+
+    public void report() {
+        if (!testTask.isTestReport()) {
+            return;
+        }
+        antJUnitReport.execute(testTask.getTestResultsDir(), testTask.getTestReportDir(), testTask.getProject().getAnt());
+    }
+
+    public JUnitOptions getOptions() {
+        return options;
+    }
+
+    void setOptions(JUnitOptions options) {
+        this.options = options;
+    }
+
+    AntJUnitReport getAntJUnitReport() {
+        return antJUnitReport;
+    }
+
+    void setAntJUnitReport(AntJUnitReport antJUnitReport) {
+        this.antJUnitReport = antJUnitReport;
+    }
+
+    public JUnitDetector getDetector() {
+        return detector;
+    }
+
+    private static class TestClassProcessorFactoryImpl implements WorkerTestClassProcessorFactory, Serializable {
+        private final File testResultsDir;
+
+        public TestClassProcessorFactoryImpl(File testResultsDir) {
+            this.testResultsDir = testResultsDir;
+        }
+
+        public TestClassProcessor create(ServiceRegistry serviceRegistry) {
+            return new JUnitTestClassProcessor(testResultsDir, serviceRegistry.get(IdGenerator.class), new JULRedirector());
+        }
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestMethodDetecter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestMethodDetecter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestMethodDetecter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestMethodDetecter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestResultProcessorAdapter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestResultProcessorAdapter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestResultProcessorAdapter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestResultProcessorAdapter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitXmlReportGenerator.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitXmlReportGenerator.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitXmlReportGenerator.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitXmlReportGenerator.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainAction.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainAction.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainAction.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainAction.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessor.java
new file mode 100644
index 0000000..4c1ba4e
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessor.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.tasks.testing.results;
+
+import org.gradle.api.internal.tasks.testing.*;
+
+public class AttachParentTestResultProcessor implements TestResultProcessor {
+    private Object rootId;
+    private final TestResultProcessor processor;
+
+    public AttachParentTestResultProcessor(TestResultProcessor processor) {
+        this.processor = processor;
+    }
+
+    public void started(TestDescriptorInternal test, TestStartEvent event) {
+        if (rootId == null) {
+            assert test.isComposite();
+            rootId = test.getId();
+        } else if (event.getParentId() == null) {
+            event = event.withParentId(rootId);
+        }
+        processor.started(test, event);
+    }
+
+    public void failure(Object testId, Throwable result) {
+        processor.failure(testId, result);
+    }
+
+    public void output(Object testId, TestOutputEvent event) {
+        processor.output(testId, event);
+    }
+
+    public void completed(Object testId, TestCompleteEvent event) {
+        if (testId.equals(rootId)) {
+            rootId = null;
+        }
+        processor.completed(testId, event);
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/DefaultTestResult.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/DefaultTestResult.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/DefaultTestResult.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/DefaultTestResult.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/LoggingResultProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/LoggingResultProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/LoggingResultProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/LoggingResultProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/StateTrackingTestResultProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/StateTrackingTestResultProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/StateTrackingTestResultProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/StateTrackingTestResultProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestLogger.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestLogger.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestLogger.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestLogger.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListener.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListener.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListener.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListener.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGDetector.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGDetector.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGDetector.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGDetector.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassDetecter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassDetecter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassDetecter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassDetecter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFramework.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFramework.java
new file mode 100644
index 0000000..e42d9ef
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFramework.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.tasks.testing.testng;
+
+import org.gradle.api.Action;
+import org.gradle.api.JavaVersion;
+import org.gradle.api.internal.project.ServiceRegistry;
+import org.gradle.api.internal.tasks.testing.TestClassProcessor;
+import org.gradle.api.internal.tasks.testing.TestFramework;
+import org.gradle.api.internal.tasks.testing.WorkerTestClassProcessorFactory;
+import org.gradle.api.internal.tasks.testing.junit.JULRedirector;
+import org.gradle.api.tasks.testing.Test;
+import org.gradle.api.tasks.testing.testng.TestNGOptions;
+import org.gradle.process.internal.WorkerProcessBuilder;
+import org.gradle.util.IdGenerator;
+
+import java.io.File;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class TestNGTestFramework implements TestFramework {
+
+    private TestNGOptions options;
+    private TestNGDetector detector;
+    private final Test testTask;
+
+    public TestNGTestFramework(Test testTask) {
+        this.testTask = testTask;
+        options = new TestNGOptions(testTask.getProject().getProjectDir());
+        options.setAnnotationsOnSourceCompatibility(JavaVersion.toVersion(testTask.getProject().property("sourceCompatibility")));
+        detector = new TestNGDetector(testTask.getTestClassesDir(), testTask.getClasspath());
+    }
+
+    public WorkerTestClassProcessorFactory getProcessorFactory() {
+        options.setTestResources(testTask.getTestSrcDirs());
+        List<File> suiteFiles = options.getSuites(testTask.getTemporaryDir());
+        return new TestClassProcessorFactoryImpl(testTask.getTestReportDir(), options, suiteFiles);
+    }
+
+    public Action<WorkerProcessBuilder> getWorkerConfigurationAction() {
+        return new Action<WorkerProcessBuilder>() {
+            public void execute(WorkerProcessBuilder workerProcessBuilder) {
+                workerProcessBuilder.sharedPackages("org.testng");
+            }
+        };
+    }
+
+    public void report() {
+        // TODO currently reports are always generated because the antTestNGExecute task uses the
+        // default listeners and these generate reports by default.
+    }
+
+    public TestNGOptions getOptions() {
+        return options;
+    }
+
+    void setOptions(TestNGOptions options) {
+        this.options = options;
+    }
+
+    public TestNGDetector getDetector() {
+        return detector;
+    }
+
+    private static class TestClassProcessorFactoryImpl implements WorkerTestClassProcessorFactory, Serializable {
+        private final File testReportDir;
+        private final TestNGOptions options;
+        private final List<File> suiteFiles;
+
+        public TestClassProcessorFactoryImpl(File testReportDir, TestNGOptions options, List<File> suiteFiles) {
+            this.testReportDir = testReportDir;
+            this.options = options;
+            this.suiteFiles = suiteFiles;
+        }
+
+        public TestClassProcessor create(ServiceRegistry serviceRegistry) {
+            return new TestNGTestClassProcessor(testReportDir, options, suiteFiles, serviceRegistry.get(IdGenerator.class), new JULRedirector());
+        }
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestMethodDetecter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestMethodDetecter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestMethodDetecter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestMethodDetecter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestResultProcessorAdapter.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestResultProcessorAdapter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestResultProcessorAdapter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestResultProcessorAdapter.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/RemoteTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/RemoteTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/RemoteTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/RemoteTestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorker.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorker.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorker.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorker.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/WorkerTestClassProcessor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/WorkerTestClassProcessor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/WorkerTestClassProcessor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/internal/tasks/testing/worker/WorkerTestClassProcessor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/Attributes.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/Attributes.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/Attributes.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/Attributes.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/Manifest.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/Manifest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/Manifest.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/Manifest.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/ManifestException.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/ManifestException.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/ManifestException.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/ManifestException.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeDetails.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeDetails.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeDetails.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeDetails.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeSpec.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeSpec.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeSpec.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/ManifestMergeSpec.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultAttributes.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultAttributes.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultAttributes.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultAttributes.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifest.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifest.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifest.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeDetails.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeDetails.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeDetails.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeDetails.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpec.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpec.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpec.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpec.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/java/archives/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/java/archives/package-info.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.groovy
new file mode 100644
index 0000000..69cdf1d
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePlugin.groovy
@@ -0,0 +1,171 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.gradle.api.plugins
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.Rule
+import org.gradle.api.Task
+import org.gradle.api.artifacts.Configuration
+import org.gradle.api.tasks.Delete
+import org.gradle.api.tasks.Upload
+import org.gradle.api.tasks.bundling.AbstractArchiveTask
+import org.gradle.api.tasks.bundling.Jar
+import org.gradle.api.artifacts.ConfigurationContainer
+import org.gradle.api.artifacts.Dependency
+import org.apache.commons.lang.StringUtils
+
+/**
+ * <p>A  {@link org.gradle.api.Plugin}  which defines a basic project lifecycle and some common convention properties.</p>
+ */
+class BasePlugin implements Plugin<Project> {
+    public static final String CLEAN_TASK_NAME = 'clean'
+    public static final String ASSEMBLE_TASK_NAME = 'assemble'
+    public static final String BUILD_GROUP = 'build'
+    public static final String UPLOAD_GROUP = 'upload'
+
+    public void apply(Project project) {
+        project.convention.plugins.base = new BasePluginConvention(project)
+
+        configureBuildConfigurationRule(project)
+        configureUploadRules(project)
+        configureArchiveDefaults(project, project.convention.plugins.base)
+        configureConfigurations(project)
+
+        addClean(project)
+        addCleanRule(project)
+        addAssemble(project);
+    }
+
+    private Task addAssemble(Project project) {
+        Task assembleTask = project.tasks.add(ASSEMBLE_TASK_NAME);
+        assembleTask.description = "Assembles all Jar, War, Zip, and Tar archives.";
+        assembleTask.group = BUILD_GROUP
+        assembleTask.dependsOn project.tasks.withType(AbstractArchiveTask.class)
+    }
+
+    private void configureArchiveDefaults(Project project, BasePluginConvention pluginConvention) {
+        project.tasks.withType(AbstractArchiveTask) {AbstractArchiveTask task ->
+            if (task instanceof Jar) {
+                task.conventionMapping.destinationDir = { pluginConvention.libsDir }
+            } else {
+                task.conventionMapping.destinationDir = { pluginConvention.distsDir }
+            }
+            task.conventionMapping.version = { project.version == Project.DEFAULT_VERSION ? null : project.version.toString() }
+            task.conventionMapping.baseName = { pluginConvention.archivesBaseName }
+        }
+    }
+
+    private void addClean(final Project project) {
+        Delete clean = project.tasks.add(CLEAN_TASK_NAME, Delete.class)
+        clean.description = "Deletes the build directory.";
+        clean.group = BUILD_GROUP
+        clean.delete { project.buildDir }
+    }
+
+    private void addCleanRule(Project project) {
+        String prefix = 'clean'
+        String description = "Pattern: ${prefix}<TaskName>: Cleans the output files of a task."
+        Rule rule = [
+                getDescription: { description },
+                apply: {String taskName ->
+                    if (!taskName.startsWith(prefix)) {
+                        return
+                    }
+                    Task task = project.tasks.findByName(StringUtils.uncapitalize(taskName.substring(prefix.length())))
+                    if (task == null) {
+                        return
+                    }
+                    Delete clean = project.tasks.add(taskName, Delete)
+                    clean.delete(task.outputs.files)
+                },
+                toString: { "Rule: " + description }
+        ] as Rule
+
+        project.tasks.addRule(rule)
+    }
+
+    private void configureBuildConfigurationRule(Project project) {
+        String prefix = "build";
+        String description = "Pattern: ${prefix}<ConfigurationName>: Assembles the artifacts of a configuration."
+        Rule rule = [
+                getDescription: {
+                    description
+                },
+                apply: {String taskName ->
+                    if (taskName.startsWith(prefix)) {
+                        Configuration configuration = project.configurations.findByName(StringUtils.uncapitalize(taskName.substring(prefix.length())))
+                        if (configuration != null) {
+                            project.tasks.add(taskName).dependsOn(configuration.getBuildArtifacts()).setDescription(String.format("Builds the artifacts belonging to %s.", configuration))
+                        }
+                    }
+                },
+                toString: { "Rule: " + description }
+        ] as Rule
+
+        project.configurations.all {
+            if (!project.tasks.rules.contains(rule)) {
+                project.tasks.addRule(rule)
+            }
+        }
+    }
+
+    private void configureUploadRules(final Project project) {
+        String description = "Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration."
+        Rule rule = [
+                getDescription: {
+                    description
+                },
+                apply: {String taskName ->
+                    Set<Configuration> configurations = project.configurations.all
+                    for (Configuration configuration: configurations) {
+                        if (taskName == configuration.uploadTaskName) {
+                            createUploadTask(configuration.uploadTaskName, configuration, project)
+                        }
+                    }
+                },
+                toString: { "Rule: " + description }
+        ] as Rule
+        project.configurations.all {
+            if (!project.tasks.rules.contains(rule)) {
+                project.tasks.addRule(rule)
+            }
+        }
+    }
+
+    private Upload createUploadTask(String name, final Configuration configuration, Project project) {
+        Upload upload = project.getTasks().add(name, Upload.class)
+        upload.configuration = configuration
+        upload.uploadDescriptor = true
+        upload.descriptorDestination = new File(project.getBuildDir(), "ivy.xml")
+        upload.description = "Uploads all artifacts belonging to $configuration."
+        upload.group = UPLOAD_GROUP
+        return upload
+    }
+
+    private void configureConfigurations(final Project project) {
+        ConfigurationContainer configurations = project.getConfigurations();
+        project.setProperty("status", "integration");
+
+        Configuration archivesConfiguration = configurations.add(Dependency.ARCHIVES_CONFIGURATION).
+                setDescription("Configuration for the default artifacts.");
+
+        configurations.add(Dependency.DEFAULT_CONFIGURATION).extendsFrom(archivesConfiguration).
+                setDescription("Configuration for the default artifacts and their dependencies.");
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/BasePluginConvention.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/BasePluginConvention.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/BasePluginConvention.groovy
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/GroovyBasePlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/GroovyBasePlugin.java
new file mode 100644
index 0000000..36f3d06
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/GroovyBasePlugin.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins;
+
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.file.FileTreeElement;
+import org.gradle.api.internal.DynamicObjectAware;
+import org.gradle.api.internal.IConventionAware;
+import org.gradle.api.internal.project.ProjectInternal;
+import org.gradle.api.internal.tasks.DefaultGroovySourceSet;
+import org.gradle.api.internal.tasks.DefaultSourceSet;
+import org.gradle.api.specs.Spec;
+import org.gradle.api.tasks.ConventionValue;
+import org.gradle.api.tasks.SourceSet;
+import org.gradle.api.tasks.compile.GroovyCompile;
+import org.gradle.api.tasks.javadoc.Groovydoc;
+
+import java.io.File;
+
+/**
+ * <p>A {@link org.gradle.api.Plugin} which extends the {@link org.gradle.api.plugins.JavaBasePlugin} to provide support for compiling and documenting Groovy
+ * source files.</p>
+ *
+ * @author Hans Dockter
+ */
+public class GroovyBasePlugin implements Plugin<Project> {
+    public static final String GROOVY_CONFIGURATION_NAME = "groovy";
+
+    public void apply(Project project) {
+        JavaBasePlugin javaBasePlugin = project.getPlugins().apply(JavaBasePlugin.class);
+
+        project.getConfigurations().add(GROOVY_CONFIGURATION_NAME).setVisible(false).setTransitive(false).
+                setDescription("The groovy libraries to be used for this Groovy project.");
+
+        configureCompileDefaults(project);
+        configureSourceSetDefaults(project, javaBasePlugin);
+
+        configureGroovydoc(project);
+    }
+
+    private void configureCompileDefaults(final Project project) {
+        project.getTasks().withType(GroovyCompile.class, new Action<GroovyCompile>() {
+            public void execute(GroovyCompile compile) {
+                compile.getConventionMapping().map("groovyClasspath", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return project.getConfigurations().getByName(GROOVY_CONFIGURATION_NAME).copy().setTransitive(true);
+                    }
+                });
+            }
+        });
+    }
+
+    private void configureSourceSetDefaults(final Project project, final JavaBasePlugin javaBasePlugin) {
+        final ProjectInternal projectInternal = (ProjectInternal) project;
+        project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().all(new Action<SourceSet>() {
+            public void execute(SourceSet sourceSet) {
+                final DefaultGroovySourceSet groovySourceSet = new DefaultGroovySourceSet(((DefaultSourceSet) sourceSet).getDisplayName(), projectInternal.getFileResolver());
+                ((DynamicObjectAware) sourceSet).getConvention().getPlugins().put("groovy", groovySourceSet);
+
+                groovySourceSet.getGroovy().srcDir(String.format("src/%s/groovy", sourceSet.getName()));
+                sourceSet.getResources().getFilter().exclude(new Spec<FileTreeElement>() {
+                    public boolean isSatisfiedBy(FileTreeElement element) {
+                        return groovySourceSet.getGroovy().contains(element.getFile());
+                    }
+                });
+                sourceSet.getAllJava().add(groovySourceSet.getGroovy().matching(sourceSet.getJava().getFilter()));
+                sourceSet.getAllSource().add(groovySourceSet.getGroovy());
+
+                String compileTaskName = sourceSet.getCompileTaskName("groovy");
+                GroovyCompile compile = project.getTasks().add(compileTaskName, GroovyCompile.class);
+                javaBasePlugin.configureForSourceSet(sourceSet, compile);
+                compile.dependsOn(sourceSet.getCompileJavaTaskName());
+                compile.setDescription(String.format("Compiles the %s Groovy source.", sourceSet.getName()));
+                compile.conventionMapping("defaultSource", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return groovySourceSet.getGroovy();
+                    }
+                });
+
+                project.getTasks().getByName(sourceSet.getClassesTaskName()).dependsOn(compileTaskName);
+            }
+        });
+    }
+
+    private void configureGroovydoc(final Project project) {
+        project.getTasks().withType(Groovydoc.class, new Action<Groovydoc>() {
+            public void execute(Groovydoc groovydoc) {
+                groovydoc.getConventionMapping().map("groovyClasspath", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return project.getConfigurations().getByName(GROOVY_CONFIGURATION_NAME).copy().setTransitive(true);
+                    }
+                });
+                groovydoc.getConventionMapping().map("destinationDir", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return new File(java(convention).getDocsDir(), "groovydoc");
+                    }
+                });
+                groovydoc.getConventionMapping().map("docTitle", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return convention.getPlugin(ReportingBasePluginConvention.class).getApiDocTitle();
+                    }
+                });
+                groovydoc.getConventionMapping().map("windowTitle", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return convention.getPlugin(ReportingBasePluginConvention.class).getApiDocTitle();
+                    }
+                });
+            }
+        });
+    }
+
+    private JavaPluginConvention java(Convention convention) {
+        return convention.getPlugin(JavaPluginConvention.class);
+    }
+}
\ No newline at end of file
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/GroovyPlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/GroovyPlugin.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/GroovyPlugin.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/GroovyPlugin.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaBasePlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaBasePlugin.java
new file mode 100644
index 0000000..f95d0d4
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaBasePlugin.java
@@ -0,0 +1,293 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins;
+
+import org.gradle.api.*;
+import org.gradle.api.internal.ConventionMapping;
+import org.gradle.api.internal.IConventionAware;
+import org.gradle.api.internal.plugins.ProcessResources;
+import org.gradle.api.tasks.ConventionValue;
+import org.gradle.api.tasks.Copy;
+import org.gradle.api.tasks.SourceSet;
+import org.gradle.api.tasks.compile.AbstractCompile;
+import org.gradle.api.tasks.compile.Compile;
+import org.gradle.api.tasks.javadoc.Javadoc;
+import org.gradle.api.tasks.testing.Test;
+import org.gradle.api.tasks.testing.TestDescriptor;
+import org.gradle.api.tasks.testing.TestListener;
+import org.gradle.api.tasks.testing.TestResult;
+import org.gradle.util.WrapUtil;
+
+import java.io.File;
+
+/**
+ * <p>A {@link org.gradle.api.Plugin} which compiles and tests Java source, and assembles it into a JAR file.</p>
+ *
+ * @author Hans Dockter
+ */
+public class JavaBasePlugin implements Plugin<Project> {
+    public static final String CHECK_TASK_NAME = "check";
+    public static final String BUILD_TASK_NAME = "build";
+    public static final String BUILD_DEPENDENTS_TASK_NAME = "buildDependents";
+    public static final String BUILD_NEEDED_TASK_NAME = "buildNeeded";
+    public static final String VERIFICATION_GROUP = "verification";
+    public static final String DOCUMENTATION_GROUP = "documentation";
+
+    public void apply(Project project) {
+        project.getPlugins().apply(BasePlugin.class);
+        project.getPlugins().apply(ReportingBasePlugin.class);
+
+        JavaPluginConvention javaConvention = new JavaPluginConvention(project);
+        project.getConvention().getPlugins().put("java", javaConvention);
+
+        configureCompileDefaults(project, javaConvention);
+        configureSourceSetDefaults(javaConvention);
+
+        configureJavaDoc(project);
+        configureTest(project);
+        configureCheck(project);
+        configureBuild(project);
+        configureBuildNeeded(project);
+        configureBuildDependents(project);
+    }
+
+    private void configureSourceSetDefaults(final JavaPluginConvention pluginConvention) {
+        pluginConvention.getSourceSets().all(new Action<SourceSet>() {
+            public void execute(final SourceSet sourceSet) {
+                final Project project = pluginConvention.getProject();
+                ConventionMapping conventionMapping = ((IConventionAware) sourceSet).getConventionMapping();
+
+                conventionMapping.map("classesDir", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        String classesDirName = String.format("classes/%s", sourceSet.getName());
+                        return new File(project.getBuildDir(), classesDirName);
+                    }
+                });
+                sourceSet.getJava().srcDir(String.format("src/%s/java", sourceSet.getName()));
+                sourceSet.getResources().srcDir(String.format("src/%s/resources", sourceSet.getName()));
+
+                Copy processResources = project.getTasks().add(sourceSet.getProcessResourcesTaskName(), ProcessResources.class);
+                processResources.setDescription(String.format("Processes the %s.", sourceSet.getResources()));
+                conventionMapping = processResources.getConventionMapping();
+                conventionMapping.map("defaultSource", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return sourceSet.getResources();
+                    }
+                });
+                conventionMapping.map("destinationDir", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return sourceSet.getClassesDir();
+                    }
+                });
+
+                String compileTaskName = sourceSet.getCompileJavaTaskName();
+                Compile compileJava = project.getTasks().add(compileTaskName, Compile.class);
+                configureForSourceSet(sourceSet, compileJava);
+
+                Task classes = project.getTasks().add(sourceSet.getClassesTaskName());
+                classes.dependsOn(sourceSet.getProcessResourcesTaskName(), compileTaskName);
+                classes.setDescription(String.format("Assembles the %s classes.", sourceSet.getName()));
+                classes.setGroup(BasePlugin.BUILD_GROUP);
+
+                sourceSet.compiledBy(sourceSet.getClassesTaskName());
+            }
+        });
+    }
+
+    public void configureForSourceSet(final SourceSet sourceSet, AbstractCompile compile) {
+        ConventionMapping conventionMapping;
+        compile.setDescription(String.format("Compiles the %s.", sourceSet.getJava()));
+        conventionMapping = compile.getConventionMapping();
+        conventionMapping.map("classpath", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return sourceSet.getCompileClasspath();
+            }
+        });
+        conventionMapping.map("defaultSource", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return sourceSet.getJava();
+            }
+        });
+        conventionMapping.map("destinationDir", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return sourceSet.getClassesDir();
+            }
+        });
+    }
+
+    private void configureCompileDefaults(final Project project, final JavaPluginConvention javaConvention) {
+        project.getTasks().withType(AbstractCompile.class, new Action<AbstractCompile>() {
+            public void execute(final AbstractCompile compile) {
+                ConventionMapping conventionMapping = compile.getConventionMapping();
+                conventionMapping.map("sourceCompatibility", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return javaConvention.getSourceCompatibility().toString();
+                    }
+                });
+                conventionMapping.map("targetCompatibility", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return javaConvention.getTargetCompatibility().toString();
+                    }
+                });
+            }
+        });
+        project.getTasks().withType(Compile.class, new Action<Compile>() {
+            public void execute(final Compile compile) {
+                ConventionMapping conventionMapping = compile.getConventionMapping();
+                conventionMapping.map("dependencyCacheDir", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return javaConvention.getDependencyCacheDir();
+                    }
+                });
+            }
+        });
+    }
+
+    private void configureJavaDoc(final Project project) {
+        project.getTasks().withType(Javadoc.class, new Action<Javadoc>() {
+            public void execute(Javadoc javadoc) {
+                javadoc.getConventionMapping().map("destinationDir", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return new File(convention.getPlugin(JavaPluginConvention.class).getDocsDir(), "javadoc");
+                    }
+                });
+                javadoc.getConventionMapping().map("title", new ConventionValue() {
+                    public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                        return convention.getPlugin(ReportingBasePluginConvention.class).getApiDocTitle();
+                    }
+                });
+            }
+        });
+    }
+
+    private void configureCheck(final Project project) {
+        Task checkTask = project.getTasks().add(CHECK_TASK_NAME);
+        checkTask.setDescription("Runs all checks.");
+        checkTask.setGroup(VERIFICATION_GROUP);
+    }
+
+    private void configureBuild(Project project) {
+        DefaultTask buildTask = project.getTasks().add(BUILD_TASK_NAME, DefaultTask.class);
+        buildTask.setDescription("Assembles and tests this project.");
+        buildTask.setGroup(BasePlugin.BUILD_GROUP);
+        buildTask.dependsOn(BasePlugin.ASSEMBLE_TASK_NAME);
+        buildTask.dependsOn(CHECK_TASK_NAME);
+    }
+
+    private void configureBuildNeeded(Project project) {
+        DefaultTask buildTask = project.getTasks().add(BUILD_NEEDED_TASK_NAME, DefaultTask.class);
+        buildTask.setDescription("Assembles and tests this project and all projects it depends on.");
+        buildTask.setGroup(BasePlugin.BUILD_GROUP);
+        buildTask.dependsOn(BUILD_TASK_NAME);
+    }
+
+    private void configureBuildDependents(Project project) {
+        DefaultTask buildTask = project.getTasks().add(BUILD_DEPENDENTS_TASK_NAME, DefaultTask.class);
+        buildTask.setDescription("Assembles and tests this project and all projects that depend on it.");
+        buildTask.setGroup(BasePlugin.BUILD_GROUP);
+        buildTask.dependsOn(BUILD_TASK_NAME);
+    }
+
+    private void configureTest(final Project project) {
+        project.getTasks().withType(Test.class, new Action<Test>() {
+            public void execute(Test test) {
+                configureTestDefaults(test, project);
+            }
+        });
+        project.afterEvaluate(new Action<Project>() {
+            public void execute(Project project) {
+                project.getTasks().withType(Test.class, new Action<Test>() {
+                    public void execute(Test test) {
+                        overwriteIncludesIfSinglePropertyIsSet(test);
+                        overwriteDebugIfDebugPropertyIsSet(test);
+                    }
+                });
+            }
+        });
+    }
+
+    private void overwriteDebugIfDebugPropertyIsSet(Test test) {
+        String debugProp = getTaskPrefixedProperty(test, "debug");
+        if (debugProp != null) {
+            test.doFirst(new Action<Task>() {
+                public void execute(Task task) {
+                    task.getLogger().info("Running tests for remote debugging.");
+                }
+            });
+            test.setDebug(true);
+        }
+    }
+
+    private void overwriteIncludesIfSinglePropertyIsSet(final Test test) {
+        String singleTest = getTaskPrefixedProperty(test, "single");
+        if (singleTest == null) {
+            return;
+        }
+        test.doFirst(new Action<Task>() {
+            public void execute(Task task) {
+                test.getLogger().info("Running single tests with pattern: {}", test.getIncludes());
+            }
+        });
+        test.setIncludes(WrapUtil.toSet(String.format("**/%s*.class", singleTest)));
+        failIfNoTestIsExecuted(test, singleTest);
+    }
+
+    private void failIfNoTestIsExecuted(Test test, final String pattern) {
+        test.addTestListener(new TestListener() {
+            public void beforeSuite(TestDescriptor suite) {
+                // do nothing
+            }
+
+            public void afterSuite(TestDescriptor suite, TestResult result) {
+                if (suite.getParent() == null && result.getTestCount() == 0) {
+                    throw new GradleException("Could not find matching test for pattern: " + pattern);
+                }
+            }
+
+            public void beforeTest(TestDescriptor testDescriptor) {
+                // do nothing
+            }
+
+            public void afterTest(TestDescriptor testDescriptor, TestResult result) {
+                // do nothing
+            }
+        });
+    }
+
+    private String getTaskPrefixedProperty(Task task, String propertyName) {
+        String suffix = '.' + propertyName;
+        String value = System.getProperty(task.getPath() + suffix);
+        if (value == null) {
+            return System.getProperty(task.getName() + suffix);
+        }
+        return value;
+    }
+
+    private void configureTestDefaults(Test test, Project project) {
+        test.getConventionMapping().map("testResultsDir", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return convention.getPlugin(JavaPluginConvention.class).getTestResultsDir();
+            }
+        });
+        test.getConventionMapping().map("testReportDir", new ConventionValue() {
+            public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
+                return convention.getPlugin(JavaPluginConvention.class).getTestReportDir();
+            }
+        });
+        test.workingDir(project.getProjectDir());
+    }
+}
\ No newline at end of file
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaPlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaPlugin.java
new file mode 100644
index 0000000..1d32a85
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaPlugin.java
@@ -0,0 +1,213 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins;
+
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact;
+import org.gradle.api.internal.plugins.EmbeddableJavaProject;
+import org.gradle.api.tasks.SourceSet;
+import org.gradle.api.tasks.bundling.Jar;
+import org.gradle.api.tasks.javadoc.Javadoc;
+import org.gradle.api.tasks.testing.Test;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.Callable;
+
+/**
+ * <p>A {@link Plugin} which compiles and tests Java source, and assembles it into a JAR file.</p>
+ *
+ * @author Hans Dockter
+ */
+public class JavaPlugin implements Plugin<Project> {
+    public static final String PROCESS_RESOURCES_TASK_NAME = "processResources";
+    public static final String CLASSES_TASK_NAME = "classes";
+    public static final String COMPILE_JAVA_TASK_NAME = "compileJava";
+    public static final String PROCESS_TEST_RESOURCES_TASK_NAME = "processTestResources";
+    public static final String TEST_CLASSES_TASK_NAME = "testClasses";
+    public static final String COMPILE_TEST_JAVA_TASK_NAME = "compileTestJava";
+    public static final String TEST_TASK_NAME = "test";
+    public static final String JAR_TASK_NAME = "jar";
+    public static final String JAVADOC_TASK_NAME = "javadoc";
+
+    public static final String COMPILE_CONFIGURATION_NAME = "compile";
+    public static final String RUNTIME_CONFIGURATION_NAME = "runtime";
+    public static final String TEST_RUNTIME_CONFIGURATION_NAME = "testRuntime";
+    public static final String TEST_COMPILE_CONFIGURATION_NAME = "testCompile";
+
+    public void apply(Project project) {
+        project.getPlugins().apply(JavaBasePlugin.class);
+
+        JavaPluginConvention javaConvention = (JavaPluginConvention) project.getConvention().getPlugins().get("java");
+        project.getConvention().getPlugins().put("embeddedJavaProject", new EmbeddableJavaProjectImpl(javaConvention));
+
+        configureConfigurations(project);
+
+        configureSourceSets(javaConvention);
+
+        configureJavaDoc(javaConvention);
+        configureTest(project, javaConvention);
+        configureArchives(project, javaConvention);
+        configureBuild(project);
+    }
+
+    private void configureSourceSets(final JavaPluginConvention pluginConvention) {
+        final Project project = pluginConvention.getProject();
+
+        pluginConvention.getSourceSets().all(new Action<SourceSet>() {
+            public void execute(SourceSet sourceSet) {
+                sourceSet.setCompileClasspath(project.getConfigurations().getByName(COMPILE_CONFIGURATION_NAME));
+                sourceSet.setRuntimeClasspath(sourceSet.getClasses().plus(project.getConfigurations().getByName(
+                        RUNTIME_CONFIGURATION_NAME)));
+            }
+        });
+        SourceSet main = pluginConvention.getSourceSets().add(SourceSet.MAIN_SOURCE_SET_NAME);
+
+        SourceSet test = pluginConvention.getSourceSets().add(SourceSet.TEST_SOURCE_SET_NAME);
+        test.setCompileClasspath(project.files(main.getClasses(), project.getConfigurations().getByName(
+                TEST_COMPILE_CONFIGURATION_NAME)));
+        test.setRuntimeClasspath(project.files(test.getClasses(), main.getClasses(),
+                project.getConfigurations().getByName(TEST_RUNTIME_CONFIGURATION_NAME)));
+    }
+
+    private void configureJavaDoc(final JavaPluginConvention pluginConvention) {
+        Project project = pluginConvention.getProject();
+
+        SourceSet mainSourceSet = pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME);
+        Javadoc javadoc = project.getTasks().add(JAVADOC_TASK_NAME, Javadoc.class);
+        javadoc.setDescription("Generates the javadoc for the main source code.");
+        javadoc.setGroup(JavaBasePlugin.DOCUMENTATION_GROUP);
+        javadoc.setClasspath(mainSourceSet.getClasses().plus(mainSourceSet.getCompileClasspath()));
+        javadoc.setSource(mainSourceSet.getAllJava());
+        addDependsOnTaskInOtherProjects(javadoc, true, JAVADOC_TASK_NAME, COMPILE_CONFIGURATION_NAME);
+    }
+
+    private void configureArchives(final Project project, final JavaPluginConvention pluginConvention) {
+        project.getTasks().getByName(JavaBasePlugin.CHECK_TASK_NAME).dependsOn(TEST_TASK_NAME);
+        Jar jar = project.getTasks().add(JAR_TASK_NAME, Jar.class);
+        jar.getManifest().from(pluginConvention.getManifest());
+        jar.setDescription("Assembles a jar archive containing the main classes.");
+        jar.setGroup(BasePlugin.BUILD_GROUP);
+        jar.from(pluginConvention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getClasses());
+        jar.getMetaInf().from(new Callable() {
+            public Object call() throws Exception {
+                return pluginConvention.getMetaInf();
+            }
+        });
+
+        project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION).addArtifact(new ArchivePublishArtifact(
+                jar));
+    }
+
+    private void configureBuild(Project project) {
+        addDependsOnTaskInOtherProjects(project.getTasks().getByName(JavaBasePlugin.BUILD_NEEDED_TASK_NAME), true,
+                JavaBasePlugin.BUILD_TASK_NAME, TEST_RUNTIME_CONFIGURATION_NAME);
+        addDependsOnTaskInOtherProjects(project.getTasks().getByName(JavaBasePlugin.BUILD_DEPENDENTS_TASK_NAME), false,
+                JavaBasePlugin.BUILD_TASK_NAME, TEST_RUNTIME_CONFIGURATION_NAME);
+    }
+
+    private void configureTest(final Project project, final JavaPluginConvention pluginConvention) {
+        project.getTasks().withType(Test.class, new Action<Test>() {
+            public void execute(Test test) {
+                test.getConventionMapping().map("testClassesDir", new Callable<Object>() {
+                    public Object call() throws Exception {
+                        return pluginConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME).getClassesDir();
+                    }
+                });
+                test.getConventionMapping().map("classpath", new Callable<Object>() {
+                    public Object call() throws Exception {
+                        return pluginConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME).getRuntimeClasspath();
+                    }
+                });
+                test.getConventionMapping().map("testSrcDirs", new Callable<Object>() {
+                    public Object call() throws Exception {
+                        return new ArrayList<File>(pluginConvention.getSourceSets().getByName(SourceSet.TEST_SOURCE_SET_NAME)
+                                .getJava().getSrcDirs());
+                    }
+                });
+            }
+        });
+        Test test = project.getTasks().add(TEST_TASK_NAME, Test.class);
+        test.setDescription("Runs the unit tests.");
+        test.setGroup(JavaBasePlugin.VERIFICATION_GROUP);
+    }
+
+    void configureConfigurations(final Project project) {
+        ConfigurationContainer configurations = project.getConfigurations();
+        Configuration compileConfiguration = configurations.add(COMPILE_CONFIGURATION_NAME).setVisible(false).
+                setDescription("Classpath for compiling the sources.");
+        Configuration runtimeConfiguration = configurations.add(RUNTIME_CONFIGURATION_NAME).setVisible(false)
+                .extendsFrom(compileConfiguration).
+                        setDescription("Classpath for running the compiled sources.");
+
+        Configuration compileTestsConfiguration = configurations.add(TEST_COMPILE_CONFIGURATION_NAME).setVisible(false)
+                .extendsFrom(compileConfiguration).setDescription("Classpath for compiling the test sources.");
+
+        configurations.add(TEST_RUNTIME_CONFIGURATION_NAME).setVisible(false).extendsFrom(runtimeConfiguration,
+                compileTestsConfiguration).
+                setDescription("Classpath for running the test sources.");
+
+        configurations.getByName(Dependency.DEFAULT_CONFIGURATION).extendsFrom(runtimeConfiguration);
+    }
+
+    /**
+     * Adds a dependency on tasks with the specified name in other projects.  The other projects are determined from
+     * project lib dependencies using the specified configuration name. These may be projects this project depends on or
+     * projects that depend on this project based on the useDependOn argument.
+     *
+     * @param task Task to add dependencies to
+     * @param useDependedOn if true, add tasks from projects this project depends on, otherwise use projects that depend
+     * on this one.
+     * @param otherProjectTaskName name of task in other projects
+     * @param configurationName name of configuration to use to find the other projects
+     */
+    private void addDependsOnTaskInOtherProjects(final Task task, boolean useDependedOn, String otherProjectTaskName,
+                                                 String configurationName) {
+        Project project = task.getProject();
+        final Configuration configuration = project.getConfigurations().getByName(configurationName);
+        task.dependsOn(configuration.getTaskDependencyFromProjectDependency(useDependedOn, otherProjectTaskName));
+    }
+
+    private static class EmbeddableJavaProjectImpl implements EmbeddableJavaProject {
+        private final JavaPluginConvention convention;
+
+        public EmbeddableJavaProjectImpl(JavaPluginConvention convention) {
+            this.convention = convention;
+        }
+
+        public Collection<String> getRebuildTasks() {
+            return Arrays.asList(BasePlugin.CLEAN_TASK_NAME, JavaBasePlugin.BUILD_TASK_NAME);
+        }
+
+        public Collection<String> getBuildTasks() {
+            return Arrays.asList(JavaBasePlugin.BUILD_TASK_NAME);
+        }
+
+        public FileCollection getRuntimeClasspath() {
+            return convention.getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
+        }
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaPluginConvention.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaPluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/JavaPluginConvention.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/JavaPluginConvention.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPlugin.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPlugin.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPlugin.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPluginConvention.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPluginConvention.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ProjectReportsPluginConvention.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePlugin.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePlugin.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePlugin.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePluginConvention.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePluginConvention.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePluginConvention.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/ReportingBasePluginConvention.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/WarPlugin.java b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/WarPlugin.java
new file mode 100644
index 0000000..74a5a84
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/WarPlugin.java
@@ -0,0 +1,112 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.plugins;
+
+import org.gradle.api.Action;
+import org.gradle.api.Plugin;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.artifacts.ConfigurationContainer;
+import org.gradle.api.artifacts.Dependency;
+import org.gradle.api.artifacts.PublishArtifact;
+import org.gradle.api.file.FileCollection;
+import org.gradle.api.internal.artifacts.publish.ArchivePublishArtifact;
+import org.gradle.api.tasks.SourceSet;
+import org.gradle.api.tasks.bundling.Jar;
+import org.gradle.api.tasks.bundling.War;
+
+import java.util.concurrent.Callable;
+
+/**
+ * <p>A {@link Plugin} which extends the {@link JavaPlugin} to add tasks which assemble a web application into a WAR
+ * file.</p>
+ *
+ * @author Hans Dockter
+ */
+public class WarPlugin implements Plugin<Project> {
+    public static final String PROVIDED_COMPILE_CONFIGURATION_NAME = "providedCompile";
+    public static final String PROVIDED_RUNTIME_CONFIGURATION_NAME = "providedRuntime";
+    public static final String WAR_TASK_NAME = "war";
+    public static final String WEB_APP_GROUP = "web application";
+
+    public void apply(final Project project) {
+        project.getPlugins().apply(JavaPlugin.class);
+        final WarPluginConvention pluginConvention = new WarPluginConvention(project);
+        project.getConvention().getPlugins().put("war", pluginConvention);
+
+        project.getTasks().withType(War.class, new Action<War>() {
+            public void execute(War task) {
+                task.from(new Callable() {
+                    public Object call() throws Exception {
+                        return pluginConvention.getWebAppDir();
+                    }
+                });
+                task.dependsOn(new Callable() {
+                    public Object call() throws Exception {
+                        return project.getConvention().getPlugin(JavaPluginConvention.class).getSourceSets().getByName(
+                                SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
+                    }
+                });
+                task.classpath(new Object[] {new Callable() {
+                    public Object call() throws Exception {
+                        FileCollection runtimeClasspath = project.getConvention().getPlugin(JavaPluginConvention.class)
+                                .getSourceSets().getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
+                        Configuration providedRuntime = project.getConfigurations().getByName(
+                                PROVIDED_RUNTIME_CONFIGURATION_NAME);
+                        return runtimeClasspath.minus(providedRuntime);
+                    }
+                }});
+            }
+        });
+        
+        War war = project.getTasks().add(WAR_TASK_NAME, War.class);
+        war.setDescription("Generates a war archive with all the compiled classes, the web-app content and the libraries.");
+        war.setGroup(BasePlugin.BUILD_GROUP);
+        Configuration archivesConfiguration = project.getConfigurations().getByName(Dependency.ARCHIVES_CONFIGURATION);
+        disableJarTaskAndRemoveFromArchivesConfiguration(project, archivesConfiguration);
+        archivesConfiguration.addArtifact(new ArchivePublishArtifact(war));
+        configureConfigurations(project.getConfigurations());
+    }
+
+    private void disableJarTaskAndRemoveFromArchivesConfiguration(Project project, Configuration archivesConfiguration) {
+        Jar jarTask = (Jar) project.getTasks().getByName(JavaPlugin.JAR_TASK_NAME);
+        jarTask.setEnabled(false);
+        removeJarTaskFromArchivesConfiguration(archivesConfiguration, jarTask);
+    }
+
+    private void removeJarTaskFromArchivesConfiguration(Configuration archivesConfiguration, Jar jar) {
+        // todo: There should be a richer connection between an ArchiveTask and a PublishArtifact
+        for (PublishArtifact publishArtifact : archivesConfiguration.getAllArtifacts()) {
+            if (publishArtifact instanceof ArchivePublishArtifact) {
+                ArchivePublishArtifact archivePublishArtifact = (ArchivePublishArtifact) publishArtifact;
+                if (archivePublishArtifact.getArchiveTask() == jar) {
+                    archivesConfiguration.removeArtifact(publishArtifact);
+                }
+            }
+        }
+    }
+
+    public void configureConfigurations(ConfigurationContainer configurationContainer) {
+        Configuration provideCompileConfiguration = configurationContainer.add(PROVIDED_COMPILE_CONFIGURATION_NAME).setVisible(false).
+                setDescription("Additional compile classpath for libraries that should not be part of the WAR archive.");
+        Configuration provideRuntimeConfiguration = configurationContainer.add(PROVIDED_RUNTIME_CONFIGURATION_NAME).setVisible(false).
+                extendsFrom(provideCompileConfiguration).
+                setDescription("Additional runtime classpath for libraries that should not be part of the WAR archive.");
+        configurationContainer.getByName(JavaPlugin.COMPILE_CONFIGURATION_NAME).extendsFrom(provideCompileConfiguration);
+        configurationContainer.getByName(JavaPlugin.RUNTIME_CONFIGURATION_NAME).extendsFrom(provideRuntimeConfiguration);
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/WarPluginConvention.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/plugins/WarPluginConvention.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/plugins/WarPluginConvention.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/plugins/WarPluginConvention.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/GroovySourceSet.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/GroovySourceSet.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/GroovySourceSet.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/GroovySourceSet.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/SourceSet.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/SourceSet.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/SourceSet.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/SourceSet.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/SourceSetContainer.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/SourceSetContainer.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/SourceSetContainer.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/SourceSetContainer.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/bundling/Jar.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/bundling/Jar.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/bundling/Jar.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/bundling/Jar.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/bundling/War.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/bundling/War.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/bundling/War.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/bundling/War.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractCompile.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractCompile.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractCompile.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractCompile.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/AbstractOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/Compile.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/Compile.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/Compile.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/Compile.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/CompileOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/CompileOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/CompileOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/CompileOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/DebugOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/DebugOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/DebugOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/DebugOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/DependOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/DependOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/DependOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/DependOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/ForkOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/ForkOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/ForkOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/ForkOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompile.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompile.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompile.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompile.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompileOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompileOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompileOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyCompileOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyForkOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyForkOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyForkOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/GroovyForkOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/compile/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/compile/package-info.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntGroovydoc.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntGroovydoc.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntGroovydoc.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntGroovydoc.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntJavadoc.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntJavadoc.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntJavadoc.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/AntJavadoc.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Groovydoc.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Groovydoc.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Groovydoc.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Groovydoc.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Javadoc.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Javadoc.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Javadoc.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/Javadoc.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/javadoc/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/javadoc/package-info.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/Test.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/Test.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/Test.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/Test.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestDescriptor.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestDescriptor.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestDescriptor.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestDescriptor.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestFrameworkOptions.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestFrameworkOptions.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestFrameworkOptions.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestFrameworkOptions.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestListener.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestListener.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestListener.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestListener.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestResult.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestResult.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/TestResult.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/TestResult.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/JUnitOptions.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/JUnitOptions.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/JUnitOptions.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/JUnitOptions.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/junit/package-info.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/package-info.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/TestNGOptions.groovy b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/TestNGOptions.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/TestNGOptions.groovy
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/TestNGOptions.groovy
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/api/tasks/testing/testng/package-info.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/CoreJavadocOptions.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/CoreJavadocOptions.java
new file mode 100644
index 0000000..fa51c72
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/CoreJavadocOptions.java
@@ -0,0 +1,565 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc;
+
+import org.gradle.external.javadoc.internal.JavadocOptionFile;
+import org.gradle.process.ExecSpec;
+import org.gradle.util.GFileUtils;
+import org.gradle.util.GUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * Provides the core Javadoc Options. That is, provides the options which are not doclet specific.
+ *
+ * @author Tom Eyckmans
+ */
+public abstract class CoreJavadocOptions implements MinimalJavadocOptions {
+    private final JavadocOptionFile optionFile;
+
+    public CoreJavadocOptions() {
+        this(new JavadocOptionFile());
+    }
+
+    protected CoreJavadocOptions(JavadocOptionFile optionFile) {
+        this.optionFile = optionFile;
+
+        overview = addStringOption("overview");
+        memberLevel = addEnumOption("memberLevel");
+        doclet = addStringOption("doclet");
+        docletpath = addPathOption("docletpath");
+        source = addStringOption("source");
+        classpath = addPathOption("classpath");
+        bootClasspath = addPathOption("bootclasspath");
+        extDirs = addPathOption("extdirs");
+        outputLevel = addEnumOption("outputLevel", JavadocOutputLevel.QUIET);
+        breakIterator = addBooleanOption("breakiterator");
+        locale = addStringOption("locale");
+        encoding = addStringOption("encoding");
+
+        sourceNames = optionFile.getSourceNames();
+    }
+
+    /**
+     * -overview  path\filename
+     * Specifies that javadoc should retrieve the text for the overview documentation from
+     * the "source" file specified by path/filename and place it on the Overview page (overview-summary.html).
+     * The path/filename is relative to the -sourcepath.
+     *
+     * While you can use any name you want for filename and place it anywhere you want for path,
+     * a typical thing to do is to name it overview.html and place it in the source tree at the directory that contains the topmost package directories.
+     * In this location, no path is needed when documenting packages, since -sourcepath will point to this file.
+     * For example, if the source tree for the java.lang package is C:\src\classes\java\lang\,
+     * then you could place the overview file at C:\src\classes\overview.html. See Real World Example.
+     *
+     * For information about the file specified by path/filename, see overview comment file.
+     *
+     * Note that the overview page is created only if you pass into javadoc two or more package names.
+     * For further explanation, see HTML Frames.)
+     *
+     * The title on the overview page is set by -doctitle.
+     */
+    private final JavadocOptionFileOption<String> overview;
+
+    public String getOverview() {
+        return overview.getValue();
+    }
+
+    public void setOverview(String overview) {
+        this.overview.setValue(overview);
+    }
+
+    /**
+     * Fluent setter for the overview option.
+     * @param overview The new overview.
+     * @return The <code>MinimalJavadocOptions</code> object.
+     */
+    public MinimalJavadocOptions overview(String overview) {
+        setOverview(overview);
+        return this;
+    }
+
+    /**
+     * Switch to set the members that should be included in the Javadoc. (-public, -protected, -package, -private)
+     */
+    private final JavadocOptionFileOption<JavadocMemberLevel> memberLevel;
+
+    public JavadocMemberLevel getMemberLevel() {
+        return memberLevel.getValue();
+    }
+
+    public void setMemberLevel(JavadocMemberLevel memberLevel) {
+        this.memberLevel.setValue(memberLevel);
+    }
+
+    public MinimalJavadocOptions showFromPublic() {
+        setMemberLevel(JavadocMemberLevel.PUBLIC);
+        return this;
+    }
+
+    public MinimalJavadocOptions showFromProtected() {
+        setMemberLevel(JavadocMemberLevel.PROTECTED);
+        return this;
+    }
+
+    public MinimalJavadocOptions showFromPackage() {
+        setMemberLevel(JavadocMemberLevel.PACKAGE);
+        return this;
+    }
+
+    public void contributeCommandLineOptions(ExecSpec execHandleBuilder) {
+        execHandleBuilder
+            .args(GUtil.prefix("-J", jFlags)) // J flags can not be set in the option file
+            .args(GUtil.prefix("@", GFileUtils.toPaths(optionFiles))); // add additional option files
+    }
+
+    public MinimalJavadocOptions showFromPrivate() {
+        setMemberLevel(JavadocMemberLevel.PRIVATE);
+        return this;
+    }
+
+    public MinimalJavadocOptions showAll() {
+        return showFromPrivate();
+    }
+
+    /**
+     * -doclet  class
+     * Specifies the class file that starts the doclet used in generating the documentation. Use the fully-qualified name.
+     * This doclet defines the content and formats the output. If the -doclet option is not used,
+     * javadoc uses the standard doclet for generating the default HTML format.
+     * This class must contain the start(Root) method.
+     * The path to this starting class is defined by the -docletpath option.
+     *
+     * For example, to call the MIF doclet, use:
+     *
+     *     -doclet com.sun.tools.doclets.mif.MIFDoclet
+     *
+     * For full, working examples of running a particular doclet, see Running the MIF Doclet.
+     */
+    private final JavadocOptionFileOption<String> doclet;
+
+    public String getDoclet() {
+        return doclet.getValue();
+    }
+
+    public void setDoclet(String doclet) {
+        this.doclet.setValue(doclet);
+    }
+
+    public MinimalJavadocOptions doclet(String doclet) {
+        setDoclet(doclet);
+        return this;
+    }
+
+    /**
+     * -docletpath  classpathlist
+     * Specifies the path to the doclet starting class file (specified with the -doclet option) and any jar files it depends on.
+     * If the starting class file is in a jar file, then this specifies the path to that jar file, as shown in the example below.
+     * You can specify an absolute path or a path relative to the current directory. If classpathlist contains multiple paths or jar files,
+     * they should be separated with a colon (:) on Solaris and a semi-colon (;) on Windows.
+     * This option is not necessary if the doclet starting class is already in the search path.
+     *
+     * Example of path to jar file that contains the starting doclet class file. Notice the jar filename is included.
+     *
+     *    -docletpath C:/user/mifdoclet/lib/mifdoclet.jar
+     *
+     * Example of path to starting doclet class file. Notice the class filename is omitted.
+     *
+     *    -docletpath C:/user/mifdoclet/classes/com/sun/tools/doclets/mif/
+     *
+     * For full, working examples of running a particular doclet, see Running the MIF Doclet.
+     */
+    private final JavadocOptionFileOption<List<File>> docletpath;
+
+    public List<File> getDocletpath() {
+        return docletpath.getValue();
+    }
+
+    public void setDocletpath(List<File> docletpath) {
+        this.docletpath.setValue(docletpath);
+    }
+
+    public MinimalJavadocOptions docletpath(File ... docletpath) {
+        this.docletpath.getValue().addAll(Arrays.asList(docletpath));
+        return this;
+    }
+
+    /**
+     * -source release
+     * Specifies the version of source code accepted. The following values for release are allowed:
+     * 1.5  javadoc accepts code containing generics and other language features introduced in JDK 1.5.
+     * The compiler defaults to the 1.5 behavior if the -source flag is not used.
+     * 1.4  javadoc accepts code containing assertions, which were introduced in JDK 1.4.
+     * 1.3  javadoc does not support assertions, generics, or other language features introduced after JDK 1.3.
+     *
+     * Use the value of release corresponding to that used when compiling the code with javac.
+     */
+    private final JavadocOptionFileOption<String> source; // TODO bind with the sourceCompatibility property
+
+    public String getSource() {
+        return source.getValue();
+    }
+
+    public void setSource(String source) {
+        this.source.setValue(source);
+    }
+
+    public MinimalJavadocOptions source(String source) {
+        setSource(source);
+        return this;
+    }
+
+    /**
+     * -classpath  classpathlist
+     * Specifies the paths where javadoc will look for referenced classes (.class files)
+     * -- these are the documented classes plus any classes referenced by those classes.
+     * The classpathlist can contain multiple paths by separating them with a semicolon (;).
+     * The Javadoc tool will search in all subdirectories of the specified paths.
+     * Follow the instructions in class path documentation for specifying classpathlist.
+     *
+     * If -sourcepath is omitted, the Javadoc tool uses -classpath to find the source files as well as
+     * class files (for backward compatibility). Therefore, if you want to search for source and class files in separate paths,
+     * use both -sourcepath and -classpath.
+     *
+     * For example, if you want to document com.mypackage, whose source files reside in the directory C:/user/src/com/mypackage,
+     * and if this package relies on a library in C:/user/lib, you would specify:
+     *
+     *   C:> javadoc -classpath /user/lib -sourcepath /user/src com.mypackage
+     *
+     * As with other tools, if you do not specify -classpath, the Javadoc tool uses the CLASSPATH environment variable,
+     * if it is set. If both are not set, the Javadoc tool searches for classes from the current directory.
+     *
+     * For an in-depth description of how the Javadoc tool uses -classpath to find user classes as it relates to extension classes and
+     * bootstrap classes, see How Classes Are Found.
+     */
+    private final JavadocOptionFileOption<List<File>> classpath; // TODO link to runtime configuration ?
+
+    public List<File> getClasspath() {
+        return classpath.getValue();
+    }
+
+    public void setClasspath(List<File> classpath) {
+        this.classpath.setValue(classpath);
+    }
+
+    public MinimalJavadocOptions classpath(List<File> classpath) {
+        this.classpath.getValue().addAll(classpath);
+        return this;
+    }
+
+    public MinimalJavadocOptions classpath(File ... classpath) {
+        this.classpath.getValue().addAll(Arrays.asList(classpath));
+        return this;
+    }
+
+    /**
+     * -bootclasspath  classpathlist
+     * Specifies the paths where the boot classes reside. These are nominally the Java platform classes.
+     * The bootclasspath is part of the search path the Javadoc tool will use to look up source and class files.
+     * See How Classes Are Found. for more details. Separate directories in classpathlist with semicolons (;).
+     */
+    private final JavadocOptionFileOption<List<File>> bootClasspath;
+
+    public List<File> getBootClasspath() {
+        return bootClasspath.getValue();
+    }
+
+    public void setBootClasspath(List<File> bootClasspath) {
+        this.bootClasspath.setValue(bootClasspath);
+    }
+
+    public MinimalJavadocOptions bootClasspath(File ... bootClasspath) {
+        this.bootClasspath.getValue().addAll(Arrays.asList(bootClasspath));
+        return this;
+    }
+
+    /**
+     * -extdirs  dirlist
+     * Specifies the directories where extension classes reside.
+     * These are any classes that use the Java Extension mechanism.
+     * The extdirs is part of the search path the Javadoc tool will use to look up source and class files.
+     * See -classpath (above) for more details. Separate directories in dirlist with semicolons (;).
+     */
+    private final JavadocOptionFileOption<List<File>> extDirs;
+
+    public List<File> getExtDirs() {
+        return extDirs.getValue();
+    }
+
+    public void setExtDirs(List<File> extDirs) {
+        this.extDirs.setValue(extDirs);
+    }
+
+    public MinimalJavadocOptions extDirs(File ... extDirs) {
+        this.extDirs.getValue().addAll(Arrays.asList(extDirs));
+        return this;
+    }
+
+    /**
+     * Control the Javadoc output level (-verbose or -quiet).
+     */
+    private final JavadocOptionFileOption<JavadocOutputLevel> outputLevel;
+
+    public JavadocOutputLevel getOutputLevel() {
+        return outputLevel.getValue();
+    }
+
+    public void setOutputLevel(JavadocOutputLevel outputLevel) {
+        this.outputLevel.setValue(outputLevel);
+    }
+
+    public MinimalJavadocOptions verbose() {
+        setOutputLevel(JavadocOutputLevel.VERBOSE);
+        return this;
+    }
+
+    public boolean isVerbose() {
+        return outputLevel.getValue() == JavadocOutputLevel.VERBOSE;
+    }
+
+    public MinimalJavadocOptions quiet() {
+        setOutputLevel(JavadocOutputLevel.QUIET);
+        return this;
+    }
+
+    /**
+     * -breakiterator
+     * Uses the internationalized sentence boundary of java.text.BreakIterator to determine the end of the first sentence
+     * for English (all other locales already use BreakIterator), rather than an English language, locale-specific algorithm.
+     * By first sentence, we mean the first sentence in the main description of a package, class or member.
+     * This sentence is copied to the package, class or member summary, and to the alphabetic index.
+     *
+     * From JDK 1.2 forward, the BreakIterator class is already used to determine the end of sentence for all languages but English.
+     * Therefore, the -breakiterator option has no effect except for English from 1.2 forward. English has its own default algorithm:
+     *
+     *     * English default sentence-break algorithm - Stops at a period followed by a space or a HTML block tag, such as <P>.
+     *     * Breakiterator sentence-break algorithm - In general, stops at a period,
+     *       question mark or exclamation mark followed by a space if the next word starts with a capital letter.
+     *       This is meant to handle most abbreviations (such as "The serial no. is valid", but won't handle "Mr. Smith").
+     *       Doesn't stop at HTML tags or sentences that begin with numbers or symbols.
+     *       Stops at the last period in "../filename", even if embedded in an HTML tag.
+     *
+     *     NOTE: We have removed from 1.5.0 the breakiterator warning messages that were in 1.4.x and
+     *           have left the default sentence-break algorithm unchanged. That is, the -breakiterator option is not the default in 1.5.0,
+     *           nor do we expect it to become the default. This is a reversal from our former intention that
+     *           the default would change in the "next major release" (1.5.0).
+     *           This means if you have not modified your source code to eliminate the breakiterator warnings in 1.4.x,
+     *           then you don't have to do anything, and the warnings go away starting with 1.5.0.
+     *           The reason for this reversal is because any benefit to having breakiterator become the default
+     *           would be outweighed by the incompatible source change it would require.
+     *           We regret any extra work and confusion this has caused.
+     */
+    private final JavadocOptionFileOption<Boolean> breakIterator;
+
+    public boolean isBreakIterator() {
+        return breakIterator.getValue();
+    }
+
+    public void setBreakIterator(boolean breakIterator) {
+        this.breakIterator.setValue(breakIterator);
+    }
+
+    public MinimalJavadocOptions breakIterator(boolean breakIterator) {
+        setBreakIterator(breakIterator);
+        return this;
+    }
+
+    public MinimalJavadocOptions breakIterator() {
+        setBreakIterator(true);
+        return this;
+    }
+
+    /**
+     * -locale  language_country_variant
+     *     Important - The -locale option must be placed ahead (to the left) of any options provided by the standard doclet or
+     *                 any other doclet. Otherwise, the navigation bars will appear in English.
+     *                 This is the only command-line option that is order-dependent.
+     *
+     * Specifies the locale that javadoc uses when generating documentation.
+     * The argument is the name of the locale, as described in java.util.Locale documentation, such as
+     * en_US (English, United States) or en_US_WIN (Windows variant).
+     *
+     * Specifying a locale causes javadoc to choose the resource files of that locale for messages
+     * (strings in the navigation bar, headings for lists and tables, help file contents,
+     * comments in stylesheet.css, and so forth).
+     * It also specifies the sorting order for lists sorted alphabetically,
+     * and the sentence separator to determine the end of the first sentence.
+     * It does not determine the locale of the doc comment text specified in the source files of the documented classes.
+     */
+    private final JavadocOptionFileOption<String> locale;
+
+    public String getLocale() {
+        return locale.getValue();
+    }
+
+    public void setLocale(String locale) {
+        this.locale.setValue(locale);
+    }
+
+    public MinimalJavadocOptions locale(String locale) {
+        setLocale(locale);
+        return this;
+    }
+
+    /**
+     * -encoding  name
+     * Specifies the encoding name of the source files, such as EUCJIS/SJIS. If this option is not specified, the platform default converter is used.
+     *
+     * Also see -docencoding and -charset.
+     */
+    private final JavadocOptionFileOption<String> encoding;
+
+    public String getEncoding() {
+        return encoding.getValue();
+    }
+
+    public void setEncoding(String encoding) {
+        this.encoding.setValue(encoding);
+    }
+
+    public MinimalJavadocOptions encoding(String encoding) {
+        setEncoding(encoding);
+        return this;
+    }
+
+    private final OptionLessJavadocOptionFileOption<List<String>> sourceNames;
+
+    public List<String> getSourceNames() {
+        return sourceNames.getValue();
+    }
+
+    public void setSourceNames(List<String> sourceNames) {
+        this.sourceNames.setValue(sourceNames);
+    }
+
+    public MinimalJavadocOptions sourceNames(String ... sourceNames) {
+        this.sourceNames.getValue().addAll(Arrays.asList(sourceNames));
+        return this;
+    }
+
+    /**
+     * -Jflag
+     * Passes flag directly to the runtime system java that runs javadoc.
+     * Notice there must be no space between the J and the flag. For example,
+     * if you need to ensure that the system sets aside 32 megabytes of memory in which to process the generated documentation,
+     * then you would call the -Xmx option of java as follows (-Xms is optional, as it only sets the size of initial memory,
+     * which is useful if you know the minimum amount of memory required):
+     *
+     *    C:> javadoc -J-Xmx32m -J-Xms32m com.mypackage
+     *
+     * To tell what version of javadoc you are using, call the "-version" option of java:
+     *
+     *    C:> javadoc -J-version
+     *    java version "1.2"
+     *    Classic VM (build JDK-1.2-V, green threads, sunwjit)
+     *
+     * (The version number of the standard doclet appears in its output stream.)
+     */
+    private List<String> jFlags = new ArrayList<String>();
+
+    public List<String> getJFlags() {
+        return jFlags;
+    }
+
+    public void setJFlags(List<String> jFlags) {
+        this.jFlags = jFlags;
+    }
+
+    public MinimalJavadocOptions jFlags(String ... jFlags) {
+        this.jFlags.addAll(Arrays.asList(jFlags));
+        return this;
+    }
+
+    private List<File> optionFiles = new ArrayList<File>();
+
+    public List<File> getOptionFiles() {
+        return optionFiles;
+    }
+
+    public void setOptionFiles(List<File> optionFiles) {
+        this.optionFiles = optionFiles;
+    }
+
+    public MinimalJavadocOptions optionFiles(File ... argumentFiles) {
+        this.optionFiles.addAll(Arrays.asList(argumentFiles));
+        return this;
+    }
+
+    public final void write(File outputFile) throws IOException {
+        optionFile.write(outputFile);
+    }
+
+    public <T> JavadocOptionFileOption<T> addOption(JavadocOptionFileOption<T> option) {
+        return optionFile.addOption(option);
+    }
+
+    public JavadocOptionFileOption<String> addStringOption(String option) {
+        return optionFile.addStringOption(option);
+    }
+
+    public JavadocOptionFileOption<String> addStringOption(String option, String value) {
+        return optionFile.addStringOption(option, value);
+    }
+
+    public <T extends Enum<T>> JavadocOptionFileOption<T> addEnumOption(String option) {
+        return optionFile.addEnumOption(option);
+    }
+
+    public <T extends Enum<T>> JavadocOptionFileOption<T> addEnumOption(String option, T value) {
+        return optionFile.addEnumOption(option, value);
+    }
+
+    public JavadocOptionFileOption<List<File>> addPathOption(String option) {
+        return optionFile.addPathOption(option);
+    }
+
+    public JavadocOptionFileOption<List<File>> addPathOption(String option, String joinBy) {
+        return optionFile.addPathOption(option, joinBy);
+    }
+
+    public JavadocOptionFileOption<List<String>> addStringsOption(String option) {
+        return optionFile.addStringsOption(option);
+    }
+
+    public JavadocOptionFileOption<List<String>> addStringsOption(String option, String joinBy) {
+        return optionFile.addStringsOption(option, joinBy);
+    }
+
+   public JavadocOptionFileOption<List<String>> addMultilineStringsOption(String option) {
+       return optionFile.addMultilineStringsOption(option);
+   }
+
+    public JavadocOptionFileOption<Boolean> addBooleanOption(String option) {
+        return optionFile.addBooleanOption(option);
+    }
+
+    public JavadocOptionFileOption<Boolean> addBooleanOption(String option, boolean value) {
+        return optionFile.addBooleanOption(option, value);
+    }
+
+    public JavadocOptionFileOption<File> addFileOption(String option) {
+        return optionFile.addFileOption(option);
+    }
+
+    public JavadocOptionFileOption<File> addFileOption(String option, File value) {
+        return optionFile.addFileOption(option, value);
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocMemberLevel.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocMemberLevel.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocMemberLevel.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocMemberLevel.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOfflineLink.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOfflineLink.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOfflineLink.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOfflineLink.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOptionFileOption.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOptionFileOption.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOptionFileOption.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOutputLevel.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOutputLevel.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOutputLevel.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/JavadocOutputLevel.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/MinimalJavadocOptions.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/MinimalJavadocOptions.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/MinimalJavadocOptions.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/MinimalJavadocOptions.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/OptionLessJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/OptionLessJavadocOptionFileOption.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/OptionLessJavadocOptionFileOption.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/OptionLessJavadocOptionFileOption.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptions.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptions.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptions.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptions.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractJavadocOptionFileOption.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractJavadocOptionFileOption.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractJavadocOptionFileOption.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractListJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractListJavadocOptionFileOption.java
new file mode 100644
index 0000000..5ff8a12
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/AbstractListJavadocOptionFileOption.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import java.util.List;
+import java.io.IOException;
+
+/**
+ * A base class for {@link org.gradle.external.javadoc.JavadocOptionFileOption} implementations whose value is a {@code List}.
+ *
+ * @param <T> The type which this option represents.
+ * @author Tom Eyckmans
+ */
+public abstract class AbstractListJavadocOptionFileOption<T extends List> extends AbstractJavadocOptionFileOption<T> {
+    protected String joinBy;
+
+    protected AbstractListJavadocOptionFileOption(String option, String joinBy) {
+        super(option);
+        this.joinBy = joinBy;
+    }
+
+    protected AbstractListJavadocOptionFileOption(String option, T value, String joinBy) {
+        super(option, value);
+        this.joinBy = joinBy;
+    }
+
+    public T getValue() {
+        return value;
+    }
+
+    public void setValue(T value) {
+        if (value == null) {
+            this.value.clear();
+        } else {
+            this.value = value;
+        }
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null && !value.isEmpty()) {
+            writeCollectionValue(writerContext);
+        }
+    }
+
+    protected abstract void writeCollectionValue(JavadocOptionFileWriterContext writerContext) throws IOException;
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOption.java
new file mode 100644
index 0000000..55ddb97
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOption.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import java.io.IOException;
+
+/**
+ * A {@link org.gradle.external.javadoc.JavadocOptionFileOption} whose value is a boolean.
+ *
+ * @author Tom Eyckmans
+ */
+public class BooleanJavadocOptionFileOption extends AbstractJavadocOptionFileOption<Boolean> {
+    protected BooleanJavadocOptionFileOption(String option) {
+        super(option);
+    }
+
+    protected BooleanJavadocOptionFileOption(String option, Boolean value) {
+        super(option, value);
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null && value) {
+            writerContext.writeOption(option);
+        }
+    }
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOption.java
new file mode 100644
index 0000000..3284812
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOption.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import java.io.IOException;
+
+/**
+ * @param <T> The type which this option represents.
+ * @author Tom Eyckmans
+ */
+public class EnumJavadocOptionFileOption<T> extends AbstractJavadocOptionFileOption<T> {
+    public EnumJavadocOptionFileOption(String option) {
+        super(option);
+    }
+
+    public EnumJavadocOptionFileOption(String option, T value) {
+        super(option, value);
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null) {
+            writerContext.writeOption(value.toString().toLowerCase());
+        }
+    }
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOption.java
new file mode 100644
index 0000000..22c28d7
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOption.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * A {@link org.gradle.external.javadoc.JavadocOptionFileOption} whose value is a file.
+ *
+ * @author Tom Eyckmans
+ */
+public class FileJavadocOptionFileOption extends AbstractJavadocOptionFileOption<File> {
+    protected FileJavadocOptionFileOption(String option) {
+        super(option);
+    }
+
+    protected FileJavadocOptionFileOption(String option, File value) {
+        super(option, value);
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null) {
+            writerContext.writeValueOption(option, value.getAbsolutePath());
+        }
+    }
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java
new file mode 100644
index 0000000..2077351
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import org.gradle.util.GUtil;
+
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A {@link org.gradle.external.javadoc.JavadocOptionFileOption} which represents the -groups command line
+ * option.
+ *
+ * @author Tom Eyckmans
+ */
+public class GroupsJavadocOptionFileOption extends AbstractJavadocOptionFileOption<Map<String, List<String>>> {
+    public GroupsJavadocOptionFileOption(String option) {
+        super(option, new LinkedHashMap<String, List<String>>());
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null && !value.isEmpty()) {
+            for (final String group : value.keySet()) {
+                final List<String> groupPackages = value.get(group);
+
+                writerContext
+                    .writeOptionHeader(option)
+                    .write(
+                        new StringBuffer()
+                            .append("\"")
+                            .append(group)
+                            .append("\"")
+                            .toString())
+                    .write(" ")
+                    .write(
+                        new StringBuffer()
+                            .append("\"")
+                            .append(GUtil.join(groupPackages, ":"))
+                            .append("\"")
+                            .toString())
+                    .newLine();
+            }
+        }
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilder.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilder.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilder.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilder.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFile.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFile.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFile.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFile.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriter.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriter.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriter.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriter.java
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContext.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContext.java
new file mode 100644
index 0000000..925fbe1
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContext.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.File;
+import java.util.Collection;
+import java.util.Iterator;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class JavadocOptionFileWriterContext {
+    private final BufferedWriter writer;
+
+    public JavadocOptionFileWriterContext(BufferedWriter writer) {
+        this.writer = writer;
+    }
+
+    public JavadocOptionFileWriterContext write(String string) throws IOException {
+        writer.write(string);
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext newLine() throws IOException {
+        writer.newLine();
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeOptionHeader(String option) throws IOException {
+        write("-");
+        write(option);
+        write(" ");
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeOption(String option) throws IOException {
+        writeOptionHeader(option);
+        newLine();
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeValueOption(String option, String value) throws IOException {
+        writeOptionHeader(option);
+        writeValue(value);
+        newLine();
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeValue(String value) throws IOException {
+        write("\'");
+        write(value.replaceAll("\\\\", "\\\\\\\\"));
+        write("\'");
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeValueOption(String option, Collection<String> values) throws IOException {
+        for (final String value : values) {
+            writeValueOption(option, value);
+        }
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeValuesOption(String option, Collection<String> values, String joinValuesBy) throws IOException {
+        StringBuilder builder = new StringBuilder();
+        Iterator<String> valuesIt = values.iterator();
+        while (valuesIt.hasNext()) {
+            builder.append(valuesIt.next());
+            if (valuesIt.hasNext()) {
+                builder.append(joinValuesBy);
+            }
+        }
+        writeValueOption(option, builder.toString());
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writeMultilineValuesOption(String option, Collection<String> values) throws IOException {
+        for (String value : values) {
+            writeValueOption(option, value);
+        }
+        return this;
+    }
+
+    public JavadocOptionFileWriterContext writePathOption(String option, Collection<File> files, String joinValuesBy) throws IOException {
+        StringBuilder builder = new StringBuilder();
+        Iterator<File> filesIt = files.iterator();
+        while (filesIt.hasNext()) {
+            builder.append(filesIt.next().getAbsolutePath());
+            if (filesIt.hasNext()) {
+                builder.append(joinValuesBy);
+            }
+        }
+        writeValueOption(option, builder.toString());
+        return this;
+    }
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOption.java
new file mode 100644
index 0000000..2c7f016
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOption.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import org.gradle.external.javadoc.JavadocOfflineLink;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.IOException;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class LinksOfflineJavadocOptionFileOption extends AbstractJavadocOptionFileOption<List<JavadocOfflineLink>> {
+    public LinksOfflineJavadocOptionFileOption(String option) {
+        super(option, new ArrayList<JavadocOfflineLink>());
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null && !value.isEmpty()) {
+            for (final JavadocOfflineLink offlineLink : value) {
+                writerContext.writeValueOption(option, offlineLink.toString());
+            }
+        }
+    }
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOption.java
new file mode 100644
index 0000000..1ff9693
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOption.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.IOException;
+
+/**
+ * @author Melanie Pfautz
+ */
+public class MultilineStringsJavadocOptionFileOption extends AbstractListJavadocOptionFileOption<List<String>> {
+
+    // We should never attempt to join strings so if you see this, there's a problem
+    private static final String JOIN_BY = "Not Used!";
+
+    protected MultilineStringsJavadocOptionFileOption(String option) {
+        super(option, new ArrayList<String>(), JOIN_BY);
+    }
+
+    protected MultilineStringsJavadocOptionFileOption(String option, List<String> value) {
+        super(option, value, JOIN_BY);
+    }
+
+    public void writeCollectionValue(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null && !value.isEmpty()) {
+            writerContext.writeMultilineValuesOption(option, value);
+        }
+    }
+}
diff --git a/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOption.java
new file mode 100644
index 0000000..9f1cc5b
--- /dev/null
+++ b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOption.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc.internal;
+
+import org.gradle.external.javadoc.OptionLessJavadocOptionFileOption;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.io.IOException;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class OptionLessStringsJavadocOptionFileOption implements OptionLessJavadocOptionFileOption<List<String>> {
+    private List<String> value;
+
+    public OptionLessStringsJavadocOptionFileOption() {
+        value = new ArrayList<String>();
+    }
+
+    public OptionLessStringsJavadocOptionFileOption(List<String> value) {
+        this.value = value;
+    }
+
+    public List<String> getValue() {
+        return value;
+    }
+
+    public void setValue(List<String> value) {
+        if (value == null) {
+            this.value.clear();
+        } else {
+            this.value = value;
+        }
+    }
+
+    public void write(JavadocOptionFileWriterContext writerContext) throws IOException {
+        if (value != null && !value.isEmpty()) {
+            for (String singleValue : value) {
+                writerContext.writeValue(singleValue);
+                writerContext.newLine();
+            }
+        }
+    }
+}
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOption.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOption.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOption.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOption.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOption.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOption.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOption.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOption.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOption.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOption.java
diff --git a/subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/package-info.java b/subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/package-info.java
similarity index 100%
rename from subprojects/gradle-plugins/src/main/groovy/org/gradle/external/javadoc/package-info.java
rename to subprojects/plugins/src/main/groovy/org/gradle/external/javadoc/package-info.java
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/base.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/base.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/base.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/base.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/groovy-base.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/groovy-base.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/groovy-base.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/groovy-base.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/groovy.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/groovy.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/groovy.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/groovy.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/java-base.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/java-base.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/java-base.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/java-base.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/java.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/java.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/java.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/java.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/project-report.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/project-report.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/project-report.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/project-report.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/project-reports.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/project-reports.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/project-reports.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/project-reports.properties
diff --git a/subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/war.properties b/subprojects/plugins/src/main/resources/META-INF/gradle-plugins/war.properties
similarity index 100%
rename from subprojects/gradle-plugins/src/main/resources/META-INF/gradle-plugins/war.properties
rename to subprojects/plugins/src/main/resources/META-INF/gradle-plugins/war.properties
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainerTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainerTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainerTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetContainerTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultSourceSetTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompilerTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompilerTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompilerTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/IncrementalJavaSourceCompilerTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleanerTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleanerTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleanerTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/compile/SimpleStaleClassCleanerTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/AbstractTestFrameworkTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/AbstractTestFrameworkTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/AbstractTestFrameworkTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/AbstractTestFrameworkTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestClassDescriptorTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/DefaultTestSuiteDescriptorTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/SuiteTestClassProcessorTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/TestStartEventTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/TestStartEventTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/TestStartEventTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/TestStartEventTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/detection/DefaultTestClassScannerTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestClassProcessorTest.groovy
diff --git a/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFrameworkTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFrameworkTest.java
new file mode 100644
index 0000000..67e353a
--- /dev/null
+++ b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/junit/JUnitTestFrameworkTest.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.tasks.testing.junit;
+
+import org.gradle.api.internal.project.ServiceRegistry;
+import org.gradle.api.internal.tasks.testing.AbstractTestFrameworkTest;
+import org.gradle.api.internal.tasks.testing.TestClassProcessor;
+import org.gradle.api.tasks.testing.junit.JUnitOptions;
+import org.gradle.util.IdGenerator;
+import org.jmock.Expectations;
+import org.junit.Before;
+
+import static junit.framework.Assert.assertNotNull;
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class JUnitTestFrameworkTest extends AbstractTestFrameworkTest {
+    private JUnitTestFramework jUnitTestFramework;
+    private AntJUnitReport antJUnitReportMock;
+    private JUnitOptions jUnitOptionsMock;
+    private IdGenerator<?> idGenerator;
+    private ServiceRegistry serviceRegistry;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+
+        antJUnitReportMock = context.mock(AntJUnitReport.class);
+        jUnitOptionsMock = context.mock(JUnitOptions.class);
+        idGenerator = context.mock(IdGenerator.class);
+        serviceRegistry = context.mock(ServiceRegistry.class);
+
+        context.checking(new Expectations(){{
+            allowing(testMock).getTestClassesDir(); will(returnValue(testClassesDir));
+            allowing(testMock).getClasspath(); will(returnValue(classpathMock));
+        }});
+    }
+
+    @org.junit.Test
+    public void testInitialize() {
+        jUnitTestFramework = new JUnitTestFramework(testMock);
+        setMocks();
+
+        assertNotNull(jUnitTestFramework.getOptions());
+        assertNotNull(jUnitTestFramework.getAntJUnitReport());
+    }
+
+    @org.junit.Test
+    public void testCreatesTestProcessor() {
+        jUnitTestFramework = new JUnitTestFramework(testMock);
+        setMocks();
+
+        context.checking(new Expectations() {{
+            one(testMock).getTestResultsDir(); will(returnValue(testResultsDir));
+            one(serviceRegistry).get(IdGenerator.class); will(returnValue(idGenerator));
+        }});
+
+        TestClassProcessor testClassProcessor = jUnitTestFramework.getProcessorFactory().create(serviceRegistry);
+        assertThat(testClassProcessor, instanceOf(JUnitTestClassProcessor.class));
+    }
+
+    @org.junit.Test
+    public void testReport() {
+        jUnitTestFramework = new JUnitTestFramework(testMock);
+        setMocks();
+
+        context.checking(new Expectations() {{
+            one(testMock).getTestResultsDir(); will(returnValue(testResultsDir));
+            one(testMock).getTestReportDir(); will(returnValue(testReportDir));
+            one(projectMock).getAnt(); will(returnValue(antBuilderMock));
+            one(testMock).isTestReport(); will(returnValue(true));
+            one(antJUnitReportMock).execute(
+                    testResultsDir, testReportDir,
+                    antBuilderMock
+            );
+        }});
+
+        jUnitTestFramework.report();
+    }
+
+    @org.junit.Test
+    public void testReportWithDisabledReport() {
+        jUnitTestFramework = new JUnitTestFramework(testMock);
+        setMocks();
+
+        context.checking(new Expectations() {{
+            one(testMock).isTestReport(); will(returnValue(false));
+        }});
+
+        jUnitTestFramework.report();
+    }
+
+    private void setMocks() {
+        jUnitTestFramework.setAntJUnitReport(antJUnitReportMock);
+        jUnitTestFramework.setOptions(jUnitOptionsMock);
+    }
+}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/CaptureTestOutputTestResultProcessorTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/MaxNParallelTestClassProcessorTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessorTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessorTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessorTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/RestartEveryNTestClassProcessorTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainActionTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainActionTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainActionTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/processors/TestMainActionTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/AttachParentTestResultProcessorTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapterTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapterTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapterTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestListenerAdapterTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestLoggerTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestLoggerTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestLoggerTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestLoggerTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListenerTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListenerTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListenerTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/results/TestSummaryListenerTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessorTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessorTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessorTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessorTest.groovy
diff --git a/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFrameworkTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFrameworkTest.java
new file mode 100644
index 0000000..1ed12c3
--- /dev/null
+++ b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/testng/TestNGTestFrameworkTest.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.internal.tasks.testing.testng;
+
+import org.gradle.api.JavaVersion;
+import org.gradle.api.internal.project.ServiceRegistry;
+import org.gradle.api.internal.tasks.testing.AbstractTestFrameworkTest;
+import org.gradle.api.internal.tasks.testing.TestClassProcessor;
+import org.gradle.api.tasks.testing.testng.TestNGOptions;
+import org.gradle.util.IdGenerator;
+import org.jmock.Expectations;
+import org.junit.Before;
+
+import java.io.File;
+
+import static org.hamcrest.Matchers.*;
+import static org.junit.Assert.*;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class TestNGTestFrameworkTest extends AbstractTestFrameworkTest {
+
+    private TestNGTestFramework testNGTestFramework;
+    private TestNGOptions testngOptionsMock;
+    private IdGenerator<?> idGeneratorMock;
+    private ServiceRegistry serviceRegistry;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+
+        testngOptionsMock = context.mock(TestNGOptions.class);
+        idGeneratorMock = context.mock(IdGenerator.class);
+        serviceRegistry = context.mock(ServiceRegistry.class);
+
+        final JavaVersion sourceCompatibility = JavaVersion.VERSION_1_5;
+        context.checking(new Expectations() {{
+            allowing(projectMock).getProjectDir(); will(returnValue(new File("projectDir")));
+            allowing(projectMock).property("sourceCompatibility"); will(returnValue(sourceCompatibility));
+            allowing(testMock).getTestClassesDir(); will(returnValue(testClassesDir));
+            allowing(testMock).getClasspath(); will(returnValue(classpathMock));
+            allowing(testMock).getTemporaryDir(); will(returnValue(temporaryDir));
+        }});
+    }
+
+    @org.junit.Test
+    public void testInitialize() {
+        testNGTestFramework = new TestNGTestFramework(testMock);
+        setMocks();
+
+        assertNotNull(testNGTestFramework.getOptions());
+    }
+
+    @org.junit.Test
+    public void testCreatesTestProcessor() {
+        testNGTestFramework = new TestNGTestFramework(testMock);
+        setMocks();
+
+        context.checking(new Expectations() {{
+            allowing(testMock).getTestSrcDirs();  will(returnValue(testSrcDirs));
+            allowing(testMock).getTestReportDir(); will(returnValue(testReportDir));
+            allowing(serviceRegistry).get(IdGenerator.class); will(returnValue(idGeneratorMock));
+            one(testngOptionsMock).setTestResources(testSrcDirs);
+            one(testngOptionsMock).getSuites(temporaryDir);
+        }});
+
+        TestClassProcessor processor = testNGTestFramework.getProcessorFactory().create(serviceRegistry);
+        assertThat(processor, instanceOf(TestNGTestClassProcessor.class));
+    }
+
+    private void setMocks() {
+        testNGTestFramework.setOptions(testngOptionsMock);
+    }
+}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessorTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessorTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessorTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessorTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorkerTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorkerTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorkerTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/testing/worker/TestWorkerTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultAttributesTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultAttributesTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultAttributesTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultAttributesTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpecTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpecTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpecTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestMergeSpecTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/java/archives/internal/DefaultManifestTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/BasePluginConventionTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/BasePluginConventionTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/BasePluginConventionTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/BasePluginConventionTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/BasePluginTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/BasePluginTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/BasePluginTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/BasePluginTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/GroovyBasePluginTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/GroovyBasePluginTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/GroovyBasePluginTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/GroovyBasePluginTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/GroovyPluginTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/GroovyPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/GroovyPluginTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/GroovyPluginTest.groovy
diff --git a/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy
new file mode 100644
index 0000000..09c5964
--- /dev/null
+++ b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaBasePluginTest.groovy
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+ 
+package org.gradle.api.plugins
+
+import org.gradle.api.DefaultTask
+import org.gradle.api.Project
+import org.gradle.api.tasks.Copy
+import org.gradle.api.tasks.bundling.Jar
+import org.gradle.api.tasks.compile.Compile
+import org.gradle.api.tasks.javadoc.Javadoc
+import org.gradle.util.HelperUtil
+import org.gradle.util.Matchers
+import spock.lang.Specification
+import static org.gradle.util.WrapUtil.toLinkedSet
+import org.gradle.api.tasks.testing.Test
+import org.gradle.util.SetSystemProperties
+import org.junit.Rule
+
+/**
+ * @author Hans Dockter
+ */
+
+class JavaBasePluginTest extends Specification {
+    @Rule
+    public SetSystemProperties sysProperties = new SetSystemProperties()
+    private final Project project = HelperUtil.createRootProject()
+    private final JavaBasePlugin javaBasePlugin = new JavaBasePlugin()
+
+    void appliesBasePluginsAndAddsConventionObject() {
+        when:
+        javaBasePlugin.apply(project)
+
+        then:
+        project.getPlugins().hasPlugin(ReportingBasePlugin)
+        project.getPlugins().hasPlugin(BasePlugin)
+        project.convention.plugins.java instanceof JavaPluginConvention
+    }
+
+    void createsTasksAndAppliesMappingsForNewSourceSet() {
+        when:
+        javaBasePlugin.apply(project)
+        project.sourceSets.add('custom')
+        
+        then:
+        def set = project.sourceSets.custom
+        set.java.srcDirs == toLinkedSet(project.file('src/custom/java'))
+        set.resources.srcDirs == toLinkedSet(project.file('src/custom/resources'))
+        set.classesDir == new File(project.buildDir, 'classes/custom')
+        Matchers.builtBy('customClasses').matches(set.classes)
+
+        def processResources = project.tasks['processCustomResources']
+        processResources.description == 'Processes the custom resources.'
+        processResources instanceof Copy
+        Matchers.dependsOn().matches(processResources)
+        processResources.destinationDir == project.sourceSets.custom.classesDir
+        processResources.defaultSource == project.sourceSets.custom.resources
+
+        def compileJava = project.tasks['compileCustomJava']
+        compileJava.description == 'Compiles the custom Java source.'
+        compileJava instanceof Compile
+        Matchers.dependsOn().matches(compileJava)
+        compileJava.defaultSource == project.sourceSets.custom.java
+        compileJava.classpath.is(project.sourceSets.custom.compileClasspath)
+        compileJava.destinationDir == project.sourceSets.custom.classesDir
+
+        def classes = project.tasks['customClasses']
+        classes.description == 'Assembles the custom classes.'
+        classes instanceof DefaultTask
+        Matchers.dependsOn('processCustomResources', 'compileCustomJava').matches(classes)
+    }
+
+    void appliesMappingsToTasksDefinedByBuildScript() {
+        when:
+        javaBasePlugin.apply(project)
+
+        then:
+        def compile = project.createTask('customCompile', type: Compile)
+        compile.sourceCompatibility == project.sourceCompatibility.toString()
+
+        def test = project.createTask('customTest', type: Test.class)
+        test.workingDir == project.projectDir
+        test.testResultsDir == project.testResultsDir
+        test.testReportDir == project.testReportDir
+
+        def javadoc = project.createTask('customJavadoc', type: Javadoc)
+        javadoc.destinationDir == project.file("$project.docsDir/javadoc")
+        javadoc.title == project.apiDocTitle
+    }
+
+    void appliesMappingsToCustomJarTasks() {
+        when:
+        javaBasePlugin.apply(project)
+        def task = project.createTask('customJar', type: Jar)
+
+        then:
+        Matchers.dependsOn().matches(task)
+        task.destinationDir == project.libsDir
+    }
+
+    void createsLifecycleBuildTasks() {
+        when:
+        javaBasePlugin.apply(project)
+
+        then:
+        def build = project.tasks[JavaBasePlugin.BUILD_TASK_NAME]
+        Matchers.dependsOn(JavaBasePlugin.CHECK_TASK_NAME, BasePlugin.ASSEMBLE_TASK_NAME).matches(build)
+
+        def buildDependent = project.tasks[JavaBasePlugin.BUILD_DEPENDENTS_TASK_NAME]
+        Matchers.dependsOn(JavaBasePlugin.BUILD_TASK_NAME).matches(buildDependent)
+
+        def buildNeeded = project.tasks[JavaBasePlugin.BUILD_NEEDED_TASK_NAME]
+        Matchers.dependsOn(JavaBasePlugin.BUILD_TASK_NAME).matches(buildNeeded)
+    }
+
+    def configuresTestTaskWhenDebugSystemPropertyIsSet() {
+        javaBasePlugin.apply(project)
+        def task = project.tasks.add('test', Test.class)
+
+        when:
+        System.setProperty("test.debug", "true")
+        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
+
+        then:
+        task.debug
+    }
+
+    def configuresTestTaskWhenSingleTestSystemPropertyIsSet() {
+        javaBasePlugin.apply(project)
+        def task = project.tasks.add('test', Test.class)
+        task.include 'ignoreme'
+
+        when:
+        System.setProperty("test.single", "pattern")
+        project.projectEvaluationBroadcaster.afterEvaluate(project, null)
+
+        then:
+        task.includes == ['**/pattern*.class'] as Set
+    }
+
+}
\ No newline at end of file
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginConventionTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginConventionTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginConventionTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginConventionTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/JavaPluginTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/ProjectReportsPluginTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/ProjectReportsPluginTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/ProjectReportsPluginTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/ProjectReportsPluginTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginConventionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginConventionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginConventionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginConventionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/ReportingBasePluginTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/WarPluginTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/plugins/WarPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/plugins/WarPluginTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/plugins/WarPluginTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/bundling/JarTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/bundling/JarTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/bundling/JarTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/bundling/JarTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/bundling/WarTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/bundling/WarTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/bundling/WarTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/bundling/WarTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractCompileTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractCompileTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractCompileTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractCompileTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/AbstractOptionsTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileOptionsTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/CompileTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/DebugOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/DebugOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/DebugOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/DebugOptionsTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/ForkOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/ForkOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/ForkOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/ForkOptionsTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileOptionsTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyCompileTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyForkOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyForkOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyForkOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/compile/GroovyForkOptionsTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/javadoc/GroovydocTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/javadoc/GroovydocTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/javadoc/GroovydocTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/javadoc/GroovydocTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/javadoc/JavadocTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/javadoc/JavadocTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/javadoc/JavadocTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/javadoc/JavadocTest.java
diff --git a/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/AbstractTestFrameworkOptionsTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/AbstractTestFrameworkOptionsTest.java
new file mode 100644
index 0000000..75dd311
--- /dev/null
+++ b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/AbstractTestFrameworkOptionsTest.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.tasks.testing;
+
+import org.gradle.api.internal.tasks.testing.TestFramework;
+import org.gradle.util.JUnit4GroovyMockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class AbstractTestFrameworkOptionsTest<T extends TestFramework> {
+    protected JUnit4GroovyMockery context = new JUnit4GroovyMockery();
+
+    protected T testFrameworkMock;
+
+    protected void setUp(Class<T> testFrameworkClass) throws Exception {
+        context.setImposteriser(ClassImposteriser.INSTANCE);
+
+        testFrameworkMock = context.mock(testFrameworkClass);
+    }
+}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/TestTest.java b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/TestTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/TestTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/TestTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/testng/TestNGOptionsTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/testng/TestNGOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/api/tasks/testing/testng/TestNGOptionsTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/api/tasks/testing/testng/TestNGOptionsTest.groovy
diff --git a/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptionsTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptionsTest.java
new file mode 100644
index 0000000..b6d872d
--- /dev/null
+++ b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/StandardJavadocDocletOptionsTest.java
@@ -0,0 +1,514 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.external.javadoc;
+
+import org.gradle.external.javadoc.internal.LinksOfflineJavadocOptionFileOption;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.After;
+import static org.junit.Assert.*;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.jmock.lib.legacy.ClassImposteriser;
+import org.jmock.Expectations;
+import org.gradle.external.javadoc.internal.JavadocOptionFile;
+import org.gradle.external.javadoc.internal.GroupsJavadocOptionFileOption;
+
+import java.util.*;
+import java.io.File;
+
+/**
+ * @author Tom Eyckmans
+ */
+public class StandardJavadocDocletOptionsTest {
+
+    private final JUnit4Mockery context = new JUnit4Mockery();
+    private StandardJavadocDocletOptions options;
+
+    @Before
+    public void setUp() {
+        context.setImposteriser(ClassImposteriser.INSTANCE);
+
+        options = new StandardJavadocDocletOptions();
+    }
+
+    @Test
+    public void testDefaults() {
+        // core javadoc options
+        assertNull(options.getOverview());
+        assertNull(options.getMemberLevel());
+        assertNull(options.getDoclet());
+        assertEmpty(options.getDocletpath());
+        assertNull(options.getSource());
+        assertEmpty(options.getClasspath());
+        assertEmpty(options.getBootClasspath());
+        assertEmpty(options.getExtDirs());
+        assertEquals(options.getOutputLevel(), JavadocOutputLevel.QUIET);
+        assertFalse(options.isBreakIterator());
+        assertNull(options.getLocale());
+        assertNull(options.getEncoding());
+        assertEmpty(options.getJFlags());
+        assertEmpty(options.getSourceNames());
+        assertEmpty(options.getOptionFiles());
+        // standard doclet options
+        assertNull(options.getDestinationDirectory());
+        assertFalse(options.isUse());
+        assertFalse(options.isVersion());
+        assertFalse(options.isAuthor());
+        assertFalse(options.isSplitIndex());
+        assertNull(options.getWindowTitle());
+        assertNull(options.getDocTitle());
+        assertNull(options.getFooter());
+        assertNull(options.getBottom());
+        assertEmpty(options.getLinks());
+        assertEmpty(options.getLinksOffline());
+        assertFalse(options.isLinkSource());
+        assertEmpty(options.getGroups());
+        assertFalse(options.isNoDeprecated());
+        assertFalse(options.isNoDeprecatedList());
+        assertFalse(options.isNoSince());
+        assertFalse(options.isNoTree());
+        assertFalse(options.isNoIndex());
+        assertFalse(options.isNoHelp());
+        assertFalse(options.isNoNavBar());
+        assertNull(options.getHelpFile());
+        assertNull(options.getStylesheetFile());
+        assertFalse(options.isSerialWarn());
+        assertNull(options.getCharSet());
+        assertNull(options.getDocEncoding());
+        assertFalse(options.isKeyWords());
+        assertEmpty(options.getTags());
+        assertEmpty(options.getTagletPath());
+        assertFalse(options.isDocFilesSubDirs());
+        assertEmpty(options.getExcludeDocFilesSubDir());
+        assertEmpty(options.getNoQualifiers());
+        assertFalse(options.isNoTimestamp());
+        assertFalse(options.isNoComment());
+    }
+
+    @Test
+    public void testConstructor() {
+        final JavadocOptionFile optionFileMock = context.mock(JavadocOptionFile.class);
+
+        context.checking(new Expectations(){{
+            // core options
+            one(optionFileMock).addStringOption("overview");
+            one(optionFileMock).addEnumOption("memberLevel");
+            one(optionFileMock).addStringOption("doclet");
+            one(optionFileMock).addPathOption("docletclasspath");
+            one(optionFileMock).addStringOption("source");
+            one(optionFileMock).addPathOption("sourcepath");
+            one(optionFileMock).addPathOption("classpath");
+            one(optionFileMock).addStringsOption("subpackages", ";");
+            one(optionFileMock).addStringsOption("exclude", ":");
+            one(optionFileMock).addPathOption("bootclasspath");
+            one(optionFileMock).addPathOption("extdirs");
+            one(optionFileMock).addEnumOption("outputLevel", JavadocOutputLevel.QUIET);
+            one(optionFileMock).addBooleanOption("breakiterator");
+            one(optionFileMock).addStringOption("locale");
+            one(optionFileMock).addStringOption("encoding");
+            // standard doclet options
+            one(optionFileMock).addFileOption("d");
+            one(optionFileMock).addBooleanOption("use");
+            one(optionFileMock).addBooleanOption("version");
+            one(optionFileMock).addBooleanOption("author");
+            one(optionFileMock).addBooleanOption("splitindex");
+            one(optionFileMock).addStringOption("windowtitle");
+            one(optionFileMock).addStringOption("doctitle");
+            one(optionFileMock).addStringOption("footer");
+            one(optionFileMock).addStringOption("bottom");
+            one(optionFileMock).addStringOption("link");
+            allowing(optionFileMock).addOption(new LinksOfflineJavadocOptionFileOption("linkoffline"));
+            one(optionFileMock).addBooleanOption("linksource");
+            one(optionFileMock).addOption(new GroupsJavadocOptionFileOption("group"));
+            one(optionFileMock).addBooleanOption("nodeprecated");
+            one(optionFileMock).addBooleanOption("nodeprecatedlist");
+            one(optionFileMock).addBooleanOption("nosince");
+            one(optionFileMock).addBooleanOption("notree");
+            one(optionFileMock).addBooleanOption("noindex");
+            one(optionFileMock).addBooleanOption("nohelp");
+            one(optionFileMock).addBooleanOption("nonavbar");
+            one(optionFileMock).addFileOption("helpfile");
+            one(optionFileMock).addFileOption("stylesheetfile");
+            one(optionFileMock).addBooleanOption("serialwarn");
+            one(optionFileMock).addStringOption("charset");
+            one(optionFileMock).addStringOption("docencoding");
+            one(optionFileMock).addBooleanOption("keywords");
+            one(optionFileMock).addStringOption("tags");
+            one(optionFileMock).addPathOption("tagletpath");
+            one(optionFileMock).addBooleanOption("docfilessubdirs");
+            one(optionFileMock).addStringsOption("excludedocfilessubdir", ":");
+            one(optionFileMock).addStringsOption("noqualifier", ":");
+            one(optionFileMock).addBooleanOption("notimestamp");
+            one(optionFileMock).addBooleanOption("nocomment");
+        }});
+
+        options = new StandardJavadocDocletOptions();
+    }
+
+    @Test
+    public void testFluentOverview() {
+        final String overviewValue = "overview";
+        assertEquals(options, options.overview(overviewValue));
+        assertEquals(overviewValue, options.getOverview());
+    }
+
+    @Test
+    public void testShowAll() {
+        assertEquals(options, options.showAll());
+        assertEquals(JavadocMemberLevel.PRIVATE, options.getMemberLevel());
+    }
+
+    @Test
+    public void testShowFromPublic() {
+        assertEquals(options, options.showFromPublic());
+        assertEquals(JavadocMemberLevel.PUBLIC, options.getMemberLevel());
+    }
+
+    @Test
+    public void testShowFromPackage() {
+        assertEquals(options, options.showFromPackage());
+        assertEquals(JavadocMemberLevel.PACKAGE, options.getMemberLevel());
+    }
+
+    @Test
+    public void testShowFromProtected() {
+        assertEquals(options, options.showFromProtected());
+        assertEquals(JavadocMemberLevel.PROTECTED, options.getMemberLevel());
+    }
+
+    @Test
+    public void testShowFromPrivate() {
+        assertEquals(options, options.showFromPrivate());
+        assertEquals(JavadocMemberLevel.PRIVATE, options.getMemberLevel());
+    }
+
+    @Test
+    public void testFluentDocletClass() {
+        final String docletValue = "org.gradle.CustomDocletClass";
+        assertEquals(options, options.doclet(docletValue));
+        assertEquals(docletValue, options.getDoclet());
+    }
+
+    @Test
+    public void testFluentDocletClasspath() {
+        final File[] docletClasspathValue = new File[]{new File("doclet.jar"), new File("doclet-dep.jar")};
+        assertEquals(options, options.docletpath(docletClasspathValue));
+        assertArrayEquals(docletClasspathValue, options.getDocletpath().toArray());
+    }
+
+    @Test
+    public void testFluentSource() {
+        final String sourceValue = "1.5";
+        assertEquals(options, options.source(sourceValue));
+        assertEquals(sourceValue, options.getSource());
+    }
+
+    @Test
+    public void testFluentClasspath() {
+        final File[] classpathValue = new File[]{new File("classpath.jar"), new File("classpath-dir")};
+        assertEquals(options, options.classpath(classpathValue));
+        assertArrayEquals(classpathValue, options.getClasspath().toArray());
+    }
+
+    @Test
+    public void testFluentBootclasspath() {
+        final File[] bootClasspathValue = new File[]{new File("bootclasspath.jar"), new File("bootclasspath2.jar")};
+        assertEquals(options, options.bootClasspath(bootClasspathValue));
+        assertArrayEquals(bootClasspathValue, options.getBootClasspath().toArray());
+    }
+
+    @Test
+    public void testFluentExtDirs() {
+        final File[] extDirsValue = new File[]{new File("extDirOne"), new File("extDirTwo")};
+        assertEquals(options, options.extDirs(extDirsValue));
+        assertArrayEquals(extDirsValue, options.getExtDirs().toArray());
+    }
+
+    @Test
+    public void testQuietOutputLevel() {
+        assertEquals(options, options.quiet());
+        assertEquals(JavadocOutputLevel.QUIET, options.getOutputLevel());
+    }
+
+    @Test
+    public void testVerboseOutputLevel() {
+        assertEquals(options, options.verbose());
+        assertEquals(JavadocOutputLevel.VERBOSE, options.getOutputLevel());
+        assertTrue(options.isVerbose());
+    }
+
+    @Test
+    public void testFluentBreakIterator() {
+        assertEquals(options, options.breakIterator());
+        assertTrue(options.isBreakIterator());
+    }
+
+    @Test
+    public void testFluentLocale() {
+        final String localeValue = "nl";
+        assertEquals(options, options.locale(localeValue));
+        assertEquals(localeValue, options.getLocale());
+    }
+
+    @Test
+    public void testFluentEncoding() {
+        final String encodingValue = "UTF-8";
+        assertEquals(options, options.encoding(encodingValue));
+        assertEquals(encodingValue, options.getEncoding());
+    }
+
+    @Test
+    public void testFluentDirectory() {
+        final File directoryValue = new File("testOutput");
+        assertEquals(options, options.destinationDirectory(directoryValue));
+        assertEquals(directoryValue, options.getDestinationDirectory());
+    }
+
+    @Test
+    public void testFluentUse() {
+        assertEquals(options, options.use());
+        assertTrue(options.isUse());
+    }
+
+    @Test
+    public void testFluentVersion() {
+        assertEquals(options, options.version());
+        assertTrue(options.isVersion());
+    }
+
+    @Test
+    public void testFluentAuthor() {
+        assertEquals(options, options.author());
+        assertTrue(options.isAuthor());
+    }
+
+    @Test
+    public void testFluentSplitIndex() {
+        assertEquals(options, options.splitIndex());
+        assertTrue(options.isSplitIndex());
+    }
+
+    @Test
+    public void testFluentWindowTitle() {
+        final String windowTitleValue = "windowTitleValue";
+        assertEquals(options, options.windowTitle(windowTitleValue));
+        assertEquals(windowTitleValue, options.getWindowTitle());
+    }
+
+    @Test
+    public void testFluentDocTitle() {
+        final String docTitleValue = "docTitleValue";
+        assertEquals(options, options.docTitle(docTitleValue));
+        assertEquals(docTitleValue, options.getDocTitle());
+    }
+
+    @Test
+    public void testFluentFooter() {
+        final String footerValue = "footerValue";
+        assertEquals(options, options.footer(footerValue));
+        assertEquals(footerValue, options.getFooter());
+    }
+
+    @Test
+    public void testFluentBottom() {
+        final String bottomValue = "bottomValue";
+        assertEquals(options, options.bottom(bottomValue));
+        assertEquals(bottomValue, options.getBottom());
+    }
+
+    @Test
+    public void testFluentLink() {
+        final String[] linkValue = new String[]{"http://otherdomain.org/javadoc"};
+        assertEquals(options, options.links(linkValue));
+        assertArrayEquals(linkValue, options.getLinks().toArray());
+    }
+
+    @Test
+    public void testFluentLinkOffline() {
+        final String extDocUrl = "http://otherdomain.org/javadoc";
+        final String packageListLoc = "/home/someuser/used-lib-local-javadoc-list";
+        assertEquals(options, options.linksOffline(extDocUrl, packageListLoc));
+        assertEquals(extDocUrl, options.getLinksOffline().get(0).getExtDocUrl());
+        assertEquals(packageListLoc, options.getLinksOffline().get(0).getPackagelistLoc());
+    }
+
+    @Test
+    public void testFluentLinkSource() {
+        assertEquals(options, options.linkSource());
+        assertTrue(options.isLinkSource());
+    }
+
+    @Test
+    public void testFluentGroup() {
+        final String groupOneName = "groupOneName";
+        final String[] groupOnePackages = new String[]{"java.lang", "java.io"};
+
+        final String groupTwoName = "gradle";
+        final String[] groupTwoPackages = new String[]{"org.gradle"};
+
+        assertEquals(options, options.group(groupOneName, groupOnePackages));
+        assertEquals(options, options.group(groupTwoName, groupTwoPackages));
+        assertEquals(2, options.getGroups().size());
+        assertArrayEquals(groupOnePackages, options.getGroups().get(groupOneName).toArray());
+        assertArrayEquals(groupTwoPackages, options.getGroups().get(groupTwoName).toArray());
+    }
+
+    @Test
+    public void testFluentNoDeprecated() {
+        assertEquals(options, options.noDeprecated());
+        assertTrue(options.isNoDeprecated());
+    }
+
+    @Test
+    public void testFluentNoDeprecatedList() {
+        assertEquals(options, options.noDeprecatedList());
+        assertTrue(options.isNoDeprecatedList());
+    }
+
+    @Test
+    public void testFluentNoSince() {
+        assertEquals(options, options.noSince());
+        assertTrue(options.isNoSince());
+    }
+
+    @Test
+    public void testFluentNoTree() {
+        assertEquals(options, options.noTree());
+        assertTrue(options.isNoTree());
+    }
+
+    @Test
+    public void testFluentNoIndex() {
+        assertEquals(options, options.noIndex());
+        assertTrue(options.isNoIndex());
+    }
+
+    @Test
+    public void testFluentNoNavBar() {
+        assertEquals(options, options.noNavBar());
+        assertTrue(options.isNoNavBar());
+    }
+
+    @Test
+    public void testFluentHelpFile() {
+        final File helpFileValue = new File("help-file.txt");
+        assertEquals(options, options.helpFile(helpFileValue));
+        assertEquals(helpFileValue, options.getHelpFile());
+    }
+
+    @Test
+    public void testFluentStylesheetFile() {
+        final File stylesheetFileValue = new File("stylesheet.css");
+        assertEquals(options, options.stylesheetFile(stylesheetFileValue));
+        assertEquals(stylesheetFileValue, options.getStylesheetFile());
+    }
+
+    @Test
+    public void testFluentSerialWarn() {
+        assertEquals(options, options.serialWarn());
+        assertTrue(options.isSerialWarn());
+    }
+
+    @Test
+    public void testFluentCharset() {
+        final String charsetValue = "dummy-charset";
+        assertEquals(options, options.charSet(charsetValue));
+        assertEquals(charsetValue, options.getCharSet());
+    }
+
+    @Test
+    public void testFluentDocEncoding() {
+        final String docEncodingValue = "UTF-16";
+        assertEquals(options, options.docEncoding(docEncodingValue));
+        assertEquals(docEncodingValue, options.getDocEncoding());
+    }
+
+    @Test
+    public void testFluentKeywords() {
+        assertEquals(options, options.keyWords());
+        assertTrue(options.isKeyWords());
+    }
+
+    @Test
+    public void testFluentTagsAndTaglets() {
+        final String[] tagletsValue = new String[]{"com.sun.tools.doclets.ToDoTaglet"};
+        final String[] tagsValue = new String[]{"param", "return", "todo:a:\"To Do:\""};
+
+        final List<String> tempList = new ArrayList<String>();
+        tempList.addAll(Arrays.asList(tagletsValue));
+        tempList.addAll(Arrays.asList(tagsValue));
+
+        final Object[] totalTagsValue = tempList.toArray();
+        assertEquals(options, options.taglets(tagletsValue));
+        assertEquals(options, options.tags(tagsValue));
+        assertArrayEquals(totalTagsValue, options.getTags().toArray());
+    }
+
+    @Test
+    public void testFluentTagletPath() {
+        final File[] tagletPathValue = new File[]{new File("tagletOne.jar"), new File("tagletTwo.jar")};
+        assertEquals(options, options.tagletPath(tagletPathValue));
+        assertArrayEquals(tagletPathValue, options.getTagletPath().toArray());
+    }
+
+    @Test
+    public void testFluentDocFilesSubDirs() {
+        assertEquals(options, options.docFilesSubDirs());
+        assertTrue(options.isDocFilesSubDirs());
+    }
+
+    @Test
+    public void testFluentExcludeDocFilesSubDir() {
+        final String[] excludeDocFilesSubDirValue = new String[]{".hg", ".svn", ".bzr", ".git"};
+        assertEquals(options, options.excludeDocFilesSubDir(excludeDocFilesSubDirValue));
+        assertArrayEquals(excludeDocFilesSubDirValue, options.getExcludeDocFilesSubDir().toArray());
+    }
+
+    @Test
+    public void testFluentNoQualifier() {
+        String[] noQualifierValue = new String[]{"java.lang", "java.io"};
+        assertEquals(options, options.noQualifiers(noQualifierValue));
+        assertArrayEquals(noQualifierValue, options.getNoQualifiers().toArray());
+    }
+
+    @Test
+    public void testFluetNoTimestamp() {
+        assertEquals(options, options.noTimestamp());
+        assertTrue(options.isNoTimestamp());
+    }
+
+    @Test
+    public void testFluentNoComment() {
+        assertEquals(options, options.noComment());
+        assertTrue(options.isNoComment());
+    }
+
+    @After
+    public void tearDown() {
+        options = null;
+    }
+
+    public static void assertEmpty(Collection shouldBeEmptyCollection) {
+        assertNotNull(shouldBeEmptyCollection);
+        assertTrue(shouldBeEmptyCollection.isEmpty());
+    }
+
+    public static void assertEmpty(Map shouldBeEmptyMap) {
+        assertNotNull(shouldBeEmptyMap);
+        assertTrue(shouldBeEmptyMap.isEmpty());
+    }
+}
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/BooleanJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/EnumJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/FileJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilderTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilderTest.groovy
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilderTest.groovy
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocExecHandleBuilderTest.groovy
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContextTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContextTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContextTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/JavadocOptionFileWriterContextTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/LinksOfflineJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/MultilineStringsJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/OptionLessStringsJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/PathJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOptionTest.java b/subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOptionTest.java
similarity index 100%
rename from subprojects/gradle-plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOptionTest.java
rename to subprojects/plugins/src/test/groovy/org/gradle/external/javadoc/internal/StringsJavadocOptionFileOptionTest.java
diff --git a/subprojects/gradle-scala/scala.gradle b/subprojects/scala/scala.gradle
similarity index 100%
rename from subprojects/gradle-scala/scala.gradle
rename to subprojects/scala/scala.gradle
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSet.java b/subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSet.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSet.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSet.java
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/AntScalaCompiler.groovy b/subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/AntScalaCompiler.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/AntScalaCompiler.groovy
rename to subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/AntScalaCompiler.groovy
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompiler.java b/subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompiler.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompiler.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompiler.java
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/IncrementalScalaCompiler.java b/subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/IncrementalScalaCompiler.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/IncrementalScalaCompiler.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/IncrementalScalaCompiler.java
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaCompiler.java b/subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaCompiler.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaCompiler.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaCompiler.java
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaJavaJointCompiler.java b/subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaJavaJointCompiler.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaJavaJointCompiler.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/internal/tasks/scala/ScalaJavaJointCompiler.java
diff --git a/subprojects/scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaBasePlugin.groovy b/subprojects/scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaBasePlugin.groovy
new file mode 100644
index 0000000..e18d080
--- /dev/null
+++ b/subprojects/scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaBasePlugin.groovy
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.scala;
+
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.file.FileTreeElement
+import org.gradle.api.internal.tasks.DefaultScalaSourceSet
+import org.gradle.api.plugins.JavaBasePlugin
+import org.gradle.api.plugins.JavaPluginConvention
+import org.gradle.api.tasks.SourceSet
+import org.gradle.api.tasks.scala.ScalaCompile
+import org.gradle.api.tasks.scala.ScalaDoc
+
+public class ScalaBasePlugin implements Plugin<Project> {
+    // public configurations
+    public static final String SCALA_TOOLS_CONFIGURATION_NAME = "scalaTools";
+
+    public void apply(Project project) {
+        JavaBasePlugin javaPlugin = project.plugins.apply(JavaBasePlugin.class);
+
+        project.configurations.add(SCALA_TOOLS_CONFIGURATION_NAME).setVisible(false).setTransitive(true).
+                setDescription("The Scala tools libraries to be used for this Scala project.");
+
+        configureCompileDefaults(project, javaPlugin)
+        configureSourceSetDefaults(project, javaPlugin)
+        configureScaladoc(project);
+    }
+
+    private void configureSourceSetDefaults(Project project, JavaBasePlugin javaPlugin) {
+        project.convention.getPlugin(JavaPluginConvention.class).sourceSets.all {SourceSet sourceSet ->
+            sourceSet.convention.plugins.scala = new DefaultScalaSourceSet(sourceSet.displayName, project.fileResolver)
+            sourceSet.scala.srcDir { project.file("src/$sourceSet.name/scala")}
+            sourceSet.allJava.add(sourceSet.scala.matching(sourceSet.java.filter))
+            sourceSet.allSource.add(sourceSet.scala)
+            sourceSet.resources.filter.exclude { FileTreeElement element -> sourceSet.scala.contains(element.file) }
+
+            String taskName = sourceSet.getCompileTaskName('scala')
+            ScalaCompile scalaCompile = project.tasks.add(taskName, ScalaCompile.class);
+            scalaCompile.dependsOn sourceSet.compileJavaTaskName
+            javaPlugin.configureForSourceSet(sourceSet, scalaCompile);
+            scalaCompile.description = "Compiles the $sourceSet.scala.";
+            scalaCompile.conventionMapping.defaultSource = { sourceSet.scala }
+
+            project.tasks[sourceSet.classesTaskName].dependsOn(taskName)
+        }
+    }
+
+    private void configureCompileDefaults(final Project project, JavaBasePlugin javaPlugin) {
+        project.tasks.withType(ScalaCompile.class) {ScalaCompile compile ->
+            compile.scalaClasspath = project.configurations[SCALA_TOOLS_CONFIGURATION_NAME]
+        }
+    }
+
+    private void configureScaladoc(final Project project) {
+        project.getTasks().withType(ScalaDoc.class) {ScalaDoc scalaDoc ->
+            scalaDoc.conventionMapping.destinationDir = { project.file("$project.docsDir/scaladoc") }
+            scalaDoc.conventionMapping.title = { project.apiDocTitle }
+            scalaDoc.scalaClasspath = project.configurations[SCALA_TOOLS_CONFIGURATION_NAME]
+        }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaPlugin.groovy b/subprojects/scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaPlugin.groovy
new file mode 100644
index 0000000..d49e94e
--- /dev/null
+++ b/subprojects/scala/src/main/groovy/org/gradle/api/plugins/scala/ScalaPlugin.groovy
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.plugins.scala;
+
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.plugins.JavaPlugin
+import org.gradle.api.tasks.scala.ScalaDoc
+import org.gradle.api.plugins.JavaBasePlugin
+
+public class ScalaPlugin implements Plugin<Project> {
+    // tasks
+    public static final String SCALA_DOC_TASK_NAME = "scaladoc";
+
+    public void apply(Project project) {
+        project.plugins.apply(ScalaBasePlugin.class);
+        project.plugins.apply(JavaPlugin.class);
+
+        configureScaladoc(project);
+    }
+
+    private void configureScaladoc(final Project project) {
+        project.getTasks().withType(ScalaDoc.class) {ScalaDoc scalaDoc ->
+            scalaDoc.conventionMapping.classpath = { project.sourceSets.main.classes + project.sourceSets.main.compileClasspath }
+            scalaDoc.conventionMapping.defaultSource = { project.sourceSets.main.scala }
+        }
+        ScalaDoc scalaDoc = project.tasks.add(SCALA_DOC_TASK_NAME, ScalaDoc.class)
+        scalaDoc.description = "Generates scaladoc for the main source code.";
+        scalaDoc.group = JavaBasePlugin.DOCUMENTATION_GROUP
+    }
+}
diff --git a/subprojects/scala/src/main/groovy/org/gradle/api/tasks/ScalaSourceSet.java b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/ScalaSourceSet.java
new file mode 100644
index 0000000..ac59518
--- /dev/null
+++ b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/ScalaSourceSet.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.api.tasks;
+
+import groovy.lang.Closure;
+import org.gradle.api.file.FileTree;
+import org.gradle.api.file.SourceDirectorySet;
+
+/**
+ * A {@code ScalaSourceSetConvention} defines the properties and methods added to a {@link
+ * org.gradle.api.tasks.SourceSet} by the {@code ScalaPlugin}.
+ */
+public interface ScalaSourceSet {
+    /**
+     * Returns the source to be compiled by the Scala compiler for this source set. This may contain both Java and Scala
+     * source files.
+     *
+     * @return The Scala source. Never returns null.
+     */
+    SourceDirectorySet getScala();
+
+    /**
+     * Configures the Scala source for this set.
+     *
+     * <p>The given closure is used to configure the {@link SourceDirectorySet} which contains the Scala source.
+     *
+     * @param configureClosure The closure to use to configure the Scala source.
+     * @return this
+     */
+    ScalaSourceSet scala(Closure configureClosure);
+
+    /**
+     * All Scala source for this source set.
+     *
+     * @return the Scala source. Never returns null.
+     */
+    FileTree getAllScala();
+}
\ No newline at end of file
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/AntScalaDoc.groovy b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/AntScalaDoc.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/AntScalaDoc.groovy
rename to subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/AntScalaDoc.groovy
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompile.java b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompile.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompile.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompile.java
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompileOptions.groovy b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompileOptions.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompileOptions.groovy
rename to subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaCompileOptions.groovy
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDoc.java b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDoc.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDoc.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDoc.java
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDocOptions.groovy b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDocOptions.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDocOptions.groovy
rename to subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/ScalaDocOptions.groovy
diff --git a/subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/package-info.java b/subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/package-info.java
similarity index 100%
rename from subprojects/gradle-scala/src/main/groovy/org/gradle/api/tasks/scala/package-info.java
rename to subprojects/scala/src/main/groovy/org/gradle/api/tasks/scala/package-info.java
diff --git a/subprojects/gradle-scala/src/main/resources/META-INF/gradle-plugins/scala-base.properties b/subprojects/scala/src/main/resources/META-INF/gradle-plugins/scala-base.properties
similarity index 100%
rename from subprojects/gradle-scala/src/main/resources/META-INF/gradle-plugins/scala-base.properties
rename to subprojects/scala/src/main/resources/META-INF/gradle-plugins/scala-base.properties
diff --git a/subprojects/gradle-scala/src/main/resources/META-INF/gradle-plugins/scala.properties b/subprojects/scala/src/main/resources/META-INF/gradle-plugins/scala.properties
similarity index 100%
rename from subprojects/gradle-scala/src/main/resources/META-INF/gradle-plugins/scala.properties
rename to subprojects/scala/src/main/resources/META-INF/gradle-plugins/scala.properties
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSetTest.groovy b/subprojects/scala/src/test/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSetTest.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSetTest.groovy
rename to subprojects/scala/src/test/groovy/org/gradle/api/internal/tasks/DefaultScalaSourceSetTest.groovy
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompilerTest.groovy b/subprojects/scala/src/test/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompilerTest.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompilerTest.groovy
rename to subprojects/scala/src/test/groovy/org/gradle/api/internal/tasks/scala/DefaultScalaJavaJointCompilerTest.groovy
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaBasePluginTest.groovy b/subprojects/scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaBasePluginTest.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaBasePluginTest.groovy
rename to subprojects/scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaBasePluginTest.groovy
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaPluginTest.groovy b/subprojects/scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaPluginTest.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaPluginTest.groovy
rename to subprojects/scala/src/test/groovy/org/gradle/api/plugins/scala/ScalaPluginTest.groovy
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileOptionsTest.groovy b/subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileOptionsTest.groovy
rename to subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileOptionsTest.groovy
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileTest.java b/subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileTest.java
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileTest.java
rename to subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaCompileTest.java
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocOptionsTest.groovy b/subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocOptionsTest.groovy
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocOptionsTest.groovy
rename to subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocOptionsTest.groovy
diff --git a/subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocTest.java b/subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocTest.java
similarity index 100%
rename from subprojects/gradle-scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocTest.java
rename to subprojects/scala/src/test/groovy/org/gradle/api/tasks/scala/ScalaDocTest.java
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/BuildConnection.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/BuildConnection.java
new file mode 100644
index 0000000..b97e926
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/BuildConnection.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling;
+
+import org.gradle.tooling.model.Build;
+
+/**
+ * Represents a long-lived connection to a Gradle build.
+ *
+ * <h2>Thread safety</h2>
+ *
+ * <p>All implementations of {@code GradleConnection} are thread-safe, and may be shared by any number of threads.</p>
+ *
+ * <p>All notifications from a given {@code GradleConnection} instance are delivered by a single thread at a time. Note, however, that the delivery thread may change over time.</p>
+ */
+public interface BuildConnection {
+    /**
+     * Fetches a snapshot of the model for this build. This method blocks until the model is available.
+     *
+     * @param viewType The model type.
+     * @param <T> The model type.
+     * @return The model.
+     * @throws UnsupportedVersionException When the target Gradle version does not support the given model.
+     * @throws GradleConnectionException On some failure to communicate with Gradle.
+     */
+    <T extends Build> T getModel(Class<T> viewType) throws GradleConnectionException;
+
+    /**
+     * Fetches a snapshot of the model for this build asynchronously. This method return immediately, and the result of the operation is passed to the supplied result handler.
+     *
+     * @param viewType The model type.
+     * @param handler The handler to pass the result to.
+     * @param <T> The model type.
+     */
+    <T extends Build> void getModel(Class<T> viewType, ResultHandler<? super T> handler);
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/GradleConnectionException.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/GradleConnectionException.java
new file mode 100644
index 0000000..21250d5
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/GradleConnectionException.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling;
+
+/**
+ * Thrown when there is some problem communicating with Gradle.
+ */
+public class GradleConnectionException extends RuntimeException {
+    public GradleConnectionException(String message) {
+        super(message);
+    }
+
+    public GradleConnectionException(String message, Throwable throwable) {
+        super(message, throwable);
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/GradleConnector.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/GradleConnector.java
new file mode 100644
index 0000000..4aa6c71
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/GradleConnector.java
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling;
+
+import org.gradle.tooling.internal.consumer.ConnectionFactory;
+import org.gradle.tooling.internal.consumer.Distribution;
+import org.gradle.tooling.internal.consumer.DistributionFactory;
+
+import java.io.File;
+import java.net.URI;
+
+/**
+ * <p>A {@code GradleConnector} is the main entry point to the Gradle tooling API. You use this API as follows:</p>
+ *
+ * <ol>
+ *
+ * <li>Call {@link #newConnector()} to create a new connector instance.</li>
+ *
+ * <li>Configure the connector.</li>
+ *
+ * <li>Call {@link #connect()} to create the connection to a build.</li>
+ *
+ * <li>Optionally reuse the connector to create additional connections.</li>
+ *
+ * <li>When finished with the connections, call {@link #close()} to clean up.</li>
+ *
+ * </ol>
+ *
+ * <p>{@code GradleConnector} instances are not thread-safe.</p>
+ */
+public class GradleConnector {
+    private final ConnectionFactory connectionFactory;
+    private final DistributionFactory distributionFactory;
+    private File projectDir;
+    private Distribution distribution;
+
+    GradleConnector(ConnectionFactory connectionFactory, DistributionFactory distributionFactory) {
+        this.connectionFactory = connectionFactory;
+        this.distributionFactory = distributionFactory;
+    }
+
+    /**
+     * Creates a new connector instance.
+     *
+     * @return The instance. Never returns null.
+     */
+    public static GradleConnector newConnector() {
+        return new GradleConnector(new ConnectionFactory(), new DistributionFactory());
+    }
+
+    /**
+     * Specifies which Gradle installation to use. This replaces any value specified using {@link #useDistribution(java.net.URI)} or {@link #useGradleVersion(String)}.
+     *
+     * @param gradleHome The Gradle installation directory.
+     * @return this
+     */
+    public GradleConnector useInstallation(File gradleHome) {
+        distribution = distributionFactory.getDistribution(gradleHome);
+        return this;
+    }
+
+    /**
+     * Specifies which Gradle version to use. The appropriate distribution is downloaded and installed into the user's Gradle home directory. This replaces any value specified using {@link
+     * #useInstallation(java.io.File)} or {@link #useDistribution(java.net.URI)}.
+     *
+     * @param gradleVersion The version to use.
+     * @return this
+     */
+    public GradleConnector useGradleVersion(String gradleVersion) {
+        distribution = distributionFactory.getDistribution(gradleVersion);
+        return this;
+    }
+
+    /**
+     * Specifies which Gradle distribution to use. The appropriate distribution is downloaded and installed into the user's Gradle home directory. This replaces any value specified using {@link
+     * #useInstallation(java.io.File)} or {@link #useGradleVersion(String)}.
+     *
+     * @param gradleDistribution The distribution to use.
+     * @return this
+     */
+    public GradleConnector useDistribution(URI gradleDistribution) {
+        distribution = distributionFactory.getDistribution(gradleDistribution);
+        return this;
+    }
+
+    /**
+     * Specifies the working directory to use.
+     *
+     * @param projectDir The working directory.
+     * @return this
+     */
+    public GradleConnector forProjectDirectory(File projectDir) {
+        this.projectDir = projectDir;
+        return this;
+    }
+
+    /**
+     * Creates a connection to the build in the specified project directory.
+     *
+     * @return The connection. Never return null.
+     * @throws UnsupportedVersionException When the target Gradle version does not support this version of the tooling API.
+     * @throws GradleConnectionException On failure to establish a connection with the target Gradle version.
+     */
+    public BuildConnection connect() throws GradleConnectionException {
+        if (projectDir == null) {
+            throw new IllegalStateException("A project directory must be specified before creating a connection.");
+        }
+        if (distribution == null) {
+            distribution = distributionFactory.getCurrentDistribution();
+        }
+        return connectionFactory.create(distribution, projectDir);
+    }
+
+    /**
+     * Closes this connector and all connections created by it.
+     */
+    public void close() {
+        connectionFactory.stop();
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/ResultHandler.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/ResultHandler.java
new file mode 100644
index 0000000..1e3e660
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/ResultHandler.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling;
+
+/**
+ * A handler for an asynchronous operation which returns an object of type T.
+ *
+ * @param <T> The result type.
+ */
+public interface ResultHandler<T> {
+    void onComplete(T result);
+
+    void onFailure(GradleConnectionException failure);
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/UnsupportedVersionException.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/UnsupportedVersionException.java
new file mode 100644
index 0000000..346a60a
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/UnsupportedVersionException.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling;
+
+/**
+ * Thrown when the target Gradle version does not support a particular feature.
+ */
+public class UnsupportedVersionException extends GradleConnectionException {
+    public UnsupportedVersionException(String message) {
+        super(message);
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/CachingToolingImplementationLoader.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/CachingToolingImplementationLoader.java
new file mode 100644
index 0000000..76054cc
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/CachingToolingImplementationLoader.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1;
+
+import java.io.File;
+import java.util.*;
+
+public class CachingToolingImplementationLoader implements ToolingImplementationLoader {
+    private final ToolingImplementationLoader loader;
+    private final Map<Set<File>, ConnectionFactoryVersion1> connections = new HashMap<Set<File>, ConnectionFactoryVersion1>();
+
+    public CachingToolingImplementationLoader(ToolingImplementationLoader loader) {
+        this.loader = loader;
+    }
+
+    public ConnectionFactoryVersion1 create(Distribution distribution) {
+        Set<File> classpath = new LinkedHashSet<File>(distribution.getToolingImplementationClasspath());
+        ConnectionFactoryVersion1 factory = connections.get(classpath);
+        if (factory == null) {
+            factory = loader.create(distribution);
+            connections.put(classpath, factory);
+        }
+
+        return factory;
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ConnectionFactory.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ConnectionFactory.java
new file mode 100644
index 0000000..e3d566f
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ConnectionFactory.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.messaging.concurrent.Stoppable;
+import org.gradle.tooling.BuildConnection;
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1;
+import org.gradle.tooling.internal.protocol.ConnectionVersion1;
+
+import java.io.File;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArraySet;
+
+/**
+ * This is the main internal entry point for the tooling API.
+ *
+ * This implementation is thread-safe.
+ */
+public class ConnectionFactory implements Stoppable {
+    private final ProtocolToModelAdapter adapter = new ProtocolToModelAdapter();
+    private final ToolingImplementationLoader toolingImplementationLoader;
+    private final Set<ConnectionFactoryVersion1> factories = new CopyOnWriteArraySet<ConnectionFactoryVersion1>();
+
+    public ConnectionFactory() {
+        this(new CachingToolingImplementationLoader(new DefaultToolingImplementationLoader()));
+    }
+
+    ConnectionFactory(ToolingImplementationLoader toolingImplementationLoader) {
+        this.toolingImplementationLoader = toolingImplementationLoader;
+    }
+
+    public BuildConnection create(Distribution distribution, File projectDir) {
+        ConnectionFactoryVersion1 factory = toolingImplementationLoader.create(distribution);
+        factories.add(factory);
+        final ConnectionVersion1 connection = factory.create(projectDir);
+        return new DefaultBuildConnection(connection, adapter);
+    }
+
+    public void stop() {
+        for (ConnectionFactoryVersion1 factory : factories) {
+            factory.stop();
+        }
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildConnection.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildConnection.java
new file mode 100644
index 0000000..821da5b
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildConnection.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.tooling.BuildConnection;
+import org.gradle.tooling.GradleConnectionException;
+import org.gradle.tooling.ResultHandler;
+import org.gradle.tooling.UnsupportedVersionException;
+import org.gradle.tooling.internal.protocol.BuildVersion1;
+import org.gradle.tooling.internal.protocol.ConnectionVersion1;
+import org.gradle.tooling.internal.protocol.ResultHandlerVersion1;
+import org.gradle.tooling.internal.protocol.eclipse.EclipseBuildVersion1;
+import org.gradle.tooling.model.Build;
+import org.gradle.tooling.model.eclipse.EclipseBuild;
+import org.gradle.util.UncheckedException;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+
+class DefaultBuildConnection implements BuildConnection {
+    private final ConnectionVersion1 connection;
+    private final Map<Class<? extends Build>, Class<? extends BuildVersion1>> modelTypeMap = new HashMap<Class<? extends Build>, Class<? extends BuildVersion1>>();
+    private ProtocolToModelAdapter adapter;
+
+    public DefaultBuildConnection(ConnectionVersion1 connection, ProtocolToModelAdapter adapter) {
+        this.connection = connection;
+        this.adapter = adapter;
+        modelTypeMap.put(Build.class, BuildVersion1.class);
+        modelTypeMap.put(EclipseBuild.class, EclipseBuildVersion1.class);
+    }
+
+    public <T extends Build> T getModel(Class<T> viewType) {
+        final BlockingQueue<Object> queue = new ArrayBlockingQueue<Object>(20);
+        getModel(viewType, new ResultHandler<T>() {
+            public void onComplete(T result) {
+                queue.add(result);
+            }
+
+            public void onFailure(GradleConnectionException failure) {
+                queue.add(failure);
+            }
+        });
+
+        Object result;
+        try {
+            result = queue.take();
+        } catch (InterruptedException e) {
+            throw UncheckedException.asUncheckedException(e);
+        }
+
+        if (result instanceof GradleConnectionException) {
+            throw (GradleConnectionException) result;
+        }
+        return viewType.cast(result);
+    }
+
+    public <T extends Build> void getModel(final Class<T> viewType, final ResultHandler<? super T> handler) {
+        connection.getModel(mapToProtocol(viewType), new ResultHandlerVersion1<BuildVersion1>() {
+            public void onComplete(BuildVersion1 result) {
+                handler.onComplete(adapter.adapt(viewType, result));
+            }
+
+            public void onFailure(Throwable failure) {
+                handler.onFailure(new GradleConnectionException(String.format("Could not fetch model of type '%s' from %s.", viewType.getSimpleName(), connection.getDisplayName()), failure));
+            }
+        });
+    }
+
+    private Class<? extends BuildVersion1> mapToProtocol(Class<? extends Build> viewType) {
+        Class<? extends BuildVersion1> protocolViewType = modelTypeMap.get(viewType);
+        if (protocolViewType == null) {
+            throw new UnsupportedVersionException(String.format("Model of type '%s' is not supported.", viewType.getSimpleName()));
+        }
+        return protocolViewType;
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultToolingImplementationLoader.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultToolingImplementationLoader.java
new file mode 100644
index 0000000..47e54a3
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultToolingImplementationLoader.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.tooling.GradleConnectionException;
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1;
+import org.gradle.util.FilteringClassLoader;
+import org.gradle.util.GFileUtils;
+import org.gradle.util.ObservableUrlClassLoader;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+public class DefaultToolingImplementationLoader implements ToolingImplementationLoader {
+    private final ClassLoader classLoader;
+
+    public DefaultToolingImplementationLoader() {
+        classLoader = getClass().getClassLoader();
+    }
+
+    public ConnectionFactoryVersion1 create(Distribution distribution) {
+        ClassLoader classLoader = createImplementationClassLoader(distribution);
+        String implementationClassName = loadImplementationClassName(classLoader);
+        try {
+            return (ConnectionFactoryVersion1) classLoader.loadClass(implementationClassName).newInstance();
+        } catch (Throwable t) {
+            throw new GradleConnectionException(String.format("Could not create an instance of Tooling API implementation class '%s'.", implementationClassName), t);
+        }
+    }
+
+    private ClassLoader createImplementationClassLoader(Distribution distribution) {
+        URL[] urls = GFileUtils.toURLArray(distribution.getToolingImplementationClasspath());
+        FilteringClassLoader filteringClassLoader = new FilteringClassLoader(classLoader);
+        filteringClassLoader.allowPackage("org.gradle.tooling.internal.protocol");
+        return new ObservableUrlClassLoader(filteringClassLoader, urls);
+    }
+
+    private String loadImplementationClassName(ClassLoader classLoader) {
+        try {
+            InputStream inputStream = classLoader.getResourceAsStream("META-INF/services/org.gradle.tooling.internal.protocol.GradleConnectionFactoryVersion1");
+            try {
+                BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
+                String line;
+                while ((line = reader.readLine()) != null) {
+                    line = line.replaceAll("#.*", "").trim();
+                    if (line.length() > 0) {
+                        return line;
+                    }
+                }
+            } finally {
+                inputStream.close();
+            }
+            throw new UnsupportedOperationException();
+        } catch (Throwable t) {
+            throw new GradleConnectionException(String.format("Could not determine class name of Tooling API implementation."), t);
+        }
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/Distribution.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/Distribution.java
new file mode 100644
index 0000000..5a6af09
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/Distribution.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import java.io.File;
+import java.util.Set;
+
+public interface Distribution {
+    Set<File> getToolingImplementationClasspath();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DistributionFactory.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DistributionFactory.java
new file mode 100644
index 0000000..2af9bc2
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DistributionFactory.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.StartParameter;
+import org.gradle.api.internal.DefaultClassPathProvider;
+import org.gradle.api.tasks.wrapper.Wrapper;
+import org.gradle.api.tasks.wrapper.internal.DistributionLocator;
+import org.gradle.tooling.GradleConnectionException;
+import org.gradle.util.GradleVersion;
+import org.gradle.util.UncheckedException;
+import org.gradle.wrapper.Download;
+import org.gradle.wrapper.Install;
+import org.gradle.wrapper.PathAssembler;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+public class DistributionFactory {
+    public static final String USE_CLASSPATH_AS_DISTRIBUTION = "org.gradle.useClasspathAsDistribution";
+
+    public Distribution getCurrentDistribution() {
+        if ("true".equalsIgnoreCase(System.getProperty(USE_CLASSPATH_AS_DISTRIBUTION))) {
+            return new Distribution() {
+                public Set<File> getToolingImplementationClasspath() {
+                    DefaultClassPathProvider provider = new DefaultClassPathProvider();
+                    return provider.findClassPath("GRADLE_RUNTIME");
+                }
+            };
+        }
+
+        return getDownloadedDistribution(new GradleVersion().getVersion());
+    }
+
+    public Distribution getDistribution(final File gradleHomeDir) {
+        return new Distribution() {
+            public Set<File> getToolingImplementationClasspath() {
+                Set<File> files = new LinkedHashSet<File>();
+                File libDir = new File(gradleHomeDir, "lib");
+                for (File file : libDir.listFiles()) {
+                    if (file.getName().endsWith(".jar")) {
+                        files.add(file);
+                    }
+                }
+                return files;
+            }
+        };
+    }
+
+    public Distribution getDistribution(String gradleVersion) {
+        if (gradleVersion.equals(new GradleVersion().getVersion())) {
+            return getCurrentDistribution();
+        }
+        return getDownloadedDistribution(gradleVersion);
+    }
+
+    private Distribution getDownloadedDistribution(String gradleVersion) {
+        URI distUri;
+        try {
+            distUri = new URI(new DistributionLocator().getDistributionFor(new GradleVersion(gradleVersion)));
+        } catch (URISyntaxException e) {
+            throw UncheckedException.asUncheckedException(e);
+        }
+        return getDistribution(distUri);
+    }
+
+    public Distribution getDistribution(URI gradleDistribution) {
+        try {
+            Install install = new Install(false, false, new Download(), new PathAssembler(StartParameter.DEFAULT_GRADLE_USER_HOME));
+            File installDir = install.createDist(gradleDistribution, PathAssembler.GRADLE_USER_HOME_STRING, Wrapper.DEFAULT_DISTRIBUTION_PARENT_NAME, PathAssembler.GRADLE_USER_HOME_STRING, Wrapper.DEFAULT_DISTRIBUTION_PARENT_NAME);
+            return getDistribution(installDir);
+        } catch (Exception e) {
+            throw new GradleConnectionException(String.format("Could not install Gradle distribution from '%s'.", gradleDistribution), e);
+        }
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ProtocolToModelAdapter.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ProtocolToModelAdapter.java
new file mode 100644
index 0000000..86caa4f
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ProtocolToModelAdapter.java
@@ -0,0 +1,153 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.tooling.model.DomainObjectSet;
+import org.gradle.tooling.model.internal.ImmutableDomainObjectSet;
+import org.gradle.util.UncheckedException;
+
+import java.lang.reflect.*;
+import java.util.*;
+
+public class ProtocolToModelAdapter {
+    public <T, S> T adapt(Class<T> targetType, S protocolObject) {
+        return targetType.cast(Proxy.newProxyInstance(targetType.getClassLoader(), new Class<?>[]{targetType}, new InvocationHandlerImpl(protocolObject)));
+    }
+
+    private class InvocationHandlerImpl implements InvocationHandler {
+        private final Object delegate;
+        private final Map<Method, Method> methods = new HashMap<Method, Method>();
+        private final Map<String, Object> properties = new HashMap<String, Object>();
+        private final Method equalsMethod;
+        private final Method hashCodeMethod;
+
+        public InvocationHandlerImpl(Object delegate) {
+            this.delegate = delegate;
+            try {
+                equalsMethod = Object.class.getMethod("equals", Object.class);
+                hashCodeMethod = Object.class.getMethod("hashCode");
+            } catch (NoSuchMethodException e) {
+                throw UncheckedException.asUncheckedException(e);
+            }
+        }
+
+        @Override
+        public boolean equals(Object o) {
+            if (o == this) {
+                return true;
+            }
+            if (o == null || o.getClass() != getClass()) {
+                return false;
+            }
+
+            InvocationHandlerImpl other = (InvocationHandlerImpl) o;
+            return delegate.equals(other.delegate);
+        }
+
+        @Override
+        public int hashCode() {
+            return delegate.hashCode();
+        }
+
+        public Object invoke(Object target, Method method, Object[] params) throws Throwable {
+            if (method.equals(equalsMethod)) {
+                Object param = params[0];
+                if (param == null || !Proxy.isProxyClass(param.getClass())) {
+                    return false;
+                }
+                InvocationHandler other = Proxy.getInvocationHandler(param);
+                return equals(other);
+            } else if (method.equals(hashCodeMethod)) {
+                return hashCode();
+            }
+
+            if (method.getName().matches("get\\w+")) {
+                if (properties.containsKey(method.getName())) {
+                    return properties.get(method.getName());
+                }
+                Object value = doInvokeMethod(method, params);
+                properties.put(method.getName(), value);
+                return value;
+            }
+
+            return doInvokeMethod(method, params);
+        }
+
+        private Object doInvokeMethod(Method method, Object[] params) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+            Method targetMethod = methods.get(method);
+            if (targetMethod == null) {
+                targetMethod = findMethod(method);
+                methods.put(method, targetMethod);
+            }
+
+            Object returnValue = targetMethod.invoke(delegate, params);
+            if (returnValue == null || method.getReturnType().isInstance(returnValue)) {
+                return returnValue;
+            }
+
+            return convert(returnValue, method.getGenericReturnType());
+        }
+
+        private Method findMethod(Method method) throws NoSuchMethodException {
+            Method match = delegate.getClass().getMethod(method.getName(), method.getParameterTypes());
+            LinkedList<Class<?>> queue = new LinkedList<Class<?>>();
+            queue.add(delegate.getClass());
+            while (!queue.isEmpty()) {
+                Class<?> c = queue.removeFirst();
+                try {
+                    match = c.getMethod(method.getName(), method.getParameterTypes());
+                } catch (NoSuchMethodException e) {
+                    // ignore
+                }
+                for (Class<?> interfaceType : c.getInterfaces()) {
+                    queue.addFirst(interfaceType);
+                }
+                if (c.getSuperclass() !=null) {
+                    queue.addFirst(c.getSuperclass());
+                }
+            }
+            match.setAccessible(true);
+            return match;
+        }
+
+        private Object convert(Object value, Type targetType) {
+            if (targetType instanceof ParameterizedType) {
+                ParameterizedType parameterizedTargetType = (ParameterizedType) targetType;
+                if (parameterizedTargetType.getRawType().equals(DomainObjectSet.class)) {
+                    Type targetElementType = getElementType(parameterizedTargetType);
+                    List<Object> convertedElements = new ArrayList<Object>();
+                    for (Object element : (Iterable) value) {
+                        convertedElements.add(convert(element, targetElementType));
+                    }
+                    return new ImmutableDomainObjectSet(convertedElements);
+                }
+            }
+            if (targetType instanceof Class) {
+                return adapt((Class) targetType, value);
+            }
+            throw new UnsupportedOperationException(String.format("Cannot convert object of %s to %s.", value.getClass(), targetType));
+        }
+
+        private Type getElementType(ParameterizedType type) {
+            Type elementType = type.getActualTypeArguments()[0];
+            if (elementType instanceof WildcardType) {
+                WildcardType wildcardType = (WildcardType) elementType;
+                return wildcardType.getUpperBounds()[0];
+            }
+            return elementType;
+        }
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ToolingImplementationLoader.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ToolingImplementationLoader.java
new file mode 100644
index 0000000..9a9fd95
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/ToolingImplementationLoader.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer;
+
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1;
+
+public interface ToolingImplementationLoader {
+    ConnectionFactoryVersion1 create(Distribution distribution);
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/BuildVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/BuildVersion1.java
new file mode 100644
index 0000000..10abfa5
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/BuildVersion1.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface BuildVersion1 {
+    ProjectVersion1 getRootProject();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ConnectionFactoryVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ConnectionFactoryVersion1.java
new file mode 100644
index 0000000..20edaac
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ConnectionFactoryVersion1.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+import java.io.File;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface ConnectionFactoryVersion1 {
+    /**
+     * Stops this factory, blocking until complete.
+     */
+    void stop();
+
+    ConnectionVersion1 create(File projectDirectory);
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ConnectionVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ConnectionVersion1.java
new file mode 100644
index 0000000..012e01d
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ConnectionVersion1.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface ConnectionVersion1 {
+    /**
+     * Returns a display name for this connection, which can be used in logging and error reporting.
+     *
+     * @return The display name.
+     */
+    String getDisplayName();
+
+    /**
+     * Fetches a snapshot of the model for the build. This method returns immediately.
+     *
+     * @param type The type of model to fetch.
+     * @param handler The handler to pass the model to.
+     * @param <T> The type of model to fetch.
+     * @throws UnsupportedOperationException When the given model type is not supported.
+     */
+    <T extends BuildVersion1> void getModel(Class<T> type, ResultHandlerVersion1<? super T> handler) throws UnsupportedOperationException;
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/DependencyVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/DependencyVersion1.java
new file mode 100644
index 0000000..afedf54
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/DependencyVersion1.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface DependencyVersion1 {
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ExternalDependencyVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ExternalDependencyVersion1.java
new file mode 100644
index 0000000..09f6370
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ExternalDependencyVersion1.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface ExternalDependencyVersion1 extends DependencyVersion1 {
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ProjectVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ProjectVersion1.java
new file mode 100644
index 0000000..25de4d0
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ProjectVersion1.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface ProjectVersion1 {
+    String getName();
+
+    Iterable<? extends ProjectVersion1> getChildProjects();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ResultHandlerVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ResultHandlerVersion1.java
new file mode 100644
index 0000000..0cfa322
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/ResultHandlerVersion1.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol;
+
+public interface ResultHandlerVersion1<T> {
+    void onComplete(T result);
+
+    void onFailure(Throwable failure);
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/eclipse/EclipseBuildVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/eclipse/EclipseBuildVersion1.java
new file mode 100644
index 0000000..ae90b8d
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/eclipse/EclipseBuildVersion1.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol.eclipse;
+
+import org.gradle.tooling.internal.protocol.BuildVersion1;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface EclipseBuildVersion1 extends BuildVersion1 {
+    EclipseProjectVersion1 getRootProject();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/eclipse/EclipseProjectVersion1.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/eclipse/EclipseProjectVersion1.java
new file mode 100644
index 0000000..8cee416
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/protocol/eclipse/EclipseProjectVersion1.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.protocol.eclipse;
+
+import org.gradle.tooling.internal.protocol.ExternalDependencyVersion1;
+import org.gradle.tooling.internal.protocol.ProjectVersion1;
+
+/**
+ * DO NOT CHANGE THIS INTERFACE. It is part of the cross-version protocol.
+ */
+public interface EclipseProjectVersion1 extends ProjectVersion1 {
+    Iterable<? extends EclipseProjectVersion1> getChildProjects();
+
+    Iterable<? extends ExternalDependencyVersion1> getClasspath();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultConnection.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultConnection.java
new file mode 100644
index 0000000..55f760a
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultConnection.java
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.provider;
+
+import org.gradle.BuildAdapter;
+import org.gradle.GradleLauncher;
+import org.gradle.StartParameter;
+import org.gradle.api.Project;
+import org.gradle.api.artifacts.Configuration;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.messaging.actor.ActorFactory;
+import org.gradle.tooling.internal.protocol.BuildVersion1;
+import org.gradle.tooling.internal.protocol.ConnectionVersion1;
+import org.gradle.tooling.internal.protocol.ExternalDependencyVersion1;
+import org.gradle.tooling.internal.protocol.ResultHandlerVersion1;
+import org.gradle.tooling.internal.protocol.eclipse.EclipseBuildVersion1;
+import org.gradle.tooling.internal.protocol.eclipse.EclipseProjectVersion1;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+public class DefaultConnection implements ConnectionVersion1 {
+    private final File projectDir;
+    private final ActorFactory actorFactory;
+    private Worker worker;
+
+    public DefaultConnection(File projectDir, ActorFactory actorFactory) {
+        this.projectDir = projectDir;
+        this.actorFactory = actorFactory;
+    }
+
+    public String getDisplayName() {
+        return "Gradle connection";
+    }
+
+    public <T extends BuildVersion1> void getModel(Class<T> type, ResultHandlerVersion1<? super T> handler) throws UnsupportedOperationException {
+        if (worker == null) {
+            worker = actorFactory.createActor(new WorkerImpl()).getProxy(Worker.class);
+        }
+        worker.build(type, handler);
+    }
+
+    private static class ModelBuilder extends BuildAdapter {
+        private DefaultEclipseProject rootProject;
+
+        @Override
+        public void projectsEvaluated(Gradle gradle) {
+            rootProject = build(gradle.getRootProject());
+        }
+
+        private DefaultEclipseProject build(Project project) {
+            Configuration configuration = project.getConfigurations().findByName(
+                    "testRuntime");
+            List<ExternalDependencyVersion1> dependencies = new ArrayList<ExternalDependencyVersion1>();
+            if (configuration != null) {
+                Set<File> classpath = configuration.getFiles();
+                for (final File file : classpath) {
+                    dependencies.add(new ExternalDependencyVersion1() {
+                        public File getFile() {
+                            return file;
+                        }
+                    });
+                }
+            }
+            List<EclipseProjectVersion1> children = new ArrayList<EclipseProjectVersion1>();
+            for (Project child : project.getChildProjects().values()) {
+                children.add(build(child));
+            }
+
+            return new DefaultEclipseProject(project.getName(), children, dependencies);
+        }
+    }
+
+    private interface Worker {
+        <T extends BuildVersion1> void build(Class<T> type, ResultHandlerVersion1<? super T> handler);
+    }
+
+    private class WorkerImpl implements Worker {
+        public <T extends BuildVersion1> void build(Class<T> type, ResultHandlerVersion1<? super T> handler) {
+            try {
+                handler.onComplete(build(type));
+            } catch (Throwable t) {
+                handler.onFailure(t);
+            }
+        }
+
+        private <T extends BuildVersion1> T build(Class<T> type) throws UnsupportedOperationException {
+            if (type.isAssignableFrom(EclipseBuildVersion1.class)) {
+                StartParameter startParameter = new StartParameter();
+                startParameter.setProjectDir(projectDir);
+                startParameter.setSearchUpwards(false);
+
+                final GradleLauncher gradleLauncher = GradleLauncher.newInstance(startParameter);
+                final ModelBuilder builder = new ModelBuilder();
+                gradleLauncher.addListener(builder);
+                gradleLauncher.getBuildAnalysis().rethrowFailure();
+                return type.cast(new DefaultEclipseBuild(builder.rootProject));
+            }
+
+            throw new UnsupportedOperationException();
+        }
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultConnectionFactory.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultConnectionFactory.java
new file mode 100644
index 0000000..ecb2972
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultConnectionFactory.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.provider;
+
+import org.gradle.messaging.actor.internal.DefaultActorFactory;
+import org.gradle.messaging.concurrent.CompositeStoppable;
+import org.gradle.messaging.concurrent.DefaultExecutorFactory;
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1;
+import org.gradle.tooling.internal.protocol.ConnectionVersion1;
+
+import java.io.File;
+
+/**
+ * The implementation of the tooling API provider. This is loaded dynamically by the tooling API consumer, {@link org.gradle.tooling.internal.consumer.ConnectionFactory}.
+ */
+public class DefaultConnectionFactory implements ConnectionFactoryVersion1 {
+    private final DefaultExecutorFactory executorFactory = new DefaultExecutorFactory();
+    private final DefaultActorFactory actorFactory = new DefaultActorFactory(executorFactory);
+
+    public void stop() {
+        new CompositeStoppable(actorFactory, executorFactory).stop();
+    }
+
+    public ConnectionVersion1 create(File projectDirectory) {
+        return new DefaultConnection(projectDirectory, actorFactory);
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultEclipseBuild.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultEclipseBuild.java
new file mode 100644
index 0000000..c4bb71d
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultEclipseBuild.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.provider;
+
+import org.gradle.tooling.internal.protocol.eclipse.EclipseBuildVersion1;
+import org.gradle.tooling.internal.protocol.eclipse.EclipseProjectVersion1;
+
+class DefaultEclipseBuild implements EclipseBuildVersion1 {
+    private final EclipseProjectVersion1 rootProject;
+
+    public DefaultEclipseBuild(EclipseProjectVersion1 rootProject) {
+        this.rootProject = rootProject;
+    }
+
+    public EclipseProjectVersion1 getRootProject() {
+        return rootProject;
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultEclipseProject.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultEclipseProject.java
new file mode 100644
index 0000000..9859388
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/provider/DefaultEclipseProject.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.provider;
+
+import org.gradle.tooling.internal.protocol.ExternalDependencyVersion1;
+import org.gradle.tooling.internal.protocol.eclipse.EclipseProjectVersion1;
+import org.gradle.util.GUtil;
+
+import java.util.List;
+
+class DefaultEclipseProject implements EclipseProjectVersion1 {
+    private final String name;
+    private final List<ExternalDependencyVersion1> classpath;
+    private final List<EclipseProjectVersion1> children;
+
+    public DefaultEclipseProject(String name, Iterable<? extends EclipseProjectVersion1> children, Iterable<ExternalDependencyVersion1> classpath) {
+        this.name = name;
+        this.children = GUtil.addLists(children);
+        this.classpath = GUtil.addLists(classpath);
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public List<EclipseProjectVersion1> getChildProjects() {
+        return children;
+    }
+
+    public List<ExternalDependencyVersion1> getClasspath() {
+        return classpath;
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Build.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Build.java
new file mode 100644
index 0000000..993b755
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Build.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model;
+
+/**
+ * Represents a Gradle build.
+ */
+public interface Build {
+    /**
+     * Returns the root project of this build.
+     *
+     * @return The root project.
+     */
+    Project getRootProject();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Dependency.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Dependency.java
new file mode 100644
index 0000000..bc54325
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Dependency.java
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model;
+
+/**
+ * Represents an artifact dependency.
+ */
+public interface Dependency {
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/DomainObjectSet.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/DomainObjectSet.java
new file mode 100644
index 0000000..50a5381
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/DomainObjectSet.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * A set of domain objects of type T.
+ *
+ * @param <T> The type of objects in this collection.
+ */
+public interface DomainObjectSet<T> extends Set<T> {
+    /**
+     * Returns the elements of this set as a list, in iteration order of this set.
+     *
+     * @return The elements.
+     */
+    List<T> getAll();
+
+    /**
+     * Returns the element of this set at the given index in iteration order of this set.
+     *
+     * @param index The index of the element to get.
+     * @return The element.
+     */
+    T getAt(int index) throws IndexOutOfBoundsException;
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/ExternalDependency.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/ExternalDependency.java
new file mode 100644
index 0000000..4936b50
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/ExternalDependency.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model;
+
+import java.io.File;
+
+/**
+ * Represents an external artifact dependency.
+ */
+public interface ExternalDependency extends Dependency {
+    /**
+     * Returns the file for this dependency.
+     *
+     * @return The file. Never null.
+     */
+    File getFile();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Project.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Project.java
new file mode 100644
index 0000000..1c948cf
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/Project.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model;
+
+/**
+ * Represents a Gradle project.
+ */
+public interface Project {
+    /**
+     * Returns the name of this project.
+     *
+     * @return The name.
+     */
+    String getName();
+
+    /**
+     * Returns the child projects of this project.
+     *
+     * @return The child projects. Returns an empty set if this project has no children.
+     */
+    DomainObjectSet<? extends Project> getChildProjects();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/EclipseBuild.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/EclipseBuild.java
new file mode 100644
index 0000000..b23c298
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/EclipseBuild.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model.eclipse;
+
+import org.gradle.tooling.model.Build;
+
+/**
+ * An Eclipse-centric view of a Gradle build.
+ */
+public interface EclipseBuild extends Build {
+    /**
+     * {@inheritDoc}
+     */
+    EclipseProject getRootProject();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/EclipseProject.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/EclipseProject.java
new file mode 100644
index 0000000..74437a7
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/EclipseProject.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model.eclipse;
+
+import org.gradle.tooling.model.DomainObjectSet;
+import org.gradle.tooling.model.ExternalDependency;
+import org.gradle.tooling.model.Project;
+
+/**
+ * An Eclipse-centric view of a Gradle project.
+ */
+public interface EclipseProject extends Project {
+    /**
+     * {@inheritDoc}
+     */
+    DomainObjectSet<? extends EclipseProject> getChildProjects();
+
+    /**
+     * Returns the dependencies which make up the classpath of this project.
+     *
+     * @return The dependencies. Returns an empty set if the project has no dependencies.
+     */
+    DomainObjectSet<? extends ExternalDependency> getClasspath();
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/package-info.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/package-info.java
new file mode 100644
index 0000000..a9281c3
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/eclipse/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * An Eclipse-centric model of a Gradle build, provided by the Gradle tooling API.
+ */
+package org.gradle.tooling.model.eclipse;
\ No newline at end of file
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/internal/ImmutableDomainObjectSet.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/internal/ImmutableDomainObjectSet.java
new file mode 100644
index 0000000..644cf89
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/internal/ImmutableDomainObjectSet.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model.internal;
+
+import org.gradle.tooling.model.DomainObjectSet;
+import org.gradle.util.GUtil;
+
+import java.util.*;
+
+public class ImmutableDomainObjectSet<T> extends AbstractSet<T> implements DomainObjectSet<T> {
+    private final Set<T> elements = new LinkedHashSet<T>();
+
+    public ImmutableDomainObjectSet(Iterable<? extends T> elements) {
+        GUtil.addToCollection(this.elements, elements);
+    }
+
+    @Override
+    public Iterator<T> iterator() {
+        return elements.iterator();
+    }
+
+    @Override
+    public int size() {
+        return elements.size();
+    }
+
+    public T getAt(int index) throws IndexOutOfBoundsException {
+        return getAll().get(index);
+    }
+
+    public List<T> getAll() {
+        return new ArrayList<T>(elements);
+    }
+}
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/package-info.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/package-info.java
new file mode 100644
index 0000000..4280ecb
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/model/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * A UI-centric model of a Gradle build, provided by the Gradle tooling API.
+ */
+package org.gradle.tooling.model;
\ No newline at end of file
diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/package-info.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/package-info.java
new file mode 100644
index 0000000..ceaf8b7
--- /dev/null
+++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * The main interfaces and classes of the Gradle tooling API.
+ */
+package org.gradle.tooling;
\ No newline at end of file
diff --git a/subprojects/tooling-api/src/main/resources/META-INF/services/org.gradle.tooling.internal.protocol.GradleConnectionFactoryVersion1 b/subprojects/tooling-api/src/main/resources/META-INF/services/org.gradle.tooling.internal.protocol.GradleConnectionFactoryVersion1
new file mode 100644
index 0000000..11bb467
--- /dev/null
+++ b/subprojects/tooling-api/src/main/resources/META-INF/services/org.gradle.tooling.internal.protocol.GradleConnectionFactoryVersion1
@@ -0,0 +1 @@
+org.gradle.tooling.internal.provider.DefaultConnectionFactory
\ No newline at end of file
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/GradleConnectorTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/GradleConnectorTest.groovy
new file mode 100644
index 0000000..dd5e5fa
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/GradleConnectorTest.groovy
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling
+
+import spock.lang.Specification
+import org.gradle.tooling.internal.consumer.ConnectionFactory
+import org.gradle.tooling.internal.consumer.DistributionFactory
+import org.gradle.tooling.internal.consumer.Distribution
+
+class GradleConnectorTest extends Specification {
+    final ConnectionFactory connectionFactory = Mock()
+    final DistributionFactory distributionFactory = Mock()
+    final Distribution distribution = Mock()
+    final File projectDir = new File('project-dir')
+    final GradleConnector connector = new GradleConnector(connectionFactory, distributionFactory)
+
+    def canCreateAConnectionGivenAProjectDirectory() {
+        BuildConnection connection = Mock()
+
+        when:
+        def result = connector.forProjectDirectory(projectDir).connect()
+
+        then:
+        result == connection
+        1 * distributionFactory.currentDistribution >> distribution
+        1 * connectionFactory.create(distribution, projectDir) >> connection
+    }
+
+    def canSpecifyAGradleInstallationToUse() {
+        BuildConnection connection = Mock()
+        File gradleHome = new File('install-dir')
+
+        when:
+        def result = connector.useInstallation(gradleHome).forProjectDirectory(projectDir).connect()
+
+        then:
+        result == connection
+        1 * distributionFactory.getDistribution(gradleHome) >> distribution
+        1 * connectionFactory.create(distribution, projectDir) >> connection
+    }
+
+    def canSpecifyAGradleDistributionToUse() {
+        BuildConnection connection = Mock()
+        URI gradleDist = new URI('http://server/dist.zip')
+
+        when:
+        def result = connector.useDistribution(gradleDist).forProjectDirectory(projectDir).connect()
+
+        then:
+        result == connection
+        1 * distributionFactory.getDistribution(gradleDist) >> distribution
+        1 * connectionFactory.create(distribution, projectDir) >> connection
+    }
+
+    def canSpecifyAGradleVersionToUse() {
+        BuildConnection connection = Mock()
+
+        when:
+        def result = connector.useGradleVersion('1.0').forProjectDirectory(projectDir).connect()
+
+        then:
+        result == connection
+        1 * distributionFactory.getDistribution('1.0') >> distribution
+        1 * connectionFactory.create(distribution, projectDir) >> connection
+    }
+
+    def mustSpecifyAProjectDirectory() {
+        when:
+        connector.connect()
+
+        then:
+        IllegalStateException e = thrown()
+        e.message == 'A project directory must be specified before creating a connection.'
+    }
+
+    def stopsConnectionFactoryWhenClosed() {
+        when:
+        connector.close()
+
+        then:
+        1 * connectionFactory.stop()
+    }
+}
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/CachingToolingImplementationLoaderTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/CachingToolingImplementationLoaderTest.groovy
new file mode 100644
index 0000000..ae88671
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/CachingToolingImplementationLoaderTest.groovy
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer
+
+import spock.lang.Specification
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1
+
+class CachingToolingImplementationLoaderTest extends Specification {
+    final ToolingImplementationLoader target = Mock()
+    final CachingToolingImplementationLoader loader = new CachingToolingImplementationLoader(target)
+
+    def delegatesToTargetLoaderToCreateImplementation() {
+        ConnectionFactoryVersion1 factoryImpl = Mock()
+        final Distribution distribution = Mock()
+
+        when:
+        def impl = loader.create(distribution)
+
+        then:
+        impl == factoryImpl
+        1 * target.create(distribution) >> factoryImpl
+        _ * distribution.toolingImplementationClasspath >> ([new File('a.jar')] as Set)
+        0 * _._
+    }
+
+    def reusesImplementationWithSameClasspath() {
+        ConnectionFactoryVersion1 factoryImpl = Mock()
+        final Distribution distribution = Mock()
+
+        when:
+        def impl = loader.create(distribution)
+        def impl2 = loader.create(distribution)
+
+        then:
+        impl == factoryImpl
+        impl2 == factoryImpl
+        1 * target.create(distribution) >> factoryImpl
+        _ * distribution.toolingImplementationClasspath >> ([new File('a.jar')] as Set)
+        0 * _._
+    }
+
+    def createsNewImplementationWhenClasspathNotSeenBefore() {
+        ConnectionFactoryVersion1 factoryImpl1 = Mock()
+        ConnectionFactoryVersion1 factoryImpl2 = Mock()
+        Distribution distribution1 = Mock()
+        Distribution distribution2 = Mock()
+
+        when:
+        def impl = loader.create(distribution1)
+        def impl2 = loader.create(distribution2)
+
+        then:
+        impl == factoryImpl1
+        impl2 == factoryImpl2
+        1 * target.create(distribution1) >> factoryImpl1
+        1 * target.create(distribution2) >> factoryImpl2
+        _ * distribution1.toolingImplementationClasspath >> ([new File('a.jar')] as Set)
+        _ * distribution2.toolingImplementationClasspath >> ([new File('b.jar')] as Set)
+        0 * _._
+    }
+}
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/ConnectionFactoryTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/ConnectionFactoryTest.groovy
new file mode 100644
index 0000000..f79ed90
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/ConnectionFactoryTest.groovy
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer
+
+import org.gradle.tooling.internal.protocol.ConnectionFactoryVersion1
+import org.gradle.tooling.internal.protocol.ConnectionVersion1
+import spock.lang.Specification
+
+class ConnectionFactoryTest extends Specification {
+    final ToolingImplementationLoader implementationLoader = Mock()
+    final Distribution distribution = Mock()
+    final ConnectionFactoryVersion1 connectionImplFactory = Mock()
+    final ConnectionVersion1 connectionImpl = Mock()
+    final ConnectionFactory factory = new ConnectionFactory(implementationLoader)
+
+    def usesImplementationLoaderToLoadConnectionFactory() {
+        File projectDir = new File('project-dir')
+
+        when:
+        factory.create(distribution, projectDir)
+
+        then:
+        1 * implementationLoader.create(distribution) >> connectionImplFactory
+        1 * connectionImplFactory.create(projectDir) >> connectionImpl
+        0 * _._
+    }
+
+    def stopsAllConnectionFactoriesOnStop() {
+        File projectDir = new File('project-dir')
+
+        when:
+        factory.create(distribution, projectDir)
+
+        then:
+        1 * implementationLoader.create(distribution) >> connectionImplFactory
+        
+        when:
+        factory.stop()
+
+        then:
+        1 * connectionImplFactory.stop()
+    }
+}
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultBuildConnectionTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultBuildConnectionTest.groovy
new file mode 100644
index 0000000..cfc1791
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultBuildConnectionTest.groovy
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer
+
+import org.gradle.util.ConcurrentSpecification
+import org.gradle.tooling.internal.protocol.ConnectionVersion1
+import org.gradle.tooling.model.Build
+import org.gradle.tooling.ResultHandler
+import org.gradle.tooling.internal.protocol.BuildVersion1
+import org.gradle.tooling.internal.protocol.ResultHandlerVersion1
+import org.gradle.tooling.GradleConnectionException
+import org.gradle.tooling.UnsupportedVersionException
+
+class DefaultBuildConnectionTest extends ConcurrentSpecification {
+    final ConnectionVersion1 protocolConnection = Mock()
+    final ProtocolToModelAdapter adapter = Mock()
+    final DefaultBuildConnection connection = new DefaultBuildConnection(protocolConnection, adapter)
+
+    def getModelDelegatesToProtocolConnectionToFetchModel() {
+        ResultHandler<Build> handler = Mock()
+        ResultHandlerVersion1<BuildVersion1> adaptedHandler
+        BuildVersion1 result = Mock()
+        Build adaptedResult = Mock()
+
+        when:
+        connection.getModel(Build.class, handler)
+
+        then:
+        1 * protocolConnection.getModel(BuildVersion1.class, !null) >> {args -> adaptedHandler = args[1]}
+
+        when:
+        adaptedHandler.onComplete(result)
+
+        then:
+        1 * adapter.adapt(Build.class, result) >> adaptedResult
+        1 * handler.onComplete(adaptedResult)
+        0 * _._
+    }
+
+    def getModelWrapsFailureToFetchModel() {
+        ResultHandler<Build> handler = Mock()
+        ResultHandlerVersion1<BuildVersion1> adaptedHandler
+        RuntimeException failure = new RuntimeException()
+        GradleConnectionException wrappedFailure
+
+        when:
+        connection.getModel(Build.class, handler)
+
+        then:
+        1 * protocolConnection.getModel(BuildVersion1.class, !null) >> {args -> adaptedHandler = args[1]}
+
+        when:
+        adaptedHandler.onFailure(failure)
+
+        then:
+        1 * handler.onFailure(!null) >> {args -> wrappedFailure = args[0] }
+        _ * protocolConnection.displayName >> '[connection]'
+        wrappedFailure.message == 'Could not fetch model of type \'Build\' from [connection].'
+        wrappedFailure.cause.is(failure)
+        0 * _._
+    }
+
+    def getModelFailsForUnknownModelType() {
+        when:
+        connection.getModel(TestBuild.class)
+
+        then:
+        UnsupportedVersionException e = thrown()
+        e.message == 'Model of type \'TestBuild\' is not supported.'
+    }
+
+    def getModelBlocksUntilResultReceivedFromProtocolConnection() {
+        def supplyResult = later()
+        BuildVersion1 result = Mock()
+        Build adaptedResult = Mock()
+        _ * adapter.adapt(Build.class, result) >> adaptedResult
+
+        when:
+        def model
+        def action = start {
+            model = connection.getModel(Build.class)
+        }
+
+        then:
+        action.waitsFor(supplyResult)
+        1 * protocolConnection.getModel(BuildVersion1.class, !null) >> { args ->
+            def handler = args[1]
+            supplyResult.activate {
+                handler.onComplete(result)
+            }
+        }
+
+        when:
+        finished()
+
+        then:
+        model == adaptedResult
+    }
+
+    def getModelBlocksUntilFailureReceivedFromProtocolConnectionAndRethrowsFailure() {
+        def supplyResult = later()
+        RuntimeException failure = new RuntimeException()
+
+        when:
+        def model
+        def action = start {
+            model = connection.getModel(Build.class)
+        }
+
+        then:
+        action.waitsFor(supplyResult)
+        1 * protocolConnection.getModel(BuildVersion1.class, !null) >> { args ->
+            def handler = args[1]
+            supplyResult.activate {
+                handler.onFailure(failure)
+            }
+        }
+
+        when:
+        finished()
+
+        then:
+        GradleConnectionException e = thrown()
+        e.cause.is(failure)
+    }
+}
+
+interface TestBuild extends Build {
+    
+}
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultToolingImplementationLoaderTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultToolingImplementationLoaderTest.groovy
new file mode 100644
index 0000000..262fb17
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/DefaultToolingImplementationLoaderTest.groovy
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer
+
+import org.gradle.api.internal.AbstractClassPathProvider
+import org.gradle.tooling.internal.provider.DefaultConnectionFactory
+import spock.lang.Specification
+import org.gradle.messaging.actor.ActorFactory
+
+class DefaultToolingImplementationLoaderTest extends Specification {
+    final Distribution distribution = Mock()
+    final DefaultToolingImplementationLoader loader = new DefaultToolingImplementationLoader()
+    
+    def usesMetaInfServiceToDetermineFactoryImplementation() {
+        when:
+        def factory = loader.create(distribution)
+
+        then:
+        factory.class != DefaultConnectionFactory.class
+        factory.class.name == DefaultConnectionFactory.class.name
+        _ * distribution.toolingImplementationClasspath >> ([AbstractClassPathProvider.getClasspathForClass(DefaultConnectionFactory.class),
+                AbstractClassPathProvider.getClasspathForClass(ActorFactory.class)
+        ] as Set)
+    }
+}
\ No newline at end of file
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/ProtocolToModelAdapterTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/ProtocolToModelAdapterTest.groovy
new file mode 100644
index 0000000..bbd1802
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/internal/consumer/ProtocolToModelAdapterTest.groovy
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.internal.consumer
+
+import org.gradle.tooling.model.DomainObjectSet
+import spock.lang.Specification
+import org.gradle.util.Matchers
+
+class ProtocolToModelAdapterTest extends Specification {
+    final ProtocolToModelAdapter adapter = new ProtocolToModelAdapter()
+
+    def createsProxyAdapterForProtocolModel() {
+        TestProtocolModel protocolModel = Mock()
+
+        expect:
+        adapter.adapt(TestModel.class, protocolModel) instanceof TestModel
+    }
+
+    def proxiesAreEqualWhenTargetObjectsAreEqual() {
+        TestProtocolModel protocolModel1 = Mock()
+        TestProtocolModel protocolModel2 = Mock()
+
+        def model = adapter.adapt(TestModel.class, protocolModel1)
+        def equal = adapter.adapt(TestModel.class, protocolModel1)
+        def different = adapter.adapt(TestModel.class, protocolModel2)
+
+        expect:
+        Matchers.strictlyEquals(model, equal)
+        model != different
+    }
+
+    def methodInvocationOnModelDelegatesToTheProtocolModelObject() {
+        TestProtocolModel protocolModel = Mock()
+        _ * protocolModel.getName() >> 'name'
+
+        expect:
+        def model = adapter.adapt(TestModel.class, protocolModel)
+        model.name == 'name'
+    }
+
+    def createsProxyAdapterForMethodReturnValue() {
+        TestProtocolModel protocolModel = Mock()
+        TestProtocolProject protocolProject = Mock()
+        _ * protocolModel.getProject() >> protocolProject
+        _ * protocolProject.getName() >> 'name'
+
+        expect:
+        def model = adapter.adapt(TestModel.class, protocolModel)
+        model.project instanceof TestProject
+        model.project.name == 'name'
+    }
+
+    def doesNotAdaptNullReturnValue() {
+        TestProtocolModel protocolModel = Mock()
+        _ * protocolModel.getProject() >> null
+
+        expect:
+        def model = adapter.adapt(TestModel.class, protocolModel)
+        model.project == null
+    }
+
+    def adaptsIterableToDomainObjectSet() {
+        TestProtocolModel protocolModel = Mock()
+        TestProtocolProject protocolProject = Mock()
+        _ * protocolModel.getChildren() >> [protocolProject]
+        _ * protocolProject.getName() >> 'name'
+
+        expect:
+        def model = adapter.adapt(TestModel.class, protocolModel)
+        model.children.size() == 1
+        model.children[0] instanceof TestProject
+        model.children[0].name == 'name'
+    }
+
+    def cachesPropertyValues() {
+        TestProtocolModel protocolModel = Mock()
+        TestProtocolProject protocolProject = Mock()
+        _ * protocolModel.getProject() >> protocolProject
+        _ * protocolModel.getChildren() >> [protocolProject]
+        _ * protocolProject.getName() >> 'name'
+
+        expect:
+        def model = adapter.adapt(TestModel.class, protocolModel)
+        model.project.is(model.project)
+        model.children.is(model.children)
+    }
+}
+
+interface TestModel {
+    String getName()
+
+    TestProject getProject()
+
+    DomainObjectSet<? extends TestProject> getChildren()
+}
+
+interface TestProject {
+    String getName()
+}
+
+interface TestProtocolModel {
+    String getName()
+
+    TestProtocolProject getProject()
+
+    Iterable<? extends TestProtocolProject> getChildren()
+}
+
+interface TestProtocolProject {
+    String getName()
+}
diff --git a/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/model/internal/ImmutableDomainObjectSetTest.groovy b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/model/internal/ImmutableDomainObjectSetTest.groovy
new file mode 100644
index 0000000..1a7ecf2
--- /dev/null
+++ b/subprojects/tooling-api/src/test/groovy/org/gradle/tooling/model/internal/ImmutableDomainObjectSetTest.groovy
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.tooling.model.internal
+
+import spock.lang.Specification
+
+class ImmutableDomainObjectSetTest extends Specification {
+
+    def emptySetHasZeroSize() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>([])
+
+        expect:
+        set.size() == 0
+        set.isEmpty()
+    }
+
+    def canQuerySize() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>(['a', 'b', 'c'])
+
+        expect:
+        set.size() == 3
+        !set.isEmpty()
+    }
+
+    def canGetElementByIndex() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>(['a', 'b', 'c'])
+
+        expect:
+        set[0] == 'a'
+        set[2] == 'c'
+    }
+
+    def throwsIndexOutOfBoundsExceptionForInvalidIndex() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>(['a', 'b', 'c'])
+
+        when:
+        set[4]
+
+        then:
+        IndexOutOfBoundsException e = thrown()
+
+        when:
+        set[-1]
+
+        then:
+        e = thrown()
+    }
+
+    def iteratorOfEmptySetHasNoElements() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>([])
+
+        expect:
+        !set.iterator().hasNext()
+    }
+
+    def iteratorMaintainsOrderOfOriginalCollection() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>(['a', 'b', 'c'])
+
+        expect:
+        set.collect { it } == ['a', 'b', 'c']
+        set.iterator().collect { it } == ['a', 'b', 'c']
+    }
+
+    def canGetElementsAsAList() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>(['a', 'b', 'c'])
+
+        expect:
+        set.all == ['a', 'b', 'c']
+    }
+
+    def ignoresDuplicateElementsInOriginalCollection() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>(['a', 'b', 'a', 'b', 'c'])
+
+        expect:
+        set.size() == 3
+        set.collect { it } == ['a', 'b', 'c']
+    }
+
+    def cannotAddElementsToSet() {
+        ImmutableDomainObjectSet<String> set = new ImmutableDomainObjectSet<String>([])
+
+        when:
+        set.add('a')
+
+        then:
+        UnsupportedOperationException e = thrown()
+    }
+}
diff --git a/subprojects/tooling-api/tooling-api.gradle b/subprojects/tooling-api/tooling-api.gradle
new file mode 100644
index 0000000..1de2c4e
--- /dev/null
+++ b/subprojects/tooling-api/tooling-api.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'groovy'
+
+dependencies {
+    groovy libraries.groovy_depends
+
+    compile project(':core'), project(':wrapper')
+
+    testCompile project(path: ':core', configuration: 'testFixtures')
+    testRuntime project(path: ':core', configuration: 'testFixturesRuntime')
+}
diff --git a/subprojects/ui/src/integTest/groovy/org/gradle/integtests/FavoritesIntegrationTest.java b/subprojects/ui/src/integTest/groovy/org/gradle/integtests/FavoritesIntegrationTest.java
new file mode 100644
index 0000000..ba7af26
--- /dev/null
+++ b/subprojects/ui/src/integTest/groovy/org/gradle/integtests/FavoritesIntegrationTest.java
@@ -0,0 +1,379 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests;
+
+import junit.framework.AssertionFailedError;
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.foundation.BuildInformation;
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.foundation.TestUtility;
+import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+import org.gradle.util.TemporaryFolder;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Performs integration tests on favorite tasks.
+ *
+ * @author mhunsicker
+ */
+public class FavoritesIntegrationTest {
+    @Rule
+    public final TemporaryFolder tempDir = new TemporaryFolder();
+    private BuildInformation buildInformation;
+
+    private ProjectView myRootProject;
+
+    private ProjectView mySubProject1;
+    private TaskView mySubProject1Comple;
+    private TaskView mySubProject1Lib;
+    private TaskView mySubProject1Doc;
+
+    private ProjectView mySubSubProject;
+    private TaskView mySubSubProjectCompile;
+    private TaskView mySubSubProjectLib;
+    private TaskView mySubSubProjectDoc;
+
+    private ProjectView mySubProject2;
+    private TaskView mySubProject2Lib;
+    private TaskView mySubProject2doc;
+    private TaskView mySubProject2Compile;
+    private JUnit4Mockery context;
+
+    @Before
+    public void setUp() throws Exception {
+        context = new JUnit4Mockery();
+
+        Task subsubCompileTask = TestUtility.createTask(context, "compile", "compile description");
+        Task subsubLibTask = TestUtility.createTask(context, "lib", "lib description");
+        Task subsubDocTask = TestUtility.createTask(context, "doc", "doc description");
+        Project subsubProject = TestUtility.createMockProject(context, "mysubsubproject", "filepath3", 2, null, new Task[]{subsubCompileTask, subsubLibTask, subsubDocTask}, null, (Project[]) null);
+
+        Task subCompileTask1 = TestUtility.createTask(context, "compile", "compile description");
+        Task subLibTask1 = TestUtility.createTask(context, "lib", "lib description");
+        Task subDocTask1 = TestUtility.createTask(context, "doc", "doc description");
+        Project subProject1 = TestUtility.createMockProject(context, "mysubproject1", "filepath2a", 1, new Project[]{subsubProject}, new Task[]{subCompileTask1, subLibTask1, subDocTask1}, null,
+                (Project[]) null);
+
+        Task subCompileTask2 = TestUtility.createTask(context, "compile", "compile description");
+        Task subLibTask2 = TestUtility.createTask(context, "lib", "lib description");
+        Task subDocTask2 = TestUtility.createTask(context, "doc", "doc description");
+        Project subProject2 = TestUtility.createMockProject(context, "mysubproject2", "filepath2b", 1, null, new Task[]{subCompileTask2, subLibTask2, subDocTask2}, null, (Project[]) null);
+
+        Project rootProject = TestUtility.createMockProject(context, "myrootproject", "filepath1", 0, new Project[]{subProject1, subProject2}, null, null, (Project[]) null);
+
+        buildInformation = new BuildInformation(rootProject);
+
+        //now get the converted objects to simplify our matching
+        myRootProject = buildInformation.getProjectFromFullPath("myrootproject");
+        Assert.assertNotNull(myRootProject);
+        mySubProject1 = buildInformation.getProjectFromFullPath("myrootproject:mysubproject1");
+        Assert.assertNotNull(mySubProject1);
+        mySubProject1Comple = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:compile");
+        Assert.assertNotNull(mySubProject1Comple);
+        mySubProject1Lib = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:lib");
+        Assert.assertNotNull(mySubProject1Lib);
+        mySubProject1Doc = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:doc");
+        Assert.assertNotNull(mySubProject1Doc);
+        mySubSubProject = buildInformation.getProjectFromFullPath("myrootproject:mysubproject1:mysubsubproject");
+        Assert.assertNotNull(mySubSubProject);
+        mySubSubProjectCompile = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:mysubsubproject:compile");
+        Assert.assertNotNull(mySubSubProjectCompile);
+        mySubSubProjectLib = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:mysubsubproject:lib");
+        Assert.assertNotNull(mySubSubProjectLib);
+        mySubSubProjectDoc = buildInformation.getTaskFromFullPath("myrootproject:mysubproject1:mysubsubproject:doc");
+        Assert.assertNotNull(mySubSubProjectDoc);
+        mySubProject2 = buildInformation.getProjectFromFullPath("myrootproject:mysubproject2");
+        Assert.assertNotNull(mySubProject2);
+        mySubProject2Compile = buildInformation.getTaskFromFullPath("myrootproject:mysubproject2:compile");
+        Assert.assertNotNull(mySubProject2Compile);
+        mySubProject2Lib = buildInformation.getTaskFromFullPath("myrootproject:mysubproject2:lib");
+        Assert.assertNotNull(mySubProject2Lib);
+        mySubProject2doc = buildInformation.getTaskFromFullPath("myrootproject:mysubproject2:doc");
+        Assert.assertNotNull(mySubProject2doc);
+    }
+
+    /**
+     * This creates favorites, saves them to a file, then reads them from that file.
+     */
+    @Test
+    public void testSavingRestoringFavorites() {
+        FavoritesEditor originalEditor = new FavoritesEditor();
+
+        Assert.assertTrue(originalEditor.getFavoriteTasks().isEmpty());
+
+        //add two tasks
+        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
+        FavoriteTask favoriteTask2 = originalEditor.addFavorite(mySubSubProjectLib, false);
+
+        //now change the display name so its not the same as the full name, just so know each field is working.
+        originalEditor.editFavorite(favoriteTask1, new FavoritesEditor.EditFavoriteInteraction() {
+            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
+                favoriteTask.displayName = "favorite 1";
+                return true;
+            }
+
+            public void reportError(String error) {
+                throw new AssertionFailedError("Unexpected error");
+            }
+        });
+
+        //make sure they were added properly
+        FavoriteTask originalFavoriteTask1 = originalEditor.getFavoriteTasks().get(0);
+        assertFavorite(originalFavoriteTask1, "mysubproject1:compile", "favorite 1", true);
+
+        FavoriteTask originalFavoriteTask2 = originalEditor.getFavoriteTasks().get(1);
+        assertFavorite(originalFavoriteTask2, "mysubproject1:mysubsubproject:lib", "mysubproject1:mysubsubproject:lib", false);
+
+        File file = tempDir.createFile("fred.favorite-tasks");
+        originalEditor.exportToFile(new TestUtility.TestExportInteraction(file, true)); //confirm overwrite because the above function actually creates the file.
+
+        FavoritesEditor newEditor = new FavoritesEditor();
+        newEditor.importFromFile(new TestUtility.TestImportInteraction(file));
+
+        //make sure they're the same
+        FavoriteTask readInFavoriteTask1 = originalEditor.getFavoriteTasks().get(0);
+        assertFavorite(readInFavoriteTask1, originalFavoriteTask1);
+
+        FavoriteTask readInFavoriteTask2 = originalEditor.getFavoriteTasks().get(1);
+        assertFavorite(readInFavoriteTask2, originalFavoriteTask2);
+    }
+
+    /**
+     * This verifies that the serialization mechananism corrects the extension so that it is correct. We'll save a file with the wrong extension. The save mechanism should save it with the correct
+     * extension appended to the end (leaving the wrong extension in tact, just not at the end).
+     */
+    @Test
+    public void testEnsureFileHasCorrectExtension() {
+        FavoritesEditor originalEditor = new FavoritesEditor();
+
+        Assert.assertTrue(originalEditor.getFavoriteTasks().isEmpty());
+
+        //add a favorite
+        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
+
+        //specify a wrong extension. It should actually end in ".favorite-tasks"
+        File incorrectFile = tempDir.createFile("fred.wrong");
+        File correctFile = new File(incorrectFile.getParentFile(), incorrectFile.getName() + ".favorite-tasks");
+
+        //Make sure the correct file doesn't already exist before we've even done our test. This is highly unlikely, but it might happen.
+        //Technically, I should place these in a new temporary directory, but I didn't want the hassle of cleanup.
+        if (correctFile.exists()) {
+            throw new AssertionFailedError("'correct' file already exists. This means this test WILL succeed but perhaps not for the correct reasons.");
+        }
+
+        //do the export
+        originalEditor.exportToFile(new TestUtility.TestExportInteraction(incorrectFile, true)); //confirm overwrite because the above function actually creates the file.
+
+        //it should have been saved to the correct file
+        if (!correctFile.exists()) {
+            throw new AssertionFailedError("failed to correct the file name. Expected it to be saved to '" + correctFile.getAbsolutePath() + "'");
+        }
+
+        //now read in the file to verify it actually worked.
+        FavoritesEditor newEditor = new FavoritesEditor();
+        newEditor.importFromFile(new TestUtility.TestImportInteraction(correctFile));
+
+        FavoriteTask readInFavoriteTask = newEditor.getFavoriteTasks().get(0);
+        assertFavorite(readInFavoriteTask, favoriteTask1);
+    }
+
+    private void assertFavorite(FavoriteTask favoriteTaskToTest, String expectedFullTaskName, String expectedDisplayName, boolean expectedAlwaysShowOutput) {
+        Assert.assertEquals(expectedFullTaskName, favoriteTaskToTest.getFullCommandLine());
+        Assert.assertEquals(expectedDisplayName, favoriteTaskToTest.getDisplayName());
+        Assert.assertEquals(expectedAlwaysShowOutput, favoriteTaskToTest.alwaysShowOutput());
+    }
+
+    private void assertFavorite(FavoriteTask favoriteTaskToTest, FavoriteTask expectedFavoriteTask) {
+        assertFavorite(favoriteTaskToTest, expectedFavoriteTask.getFullCommandLine(), expectedFavoriteTask.getDisplayName(), expectedFavoriteTask.alwaysShowOutput());
+    }
+
+    /**
+     * This confirms that overwriting a file requires confirmation. We'll create a file (just by creating a temporary file), then try to save to it.
+     */
+    @Test
+    public void testConfirmOverwrite() {  //we should be prompted to confirm overwriting an existing file.
+
+        FavoritesEditor originalEditor = new FavoritesEditor();
+
+        Assert.assertTrue(originalEditor.getFavoriteTasks().isEmpty());
+
+        //add a favorite
+        FavoriteTask favoriteTask1 = originalEditor.addFavorite(mySubProject1Comple, true);
+
+        File file = tempDir.createFile("test.favorite-tasks");
+
+        //make sure the file exists, so we know our save will be overwritting something.
+        Assert.assertTrue(file.exists());
+
+        long originalSize = file.length();
+
+        TestOverwriteConfirmExportInteraction exportInteraction = new TestOverwriteConfirmExportInteraction(file, false);
+
+        //do the export
+        originalEditor.exportToFile(exportInteraction);
+
+        //make sure we were prompted to confirm overwriting
+        Assert.assertTrue(exportInteraction.wasConfirmed);
+
+        //make sure the size didn't change. This means we didn't write to it.
+        Assert.assertEquals(originalSize, file.length());
+    }
+
+    /**
+     * This exists soley so we can track if confirmOverwritingExisingFile was called.
+     */
+    private class TestOverwriteConfirmExportInteraction extends TestUtility.TestExportInteraction {
+        public boolean wasConfirmed;
+
+        private TestOverwriteConfirmExportInteraction(File file, boolean confirmOverwrite) {
+            super(file, confirmOverwrite);
+        }
+
+        public File promptForFile(FileFilter fileFilters) {
+            if (wasConfirmed) {
+                //once we confirm it, just return null.
+                return null;
+            }
+
+            return super.promptForFile(fileFilters);
+        }
+
+        /**
+         * The file already exists. Confirm whether or not you want to overwrite it.
+         *
+         * @param file the file in question
+         * @return true to overwrite it, false not to.
+         */
+        @Override
+        public boolean confirmOverwritingExisingFile(File file) {
+            wasConfirmed = true;
+            return false;
+        }
+    }
+
+    /**
+     * This tests duplicating a single favorite. First, we'll create some, then duplicate one.
+     */
+    @Test
+    public void testDuplicateSingleFavorite() {
+        FavoritesEditor editor = new FavoritesEditor();
+
+        //add two tasks
+        FavoriteTask favoriteTask1 = editor.addFavorite(mySubProject1Comple, true);
+        FavoriteTask favoriteTask2 = editor.addFavorite(mySubSubProjectLib, false);
+        FavoriteTask favoriteTask3 = editor.addFavorite(mySubSubProjectDoc, false);
+
+        //now change the display names and the alwaysShowOutput field, just so we can verify that all fields are copied.
+        editFavorite(editor, favoriteTask1, "name1", false);
+        editFavorite(editor, favoriteTask2, "name2", true);
+        editFavorite(editor, favoriteTask3, "name3", false);
+
+        //duplicate a single task
+        FavoriteTask favoriteTask4 = editor.duplicateFavorite(favoriteTask1);
+        Assert.assertNotNull(favoriteTask4);
+        Assert.assertEquals(favoriteTask1.getFullCommandLine(), favoriteTask4.getFullCommandLine());
+        Assert.assertEquals(favoriteTask1.getDisplayName(), favoriteTask4.getDisplayName());
+        Assert.assertEquals(favoriteTask1.alwaysShowOutput(), favoriteTask4.alwaysShowOutput());
+
+        //there should be 4 tasks now
+        Assert.assertEquals(4, editor.getFavoriteTasks().size());
+
+        //now duplicate another one
+        FavoriteTask favoriteTask5 = editor.duplicateFavorite(favoriteTask2);
+        Assert.assertNotNull(favoriteTask5);
+        Assert.assertEquals(favoriteTask2.getFullCommandLine(), favoriteTask5.getFullCommandLine());
+        Assert.assertEquals(favoriteTask2.getDisplayName(), favoriteTask5.getDisplayName());
+        Assert.assertEquals(favoriteTask2.alwaysShowOutput(), favoriteTask5.alwaysShowOutput());
+
+        //there should be 5 tasks now
+        Assert.assertEquals(5, editor.getFavoriteTasks().size());
+    }
+
+    /**
+     * This tests duplicating multiple favorites at once. First, we'll create some, then duplicate them.
+     */
+    @Test
+    public void testDuplicatingMultipleFavorites() {
+        FavoritesEditor editor = new FavoritesEditor();
+
+        //add two tasks
+        FavoriteTask favoriteTask1 = editor.addFavorite(mySubProject1Comple, true);
+        FavoriteTask favoriteTask2 = editor.addFavorite(mySubSubProjectLib, false);
+        FavoriteTask favoriteTask3 = editor.addFavorite(mySubSubProjectDoc, false);
+
+        //now change the display names and the alwaysShowOutput field, just so we can verify that all fields are copied.
+        editFavorite(editor, favoriteTask1, "name1", false);
+        editFavorite(editor, favoriteTask2, "name2", true);
+        editFavorite(editor, favoriteTask3, "name3", false);
+
+        //get the ones to dupicate in a list
+        List<FavoriteTask> tasksToCopy = new ArrayList<FavoriteTask>();
+        tasksToCopy.add(favoriteTask1);
+        tasksToCopy.add(favoriteTask2);
+
+        //now peform the duplication
+        editor.duplicateFavorites(tasksToCopy);
+
+        //there should be 5 tasks now
+        Assert.assertEquals(5, editor.getFavoriteTasks().size());
+
+        //the 4th one (3 from index 0) should be the same as the first one
+        FavoriteTask favoriteTask4 = editor.getFavoriteTasks().get(3);
+
+        Assert.assertNotNull(favoriteTask4);
+        Assert.assertEquals(favoriteTask1.getFullCommandLine(), favoriteTask4.getFullCommandLine());
+        Assert.assertEquals(favoriteTask1.getDisplayName(), favoriteTask4.getDisplayName());
+        Assert.assertEquals(favoriteTask1.alwaysShowOutput(), favoriteTask4.alwaysShowOutput());
+
+        //the 5th one (4 from index 0) should be the same as the second one
+        FavoriteTask favoriteTask5 = editor.getFavoriteTasks().get(4);
+        Assert.assertNotNull(favoriteTask5);
+        Assert.assertEquals(favoriteTask2.getFullCommandLine(), favoriteTask5.getFullCommandLine());
+        Assert.assertEquals(favoriteTask2.getDisplayName(), favoriteTask5.getDisplayName());
+        Assert.assertEquals(favoriteTask2.alwaysShowOutput(), favoriteTask5.alwaysShowOutput());
+    }
+
+    /**
+     * This sets the display name of the favorite task to the specified new name.
+     */
+    private void editFavorite(FavoritesEditor editor, FavoriteTask favoriteTask, final String newDisplayName, final boolean newAlwaysShowOutput) {
+        editor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
+            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
+                favoriteTask.displayName = newDisplayName;
+                favoriteTask.alwaysShowOutput = newAlwaysShowOutput;
+                return true;
+            }
+
+            public void reportError(String error) {
+                throw new AssertionFailedError("Unexpected error");
+            }
+        });
+
+        Assert.assertEquals(newDisplayName, favoriteTask.getDisplayName());
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/integTest/groovy/org/gradle/integtests/LiveOutputIntegrationTest.groovy b/subprojects/ui/src/integTest/groovy/org/gradle/integtests/LiveOutputIntegrationTest.groovy
new file mode 100644
index 0000000..a637006
--- /dev/null
+++ b/subprojects/ui/src/integTest/groovy/org/gradle/integtests/LiveOutputIntegrationTest.groovy
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+package org.gradle.integtests
+
+import org.gradle.foundation.TestUtility
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol
+import org.gradle.gradleplugin.foundation.GradlePluginLord
+import org.gradle.gradleplugin.foundation.runner.GradleRunner
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import java.util.concurrent.TimeUnit
+import java.util.concurrent.locks.Lock
+import java.util.concurrent.locks.ReentrantLock
+import java.util.concurrent.locks.Condition
+
+/**
+This tests the that live output is gathered while executing a task.
+ at author mhunsicker
+*/
+class LiveOutputIntegrationTest {
+
+    static final String JAVA_PROJECT_NAME = 'javaproject'
+    static final String SHARED_NAME = 'shared'
+    static final String API_NAME = 'api'
+    static final String WEBAPP_NAME = 'webservice'
+    static final String SERVICES_NAME = 'services'
+    static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
+
+    private File javaprojectDir
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/quickstart')
+
+    @Before
+    void setUp() {
+        javaprojectDir = sample.dir
+    }
+
+    /**
+This executes 'build' on the java multiproject sample. We want to make sure that
+we do get live output from gradle. We're not concerned with what it is, because
+that's likely to change over time. This version executes the command via GradlePlugin.
+
+ at author mhunsicker
+*/
+
+    @Test
+    public void liveOutputObtainedViaGradlePlugin() {
+       System.out.println("project dir: " + javaprojectDir );
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
+
+        File multiProjectDirectory = sample.getDir();
+        Assert.assertTrue(multiProjectDirectory.exists()); //make sure things are setup the way we expect
+
+        GradlePluginLord gradlePluginLord = new GradlePluginLord();
+        gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
+        gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
+
+        gradlePluginLord.startExecutionQueue(); //for tests, we'll need to explicitly start the execution queue (unless we do a refresh via the TestUtility).
+
+        TestExecutionInteraction executionInteraction = new TestExecutionInteraction();
+
+        //execute a command. We don't really care what the command is, just something that generates output
+        TestUtility.executeBlocking( gradlePluginLord, "tasks", "Test Execution", executionInteraction, 100 )
+
+        verifyLiveOutputObtained( executionInteraction );
+    }
+
+    /**
+This executes 'build' on the java multiproject sample. We want to make sure that
+we do get live output from gradle. We're not concerned with what it is, because
+that's likely to change over time. This version executes the command via GradleRunner.
+
+ at author mhunsicker
+*/
+    @Test
+    public void liveOutputObtainedViaGradleRunner() {
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
+
+        File multiProjectDirectory = sample.getDir();
+        Assert.assertTrue(multiProjectDirectory.exists()); //make sure things are setup the way we expect
+
+        GradleRunner gradleRunner = new GradleRunner( multiProjectDirectory, dist.gradleHomeDir, null );
+
+        TestExecutionInteraction executionInteraction = new TestExecutionInteraction();
+
+        //execute a command. We don't really care what the command is, just something that generates output
+        gradleRunner.executeCommand("tasks", org.gradle.api.logging.LogLevel.LIFECYCLE,
+                                            org.gradle.StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS,
+                                            executionInteraction);
+
+        executionInteraction.waitForCompletion(100, TimeUnit.SECONDS)
+
+        verifyLiveOutputObtained( executionInteraction );
+    }
+
+
+
+   /**
+  This verifies that it has live output. It also checks that we received some final output as well
+  as that the execution was successful
+  */
+   private void verifyLiveOutputObtained( TestExecutionInteraction executionInteraction )
+   {
+      executionInteraction.assertCompleted()
+
+      //Make sure we were successful. If we weren't successful, that probably indicates a different problem and the test itself may be invalid.
+      Assert.assertTrue( String.format("Verifying execution was successful failed:%n%s", executionInteraction.finalMessage), executionInteraction.wasSuccessful )
+
+      //verify that we actually finished. If not, then we timed out, which may mean the machine is really slow or that there's a serious problem.
+      Assert.assertTrue( "Verifying execution finished in a timely manner", executionInteraction.executionFinishedReported );
+
+      //make sure we received some output! I just made up 30 because I wanted more than just 1 character and there should actually be dozens of characters.
+      Assert.assertTrue( "Verifying live output was obtained", executionInteraction.liveOutput.length() >= 30 )
+
+      //We should also get a final message. Note: this is usually a little different from the live output, if for not other reason than
+      //timing issues of when the last live output is sent. The final message should have everything, but we might not get the last
+      //live output. As such, we won't verify they're equal.
+      Assert.assertTrue( "Verifying the final output message was received", executionInteraction.finalMessage.length() > 30 )
+   }
+}
+
+//this class just holds onto our liveOutput and also tracks whether or not we've finished.
+public class TestExecutionInteraction implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
+    private StringBuilder liveOutput = new StringBuilder();
+    public boolean executionFinishedReported = false;
+    public boolean wasSuccessful = false;
+    public String finalMessage;
+    private Throwable failure
+    private final Lock lock = new ReentrantLock()
+    private final Condition condition = lock.newCondition()
+
+    public void reportLiveOutput(String message) {
+        liveOutput.append(message);
+    }
+
+    //when we finish executing, we'll make sure we got some type of live output from gradle.
+
+    public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+        lock.lock()
+        try {
+            executionFinishedReported = true
+            this.wasSuccessful = wasSuccessful
+            this.finalMessage = message
+            failure = throwable
+            condition.signalAll()
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    def assertCompleted() {
+        lock.lock()
+        try {
+            if (!executionFinishedReported) {
+                throw new AssertionError("Request has not completed.")
+            }
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    public waitForCompletion(int maxWaitValue, TimeUnit maxWaitUnits) {
+        Date expiry = new Date(System.currentTimeMillis() + maxWaitUnits.toMillis(maxWaitValue))
+        lock.lock()
+        try {
+            while (!executionFinishedReported) {
+                if (!condition.awaitUntil(expiry)) {
+                    throw new AssertionError("Timeout waiting for execution to complete.")
+                }
+            }
+            if (failure != null) {
+                throw failure
+            }
+        } finally {
+            lock.unlock()
+        }
+    }
+
+    public void reportExecutionStarted() { }
+
+    public void reportNumberOfTasksToExecute(int size) { }
+
+    public void reportTaskStarted(String message, float percentComplete) { }
+
+    public void reportTaskComplete(String message, float percentComplete) { }
+
+
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/integTest/groovy/org/gradle/integtests/MultiprojectProjectAndTaskListIntegrationTest.groovy b/subprojects/ui/src/integTest/groovy/org/gradle/integtests/MultiprojectProjectAndTaskListIntegrationTest.groovy
new file mode 100644
index 0000000..8b583d7
--- /dev/null
+++ b/subprojects/ui/src/integTest/groovy/org/gradle/integtests/MultiprojectProjectAndTaskListIntegrationTest.groovy
@@ -0,0 +1,249 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.integtests
+
+import org.gradle.foundation.ProjectView
+import org.gradle.foundation.TaskView
+import org.gradle.gradleplugin.foundation.GradlePluginLord
+import org.gradle.integtests.fixtures.GradleDistribution
+import org.gradle.integtests.fixtures.GradleDistributionExecuter
+import org.gradle.integtests.fixtures.Sample
+import org.gradle.openapi.external.foundation.ProjectVersion1
+import org.gradle.openapi.wrappers.foundation.GradleInterfaceWrapperVersion1
+import org.junit.Assert
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import java.util.concurrent.TimeUnit
+import org.gradle.foundation.TestUtility
+
+/**
+ This tests the multiproject sample with the GradleView mechanism.
+ @author mhunsicker
+ */
+class MultiprojectProjectAndTaskListIntegrationTest {
+
+    static final String JAVA_PROJECT_NAME = 'javaproject'
+    static final String SHARED_NAME = 'shared'
+    static final String API_NAME = 'api'
+    static final String WEBAPP_NAME = 'webservice'
+    static final String SERVICES_NAME = 'services'
+    static final String WEBAPP_PATH = "$SERVICES_NAME/$WEBAPP_NAME" as String
+
+    private File javaprojectDir
+
+    @Rule public final GradleDistribution dist = new GradleDistribution()
+    @Rule public final GradleDistributionExecuter executer = new GradleDistributionExecuter()
+    @Rule public final Sample sample = new Sample('java/multiproject')
+
+    @Before
+    void setUp() {
+        javaprojectDir = sample.getDir()
+    }
+
+    /*
+       This tests against the multiproject sample. It expects to find not just
+       the root level projects, but also the nested sub projects
+       (services:webservice). This isn't really interested in the actual tasks
+       themselves (I fear those may change too often to worry with keeping the
+       test up to date).
+
+       @author mhunsicker
+    */
+
+    @Test
+    public void multiProjectjavaProjectSample() {
+        // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
+
+        File multiProjectDirectory = sample.getDir();
+        Assert.assertTrue(multiProjectDirectory.exists());
+
+        GradlePluginLord gradlePluginLord = new GradlePluginLord();
+        gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
+        gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
+
+        //refresh the projects and wait. This will throw an exception if it fails.
+        TestUtility.refreshProjectsBlocking(gradlePluginLord, 80, TimeUnit.SECONDS);
+
+        //get the root project
+        List<ProjectView> projects = gradlePluginLord.getProjects();
+        Assert.assertNotNull(projects);
+
+        //make sure there weren't other root projects found.
+        Assert.assertEquals(1, projects.size());
+
+        ProjectView rootProject = projects.get(0);
+        Assert.assertNotNull(rootProject);
+        Assert.assertEquals("multiproject", rootProject.getName());
+
+        //now check for sub projects, api, shared, and services
+        ProjectView apiProject = rootProject.getSubProject("api");
+        Assert.assertNotNull(apiProject);
+        Assert.assertTrue(apiProject.getSubProjects().isEmpty());  //this has no sub projects
+
+        ProjectView sharedProject = rootProject.getSubProject("shared");
+        Assert.assertNotNull(sharedProject);
+        Assert.assertTrue(sharedProject.getSubProjects().isEmpty());  //this has no sub projects
+
+        ProjectView servicesProject = rootProject.getSubProject("services");
+        Assert.assertNotNull(servicesProject);
+
+        //services has a sub project
+        ProjectView webservicesProject = servicesProject.getSubProject("webservice");
+        Assert.assertNotNull(webservicesProject);
+        Assert.assertTrue(webservicesProject.getSubProjects().isEmpty());  //this has no sub projects
+
+        //make sure we didn't inadvertantly find other sub projects.
+        Assert.assertEquals(3, rootProject.getSubProjects().size());
+    }
+
+   /**
+    This tests that the wrappers for projects and tasks are working
+    */
+   @Test
+   public void testOpenAPIWrapperProjectAndTaskList()
+   {
+     // Build and test projects
+        executer.inDirectory(javaprojectDir).withTasks('assemble').run();
+
+        File multiProjectDirectory = sample.getDir();
+        Assert.assertTrue(multiProjectDirectory.exists());
+
+        GradlePluginLord gradlePluginLord = new GradlePluginLord();
+        gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
+        gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
+
+        GradleInterfaceWrapperVersion1 wrapper = new GradleInterfaceWrapperVersion1( gradlePluginLord );
+
+        //the rest of this uses the open API mechanism to access the projects and tasks
+
+        //refresh the projects and wait. This will throw an exception if it fails.
+        TestUtility.refreshProjectsBlocking(gradlePluginLord, 80, TimeUnit.SECONDS);
+
+        //get the root project
+        List<ProjectVersion1> projects = wrapper.getRootProjects();
+        Assert.assertNotNull(projects);
+
+        //make sure there weren't other root projects found.
+        Assert.assertEquals(1, projects.size());
+
+        ProjectVersion1 rootProject = projects.get(0);
+        Assert.assertNotNull(rootProject);
+        Assert.assertEquals("multiproject", rootProject.getName());
+
+        //now check for sub projects, api, shared, and services
+        ProjectVersion1 apiProject = rootProject.getSubProject("api");
+        Assert.assertNotNull(apiProject);
+        Assert.assertTrue(apiProject.getSubProjects().isEmpty());  //this has no sub projects
+
+        ProjectVersion1 sharedProject = rootProject.getSubProject("shared");
+        Assert.assertNotNull(sharedProject);
+        Assert.assertTrue(sharedProject.getSubProjects().isEmpty());  //this has no sub projects
+
+        ProjectVersion1 servicesProject = rootProject.getSubProject("services");
+        Assert.assertNotNull(servicesProject);
+
+        //services has a sub project
+        ProjectVersion1 webservicesProject = servicesProject.getSubProject("webservice");
+        Assert.assertNotNull(webservicesProject);
+        Assert.assertTrue(webservicesProject.getSubProjects().isEmpty());  //this has no sub projects
+
+        //make sure we didn't inadvertantly find other sub projects.
+        Assert.assertEquals(3, rootProject.getSubProjects().size());
+
+        //I don't want to keep the actual tasks in synch, but let's make sure there's something there.
+        def tasks = apiProject.getTasks()
+        Assert.assertNotNull( tasks );
+        Assert.assertFalse( tasks.isEmpty() );
+   }
+
+   /**
+   * This tests ProjectView.getSubProjectFromFullPath. Specifically, the first character
+    * is optionally a colon. So this tests it both ways.
+   */
+   @Test
+   public void testSubProjectFromFullPath()
+   {
+     executer.inDirectory(javaprojectDir).withTasks('assemble').run();
+
+      File multiProjectDirectory = sample.getDir();
+      Assert.assertTrue(multiProjectDirectory.exists());
+
+      GradlePluginLord gradlePluginLord = new GradlePluginLord();
+      gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
+      gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
+
+      //refresh the projects and wait. This will throw an exception if it fails.
+      TestUtility.refreshProjectsBlocking(gradlePluginLord, 80, TimeUnit.SECONDS);
+
+      //get the root project
+      List<ProjectView> projects = gradlePluginLord.getProjects();
+      Assert.assertNotNull(projects);
+      Assert.assertFalse( projects.isEmpty() );
+
+      ProjectView rootProject = projects.get(0)
+
+      //test it using no prefixed colon
+      ProjectView foundProject1 = rootProject.getSubProjectFromFullPath("services:webservice")
+      Assert.assertNotNull( foundProject1 )
+
+      //test it using a prefixed colon
+      ProjectView foundProject2 = rootProject.getSubProjectFromFullPath(":services:webservice")
+      Assert.assertNotNull( foundProject2 )
+
+      //should both the same project
+      Assert.assertEquals( foundProject1, foundProject2 )
+   }
+
+   /**
+   * This tests TaskView.getTaskFromFullPath. Specifically, the first character
+    * is optionally a colon. So this tests it both ways.
+   */
+   @Test
+   public void testGetTaskFromFullPath()
+   {
+     executer.inDirectory(javaprojectDir).withTasks('assemble').run();
+
+      File multiProjectDirectory = sample.getDir();
+      Assert.assertTrue(multiProjectDirectory.exists());
+
+      GradlePluginLord gradlePluginLord = new GradlePluginLord();
+      gradlePluginLord.setCurrentDirectory(multiProjectDirectory);
+      gradlePluginLord.setGradleHomeDirectory(dist.gradleHomeDir);
+
+      //refresh the projects and wait. This will throw an exception if it fails.
+      TestUtility.refreshProjectsBlocking(gradlePluginLord, 100, TimeUnit.SECONDS);
+
+      //get the root project
+      List<ProjectView> projects = gradlePluginLord.getProjects();
+      Assert.assertNotNull(projects);
+      Assert.assertFalse( projects.isEmpty() );
+
+      ProjectView rootProject = projects.get(0)
+
+      //test it using no prefixed colon
+      TaskView foundTask1 = rootProject.getTaskFromFullPath("api:build")
+      Assert.assertNotNull( foundTask1 )
+
+      //test it using a prefixed colon
+      TaskView foundTask2 = rootProject.getTaskFromFullPath(":api:build")
+      Assert.assertNotNull( foundTask2 )
+
+      //should both the same project
+      Assert.assertEquals( foundTask1, foundTask2 )      
+   }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/CommandLineAssistant.java b/subprojects/ui/src/main/java/org/gradle/foundation/CommandLineAssistant.java
new file mode 100644
index 0000000..edd547b
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/CommandLineAssistant.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import org.gradle.initialization.DefaultCommandLineConverter;
+import org.gradle.logging.internal.LoggingCommandLineConverter;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Some helpful functions for manipulating command line arguments.
+ *
+ * @author mhunsicker
+ */
+public class CommandLineAssistant {
+    private final DefaultCommandLineConverter commandLineConverter;
+    private final LoggingCommandLineConverter loggingCommandLineConverter = new LoggingCommandLineConverter();
+
+    public CommandLineAssistant() {
+        commandLineConverter = new DefaultCommandLineConverter();
+    }
+
+    public DefaultCommandLineConverter getCommandLineConverter() {
+        return commandLineConverter;
+    }
+
+    public LoggingCommandLineConverter getLoggingCommandLineConverter() {
+        return loggingCommandLineConverter;
+    }
+
+    /**
+     * This breaks up the full command line string into space-delimited and/or quoted command line arguments. This currently does not handle escaping characters such as quotes.
+     *
+     * @param fullCommandLine the full command line
+     * @return a string array of the separate command line arguments.
+     */
+    public static String[] breakUpCommandLine(String fullCommandLine) {
+        List<String> commandLineArguments = new ArrayList<String>();
+
+        Character currentQuote = null;
+        StringBuilder currentOption = new StringBuilder();
+        boolean hasOption = false;
+
+        for (int index = 0; index < fullCommandLine.length(); index++) {
+            char c = fullCommandLine.charAt(index);
+            if (currentQuote == null && Character.isWhitespace(c)) {
+                if (hasOption) {
+                    commandLineArguments.add(currentOption.toString());
+                    hasOption = false;
+                    currentOption.setLength(0);
+                }
+            } else if (currentQuote == null && (c == '"' || c == '\'')) {
+                currentQuote = c;
+                hasOption = true;
+            } else if (currentQuote != null && c == currentQuote) {
+                currentQuote = null;
+            } else {
+                currentOption.append(c);
+                hasOption = true;
+            }
+        }
+
+        if (hasOption) {
+            commandLineArguments.add(currentOption.toString());
+        }
+
+        return commandLineArguments.toArray(new String[commandLineArguments.size()]);
+    }
+
+    public boolean hasLogLevelDefined(String[] commandLineArguments) {
+        return hasCommandLineOptionsDefined(commandLineArguments, new CommandLineSearch() {
+            public boolean contains(String commandLine) {
+
+                return loggingCommandLineConverter.getLogLevel(commandLine) != null;
+            }
+        });
+    }
+
+    public boolean hasShowStacktraceDefined(String[] commandLineArguments) {
+        return hasCommandLineOptionsDefined(commandLineArguments, new CommandLineSearch() {
+            public boolean contains(String commandLine) {
+                return commandLineConverter.getShowStacktrace(commandLine) != null;
+            }
+        });
+    }
+
+    public interface CommandLineSearch {
+        public boolean contains(String commandLine);
+    }
+
+    /**
+     * This determines if one of the sought options is defined on the command line. We're only looking for options that are prefixed with a single '-'. Note: this IS case-sensitive.
+     *
+     * @param commandLineOptions the command line options
+     * @param commandLineSearch the options we're looking for. This won't have the prefixed dash in them (just "s", "d", etc.).
+     * @return true if one of the sought options exists in the
+     */
+    private boolean hasCommandLineOptionsDefined(String[] commandLineOptions, CommandLineSearch commandLineSearch) {
+        for (
+                int commandLineOptionsIndex = 0; commandLineOptionsIndex < commandLineOptions.length; commandLineOptionsIndex++) {
+            String commandLineOption = commandLineOptions[commandLineOptionsIndex];
+
+            if (commandLineOption != null && commandLineOption.length() > 1 && commandLineOption.charAt(0) == '-') {
+                //everything minus the dash must be equivalent to the sought option.
+                String remainder = commandLineOption.substring(1);
+
+                if (commandLineSearch.contains(remainder)) {
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * This appends additional command line options to a task name to generate a full command line option.
+     *
+     * @param task the task to execute
+     * @param additionCommandLineOptions the additional options
+     * @return a single command line string.
+     */
+    public static String appendAdditionalCommandLineOptions(TaskView task, String... additionCommandLineOptions) {
+        if (additionCommandLineOptions == null || additionCommandLineOptions.length == 0) {
+            return task.getFullTaskName();
+        }
+
+        StringBuilder builder = new StringBuilder(task.getFullTaskName());
+        builder.append(' ');
+
+        appendAdditionalCommandLineOptions(builder, additionCommandLineOptions);
+
+        return builder.toString();
+    }
+
+    /*
+   combines the tasks into a single command
+    */
+
+    public static String combineTasks(List<TaskView> tasks, String... additionCommandLineOptions) {
+        if (tasks == null || tasks.isEmpty()) {
+            return null;
+        }
+
+        StringBuilder builder = new StringBuilder();
+        Iterator<TaskView> iterator = tasks.iterator();
+        while (iterator.hasNext()) {
+            TaskView taskView = iterator.next();
+            builder.append(taskView.getFullTaskName());
+            if (iterator.hasNext()) {
+                builder.append(' ');
+            }
+        }
+
+        appendAdditionalCommandLineOptions(builder, additionCommandLineOptions);
+
+        return builder.toString();
+    }
+
+    public static void appendAdditionalCommandLineOptions(StringBuilder builder, String... additionCommandLineOptions) {
+        if (additionCommandLineOptions != null) {
+            for (int index = 0; index < additionCommandLineOptions.length; index++) {
+                String additionCommandLineOption = additionCommandLineOptions[index];
+                builder.append(additionCommandLineOption);
+                if (index + 1 < additionCommandLineOptions.length) {
+                    builder.append(' ');
+                }
+            }
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/PathParserPortion.java b/subprojects/ui/src/main/java/org/gradle/foundation/PathParserPortion.java
new file mode 100644
index 0000000..67f8d92
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/PathParserPortion.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+/**
+ * Small helper class that aids walking a full task path which can be multiple projects deep with a task on the end.
+ *
+ * @author mhunsicker
+ */
+public class PathParserPortion {
+    private String firstPart;
+    private String remainder;
+
+    public PathParserPortion(String path) {
+        if (path != null && path.length() > 0) {
+            if (path.startsWith(":"))    //skip the first character, if its a colon. This is optional and makes it absolute, vs relative.
+            {
+                path = path.substring(1);
+            }
+
+            int indexOfColon = path.indexOf(':');
+            if (indexOfColon == -1) {
+                firstPart = path;
+            } else {
+                firstPart = path.substring(0, indexOfColon);  //get everyting up to the colon
+                remainder = path.substring(indexOfColon + 1); //everything else
+            }
+        }
+    }
+
+    public String getFirstPart() {
+        return firstPart;
+    }
+
+    public String getRemainder() {
+        return remainder;
+    }
+
+    public boolean hasRemainder() {
+        return remainder != null;
+    }
+
+    public String toString() {
+        return firstPart + " -> " + remainder;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ProjectConverter.java b/subprojects/ui/src/main/java/org/gradle/foundation/ProjectConverter.java
new file mode 100644
index 0000000..fd3b2fc
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ProjectConverter.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+
+import java.util.*;
+
+/**
+ * This converts Gradle's projects into ProjectView objects. These can be safely reused unlike Gradle's projects.
+ *
+ * @author mhunsicker
+ */
+public class ProjectConverter {
+    private List<ProjectView> rootLevelResultingProjects = new ArrayList<ProjectView>();
+    private HashMap<Project, ProjectView> projectMap = new HashMap<Project, ProjectView>();
+    private final Logger logger = Logging.getLogger(ProjectConverter.class);
+
+    public ProjectConverter() {
+    }
+
+    /**
+     * Call this to convert the projects.
+     *
+     * @param rootProject the root project.
+     */
+    public List<ProjectView> convertProjects(Project rootProject) {
+        rootLevelResultingProjects.clear();
+        projectMap.clear();
+
+        addRootLevelProject(rootProject);
+
+        buildDependencies();
+
+        return rootLevelResultingProjects;
+    }
+
+    /**
+     * This adds the specified poject as a root level projects. It then adds all tasks and recursively adds all sub projects.
+     *
+     * @param rootLevelProject a root level project.
+     */
+    public void addRootLevelProject(Project rootLevelProject) {
+        ProjectView rootLevelProjectView = new ProjectView(null, rootLevelProject.getName(), rootLevelProject.getBuildFile(), rootLevelProject.getDescription());
+        projectMap.put(rootLevelProject, rootLevelProjectView);
+
+        rootLevelResultingProjects.add(rootLevelProjectView);
+
+        addSubProjects(rootLevelProject, rootLevelProjectView);
+
+        addTasks(rootLevelProject, rootLevelProjectView);
+
+        rootLevelProjectView.sortSubProjectsAndTasks();
+    }
+
+    /**
+     * Adds all sub projects of the specified GradleProject.
+     *
+     * @param parentProject the source parent project. Where we get the sub projects from.
+     * @param parentProjectView the destination of the sub projects from parentProject.
+     */
+    private void addSubProjects(Project parentProject, ProjectView parentProjectView) {
+        Collection<Project> subProjects = parentProject.getChildProjects().values();
+        for (Project subProject : subProjects) {
+            ProjectView projectView = new ProjectView(parentProjectView, subProject.getName(), subProject.getBuildFile(), subProject.getDescription());
+            projectMap.put(subProject, projectView);
+
+            addTasks(subProject, projectView);
+
+            projectView.sortSubProjectsAndTasks();
+
+            addSubProjects(subProject, projectView);
+        }
+    }
+
+    /**
+     * Adds the tasks from the project to the GradleProject.
+     *
+     * @param project the source parent project. Where we get the sub projects from.
+     * @param projectView the destination of the tasks from project.
+     */
+    private void addTasks(Project project, ProjectView projectView) {
+        List<String> defaultTasks = project.getDefaultTasks();
+        for (Task task : project.getTasks()) {
+            String taskName = task.getName();
+
+            boolean isDefault = defaultTasks.contains(taskName);
+
+            projectView.createTask(taskName, task.getDescription(), isDefault);
+        }
+    }
+
+    /**
+     * This sets the dependencies on the ProjectViews. We ask the gradle projects for the dependencies and then convert them to ProjectViews. Obviously, this must be done after converting all Projects
+     * to ProjectViews.
+     */
+    private void buildDependencies() {
+        for (Project project : projectMap.keySet()) {
+            ProjectView projectView = projectMap.get(project);
+
+            List<ProjectView> projectViewList = getProjectViews(project.getDependsOnProjects());
+
+            projectView.setDependsOnProjects(projectViewList);
+        }
+    }
+
+    /**
+     * Converts a set of projects to the existing project views. This does not actually instantiate new ProjectView objects.
+     */
+    private List<ProjectView> getProjectViews(Set<Project> projects) {
+        List<ProjectView> views = new ArrayList<ProjectView>();
+
+        Iterator<Project> projectIterator = projects.iterator();
+        while (projectIterator.hasNext()) {
+            Project project = projectIterator.next();
+            ProjectView projectView = projectMap.get(project);
+            if (projectView == null) {
+                logger.error("Missing project: " + project.getName());
+            } else {
+                views.add(projectView);
+            }
+        }
+
+        return views;
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ProjectView.java b/subprojects/ui/src/main/java/org/gradle/foundation/ProjectView.java
new file mode 100644
index 0000000..ff708a9
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ProjectView.java
@@ -0,0 +1,239 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import org.gradle.util.GUtil;
+
+import java.io.File;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Analog to gradle's Project but more light-weight and is better suited for using the gradle API from an IDE plugin. It is also easily serializable for passing across a socket. A project is a
+ * collection of source files that have tasks associated with them. The tasks build the project. Projects can contain other projects. This is immutable and ultimately comes from gradle files.
+ *
+ * @author mhunsicker
+ */
+public class ProjectView implements Comparable<ProjectView>, Serializable {
+    private final String name;
+    private final ProjectView parentProject;
+    // It is null for the root project.
+    private final List<ProjectView> subProjects = new ArrayList<ProjectView>();
+    private final List<TaskView> tasks = new ArrayList<TaskView>();
+    private final List<ProjectView> dependsOnProjects = new ArrayList<ProjectView>();
+
+    private final File buildFile;
+    private final String description;
+
+    /**
+     * Instantiates an immutable view of a project. This is only meant to be called internally whenever generating a hierarchy of projects and tasks.
+     */
+    /*package*/ ProjectView(ProjectView parentProject, String name, File buildFile, String description) {
+        this.parentProject = parentProject;
+        this.name = name;
+        this.buildFile = buildFile;
+        this.description = GUtil.elvis(description, "");
+        if (parentProject != null) {
+            parentProject.addSubProject(this);
+        }
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public File getBuildFile() {
+        return buildFile;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String toString() {
+        return name;
+    }
+
+    public ProjectView getParentProject() {
+        return parentProject;
+    }
+
+    public int compareTo(ProjectView otherProject) {
+        return name.compareTo(otherProject.name);
+    }
+
+    /**
+     * creates a task for this project. This is only meant to be called internally whenever generating a hierachy of projects and tasks.
+     */
+    /*package*/ void createTask(String name, String description, boolean isDefault) {
+        TaskView taskView = new TaskView(this, name, description, isDefault);
+        tasks.add(taskView);
+    }
+
+    /**
+     * Adds the specified project as a sub project of this project. This is only meant to be called internally whenever generating a hierachy of projects and tasks.
+     */
+    /*package*/ void addSubProject(ProjectView subProject) {
+        subProjects.add(subProject);
+    }
+
+    /**
+     * Sets the project that this project depends on. This is only meant to be called internally whenever generating a hierachy of projects and tasks.
+     */
+    /*package*/ void setDependsOnProjects(List<ProjectView> newDependsOnProjects) {
+        if (newDependsOnProjects == null) {
+            return;
+        }
+
+        this.dependsOnProjects.clear();
+        this.dependsOnProjects.addAll(newDependsOnProjects);
+    }
+
+    public List<ProjectView> getDependsOnProjects() {
+        return dependsOnProjects;
+    }
+
+    public List<TaskView> getTasks() {
+        return Collections.unmodifiableList(tasks);
+    }
+
+    public List<ProjectView> getSubProjects() {
+        return Collections.unmodifiableList(subProjects);
+    }
+
+    public void sortSubProjectsAndTasks() {
+        Collections.sort(tasks);
+        Collections.sort(subProjects);
+    }
+
+    public ProjectView getSubProject(String name) {
+        Iterator<ProjectView> iterator = subProjects.iterator();
+        while (iterator.hasNext()) {
+            ProjectView subProject = iterator.next();
+            if (name.equals(subProject.getName())) {
+                return subProject;
+            }
+        }
+
+        return null;
+    }
+
+    public TaskView getTask(String name) {
+        Iterator<TaskView> iterator = tasks.iterator();
+        while (iterator.hasNext()) {
+            TaskView task = iterator.next();
+            if (name.equals(task.getName())) {
+                return task;
+            }
+        }
+
+        return null;
+    }
+
+    public ProjectView getSubProjectFromFullPath(String fullProjectName) {
+        if (fullProjectName == null) {
+            return null;
+        }
+
+        PathParserPortion portion = new PathParserPortion(fullProjectName);
+
+        ProjectView subProject = getSubProject(portion.getFirstPart());
+
+        if (!portion.hasRemainder()) //if we have no remainder, then the path is just a sub project's name. We're done (even if subProject is null).
+        {
+            return subProject;
+        }
+
+        if (subProject == null) {
+            return null;
+        }   //the path may be invalid
+
+        return subProject.getSubProjectFromFullPath(portion.getRemainder());
+    }
+
+    /**
+     * This gets the task based on the given full path. This recursively calls this same function with sub projects until it finds the task or no matches are found.
+     *
+     * @param fullTaskName the full task name (root_project:sub_project:sub_sub_project:task.).
+     * @return the task or null if not found.
+     */
+    public TaskView getTaskFromFullPath(String fullTaskName) {
+        if (fullTaskName == null) {
+            return null;
+        }
+
+        PathParserPortion portion = new PathParserPortion(fullTaskName);
+        if (!portion.hasRemainder()) //if we have no remainder, then this is for a task.
+        {
+            return getTask(portion.getFirstPart());
+        }
+
+        ProjectView subProject = getSubProject(portion.getFirstPart());
+        if (subProject == null) {
+            return null;
+        }
+
+        //let the sub project figure it out.
+        return subProject.getTaskFromFullPath(portion.getRemainder());
+    }
+
+    /**
+     * This generates this project's full name. This is a colon-separated string of this project and its parent projects.
+     *
+     * Example: root_project:sub_project:sub_sub_project.
+     */
+    public String getFullProjectName() {
+        ProjectView ancestorProject = getParentProject();
+        if (ancestorProject == null) {
+            return "";
+        } //if we're the root, our full project name is nothing.
+
+        StringBuilder builder = new StringBuilder(name);
+        while (ancestorProject != null && ancestorProject.getParentProject() != null)   //we don't want to include the 'root' project
+        {
+            builder.insert(0, ancestorProject.getName() + ':');
+            ancestorProject = ancestorProject.getParentProject();
+        }
+
+        return builder.toString();
+    }
+
+    /**
+     * Builds a list of default tasks. These are defined by specifying
+     *
+     * defaultTasks 'task name'
+     *
+     * in the gradle file. There can be multiple default tasks. This only returns default tasks directly for this project and does not return them for subprojects.
+     *
+     * @return a list of default tasks or an empty list if none exist
+     */
+    public List<TaskView> getDefaultTasks() {
+        List<TaskView> defaultTasks = new ArrayList<TaskView>();
+
+        Iterator<TaskView> taskIterator = tasks.iterator();
+        while (taskIterator.hasNext()) {
+            TaskView taskView = taskIterator.next();
+            if (taskView.isDefault()) {
+                defaultTasks.add(taskView);
+            }
+        }
+
+        return defaultTasks;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/TaskView.java b/subprojects/ui/src/main/java/org/gradle/foundation/TaskView.java
new file mode 100644
index 0000000..1df6805
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/TaskView.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import org.gradle.util.GUtil;
+
+import java.io.Serializable;
+
+/**
+ * Analog to gradle's Task but more light-weight and better suited for using the gradle API from an IDE plugin. It is also easily serializable for passing across a socket. A task is something you can
+ * execute and is part of a project. This is immutable and ultimately comes from gradle files.
+ *
+ * @author mhunsicker
+ */
+public class TaskView implements Comparable<TaskView>, Serializable {
+    private ProjectView project;
+    private String name;
+    private String description;
+    private boolean isDefault;
+    //whether or not this is one of potentially many default tasks for its project.
+
+    /**
+     * Instantiates an immutable view of a task. This is only meant to be called internally whenever generating a hierarchy of projects and tasks.
+     */
+    /*package*/ TaskView(ProjectView project, String name, String description, boolean isDefault) {
+        this.project = project;
+        this.name = name;
+        this.isDefault = isDefault;
+        this.description = GUtil.elvis(description, "");
+    }
+
+    public ProjectView getProject() {
+        return project;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public boolean hasDescription() {
+        return !description.equals("");
+    }
+
+    /**
+     * returns whether or not this is a default task for its parent project. These are defined by specifying
+     *
+     * defaultTasks 'task name'
+     *
+     * in the gradle file. There can be multiple default tasks.
+     *
+     * @return true if its a default task, false if not.
+     */
+    public boolean isDefault() {
+        return isDefault;
+    }
+
+    public int compareTo(TaskView otherTask) {
+        //sort by project name first, then by task name.
+        int projectComparison = project.compareTo(otherTask.getProject());
+        if (projectComparison != 0) {
+            return projectComparison;
+        }
+
+        return name.compareTo(otherTask.name);
+    }
+
+    public String toString() {
+        return name;
+    }
+
+    /**
+     * This generates this task's full name. This is a colon-separated string of this task and its parent projects.
+     *
+     * Example: root_project:sub_project:sub_sub_project:task.
+     */
+    public String getFullTaskName() {
+        return project.getFullProjectName() + ':' + name;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/common/ListReorderer.java b/subprojects/ui/src/main/java/org/gradle/foundation/common/ListReorderer.java
new file mode 100644
index 0000000..c2c86cd
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/common/ListReorderer.java
@@ -0,0 +1,344 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.common;
+
+import java.util.*;
+
+/**
+ * Utility class that allows lists to be reordered.
+ *
+ * @author Chris Hampton
+ */
+public class ListReorderer {
+    /**
+     * Moves the object down one position in the group list.
+     *
+     * @param sourceList The list whose elements we want to reorder.
+     * @param object The object to move.
+     */
+    public static boolean moveBefore(List sourceList, Object object) {
+        // Get the old index of the object
+        int previousIndex = sourceList.indexOf(object);
+        // If the index of the object is 0 it can't go any lower. If it's
+        // -1 it's not even in the list. In these cases we do nothing.
+        if (previousIndex < 1) {
+            return false;
+        }
+        // Remove the object from it's old position in the list, this shifts all
+        // elements above it down by 1
+        sourceList.remove(object);
+        // Add the object back at 1 less than it's original index, the old
+        // element at this position is shifted to right in the lise
+        sourceList.add(previousIndex - 1, object);
+        // If we get here we assume we moved it.
+        return true;
+    }
+
+    /**
+     * Moves a list of elements in this list while keeping their relative positions. When the first element reaches the beginning it goes no further and the other elements in the list will continue to
+     * be shifted on subsequent calls as long as they don't overwrite previously moved elements. This means that elements with other elements between them will continue move with the same distance
+     * between them but will 'bunch up' toward the beginning of the list.
+     *
+     * NOTE: The order of the list of moved elements is important. They have to be added in order from lowest index to highest.
+     *
+     * @param sourceList The list whose elements we want to reorder.
+     * @param objectsToMove List of elements to move.
+     */
+    public static void moveBefore(List sourceList, List objectsToMove) {
+        sortMoveListByRelativeOrder(sourceList, objectsToMove);
+        // Create a new list to put elements in we try to move
+        List triedToMove = new ArrayList();
+        // Now iterate through the elements to move and attempt to move them
+        Iterator iterator = objectsToMove.iterator();
+        while (iterator.hasNext()) {
+            // Get the next object to move
+            Object objectToMove = iterator.next();
+            // Get the index of the object to move
+            int currentPosition = sourceList.indexOf(objectToMove);
+            // Only move the element if it's not already at the front of the list
+            if (currentPosition > 0) {
+                // Get the element at the position we want to move to and make sure it's not
+                // an element in the list that we'vd already moved
+                Object occupyingObject = sourceList.get(currentPosition - 1);
+                if (currentPosition < sourceList.size() && !triedToMove.contains(occupyingObject)) {
+                    moveBefore(sourceList, objectToMove);
+                }
+            }
+            // If we get here we have at least tried to move the object,
+            // so stick it in the tried list
+            triedToMove.add(objectToMove);
+        }
+    }
+
+    /**
+     * Moves a list of objects to a new index location.
+     *
+     * @param sourceList The list where the move will occur.
+     * @param moveList The objects to move.
+     * @param index The object's new location in the list.
+     */
+    public static void moveTo(List sourceList, List moveList, int index) {
+        // First make sure the move is valid
+        if (index < 0 || index >= sourceList.size()) {
+            return;
+        }
+        // Store the object at the index to move to
+        Object moveBeforeObject = sourceList.get(index);
+
+        //This fixes a bug. This happens if the user selects things and moves them to an index where something is already selected. I select 1, 2, and 4 and I say move to 2. 2 is already selected. This makes no sense, but its happened in the field.
+        if (moveList.contains(moveBeforeObject)) //just remove the item from the move list.
+        {
+            List newMoveList = new ArrayList(
+                    moveList);   //we don't want to actually affect the move list. Callers use it for visually selecting items after the move. So we'll make a duplicate and just recursively call ourselves again.
+            newMoveList.remove(moveBeforeObject);
+            moveTo(sourceList, newMoveList, index + 1);   //skip over the one we took out
+            return;
+        }
+
+        // Remove the object from it's old position
+        sourceList.removeAll(moveList);
+        // Get the new index value after shifts
+        index = sourceList.indexOf(moveBeforeObject);
+
+        //make sure the index is within bounds.
+        if (index < 0) {
+            index = 0;
+        }
+        if (index > sourceList.size() - 1) {
+            index = sourceList.size() - 1;
+        }
+
+        // Add the element to the new location
+        sourceList.addAll(index, moveList);
+    }
+
+    /**
+     * Moves an object to the front of the list.
+     *
+     * @param sourceList The list the object is in.
+     * @param object The object to move.
+     * @return True if the object was in the list and it was moved.
+     */
+    public static boolean moveToFront(List sourceList, Object object) {
+        boolean moved = false;
+        // If we can remove it, then it was in the list
+        if (sourceList.remove(object)) {
+            sourceList.add(0, object); // This is a void method, so it doesn't set our flag
+            moved = true;
+        }
+
+        return moved;
+    }
+
+    /**
+     * Moves a list of objects to the front of the list.
+     *
+     * @param sourceList The list the object is in.
+     * @param objectsToMove The object to move.
+     */
+    public static void moveToFront(List sourceList, List objectsToMove) {
+        sortMoveListByRelativeOrder(sourceList, objectsToMove);
+        for (int i = objectsToMove.size() - 1; i >= 0; i--) {
+            Object object = objectsToMove.get(i);
+            if (sourceList.remove(object)) {
+                sourceList.add(0, object);
+            }
+        }
+    }
+
+    /**
+     * Moves the object up one index position in the list.
+     *
+     * @param sourceList The list whose elements we want to reorder.
+     * @param object The object to move.
+     */
+    public static boolean moveAfter(List sourceList, Object object) {
+        // Get the old index of the object
+        int previousIndex = sourceList.indexOf(object);
+        // If the index of the object is 0 it can't go any higher. If it's
+        // -1 it's not even in the list. In these cases we do nothing.
+        if (previousIndex >= sourceList.size() - 1 || previousIndex == -1) {
+            return false;
+        }
+        // Remove the object from it's old position in the list, this shifts all
+        // elements above it down by 1
+        sourceList.remove(object);
+        // Add the object back at 2 higher than it's original index, if we only
+        // add one than we just place it back where it was since everything shifted
+        // down when we removed it
+        sourceList.add(previousIndex + 1, object);
+        // If we get here we assume we moved it.
+        return true;
+    }
+
+    /**
+     * Moves the objects in the list up one index position in this list while maintaining their relative position. When an element reaches the end of the list it can go no farther, but the other
+     * elements continue to move each call without overwriting previously moved elements. This causes moved elements to 'bunch up' at the end of the list.
+     *
+     * NOTE: The order of the list of moved elements is important. They have to be added in order from lowest index to highest.
+     *
+     * @param sourceList The list whose elements we want to reorder.
+     * @param objectsToMove List of elements to move.
+     */
+    public static void moveAfter(List sourceList, List objectsToMove) {
+        sortMoveListByRelativeOrder(sourceList, objectsToMove);
+        List triedToMove = new ArrayList();
+        // Since we are moving elements to a greater index in the list,
+        // we iterate through the list backwards to move the highest indexed
+        // element first
+        for (int i = objectsToMove.size() - 1; i >= 0; i--) {
+            Object objectToMove = objectsToMove.get(i);
+            // Get the index of the object to move
+            int currentPosition = sourceList.indexOf(objectToMove);
+            // Make sure the element we want to move isn't already at the end of
+            // the list
+            if (currentPosition < sourceList.size() - 1) {
+                // Now get the index of the elment occupying the spot we want
+                // to move to and only move the current objectToMove if it
+                // does not overwite a previously moved element
+                Object occupyingObject = sourceList.get(currentPosition + 1);
+                if (!triedToMove.contains(occupyingObject)) {
+                    moveAfter(sourceList, objectToMove);
+                }
+            }
+            // If we get here we have at least tried to move the object,
+            // so stick it in the tried list
+            triedToMove.add(objectToMove);
+        }
+    }
+
+    /**
+     * Moves an object to the back of the list.
+     *
+     * @param sourceList The list the object is in.
+     * @param object The object to move.
+     * @return True if the object was in the list and it was moved.
+     */
+    public static boolean moveToBack(List sourceList, Object object) {
+        boolean moved = false;
+
+        // If we can remove it, then it was in the list
+        if (sourceList.remove(object)) {
+            moved = sourceList.add(object);
+        }
+
+        return moved;
+    }
+
+    /**
+     * Moves a list of objects to the front of the list.
+     *
+     * @param sourceList The list the object is in.
+     * @param objectsToMove The object to move.
+     */
+    public static void moveToBack(List sourceList, List objectsToMove) {
+        sortMoveListByRelativeOrder(sourceList, objectsToMove);
+        for (int i = 0; i < objectsToMove.size(); i++) {
+            Object object = objectsToMove.get(i);
+            if (sourceList.remove(object)) {
+                sourceList.add(object);
+            }
+        }
+    }
+
+    /**
+     * Sorts a child list by position in a parent list to preserve relative ordering of the elements.
+     *
+     * @param parentList .
+     * @param childList .
+     */
+    public static void sortMoveListByRelativeOrder(final List parentList, List childList) {
+        Collections.sort(childList, new Comparator() {
+            public int compare(Object o, Object o1) {
+                int index = parentList.indexOf(o);
+                int index1 = parentList.indexOf(o1);
+                return (index < index1) ? -1 : (index > index1) ? 1 : 0;
+            }
+        });
+    }
+
+    /**
+     * Returns true if all the elements of the check list are at the end of the source list.
+     *
+     * @param sourceList .
+     * @param checkList .
+     * @return .
+     */
+    public static boolean allElementsInFront(List sourceList, List checkList) {
+        // Quick check, if the source list doesn't contain all elements of the checklist,
+        // abort and return false
+        if (!sourceList.containsAll(checkList)) {
+            return false;
+        }
+        // Get the last index of the source list
+        int sourceIndex = checkList.size();
+        // Iterate thru the check list. Find the index of the element
+        // in the source list; and check it's index against the index
+        // we should be on to match the source.
+        for (int index = 0; index < checkList.size(); index++) {
+            Object element = checkList.get(index);
+            int checkIndex = sourceList.indexOf(element);
+            if (checkIndex >= sourceIndex) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    public static boolean allElementsInBack(List sourceList, List checkList) {
+        // Quick check, if the source list doesn't contain all elements of the checklist,
+        // abort and return false
+        if (!sourceList.containsAll(checkList)) {
+            return false;
+        }
+        // Get the last index of the source list
+        int sourceIndex = sourceList.size() - checkList.size();
+        // Iterate thru the check list. Find the index of the element
+        // in the source list; and check it's index against the index
+        // we should be on to match the source.
+        for (int index = checkList.size() - 1; index >= 0; index--) {
+            Object element = checkList.get(index);
+            int checkIndex = sourceList.indexOf(element);
+            if (checkIndex < sourceIndex) {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    /**
+     * This is mainly used for after doing a move. It gives you the current index of all the moved elements. This is useful for UIs that need to reselect the new items.
+     *
+     * @param sourceList the source list
+     * @param objectsToMove the elements to move
+     * @return an integer array of the items to select.
+     */
+    public static int[] getIndices(List sourceList, List objectsToMove) {
+        int[] newIndices = new int[objectsToMove.size()];
+
+        for (int index = 0; index < objectsToMove.size(); index++) {
+            Object elementToMove = objectsToMove.get(index);
+            int sourceIndexOfElement = sourceList.indexOf(elementToMove);
+
+            newIndices[index] = sourceIndexOfElement;
+        }
+
+        return newIndices;
+    }
+}
+
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/common/ObserverLord.java b/subprojects/ui/src/main/java/org/gradle/foundation/common/ObserverLord.java
new file mode 100644
index 0000000..4b114cf
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/common/ObserverLord.java
@@ -0,0 +1,168 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.common;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+
+import javax.swing.*;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a Swing-friendly observer manager class. Swing-friendly, but can be used by non-Swing classes. Its meant to abstract the fact that you probably need to be in the Event Dispatch Thread when
+ * receiving notifications inside Swing-related classes.
+ *
+ * To use this class, add it as a member variable (don't derive from this!) of a class that you want to be observered. You can have multiple instances of this if you want to allow for a finer
+ * granularity of observing (similar to components having mouse move listeners and mouse (click) listeners). Next, create an interface for the observers. Now implement add and remove observer
+ * functions that call the add and remove functions here. Lastly, implement ObserverNotification and have it call the aforementioned observer interface appropriately. Note: you should actually
+ * implement ObserverNotification for each "message" you want to send. Example: One that would tell a view a node was added. One that would tell a view a node was deleted, etc. While you have multiple
+ * notification classes, you only need 1 (or few) actual observer interfaces, containing all the possible functions called by all notifications.
+ *
+ * @author mhunsicker
+ */
+
+public class ObserverLord<E> {
+    private List<E> regularObservers = new ArrayList<E>();
+    private List<E> eventQueueObservers = new ArrayList<E>();
+
+    private final Logger logger = Logging.getLogger(ObserverLord.class);
+
+    /**
+     * Implement this for each call to ObserverLord.notifyObservers. The notify function usually just has a single call to a function on the observer.
+     *
+     * Example:
+     * <pre>
+     * public void notify( MyObserver observer )
+     * {
+     * observer.myfunction();
+     * }
+     * </pre>
+     */
+    public interface ObserverNotification<E> {
+        public void notify(E observer);
+    }
+
+    /**
+     * Adds an observer to our messaging system.
+     *
+     * <!       Name        Description  >
+     *
+     * @param observer observer to add.
+     * @param inEventQueue true to notify this observer only in the event queue, false to notify it immediately.
+     */
+
+    public void addObserver(E observer, boolean inEventQueue) {
+        if (!inEventQueue) {
+            addIfNew(observer, regularObservers);
+        } else {
+            addIfNew(observer, eventQueueObservers);
+        }
+    }
+
+    private void addIfNew(E observer, List<E> destinationList) {
+        if (!destinationList.contains(observer)) {
+            destinationList.add(observer);
+        }
+    }
+
+    /**
+     * Deletes an observer in our messaging system.
+     *
+     * <!       Name     Dir   Description  >
+     *
+     * @param observer in,
+     */
+    public void removeObserver(E observer) {
+        regularObservers.remove(observer);
+        eventQueueObservers.remove(observer);
+    }
+
+    public void removeAllObservers() {
+        regularObservers.clear();
+        eventQueueObservers.clear();
+    }
+
+    /**
+     * Messaging method that handles telling each observer that something happen to the observable.
+     *
+     * <!       Name        Dir   Description  >
+     *
+     * @param notification in,  notification sent to the observer
+     */
+    public void notifyObservers(ObserverNotification<E> notification) {
+        //notify all the non-event queue observers now.
+        notifyObserversInternal(regularObservers, notification);
+        notifyObserversInEventQueueThread(notification);
+    }
+
+    /**
+     * Here is where we notify all the event queue observers. To notify the event queue observers we have to make sure it occurs in the event queue thread. If we're not in the event queue, we'll wrap
+     * it in an invoke and wait.
+     *
+     * <!       Name        Dir   Description  > <!       Name        Dir   Description  >
+     *
+     * @param notification in,  notification sent to the observer
+     */
+    private void notifyObserversInEventQueueThread(final ObserverNotification notification) {
+        if (eventQueueObservers.size() == 0) //if we have no event queue observsers, we're done
+        {
+            return;
+        }
+
+        if (EventQueue.isDispatchThread()) {
+            notifyObserversInternal(eventQueueObservers, notification);
+        } else {
+            try {
+                SwingUtilities.invokeAndWait(new Runnable() {
+                    public void run() {
+                        notifyObserversInternal(eventQueueObservers, notification);
+                    }
+                });
+            } catch (Exception e) {
+                logger.error("notifyObservers exception", e);
+            }
+        }
+    }
+
+    /**
+     * The internal mechanism that actually notifies the observers. We just iterate though each observer and pass it to the notification mechanism.
+     *
+     *
+     * <!       Name         Dir  Description  >
+     *
+     * @param observers in,  objects that changed (observable)
+     * @param notification in,  notification sent to the observer
+     */
+    private void notifyObserversInternal(List<E> observers, ObserverNotification notification) {
+        Iterator<E> iterator = observers.iterator();
+        while (iterator.hasNext()) {
+            E observer = iterator.next();
+            try {
+                notification.notify(observer);
+            } catch (Exception e) //this is so an error in the notification doesn't stop the entire process.
+            {
+                logger.error("error notifying observers", e);
+            }
+        }
+    }
+
+    public String toString() {
+        return regularObservers.size() + " regular observers, " + eventQueueObservers.size() + " event queue observers";
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/common/ReorderableList.java b/subprojects/ui/src/main/java/org/gradle/foundation/common/ReorderableList.java
new file mode 100644
index 0000000..6b4521a
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/common/ReorderableList.java
@@ -0,0 +1,525 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.common;
+
+import java.util.*;
+
+/*
+   Class to store a list whose elements can be reordered. This list is
+   meant to be generic so it can be reused.
+
+   The copy method allows for a 'deep copy' of all the list elements. For the
+   copy to work properly, all elements stored in the list must implement the
+   Copyable interface.
+
+   Unfortunately, we can't use Java's Object.clone() method because it is
+   protected and must be overridden as public to be used. So we can't call
+   obj.clone() on an Object instance.
+
+   @author champton
+*/
+
+public class ReorderableList<E> implements List<E> {
+    /**
+     * Internal list to store the real elements.
+     */
+    protected List<E> elements;
+
+    /*
+       Parameterized Constructor. This constructor uses an ArrayList by default.
+       Use this constructor if iterating through the elements in order is a
+       high priority.
+    */
+
+    public ReorderableList() {
+        // I chose ArrayList over LinkedList simply because of performance.
+        // LinkedLists are supposed to have better performance when you move
+        // the elements around, as you can do to this list when it is being
+        // edited. But editing will happen only rarely and the list will
+        // be used heavily when displaying the elements to the user.
+        elements = new ArrayList<E>();
+    }
+
+    /*
+       Parameterized Constructor. This is an alternative where the list-type
+       can be passed in. If reordering the list occurs often and has a higher
+       priority than in-order iteration. A LinkedList() can be passed in for
+       the elementList parameter.
+
+       CAUTION: When using this constructor you should probably make the call
+                like the following to prevent the list from being modified
+                outside of the ReorderableList instance:
+
+                List list = ReorderableList(  new LinkedList() );
+
+       @param  elementList The list instance used to store elements.
+    */
+
+    public ReorderableList(List<E> elementList) {
+        this.elements = elementList;
+    }
+
+    /*
+       Add a object to this ReorderableList.
+       @param  object   The object to add.
+    */
+
+    public boolean add(E object) {
+        return elements.add(object);
+    }
+
+    /*
+       Retrieve an object from the ReorderableList.
+       @param  index      The position of the element to retrieve.
+       @return Object - element in the list.
+    */
+
+    public E get(int index) {
+        return elements.get(index);
+    }
+
+    /*
+       Add another list to this ReorderableList.
+       @param  list   The object to add.
+    */
+
+    public void addAll(List<E> list) {
+        elements.addAll(list);
+    }
+
+    /*
+       Remove a object from the ReorderableList.
+       @param  object   The object to remove.
+       @return True if the ReorderableList contained the object, false
+               otherwise.
+    */
+
+    public boolean remove(Object object) {
+        return elements.remove(object);
+    }
+
+    /*
+       Retrieves the index of the element in the ReorderableList.
+       @param  object   The object whose index we want.
+       @return The index of the object in the list or -1 if the object is
+               not contained in the list.
+    */
+
+    public int indexOf(Object object) {
+        return elements.indexOf(object);
+    }
+
+    /*
+       Returns the number of elements in this ReorderableList.
+       @return The number of elements as an int.
+    */
+
+    public int size() {
+        return elements.size();
+    }
+
+    /*
+       Test to see if the ReorderableList has elements or not.
+       @return True if there are no elements in the list, false otherwise.
+    */
+
+    public boolean isEmpty() {
+        return elements.isEmpty();
+    }
+
+    /*
+       Moves the object down one position in the list. If the object reaches the
+       beginning of the list it obviously can go no farther so subsequent calls
+       will have no effect.
+       @param  objectToMove    The object to move.
+       @return Returns true if the object was in the list and was moved.
+    */
+
+    public boolean moveBefore(Object objectToMove) {
+        return ListReorderer.moveBefore(elements, objectToMove);
+    }
+
+    /*
+       Moves a list of elements in this list while keeping their relative positions.
+       When the first element reaches the beginning it goes no further and the
+       other elements in the list will continue to be shifted on subsequent calls
+       as long as they don't overwrite previously moved elements. This means that
+       elements with other elements between them will continue move with the same
+       distance between them but will 'bunch up' toward the beginning of the
+       list.
+
+       NOTE: The order of the list of moved elements is important. They have
+             to be added in order from lowest index to highest.
+
+       @param  elementsToMove       List of elements to move.
+    */
+
+    public void moveBefore(List elementsToMove) {
+        ListReorderer.moveBefore(elements, elementsToMove);
+    }
+
+    /*
+       Move a list of objects to a new specified location.
+       @param  objectsToMove The objects to move.
+       @param  newIndex     The new location of the object.
+    */
+
+    public void moveTo(List objectsToMove, int newIndex) {
+        ListReorderer.moveTo(elements, objectsToMove, newIndex);
+    }
+
+    /*
+       Moves a single object to the front of the list.
+       @param  objectToMove The object to move in the list.
+       @return True if the object was moved, false otherwise.
+    */
+
+    public boolean moveToFront(Object objectToMove) {
+        return ListReorderer.moveToFront(elements, objectToMove);
+    }
+
+    /*
+       Moves a list of objects to the front of the list.
+       @param  elementsToMove  The list of objects to move in the list.
+    */
+
+    public void moveToFront(List elementsToMove) {
+        ListReorderer.moveToFront(elements, elementsToMove);
+    }
+
+    /*
+       Moves the object up one index position higher in the list. If the object
+       reaches the end of the list it obviously can go no farther so subsequent
+       calls will have no effect.
+       @param  objectToMove    The object to move.
+       @return Returns true if the object was in the list and was moved.
+    */
+
+    public boolean moveAfter(Object objectToMove) {
+        return ListReorderer.moveAfter(elements, objectToMove);
+    }
+
+    /*
+       Moves the objects in the list up one index position in this list while
+       maintaining their relative position. When an element reaches the end
+       of the list it can go no farther, but the other elements continue to
+       move each call without overwriting previously moved elements. This
+       causes moved elements to 'bunch up' at the end of the list.
+
+       NOTE: The order of the list of moved elements is important. They have
+             to be added in order from lowest index to highest.
+
+       @param  elementsToMove     List of elements to move.
+    */
+
+    public void moveAfter(List elementsToMove) {
+        ListReorderer.moveAfter(elements, elementsToMove);
+    }
+
+    /*
+       Moves an object to the back of the list.
+       @param  objectToMove The object to move.
+       @return Returns true if the object was in the list and was moved.
+    */
+
+    public boolean moveToBack(Object objectToMove) {
+        return ListReorderer.moveToBack(elements, objectToMove);
+    }
+
+    /*
+       Moves a list of objects to the back of the list.
+       @param  elementsToMove The list of objects to move.
+    */
+
+    public void moveToBack(List elementsToMove) {
+        ListReorderer.moveToBack(elements, elementsToMove);
+    }
+
+    /*
+       @param  checkList  The list of elements to check against our ordered list.
+       @return True if the list of passed in elements are all at the front of the
+               list, false otherwise.
+    */
+
+    public boolean allElementsInFront(List checkList) {
+        return ListReorderer.allElementsInFront(elements, checkList);
+    }
+
+    /*
+       @param  checkList  The list of elements to check against our ordered list.
+       @return True if the list of passed in elements are all at the back of the
+               list, false otherwise.
+    */
+
+    public boolean allElementsInBack(List checkList) {
+        return ListReorderer.allElementsInBack(elements, checkList);
+    }
+
+    /*
+       Returns an Iterator object to iterate through the elements in the
+       ReorderableList.
+       @return Iterator of Objects. It's up to the caller to cast the elements
+               to the appropriate type.
+    */
+
+    public Iterator<E> iterator() {
+        return elements.iterator();
+    }
+
+    ////////////////////////////////////////////////////////////////////////////
+    //////////////////////////// List Implementation ///////////////////////////
+    ////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * Removes all of the elements from this list (optional operation).  This list will be empty after this call returns (unless it throws an exception).
+     *
+     * @throws UnsupportedOperationException if the <tt>clear</tt> method is not supported by this list.
+     */
+    public void clear() {
+        elements.clear();
+    }
+
+    /**
+     * Returns an array containing all of the elements in this list in proper sequence.  Obeys the general contract of the <tt>Collection.toArray</tt> method.
+     *
+     * @return an array containing all of the elements in this list in proper sequence.
+     */
+    public Object[] toArray() {
+        return elements.toArray();
+    }
+
+    /**
+     * Removes the element at the specified position in this list (optional operation).  Shifts any subsequent elements to the left (subtracts one from their indices).  Returns the element that was
+     * removed from the list.
+     *
+     * @param index the index of the element to removed.
+     * @return the element previously at the specified position.
+     * @throws UnsupportedOperationException if the <tt>remove</tt> method is not supported by this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).
+     */
+    public E remove(int index) {
+        return elements.remove(index);
+    }
+
+    /**
+     * Inserts the specified element at the specified position in this list (optional operation).  Shifts the element currently at that position (if any) and any subsequent elements to the right (adds
+     * one to their indices).
+     *
+     * @param index index at which the specified element is to be inserted.
+     * @param element element to be inserted.
+     * @throws UnsupportedOperationException if the <tt>add</tt> method is not supported by this list.
+     * @throws ClassCastException if the class of the specified element prevents it from being added to this list.
+     * @throws NullPointerException if the specified element is null and this list does not support null elements.
+     * @throws IllegalArgumentException if some aspect of the specified element prevents it from being added to this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).
+     */
+    public void add(int index, E element) {
+        elements.add(index, element);
+    }
+
+    /**
+     * Returns the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element. More formally, returns the highest index <tt>i</tt> such that
+     * <tt>(o==null ? get(i)==null : o.equals(get(i)))</tt>, or -1 if there is no such index.
+     *
+     * @param object element to search for.
+     * @return the index in this list of the last occurrence of the specified element, or -1 if this list does not contain this element.
+     * @throws ClassCastException if the type of the specified element is incompatible with this list (optional).
+     * @throws NullPointerException if the specified element is null and this list does not support null elements (optional).
+     */
+    public int lastIndexOf(Object object) {
+        return elements.lastIndexOf(object);
+    }
+
+    /**
+     * Returns <tt>true</tt> if this list contains the specified element. More formally, returns <tt>true</tt> if and only if this list contains at least one element <tt>e</tt> such that
+     * <tt>(o==null ? e==null : o.equals(e))</tt>.
+     *
+     * @param object element whose presence in this list is to be tested.
+     * @return <tt>true</tt> if this list contains the specified element.
+     * @throws ClassCastException if the type of the specified element is incompatible with this list (optional).
+     * @throws NullPointerException if the specified element is null and this list does not support null elements (optional).
+     */
+    public boolean contains(Object object) {
+        return elements.contains(object);
+    }
+
+    /**
+     * Inserts all of the elements in the specified collection into this list at the specified position (optional operation).  Shifts the element currently at that position (if any) and any subsequent
+     * elements to the right (increases their indices).  The new elements will appear in this list in the order that they are returned by the specified collection's iterator.  The behavior of this
+     * operation is unspecified if the specified collection is modified while the operation is in progress.  (Note that this will occur if the specified collection is this list, and it's nonempty.)
+     *
+     * @param index index at which to insert first element from the specified collection.
+     * @param c elements to be inserted into this list.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * @throws UnsupportedOperationException if the <tt>addAll</tt> method is not supported by this list.
+     * @throws ClassCastException if the class of one of elements of the specified collection prevents it from being added to this list.
+     * @throws NullPointerException if the specified collection contains one or more null elements and this list does not support null elements, or if the specified collection is <tt>null</tt>.
+     * @throws IllegalArgumentException if some aspect of one of elements of the specified collection prevents it from being added to this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).
+     */
+    public boolean addAll(int index, Collection<? extends E> c) {
+        return elements.addAll(index, c);
+    }
+
+    /**
+     * Appends all of the elements in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator (optional operation).  The behavior
+     * of this operation is unspecified if the specified collection is modified while the operation is in progress.  (Note that this will occur if the specified collection is this list, and it's
+     * nonempty.)
+     *
+     * @param c collection whose elements are to be added to this list.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * @throws UnsupportedOperationException if the <tt>addAll</tt> method is not supported by this list.
+     * @throws ClassCastException if the class of an element in the specified collection prevents it from being added to this list.
+     * @throws NullPointerException if the specified collection contains one or more null elements and this list does not support null elements, or if the specified collection is <tt>null</tt>.
+     * @throws IllegalArgumentException if some aspect of an element in the specified collection prevents it from being added to this list.
+     * @see #add(Object)
+     */
+    public boolean addAll(Collection<? extends E> c) {
+        return elements.addAll(c);
+    }
+
+    /**
+     * Returns <tt>true</tt> if this list contains all of the elements of the specified collection.
+     *
+     * @param c collection to be checked for containment in this list.
+     * @return <tt>true</tt> if this list contains all of the elements of the specified collection.
+     * @throws ClassCastException if the types of one or more elements in the specified collection are incompatible with this list (optional).
+     * @throws NullPointerException if the specified collection contains one or more null elements and this list does not support null elements (optional).
+     * @throws NullPointerException if the specified collection is <tt>null</tt>.
+     * @see #contains(Object)
+     */
+    public boolean containsAll(Collection<?> c) {
+        return elements.containsAll(c);
+    }
+
+    /**
+     * Removes from this list all the elements that are contained in the specified collection (optional operation).
+     *
+     * @param c collection that defines which elements will be removed from this list.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * @throws UnsupportedOperationException if the <tt>removeAll</tt> method is not supported by this list.
+     * @throws ClassCastException if the types of one or more elements in this list are incompatible with the specified collection (optional).
+     * @throws NullPointerException if this list contains one or more null elements and the specified collection does not support null elements (optional).
+     * @throws NullPointerException if the specified collection is <tt>null</tt>.
+     * @see #remove(Object)
+     * @see #contains(Object)
+     */
+    public boolean removeAll(Collection<?> c) {
+        return elements.removeAll(c);
+    }
+
+    /**
+     * Retains only the elements in this list that are contained in the specified collection (optional operation).  In other words, removes from this list all the elements that are not contained in
+     * the specified collection.
+     *
+     * @param c collection that defines which elements this set will retain.
+     * @return <tt>true</tt> if this list changed as a result of the call.
+     * @throws UnsupportedOperationException if the <tt>retainAll</tt> method is not supported by this list.
+     * @throws ClassCastException if the types of one or more elements in this list are incompatible with the specified collection (optional).
+     * @throws NullPointerException if this list contains one or more null elements and the specified collection does not support null elements (optional).
+     * @throws NullPointerException if the specified collection is <tt>null</tt>.
+     * @see #remove(Object)
+     * @see #contains(Object)
+     */
+    public boolean retainAll(Collection<?> c) {
+        return elements.retainAll(c);
+    }
+
+    /**
+     * Returns a view of the portion of this list between the specified <tt>fromIndex</tt>, inclusive, and <tt>toIndex</tt>, exclusive.  (If <tt>fromIndex</tt> and <tt>toIndex</tt> are equal, the
+     * returned list is empty.) The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa. The returned list supports all of
+     * the optional list operations supported by this list.<p> <p/> This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). Any operation that
+     * expects a list can be used as a range operation by passing a subList view instead of a whole list.  For example, the following idiom removes a range of elements from a list:
+     * <pre>
+     *     list.subList(from, to).clear();
+     * </pre>
+     * Similar idioms may be constructed for <tt>indexOf</tt> and <tt>lastIndexOf</tt>, and all of the algorithms in the <tt>Collections</tt> class can be applied to a subList.<p> <p/> The semantics
+     * of the list returned by this method become undefined if the backing list (i.e., this list) is <i>structurally modified</i> in any way other than via the returned list.  (Structural
+     * modifications are those that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may yield incorrect results.)
+     *
+     * @param fromIndex low endpoint (inclusive) of the subList.
+     * @param toIndex high endpoint (exclusive) of the subList.
+     * @return a view of the specified range within this list.
+     * @throws IndexOutOfBoundsException for an illegal endpoint index value (fromIndex < 0 || toIndex > size || fromIndex > toIndex).
+     */
+    public List<E> subList(int fromIndex, int toIndex) {
+        return elements.subList(fromIndex, toIndex);
+    }
+
+    /**
+     * Returns a list iterator of the elements in this list (in proper sequence).
+     *
+     * @return a list iterator of the elements in this list (in proper sequence).
+     */
+    public ListIterator<E> listIterator() {
+        return elements.listIterator();
+    }
+
+    /**
+     * Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.  The specified index indicates the first element that would be
+     * returned by an initial call to the <tt>next</tt> method.  An initial call to the <tt>previous</tt> method would return the element with the specified index minus one.
+     *
+     * @param index index of first element to be returned from the list iterator (by a call to the <tt>next</tt> method).
+     * @return a list iterator of the elements in this list (in proper sequence), starting at the specified position in this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index > size()).
+     */
+    public ListIterator<E> listIterator(int index) {
+        return elements.listIterator(index);
+    }
+
+    /**
+     * Replaces the element at the specified position in this list with the specified element (optional operation).
+     *
+     * @param index index of element to replace.
+     * @param element element to be stored at the specified position.
+     * @return the element previously at the specified position.
+     * @throws UnsupportedOperationException if the <tt>set</tt> method is not supported by this list.
+     * @throws ClassCastException if the class of the specified element prevents it from being added to this list.
+     * @throws NullPointerException if the specified element is null and this list does not support null elements.
+     * @throws IllegalArgumentException if some aspect of the specified element prevents it from being added to this list.
+     * @throws IndexOutOfBoundsException if the index is out of range (index < 0 || index >= size()).
+     */
+    public E set(int index, E element) {
+        return elements.set(index, element);
+    }
+
+    /**
+     * Returns an array containing all of the elements in this list in proper sequence; the runtime type of the returned array is that of the specified array.  Obeys the general contract of the
+     * <tt>Collection.toArray(Object[])</tt> method.
+     *
+     * @param objectArray the array into which the elements of this list are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose.
+     * @return an array containing the elements of this list.
+     * @throws ArrayStoreException if the runtime type of the specified array is not a supertype of the runtime type of every element in this list.
+     * @throws NullPointerException if the specified array is <tt>null</tt>.
+     */
+    public <T> T[] toArray(T[] objectArray) {
+        return elements.toArray(objectArray);
+    }
+
+    /*
+    This is mainly used for after doing a move. It gives you the current
+    index of all the moved elements. This is useful for UIs that need to
+    reselect the new items.
+
+    @param  elementsToMove the elements that were moved
+    @return                an integer array of the items to select.
+    @author mhunsicker
+    */
+
+    public int[] getIndices(List elementsToMove) {
+        return ListReorderer.getIndices(elements, elementsToMove);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ClientProcess.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ClientProcess.java
new file mode 100644
index 0000000..ff75244
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ClientProcess.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.basic;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.ConnectException;
+import java.net.Socket;
+
+/**
+ * The client of what the ProcessLauncherServer launches. The client makes a connection to the server and sends messages to it. The server responds to those messages, but does not initiate
+ * communications otherwise. You implement the Protocol interface to handle the specifics of the communications.
+ *
+ * @author mhunsicker
+ */
+public class ClientProcess {
+    private final Logger logger = Logging.getLogger(ClientProcess.class);
+
+    /**
+     * Implement this to define the behavior of the communication on the client side.
+     */
+    public interface Protocol {
+        /**
+         * Gives your protocol a chance to store this client so it can access its functions.
+         */
+        public void initialize(ClientProcess client);
+
+        /**
+         * Notification that we have connected to the server.
+         *
+         * @return true if we should continue the connection, false if not.
+         */
+        public boolean serverConnected(Socket clientSocket);
+
+        /**
+         * @return true if we should keep the connection alive. False if we should stop communicaiton.
+         */
+        public boolean continueConnection();
+    }
+
+    private ObjectSocketWrapper socketWrapper;
+    private Protocol protocol;
+
+    public ClientProcess(Protocol protocol) {
+        this.protocol = protocol;
+        protocol.initialize(this);
+    }
+
+    /**
+     * Call this to attempt to connect to the server.
+     *
+     * @param port where the server is listening. Since it launched this client, it should have either been passed to it on the command line or via a system property (-D).
+     * @return true if we connected to the server, false if not.
+     */
+    public boolean start(int port) {
+        Socket clientSocket = null;
+        try {
+            clientSocket = new Socket((String) null, port);
+            socketWrapper = new ObjectSocketWrapper(clientSocket);
+            if (protocol.serverConnected(clientSocket)) {
+                return true;
+            }
+
+            logger.error("Failed to connect to server (might not have returned correct connection string): " + port);
+        } catch (ConnectException e) {
+            logger.error("Failed to connect to server: " + port);
+        } catch (Exception e) {
+            logger.error("Failed to connect to server: " + port, e);
+        }
+
+        try {
+            if (clientSocket != null) {
+                clientSocket.close();
+            }
+            socketWrapper = null;
+        } catch (IOException e1) {
+            logger.error("Failed to close socket", e1);
+        }
+        return false;
+    }
+
+    /**
+     * Call this to stop communications with the server.
+     */
+    public void stop() {
+        if (socketWrapper != null) {
+            socketWrapper.close();
+        }
+    }
+
+    /**
+     * Call this to send a message with some binary data. The protocal and the server must understand the message, message type, and data.
+     *
+     * @param messageType the message type. Whatever the client and server want.
+     * @param message the message being sent
+     * @param data the data being sent. Must be serializable.
+     * @return true if we sent the message, false if not.
+     */
+    public boolean sendMessage(String messageType, String message, Serializable data) {
+        return socketWrapper.sendObject(new MessageObject(messageType, message, data));
+    }
+
+    public boolean sendMessage(String messageType, String message) {
+        return sendMessage(messageType, message, null);
+    }
+
+    /**
+     * Call this to send a message with some binary data and wait for the server's acknowledgement. The protocol and the server must understand the message, message type, and data.
+     *
+     * @param messageType the message type. Whatever the client and server want.
+     * @param message the message being sent
+     * @param data the data being sent. Must be serializable.
+     * @return the reply from the server
+     */
+    public MessageObject sendMessageWaitForReply(String messageType, String message, Serializable data) {
+        if (!socketWrapper.sendObject(new MessageObject(messageType, message, data))) {
+            return null;
+        }
+
+        return readMessage();
+    }
+
+    /**
+     * Call this to listen for a message from the server. This is really only meant to be a response from the server as a response to our message.
+     *
+     * @return the message returned.
+     */
+    public MessageObject readMessage() {
+        Object object = socketWrapper.readObject();
+        if (object == null) {
+            return null;
+        }
+
+        if (object instanceof MessageObject) {
+            return (MessageObject) object;
+        }
+
+        return new MessageObject("?", object.toString(), null);
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ExecutionInfo.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ExecutionInfo.java
similarity index 100%
rename from subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/basic/ExecutionInfo.java
rename to subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ExecutionInfo.java
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/MessageObject.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/MessageObject.java
new file mode 100644
index 0000000..5bb9b09
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/MessageObject.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.basic;
+
+import java.io.IOException;
+import java.io.ObjectStreamException;
+import java.io.Serializable;
+
+/**
+ * A holder for a message that is sent over a socket.
+ *
+ * @author mhunsicker
+ */
+public class MessageObject implements Serializable {
+    private String messageType;
+    private String message;
+    private Serializable data;
+
+    public MessageObject(String messageType, String message, Serializable data) {
+        this.messageType = messageType;
+        this.message = message;
+        this.data = data;
+    }
+
+    private void writeObject(java.io.ObjectOutputStream out) throws IOException {
+        out.writeObject(messageType);
+        out.writeObject(message);
+        out.writeObject(data);
+    }
+
+    private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
+        messageType = (String) in.readObject();
+        message = (String) in.readObject();
+        data = (Serializable) in.readObject();
+    }
+
+    private void readObjectNoData() throws ObjectStreamException {
+
+    }
+
+    @Override
+    public String toString() {
+        return "Type='" + messageType + '\'' + " Message='" + message + '\'' + " data=" + data;
+    }
+
+    public String getMessageType() {
+        return messageType;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public Serializable getData() {
+        return data;
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ObjectSocketWrapper.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ObjectSocketWrapper.java
new file mode 100644
index 0000000..1f26353
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ObjectSocketWrapper.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.basic;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.Socket;
+import java.net.SocketException;
+
+/**
+ * Wrapper around a java.net.Socket just to simplify usage.
+ *
+ * @author mhunsicker
+ */
+public class ObjectSocketWrapper {
+    private Socket socket;
+    private final Logger logger = Logging.getLogger(ObjectSocketWrapper.class);
+
+    public ObjectSocketWrapper(Socket socket) {
+        this.socket = socket;
+    }
+
+    public void setTimeout(int timeoutMilliseconds) {
+        try {
+            socket.setSoTimeout(timeoutMilliseconds);
+        } catch (SocketException e) {
+            logger.error("Failed to set timeout", e);
+        }
+    }
+
+    public Object readObject() {
+
+        ObjectInputStream reader = null;
+
+        try {
+            reader = new ObjectInputStream(socket.getInputStream());
+        } catch (SocketException e) {
+            if (!isIgnorableException(e)) {
+                logger.error("Reading Object", e);
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Reading Object", e);
+            return null;
+        }
+
+        try {
+            return reader.readObject();
+        } catch (SocketException e) {
+            //a connection reset is normal if the client quits, so don't dump out this exception and just return null.
+            if (!isIgnorableException(e)) {
+                logger.error("Reading Object", e);
+            }
+            return null;
+        } catch (Exception e) {
+            logger.error("Reading Object", e);
+        }
+
+        return null;
+    }
+
+    private boolean isIgnorableException(SocketException e) {
+        //a connection reset is normal if the client quits.
+        return "Connection reset".equalsIgnoreCase(e.getMessage());
+    }
+
+    /**
+     * Synchronizing this prevents multiple threads from sending messages at the same time which corrupts the socket.
+     */
+    public synchronized boolean sendObject(Object object) {
+        ObjectOutputStream writer = null;
+        try {
+            writer = new ObjectOutputStream(socket.getOutputStream());
+        } catch (IOException e) {
+            logger.error("Exception when creating writer sending object: " + object, e);
+            return false;
+        }
+
+        try {
+            writer.reset();
+            writer.flush();
+            writer.writeObject(object);
+            writer.flush();
+
+            return true;
+        } catch (Exception e) {
+            logger.error("Exception when sending object: " + object, e);
+            return false;
+        }
+    }
+
+    public void close() {
+        try {
+            socket.close();
+        } catch (IOException e) {
+            logger.error("Closing", e);
+        }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ProcessLauncherServer.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ProcessLauncherServer.java
new file mode 100644
index 0000000..8e50e37
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/ProcessLauncherServer.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.foundation.ipc.basic;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.foundation.common.ObserverLord;
+import org.gradle.process.ExecResult;
+import org.gradle.process.internal.ExecHandle;
+import org.gradle.process.internal.ExecHandleBuilder;
+
+import java.io.ByteArrayOutputStream;
+
+/**
+ * This launches an application as a separate process then listens for messages from it. You implement the Protocol interface to handle the specifics of the communications. To use this, instantiate
+ * it, then call start. When the communications are finished, call requestShutdown(). Your server's protocol can call sendMessage once communication is started to respond to client's messages.
+ *
+ * @author mhunsicker
+ */
+public class ProcessLauncherServer extends Server<ProcessLauncherServer.Protocol, ProcessLauncherServer.ServerObserver> {
+    private volatile ExecHandle externalProcess;
+
+    private static final Logger LOGGER = Logging.getLogger(ProcessLauncherServer.class);
+
+    /**
+     * Implement this to define the behavior of the communication on the server side.
+     */
+    public interface Protocol extends Server.Protocol<ProcessLauncherServer> {
+        public void aboutToKillProcess();
+
+        /**
+         * Fill in the ExecutionInfo object with information needed to execute the other process.
+         *
+         * @param serverPort the port the server is listening on. The client should send messages here
+         * @return an executionInfo object containing information about what we execute.
+         */
+        public ExecutionInfo getExecutionInfo(int serverPort);
+
+        /**
+         * Notification that the client has shutdown. Note: this can occur before communications has ever started. You SHOULD get this notification before receiving serverExited, even if the client
+         * fails to launch or locks up.
+         *
+         * @param result the return code of the client application
+         * @param output the standard error and standard output of the client application
+         */
+        public void clientExited(int result, String output);
+    }
+
+    public interface ServerObserver extends Server.ServerObserver {
+        /**
+         * Notification that the client has shutdown. Note: this can occur before communications has ever started. You SHOULD get this notification before receiving serverExited, even if the client
+         * fails to launch or locks up.
+         *
+         * @param result the return code of the client application
+         * @param output the standard error and standard output of the client application
+         */
+        public void clientExited(int result, String output);
+    }
+
+    public ProcessLauncherServer(Protocol protocol) {
+        super(protocol);
+    }
+
+    @Override
+    protected void communicationsStarted() {
+        launchExternalProcess();
+    }
+
+    /**
+     * This launches an external process in a thread and waits for it to exit.
+     */
+    private void launchExternalProcess() {
+        Thread thread = new Thread(new Runnable() {
+            public void run() {
+
+                ExecutionInfo executionInfo = null;
+                ExecHandle execHandle = null;
+                ByteArrayOutputStream output = null;
+                try {
+
+                    executionInfo = protocol.getExecutionInfo(getPort());
+
+                    ExecHandleBuilder builder = new ExecHandleBuilder();
+                    builder.workingDir(executionInfo.getWorkingDirectory());
+                    builder.commandLine((Object[]) executionInfo.getCommandLineArguments());
+                    builder.environment(executionInfo.getEnvironmentVariables());
+                    output = new ByteArrayOutputStream();
+                    builder.setStandardOutput(output);
+                    builder.setErrorOutput(output);
+                    execHandle = builder.build();
+                    setExternalProcess(execHandle);
+
+                    execHandle.start();
+                } catch (Throwable e) {
+                    LOGGER.error("Starting external process", e);
+                    notifyClientExited(-1, e.getMessage());
+                    setExternalProcess(null);
+                    return;
+                }
+
+                ExecResult result = execHandle.waitForFinish();
+                LOGGER.debug("External process completed with exit code {}", result.getExitValue());
+
+                setExternalProcess(null);   //clear our external process member variable (we're using our local variable below). This is so we know the process has already stopped.
+
+                executionInfo.processExecutionComplete();
+                notifyClientExited(result.getExitValue(), output.toString());
+            }
+        });
+
+        thread.start();
+    }
+
+    public void stop() {
+        super.stop();
+        killProcess(); //if the process is still running, shut it down
+    }
+
+    public void setExternalProcess(ExecHandle externalProcess) {
+        this.externalProcess = externalProcess;
+    }
+
+    /**
+     * Call this to violently kill the external process. This is NOT a good way to stop it. It is preferable to ask the thread to stop. However, gradle has no way to do that, so we'll be killing it.
+     */
+    public synchronized void killProcess() {
+        if (externalProcess != null) {
+            requestShutdown();
+            protocol.aboutToKillProcess();
+            externalProcess.abort();
+            setExternalProcess(null);
+            notifyClientExited(-1, "Process Canceled");
+        }
+    }
+
+    private void notifyClientExited(final int result, final String output) {
+        protocol.clientExited(result, output);
+
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<ServerObserver>() {
+            public void notify(ServerObserver observer) {
+                observer.clientExited(result, output);
+            }
+        });
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/Server.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/Server.java
new file mode 100644
index 0000000..6cbe2aa
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/basic/Server.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.basic;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.foundation.common.ObserverLord;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+/**
+ * This is a server that talks to a client via sockets (Rudimentary form of Inter-Process Communication (IPC)). This does the work of locating a free socket and starting the connection. To use this,
+ * you really only have to define a Protocol that handles the actual messages. You'll want to make your client startup a ClientProcess object that implements a corresponding Protocol.
+ *
+ * @author mhunsicker
+ */
+public class Server<P extends Server.Protocol, O extends Server.ServerObserver> {
+    private final Logger logger = Logging.getLogger(Server.class);
+
+    private ServerSocket serverSocket;
+    private boolean isServerRunning;
+    private boolean hasRequestedShutdown;
+
+    private ObjectSocketWrapper clientSocket;
+    protected P protocol;
+    private Thread communicationThread;
+    private int port;
+
+    protected ObserverLord<O> observerLord = new ObserverLord<O>();
+
+    //
+
+    /**
+     * Implement this to define the behavior of the communication on the server side.
+     */
+    public interface Protocol<S extends Server> {
+        /**
+         * Gives your protocol a chance to store this server so it can access its functions.
+         */
+        public void initialize(S server);
+
+        /**
+         * Notification that the connection was accepted by the client.
+         */
+        public void connectionAccepted();
+
+        /**
+         * @return true if we should keep the connection alive. False if we should stop communication.
+         */
+        public boolean continueConnection();
+
+        /**
+         * Notification that a message has been received.
+         *
+         * @param message the message that was received.
+         */
+        public void messageReceived(MessageObject message);
+
+        /**
+         * Notification that the client has stopped all communications.
+         */
+        public void clientCommunicationStopped();
+
+        /**
+         * Notification that a read failure occurred. This really only exists for debugging purposes when things go wrong.
+         */
+        void readFailureOccurred();
+    }
+
+    //
+    public interface ServerObserver {
+        /**
+         * Notification that the server has shutdown.
+         */
+        public void serverExited();
+    }
+
+    public Server(P protocol) {
+        this.protocol = protocol;
+        protocol.initialize(this);
+    }
+
+    public int getPort() {
+        return port;
+    }
+
+    /**
+     * Call this to start the server.
+     *
+     * @return true if we started, false if not.
+     */
+    public boolean start() {
+        port = connect();
+        if (port == -1) {
+            return false;
+        }
+
+        communicationThread = new Thread(new Runnable() {
+            public void run() {
+                listenForConnections();
+            }
+        });
+
+        communicationThread.start();
+
+        communicationsStarted();
+
+        return true;
+    }
+
+    /**
+     * this exists solely so it can be overridden. Its an internal notification that communcations have started. You may want to do some extra processing now.
+     */
+
+    protected void communicationsStarted() {
+
+    }
+
+    /**
+     * This attempts to open a free port. We'll search for an open port until we find one.
+     *
+     * @return the port we opened or -1 if we couldn't open one.
+     */
+    private int connect() {
+        try {
+            serverSocket = new ServerSocket(0);
+            return serverSocket.getLocalPort();
+        } catch (IOException e) {
+            logger.error("Could not listen on port: " + port, e);
+            return -1;
+        }
+    }
+
+    /**
+     * This sits in a loop and listens for connections. Once a connection has been made, we'll call another function to process it.
+     */
+    private void listenForConnections() {
+        int consecutiveFailures = 0;
+        while (!hasRequestedShutdown) {
+            Socket socket = null;
+            try {
+                serverSocket.setSoTimeout(2000);  //attempt to connect for a few seconds, then try again (so we'll get any shutdown requests).
+                socket = serverSocket.accept();
+
+                clientSocket = new ObjectSocketWrapper(socket);
+                protocol.connectionAccepted();
+                consecutiveFailures = 0;   //reset our consecutive failures.
+                serverSocket.setSoTimeout(0);
+
+                processCommunications();
+
+                clientSocket.close();
+            } catch (IOException e) {
+                consecutiveFailures++;
+                if (consecutiveFailures >= 20)  //if we fail too many times, we'll request to shutdown. It's obviously not working. This is an arbitrary number.
+                {
+                    requestShutdown();
+                }
+
+                if (consecutiveFailures > 8)    //the first few usually fail while we're waiting for the process to startup.
+                {
+                    logger.error("Accept failed (" + consecutiveFailures + ").");
+                }
+            } catch (Throwable t) {  //something really bad happened, shut down
+                logger.error("Listening for connections", t);
+                requestShutdown();
+            }
+        }
+
+        isServerRunning = false;
+
+        stop();
+        notifyServerExited();
+    }
+
+    /**
+     * This is called once a connection is made. We'll listen for messages from the client, notifying the protocol of them to do whatever it needs.
+     */
+    private void processCommunications() {
+        boolean hasClientStopped = false;
+        int failureCount = 0;
+        while (!hasClientStopped && protocol.continueConnection() && !hasRequestedShutdown) {
+            Object object = clientSocket.readObject();
+
+            if (object == null) {
+                if (!hasRequestedShutdown)   //if we're trying to shutdown, we can get errors here. Just ignore them and move on
+                {
+                    failureCount++;
+                    protocol.readFailureOccurred();
+                    if (failureCount == 3) //after 3 failures, assume the client went away.
+                    {
+                        hasClientStopped = true;
+                        protocol.clientCommunicationStopped();
+                    }
+                }
+            } else {
+                failureCount = 0; //reset our failures
+
+                if (object instanceof String) {
+                    protocol.messageReceived(new MessageObject("?", object.toString(), null));
+                } else if (object instanceof MessageObject) {
+                    protocol.messageReceived((MessageObject) object);
+                }
+            }
+        }
+    }
+
+    public void requestShutdown() {
+        hasRequestedShutdown = true;
+    }
+
+    public boolean isServerRunning() {
+        return isServerRunning;
+    }
+
+    /**
+     * Call this to send a message. The protocal and the client must understand the message and message type.
+     *
+     * @param messageType the message type. Whatever the client and server want.
+     * @param message the message being sent.
+     */
+    public void sendMessage(String messageType, String message) {
+        clientSocket.sendObject(new MessageObject(messageType, message, null));
+    }
+
+    /**
+     * Call this to send a message with some binary data. The protocal and the client must understand the message, message type, and data.
+     *
+     * @param messageType the message type. Whatever the client and server want.
+     * @param message the message being sent
+     * @param data the data being sent. Must be serializable.
+     */
+    public void sendMessage(String messageType, String message, Serializable data) {
+        clientSocket.sendObject(new MessageObject(messageType, message, data));
+    }
+
+    public void stop() {
+        try {
+            serverSocket.close();
+        } catch (IOException e) {
+            logger.error("Closing socket", e);
+        }
+    }
+
+    private void notifyServerExited() {
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<O>() {
+            public void notify(ServerObserver observer) {
+                observer.serverExited();
+            }
+        });
+    }
+
+    public void addServerObserver(O observer, boolean inEventQueue) {
+        observerLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeServerObserver(O observer) {
+        observerLord.removeObserver(observer);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/AbstractGradleServerProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/AbstractGradleServerProtocol.java
new file mode 100644
index 0000000..ad22320
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/AbstractGradleServerProtocol.java
@@ -0,0 +1,438 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.apache.commons.io.IOUtils;
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.foundation.CommandLineAssistant;
+import org.gradle.foundation.ipc.basic.ClientProcess;
+import org.gradle.foundation.ipc.basic.ExecutionInfo;
+import org.gradle.foundation.ipc.basic.MessageObject;
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.initialization.DefaultCommandLineConverter;
+import org.gradle.util.Jvm;
+import org.gradle.util.OperatingSystem;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * This defines the basic behavior of all gradle protocols for interprocess communication. It manages handshaking, detecting if the client executed prematurely, as well as executing alternate external
+ * processes. All you need to do is extend this, implement the abstract functions, and make sure you call setHasReceivedBuildCompleteNotification() when whatever you were doing is complete (so we know
+ * any exiting is not premature).
+ *
+ * @author mhunsicker
+ */
+public abstract class AbstractGradleServerProtocol implements ProcessLauncherServer.Protocol {
+    private static final String INIT_SCRIPT_EXTENSION = ".gradle";
+
+    private final Logger logger = Logging.getLogger(AbstractGradleServerProtocol.class);
+
+    protected ProcessLauncherServer server;
+    private boolean continueConnection;
+    private boolean waitingOnHandshakeCompletion;
+    private boolean hasCompletedConnection;
+
+    private boolean hasReceivedBuildCompleteNotification;
+
+    private File currentDirectory;
+    private File gradleHomeDirectory;
+
+    private File customGradleExecutor;
+    private String commandLine;
+    private LogLevel logLevel;
+
+    //all of this is just so we can get gradle to kill itself when we cancel
+    private int killGradleServerPort;
+    private KillGradleClientProtocol killGradleClientProcotol;
+    private ClientProcess killGradleClient;
+
+    protected MessageObject lastMessageReceived; //just for debugging purposes
+
+    /**
+     * @return true if we should keep the connection alive. False if we should stop communicaiton.
+     */
+    public boolean continueConnection() {
+        return continueConnection;
+    }
+
+    private StartParameter.ShowStacktrace stackTraceLevel;
+
+    public AbstractGradleServerProtocol(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor, String fullCommandLine, LogLevel logLevel,
+                                        StartParameter.ShowStacktrace stackTraceLevel) {
+        this.currentDirectory = currentDirectory;
+        this.gradleHomeDirectory = gradleHomeDirectory;
+        this.customGradleExecutor = customGradleExecutor;
+        this.commandLine = fullCommandLine;
+        this.logLevel = logLevel;
+        this.stackTraceLevel = stackTraceLevel;
+    }
+
+    /**
+     * Notification that the connection was accepted by the client.
+     */
+    public void connectionAccepted() {
+        //let's make sure we're talking to the right client with some tiny handshaking.
+        server.sendMessage(ProtocolConstants.HANDSHAKE_TYPE, ProtocolConstants.HANDSHAKE_SERVER);
+        continueConnection = true;
+        waitingOnHandshakeCompletion = true;
+    }
+
+    /**
+     * Gives your protocol a chance to store this server so it can access its functions.
+     */
+    public void initialize(ProcessLauncherServer server) {
+        this.server = server;
+    }
+
+    /**
+     * Call this to stop communication
+     */
+    protected void closeConnection() {
+        this.continueConnection = false;
+    }
+
+    /**
+     * Notification that a message has been received. If we just connected, we'll do a quick handshake to verify the client, then we just pass the rest on our our output panel.
+     *
+     * @param message the message that was received.
+     */
+    public void messageReceived(MessageObject message) {
+        lastMessageReceived = message;
+        if (waitingOnHandshakeCompletion) {
+            //are we still handshaking?
+            if (ProtocolConstants.HANDSHAKE_CLIENT.equalsIgnoreCase(message.getMessage())) {
+                waitingOnHandshakeCompletion = false;  //we've received what we expected
+                hasCompletedConnection = true;         //and we're now connected
+                if (message.getData() != null) {
+                    killGradleServerPort = (Integer) message.getData();
+                    killGradleClientProcotol = new KillGradleClientProtocol();
+                    killGradleClient = new ClientProcess(killGradleClientProcotol);
+                    killGradleClient.start(killGradleServerPort);
+                    handShakeCompleted();
+                } else {
+                    addStatus("Invalid handshaking. Missing port number. Stopping connection");
+                    server.sendMessage("?", "Invalid client handshake protocol!");
+                    closeConnection();
+                }
+            } else {
+                addStatus("Invalid handshaking. Stopping connection");
+                server.sendMessage("?", "Invalid client handshake protocol!");
+                closeConnection();
+            }
+        } else {
+            //otherwise, its just a normal message, the protocol should handle it.
+            try {
+                handleMessageReceived(message);
+            } catch (Throwable e) {
+                logger.error("Problem while handing message :\n" + message, e);
+            }
+        }
+    }
+
+    /**
+     * This provides you with a chance to do something when the handshaking is complete
+     */
+    protected void handShakeCompleted() {
+
+    }
+
+    /**
+     * Notification that a message was received that we didn't process. Implement this to handle the specifics of your protocol. Basically, the base class handles the handshake. The rest of the
+     * conversation is up to you.
+     *
+     * @param message the message we received.
+     * @return true if we handled the message, false if not. If we don't know it, we won't return an acknowlegement.
+     */
+    protected abstract boolean handleMessageReceived(MessageObject message);
+
+    /**
+     * Call this to mark the build as completed (whether successfully or not). This is used to determine if the client has exited prematurely which indicates a problem.
+     */
+    public void setHasReceivedBuildCompleteNotification() {
+        this.hasReceivedBuildCompleteNotification = true;
+    }
+
+    /**
+     * Notification of any status that might be helpful to the user.
+     *
+     * @param status a status message
+     */
+    protected abstract void addStatus(String status);
+
+    public class MyExecutionInfo implements ExecutionInfo {
+        public String[] commandLineArguments;
+        public File workingDirectory;
+        public HashMap<String, String> environmentVariables = new HashMap<String, String>();
+        public File initStriptPath;
+
+        public String[] getCommandLineArguments() {
+            return commandLineArguments;
+        }
+
+        public File getWorkingDirectory() {
+            return workingDirectory;
+        }
+
+        public HashMap<String, String> getEnvironmentVariables() {
+            return environmentVariables;
+        }
+
+        public void setCommandLineArguments(String[] commandLineArguments) {
+            this.commandLineArguments = commandLineArguments;
+        }
+
+        public void setWorkingDirectory(File workingDirectory) {
+            this.workingDirectory = workingDirectory;
+        }
+
+        public void addEnvironmentVariable(String name, String value) {
+            this.environmentVariables.put(name, value);
+        }
+
+        public void processExecutionComplete() {
+            if (initStriptPath != null) {
+                initStriptPath.delete();
+            }
+        }
+    }
+
+    /**
+     * Fill in the ExecutionInfo object with information needed to execute the other process.
+     *
+     * @param serverPort the port the server is listening on. The client should send messages here
+     * @return an executionInfo object containing information about what we execute.
+     */
+    public ExecutionInfo getExecutionInfo(int serverPort) {
+        MyExecutionInfo executionInfo = new MyExecutionInfo();
+
+        //set some environment variables that need to be passed to the script.
+        executionInfo.addEnvironmentVariable("JAVA_HOME", Jvm.current().getJavaHome().getAbsolutePath());
+
+        executionInfo.setWorkingDirectory(currentDirectory);
+
+        List<String> executionCommandLine = new ArrayList<String>();
+
+        //put the file to execute on the command line
+        File gradleExecutableFile = getGradleExecutableFile();
+        if (gradleExecutableFile == null) {
+            throw new RuntimeException("Gradle executable not specified");
+        }
+        if (!gradleExecutableFile.exists()) {
+            throw new RuntimeException("Missing gradle executable. Expected it at: " + gradleExecutableFile);
+        }
+        executionCommandLine.add(gradleExecutableFile.getAbsolutePath());
+
+        //add the port number we're listenening on
+        executionCommandLine.add("-D" + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + "=" + Integer.toString(serverPort));
+
+        CommandLineAssistant commandLineAssistant = new CommandLineAssistant();
+
+        //add whatever the user ran
+        String[] individualCommandLineArguments = commandLineAssistant.breakUpCommandLine(commandLine);
+        executionCommandLine.addAll(Arrays.asList(individualCommandLineArguments));
+
+        File initStriptPath = getInitScriptFile();
+        if (initStriptPath != null) {
+            executionCommandLine.add("-" + DefaultCommandLineConverter.INIT_SCRIPT);
+            executionCommandLine.add(initStriptPath.getAbsolutePath());
+            executionInfo.initStriptPath = initStriptPath;
+        }
+
+        //add the log level if its not present
+        if (!commandLineAssistant.hasLogLevelDefined(individualCommandLineArguments)) {
+            String logLevelText = commandLineAssistant.getLoggingCommandLineConverter().getLogLevelCommandLine(logLevel);
+            if (logLevelText != null && !"".equals(logLevelText)) {
+                executionCommandLine.add('-' + logLevelText);
+            }
+        }
+
+        //add the stack trace level if its not present
+        if (!commandLineAssistant.hasShowStacktraceDefined(individualCommandLineArguments)) {
+            String stackTraceLevelText = commandLineAssistant.getCommandLineConverter().getShowStacktraceCommandLine(stackTraceLevel);
+            if (stackTraceLevelText != null) {
+                executionCommandLine.add('-' + stackTraceLevelText);
+            }
+        }
+
+        executionInfo.setCommandLineArguments(executionCommandLine.toArray(new String[executionCommandLine.size()]));
+        return executionInfo;
+    }
+
+    /**
+     * @return the file that should be used to execute gradle. If we've been given a custom file, we use that, otherwise, we use the batch or shell script inside the gradle home's bin directory.
+     */
+    protected File getGradleExecutableFile() {
+        if (customGradleExecutor != null) {
+            return customGradleExecutor;
+        }
+
+        return new File(gradleHomeDirectory, "bin" + File.separator + getDefaultGradleExecutableName());
+    }
+
+    /**
+     * This determines what we're going to execute. Its different based on the OS.
+     *
+     * @return whatever we're going to execute.
+     */
+    private String getDefaultGradleExecutableName() {
+        return OperatingSystem.current().getScriptName("gradle");
+    }
+
+    /**
+     * Notification that the client has stopped all communications.
+     */
+    public void clientCommunicationStopped() {
+        //we don't really care
+    }
+
+    /**
+     * Notification that the client has shutdown. Note: this can occur before communciations has ever started. You SHOULD get this notification before receiving serverExited, even if the client fails
+     * to launch or locks up.
+     *
+     * @param returnCode the return code of the client application
+     * @param output the standard error and standard output of the client application
+     */
+    public void clientExited(int returnCode, String output) {
+        server.requestShutdown();
+
+        boolean wasPremature = false;
+        String message;
+
+        if (!hasCompletedConnection) {
+            //if we never connected, report it
+            message = "Failed to connect to gradle process for command '" + commandLine + "'\n" + output;
+            wasPremature = true;
+        } else if (!hasReceivedBuildCompleteNotification) {
+            //this may happen if the client doesn't execute properly or it was killed/canceled. This is just so we don't lose our output (which may yeild clues to the problem).
+            message = output;
+            wasPremature = true;
+        } else {
+            message = output;
+        }
+
+        reportClientExit(wasPremature, returnCode, message);
+    }
+
+    /**
+     * This is called if the client exits prematurely. That is, we never connected to it or it didn't finish. This can happen because of setup issues or errors that occur in gradle.
+     *
+     * @param returnCode the return code of the application
+     */
+    protected abstract void reportClientExit(boolean wasPremature, int returnCode, String output);
+
+    /**
+     * This is called before we execute a command. Here, return an init script for this protocol. An init script is a gradle script that gets run before the other scripts are processed. This is useful
+     * here for initiating the gradle client that talks to the server.
+     *
+     * @return The path to an init script. Null if you have no init script.
+     */
+    public abstract File getInitScriptFile();
+
+    /**
+     * If you do have an init script that's a resource, this will extract it based on the name and write it to a temporary file and delete it on exit.
+     *
+     * @param resourceClass the class associated with the resource
+     * @param resourceName the name (minus extension or '.') of the resource
+     */
+    protected File extractInitScriptFile(Class resourceClass, String resourceName) {
+        File file = null;
+        try {
+            file = File.createTempFile(resourceName, INIT_SCRIPT_EXTENSION);
+        } catch (IOException e) {
+            logger.error("Creating init script file temp file", e);
+            return null;
+        }
+        file.deleteOnExit();
+
+        if (extractResourceAsFile(resourceClass, resourceName + INIT_SCRIPT_EXTENSION, file)) {
+            return file;
+        }
+
+        logger.error("Internal error! Failed to extract init script for executing commands!");
+
+        return null;
+    }
+
+    /**
+     * This extracts the given class' resource to the specified file if it doesn't already exist.
+     *
+     * @param resourceClass the class associated with the resource
+     * @param name the resource's name
+     * @param file where to put the resource
+     * @return true if successful, false if not.
+     */
+    public boolean extractResourceAsFile(Class resourceClass, String name, File file) {
+        InputStream stream = resourceClass.getResourceAsStream(name);
+        if (stream == null) {
+            return false;
+        }
+
+        byte[] bytes = new byte[0];
+        try {
+            bytes = IOUtils.toByteArray(stream);
+        } catch (IOException e) {
+            logger.error("Extracting resource as file", e);
+            return false;
+        }
+
+        FileOutputStream fileOutputStream = null;
+        try {
+            fileOutputStream = new FileOutputStream(file);
+            try {
+                IOUtils.write(bytes, fileOutputStream);
+            } finally {
+                fileOutputStream.close();
+            }
+            return true;
+        } catch (IOException e) {
+            logger.error("Extracting resource as file (writing bytes)", e);
+            return false;
+        } finally {
+            IOUtils.closeQuietly(fileOutputStream);
+        }
+    }
+
+    protected File getGradleHomeDirectory() {
+        return gradleHomeDirectory;
+    }
+
+    /**
+     * Notification that a read failure occurred. This really only exists for debugging purposes when things go wrong.
+     */
+    public void readFailureOccurred() {
+        logger.debug("Last message received: " + lastMessageReceived);
+    }
+
+    public void aboutToKillProcess() {
+        killGradle();
+    }
+
+    public void killGradle() {
+        if (killGradleClientProcotol != null) {
+            killGradleClientProcotol.sendKillMessage();
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandClientProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandClientProtocol.java
new file mode 100644
index 0000000..cd8ec82
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandClientProtocol.java
@@ -0,0 +1,228 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.BuildListener;
+import org.gradle.BuildResult;
+import org.gradle.api.Task;
+import org.gradle.api.execution.TaskExecutionGraph;
+import org.gradle.api.execution.TaskExecutionGraphListener;
+import org.gradle.api.execution.TaskExecutionListener;
+import org.gradle.api.initialization.Settings;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.api.logging.StandardOutputListener;
+import org.gradle.api.tasks.TaskState;
+import org.gradle.foundation.ipc.basic.ClientProcess;
+import org.gradle.foundation.ipc.basic.MessageObject;
+import org.gradle.foundation.ipc.basic.Server;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+
+import java.net.Socket;
+import java.util.List;
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based inter-process communication. This is the client (gradle) side used when executing
+ * commands (the most common case). We add gradle listeners and send their notifications as messages back to the server.
+ *
+ * @author mhunsicker
+ */
+public class ExecuteGradleCommandClientProtocol implements ClientProcess.Protocol {
+    private final Logger logger = Logging.getLogger(ExecuteGradleCommandClientProtocol.class);
+    private ClientProcess client;
+    private boolean continueConnection = true;
+    private Gradle gradle;
+
+    private Server localServer;   //this is our server that will listen to the process that started us.
+
+    public ExecuteGradleCommandClientProtocol(Gradle gradle) {
+        this.gradle = gradle;
+    }
+
+    /**
+     * Gives your protocol a chance to store this client so it can access its functions.
+     */
+    public void initialize(ClientProcess client) {
+        this.client = client;
+
+        gradle.addListener(new IPCExecutionListener(client));
+    }
+
+    /**
+     * Notification that we have connected to the server. Do minimum handshaking.
+     *
+     * @return true if we should continue the connection, false if not.
+     */
+    public boolean serverConnected(Socket clientSocket) {
+        MessageObject message = client.readMessage();
+        if (message == null) {
+            return false;
+        }
+
+        if (!ProtocolConstants.HANDSHAKE_TYPE.equalsIgnoreCase(message.getMessageType())) {
+            logger.error("Incorrect server handshaking.");
+            return false;
+        }
+
+        localServer = new Server(new KillGradleServerProtocol());
+        localServer.start();
+
+        client.sendMessage(ProtocolConstants.HANDSHAKE_TYPE, ProtocolConstants.HANDSHAKE_CLIENT, localServer.getPort());
+
+        return true;
+    }
+
+    /**
+     * We just keep a flag around for this.
+     *
+     * @return true if we should keep the connection alive. False if we should stop communicaiton.
+     */
+    public boolean continueConnection() {
+        return continueConnection;
+    }
+
+    public void shutdown() {
+        continueConnection = false;
+    }
+
+    /**
+     * This converts gradle messages to messages that we send to our server over a socket. It also tracks the live output and periodically sends it to the server.
+     */
+    private class IPCExecutionListener implements BuildListener, StandardOutputListener, TaskExecutionGraphListener, TaskExecutionListener {
+        private ClientProcess client;
+
+        private StringBuffer allOutputText = new StringBuffer(); //this is potentially threaded, so use StringBuffer instead of StringBuilder
+        private StringBuffer bufferedLiveOutput = new StringBuffer();
+        private Timer liveOutputTimer;
+        private float totalTasksToExecute;
+        private float totalTasksExecuted;
+        private float percentComplete;
+
+        public IPCExecutionListener(ClientProcess client) {
+            this.client = client;
+
+            //start a timer to periodically send our live output to our server
+            liveOutputTimer = new Timer();
+            liveOutputTimer.scheduleAtFixedRate(new TimerTask() {
+                @Override
+                public void run() {
+                    sendLiveOutput();
+                }
+            }, 500, 500);
+        }
+
+        public void buildStarted(Gradle build) {
+            //we'll never get this message because execution has started before we were instantiated (and before we were able to add our listener).
+        }
+
+        public void graphPopulated(TaskExecutionGraph taskExecutionGraph) {
+            List<Task> taskList = taskExecutionGraph.getAllTasks();
+
+            this.totalTasksToExecute = taskList.size();
+            client.sendMessage(ProtocolConstants.NUMBER_OF_TASKS_TO_EXECUTE, null, new Integer(taskList.size()));
+        }
+
+        /**
+         * <p>Called when the build settings have been loaded and evaluated. The settings object is fully configured and is ready to use to load the build projects.</p>
+         *
+         * @param settings The settings. Never null.
+         */
+        public void settingsEvaluated(Settings settings) {
+            //we don't really care
+        }
+
+        /**
+         * <p>Called when the projects for the build have been created from the settings. None of the projects have been evaluated.</p>
+         *
+         * @param gradle The build which has been loaded. Never null.
+         */
+        public void projectsLoaded(Gradle gradle) {
+            //we don't really care
+        }
+
+        /**
+         * <p>Called when all projects for the build have been evaluated. The project objects are fully configured and are ready to use to populate the task graph.</p>
+         *
+         * @param gradle The build which has been evaluated. Never null.
+         */
+        public void projectsEvaluated(Gradle gradle) {
+            //we don't really care
+        }
+
+        public void beforeExecute(Task task) {
+            String currentTaskName = task.getProject().getName() + ":" + task.getName();
+            client.sendMessage(ProtocolConstants.TASK_STARTED_TYPE, currentTaskName, new Float(percentComplete));
+        }
+
+        public void afterExecute(Task task, TaskState state) {
+            totalTasksExecuted++;
+            percentComplete = (totalTasksExecuted / totalTasksToExecute) * 100;
+            String currentTaskName = task.getProject().getName() + ":" + task.getName();
+            client.sendMessage(ProtocolConstants.TASK_COMPLETE_TYPE, currentTaskName, new Float(percentComplete));
+        }
+
+        /**
+         * Called when some output is written by the logging system.
+         *
+         * @param output The text.
+         */
+        public synchronized void onOutput(CharSequence output) {
+            String text = output.toString();
+            this.allOutputText.append(text);
+            this.bufferedLiveOutput.append(text);
+        }
+
+        /**
+         * Called on a timer to send the live output to the process that started us. We only send whatever is there since we've last sent output. It was causing some socket problems to send the output
+         * immediately upon receiving it. I suspect due to numerous threads adding output. So its now only done periodically and in a more thread-safe manner.
+         */
+        private synchronized void sendLiveOutput() {
+            if (bufferedLiveOutput.length() == 0) {
+                return;  //nothing to send
+            }
+            String text = bufferedLiveOutput.toString();
+            bufferedLiveOutput = new StringBuffer();
+
+            client.sendMessage(ProtocolConstants.LIVE_OUTPUT_TYPE, text);
+        }
+
+        /**
+         * <p>Called when the build is completed. All selected tasks have been executed.</p> <p>We remove our Log4JAppender as well as our task execution listener. Lastly, we report the build
+         * results.</p>
+         */
+        public void buildFinished(BuildResult buildResult) {
+
+            boolean wasSuccessful = buildResult.getFailure() == null;
+            String output = allOutputText.toString();
+            liveOutputTimer.cancel();  //stop our timer and send whatever live output we have
+            sendLiveOutput();
+
+            //we can't send the exception itself because it might not be serializable (it can include anything from anywhere inside gradle
+            //or one of its dependencies). So format it as text.
+            String details = GradlePluginLord.getGradleExceptionMessage(buildResult.getFailure(), gradle.getStartParameter().getShowStacktrace());
+            output += details;
+
+            client.sendMessage(ProtocolConstants.EXECUTION_COMPLETED_TYPE, output, new Boolean(wasSuccessful));
+
+            client.sendMessage(ProtocolConstants.EXITING, null, null);
+            client.stop();
+        }
+    }
+}
+
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandServerProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandServerProtocol.java
new file mode 100644
index 0000000..947b576
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ExecuteGradleCommandServerProtocol.java
@@ -0,0 +1,146 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.foundation.ipc.basic.MessageObject;
+
+import java.io.File;
+
+/**
+ * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based inter-process communication. This is the server side for executing a gradle command.
+ * This listens for messages from the gradle client.
+ *
+ * @author mhunsicker
+ */
+public class ExecuteGradleCommandServerProtocol extends AbstractGradleServerProtocol {
+    private static final String INIT_SCRIPT_NAME = "execute-command-init-script";
+
+    private ExecutionInteraction executionInteraction;
+
+    public interface ExecutionInteraction {
+        /**
+         * Notification that gradle has started execution. This may not get called if some error occurs that prevents gradle from running.
+         */
+        void reportExecutionStarted();
+
+        /**
+         * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
+         *
+         * @param size the total number of tasks.
+         */
+        void reportNumberOfTasksToExecute(int size);
+
+        /**
+         * Notification that execution has finished. Note: if the client fails to launch at all, this should still be called.
+         *
+         * @param wasSuccessful true if gradle was successful (returned 0)
+         * @param message the output of gradle if it ran. If it didn't, an error message.
+         * @param throwable an exception if one occurred
+         */
+        void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable);
+
+        void reportTaskStarted(String message, float percentComplete);
+
+        void reportTaskComplete(String message, float percentComplete);
+
+        void reportLiveOutput(String message);
+    }
+
+    public ExecuteGradleCommandServerProtocol(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor, String fullCommandLine, LogLevel logLevel,
+                                              StartParameter.ShowStacktrace stackTraceLevel, ExecutionInteraction executionInteraction) {
+        super(currentDirectory, gradleHomeDirectory, customGradleExecutor, fullCommandLine, logLevel, stackTraceLevel);
+        this.executionInteraction = executionInteraction;
+    }
+
+    /**
+     * Notification that a message was received that we didn't process. Implement this to handle the specifics of your protocol. Basically, the base class handles the handshake. The rest of the
+     * conversation is up to you.
+     *
+     * @param message the message we received.
+     */
+    @Override
+    protected boolean handleMessageReceived(MessageObject message) {
+        if (ProtocolConstants.EXECUTION_COMPLETED_TYPE.equals(message.getMessageType())) {
+            setHasReceivedBuildCompleteNotification();
+            return true;
+        }
+
+        if (ProtocolConstants.TASK_STARTED_TYPE.equals(message.getMessageType())) {
+            Float percentComplete = (Float) message.getData();
+            executionInteraction.reportTaskStarted(message.getMessage(), percentComplete);
+            return true;
+        }
+
+        if (ProtocolConstants.TASK_COMPLETE_TYPE.equals(message.getMessageType())) {
+            Float percentComplete = (Float) message.getData();
+            executionInteraction.reportTaskComplete(message.getMessage(), percentComplete);
+            return true;
+        }
+
+        if (ProtocolConstants.LIVE_OUTPUT_TYPE.equals(message.getMessageType())) {
+            executionInteraction.reportLiveOutput(message.getMessage());
+            return true;
+        }
+
+        if (ProtocolConstants.NUMBER_OF_TASKS_TO_EXECUTE.equals(message.getMessageType())) {
+            Integer total = (Integer) message.getData();
+            executionInteraction.reportNumberOfTasksToExecute(total.intValue());
+        }
+
+        if (ProtocolConstants.EXITING.equals(message.getMessageType())) {
+            closeConnection();   //the client is done.
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * This is called when when the client exits. This does not mean it succeeded. This is probably the only way you'll get ALL of the client's output as it continues to output things like error
+     * messages after it sends us an executionFinished message.
+     *
+     * @param returnCode the return code of the application
+     * @param output its total output
+     */
+    protected void reportClientExit(boolean wasPremature, int returnCode, String output) {
+        //Note: we're relying on clientExited to be called to mark a task as complete.
+        //This is because even though gradle sends us a message that it has completed
+        //the build, it hasn't yet output all of its information which is very useful
+        //for debugging.
+        executionInteraction.reportExecutionFinished(returnCode == 0, output, null);
+    }
+
+    /**
+     * Notification of any status that might be helpful to the user.
+     *
+     * @param status a status message
+     */
+    protected void addStatus(String status) {
+        executionInteraction.reportLiveOutput(status);
+    }
+
+    /**
+     * This is called before we execute a command. Here, return an init script for this protocol. An init script is a gradle script that gets run before the other scripts are processed. This is useful
+     * here for initiating the gradle client that talks to the server.
+     *
+     * @return The path to an init script. Null if you have no init script.
+     */
+    public File getInitScriptFile() {
+        return extractInitScriptFile(ExecuteGradleCommandServerProtocol.class, INIT_SCRIPT_NAME);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/GradleClient.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/GradleClient.java
new file mode 100644
index 0000000..55825fc
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/GradleClient.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.foundation.ipc.basic.ClientProcess;
+
+import java.io.Serializable;
+
+/**
+ * <p>This is used to send information from a one process to another process. This one is used by the launched process where the server (the process that launched us) is listening for our messages
+ * over a socket connection. The server typically sets the port to listen to via java system properties.</p> <p>To use this, instantiate it, then call start passing in a protocol (which defines the
+ * actual communication messages).</p>
+ */
+public class GradleClient {
+    private ClientProcess clientProcess;
+    private final Logger logger = Logging.getLogger(GradleClient.class);
+
+    public GradleClient() {
+    }
+
+    /**
+     * Call this to start the client. This version gets the port number as a system property. It does nothing if this property isn't defined.
+     *
+     * @param protocol the protocol to use to communicate with the server.
+     * @return true if successful, false if not.
+     */
+    public boolean start(ClientProcess.Protocol protocol) {
+        //make sure we've been given the port number to use
+        String portText = System.getProperty(ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY);
+        if (portText == null) {
+            logger.error("No port number specified. Cannot run client");
+            return false;
+        }
+
+        try {
+            int port = Integer.parseInt(portText);
+            return start(protocol, port);
+        } catch (NumberFormatException e) {
+            logger.error("Parsing port '" + portText + "'", e);
+            return false;
+        }
+    }
+
+    /**
+     * Call this to start the client.
+     *
+     * @param protocol the protocol to use to communicate with the server.
+     * @param port the port the server is listening on
+     * @return true if successful, false if not.
+     */
+    public boolean start(ClientProcess.Protocol protocol, int port) {
+        clientProcess = new ClientProcess(protocol);
+
+        if (!clientProcess.start(port)) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Call this to send a message and wait for the server to acknowledge siad message.
+     */
+    public boolean sendMessage(String messageType, String message, Serializable data) {
+        return clientProcess.sendMessage(messageType, message, data);
+    }
+
+    public boolean sendMessage(String messageType, String message) {
+        return sendMessage(messageType, message, null);
+    }
+
+    /**
+     * Call this to stop communications with the server.
+     */
+    public void stop() {
+        clientProcess.stop();
+    }
+}
+
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/IPCUtilities.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/IPCUtilities.java
new file mode 100644
index 0000000..3bfd9c6
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/IPCUtilities.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.api.invocation.Gradle;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+
+/**
+ * Just some convenience functions to startup a GradleClient. See GradleClient for more information.
+ *
+ * @author mhunsicker
+ */
+public class IPCUtilities {
+    private static final Logger LOGGER = Logging.getLogger(IPCUtilities.class);
+
+    /**
+     * This starts a gradle client for doing regular execution of a command. It expects the port number to set as a system property. Note: this is using gradle to find the port. See getPort().
+     *
+     * @param gradle the gradle object.
+     */
+    public static void invokeExecuteGradleClient(Gradle gradle) {
+        Integer port = getPort(gradle);
+        if (port == null) {
+            return;
+        }
+
+        ExecuteGradleCommandClientProtocol protocol = new ExecuteGradleCommandClientProtocol(gradle);
+        GradleClient client = new GradleClient();
+        client.start(protocol, port);
+    }
+
+    /**
+     * This gets the port out of the start parameters. Why? Because this is meant to be run from the init script and the system properties haven't been set yet. That is due to how gradle is run from
+     * the bat file/shell script. It has to manually set the java system properties (-D). I don't this is a desired side-effect.
+     *
+     * @param gradle the gradle object
+     * @return an integer or null if we didn't get the port.
+     */
+    private static Integer getPort(Gradle gradle) {
+        String portText = gradle.getStartParameter().getSystemPropertiesArgs().get(ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY);
+        if (portText == null) {
+            LOGGER.error("Failed to set " + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + " system property");
+            return null;
+        }
+
+        try {
+            return Integer.parseInt(portText);
+        } catch (NumberFormatException e) {
+            LOGGER.error("Invalid " + ProtocolConstants.PORT_NUMBER_SYSTEM_PROPERTY + " system property", e);
+            return null;
+        }
+    }
+
+    /**
+     * This starts a gradle client that sends a task list back to the server. It expects the port number to set as a system property. You probably should be executing the "tasks" command. Note: this
+     * is using gradle to find the port. See getPort().
+     *
+     * @param gradle the gradle launcher object.
+     */
+    public static void invokeTaskListGradleClient(Gradle gradle) {
+        Integer port = getPort(gradle);
+        if (port == null) {
+            return;
+        }
+
+        TaskListClientProtocol protocol = new TaskListClientProtocol(gradle);
+        GradleClient client = new GradleClient();
+        client.start(protocol, port);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleClientProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleClientProtocol.java
new file mode 100644
index 0000000..ace7156
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleClientProtocol.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.foundation.ipc.basic.ClientProcess;
+
+import java.net.Socket;
+
+/**
+ * This protocol is used by the process that launches gradle (the launching server - but in this case its the client) so that it can tell gradle to kill itself. This is used to cancel gradle
+ * execution. There is no other clean way to do it but kill it. All this does is send a 'kill' message.
+ *
+ * @author mhunsicker
+ */
+public class KillGradleClientProtocol implements ClientProcess.Protocol {
+    private ClientProcess client;
+
+    public void initialize(ClientProcess client) {
+        this.client = client;
+    }
+
+    public boolean serverConnected(Socket clientSocket) {
+        return true;
+    }
+
+    public boolean continueConnection() {
+        return true;
+    }
+
+    public void sendKillMessage() {
+        client.sendMessage(ProtocolConstants.KILL, ProtocolConstants.KILL);
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleServerProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleServerProtocol.java
new file mode 100644
index 0000000..910dd35
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/KillGradleServerProtocol.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.foundation.ipc.basic.MessageObject;
+import org.gradle.foundation.ipc.basic.Server;
+
+/**
+ * This protocol is used by a client that launches its own server. See KillGradleClientProtocol.
+ *
+ * @author mhunsicker
+ */
+public class KillGradleServerProtocol implements Server.Protocol<Server> {
+    private Server server;
+
+    public void initialize(Server server) {
+        this.server = server;
+    }
+
+    public void connectionAccepted() {
+
+    }
+
+    public boolean continueConnection() {
+        return true;
+    }
+
+    public void messageReceived(MessageObject message) {
+        if (ProtocolConstants.KILL.equals(message.getMessageType())) {
+            killProcess();
+        }
+    }
+
+    private void killProcess() {
+        System.exit(-1);
+    }
+
+    public void clientCommunicationStopped() {
+        killProcess();
+    }
+
+    public void readFailureOccurred() {
+
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ProtocolConstants.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ProtocolConstants.java
similarity index 100%
rename from subprojects/gradle-ui/src/main/java/org/gradle/foundation/ipc/gradle/ProtocolConstants.java
rename to subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/ProtocolConstants.java
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListClientProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListClientProtocol.java
new file mode 100644
index 0000000..030ff09
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListClientProtocol.java
@@ -0,0 +1,147 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.BuildAdapter;
+import org.gradle.BuildResult;
+import org.gradle.api.invocation.Gradle;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.api.logging.StandardOutputListener;
+import org.gradle.foundation.ProjectConverter;
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.ipc.basic.ClientProcess;
+import org.gradle.foundation.ipc.basic.MessageObject;
+import org.gradle.foundation.ipc.basic.Server;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+
+import java.io.Serializable;
+import java.net.Socket;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based inter-process communication. This is the client (gradle) side used to build a task
+ * list (tree actually). We add gradle listeners and send their notifications as messages back to the server.
+ *
+ * @author mhunsicker
+ */
+public class TaskListClientProtocol implements ClientProcess.Protocol {
+    private final Logger logger = Logging.getLogger(TaskListClientProtocol.class);
+    private ClientProcess client;
+    private boolean continueConnection = true;
+    private Gradle gradle;
+
+    private Server localServer;   //this is our server that will listen to the process that started us.
+
+    public TaskListClientProtocol(Gradle gradle) {
+        this.gradle = gradle;
+    }
+
+    /**
+     * Gives your protocol a chance to store this client so it can access its functions.
+     */
+    public void initialize(ClientProcess client) {
+        this.client = client;
+        this.gradle.addListener(new RefreshTaskListBuildListener(client));
+    }
+
+    /**
+     * Listener used to delegate gradle messages to our listeners.
+     */
+    private class RefreshTaskListBuildListener extends BuildAdapter implements StandardOutputListener {
+        private ClientProcess client;
+        private StringBuffer allOutputText = new StringBuffer(); //this is potentially threaded, so use StringBuffer instead of StringBuilder
+
+        public RefreshTaskListBuildListener(ClientProcess client) {
+            this.client = client;
+        }
+
+        public synchronized void onOutput(CharSequence output) {
+            String text = output.toString();
+            allOutputText.append(text);
+        }
+
+        /**
+         * <p>Called when the build is completed. All selected tasks have been executed.</p>
+         *
+         * @param buildResult The result of the build. Never null.
+         */
+        @Override
+        public void buildFinished(BuildResult buildResult) {
+            boolean wasSuccessful = buildResult.getFailure() == null;
+            String output = allOutputText.toString();
+
+            if (!wasSuccessful) //if we fail, send the results, otherwise, we'll send the projects.
+            {
+                //we can't send the exception itself because it might not be serializable (it can include anything from anywhere inside gradle
+                //or one of its dependencies). So format it as text.
+                String details = GradlePluginLord.getGradleExceptionMessage(buildResult.getFailure(), gradle.getStartParameter().getShowStacktrace());
+                output += details;
+
+                client.sendMessage(ProtocolConstants.TASK_LIST_COMPLETED_WITH_ERRORS_TYPE, output, wasSuccessful);
+            } else {
+                ProjectConverter buildExecuter = new ProjectConverter();
+                List<ProjectView> projects = new ArrayList<ProjectView>();
+                projects.addAll(buildExecuter.convertProjects(buildResult.getGradle().getRootProject()));
+
+                client.sendMessage(ProtocolConstants.TASK_LIST_COMPLETED_SUCCESSFULLY_TYPE, output, (Serializable) projects);
+            }
+
+            //tell the server we're going to exit.
+            client.sendMessage(ProtocolConstants.EXITING, null, null);
+
+            client.stop();
+        }
+    }
+
+    /**
+     * Notification that we have connected to the server. Do minimum handshaking.
+     *
+     * @return true if we should continue the connection, false if not.
+     */
+    public boolean serverConnected(Socket clientSocket) {
+        MessageObject message = client.readMessage();
+        if (message == null) {
+            return false;
+        }
+
+        if (!ProtocolConstants.HANDSHAKE_TYPE.equalsIgnoreCase(message.getMessageType())) {
+            logger.error("Incorrect server handshaking.");
+            return false;
+        }
+
+        localServer = new Server(new KillGradleServerProtocol());
+        localServer.start();
+
+        client.sendMessage(ProtocolConstants.HANDSHAKE_TYPE, ProtocolConstants.HANDSHAKE_CLIENT, localServer.getPort());
+
+        return true;
+    }
+
+    /**
+     * We just keep a flag around for this.
+     *
+     * @return true if we should keep the connection alive. False if we should stop communicaiton.
+     */
+    public boolean continueConnection() {
+        return continueConnection;
+    }
+
+    public void shutdown() {
+        continueConnection = false;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListServerProtocol.java b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListServerProtocol.java
new file mode 100644
index 0000000..173b54f
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/ipc/gradle/TaskListServerProtocol.java
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.ipc.gradle;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.ipc.basic.MessageObject;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This manages the communication between the UI and an externally-launched copy of Gradle when using socket-based inter-process communication. This is the server side for building a task list. This
+ * listens for messages from the gradle client.
+ *
+ * @author mhunsicker
+ */
+public class TaskListServerProtocol extends AbstractGradleServerProtocol {
+    private final Logger logger = Logging.getLogger(TaskListServerProtocol.class);
+
+    private static final String INIT_SCRIPT_NAME = "refresh-tasks-init-script";
+
+    private ExecutionInteraction executionInteraction;
+
+    public interface ExecutionInteraction {
+        /**
+         * Notification that gradle has started execution. This may not get called if some error occurs that prevents gradle from running.
+         */
+        void reportExecutionStarted();
+
+        /**
+         * Notification that execution has finished. Note: if the client fails to launch at all, this should still be called.
+         *
+         * @param wasSuccessful true if gradle was successful (returned 0)
+         * @param message the output of gradle if it ran. If it didn't, an error message.
+         * @param throwable an exception if one occurred
+         */
+        void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable);
+
+        void projectsPopulated(List<ProjectView> projects);
+
+        void reportLiveOutput(String message);
+    }
+
+    public TaskListServerProtocol(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor, String fullCommandLine, LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel,
+                                  ExecutionInteraction executionInteraction) {
+        super(currentDirectory, gradleHomeDirectory, customGradleExecutor, fullCommandLine, logLevel, stackTraceLevel);
+        this.executionInteraction = executionInteraction;
+    }
+
+    /**
+     * Notification that a message was received that we didn't process. Implement this to handle the specifics of your protocol. Basically, the base class handles the handshake. The rest of the
+     * conversation is up to you.
+     *
+     * @param message the message we received.
+     */
+    @Override
+    protected boolean handleMessageReceived(MessageObject message) {
+        if (ProtocolConstants.TASK_LIST_COMPLETED_WITH_ERRORS_TYPE.equals(
+                message.getMessageType())) {  //if we were NOT successful, we'll have a BuildResultsWrapper instead of a project list as our data.
+            setHasReceivedBuildCompleteNotification();
+
+            return true;
+        }
+
+        if (ProtocolConstants.TASK_LIST_COMPLETED_SUCCESSFULLY_TYPE.equals(
+                message.getMessageType())) {  //if we were successful, we'll have a project list instead of a BuildResultsWrapper as our data.
+            setHasReceivedBuildCompleteNotification();
+
+            List<ProjectView> projects = (List<ProjectView>) message.getData();
+            executionInteraction.projectsPopulated(projects);
+
+            return true;
+        }
+
+        if (ProtocolConstants.EXITING.equals(message.getMessageType())) {
+            closeConnection();   //the client is done.
+            return true;
+        }
+
+        return false;
+    }
+
+    /**
+     * This is called when when the client exits. This does not mean it succeeded. This is probably the only way you'll get ALL of the client's output as it continues to output things like error
+     * messages after it sends us an executionFinished message.
+     *
+     * @param returnCode the return code of the application
+     * @param output its total output
+     */
+    protected void reportClientExit(boolean wasPremature, int returnCode, String output) {
+        /**
+         * Note: we're relying on clientExited to be called to mark a task as complete.
+         * This is because even though gradle sends us a message that it has completed
+         * the build, it hasn't yet output all of its information which is very useful
+         * for debugging.
+         */
+        executionInteraction.reportExecutionFinished(returnCode == 0, output, null);
+    }
+
+    /**
+     * Notification of any status that might be helpful to the user.
+     *
+     * @param status a status message
+     */
+    protected void addStatus(String status) {
+        executionInteraction.reportLiveOutput(status);
+    }
+
+    /**
+     * This is called before we execute a command. Here, return an init script for this protocol. An init script is a gradle script that gets run before the other scripts are processed. This is useful
+     * here for initiating the gradle client that talks to the server.
+     *
+     * @return The path to an init script. Null if you have no init script.
+     */
+    public File getInitScriptFile() {
+        return this.extractInitScriptFile(TaskListServerProtocol.class, INIT_SCRIPT_NAME);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/FileLink.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/FileLink.java
new file mode 100644
index 0000000..30cd87e
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/FileLink.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output;
+
+import org.gradle.foundation.output.definitions.FileLinkDefinition;
+
+import java.io.File;
+
+/**
+ * This represents a link to a file inside gradle's output. This is so the gradle UI/plugins can open the file. This is useful for a user when gradle displays a build error, test failure or compile
+ * error.
+ *
+ * @author mhunsicker
+ */
+public class FileLink {
+    private File file;
+    private int lineNumber;
+    private int startingIndex;
+    private int endingIndex;
+    private FileLinkDefinition matchingDefinition;  //useful for debugging.
+
+    public FileLink(File file, int startingIndex, int endingIndex, int lineNumber, FileLinkDefinition matchingDefinition) {
+        this.file = file;
+        this.startingIndex = startingIndex;
+        this.endingIndex = endingIndex;
+        this.lineNumber = lineNumber;
+        this.matchingDefinition = matchingDefinition;
+    }
+
+    public FileLink(File file, int startingIndex, int endingIndex, int lineNumber) {
+        this(file, startingIndex, endingIndex, lineNumber, null);
+    }
+
+    @Override
+    public String toString() {
+        return "file='" + file + "' startingIndex=" + startingIndex + " endingIndex=" + endingIndex + " line: " + lineNumber + (matchingDefinition != null ? (" definition: " + matchingDefinition
+                .getName()) : "");
+    }
+
+    public int getLength() {
+        return endingIndex - startingIndex;
+    }
+
+    /**
+     * @return the file
+     */
+    public File getFile() {
+        return file;
+    }
+
+    /**
+     * @return the line number into the file. May be -1 if not specified
+     */
+    public int getLineNumber() {
+        return lineNumber;
+    }
+
+    /**
+     * @return the index into the source text where this FileLink begins.
+     */
+    public int getStartingIndex() {
+        return startingIndex;
+    }
+
+    /**
+     * @return the index into the source text where this FileLink ends.
+     */
+    public int getEndingIndex() {
+        return endingIndex;
+    }
+
+    /**
+     * This moves the starting and ending index by the specified amount. This is useful if you're searching within a portion of larger text. This corrects the original indices.
+     *
+     * @param amountToMove how much to move it.
+     */
+    /*package*/ void move(int amountToMove) {
+        startingIndex += amountToMove;
+        endingIndex += amountToMove;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof FileLink)) {
+            return false;
+        }
+
+        FileLink otherFileLink = (FileLink) obj;
+        return otherFileLink.endingIndex == endingIndex && otherFileLink.startingIndex == startingIndex && otherFileLink.lineNumber == lineNumber && otherFileLink.file.equals(file);
+        //we do NOT want to compare the FileLinkDefinition. These aren't set usually for tests and we don't have easy access to them anyway.
+    }
+
+    @Override
+    public int hashCode() {
+        return endingIndex ^ startingIndex ^ lineNumber ^ file.hashCode();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/FileLinkDefinitionLord.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/FileLinkDefinitionLord.java
new file mode 100644
index 0000000..25f35b4
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/FileLinkDefinitionLord.java
@@ -0,0 +1,198 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output;
+
+import org.gradle.foundation.output.definitions.*;
+
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This class holds on FileLinkDefinitions used for searching output.
+ *
+ * @author mhunsicker
+ */
+public class FileLinkDefinitionLord {
+    private List<String> extensions = new ArrayList<String>();
+
+    //these are definitions where the file is between known tokens.
+    private Map<Pattern, FileLinkDefinition> complexFileLinkDefinitions = new LinkedHashMap<Pattern, FileLinkDefinition>();
+
+    //these are definitions where we only try to match based on the file extension.
+    private Map<Pattern, FileLinkDefinition> extensionFileLinkDefinitions = new LinkedHashMap<Pattern, FileLinkDefinition>();
+
+    private Pattern combinedSearchPattern;  //search pattern consisting of all of our sub search patterns
+
+    public FileLinkDefinitionLord() {
+        //this is where we define what files we find.
+
+        //add all the file extension definitions
+        addFileExtension(".java", ":");     //the colon handles compile errors with line numbers
+        addFileExtension(".groovy", ":");
+        addFileExtension(".gradle", ":");
+        addFileExtension(".xml", ":"); //I don't think I've ever seen an xml or html file specified with a line number delimiter, but we'll try it anyway
+        addFileExtension(".html", ":");
+        addFileExtension(".htm", ":");
+
+        //now add the more complex ones
+        addPrefixedFileLink("Ant Compiler Error", "[ant:javac]", ".java", ":");       //handles java compiler errors
+        addPrefixedFileLink("Compiler Warning", "Note:", ".java", null);               //handles java compiler warnings such as deprecated APIs
+        addCustomComplexFileLink(new OptionalLineNumberFileLinkDefinition("Build File Errors", "Build file '", ".gradle", "line:"));       //handles errors in a gradle build file
+        addPrefixedFileLink("Ant Checkstyle Error/Warning", "[ant:checkstyle]", ".java", ":"); //handles checkstyle errors/warnings
+        addPrefixedFileLink("Checkstyle Error (report xml)", "See the report at", ".xml", null);   //handles checkstyle errors. Links to the report xml file.
+        addPrefixedFileLink("Codenarc Error", "See the report at", ".html", null);      //handles Codenarc errors. Links to the report file.
+        addCustomComplexFileLink(new TestReportFileLinkDefinition());
+    }
+
+    /**
+     * Call this to add file extensions to look for in the output. This assumes the file path is the first thing on the line.
+     *
+     * @param extension the file extension
+     * @param lineNumberDelimiter optional delimiter text for line number. Whatever is after this will be assumed to be a line number. We'll only parse the numbers after this so there can be other
+     * stuff after the line number. Pass in null to ignore.
+     */
+    public void addFileExtension(String extension, String lineNumberDelimiter) {
+        if (!extension.startsWith(".")) {
+            extension = "." + extension;
+        }
+
+        extension = extension.toLowerCase();
+        if (extensions.contains(extension)) //don't add extensions already added
+        {
+            return;
+        }
+
+        extensions.add(extension);
+
+        String name = extension + " Files";
+        ExtensionFileLinkDefinition linkDefinition = new ExtensionFileLinkDefinition(name, extension, lineNumberDelimiter);
+        addToMap(extensionFileLinkDefinitions, linkDefinition);
+    }
+
+    /**
+     * Creates a file link definition to find file paths in the output that have a known prefix and extension. It also allows for an optional line number after a delimiter. This is useful if you know
+     * a certain message always precedes a file path.
+     *
+     * @param name the name of this file link definition. Used by tests mostly.
+     * @param prefix the text that is before the file path. It should be enough to make it fairly unique
+     * @param extension the expected file extension. If we don't find this extension, we do not consider the text a file's path. If there are multiple extensions, you'll have to add multiples of
+     * these.
+     * @param lineNumberDelimiter optional delimiter text for line number. Whatever is after this will be assumed to be a line number. We'll only parse the numbers after this so there can be other
+     * stuff after the line number. Pass in null to ignore.
+     */
+    public void addPrefixedFileLink(String name, String prefix, String extension, String lineNumberDelimiter) {
+        PrefixedFileLinkDefinition linkDefinition = new PrefixedFileLinkDefinition(name, prefix, extension, lineNumberDelimiter);
+        addToMap(complexFileLinkDefinitions, linkDefinition);
+    }
+
+    private void addCustomComplexFileLink(FileLinkDefinition fileLinkDefinition) {
+        addToMap(complexFileLinkDefinitions, fileLinkDefinition);
+    }
+
+    private void addToMap(Map<Pattern, FileLinkDefinition> destinationMap, FileLinkDefinition fileLinkDefinition) {
+        //if you change anything, we'll destroy our combined search pattern. This will recreate it with the
+        //latest settings when its next asked for.
+        combinedSearchPattern = null;
+
+        String searchExpression = fileLinkDefinition.getSearchExpression();
+        Pattern pattern = Pattern.compile(searchExpression, getSearchPatternFlags());
+        destinationMap.put(pattern, fileLinkDefinition);
+    }
+
+    /**
+     * @return a list of known file extensions that are searched for in the output.
+     */
+    public List<String> getFileExtensions() {
+        return Collections.unmodifiableList(extensions);
+    }
+
+    /**
+     * @return a list of our FileLinkDefinitions
+     */
+    public List<FileLinkDefinition> getFileLinkDefinitions() {
+        List<FileLinkDefinition> fileLinkDefinitions = new ArrayList<FileLinkDefinition>();
+
+        fileLinkDefinitions.addAll(complexFileLinkDefinitions.values());
+        fileLinkDefinitions.addAll(extensionFileLinkDefinitions.values());
+
+        return Collections.unmodifiableList(fileLinkDefinitions);
+    }
+
+    private int getSearchPatternFlags() {
+        return Pattern.CASE_INSENSITIVE;
+    }
+
+    /**
+     * This returns the FileLinkDefinition whose search pattern 'matches' (as in 'finds', not 'equals') the specified text. The tricky thing here is that multiple FileLinkDefinitions can match the
+     * text. To assist this we've done two things: we first try to match it with the complex patterns (the ones that try to match prefixed and suffixed text around a file's path), then if we don't
+     * find one, we'll match it with a simple extension FileLinkDefinitions. The other thing is that we search the definitions in order. This means the order in which the FileLinkDefinitions are added
+     * can be important. Add the more definitive ones first.
+     *
+     * @param text the text to use to find a match.
+     * @return a FileLinkDefinition that matches the text
+     */
+    public FileLinkDefinition getMatchingFileLinkDefinition(String text) {
+        FileLinkDefinition fileLinkDefinition = getMatchingFileLinkDefinition(text, complexFileLinkDefinitions);
+        if (fileLinkDefinition == null) {
+            fileLinkDefinition = getMatchingFileLinkDefinition(text, extensionFileLinkDefinitions);
+        }
+
+        return fileLinkDefinition;
+    }
+
+    private static FileLinkDefinition getMatchingFileLinkDefinition(String text, Map<Pattern, FileLinkDefinition> map) {
+        Iterator<Pattern> iterator = map.keySet().iterator();
+        while (iterator.hasNext()) {
+            Pattern pattern = iterator.next();
+            Matcher matcher = pattern.matcher(text);
+            if (matcher.find(0)) {
+                return map.get(pattern);
+            }
+        }
+
+        return null;
+    }
+
+    public Pattern getSearchPattern() {
+        if (combinedSearchPattern == null) {
+            //only build it if we need to.
+            combinedSearchPattern = buildSearchPattern();
+        }
+
+        return combinedSearchPattern;
+    }
+
+    /**
+     * This iterates through all the FileLinkDefinitions and builds one giant single RegEx search pattern. This is more efficient than using multiple search patterns.
+     */
+    private Pattern buildSearchPattern() {
+        StringBuilder criteria = new StringBuilder();
+        Iterator<FileLinkDefinition> iterator = getFileLinkDefinitions().iterator();
+        while (iterator.hasNext()) {
+            FileLinkDefinition fileLinkDefinition = iterator.next();
+            String searchExpression = fileLinkDefinition.getSearchExpression();
+
+            criteria.append("(").append(searchExpression).append(")");
+
+            if (iterator.hasNext()) {
+                criteria.append("|");
+            }
+        }
+
+        return Pattern.compile(criteria.toString(), getSearchPatternFlags());
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/LiveOutputParser.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/LiveOutputParser.java
new file mode 100644
index 0000000..6b90b16
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/LiveOutputParser.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a special type of OutputParser. It handles tracking live output. The unique thing about live output is that we're not guaranteed to get whole lines. Also, we don't want to parse parts that
+ * have already been parsed. This holds onto the output until a newline is reached, then parses it. It also tracks the overall index into the output (even though its only parsing a part of it).
+ *
+ * @author mhunsicker
+ */
+public class LiveOutputParser {
+    private OutputParser parser;
+    private List<FileLink> fileLinks = new ArrayList<FileLink>();
+    private StringBuilder totalTextToParse = new StringBuilder();
+    private int lastNewline;
+
+    public LiveOutputParser(FileLinkDefinitionLord fileLinkDefinitionLord, boolean verifyFileExists) {
+        parser = new OutputParser(fileLinkDefinitionLord, verifyFileExists);
+    }
+
+    /**
+     * Removes all text and FileLinks. This is so you can use this on new text
+     */
+    public void reset() {
+        //recreate the parser because its possible the definitions have changed.
+        boolean verifyFileExists = parser.isVerifyFileExists();
+        FileLinkDefinitionLord fileLinkDefinitionLord = parser.getFileLinkDefinitionLord();
+        parser = new OutputParser(fileLinkDefinitionLord, verifyFileExists);
+
+        lastNewline = 0;
+        totalTextToParse.setLength(0);
+        fileLinks.clear();
+    }
+
+    public List<FileLink> appendText(String text) {
+        int oldTotalSize = totalTextToParse.length();
+
+        totalTextToParse.append(text);
+        int indexOfNewline = text.lastIndexOf('\n');
+        if (indexOfNewline == -1) {
+            return Collections.emptyList();  //nothing to search yet
+        }
+
+        //compensate the index for the total size
+        indexOfNewline += oldTotalSize;
+
+        //get everything between the last newline and this one
+        String textToParse = totalTextToParse.substring(lastNewline, indexOfNewline);
+
+        //search it
+        List<FileLink> subFileLinks = parser.parseText(textToParse);
+
+        //for each FileLink we have, we have to correct it's offsets because we didn't search from the beginning.
+        Iterator<FileLink> iterator = subFileLinks.iterator();
+        while (iterator.hasNext()) {
+            FileLink fileLink = iterator.next();
+            fileLink.move(lastNewline);
+        }
+
+        fileLinks.addAll(subFileLinks);
+
+        lastNewline = indexOfNewline;
+
+        return subFileLinks;
+    }
+
+    public List<FileLink> getFileLinks() {
+        return Collections.unmodifiableList(fileLinks);
+    }
+
+    /**
+     * This gets the fileLink at the specified index in the text.
+     *
+     * @param index the index into the overall text.
+     * @return a FileLink if one exists at the index. null if not.
+     */
+    public FileLink getFileLink(int index) {
+        if (index < 0 || index >= totalTextToParse.length()) {
+            return null;
+        }
+
+        Iterator<FileLink> iterator = fileLinks.iterator();
+
+        while (iterator.hasNext()) {
+            FileLink fileLink = iterator.next();
+            if (fileLink.getStartingIndex() <= index && fileLink.getEndingIndex() >= index) {
+                return fileLink;
+            }
+        }
+
+        return null;
+    }
+
+    public String getText() {
+        return totalTextToParse.toString();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/OutputParser.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/OutputParser.java
new file mode 100644
index 0000000..c92e7bb
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/OutputParser.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output;
+
+import org.gradle.foundation.output.definitions.FileLinkDefinition;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This parses gradle's output text looking for links to files. We use RegEx to do the bulk of  the matching. However, we want this to be 'pluggable' (to a degree) so new file links can be added
+ * easily. To accomplish this, this works with FileLinkDefinitions. They require a basic RegEx pattern to match some initial part of the a file link, however, they can be implemented to do more
+ * advanced parsing of the text. The definitions are built-up and held by FileLinkDefinitionLord. This just handles the tedium of matching the all-inclusive pattern with text, managing indices, and
+ * calling the matching FileLinkDefinition to refine the match.
+ *
+ * @author mhunsicker
+ */
+public class OutputParser {
+    private FileLinkDefinitionLord fileLinkDefinitionLord;
+    private boolean verifyFileExists;   //this is really only for testing where the file will not exist.
+
+    public OutputParser(FileLinkDefinitionLord fileLinkDefinitionLord, boolean verifyFileExists) {
+        this.fileLinkDefinitionLord = fileLinkDefinitionLord;
+        this.verifyFileExists = verifyFileExists;
+    }
+
+    public boolean isVerifyFileExists() {
+        return verifyFileExists;
+    }
+
+    public FileLinkDefinitionLord getFileLinkDefinitionLord() {
+        return fileLinkDefinitionLord;
+    }
+
+    /**
+     * This parses the text looking for file links
+     *
+     * @param text the text to parse
+     * @return a list of FileLinks for each file that was found in the text.
+     */
+    public List<FileLink> parseText(String text) {
+        List<FileLink> fileLinks = new ArrayList<FileLink>();
+
+        Pattern combinedSearchPattern = fileLinkDefinitionLord.getSearchPattern();
+        Matcher matcher = combinedSearchPattern.matcher(text);
+
+        int index = 0;
+
+        boolean foundAMatch = matcher.find(index);
+        while (foundAMatch) {
+            // Retrieve matching string
+            String matchedText = matcher.group();
+
+            // Retrieve indices of matching string
+            int start = matcher.start();
+            int end = matcher.end();
+
+            int nextStarting = start;
+
+            //now that we have a match, we have to find the one FileLinkDefinition that actually matches so it
+            //can determine the actual file. This makes the matcher more plugable.
+            FileLinkDefinition fileLinkDefinition = fileLinkDefinitionLord.getMatchingFileLinkDefinition(matchedText);
+            if (fileLinkDefinition != null) {
+                nextStarting = fileLinkDefinition.parseFileLink(text, matchedText, start, end, verifyFileExists, fileLinks);
+            } else {
+                //this is probably a serious problem that needs to be reported. However, we'll continue as if nothing bad happened.
+                System.out.println("We found a match but didn't find the matching definition. Matched text:\n" + text);
+            }
+
+            if (nextStarting == -1 || nextStarting < start) {
+                nextStarting = start;
+            }
+
+            index = nextStarting + 1;
+            if (index < text.length()) {
+                foundAMatch = matcher.find(index);
+            } else {
+                foundAMatch = false; //don't continue searching if we've found the end
+            }
+        }
+
+        return fileLinks;
+    }
+}
+
+
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/ExtensionFileLinkDefinition.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/ExtensionFileLinkDefinition.java
new file mode 100644
index 0000000..5553a14
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/ExtensionFileLinkDefinition.java
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output.definitions;
+
+import org.gradle.foundation.output.FileLink;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is a basic FileLinkDefinition that uses a file's extension and assumes the file is at the beginning of the line. This also allows you to specify an optional line number delimiter. This handles
+ * a delimiter after the path to specify a line number (the delimiter cannot be before the path).
+ *
+ * Here's a sample line output from a compile error: /home/someguy/path/etc/etc.java:186: cannot find symbol
+ *
+ * @author mhunsicker
+ */
+public class ExtensionFileLinkDefinition implements FileLinkDefinition {
+    private String expression;
+    private String lineNumberDelimiter;
+    private String extension;
+    private String name;
+
+    public ExtensionFileLinkDefinition(String name, String extension) {
+        this(name, extension, null);
+    }
+
+    public ExtensionFileLinkDefinition(String name, String extension, String lineNumberDelimiter) {
+        this.name = name;
+        this.lineNumberDelimiter = lineNumberDelimiter;
+        this.extension = extension;
+
+        this.expression = ".*\\" + extension;  //the ending slashes here are to escape the dot on the extension
+
+        if (lineNumberDelimiter != null) {
+            this.expression += generateLineNumberExpression(lineNumberDelimiter);
+        }
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    protected String generateLineNumberExpression(String lineNumberDelimiter) {
+        //there may be a space before the delimiter so we quote the delimiter, possible space,
+        //followed by numbers
+        return PrefixedFileLinkDefinition.quoteLiteral(lineNumberDelimiter) + "\\s*\\d*";
+    }
+
+    public String getSearchExpression() {
+        return expression;
+    }
+
+    /**
+     * This is called for each match. Parse this to turn it into a FileLink.
+     *
+     * <!      Name        Description>
+     *
+     * @param fullSearchTest the full text that was searched
+     * @param matchedText the text that was matched
+     * @param start the index into the entire searched text where the matchedText starts
+     * @param end the index into the entire searched text where the matchedText ends
+     * @return a FileLink or null if this is a false positive
+     */
+    public int parseFileLink(String fullSearchTest, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks) {
+        int extensionIndex = lastIndexOfCaseInsensitive(matchedText, extension);
+        if (extensionIndex == -1) //this shouldn't happen unless the extension is not included
+        {
+            return -1;
+        }
+
+        int prefixIndex = getStartOfFile(
+                matchedText);   //we don't want to jst assume its the very first character. It probably is, but it might have spaces in front of it. This ensures the UI doesn't underline a space.
+        int realPathEnd = extensionIndex + extension.length();
+        String path = matchedText.substring(prefixIndex, realPathEnd).trim();
+
+        File file = new File(path);
+        if (verifyFileExists && !file.exists())  //so we can optionally disable this for testing.
+        {
+            return -1;
+        }
+
+        String remainder = matchedText.substring(realPathEnd);
+        int lineNumber = PrefixedFileLinkDefinition.getLineNumber(remainder, lineNumberDelimiter);
+
+        fileLinks.add(new FileLink(file, start + prefixIndex, end, lineNumber, this));
+        return end;
+    }
+
+    public static int lastIndexOfCaseInsensitive(String sourceText, String alreadyLowerCaseSoughtText) {
+        sourceText = sourceText.toLowerCase();
+        return sourceText.lastIndexOf(alreadyLowerCaseSoughtText);
+    }
+
+    /**
+     * This returns the index character that is the start of the file path. Basically, this skips over whitespace that may be between the prefix and the path.
+     *
+     * @param matchedText the text that was matched
+     * @return the index of the start of the file
+     */
+    private int getStartOfFile(String matchedText) {
+        int index = 0;
+        while (Character.isWhitespace(matchedText.charAt(index))) {
+            index++;
+        }
+
+        return index;
+    }
+
+    @Override
+    public String toString() {
+        return "Name: '" + name + "'" + " Expression ='" + expression + '\'' + " LineNumberDelimter='" + lineNumberDelimiter + '\'' + " Extension='" + extension + '\'';
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/FileLinkDefinition.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/FileLinkDefinition.java
new file mode 100644
index 0000000..4629727
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/FileLinkDefinition.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output.definitions;
+
+import org.gradle.foundation.output.FileLink;
+
+import java.util.List;
+
+/**
+ * .
+ *
+ * @author mhunsicker
+ */
+public interface FileLinkDefinition {
+    /**
+     * @return a name that really only useful for debugging
+     */
+    String getName();
+
+    /**
+     * @return the regular expression used to find a potential FileLink
+     */
+    String getSearchExpression();
+
+    /**
+     * This is called for each match. Parse this to turn it into a FileLink.
+     *
+     * <!    Name        Description>
+     *
+     * @param fullSearchText the full text that was searched
+     * @param matchedText the text that was matched
+     * @param start the index into the entire searched text where the matchedText starts
+     * @param end the index into the entire searched text where the matchedText ends
+     * @return a FileLink or null if this is a false positive
+     */
+    int parseFileLink(String fullSearchText, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks);
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/OptionalLineNumberFileLinkDefinition.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/OptionalLineNumberFileLinkDefinition.java
new file mode 100644
index 0000000..55a31c4
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/OptionalLineNumberFileLinkDefinition.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output.definitions;
+
+/**
+ * This is just like BasicFileLinkDefinition except that the line number delimiter is optional and it allows spaces between the file and the delimiter.
+ *
+ * @author mhunsicker
+ */
+public class OptionalLineNumberFileLinkDefinition extends PrefixedFileLinkDefinition {
+    public OptionalLineNumberFileLinkDefinition(String name, String prefix, String extension, String lineNumberDelimiter) {
+        super(name, prefix, extension, lineNumberDelimiter);
+    }
+
+    /**
+     * This has been overridden to optionally look for a line number delimiter.
+     */
+    @Override
+    protected String generateLineNumberExpression(String lineNumberDelimiter) {
+        return "(.*" + quoteLiteral(lineNumberDelimiter) + ".*\\d*)?";
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/PrefixedFileLinkDefinition.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/PrefixedFileLinkDefinition.java
new file mode 100644
index 0000000..ed5b346
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/PrefixedFileLinkDefinition.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output.definitions;
+
+import org.gradle.foundation.output.FileLink;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is a basic FileLinkDefinition that uses a prefix, file extension to identify files. This also allows you to specify an optional line number delimiter. This will handle files where the error
+ * always has a specific prefix ([ant:javac]) and always has a known extension (.java). It also handles a delimiter after the path to specify a line number (the delimiter cannot be before the path).
+ *
+ * Here's a sample line output from an ant compile error: [ant:javac] /home/someguy/path/etc/etc.java:186: cannot find symbol
+ *
+ * Here's a sample line output from gradle when it encounters an exception: Build file '/home/someguy/path/etc/etc/build.gradle'
+ *
+ * @author mhunsicker
+ */
+public class PrefixedFileLinkDefinition implements FileLinkDefinition {
+    private String expression;
+    private String prefix;
+    private String lineNumberDelimiter;
+    private String extension;
+    private String name;
+
+    public PrefixedFileLinkDefinition(String name, String prefix, String extension) {
+        this(name, prefix, extension, null);
+    }
+
+    /**
+     * @param name the name of this file link definition. Used by tests mostly.
+     * @param prefix the text that is before the file path. It should be enough to make it fairly unique
+     * @param extension the expected file extension. If we don't find this extension, we do not consider the text a file's path. If there are multiple extensions, you'll have to add multiples of
+     * these.
+     * @param lineNumberDelimiter optional delimiter text for line number. Whatever is after this will be assumed to be a line number. We'll only parse the numbers after this so there can be other
+     * stuff after the line number. Pass in null to ignore.
+     */
+    public PrefixedFileLinkDefinition(String name, String prefix, String extension, String lineNumberDelimiter) {
+        this.name = name;
+        this.prefix = prefix;
+        this.lineNumberDelimiter = lineNumberDelimiter;
+        this.extension = extension;
+
+        String regExLiteralPrefix = quoteLiteral(prefix);
+        this.expression = regExLiteralPrefix + ".*\\" + extension;  //the ending slashes here are to escape the dot on the extension
+
+        if (lineNumberDelimiter != null) {
+            this.expression += generateLineNumberExpression(lineNumberDelimiter);
+        }
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    protected String generateLineNumberExpression(String lineNumberDelimiter) {
+        return quoteLiteral(lineNumberDelimiter) + "\\d*";
+    }
+
+    //This quotes the literal so it can be used in a regex without worrying about
+    //manually escaping any special characters. This does what Matcher.quoteReplacement()
+    //should do (but that seems to only handle $ and ").
+    public static String quoteLiteral(String literal) {
+        StringBuilder builder = new StringBuilder();
+
+        for (int index = 0; index < literal.length(); index++) {
+            char c = literal.charAt(index);
+            if (isEscapedCharater(c)) {
+                builder.append('\\').append(c);
+            } else {
+                builder.append(c);
+            }
+        }
+
+        return builder.toString();
+    }
+
+    private static boolean isEscapedCharater(char c) {
+        return c == '[' || c == ']' || c == '(' || c == ')' || c == '{' || c == '}' || c == '\\' || c == '"' || c == '$' || c == '&' || c == '|' || c == '^' || c == '?' || c == '*' || c == '.';
+    }
+
+    public String getSearchExpression() {
+        return expression;
+    }
+
+    /**
+     * This is called for each match. Parse this to turn it into a FileLink.
+     *
+     * <!      Name        Description>
+     *
+     * @param fullSearchTest the full text that was searched
+     * @param matchedText the text that was matched
+     * @param start the index into the entire searched text where the matchedText starts
+     * @param end the index into the entire searched text where the matchedText ends
+     * @return a FileLink or null if this is a false positive
+     */
+    public int parseFileLink(String fullSearchTest, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks) {
+        int extensionIndex = matchedText.lastIndexOf(extension);
+        if (extensionIndex == -1) //this shouldn't happen unless the extension is not included
+        {
+            return -1;
+        }
+
+        int prefixIndex = getStartOfFile(matchedText);
+        int realPathEnd = extensionIndex + extension.length();
+        String path = matchedText.substring(prefixIndex, realPathEnd).trim();
+
+        File file = new File(path);
+        if (verifyFileExists && !file.exists())  //so we can optionally disable this for testing.
+        {
+            return -1;
+        }
+
+        String remainder = matchedText.substring(realPathEnd);
+        int lineNumber = getLineNumber(remainder, lineNumberDelimiter);
+
+        fileLinks.add(new FileLink(file, start + prefixIndex, end, lineNumber, this));
+        return end;
+    }
+
+    /**
+     * This returns the index character that is the start of the file path. Basically, this skips over whitespace that may be between the prefix and the path.
+     *
+     * @param matchedText the text that was matched
+     * @return the index of the start of the file
+     */
+    private int getStartOfFile(String matchedText) {
+        int index = prefix.length();
+        while (Character.isWhitespace(matchedText.charAt(index))) {
+            index++;
+        }
+
+        return index;
+    }
+
+    public static int getLineNumber(String textAfterPath, String lineNumberDelimiter) {
+        if (lineNumberDelimiter != null) {
+            int lineDelimterIndex = textAfterPath.indexOf(lineNumberDelimiter);
+            if (lineDelimterIndex != -1) {
+                String lineNumberText = textAfterPath.substring(lineDelimterIndex + lineNumberDelimiter.length());
+
+                lineNumberText = lineNumberText.trim();
+                lineNumberText = getConsecutiveNumbers(lineNumberText);
+                if (!"".equals(lineNumberText)) {
+                    return Integer.parseInt(lineNumberText);
+                }
+            }
+        }
+
+        return -1;
+    }
+
+    /**
+     * This returns the first grouping of consecutive numbers. This is used to extract line numbers from a line that may have additional things immediately after the number. This assumes the first
+     * character is already a number. If it is not, you'll get a blank string being returned.
+     *
+     * @param text the text to search
+     * @return a string consisting of only numbers.
+     */
+    public static String getConsecutiveNumbers(String text) {
+        StringBuilder numbersOnly = new StringBuilder();
+
+        boolean keepLooking = true;
+        int index = 0;
+        while (keepLooking && index < text.length()) {
+            char c = text.charAt(index);
+            if (Character.isDigit(c)) {
+                numbersOnly.append(c);
+            } else {
+                keepLooking = false;
+            }
+            index++;
+        }
+
+        return numbersOnly.toString();
+    }
+
+    @Override
+    public String toString() {
+        return "Name: '" + name + "'" + " Expression ='" + expression + '\'' + " Prefix='" + prefix + '\'' + " LineNumberDelimter='" + lineNumberDelimiter + '\'' + " Extension='" + extension + '\'';
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/TestReportFileLinkDefinition.java b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/TestReportFileLinkDefinition.java
new file mode 100644
index 0000000..b2b68f8
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/output/definitions/TestReportFileLinkDefinition.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.output.definitions;
+
+import org.gradle.foundation.output.FileLink;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This is a special FileLinkDefinition for handling test reports. At the time of this writing, the test reports error message merely told you the directory to visit, not the actual file. So this
+ * appends 'index.html' to the directory to generate the file.
+ *
+ * @author mhunsicker
+ */
+public class TestReportFileLinkDefinition implements FileLinkDefinition {
+    private String expression;
+    private String prefix;
+
+    public TestReportFileLinkDefinition() {
+        prefix = "There were failing tests. See the report at ";
+        expression = prefix + ".*";
+    }
+
+    public String getSearchExpression() {
+        return expression;
+    }
+
+    /**
+     * This is called for each match. Parse this to turn it into a FileLink. We're actually looking for a sentence, so we find the period, then get whatever's between it and our prefix, then we have
+     * our directory.
+     *
+     * <!      Name        Description>
+     *
+     * @param fullSearchTest the full text that was searched
+     * @param matchedText the text that was matched
+     * @param start the index into the entire searched text where the matchedText starts
+     * @param end the index into the entire searched text where the matchedText ends
+     * @return a FileLink or null if this is a false positive
+     */
+    public int parseFileLink(String fullSearchTest, String matchedText, int start, int end, boolean verifyFileExists, List<FileLink> fileLinks) {
+        int indexOfPeriod = matchedText.lastIndexOf('.');   //the path ends with a dot
+        if (indexOfPeriod == -1) {
+            return -1;
+        }
+
+        String path = matchedText.substring(prefix.length(), indexOfPeriod).trim();
+        File directory = new File(path);
+        if (verifyFileExists && !directory.exists()) {
+            return -1;
+        }
+
+        File file = new File(directory, "index.html");
+        if (verifyFileExists && !file.exists()) {
+            return -1;
+        }
+
+        fileLinks.add(new FileLink(file, start + prefix.length(), end, -1, this));
+        return end;
+    }
+
+    @Override
+    public String toString() {
+        return getName();
+    }
+
+    public String getName() {
+        return "TestReportFileLinkDefinition";
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/queue/ExecutionQueue.java b/subprojects/ui/src/main/java/org/gradle/foundation/queue/ExecutionQueue.java
new file mode 100644
index 0000000..405ab68
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/queue/ExecutionQueue.java
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.queue;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.LinkedBlockingQueue;
+
+/**
+ * This class abstracts running multiple tasks consecutively. This exists because I'm not certain that Gradle is thread-safe and on Windows, running tasks that require lots of disk I/O get
+ * considerably slower when run concurrently. This will allow requests to be made and they will run as soon as any previous requests have finished.
+ *
+ * @author mhunsicker
+ */
+public class ExecutionQueue<R extends ExecutionQueue.Request> {
+    private final Logger logger = Logging.getLogger(ExecutionQueue.class);
+    private volatile LinkedBlockingQueue<R> requests = new LinkedBlockingQueue<R>();
+
+    private Thread executionThread;
+
+    /**
+     * This removes the complexities of managing queued up requests across threads. Implement this to define what to do when a request is made.
+     */
+    public interface ExecutionInteraction<R> {
+        /**
+         * When this is called, execute the given request.
+         *
+         * @param request the request to execute.
+         */
+        void execute(R request);
+    }
+
+    /**
+     * Marker interface for a request. It contains the command line to execute and some other information.
+     */
+    public interface Request {
+
+        /**
+         * Marker interface for types. This defines a high-level category of this request (Refresh and Execution are the only types at the moment).
+         */
+        public interface Type {
+        }
+
+        /**
+         * @return the type of request.
+         */
+        public Type getType();
+    }
+
+    public ExecutionQueue(ExecutionInteraction<R> executeInteraction) {
+        executionThread = new Thread(new ExecutionThread(executeInteraction));
+
+        //This seems to solve some classloader issues. Actually, I did this in the SwingWorker thread when refreshing the tasks
+        //and it cleared up SOME problems, so I'm doing it here as well.
+        executionThread.setContextClassLoader(getClass().getClassLoader());
+        executionThread.start();
+    }
+
+    /**
+     * Call this to add a task to the execution queue. It will be executed as soon as the current task has completed.
+     *
+     * @param request the requested task
+     */
+    public void addRequestToQueue(R request) {
+        requests.offer(request);
+    }
+
+    public boolean removeRequestFromQueue(R request) {
+        return requests.remove(request);
+    }
+
+    public boolean hasRequests() {
+        return !requests.isEmpty();
+    }
+
+    public List<R> getRequests() {
+        return new ArrayList<R>(requests);
+    }
+
+    /**
+     * This waits until the next request is available.
+     *
+     * @return the next request.
+     */
+    private R getNextAvailableRequest() {
+        try {
+            return requests.take();
+        } catch (InterruptedException e) {
+            logger.error("Getting next available request", e);
+            return null;
+        }
+    }
+
+    /**
+     * This thread actually launches the gradle commands. It waits until a new request is added, then it executes it.
+     */
+    private class ExecutionThread implements Runnable {
+        private ExecutionInteraction<R> executeInteraction;
+
+        private ExecutionThread(ExecutionInteraction<R> executeInteraction) {
+            this.executeInteraction = executeInteraction;
+        }
+
+        public void run() {
+            while (true) {
+                R request = getNextAvailableRequest();
+                if (request != null) {
+                    executeInteraction.execute(request);
+                }
+            }
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/visitors/AllProjectsAndTasksVisitor.java b/subprojects/ui/src/main/java/org/gradle/foundation/visitors/AllProjectsAndTasksVisitor.java
new file mode 100644
index 0000000..771582e
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/visitors/AllProjectsAndTasksVisitor.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.visitors;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.gradleplugin.foundation.filters.AllowAllProjectAndTaskFilter;
+import org.gradle.gradleplugin.foundation.filters.ProjectAndTaskFilter;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This visits all projects and their subprojects and tasks in a hierarchal manner. Useful if you need to do some processing with each one.
+ *
+ * @author mhunsicker
+ */
+public class AllProjectsAndTasksVisitor {
+    /*
+          Visitor allowing you to do whatever you like with a project or task.
+       @author mhunsicker
+    */
+
+    public interface Visitor<P, T> {
+        /*
+           This is called for each project.
+         @param  project    the project
+         @param  parentProjectObject whatever you handed back from a prior call to
+            visitProject if this is a sub project. Otherwise, it'll be whatever
+            was passed into the visitPojectsAndTasks function.
+           @return an object that will be handed back to you for each of this
+                   project's tasks.
+           @author mhunsicker
+        */
+
+        public P visitProject(ProjectView project, P parentProjectObject);
+
+        /*
+           This is called for each task.
+
+         @param  task               the task
+         @param  tasksProject       the project for this task
+         @param  userProjectObject  whatever you returned from the parent project's visitProject
+           @author mhunsicker
+        */
+
+        public T visitTask(TaskView task, ProjectView tasksProject, P userProjectObject);
+    }
+
+    /*
+       This visitor will visit each project, sub-project and task that was discovered
+       by the GradleHelper. This is useful for building a list or tree of
+       projects and tasks.
+
+       This is the same as the other version of visitProjectsAndTasks except this
+       one visits everything.
+
+       @author mhunsicker
+    */
+
+    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor, P rootProjectObject) {
+        visitProjectAndTasks(projects, visitor, new AllowAllProjectAndTaskFilter(), rootProjectObject);
+    }
+
+    /*
+       This visitor will visit each project, sub-project and task that was discovered
+       by the GradleHelper. This is useful for building a list or tree of
+       projects and tasks.
+
+       @param  visitor    this notified you of each project and task.
+       @param  filter     allows you to skip projects and tasks as specified by the filter.
+       @param  rootProjectObject whatever you pass here will be passed to the
+                root-level projects as parentProjectObject.
+       @author mhunsicker
+    */
+
+    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor, ProjectAndTaskFilter filter, P rootProjectObject) {
+        visitProjects(visitor, filter, projects, rootProjectObject);
+    }
+
+    public static <P, T> List<P> visitProjects(Visitor<P, T> visitor, ProjectAndTaskFilter filter, List<ProjectView> projects, P parentProjectObject) {
+        List<P> projectObjects = new ArrayList<P>();
+
+        Iterator<ProjectView> iterator = projects.iterator();
+        while (iterator.hasNext()) {
+            ProjectView project = iterator.next();
+
+            if (filter.doesAllowProject(project)) {
+                P userProjectObject = visitor.visitProject(project, parentProjectObject);
+                projectObjects.add(userProjectObject);
+
+                //visit sub projects
+                visitProjects(visitor, filter, project.getSubProjects(), userProjectObject);
+
+                //visit tasks
+                visitTasks(visitor, filter, project, userProjectObject);
+            }
+        }
+
+        return projectObjects;
+    }
+
+    /*
+       Add the list of tasks to the parent tree node.
+
+       @author mhunsicker
+    */
+
+    private static <P, T> List<T> visitTasks(Visitor<P, T> visitor, ProjectAndTaskFilter filter, ProjectView project, P userProjectObject) {
+        List<T> taskObjects = new ArrayList<T>();
+        Iterator<TaskView> iterator = project.getTasks().iterator();
+        while (iterator.hasNext()) {
+            TaskView task = iterator.next();
+
+            if (filter.doesAllowTask(task)) {
+                T taskObject = visitor.visitTask(task, project, userProjectObject);
+                taskObjects.add(taskObject);
+            }
+        }
+
+        return taskObjects;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/visitors/TaskTreePopulationVisitor.java b/subprojects/ui/src/main/java/org/gradle/foundation/visitors/TaskTreePopulationVisitor.java
new file mode 100644
index 0000000..5e62626
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/visitors/TaskTreePopulationVisitor.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.visitors;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.gradleplugin.foundation.filters.AllowAllProjectAndTaskFilter;
+import org.gradle.gradleplugin.foundation.filters.ProjectAndTaskFilter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This visits each project and task in a hierarchical manner. This visitor is specifically meant to walk the projects first and tasks second for the purpose of populating a tree where the
+ * projects/subprojects are first and the tasks are second.
+ *
+ * @author mhunsicker
+ */
+public class TaskTreePopulationVisitor {
+    public interface Visitor<P, T> {
+        /*
+           This is called for each project.
+         @param  project    the project
+         @param indexOfProject
+         @param  parentProjectObject whatever you handed back from a prior call to
+                 visitProject if this is a sub project. Otherwise, it'll be whatever
+                 was passed into the visitPojectsAndTasks function.
+           @return an object that will be handed back to you for each of this
+                   project's tasks.
+           @author mhunsicker
+        */
+
+        public P visitProject(ProjectView project, int indexOfProject, P parentProjectObject);
+
+        /*
+           This is called for each task.
+
+         @param  task               the task
+         @param indexOfTask
+         @param  tasksProject       the project for this task
+         @param  userProjectObject  whatever you returned from the parent project's visitProject
+           @author mhunsicker
+        */
+
+        public T visitTask(TaskView task, int indexOfTask, ProjectView tasksProject, P userProjectObject);
+
+        /*
+           This is called when a project has been visited completely and is just a
+           notification giving you an opportunity to do whatever you like.
+           This is possibly where you want to delete any nodes that we didn't
+           visit.
+
+           @param  parentProjectObject the object that represents the parent of
+                                       the project and task objects below
+           @param  projectObjects      a list of whatever you returned from visitProject
+           @param  taskObjects         a list of whatever you returned from visitTask
+           @author mhunsicker
+        */
+
+        public void completedVisitingProject(P parentProjectObject, List<P> projectObjects, List<T> taskObjects);
+    }
+
+    /*
+       This visitor will visit each project, sub-project and task that was discovered
+       by the GradleHelper. This is useful for building a list or tree of
+       projects and tasks.
+
+       This is the same as the other version of visitProjectsAndTasks except this
+       one visits everything.
+
+       @author mhunsicker
+    */
+
+    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor, P rootProjectObject) {
+        visitProjectAndTasks(projects, visitor, new AllowAllProjectAndTaskFilter(), rootProjectObject);
+    }
+
+    /*
+       This visitor will visit each project, sub-project and task that was discovered
+       by the GradleHelper. This is useful for building a list or tree of
+       projects and tasks.
+
+       @param  visitor    this notified you of each project and task.
+       @param  filter     allows you to skip projects and tasks as specified by the filter.
+       @param  rootProjectObject whatever you pass here will be passed to the
+                root-level projects as parentProjectObject.
+       @author mhunsicker
+    */
+
+    public static <P, T> void visitProjectAndTasks(List<ProjectView> projects, Visitor<P, T> visitor, ProjectAndTaskFilter filter, P rootProjectObject) {
+        List<P> userProjectObjects = visitProjects(visitor, filter, projects, rootProjectObject);
+
+        //notify the visitation of the root projects. There are no tasks for this one, but there are projects.
+        visitor.completedVisitingProject(rootProjectObject, userProjectObjects, Collections.EMPTY_LIST);
+    }
+
+    private static <P, T> List<P> visitProjects(Visitor<P, T> visitor, ProjectAndTaskFilter filter, List<ProjectView> projects, P parentProjectObject) {
+        List<P> projectObjects = new ArrayList<P>();
+
+        Iterator<ProjectView> iterator = projects.iterator();
+        int index = 0;
+        while (iterator.hasNext()) {
+            ProjectView project = iterator.next();
+
+            if (filter.doesAllowProject(project)) {
+                P userProjectObject = visitor.visitProject(project, index, parentProjectObject);
+                projectObjects.add(userProjectObject);
+
+                //visit sub projects
+                List<P> subProjectObjects = visitProjects(visitor, filter, project.getSubProjects(), userProjectObject);
+
+                //visit tasks. Notice that we pass in the number of subprojects as a starting index. This is so they'll come afterwards.
+                List<T> taskObjects = visitTasks(visitor, filter, project, subProjectObjects.size(), userProjectObject);
+
+                visitor.completedVisitingProject(userProjectObject, subProjectObjects, taskObjects);
+            }
+            index++;
+        }
+
+        return projectObjects;
+    }
+
+    /*
+       Add the list of tasks to the parent tree node.
+
+       @author mhunsicker
+    */
+
+    private static <P, T> List<T> visitTasks(Visitor<P, T> visitor, ProjectAndTaskFilter filter, ProjectView project, int startingIndex, P userProjectObject) {
+        List<T> taskObjects = new ArrayList<T>();
+        Iterator<TaskView> iterator = project.getTasks().iterator();
+        int index = startingIndex;
+        while (iterator.hasNext()) {
+            TaskView task = iterator.next();
+
+            if (filter.doesAllowTask(task)) {
+                T taskObject = visitor.visitTask(task, index, project, userProjectObject);
+                taskObjects.add(taskObject);
+            }
+            index++;
+        }
+
+        return taskObjects;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/foundation/visitors/UniqueNameProjectAndTaskVisitor.java b/subprojects/ui/src/main/java/org/gradle/foundation/visitors/UniqueNameProjectAndTaskVisitor.java
new file mode 100644
index 0000000..ad09ed0
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/foundation/visitors/UniqueNameProjectAndTaskVisitor.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation.visitors;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * This visitor builds up a list of unqiuely named projects and tasks. The projects will be their full path, so they're all unique.
+ *
+ * @author mhunsicker
+ */
+public class UniqueNameProjectAndTaskVisitor implements AllProjectsAndTasksVisitor.Visitor<Object, Object> {
+    private List<String> taskNames = new ArrayList<String>();
+    private List<String> projectNames = new ArrayList<String>();
+
+    public List<String> getTaskNames() {
+        return taskNames;
+    }
+
+    public List<String> getProjectNames() {
+        return projectNames;
+    }
+
+    public List<String> getSortedTaskNames() {
+        ArrayList<String> tasks = new ArrayList<String>(taskNames);
+        Collections.sort(tasks);
+        return tasks;
+    }
+
+    public List<String> getSortedProjectNames() {
+        ArrayList<String> projects = new ArrayList<String>(projectNames);
+        Collections.sort(projects);
+        return projects;
+    }
+
+    /*
+    This is called for each project.
+    @param project             the project
+    @param parentProjectObject whatever you handed back from a prior call to
+                               visitProject if this is a sub project. Otherwise,
+                               it'll be whatever was passed into the
+                               visitPojectsAndTasks function.
+    @return always null
+    @author mhunsicker
+    */
+
+    public Object visitProject(ProjectView project, Object parentProjectObject) {
+        String name = project.getFullProjectName();
+        if (!projectNames.contains(name)) {
+            projectNames.add(name);
+        }
+
+        return null;
+    }
+
+    /*
+    This is called for each task.
+    @param task              the task
+    @param tasksProject      the project for this task
+    @param userProjectObject always null.
+    @author mhunsicker
+    */
+
+    public Object visitTask(TaskView task, ProjectView tasksProject, Object userProjectObject) {
+        String name = task.getName();
+        if (!taskNames.contains(name)) {
+            taskNames.add(name);
+        }
+
+        return null;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/CommandLineArgumentAlteringListener.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/CommandLineArgumentAlteringListener.java
new file mode 100644
index 0000000..542e2b8
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/CommandLineArgumentAlteringListener.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation;
+
+/**
+ * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for example,
+ * an init script.
+ *
+ * @author mhunsicker
+ */
+public interface CommandLineArgumentAlteringListener {
+    /**
+     * This is called when you can add additional command line arguments. Return any additional arguments to add. This doesn't modify the existing commands.
+     *
+     * @return any command lines to add or null to leave it alone
+     */
+    public String getAdditionalCommandLineArguments(String commandLineArguments);
+}
+
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/DOM4JSerializer.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/DOM4JSerializer.java
new file mode 100644
index 0000000..1e9ff86
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/DOM4JSerializer.java
@@ -0,0 +1,262 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation;
+
+import org.dom4j.Document;
+import org.dom4j.DocumentHelper;
+import org.dom4j.Element;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.XMLWriter;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.gradleplugin.foundation.settings.DOM4JSettingsNode;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.*;
+
+/**
+ * This saves and reads thing to and from DOM structures.
+ *
+ * @author mhunsicker
+ */
+public class DOM4JSerializer {
+    private static final Logger LOGGER = Logging.getLogger(DOM4JSerializer.class);
+
+    /**
+     * Implement this when you export a file. This allows to interactively ask the user (or automated test) questions as we need answers.
+     */
+    public interface ExportInteraction {
+        /**
+         * This is called when you should ask the user for a destination file of a save.
+         *
+         * @param fileFilter describes the allowed file type. Suitable for passing to JFileChooser.
+         * @return a file to save to or null to cancel.
+         */
+        public File promptForFile(FileFilter fileFilter);
+
+        /**
+         * Report an error that occurred. The save failed.
+         *
+         * @param error the error message.
+         */
+        public void reportError(String error);
+
+        /**
+         * The file already exists. Confirm whether or not you want to overwrite it.
+         *
+         * @param file the file in question
+         * @return true to overwrite it, false not to.
+         */
+        boolean confirmOverwritingExisingFile(File file);
+    }
+
+    /**
+     * Call this to save the JDOMSerializable to a file. This handles confirming overwriting an existing file as well as ensuring the extension is correct based on the passed in fileFilter.
+     */
+    public static void exportToFile(String rootElementTag, ExportInteraction exportInteraction, ExtensionFileFilter fileFilter, SettingsSerializable... serializables) {
+        File file = promptForFile(exportInteraction, fileFilter);
+        if (file == null) {
+            //the user canceled.
+            return;
+        }
+
+        FileOutputStream fileOutputStream = null;
+        try {
+            fileOutputStream = new FileOutputStream(file);
+        } catch (FileNotFoundException e) {
+            LOGGER.error("Could not write to file: " + file.getAbsolutePath(), e);
+            exportInteraction.reportError("Could not write to file: " + file.getAbsolutePath());
+            return;
+        }
+
+        try {
+            XMLWriter xmlWriter = new XMLWriter(fileOutputStream, OutputFormat.createPrettyPrint());
+
+            Document document = DocumentHelper.createDocument();
+            Element rootElement = document.addElement(rootElementTag);
+            DOM4JSettingsNode settingsNode = new DOM4JSettingsNode(rootElement);
+            for (int index = 0; index < serializables.length; index++) {
+                SettingsSerializable serializable = serializables[index];
+                try {  //don't let a single serializer stop the entire thing from being written in.
+                    serializable.serializeOut(settingsNode);
+                } catch (Exception e) {
+                    LOGGER.error("serializing", e);
+                }
+            }
+            xmlWriter.write(document);
+        } catch (Throwable t) {
+            LOGGER.error("Failed to save", t);
+            exportInteraction.reportError("Internal error. Failed to save.");
+        } finally {
+            closeQuietly(fileOutputStream);
+        }
+    }
+
+    public static void exportToFile(ExportInteraction exportInteraction, ExtensionFileFilter fileFilter, DOM4JSettingsNode settingsNode) {
+        File file = promptForFile(exportInteraction, fileFilter);
+        if (file == null) {
+            //the user canceled.
+            return;
+        }
+
+        FileOutputStream fileOutputStream = null;
+        try {
+            fileOutputStream = new FileOutputStream(file);
+        } catch (FileNotFoundException e) {
+            LOGGER.error("Could not write to file: " + file.getAbsolutePath(), e);
+            exportInteraction.reportError("Could not write to file: " + file.getAbsolutePath());
+            return;
+        }
+
+        try {
+            XMLWriter xmlWriter = new XMLWriter(fileOutputStream, OutputFormat.createPrettyPrint());
+            Element rootElement = settingsNode.getElement();
+            rootElement.detach();
+
+            Document document = DocumentHelper.createDocument(rootElement);
+
+            xmlWriter.write(document);
+        } catch (Throwable t) {
+            LOGGER.error("Internal error. Failed to save.", t);
+            exportInteraction.reportError("Internal error. Failed to save.");
+        } finally {
+            closeQuietly(fileOutputStream);
+        }
+    }
+
+    /**
+     * This prompts the user for a file. It may exist, so we have to confirm overwriting it. This will sit in a loop until the user cancels or gives us a valid file. This also makes sure the extension
+     * is correct.
+     */
+    private static File promptForFile(ExportInteraction exportInteraction, ExtensionFileFilter fileFilter) {
+        boolean promptAgain = false;
+        File file = null;
+        int counter = 0;
+        do {
+            promptAgain = false;
+            file = exportInteraction.promptForFile(fileFilter);
+            if (file != null) {
+                file = ensureFileHasCorrectExtensionAndCase(file, fileFilter.getExtension());
+
+                if (file.exists()) {
+                    promptAgain = !exportInteraction.confirmOverwritingExisingFile(file);
+                }
+            }
+
+            counter++;
+        } while (promptAgain && counter < 1000);   //the counter is just to make sure any tests that use this don't get stuck in an infinite loop (they may return the same thing from promptForFile).
+
+        return file;
+    }
+
+    //
+
+    /**
+     * Implement this when you import a file. This allows to interactively ask the user (or automated test) questions as we need answers.
+     */
+    public interface ImportInteraction {
+        /**
+         * This is called when you should ask the user for a source file to read.
+         *
+         * @return a file to read or null to cancel.
+         */
+        public File promptForFile(FileFilter fileFilters);
+
+        /**
+         * Report an error that occurred. The read failed.
+         *
+         * @param error the error message.
+         */
+        public void reportError(String error);
+    }
+
+    /**
+     * Call this to read the JDOMSerializable from a file.
+     */
+    public static boolean importFromFile(ImportInteraction importInteraction, FileFilter fileFilter, SettingsSerializable... serializables) {
+        SettingsNode settings = readSettingsFile(importInteraction, fileFilter);
+        if (settings == null) {
+            return false;
+        }
+
+        for (int index = 0; index < serializables.length; index++) {
+            SettingsSerializable serializable = serializables[index];
+
+            try {  //don't let a single serializer stop the entire thing from being read in.
+                serializable.serializeIn(settings);
+            } catch (Exception e) {
+                LOGGER.error("importing file", e);
+            }
+        }
+
+        return true;
+    }
+
+    public static DOM4JSettingsNode readSettingsFile(ImportInteraction importInteraction, FileFilter fileFilter) {
+        File file = importInteraction.promptForFile(fileFilter);
+        if (file == null) {
+            return null;
+        }
+
+        if (!file.exists()) {
+            importInteraction.reportError("File does not exist: " + file.getAbsolutePath());
+            return null;  //we should really sit in a loop until they cancel or give us a valid file.
+        }
+
+        try {
+            SAXReader reader = new SAXReader();
+            Document document = reader.read(file);
+
+            return new DOM4JSettingsNode(document.getRootElement());
+        } catch (Throwable t) {
+            LOGGER.error("Unable to read file: " + file.getAbsolutePath(), t);
+            importInteraction.reportError("Unable to read file: " + file.getAbsolutePath());
+            return null;
+        }
+    }
+
+    private static void closeQuietly(Closeable closeable) {
+        try {
+            if (closeable != null) {
+                closeable.close();
+            }
+        } catch (IOException e) {
+            LOGGER.error("Closing", e);
+        }
+    }
+
+    /**
+     * A convenience function that ensures that the specified file does have a specific extension. You have to tell us that extension.
+     */
+    private static File ensureFileHasCorrectExtensionAndCase(File file, String requiredExtension) {
+        String name = file.getName();
+        if (!name.toLowerCase().endsWith(requiredExtension.toLowerCase())) {
+            return new File(file.getParentFile(), name + requiredExtension);
+        }
+
+        return file;   //it already ends with the correct extension.
+    }
+
+    public static DOM4JSettingsNode createBlankSettings() {
+        Document document = DocumentHelper.createDocument();
+        Element rootElement = document.addElement("root");
+        DOM4JSettingsNode settings = new DOM4JSettingsNode(rootElement);
+        return settings;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/Dom4JUtility.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/Dom4JUtility.java
new file mode 100644
index 0000000..25dbc32
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/Dom4JUtility.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation;
+
+import org.dom4j.Attribute;
+import org.dom4j.Element;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ Just some utility functions that really should be in Dom4J already.
+
+ @author mhunsicker
+  */
+
+public class Dom4JUtility {
+    /**
+     * This returns the node that is a child of the specified parent that has the specified 'name' and an attribute with the specified value. This is similar to the below getChild, but this requires a
+     * specific tag name.
+     */
+    public static Element getChild(Element parent, String tagName, String attribute, String attributeValue) {
+        Element childElement = null;
+        Iterator iterator = parent.elements(tagName).iterator();
+        while (iterator.hasNext() && childElement == null) {
+            childElement = (Element) iterator.next();
+            String actualValue = childElement.attributeValue(attribute);
+            if (!attributeValue.equals(actualValue)) {
+                childElement = null;
+            }
+        }
+        return childElement;
+    }
+
+    public static List<Element> getChildren(Element parent, String tagName, String attribute, String attributeValue) {
+        List<Element> children = new ArrayList<Element>();
+
+        Iterator iterator = parent.elements(tagName).iterator();
+        while (iterator.hasNext()) {
+            Element childElement = (Element) iterator.next();
+            String actualValue = childElement.attributeValue(attribute);
+            if (attributeValue.equals(actualValue)) {
+                children.add(childElement);
+            }
+        }
+
+        return children;
+    }
+
+    /**
+     * Thie returns the node that is a child of hte specified parent that has the specified attribute with the specified value. This is similar to the above getChild, but no tag name is required.
+     */
+    public static Element getChild(Element parent, String attribute, String attributeValue) {
+        Element childElement = null;
+        Iterator iterator = parent.elements().iterator();
+        while (iterator.hasNext() && childElement == null) {
+            childElement = (Element) iterator.next();
+            String actualValue = childElement.attributeValue(attribute);
+            if (!attributeValue.equals(actualValue)) {
+                childElement = null;
+            }
+        }
+        return childElement;
+    }
+
+    /**
+     * Thie returns the node that is a child of hte specified parent that has the specified attribute with the specified value. This is similar to the above getChild, but no tag name is required.
+     */
+    public static List<Element> getChildren(Element parent, String attribute, String attributeValue) {
+        List<Element> children = new ArrayList<Element>();
+
+        Iterator iterator = parent.elements().iterator();
+        while (iterator.hasNext()) {
+            Element childElement = (Element) iterator.next();
+            String actualValue = childElement.attributeValue(attribute);
+            if (attributeValue.equals(actualValue)) {
+                children.add(childElement);
+            }
+        }
+
+        return children;
+    }
+
+    public static void setAttributeAsBoolean(Element element, String attribute, boolean value) {
+        if (value) {
+            element.addAttribute(attribute, "true");
+        } else {
+            element.addAttribute(attribute, "false");
+        }
+    }
+
+    public static boolean getAttributeAsBoolean(Element element, String attributeName, boolean defaultValue) {
+        Attribute attribute = element.attribute(attributeName);
+        if (attribute == null) {
+            return defaultValue;
+        }
+
+        return "true".equals(attribute.getValue());
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/ExtensionFileFilter.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/ExtensionFileFilter.java
new file mode 100644
index 0000000..e29977b
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/ExtensionFileFilter.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.File;
+
+/**
+ * Man! Why doesn't this get put into java's standard library?! Well, they did, but it doesn't hide hidden files. By definition of them being hidden, you probably don't want to see them. <p/> While
+ * FileFilter is technically a Swing class, it shouldn't be. The foundation needs to drive what is allowed in the UI.
+ *
+ * @author mhunsicker
+ */
+public class ExtensionFileFilter extends FileFilter {
+    private String extension;
+    private String description;
+
+    public ExtensionFileFilter(String extension, String description) {
+        this.extension = extension.toLowerCase();
+        this.description = description;
+    }
+
+    public boolean accept(File file) {
+        if (file.isHidden()) {
+            return false;
+        }
+
+        if (file.isDirectory()) {
+            return true;
+        }
+
+        return file.getName().toLowerCase().endsWith(extension);
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public String getExtension() {
+        return extension;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/GradlePluginLord.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/GradlePluginLord.java
new file mode 100644
index 0000000..43ebddd
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/GradlePluginLord.java
@@ -0,0 +1,690 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation;
+
+import org.codehaus.groovy.runtime.StackTraceUtils;
+import org.gradle.StartParameter;
+import org.gradle.api.LocationAwareException;
+import org.gradle.api.internal.DefaultClassPathProvider;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.configuration.ImplicitTasksConfigurer;
+import org.gradle.foundation.CommandLineAssistant;
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.foundation.common.ObserverLord;
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.foundation.queue.ExecutionQueue;
+import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.util.GUtil;
+
+import java.io.File;
+import java.util.*;
+import java.util.concurrent.LinkedBlockingQueue;
+
+/**
+ * This class has nothing to do with plugins inside of gradle, but are related to making a plugin that uses gradle, such as for an IDE. It is also used by the standalone IDE (that way the standalone
+ * UI and plugin UIs are kept in synch). <p/> This is the class that stores most of the information that the Gradle plugin works directly with. It is meant to simplify creating a plugin that uses
+ * gradle. It maintains a queue of commands to execute and executes them in a separate process due to some complexities with gradle and its dependencies classpaths and potential memory issues.
+ *
+ * @author mhunsicker
+ */
+public class GradlePluginLord {
+    private final Logger logger = Logging.getLogger(GradlePluginLord.class);
+
+    private File gradleHomeDirectory;   //the directory where gradle is installed
+    private File currentDirectory;      //the directory of your gradle-based project
+    private File customGradleExecutor;  //probably will be null. This allows a user to specify a different batch file or shell script to initiate gradle.
+
+    private List<ProjectView> projects = new ArrayList<ProjectView>();
+
+    private FavoritesEditor favoritesEditor;  //an editor for the current favorites. The user can edit this at any time, hence we're using an editor.
+
+    private ExecutionQueue<Request> executionQueue;
+    private LinkedBlockingQueue<Request> currentlyExecutingRequests = new LinkedBlockingQueue<Request>();
+
+    private boolean isStarted;  //this flag is mostly to prevent initialization from firing off repeated refresh requests.
+
+    private StartParameter.ShowStacktrace stackTraceLevel = StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
+    private LogLevel logLevel = LogLevel.LIFECYCLE;
+
+    private ObserverLord<GeneralPluginObserver> generalObserverLord = new ObserverLord<GeneralPluginObserver>();
+    private ObserverLord<RequestObserver> requestObserverLord = new ObserverLord<RequestObserver>();
+    private ObserverLord<SettingsObserver> settingsObserverLord = new ObserverLord<SettingsObserver>();
+
+    private ObserverLord<CommandLineArgumentAlteringListener> commandLineArgumentObserverLord = new ObserverLord<CommandLineArgumentAlteringListener>();
+
+    private long nextRequestID = 1;  //a unique number assigned to requests
+
+    public List<ProjectView> getProjects() {
+        return Collections.unmodifiableList(projects);
+    }
+
+    /**
+     * Sets the current projects. This is only supposed to be called by internal gradle classes.
+     */
+    public void setProjects(final List<ProjectView> newProjects) {
+        projects.clear();
+        if (newProjects != null) {
+            projects.addAll(newProjects);
+        }
+
+        generalObserverLord.notifyObservers(new ObserverLord.ObserverNotification<GeneralPluginObserver>() {
+            public void notify(GeneralPluginObserver observer) {
+                observer.projectsAndTasksReloaded(newProjects != null);
+            }
+        });
+    }
+
+    public interface GeneralPluginObserver {
+        /**
+         * Notification that we're about to reload the projects and tasks.
+         */
+        public void startingProjectsAndTasksReload();
+
+        /**
+         * Notification that the projects and tasks have been reloaded. You may want to repopulate or update your views.
+         *
+         * @param wasSuccessful true if they were successfully reloaded. False if an error occurred so we no longer can show the projects and tasks (probably an error in a .gradle file).
+         */
+        public void projectsAndTasksReloaded(boolean wasSuccessful);
+    }
+
+    public interface RequestObserver {
+        public void executionRequestAdded(ExecutionRequest request);
+
+        public void refreshRequestAdded(RefreshTaskListRequest request);
+
+        /**
+         * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files.
+         */
+        public void aboutToExecuteRequest(Request request);
+
+        /**
+         * Notification that the command has completed execution.
+         *
+         * @param request the original request containing the command that was executed
+         * @param result the result of the command
+         * @param output the output from gradle executing the command
+         */
+        public void requestExecutionComplete(Request request, int result, String output);
+    }
+
+    public interface SettingsObserver {
+
+        /**
+         * Notification that some settings have changed for the plugin. Settings such as current directory, gradle home directory, etc. This is useful for UIs that need to update their UIs when this is
+         * changed by other means.
+         */
+        public void settingsChanged();
+    }
+
+    public GradlePluginLord() {
+        favoritesEditor = new FavoritesEditor();
+
+        //create the queue that executes the commands. The contents of this interaction are where we actually launch gradle.
+        executionQueue = new ExecutionQueue<Request>(new ExecutionQueueInteraction());
+
+        currentDirectory = new File(System.getProperty("user.dir"));
+
+        String gradleHomeProperty = System.getProperty("gradle.home");
+        if (gradleHomeProperty != null) {
+            gradleHomeDirectory = new File(gradleHomeProperty);
+        } else {
+            gradleHomeDirectory = new DefaultClassPathProvider().getGradleHome();
+        }
+    }
+
+    public File getGradleHomeDirectory() {
+        return gradleHomeDirectory;
+    }
+
+    /**
+     * sets the gradle home directory. You can't just set this here. You must also set the "gradle.home" system property. This code could do this for you, but at this time, I didn't want this to have
+     * side effects and setting "gradle.home" can affect other things and there may be some timing issues.
+     *
+     * @param gradleHomeDirectory the new home directory
+     */
+    public void setGradleHomeDirectory(File gradleHomeDirectory) {
+        if (areEqual(this.gradleHomeDirectory, gradleHomeDirectory))    //already set to this. This prevents recursive notifications.
+        {
+            return;
+        }
+        this.gradleHomeDirectory = gradleHomeDirectory;
+        notifySettingsChanged();
+    }
+
+    /**
+     * @return the root directory of your gradle project.
+     */
+    public File getCurrentDirectory() {
+        return currentDirectory;
+    }
+
+    /**
+     * @param currentDirectory the new root directory of your gradle project.
+     * @returns true if we changed the current directory, false if not (it was already set to this)
+     */
+    public boolean setCurrentDirectory(File currentDirectory) {
+        if (areEqual(this.currentDirectory, currentDirectory))    //already set to this. This prevents recursive notifications.
+        {
+            return false;
+        }
+        this.currentDirectory = currentDirectory;
+        notifySettingsChanged();
+        return true;
+    }
+
+    public File getCustomGradleExecutor() {
+        return customGradleExecutor;
+    }
+
+    public boolean setCustomGradleExecutor(File customGradleExecutor) {
+        if (areEqual(this.customGradleExecutor, customGradleExecutor))    //already set to this. This prevents recursive notifications.
+        {
+            return false;
+        }
+        this.customGradleExecutor = customGradleExecutor;
+        notifySettingsChanged();
+        return true;
+    }
+
+    public FavoritesEditor getFavoritesEditor() {
+        return favoritesEditor;
+    }
+
+    /**
+     * this allows you to change how much information is given when an error occurs.
+     */
+    public void setStackTraceLevel(StartParameter.ShowStacktrace stackTraceLevel) {
+        if (areEqual(this.stackTraceLevel, stackTraceLevel))    //already set to this. This prevents recursive notifications.
+        {
+            return;
+        }
+        this.stackTraceLevel = stackTraceLevel;
+        notifySettingsChanged();
+    }
+
+    public StartParameter.ShowStacktrace getStackTraceLevel() {
+        return stackTraceLevel;
+    }
+
+    public LogLevel getLogLevel() {
+        return logLevel;
+    }
+
+    public void setLogLevel(LogLevel logLevel) {
+        if (logLevel == null) {
+            return;
+        }
+
+        if (areEqual(this.logLevel, logLevel))    //already set to this. This prevents recursive notifications.
+        {
+            return;
+        }
+        this.logLevel = logLevel;
+        notifySettingsChanged();
+    }
+
+    /**
+     * Call this to start execution. This is done after you've initialized everything.
+     */
+    public void startExecutionQueue() {
+        isStarted = true;
+    }
+
+    /**
+     * This gives requests of the queue and then executes them by kicking off gradle in a separate process. Most of the code here is tedious setup code needed to start the server. The server is what
+     * starts gradle and opens a socket for interprocess communication so we can receive messages back from gradle.
+     */
+    private class ExecutionQueueInteraction implements ExecutionQueue.ExecutionInteraction<Request> {
+        /**
+         * When this is called, execute the given request.
+         *
+         * @param request the request to execute.
+         */
+        public void execute(final Request request) {
+
+            //mark this request as being currently executed
+            currentlyExecutingRequests.add(request);
+
+            notifyAboutToExecuteRequest(request);
+
+            //I'm just putting these in temp variables for easier debugging
+            File currentDirectory = getCurrentDirectory();
+            File gradleHomeDirectory = getGradleHomeDirectory();
+            File customGradleExecutor = getCustomGradleExecutor();
+
+            //the protocol handles the command line to launch gradle and messaging between us and said externally launched gradle.
+            ProcessLauncherServer.Protocol serverProtocol = request.createServerProtocol(logLevel, stackTraceLevel, currentDirectory, gradleHomeDirectory, customGradleExecutor);
+
+            //the server kicks off gradle as an external process and manages the communication with said process
+            ProcessLauncherServer server = new ProcessLauncherServer(serverProtocol);
+            request.setProcessLauncherServer(server);
+
+            //we need to know when this command is finished executing so we can mark it as complete and notify any observers.
+            server.addServerObserver(new ProcessLauncherServer.ServerObserver() {
+                public void clientExited(int result, String output) {
+                    currentlyExecutingRequests.remove(request);
+                    notifyRequestExecutionComplete(request, result, output);
+                }
+
+                public void serverExited() {
+                }
+            }, false);
+
+            server.start();
+        }
+    }
+
+    private void notifyAboutToExecuteRequest(final Request request) {
+        requestObserverLord.notifyObservers(new ObserverLord.ObserverNotification<RequestObserver>() {
+            public void notify(RequestObserver observer) {
+                try { //wrap this in a try/catch block so exceptions in the observer doesn't stop everything
+                    observer.aboutToExecuteRequest(request);
+                } catch (Exception e) {
+                    logger.error("notifying aboutToExecuteCommand() " + e.getMessage());
+                }
+            }
+        });
+    }
+
+    private void notifyRequestExecutionComplete(final Request request, final int result, final String output) {
+        requestObserverLord.notifyObservers(new ObserverLord.ObserverNotification<RequestObserver>() {
+            public void notify(RequestObserver observer) {
+                try { //wrap this in a try/catch block so exceptions in the observer doesn't stop everything
+                    observer.requestExecutionComplete(request, result, output);
+                } catch (Exception e) {
+                    logger.error("notifying requestExecutionComplete() " + e.getMessage());
+                }
+            }
+        });
+    }
+
+    /**
+     * Adds an observer for various events. See PluginObserver.
+     *
+     * @param observer your observer
+     * @param inEventQueue true if you want to be notified in the Event Dispatch Thread.
+     */
+    public void addGeneralPluginObserver(GeneralPluginObserver observer, boolean inEventQueue) {
+        generalObserverLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeGeneralPluginObserver(GeneralPluginObserver observer) {
+        generalObserverLord.removeObserver(observer);
+    }
+
+    public void addRequestObserver(RequestObserver observer, boolean inEventQueue) {
+        requestObserverLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeRequestObserver(RequestObserver observer) {
+        requestObserverLord.removeObserver(observer);
+    }
+
+    public void addSettingsObserver(SettingsObserver observer, boolean inEventQueue) {
+        settingsObserverLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeSettingsObserver(SettingsObserver observer) {
+        settingsObserverLord.removeObserver(observer);
+    }
+
+    private void notifySettingsChanged() {
+        settingsObserverLord.notifyObservers(new ObserverLord.ObserverNotification<SettingsObserver>() {
+            public void notify(SettingsObserver observer) {
+                observer.settingsChanged();
+            }
+        });
+    }
+
+    /**
+     * Determines if two are objects are equal and considers them both being null as equal
+     *
+     * @param object1 the first object
+     * @param object2 the second object
+     * @return true if they're both null or both equal.
+     */
+    private boolean areEqual(Object object1, Object object2) {
+        if (object1 == null || object2 == null) {
+            return object2 == object1; //yes, we're not using '.equals', we're making sure they both equal null because one of them is null!
+        }
+
+        return object1.equals(object2);
+    }
+
+    /**
+     * Determines if all required setup is complete based on the current settings.
+     *
+     * @return true if a setup is complete, false if not.
+     */
+    public boolean isSetupComplete() {
+        //return gradleWrapper.getGradleHomeDirectory() != null &&
+        //       gradleWrapper.getGradleHomeDirectory().exists() &&
+        return getCurrentDirectory() != null && getCurrentDirectory().exists();
+    }
+
+    public Request addExecutionRequestToQueue(String fullCommandLine, String displayName) {
+        return addExecutionRequestToQueue(fullCommandLine, displayName, false);
+    }
+
+    /**
+     * This executes a task in a background thread. This creates or uses an existing OutputPanel to display the results.
+     *
+     * @param task the task to execute.
+     * @param forceOutputToBeShown overrides the user setting onlyShowOutputOnErrors so that the output is shown regardless
+     */
+    public Request addExecutionRequestToQueue(final TaskView task, boolean forceOutputToBeShown, String... additionCommandLineOptions) {
+        if (task == null) {
+            return null;
+        }
+
+        String fullCommandLine = CommandLineAssistant.appendAdditionalCommandLineOptions(task, additionCommandLineOptions);
+        return addExecutionRequestToQueue(fullCommandLine, task.getFullTaskName(), forceOutputToBeShown);
+    }
+
+    /**
+     * This executes all the tasks together in a background thread. That is, all tasks are passed to a single gradle call at once. This creates or uses an existing OutputPanel to display the results.
+     *
+     * @param tasks the tasks to execute
+     * @param forceOutputToBeShown overrides the user setting onlyShowOutputOnErrors so that the output is shown regardless
+     * @param additionCommandLineOptions additional command line options to exeucte.
+     */
+    public Request addExecutionRequestToQueue(final List<TaskView> tasks, boolean forceOutputToBeShown, String... additionCommandLineOptions) {
+
+        if (tasks == null || tasks.isEmpty()) {
+            return null;
+        }
+
+        if (tasks.size() == 1) { //if there's only 1, just treat it as one
+            return addExecutionRequestToQueue(tasks.get(0), forceOutputToBeShown, additionCommandLineOptions);
+        }
+
+        String singleCommandLine = CommandLineAssistant.combineTasks(tasks, additionCommandLineOptions);
+        return addExecutionRequestToQueue(singleCommandLine, tasks.get(0).getName() + "...", forceOutputToBeShown);
+    }
+
+    /**
+     * Executes several favorites commands at once as a single command. This has the affect of simply concatenating all the favorite command lines into a single line.
+     *
+     * @param favorites a list of favorites. If just one favorite, it executes it normally. If multiple favorites, it executes them all at once as a single command.
+     */
+    public Request addExecutionRequestToQueue(List<FavoriteTask> favorites) {
+        if (favorites.isEmpty()) {
+            return null;
+        }
+
+        FavoriteTask firstFavoriteTask = favorites.get(0);
+        String displayName;
+        String fullCommandLine;
+        boolean alwaysShowOutput = firstFavoriteTask.alwaysShowOutput();
+
+        if (favorites.size() == 1) {
+            displayName = firstFavoriteTask.getDisplayName();
+            fullCommandLine = firstFavoriteTask.getFullCommandLine();
+        } else {
+            displayName = "Multiple (" + firstFavoriteTask.getDisplayName() + ", ... )";
+            fullCommandLine = FavoritesEditor.combineFavoriteCommandLines(favorites);
+        }
+
+        return addExecutionRequestToQueue(fullCommandLine, displayName, alwaysShowOutput);
+    }
+
+    /**
+     * Call this to execute a task in a background thread. This creates or uses an existing OutputPanel to display the results. This version takes text instead of a task object.
+     *
+     * @param fullCommandLine the full command line to pass to gradle.
+     * @param displayName what we show on the tab.
+     * @param forceOutputToBeShown overrides the user setting onlyShowOutputOnErrors so that the output is shown regardless
+     */
+    public Request addExecutionRequestToQueue(String fullCommandLine, String displayName, boolean forceOutputToBeShown) {
+        if (!isStarted) {
+            return null;
+        }
+
+        if (fullCommandLine == null) {
+            return null;
+        }
+
+        //here we'll give the UI a chance to add things to the command line.
+        fullCommandLine = alterCommandLine(fullCommandLine);
+
+        final ExecutionRequest request = new ExecutionRequest(getNextRequestID(), fullCommandLine, displayName, forceOutputToBeShown, executionQueue);
+        requestObserverLord.notifyObservers(new ObserverLord.ObserverNotification<RequestObserver>() {
+            public void notify(RequestObserver observer) {
+                observer.executionRequestAdded(request);
+            }
+        });
+        executionQueue.addRequestToQueue(request);
+        return request;
+    }
+
+    private synchronized long getNextRequestID() {
+        return nextRequestID++;
+    }
+
+    /**
+     * This will refresh the project/task tree.
+     *
+     * @return the Request that was created. Null if no request created.
+     */
+    public Request addRefreshRequestToQueue() {
+        return addRefreshRequestToQueue(null);
+    }
+
+    /**
+     * This will refresh the project/task tree. This version allows you to specify additional arguments to be passed to gradle during the refresh (such as -b to specify a build file)
+     *
+     * @param additionalCommandLineArguments the arguments to add, or null if none.
+     * @return the Request that was created. Null if no request created.
+     */
+    public Request addRefreshRequestToQueue(String additionalCommandLineArguments) {
+        if (!isStarted) {
+            return null;
+        }
+
+        if (hasRequestOfType(RefreshTaskListRequest.TYPE)) {
+            return null; //we're already doing a refresh.
+        }
+
+        //we'll request a task list since there is no way to do a no op. We're not really interested
+        //in what's being executed, just the ability to get the task list (which must be populated as
+        //part of executing anything).
+        String fullCommandLine = ImplicitTasksConfigurer.TASKS_TASK;
+
+        if (additionalCommandLineArguments != null) {
+            fullCommandLine += ' ' + additionalCommandLineArguments;
+        }
+
+        //here we'll give the UI a chance to add things to the command line.
+        fullCommandLine = alterCommandLine(fullCommandLine);
+
+        final RefreshTaskListRequest request = new RefreshTaskListRequest(getNextRequestID(), fullCommandLine, executionQueue, this);
+        executionQueue.addRequestToQueue(request);
+        // TODO - fix this race condition - request may already have completed
+        requestObserverLord.notifyObservers(new ObserverLord.ObserverNotification<RequestObserver>() {
+            public void notify(RequestObserver observer) {
+                observer.refreshRequestAdded(request);
+            }
+        });
+        return request;
+    }
+
+    /**
+     * This is where we notify listeners and give them a chance to add things to the command line.
+     *
+     * @param fullCommandLine the full command line
+     * @return the new command line.
+     */
+    private String alterCommandLine(String fullCommandLine) {
+        CommandLineArgumentAlteringNotification notification = new CommandLineArgumentAlteringNotification(fullCommandLine);
+        commandLineArgumentObserverLord.notifyObservers(notification);
+
+        return notification.getFullCommandLine();
+    }
+
+    //
+
+    /**
+     * This class notifies the listeners and modifies the command line by adding additional commands to it. Each listener will be given the 'new' full command line, so the order you add things becomes
+     * important.
+     */
+    private class CommandLineArgumentAlteringNotification implements ObserverLord.ObserverNotification<CommandLineArgumentAlteringListener> {
+        private StringBuilder fullCommandLineBuilder;
+
+        private CommandLineArgumentAlteringNotification(String fullCommandLine) {
+            this.fullCommandLineBuilder = new StringBuilder(fullCommandLine);
+        }
+
+        public void notify(CommandLineArgumentAlteringListener observer) {
+            String additions = observer.getAdditionalCommandLineArguments(fullCommandLineBuilder.toString());
+            if (additions != null) {
+                fullCommandLineBuilder.append(' ').append(additions);
+            }
+        }
+
+        public String getFullCommandLine() {
+            return fullCommandLineBuilder.toString();
+        }
+    }
+
+    /**
+     * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for
+     * example, an init script.
+     *
+     * param  listener   the listener that modifies the command line arguments.
+     */
+    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener) {
+        commandLineArgumentObserverLord.addObserver(listener, false);
+    }
+
+    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListener listener) {
+        commandLineArgumentObserverLord.removeObserver(listener);
+    }
+
+    /**
+     * This code was copied from BuildExceptionReporter.reportBuildFailure in gradle's source, then modified slightly to compensate for the fact that we're not driven by options or logging things to a
+     * logger object.
+     */
+    public static String getGradleExceptionMessage(Throwable failure, StartParameter.ShowStacktrace stackTraceLevel) {
+        if (failure == null) {
+            return "";
+        }
+
+        Formatter formatter = new Formatter();
+
+        formatter.format("%nBuild failed.%n");
+
+        if (stackTraceLevel == StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS) {
+            formatter.format("Use the stack trace options to get more details.");
+        }
+
+        if (failure != null) {
+            formatter.format("%n");
+
+            if (failure instanceof LocationAwareException) {
+                LocationAwareException scriptException = (LocationAwareException) failure;
+                formatter.format("%s%n%n", scriptException.getLocation());
+                formatter.format("%s", scriptException.getOriginalMessage());
+
+                for (Throwable cause : scriptException.getReportableCauses()) {
+                    formatter.format("%nCause: %s", getMessage(cause));
+                }
+            } else {
+                formatter.format("%s", getMessage(failure));
+            }
+
+            if (stackTraceLevel != StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS) {
+                formatter.format("%n%nException is:\n");
+                if (stackTraceLevel == StartParameter.ShowStacktrace.ALWAYS_FULL) {
+                    return formatter.toString() + getStackTraceAsText(failure);
+                }
+
+                return formatter.toString() + getStackTraceAsText(StackTraceUtils.deepSanitize(failure));
+            }
+        }
+
+        return formatter.toString();
+    }
+
+    private static String getStackTraceAsText(Throwable t) {
+        StringBuilder builder = new StringBuilder();
+        StackTraceElement[] stackTraceElements = t.getStackTrace();
+
+        for (int index = 0; index < stackTraceElements.length; index++) {
+            StackTraceElement stackTraceElement = stackTraceElements[index];
+            builder.append("   ").append(stackTraceElement.toString()).append('\n');
+        }
+
+        return builder.toString();
+    }
+
+    //tries to get a message from a Throwable. Something there's a message and sometimes there's not.
+    private static String getMessage(Throwable throwable) {
+        String message = throwable.getMessage();
+        if (!GUtil.isTrue(message)) {
+            message = String.format("%s (no error message)", throwable.getClass().getName());
+        }
+
+        if (throwable.getCause() != null) {
+            message += "\nCaused by: " + getMessage(throwable.getCause());
+        }
+
+        return message;
+    }
+
+    /**
+     * Determines if there are tasks executing or waiting to execute. We only care about execution requests, not refresh requests.
+     *
+     * @return true if this is busy, false if not.
+     */
+    public boolean isBusy() {
+        return hasRequestOfType(ExecutionRequest.TYPE);
+    }
+
+    /**
+     * Determines if we have an request of the specified type
+     *
+     * @param type the sought type of request.
+     * @return true if it has the request, false if not.
+     */
+    private boolean hasRequestOfType(Request.Type type) {
+        Iterator<Request> iterator = currentlyExecutingRequests.iterator();
+        while (iterator.hasNext()) {
+            ExecutionQueue.Request request = iterator.next();
+            if (request.getType() == type) {
+                return true;
+            }
+        }
+
+        List<Request> pendingRequests = executionQueue.getRequests();
+        iterator = pendingRequests.iterator();
+        while (iterator.hasNext()) {
+            ExecutionQueue.Request request = iterator.next();
+            if (request.getType() == type) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoriteTask.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoriteTask.java
new file mode 100644
index 0000000..777438e
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoriteTask.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.favorites;
+
+/**
+ * This holds onto a favorite task. Note: a user may define a favorite task, but it may or may be not present (or may be hidden because of a temporary error in gradle files). So we hold onto the full
+ * name of the task so we can get to the task should it become available.
+ *
+ * @author mhunsicker
+ */
+public class FavoriteTask {
+    private String fullCommandLine;
+    private String displayName;
+    private boolean alwaysShowOutput;
+
+    public FavoriteTask(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
+        this.fullCommandLine = fullCommandLine;
+        this.displayName = displayName;
+        this.alwaysShowOutput = alwaysShowOutput;
+    }
+
+    public String toString() {
+        return displayName;
+    }
+
+    public String getFullCommandLine() {
+        return fullCommandLine;
+    }
+
+    //if you're wanting to set this, go through the FavoritesEditor.
+    /*package*/ void setFullCommandLine(String fullCommandLine) {
+        this.fullCommandLine = fullCommandLine;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    //if you're wanting to set this, go through the FavoritesEditor.
+    /*package*/ void setDisplayName(String displayName) {
+        this.displayName = displayName;
+    }
+
+    public boolean alwaysShowOutput() {
+        return alwaysShowOutput;
+    }
+
+    //if you're wanting to set this, go through the FavoritesEditor.
+    /*package*/ void setAlwaysShowOutput(boolean alwaysShowOutput) {
+        this.alwaysShowOutput = alwaysShowOutput;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesEditor.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesEditor.java
new file mode 100644
index 0000000..5cea542
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesEditor.java
@@ -0,0 +1,485 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.favorites;
+
+import org.gradle.foundation.CommandLineAssistant;
+import org.gradle.foundation.TaskView;
+import org.gradle.foundation.common.ObserverLord;
+import org.gradle.foundation.common.ReorderableList;
+import org.gradle.gradleplugin.foundation.DOM4JSerializer;
+import org.gradle.gradleplugin.foundation.ExtensionFileFilter;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This holds onto and edits favorite tasks. 'Favorite tasks' provides a quick way to run frequently used tasks.
+ *
+ * @author mhunsicker
+ */
+public class FavoritesEditor implements SettingsSerializable {
+    private ReorderableList<FavoriteTask> favoriteTasks = new ReorderableList<FavoriteTask>();
+
+    private ObserverLord<FavoriteTasksObserver> favoriteTasksObserverLord = new ObserverLord<FavoriteTasksObserver>();
+
+    public interface FavoriteTasksObserver {
+        /**
+         * Notification that the favorites list has changed.
+         */
+        public void favoritesChanged();
+
+        /**
+         * Notification that the favorites were re-ordered
+         *
+         * @param favoritesReordered the favorites that were reordered
+         */
+        public void favoritesReordered(List<FavoriteTask> favoritesReordered);
+    }
+
+    public FavoritesEditor() {
+    }
+
+    public List<FavoriteTask> getFavoriteTasks() {
+        return Collections.unmodifiableList(favoriteTasks);
+    }
+
+    public void addFavoriteTasksObserver(FavoritesEditor.FavoriteTasksObserver observer, boolean inEventQueue) {
+        favoriteTasksObserverLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeFavoriteTasksObserver(FavoritesEditor.FavoriteTasksObserver observer) {
+        favoriteTasksObserverLord.removeObserver(observer);
+    }
+
+    public FavoriteTask getFavorite(String fullCommandLine) {
+        Iterator<FavoriteTask> taskIterator = favoriteTasks.iterator();
+        while (taskIterator.hasNext()) {
+            FavoriteTask favoriteTask = taskIterator.next();
+
+            if (fullCommandLine.equals(favoriteTask.getFullCommandLine())) {
+                return favoriteTask;
+            }
+        }
+
+        return null;
+    }
+
+    public FavoriteTask getFavoriteByDisplayName(String displayName) {
+        Iterator<FavoriteTask> taskIterator = favoriteTasks.iterator();
+        while (taskIterator.hasNext()) {
+            FavoriteTask favoriteTask = taskIterator.next();
+
+            if (displayName.equals(favoriteTask.getDisplayName())) {
+                return favoriteTask;
+            }
+        }
+
+        return null;
+    }
+
+    public FavoriteTask getFavorite(TaskView task) {
+        return getFavorite(task.getFullTaskName());
+    }
+
+    /**
+     * Fires off a notification that the favorite tasks have changed.
+     */
+    private void notifyFavoritesChanged() {
+        favoriteTasksObserverLord.notifyObservers(new ObserverLord.ObserverNotification<FavoriteTasksObserver>() {
+            public void notify(FavoriteTasksObserver observer) {
+                observer.favoritesChanged();
+            }
+        });
+    }
+
+    //
+
+    public enum AddMultipleResult {
+        AddSeparately, AddAsSingleCommand, Cancel
+    }
+
+    /**
+
+     */
+    public interface AddMultipleFavoritesInteraction {
+        /**
+         * This is called when you try to add multiple tasks at once. You should prompt the user whether or not they want to add each task separately or together as one task with multiple commands.
+         *
+         * @param tasksSample the individual tasks we will add
+         * @param singleCommandSample a sample of what the single command would look like
+         * @return where or not to combine tasks into a single command line, false to add them as separate commands. See AddMultiple.
+         */
+        public AddMultipleResult promptUserToCombineTasks(List<TaskView> tasksSample, String singleCommandSample);
+    }
+
+    /**
+     * Call this to add tasks as favorites. If you pass in multiple tasks, we'll prompt the user whether or not the tasks should be added as one favorite with multiple tasks or separate tasks.
+     *
+     * @param tasks the tasks to add. Their order in the list becomes the order in the single task if the user chooses this.
+     * @param interaction how we interact with the user or other UI.
+     */
+    public void addMutlipleFavorites(List<TaskView> tasks, boolean alwaysShowOutput, AddMultipleFavoritesInteraction interaction) {
+        if (tasks.isEmpty()) {
+            return;
+        }  //no tasks, bail
+
+        if (tasks.size() == 1) {  //only 1 task. just add it
+            addFavorite(tasks.get(0), alwaysShowOutput);
+            return;
+        }
+
+        //multiple tasks. Ask the user what to do
+        String singleCommandLine = CommandLineAssistant.combineTasks(tasks);
+
+        //prompt the user what to do
+        AddMultipleResult addMultipleResult = interaction.promptUserToCombineTasks(tasks, singleCommandLine);
+        switch (addMultipleResult) {
+            case Cancel:
+                return;
+
+            case AddSeparately:
+                Iterator<TaskView> iterator = tasks.iterator();
+                while (iterator.hasNext()) {
+                    TaskView task = iterator.next();
+                    addFavorite(task, alwaysShowOutput);
+                }
+                break;
+
+            case AddAsSingleCommand:
+                addFavorite(singleCommandLine, alwaysShowOutput);
+                break;
+        }
+    }
+
+    public FavoriteTask addFavorite(TaskView task, boolean alwaysShowOutput) {
+        return addFavorite(task.getFullTaskName(), alwaysShowOutput);
+    }
+
+    public FavoriteTask addFavorite(String fullCommandLine, boolean alwaysShowOutput) {
+        FavoriteTask favorite = addFavorite(fullCommandLine, fullCommandLine, alwaysShowOutput);
+        if (favorite != null) {
+            notifyFavoritesChanged();
+        }
+
+        return favorite;
+    }
+
+    public FavoriteTask addFavorite(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
+        if ((fullCommandLine == null || fullCommandLine.trim().equals("")) && (displayName == null || displayName.trim().equals("")))    //don't allow someone to add a blank favorite.
+        {
+            return null;
+        }
+
+        FavoriteTask favoriteTask = new FavoriteTask(fullCommandLine, displayName, alwaysShowOutput);
+        favoriteTasks.add(favoriteTask);
+        return favoriteTask;
+    }
+
+    /**
+     * Call this to add the specified tasks as favorite tasks
+     *
+     * @param tasks the task to make a favorite.
+     */
+    public void addFavorites(List<TaskView> tasks, boolean alwaysShowOutput) {
+        boolean addedFavorite = false;
+
+        Iterator<TaskView> iterator = tasks.iterator();
+        while (iterator.hasNext()) {
+            TaskView task = iterator.next();
+            String fullTaskName = task.getFullTaskName();
+            if (this.addFavorite(fullTaskName, alwaysShowOutput) != null) {
+                addedFavorite = true;
+            }
+        }
+
+        if (addedFavorite)  //don't notify anyone unless we actually did something.
+        {
+            favoriteTasksObserverLord.notifyObservers(new ObserverLord.ObserverNotification<FavoritesEditor.FavoriteTasksObserver>() {
+                public void notify(FavoritesEditor.FavoriteTasksObserver observer) {
+                    observer.favoritesChanged();
+                }
+            });
+        }
+    }
+
+    /**
+     * Call this to add a favorite that isn't in the task list. This exists because you can add functionality to gradle that isn't really a task.
+     *
+     * @param addFavoriteInteraction allows us to interact with the user
+     * @return the favorite that was added, or null if the user canceled
+     */
+    public FavoriteTask addFavorite(EditFavoriteInteraction addFavoriteInteraction) {
+        FavoriteTask newFavorite = new FavoriteTask("", "", false);
+        if (!editInternal(newFavorite, addFavoriteInteraction)) {
+            return null;
+        }
+
+        favoriteTasks.add(newFavorite);
+
+        notifyFavoritesChanged();
+        return newFavorite;
+    }
+
+    /**
+     * This is what you actually edit when you want to edit a favorite. I wanted the FavoriteTask object to be immutable so the only way to edit it is via this editor. This way any necessary
+     * validation or notification will always be performed
+     */
+    public class EditibleFavoriteTask {
+        public String fullCommandLine;
+        public String displayName;
+        public boolean alwaysShowOutput;
+
+        public EditibleFavoriteTask(FavoriteTask favoriteTask) {
+            this(favoriteTask.getFullCommandLine(), favoriteTask.getDisplayName(), favoriteTask.alwaysShowOutput());
+        }
+
+        public EditibleFavoriteTask(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
+            this.fullCommandLine = fullCommandLine;
+            this.displayName = displayName;
+            this.alwaysShowOutput = alwaysShowOutput;
+        }
+    }
+
+    public interface EditFavoriteInteraction extends ValidationInteraction {
+        public boolean editFavorite(EditibleFavoriteTask favoriteTask);
+    }
+
+    /**
+     * Edits the specified favorite task.
+     *
+     * @param favoriteTask the task to edit.
+     * @param editFavoriteInteraction how we interact with the user
+     * @return true if we made changes, false if not.
+     */
+    public boolean editFavorite(FavoriteTask favoriteTask, EditFavoriteInteraction editFavoriteInteraction) {
+        if (favoriteTask == null) {
+            return false;
+        }
+
+        if (favoriteTasks.indexOf(favoriteTask) == -1) {
+            return false;
+        }  //not our favorite
+
+        if (!editInternal(favoriteTask, editFavoriteInteraction)) {
+            return false;
+        }
+
+        notifyFavoritesChanged();
+        return true;
+    }
+
+    /**
+     * This edits the specified favorite task. We create a EditableFavoriteTask so the user can trash it and cancel and it won't affect the original. We'll sit in a loop prompting the user to edit it
+     * until no errors exist then we'll set the values on the original task.
+     *
+     * @param favoriteTask the task to edit.
+     * @param editFavoriteInteraction how we interact with the user.
+     * @return true if we edited it, false if not (the user canceled).
+     */
+    private boolean editInternal(FavoriteTask favoriteTask, EditFavoriteInteraction editFavoriteInteraction) {
+        EditibleFavoriteTask workingCopy = new EditibleFavoriteTask(favoriteTask);
+        boolean isValid = true;
+        do {
+            if (!editFavoriteInteraction.editFavorite(workingCopy)) {
+                return false;
+            }
+
+            isValid = validateEditableFavoriteTask(workingCopy, favoriteTask, editFavoriteInteraction);
+        } while (!isValid);
+
+        favoriteTask.setFullCommandLine(workingCopy.fullCommandLine);
+
+        favoriteTask.setDisplayName(workingCopy.displayName);
+        favoriteTask.setAlwaysShowOutput(workingCopy.alwaysShowOutput);
+
+        return true;
+    }
+
+    public interface ValidationInteraction {
+        public void reportError(String error);
+    }
+
+    /**
+     * This validates the editable favorite task. It makes sure the task name is specified and that it's not a duplicate.
+     *
+     * @param editableFavoriteTask the task your editing.
+     * @param originalFavoriteTaskObject the original object. This is used to test for duplication. If its new and not in the favorites, that's OK.
+     * @param validationInteraction how we report errors to the user.
+     * @return true if the task is valid, false if not.
+     */
+    private boolean validateEditableFavoriteTask(EditibleFavoriteTask editibleFavoriteTask, FavoriteTask originalFavoriteTaskObject, ValidationInteraction validationInteraction) {
+        if (editibleFavoriteTask.fullCommandLine == null || editibleFavoriteTask.fullCommandLine.trim().equals("")) {
+            validationInteraction.reportError("Full task name must be specified");
+            return false;
+        }
+
+        if (editibleFavoriteTask.displayName == null || editibleFavoriteTask.displayName.trim().equals("")) {
+            validationInteraction.reportError("Display name must be specified");
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Call this to remove the specified favorites from the favorite tasks.
+     *
+     * @param favoritesToRemove the favorite tasks to remove
+     */
+    public void removeFavorites(List<FavoriteTask> favoritesToRemove) {
+        if (favoriteTasks.removeAll(favoritesToRemove)) {
+            notifyFavoritesChanged();
+        }
+    }
+
+    /**
+     * This moves the specified favorites up.
+     *
+     * @param favoritesToMove .
+     */
+    public void moveFavoritesBefore(List<FavoriteTask> favoritesToMove) {
+        moveFavorites(favoritesToMove, true);
+    }
+
+    public void moveFavoritesAfter(List<FavoriteTask> favoritesToMove) {
+        moveFavorites(favoritesToMove, false);
+    }
+
+    private void moveFavorites(final List<FavoriteTask> favoritesToMove, boolean moveBefore) {
+        if (moveBefore) {
+            favoriteTasks.moveBefore(favoritesToMove);
+        } else {
+            favoriteTasks.moveAfter(favoritesToMove);
+        }
+
+        favoriteTasksObserverLord.notifyObservers(new ObserverLord.ObserverNotification<FavoriteTasksObserver>() {
+            public void notify(FavoriteTasksObserver observer) {
+                observer.favoritesReordered(favoriteTasks);
+            }
+        });
+    }
+
+    /**
+     * Call this to save favorites to a file.
+     */
+    public void exportToFile(DOM4JSerializer.ExportInteraction exportInteraction) {
+        DOM4JSerializer.exportToFile("favorites", exportInteraction, createFileFilter(), this);
+    }
+
+    /**
+     * Call this to read favorites from a file. I'm going to use FavoritesSerializable rather than ourselves (even though we're a JDOMSerializable) so if something goes wrong, we won't wipe out our
+     * current settings.
+     */
+    public boolean importFromFile(DOM4JSerializer.ImportInteraction importInteraction) {
+        FavoritesSerializable serializable = new FavoritesSerializable();
+        if (!DOM4JSerializer.importFromFile(importInteraction, createFileFilter(), serializable)) {
+            return false;
+        }
+
+        //only if we succeed should we clear out the existing favorites
+        favoriteTasks.clear();
+        favoriteTasks.addAll(serializable.getFavorites());
+
+        notifyFavoritesChanged();
+
+        return true;
+    }
+
+    private ExtensionFileFilter createFileFilter() {
+        return new ExtensionFileFilter(".favorite-tasks", "Favorite Tasks");
+    }
+
+    /**
+     * Call this to saves the current settings.
+     *
+     * @param settings where you save the settings.
+     */
+    public void serializeOut(SettingsNode settings) {
+        FavoritesSerializable.serializeOut(settings, favoriteTasks);
+    }
+
+    /**
+     * Call this to read in this object's settings. The reverse of serializeOut.
+     *
+     * @param settings where you read your settings.
+     */
+    public void serializeIn(SettingsNode settings) {
+        FavoritesSerializable.serializeIn(settings, favoriteTasks);
+    }
+
+    /**
+     * This makes a copy of all the selected tasks.
+     *
+     * @param tasksToCopy the tasks to copy
+     */
+    public void duplicateFavorites(List<FavoriteTask> tasksToCopy) {
+        if (tasksToCopy == null || tasksToCopy.isEmpty()) {
+            return;
+        }
+
+        Iterator<FavoriteTask> iterator = tasksToCopy.iterator();
+        while (iterator.hasNext()) {
+            FavoriteTask taskToCopy = iterator.next();
+            FavoriteTask newFavoriteTask = new FavoriteTask(taskToCopy.getFullCommandLine(), taskToCopy.getDisplayName(), taskToCopy.alwaysShowOutput());
+            favoriteTasks.add(newFavoriteTask);
+        }
+
+        notifyFavoritesChanged();
+    }
+
+    /**
+     * This makes a copy of the selected task.
+     *
+     * @param taskToCopy the task to copy
+     */
+    public FavoriteTask duplicateFavorite(FavoriteTask taskToCopy) {
+
+        if (taskToCopy == null) {
+            return null;
+        }
+
+        FavoriteTask newFavoriteTask = new FavoriteTask(taskToCopy.getFullCommandLine(), taskToCopy.getDisplayName(), taskToCopy.alwaysShowOutput());
+        favoriteTasks.add(newFavoriteTask);
+        notifyFavoritesChanged();
+        return newFavoriteTask;
+    }
+
+    /**
+     * This combines all the command lines of the favorites list into a single command line. This is useful for allowing a user to execute multiple favorites at once. Note: this doesn't do anything
+     * intelligent by trying to weed out duplicates. Gradle handles that nicely already.
+     *
+     * @param favoriteTasks the favorite tasks to combine
+     * @return a single String of all the command combined.
+     */
+    public static String combineFavoriteCommandLines(List<FavoriteTask> favoriteTasks) {
+        StringBuilder builder = new StringBuilder();
+
+        Iterator<FavoriteTask> iterator = favoriteTasks.iterator();
+        while (iterator.hasNext()) {
+            FavoriteTask favoriteTask = iterator.next();
+
+            builder.append(favoriteTask.getFullCommandLine());
+            if (iterator.hasNext()) {
+                builder.append(' ');
+            }
+        }
+
+        return builder.toString();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesSerializable.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesSerializable.java
new file mode 100644
index 0000000..40053ea
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/favorites/FavoritesSerializable.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.favorites;
+
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Inner class that handles serializing favorites. You can either pass it a favorites list and serialize them out or use the default constructor and serialize it. This allows you to serialize a
+ * favorites list with or without an editor.
+ *
+ * @author mhunsicker
+ */
+class FavoritesSerializable implements SettingsSerializable {
+    private List<FavoriteTask> favorites;
+
+    private static final String FAVORITE_ELEMENT_TAG = "favorite";
+    private static final String FULL_COMMAND_LINE = "full-command-line";
+    private static final String DISPLAY_NAME = "display-name";
+    private static final String SHOW_OUTPUT = "show-output";
+    private static final String ROOT_TAG = "favorites";
+    private static final String FAVORITES_SIZE = "favorites-size";
+    private static final String FAVORITE_PREFIX = "favorite_";
+
+    //use this constructor if you're serializing OUT
+
+    public FavoritesSerializable(List<FavoriteTask> favorites) {
+        this.favorites = favorites;
+    }
+
+    //use this constructor if you're serialzing IN
+
+    public FavoritesSerializable() {
+        favorites = new ArrayList<FavoriteTask>();
+    }
+
+    //call this to get the favorites that were serilized in.
+
+    public List<FavoriteTask> getFavorites() {
+        return favorites;
+    }
+
+    /**
+     * Call this to saves the current settings.
+     *
+     * @param settings where you save the settings.
+     */
+    public void serializeOut(SettingsNode settings) {
+        serializeOut(settings, favorites);
+    }
+
+    public static void serializeOut(SettingsNode settings, List<FavoriteTask> favorites) {
+        SettingsNode rootNode = settings.addChildIfNotPresent(ROOT_TAG);
+        rootNode.removeAllChildren(); //clear out whatever may have already been there
+
+        Iterator<FavoriteTask> iterator = favorites.iterator();
+        while (iterator.hasNext()) {
+            FavoriteTask favoriteTask = iterator.next();
+
+            SettingsNode taskNode = rootNode.addChild(FAVORITE_ELEMENT_TAG);
+            taskNode.setValueOfChild(FULL_COMMAND_LINE, favoriteTask.getFullCommandLine());
+            taskNode.setValueOfChild(DISPLAY_NAME, favoriteTask.getDisplayName());
+            taskNode.setValueOfChildAsBoolean(SHOW_OUTPUT, favoriteTask.alwaysShowOutput());
+        }
+    }
+
+    /**
+     * Call this to read in this object's settings. The reverse of serializeOut.
+     *
+     * @param settings where you read your settings.
+     */
+    public void serializeIn(SettingsNode settings) {
+        serializeIn(settings, favorites);
+    }
+
+    public static void serializeIn(SettingsNode settings, List<FavoriteTask> favorites) {
+        favorites.clear();  //remove everything already there
+
+        SettingsNode rootElement = settings.getChildNode(ROOT_TAG);
+        if (rootElement == null) {
+            return;
+        }
+
+        Iterator<SettingsNode> iterator = rootElement.getChildNodes(FAVORITE_ELEMENT_TAG).iterator();
+        while (iterator.hasNext()) {
+            SettingsNode taskNode = iterator.next();
+
+            String fullCommandLine = taskNode.getValueOfChild(FULL_COMMAND_LINE, null);
+            if (fullCommandLine != null) {
+                String displayName = taskNode.getValueOfChild(DISPLAY_NAME, fullCommandLine);
+                boolean showOutput = taskNode.getValueOfChildAsBoolean(SHOW_OUTPUT, false);
+
+                addFavoriteTask(favorites, fullCommandLine, displayName, showOutput);
+            }
+        }
+    }
+
+    private static void addFavoriteTask(List<FavoriteTask> favorites, String fullCommandLine, String displayName, boolean alwaysShowOutput) {
+        if (displayName == null) {
+            displayName = fullCommandLine;
+        }
+
+        favorites.add(new FavoriteTask(fullCommandLine, displayName, alwaysShowOutput));
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/AllowAllProjectAndTaskFilter.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/AllowAllProjectAndTaskFilter.java
similarity index 100%
rename from subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/AllowAllProjectAndTaskFilter.java
rename to subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/AllowAllProjectAndTaskFilter.java
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicFilterEditor.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicFilterEditor.java
new file mode 100644
index 0000000..75b53fa
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicFilterEditor.java
@@ -0,0 +1,273 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.filters;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.foundation.common.ObserverLord;
+import org.gradle.gradleplugin.foundation.DOM4JSerializer;
+import org.gradle.gradleplugin.foundation.ExtensionFileFilter;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ This allows editing a BasicProjectAndTaskFilter. You don't work directly
+ with the BasicProjectAndTaskFilter to alter it. Go through this.
+ During the editing process, you often need to fire off notifications that
+ normally aren't required. This is where those notifications would come from.
+ This also has some extra validation that isn't present in the filter itself.
+
+ @author mhunsicker
+  */
+
+public class BasicFilterEditor implements ProjectAndTaskFilter {
+    private List<String> filteredOutProjectNames = new ArrayList<String>();
+    private List<String> filteredOutTaskNames = new ArrayList<String>();
+    private boolean filterOutTasksWithNoDescription;
+    private ObserverLord<FilterEditorObserver> observerLord = new ObserverLord<FilterEditorObserver>();
+
+    public interface FilterEditorObserver {
+        /**
+         * A generic notification that the filter has changed.
+         */
+        public void filterChanged();
+    }
+
+    public BasicFilterEditor() {
+
+    }
+
+    public BasicFilterEditor(BasicProjectAndTaskFilter filter) {
+        initializeFromFilter(filter);
+    }
+
+    public void initializeFromFilter(BasicProjectAndTaskFilter filter) {
+        filteredOutProjectNames.clear();
+        hideProjectsByName(filter.getFilteredOutProjectNames());
+
+        filteredOutTaskNames.clear();
+        hideTasksByName(filter.getFilteredOutTaskNames());
+
+        filterOutTasksWithNoDescription = filter.filterOutTasksWithNoDescription();
+        notifyChanges();
+    }
+
+    public void addFilterEditorObserver(FilterEditorObserver observer, boolean inEventQueue) {
+        observerLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeFilterEditorObserver(FilterEditorObserver observer) {
+        observerLord.removeObserver(observer);
+    }
+
+    public boolean filterOutTasksWithNoDescription() {
+        return filterOutTasksWithNoDescription;
+    }
+
+    public void setFilterOutTasksWithNoDescription(boolean filterOutTasksWithNoDescription) {
+        this.filterOutTasksWithNoDescription = filterOutTasksWithNoDescription;
+    }
+
+    public void hideProjects(ProjectView... filteredProjects) {
+        hideProjects(Arrays.asList(filteredProjects));
+    }
+
+    public void hideProjects(List<ProjectView> filteredProjects) {
+        Iterator<ProjectView> iterator = filteredProjects.iterator();
+        while (iterator.hasNext()) {
+            ProjectView projectView = iterator.next();
+            if (!filteredOutProjectNames.contains(projectView.getName())) {
+                filteredOutProjectNames.add(projectView.getName());
+            }
+        }
+
+        notifyChanges();
+    }
+
+    public void hideProjectsByName(String... projectNames) {
+        hideProjectsByName(Arrays.asList(projectNames));
+    }
+
+    public void hideProjectsByName(List<String> projectNames) {
+        Iterator<String> iterator = projectNames.iterator();
+        while (iterator.hasNext()) {
+            String gradleProject = iterator.next();
+            if (!filteredOutProjectNames.contains(gradleProject)) {
+                filteredOutProjectNames.add(gradleProject);
+            }
+        }
+        notifyChanges();
+    }
+
+    public void showProjects(ProjectView... filteredProjects) {
+        showProjects(Arrays.asList(filteredProjects));
+    }
+
+    public void showProjects(List<ProjectView> filteredProjects) {
+        Iterator<ProjectView> iterator = filteredProjects.iterator();
+        while (iterator.hasNext()) {
+            ProjectView projectView = iterator.next();
+            filteredOutProjectNames.remove(projectView.getName());
+        }
+        notifyChanges();
+    }
+
+    public void showProjectsByName(String... filteredProjects) {
+        showProjectsByName(Arrays.asList(filteredProjects));
+    }
+
+    public void showProjectsByName(List<String> filteredProjects) {
+        Iterator<String> iterator = filteredProjects.iterator();
+        while (iterator.hasNext()) {
+            String gradleProjectName = iterator.next();
+            filteredOutProjectNames.remove(gradleProjectName);
+        }
+        notifyChanges();
+    }
+
+    /**
+     * Determines if the specified project should be allowed or not.
+     *
+     * @param project the project in question
+     * @return true to allow it, false not to.
+     */
+    public boolean doesAllowProject(ProjectView project) {
+        return !filteredOutProjectNames.contains(project.getName());
+    }
+
+    public boolean doesAllowProject(String projectName) {
+        return !filteredOutProjectNames.contains(projectName);
+    }
+
+    public void hideTasks(TaskView... filteredTasks) {
+        hideTasks(Arrays.asList(filteredTasks));
+    }
+
+    public void hideTasks(List<TaskView> filteredTasks) {
+        Iterator<TaskView> iterator = filteredTasks.iterator();
+        while (iterator.hasNext()) {
+            TaskView taskView = iterator.next();
+            if (!filteredOutTaskNames.contains(taskView.getName())) {
+                filteredOutTaskNames.add(taskView.getName());
+            }
+        }
+        notifyChanges();
+    }
+
+    public void hideTasksByName(String... taskNames) {
+        hideTasksByName(Arrays.asList(taskNames));
+    }
+
+    public void hideTasksByName(List<String> taskNames) {
+        Iterator<String> iterator = taskNames.iterator();
+        while (iterator.hasNext()) {
+            String gradleTask = iterator.next();
+            if (!filteredOutTaskNames.contains(gradleTask)) {
+                filteredOutTaskNames.add(gradleTask);
+            }
+        }
+        notifyChanges();
+    }
+
+    public void showTasks(TaskView... filteredTasks) {
+        showTasks(Arrays.asList(filteredTasks));
+    }
+
+    public void showTasks(List<TaskView> filteredTasks) {
+        Iterator<TaskView> iterator = filteredTasks.iterator();
+        while (iterator.hasNext()) {
+            TaskView taskView = iterator.next();
+            filteredOutTaskNames.remove(taskView.getName());
+        }
+        notifyChanges();
+    }
+
+    public void showTasksByName(String... filteredTasks) {
+        showTasksByName(Arrays.asList(filteredTasks));
+    }
+
+    public void showTasksByName(List<String> filteredTasks) {
+        Iterator<String> iterator = filteredTasks.iterator();
+        while (iterator.hasNext()) {
+            String gradleTaskName = iterator.next();
+            filteredOutTaskNames.remove(gradleTaskName);
+        }
+        notifyChanges();
+    }
+
+    /**
+     * Determines if the specified task should be allowed or not.
+     *
+     * @param task the task in question
+     * @return true to allow it, false not to.
+     */
+    public boolean doesAllowTask(TaskView task) {
+        //since we've got the task here, we can more than just filter it by name. We can
+        //filter it out if it has no description.
+        return BasicProjectAndTaskFilter.doesAllowTask(task, filteredOutTaskNames, filterOutTasksWithNoDescription);
+    }
+
+    public boolean doesAllowTask(String taskName) {
+        return !filteredOutTaskNames.contains(taskName);
+    }
+
+    public BasicProjectAndTaskFilter createFilter() {
+        return new BasicProjectAndTaskFilter(filteredOutProjectNames, filteredOutTaskNames, filterOutTasksWithNoDescription);
+    }
+
+    /**
+     * Call this to save this filter to a file.
+     */
+    public void exportToFile(DOM4JSerializer.ExportInteraction exportInteraction) {
+        BasicProjectAndTaskFilter basicProjectAndTaskFilter = createFilter();
+        DOM4JSerializer.exportToFile("basic-filter", exportInteraction, createFileFilter(), basicProjectAndTaskFilter);
+    }
+
+    /**
+     * Call this to read a filter from a file.
+     */
+    public boolean importFromFile(DOM4JSerializer.ImportInteraction importInteraction) {
+        BasicProjectAndTaskFilter basicProjectAndTaskFilter = new BasicProjectAndTaskFilter();
+        if (!DOM4JSerializer.importFromFile(importInteraction, createFileFilter(), basicProjectAndTaskFilter)) {
+            return false;
+        }
+
+        initializeFromFilter(basicProjectAndTaskFilter);
+        notifyChanges();
+        return true;
+    }
+
+    /**
+     * This creates a file filter suitable for storing/reading this filter.
+     */
+    private ExtensionFileFilter createFileFilter() {
+        return new ExtensionFileFilter(".task-filter", "Task Filter");
+    }
+
+    /**
+     * Call this whenever you make changes so we can notify any observers.
+     */
+    private void notifyChanges() {
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<FilterEditorObserver>() {
+            public void notify(FilterEditorObserver observer) {
+                observer.filterChanged();
+            }
+        });
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicProjectAndTaskFilter.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicProjectAndTaskFilter.java
new file mode 100644
index 0000000..a3ea651
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/BasicProjectAndTaskFilter.java
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.filters;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.foundation.settings.SettingsSerializable;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a basic filter where you can specify specific projects and tasks that will be filtered out.
+ *
+ * @author mhunsicker
+ */
+public class BasicProjectAndTaskFilter implements ProjectAndTaskFilter, SettingsSerializable {
+    private static final String BASIC_PROJECT_AND_TASK_FILTER = "basic-project-and-task-filter";
+    private static final String FILTERED_OUT_PROJECTS = "filtered-out-projects";
+    private static final String FILTERED_OUT_TASKS = "filtered-out-tasks";
+    private static final String FILTER_OUT_TASKS_WITH_NO_DESCRIPTION = "filter-out-tasks-with-no-description";
+    private static final String ITEM = "item";
+    private static final String VALUE = "value";
+
+    private List<String> filteredOutProjectNames = new ArrayList<String>();
+    private List<String> filteredOutTaskNames = new ArrayList<String>();
+    private boolean filterOutTasksWithNoDescription;
+
+    public BasicProjectAndTaskFilter(List<String> filteredOutProjectNames, List<String> filteredOutTaskNames, boolean filterOutTasksWithNoDescription) {
+        this.filterOutTasksWithNoDescription = filterOutTasksWithNoDescription;
+        this.filteredOutProjectNames.addAll(filteredOutProjectNames);
+        this.filteredOutTaskNames.addAll(filteredOutTaskNames);
+    }
+
+    public BasicProjectAndTaskFilter() {
+    }
+
+    public List<String> getFilteredOutProjectNames() {
+        return filteredOutProjectNames;
+    }
+
+    /*package*/
+
+    void setFilteredOutProjectNames(List<String> filteredOutProjectNames) {
+        this.filteredOutProjectNames = filteredOutProjectNames;
+    }
+
+    public List<String> getFilteredOutTaskNames() {
+        return filteredOutTaskNames;
+    }
+
+    /*package*/
+
+    void setFilteredOutTaskNames(List<String> filteredOutTaskNames) {
+        this.filteredOutTaskNames = filteredOutTaskNames;
+    }
+
+    public boolean filterOutTasksWithNoDescription() {
+        return filterOutTasksWithNoDescription;
+    }
+
+    /*package*/
+
+    void setFilterOutTasksWithNoDescription(boolean filterOutTasksWithNoDescription) {
+        this.filterOutTasksWithNoDescription = filterOutTasksWithNoDescription;
+    }
+
+    /**
+     * Determines if the specified project should be allowed or not.
+     *
+     * @param project the project in question
+     * @return true to allow it, false not to.
+     */
+    public boolean doesAllowProject(ProjectView project) {
+        return !filteredOutProjectNames.contains(project.getName());
+    }
+
+    /**
+     * Determines if the specified task should be allowed or not.
+     *
+     * @param task the task in question
+     * @return true to allow it, false not to.
+     */
+    public boolean doesAllowTask(TaskView task) {
+        return doesAllowTask(task, filteredOutTaskNames, filterOutTasksWithNoDescription);
+    }
+
+    /**
+     * Determines if the specified task should be allowed or not.
+     *
+     * This version is static and is shared by this filter and its editor.
+     *
+     * @param task the task in question
+     * @param filteredOutTasks a list of filtered out task names
+     * @param filterOutTasksWithNoDescription whether or not to hide it if it as no description
+     * @return true if the task is allowed, false if not.
+     */
+    public static boolean doesAllowTask(TaskView task, List<String> filteredOutTasks, boolean filterOutTasksWithNoDescription) {
+        if (filterOutTasksWithNoDescription) {
+            if (!task.hasDescription()) {
+                return false;
+            }
+        }
+
+        return !filteredOutTasks.contains(task.getName());
+    }
+
+    /**
+     * Call this to saves the current settings.
+     *
+     * @param settings where you save the settings.
+     */
+    public void serializeOut(SettingsNode settings) {
+        SettingsNode rootNode = settings.addChildIfNotPresent(BASIC_PROJECT_AND_TASK_FILTER);
+        rootNode.removeAllChildren(); //clear out whatever may have already been there
+
+        rootNode.setValueOfChildAsBoolean(FILTER_OUT_TASKS_WITH_NO_DESCRIPTION, filterOutTasksWithNoDescription);
+
+        SettingsNode filteredOutProjectsNode = rootNode.addChild(FILTERED_OUT_PROJECTS);
+        serializeOutStringList(filteredOutProjectsNode, filteredOutProjectNames);
+
+        SettingsNode filteredOutTasksNode = rootNode.addChild(FILTERED_OUT_TASKS);
+        serializeOutStringList(filteredOutTasksNode, filteredOutTaskNames);
+    }
+
+    /**
+     * Writes out a list of strings as 'item' element children of parentElement.
+     */
+    private void serializeOutStringList(SettingsNode parentNode, List<String> strings) {
+        Iterator<String> iterator = strings.iterator();
+        while (iterator.hasNext()) {
+            String item = iterator.next();
+            SettingsNode itemNode = parentNode.addChild(ITEM);
+            itemNode.setValue(item);
+        }
+    }
+
+    /**
+     * Call this to read in this object's settings. The reverse of serializeOut.
+     *
+     * @param settings where you read your settings.
+     */
+    public void serializeIn(SettingsNode settings) {
+        filteredOutProjectNames.clear();
+        filteredOutTaskNames.clear();
+
+        SettingsNode rootNode = settings.getChildNode(BASIC_PROJECT_AND_TASK_FILTER);
+        if (rootNode == null) {
+            return;
+        }
+
+        filterOutTasksWithNoDescription = rootNode.getValueOfChildAsBoolean(FILTER_OUT_TASKS_WITH_NO_DESCRIPTION, filterOutTasksWithNoDescription);
+
+        SettingsNode filteredOutProjectsNode = rootNode.getChildNode(FILTERED_OUT_PROJECTS);
+        if (filteredOutProjectsNode != null) {
+            serializeInStringList(filteredOutProjectsNode, filteredOutProjectNames);
+        }
+
+        SettingsNode filteredOutTasksNode = rootNode.getChildNode(FILTERED_OUT_TASKS);
+        if (filteredOutTasksNode != null) {
+            serializeInStringList(filteredOutTasksNode, filteredOutTaskNames);
+        }
+    }
+
+    /**
+     * Reads in a list of strings as 'item' element children of parentElement.
+     */
+    private void serializeInStringList(SettingsNode parentNode, List<String> strings) {
+        Iterator<SettingsNode> iterator = parentNode.getChildNodes(ITEM).iterator();
+        while (iterator.hasNext()) {
+            SettingsNode itemNode = iterator.next();
+            String item = itemNode.getValue();
+            if (item != null) {
+                strings.add(item);
+            }
+        }
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/ProjectAndTaskFilter.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/ProjectAndTaskFilter.java
similarity index 100%
rename from subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/filters/ProjectAndTaskFilter.java
rename to subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/filters/ProjectAndTaskFilter.java
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/AbstractRequest.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/AbstractRequest.java
new file mode 100644
index 0000000..52af986
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/AbstractRequest.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.request;
+
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.foundation.queue.ExecutionQueue;
+
+/**
+ * This represents a basic reques to gradle that is executed in a separate process using the ProcessLauncherServer. This stores the command line to execute and has the ability to cancel itself by
+ * either removing it from the queue if it hasn't started yet, or killing the external process.
+ *
+ * @author mhunsicker
+ */
+public abstract class AbstractRequest implements Request {
+    private long requestID;
+    private String fullCommandLine;
+    private String displayName;
+    private boolean forceOutputToBeShown;
+    private ExecutionQueue executionQueue;
+    private ProcessLauncherServer server;
+    protected ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction = new DummyExecutionInteraction();
+
+    public AbstractRequest(long requestID, String fullCommandLine, String displayName, boolean forceOutputToBeShown, ExecutionQueue executionQueue) {
+        this.requestID = requestID;
+        this.fullCommandLine = fullCommandLine;
+        this.displayName = displayName;
+        this.forceOutputToBeShown = forceOutputToBeShown;
+        this.executionQueue = executionQueue;
+    }
+
+    public long getRequestID() {
+        return requestID;
+    }
+
+    public String getFullCommandLine() {
+        return fullCommandLine;
+    }
+
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    public boolean forceOutputToBeShown() {
+        return forceOutputToBeShown;
+    }
+
+    /**
+     * Cancels this request.
+     */
+    public synchronized boolean cancel() {
+        if (this.server != null) {
+            server.killProcess();
+        }
+
+        executionQueue.removeRequestFromQueue(this);
+        return true;
+    }
+
+    public synchronized void setProcessLauncherServer(ProcessLauncherServer server) {
+        this.server = server;
+    }
+
+    public void setExecutionInteraction(ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction) {
+        this.executionInteraction = executionInteraction;
+    }
+
+    /**
+     * This is a dummy ExecutionInteraction. It does nothing. It exists because the requests require one, but there's a timing issue about when the Request and ExecutionInteraction are paired.
+     * Actually, this mechanism needs to allow for multiple listeners instead of just a single interaction. I was in the middle of refactoring other things and didn't want to get into that, so I'm
+     * doing this instead. Its only meant to be temporary, but we'll see.
+     */
+    public class DummyExecutionInteraction implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
+        /**
+         * Notification that gradle has started execution. This may not get called if some error occurs that prevents gradle from running.
+         */
+        public void reportExecutionStarted() {
+
+        }
+
+        /**
+         * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
+         *
+         * @param size the total number of tasks.
+         */
+        public void reportNumberOfTasksToExecute(int size) {
+
+        }
+
+        /**
+         * Notification that execution has finished. Note: if the client fails to launch at all, this should still be called.
+         *
+         * @param wasSuccessful true if gradle was successful (returned 0)
+         * @param message the output of gradle if it ran. If it didn't, an error message.
+         * @param throwable an exception if one occurred
+         */
+        public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+
+        }
+
+        public void reportTaskStarted(String message, float percentComplete) {
+
+        }
+
+        public void reportTaskComplete(String message, float percentComplete) {
+
+        }
+
+        public void reportLiveOutput(String message) {
+
+        }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/ExecutionRequest.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/ExecutionRequest.java
new file mode 100644
index 0000000..63fc015
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/ExecutionRequest.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.request;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.foundation.queue.ExecutionQueue;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+
+import java.io.File;
+
+/**
+ * This represents a reques to gradle that is executed in a separate process using the ProcessLauncherServer. This version is for directly executing commands in gradle (the most common type of
+ * request).
+ *
+ * @author mhunsicker
+ */
+public class ExecutionRequest extends AbstractRequest {
+
+    public static final Type TYPE = new Type() {
+    };
+
+    public ExecutionRequest(long requestID, String fullCommandLine, String displayName, boolean forceOutputToBeShown, ExecutionQueue executionQueue) {
+        super(requestID, fullCommandLine, displayName, forceOutputToBeShown, executionQueue);
+    }
+
+    /**
+     * This is called right before this command is executed (because the settings such as log level and stack trace level can be changed between the time someone initiates a command and it executes).
+     * The execution takes place in another process so this should create the appropriate Protocol suitable for passing the results of the execution back to us.
+     *
+     * @param logLevel the user's log level.
+     * @param stackTraceLevel the user's stack trace level
+     * @param currentDirectory the current working directory of your gradle project
+     * @param gradleHomeDirectory the gradle home directory
+     * @param customGradleExecutor the path to a custom gradle executable. May be null.
+     * @return a protocol that our server will use to communicate with the launched gradle process.
+     */
+    public ProcessLauncherServer.Protocol createServerProtocol(LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, File currentDirectory, File gradleHomeDirectory,
+                                                               File customGradleExecutor) {
+        executionInteraction.reportExecutionStarted();  //go ahead and fire off that the execution has started. It has from the user's standpoint.
+
+        return new ExecuteGradleCommandServerProtocol(currentDirectory, gradleHomeDirectory, customGradleExecutor, getFullCommandLine(), logLevel, stackTraceLevel, executionInteraction);
+    }
+
+    public void executeAgain(GradlePluginLord gradlePluginLord) {
+        gradlePluginLord.addExecutionRequestToQueue(getFullCommandLine(), getDisplayName(), forceOutputToBeShown());
+    }
+
+    public Type getType() {
+        return TYPE;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/RefreshTaskListRequest.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/RefreshTaskListRequest.java
new file mode 100644
index 0000000..89945ad
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/RefreshTaskListRequest.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.request;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.foundation.ipc.gradle.TaskListServerProtocol;
+import org.gradle.foundation.queue.ExecutionQueue;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * This represents a request to gradle that is executed in a separate process using the ProcessLauncherServer. This is a special request where the results are to build up a project/task tree.
+ *
+ * @author mhunsicker
+ */
+public class RefreshTaskListRequest extends AbstractRequest {
+
+    public static final Type TYPE = new Type() {
+    };
+
+    private GradlePluginLord gradlePluginLord;
+
+    public RefreshTaskListRequest(long requestID, String fullCommandLine, ExecutionQueue executionQueue, GradlePluginLord gradlePluginLord) {
+        super(requestID, fullCommandLine, "Refresh", false, executionQueue);
+        this.gradlePluginLord = gradlePluginLord;
+    }
+
+    /**
+     * This is called right before this command is executed (because the settings such as log level and stack trace level can be changed between the time someone initiates a command and it executes).
+     * The execution takes place in another process so this should create the appropriate Protocol suitable for passing the results of the execution back to us.
+     *
+     * @param logLevel the user's log level.
+     * @param stackTraceLevel the user's stack trace level
+     * @param currentDirectory the current working directory of your gradle project
+     * @param gradleHomeDirectory the gradle home directory
+     * @param customGradleExecutor the path to a custom gradle executable. May be null.
+     * @return a protocol that our server will use to communicate with the launched gradle process.
+     */
+    public ProcessLauncherServer.Protocol createServerProtocol(LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, File currentDirectory, File gradleHomeDirectory,
+                                                               File customGradleExecutor) {
+        executionInteraction.reportExecutionStarted();  //go ahead and fire off that the execution has started. It has from the user's standpoint.
+
+        ExecutionInteractionWrapper wrapper = new ExecutionInteractionWrapper(executionInteraction);
+
+        return new TaskListServerProtocol(currentDirectory, gradleHomeDirectory, customGradleExecutor, getFullCommandLine(), logLevel, stackTraceLevel, wrapper);
+    }
+
+    private class ExecutionInteractionWrapper implements TaskListServerProtocol.ExecutionInteraction {
+        private ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction;
+
+        private ExecutionInteractionWrapper(ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction) {
+            this.executionInteraction = executionInteraction;
+        }
+
+        /**
+         * Notification that gradle has started execution. This may not get called if some error occurs that prevents gradle from running.
+         */
+        public void reportExecutionStarted() {
+            executionInteraction.reportExecutionStarted();
+        }
+
+        /**
+         * Notification that execution has finished. Note: if the client fails to launch at all, this should still be called.
+         *
+         * @param wasSuccessful true if gradle was successful (returned 0)
+         * @param message the output of gradle if it ran. If it didn't, an error message.
+         * @param throwable an exception if one occurred
+         */
+        public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+            executionInteraction.reportExecutionFinished(wasSuccessful, message, throwable);
+        }
+
+        public void projectsPopulated(List<ProjectView> projects) {
+            gradlePluginLord.setProjects(projects);
+        }
+
+        public void reportLiveOutput(String message) {
+            executionInteraction.reportLiveOutput(message);
+        }
+    }
+
+    public void executeAgain(GradlePluginLord gradlePluginLord) {
+        gradlePluginLord.addRefreshRequestToQueue();
+    }
+
+    public Type getType() {
+        return TYPE;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/Request.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/Request.java
new file mode 100644
index 0000000..9cfdf82
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/request/Request.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.request;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.foundation.queue.ExecutionQueue;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+
+import java.io.File;
+
+/**
+ * This represents a reques to gradle that is executed in a separate process using the ProcessLauncherServer.
+ *
+ * @author mhunsicker
+ */
+public interface Request extends ExecutionQueue.Request {
+
+    public long getRequestID();
+
+    public String getFullCommandLine();
+
+    public String getDisplayName();
+
+    public boolean forceOutputToBeShown();
+
+    /**
+     * This is called internally to link the request with the server that is running the gradle process.
+     *
+     * @param server the server.
+     */
+    public void setProcessLauncherServer(ProcessLauncherServer server);
+
+    /**
+     * Cancels this request.
+     *
+     * @return true if you can cancel or it or if it has already ran. This return code is mainly meant to prevent you from
+     */
+    public boolean cancel();
+
+    public void setExecutionInteraction(ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction);
+
+    /**
+     * This is called right before this command is executed (because the settings such as log level and stack trace level can be changed between the time someone initiates a command and it executes).
+     * The execution takes place in another process so this should create the appropriate Protocol suitable for passing the results of the execution back to us.
+     *
+     * @param logLevel the user's log level.
+     * @param stackTraceLevel the user's stack trace level
+     * @param currentDirectory the current working directory of your gradle project
+     * @param gradleHomeDirectory the gradle home directory
+     * @param customGradleExecutor the path to a custom gradle executable. May be null.
+     * @return a protocol that our server will use to communicate with the launched gradle process.
+     */
+    public ProcessLauncherServer.Protocol createServerProtocol(LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel, File currentDirectory, File gradleHomeDirectory,
+                                                               File customGradleExecutor);
+
+    public void executeAgain(GradlePluginLord gradlePluginLord);
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/runner/GradleRunner.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/runner/GradleRunner.java
new file mode 100644
index 0000000..89baef7
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/runner/GradleRunner.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.runner;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.foundation.ipc.basic.ProcessLauncherServer;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+
+import java.io.File;
+
+/**
+ * This executes a command line in an external process.
+ *
+ * @author mhunsicker
+ */
+public class GradleRunner {
+    private File currentDirectory;
+    private File gradleHomeDirectory;
+    private File customGradleExecutor;
+    private ProcessLauncherServer server;
+
+    public GradleRunner(File currentDirectory, File gradleHomeDirectory, File customGradleExecutor) {
+        this.currentDirectory = currentDirectory;
+        this.gradleHomeDirectory = gradleHomeDirectory;
+        this.customGradleExecutor = customGradleExecutor;
+    }
+
+    public synchronized void executeCommand(String commandLine, LogLevel logLevel, StartParameter.ShowStacktrace stackTraceLevel,
+                                            ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction) {
+        //the protocol manages the command line and messaging observers
+        ExecuteGradleCommandServerProtocol serverProtocol = new ExecuteGradleCommandServerProtocol(currentDirectory, gradleHomeDirectory, customGradleExecutor, commandLine, logLevel, stackTraceLevel,
+                executionInteraction);
+
+        //the server kicks off gradle as an external process and manages the communication with said process
+        server = new ProcessLauncherServer(serverProtocol);
+        server.addServerObserver(new ProcessLauncherServer.ServerObserver() {
+            public void clientExited(int result, String output) {
+            }
+
+            public void serverExited() {
+                clearServer();
+            }
+        }, false);
+
+        executionInteraction.reportExecutionStarted();  //go ahead and fire off that the execution has started. Normally, this is done by the request, but we don't have a request in this case.
+        server.start();
+    }
+
+    /**
+     * Call this to stop the gradle process.
+     */
+    public synchronized void killProcess() {
+        if (server != null) {
+            server.killProcess();
+        }
+    }
+
+    private synchronized void clearServer() {
+        server = null;
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/DOM4JSettingsNode.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/DOM4JSettingsNode.java
similarity index 100%
rename from subprojects/gradle-ui/src/main/java/org/gradle/gradleplugin/foundation/settings/DOM4JSettingsNode.java
rename to subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/DOM4JSettingsNode.java
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsNode.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsNode.java
new file mode 100644
index 0000000..4c19b96
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsNode.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.settings;
+
+import java.util.List;
+
+/**
+ * This provides a mechanism for storing settings. It is a hybrid of a DOM (like xml) and something much simpler like the java preferences. It is first meant to be easy to use. Second, it is supposed
+ * to abstract how the settings are actually stored. The point is to allow IDEs and such to store this is whatever manner they choose. Thus, this is vague. Third, it is meant to be relatively easy to
+ * implement.
+ *
+ * While this is a hiearchy, it is not meant to be as complex as XML with arbitrary attributes. Instead, it is only meant to be a key-value pairing. However, the hiearchy allows you to easily have
+ * lists and other complex structures without having to worry about name collisions as you would if this were a pure key-value pair.
+ *
+ * This is meant to be a single tree for the entire application. You shouldn't create these on your own. A node for your use should be given to you by your parent. Only the highest level object should
+ * directly create an instance of one of these. It should manage saving and restore these settings.
+ *
+ * Due to how some 'owners' of the settings work, you should save your settings immediately here (think of this as you would a database). Why? Well, for example: when Idea is the owner in the gradle
+ * Idea plugin, it attempts to store its settings very frequently and uses differences in the results to determine if changes have been made to a plugin. As a result, we store things in the setting
+ * immediately.
+ *
+ * This node consists to 3 things: - name: this is the 'key' of key-value pair. It is required. - value: this is the 'value' of key-value pair. It is NOT required. - child nodes: each node can have
+ * children nodes.
+ *
+ * Using these you can create a tree structure storing whatever you like. If you need multiple attributes like XML has, you should create children instead. So if, in xml, you wanted to do:
+ *
+ * <setting name="myname" value="myvalue" myotherattribute="attribute1" somethingelse="attribute2" >
+ *
+ * do this instead:
+ *
+ * node name="myName" value="myvalue" node name="myotherattribute" value="attribute1" node name="somethingelse" value="attribute2"
+ *
+ * This has several convenience functions for setting and getting values from child nodes. These are meant to be used in more of a java preferences replacement. You should create your own root node of
+ * your settings (by call addChildIfNotPresent from a node that is given to you) then you can use these functions and you only need to worry about uniqueness within your own node.
+ *
+ * @author mhunsicker
+ */
+public interface SettingsNode {
+    /**
+     * Sets the name of this node. This is used as its identifier.
+     *
+     * @param name the new name. Cannot be null!
+     */
+    public void setName(String name);
+
+    public String getName();
+
+    /**
+     * Sets the value of this node. This is whatever you like, but is always internally text.
+     *
+     * @param value the new value. Can be null.
+     */
+    public void setValue(String value);
+
+    public String getValue();
+
+    /**
+     * Sets the value of the child node, adding it if it is not already present. This is a convenience function providing more java preferences-like behavior.
+     *
+     * @param name the name of the child node.
+     * @param value the new value.
+     */
+    public void setValueOfChild(String name, String value);
+
+    /**
+     * Gets the value of the child node. If it is not present, the defaultValue is returned. This is a convenience function providing more java preferences-like behavior.
+     *
+     * @param name the name of the child node.
+     * @param defaultValue the value to return if the child node is not present
+     * @return the value.
+     */
+    public String getValueOfChild(String name, String defaultValue);
+
+    /**
+     * Sets the value of the child node as an integer, adding it if it is not already present. This is a convenience function providing more java preferences-like behavior.
+     *
+     * @param name the name of the child node.
+     * @param value the new value.
+     */
+    public void setValueOfChildAsInt(String name, int value);
+
+    /**
+     * Gets the value of the child node as an integer. If it is not present or the value is cannot be interpretted as an integer, the defaultValue is returned. This is a convenience function providing
+     * more java preferences-like behavior.
+     *
+     * @param name the name of the child node.
+     * @param defaultValue the value to return if the child node is not present or cannot be interpretted as an integer.
+     * @return the value.
+     */
+    public int getValueOfChildAsInt(String name, int defaultValue);
+
+    //same as setValueOfChildAsInt but with a boolean
+
+    public void setValueOfChildAsBoolean(String name, boolean value);
+
+    //same as getValueOfChildAsInt but with a boolean
+
+    public boolean getValueOfChildAsBoolean(String name, boolean defaultValue);
+
+    //same as setValueOfChildAsInt but with a long
+
+    public void setValueOfChildAsLong(String name, long value);
+
+    //same as getValueOfChildAsInt but with a long
+
+    public long getValueOfChildAsLong(String name, long defaultValue);
+
+    /**
+     * @return a list of all child nodes of this node.
+     */
+    public List<SettingsNode> getChildNodes();
+
+    /**
+     * @param name the names of the sought child nodes.
+     * @return a list of all child nodes of this node that have the specified name. If none are found, this should return an empty list. Never null.
+     */
+    public List<SettingsNode> getChildNodes(String name);
+
+    /**
+     * Returns the child node with the specified name.
+     *
+     * @param name the name of the sought node
+     * @return the child settings node or null if no match found.
+     */
+    public SettingsNode getChildNode(String name);
+
+    /**
+     * Call this to add a child node to this node.
+     *
+     * @param name the name of the node
+     * @return the child settings node.
+     */
+    public SettingsNode addChild(String name);
+
+    /**
+     * This adds a child node with the specified name or returns the existing child node if one already exists with said name.
+     *
+     * @param name the name.
+     * @return the child settings node. Never null.
+     */
+    public SettingsNode addChildIfNotPresent(String name);
+
+    /**
+     * Returns a node at the specified path starting at 'this' node.
+     *
+     * @param pathPortions an array of 'names' of the nodes. The first item corresponds to a direct child of this node. The second item would be the grand child of this node. etc. etc.
+     * @return a node if it exists. Null if not.
+     */
+    public SettingsNode getNodeAtPath(String... pathPortions);
+
+    /**
+     * Removes this node from its parent.
+     */
+    public void removeFromParent();
+
+    /**
+     * Deletes all the children of this node.
+     */
+    public void removeAllChildren();
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsSerializable.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsSerializable.java
new file mode 100644
index 0000000..9d42132
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/foundation/settings/SettingsSerializable.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.foundation.settings;
+
+/**
+ * Something that can be serialized to an XML structure. This is meant to store any preferences or settings (lightweight and heavyweight).
+ *
+ * @author mhunsicker
+ */
+public interface SettingsSerializable {
+    /**
+     * Call this to saves the current settings.
+     *
+     * @param settings where you save the settings.
+     */
+    public void serializeOut(SettingsNode settings);
+
+    /**
+     * Call this to read in this object's settings. The reverse of serializeOut.
+     *
+     * @param settings where you read your settings.
+     * @author mhunsicker
+     */
+    public void serializeIn(SettingsNode settings);
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/AlternateUIInteraction.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/AlternateUIInteraction.java
new file mode 100644
index 0000000..4605c8c
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/AlternateUIInteraction.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface;
+
+import java.io.File;
+
+/**
+ * This allows this plugin to interact with alternative UIs. Specifically, this has callbacks for IDE's so tell it to edit a project file or the like. This is the 'alternate' UI interaction because it
+ * interacts with other UIs (other than the built-in UI).
+ *
+ * @author mhunsicker
+ */
+public interface AlternateUIInteraction {
+
+    /**
+     * Notification that you should open the specified file and go to the specified line. Its up to the application to determine if this file should be opened for editing or simply displayed. The
+     * difference comes into play for things like xml or html files where a user may want to open them in a browser vs a source code file where they may want to open it directly in an IDE.
+     *
+     * @param file the file to opened
+     * @param line the line to go to. -1 if no line is specified.
+     */
+    public void openFile(File file, int line);
+
+    /*
+      This is called when we should open the specified file for editing. This version explicitly wants them
+      edited versus just opened.
+
+      @param  file      the file to open
+      @param line the line to go to. -1 if no line is specified.
+      @author mhunsicker
+   */
+    public void editFile(File file, int line);
+
+    /**
+     * Determines if we can call editFile or openFile. This is not a dynamic answer and should always return either true of false. If you want to change the answer, return true and then handle the
+     * files differently in editFiles.
+     *
+     * @return true if support editing files, false otherwise.
+     */
+    public boolean doesSupportEditingOpeningFiles();
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageButton.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageButton.java
new file mode 100644
index 0000000..dd47c88
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageButton.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.common;
+
+import javax.swing.*;
+import javax.swing.plaf.metal.MetalButtonUI;
+import java.awt.*;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * This is button that has no border and only an image. It highlights when the user moves over it. This style was modeled after Idea. This was used because the borders on toolbars can get a little
+ * busy and this looks a little cleaner.
+ *
+ * @author mhunsicker
+ */
+public class BorderlessImageButton extends JButton {
+    private Color oldBackgroundColor;
+
+    public BorderlessImageButton(Action action, Icon icon) {
+        super(action);
+        setUI();
+
+        // If icon exist use icon otherwise let button use text ( if available ?).
+        if (action.getValue(Action.SMALL_ICON) != null) {
+            setText(null);
+        }
+
+        String name = (String) action.getValue(action.NAME);
+        InputMap inputMap = this.getInputMap(this.WHEN_IN_FOCUSED_WINDOW);
+        KeyStroke keyStroke = (KeyStroke) action.getValue(action.ACCELERATOR_KEY);
+        inputMap.put(keyStroke, name);
+
+        init(icon);
+    }
+
+    private void setUI() {
+        // This fixes an issue where the WindowsButtonUI wants to draw a border
+        // around a button that isn't in a toolbar.  This occurs even if you set
+        // an empty border because it ignores your border and draws its own.
+        setUI(MetalButtonUI.createUI(this));
+    }
+
+    private void init(Icon icon) {
+        setBorder(BorderlessUtility.DEFAULT_BORDER);
+        addMouseListener(new HighlightMouseListener());
+
+        setText(null);
+
+        if (icon != null) {
+            setIcon(icon);
+
+            int height = icon.getIconHeight();
+            int width = icon.getIconWidth();
+            Dimension preferredSize = new Dimension(width + 2, height + 2); //plus 2 for the border
+
+            setMinimumSize(preferredSize);
+            setMaximumSize(preferredSize);
+            setPreferredSize(preferredSize);
+            setFocusPainted(false);
+        }
+    }
+
+    private class HighlightMouseListener extends MouseAdapter {
+        private HighlightMouseListener() {
+        }
+
+        public void mouseEntered(MouseEvent event) {
+            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
+                oldBackgroundColor = BorderlessImageButton.this.getBackground();
+                BorderlessImageButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
+                BorderlessImageButton.this.setBorder(BorderlessUtility.ON_MOUSEOVER_BORDER);
+            }
+        }
+
+        public void mousePressed(MouseEvent event) {
+            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
+                BorderlessImageButton.this.setBackground(BorderlessUtility.ON_BUTTON_PRESSED_BACKGROUND);
+            }
+        }
+
+        public void mouseReleased(MouseEvent event) {
+            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
+                // do a hit test to make sure the mouse is being released inside the button
+                Rectangle2D buttonRect = BorderlessImageButton.this.getBounds();
+                if (buttonRect.contains(event.getPoint())) {
+                    BorderlessImageButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
+                }
+            }
+        }
+
+        public void mouseExited(MouseEvent event) {
+            BorderlessImageButton.this.setBackground(oldBackgroundColor);
+            BorderlessImageButton.this.setBorder(BorderlessUtility.DEFAULT_BORDER);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageToggleButton.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageToggleButton.java
new file mode 100644
index 0000000..4756a02
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessImageToggleButton.java
@@ -0,0 +1,124 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.common;
+
+import javax.swing.*;
+import javax.swing.border.Border;
+import javax.swing.plaf.metal.MetalButtonUI;
+import java.awt.*;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.geom.Rectangle2D;
+
+/**
+ * This is button that has no border and only an image. It highlights when the user moves over it. This version is a toggle button. This style was modeled after Idea. This was used because the borders
+ * on toolbars can get a little busy and this looks a little cleaner.
+ *
+ * @author mhunsicker
+ */
+public class BorderlessImageToggleButton extends JToggleButton {
+    public Border selectedBorder = BorderFactory.createLoweredBevelBorder();
+    private Color defaultBackground;
+
+    public BorderlessImageToggleButton(Action action, Icon icon) {
+        super(action);
+        setUI();
+
+        this.init(icon);
+    }
+
+    private void setUI() {
+        // This fixes an issue where the WindowsButtonUI wants to draw a border
+        // around a button that isn't in a toolbar.  This occurs even if you set
+        // an empty border because it ignores your border and draws its own.
+        setUI(MetalButtonUI.createUI(this));
+    }
+
+    private void init(Icon icon) {
+        this.setBorder(BorderlessUtility.DEFAULT_BORDER);
+        defaultBackground = this.getBackground();
+        this.addMouseListener(new HighlightMouseListener());
+
+        setText(null);
+
+        if (icon != null) {
+            setIcon(icon);
+
+            int height = icon.getIconHeight();
+            int width = icon.getIconWidth();
+            Dimension preferredSize = new Dimension(width + 2, height + 2); //plus 2 for the border
+
+            setMinimumSize(preferredSize);
+            setMaximumSize(preferredSize);
+            setPreferredSize(preferredSize);
+            setFocusPainted(false);
+        }
+    }
+
+    public void setSelected(boolean select) {
+        super.setSelected(select);
+        setBorder(null);
+    }
+
+    /**
+     * I added this to correct an architecture problem. Whenever this button was removed or added to a parent container the underlying swing architecture was resetting the border and it wasn't taking
+     * into account our need to change the border depending on the selection state of the button. This overrides negates that effect causing the button to behave as intended.
+     *
+     * @param border The new border to set for this button the we disregard and replace with our own.
+     * @author wwhitaker
+     */
+    public void setBorder(Border border) {
+        super.setBorder(BorderlessImageToggleButton.this.isSelected() ? selectedBorder : BorderlessUtility.DEFAULT_BORDER);
+    }
+
+    private class HighlightMouseListener extends MouseAdapter {
+        public HighlightMouseListener() {
+        }
+
+        public void mouseEntered(MouseEvent event) {
+            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
+                BorderlessImageToggleButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
+                BorderlessImageToggleButton.this.setBorder(BorderlessUtility.ON_MOUSEOVER_BORDER);
+            }
+        }
+
+        public void mousePressed(MouseEvent event) {
+            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
+                BorderlessImageToggleButton.this.setBackground(BorderlessUtility.ON_BUTTON_PRESSED_BACKGROUND);
+            }
+        }
+
+        public void mouseReleased(MouseEvent event) {
+            if (getAction() != null ? getAction().isEnabled() : isEnabled()) {
+                // do a hit test to make sure the mouse is being released inside the button
+                Rectangle2D buttonRect = BorderlessImageToggleButton.this.getBounds();
+                if (buttonRect.contains(event.getPoint())) {
+                    BorderlessImageToggleButton.this.setBackground(BorderlessUtility.ON_MOUSE_OVER_BACKGROUND);
+                }
+            }
+        }
+
+        public void mouseExited(MouseEvent event) {
+            BorderlessImageToggleButton.this.setBackground(defaultBackground);
+
+            if (BorderlessImageToggleButton.this.isSelected()) {
+                BorderlessImageToggleButton.this.setBorder(selectedBorder);
+            } else {
+                BorderlessImageToggleButton.this.setBorder(BorderlessUtility.DEFAULT_BORDER);
+            }
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessUtility.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessUtility.java
new file mode 100644
index 0000000..52c5968
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/BorderlessUtility.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.common;
+
+import javax.swing.*;
+import javax.swing.border.Border;
+import java.awt.*;
+
+/**
+ * Utility functions/constants for borderless buttons
+ *
+ * @author mhunsicker
+ */
+public class BorderlessUtility {
+    public static final Color ON_MOUSE_OVER_BACKGROUND = new Color(181, 190, 214);
+    public static final Color ON_BUTTON_PRESSED_BACKGROUND = new Color(130, 146, 185);
+    public static final Border ON_MOUSEOVER_BORDER = BorderFactory.createLineBorder(new Color(8, 36, 107));
+
+    //make the default border NOT an EMPTY border (so things don't resize), but make it appear clear by using the panel background color
+    public static final Border DEFAULT_BORDER = BorderFactory.createLineBorder(UIManager.getColor("Panel.background"));
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/PreferencesAssistant.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/PreferencesAssistant.java
new file mode 100644
index 0000000..40b890d
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/common/PreferencesAssistant.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.common;
+
+import org.gradle.api.UncheckedIOException;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * This class just helps do some of the mundane tasks of saving and restoring the location of something.
+ *
+ * @author mhunsicker
+ */
+public class PreferencesAssistant {
+    private static final String WINDOW_X = "window_x";
+    private static final String WINDOW_Y = "window_y";
+    private static final String WINDOW_WIDTH = "window_width";
+    private static final String WINDOW_HEIGHT = "window_height";
+    private static final String EXTENDED_STATE = "extended-state";
+    private static final String DIVIDER_LOCATION = "divider_location";
+    private static final String DIRECTORY_NAME = "directory_name";
+
+    public static SettingsNode saveSettings(SettingsNode settingsNode, Window window, String id, Class windowClass) {
+        Point p = window.getLocation();
+        Dimension size = window.getSize();
+
+        SettingsNode childNode = settingsNode.addChildIfNotPresent(getPrefix(windowClass, id));
+
+        childNode.setValueOfChildAsInt(WINDOW_X, p.x);
+        childNode.setValueOfChildAsInt(WINDOW_Y, p.y);
+        childNode.setValueOfChildAsInt(WINDOW_WIDTH, size.width);
+        childNode.setValueOfChildAsInt(WINDOW_HEIGHT, size.height);
+
+        return childNode;
+    }
+
+    /**
+     * This version works for frames. It makes sure it doesn't save the extended state (maximized, iconified, etc) if its iconified. Doing so, causes problems when its restored.
+     */
+    public static void saveSettings(SettingsNode settingsNode, JFrame frame, String id, Class windowClass) {
+        if (frame.getExtendedState() == JFrame.ICONIFIED) {
+            return;
+        }
+
+        SettingsNode childNode = saveSettings(settingsNode, (Window) frame, id, windowClass);
+
+        if (frame.getExtendedState() != JFrame.ICONIFIED) {
+            childNode.setValueOfChildAsInt(EXTENDED_STATE, frame.getExtendedState());
+        }
+    }
+
+    /**
+     * Call this to restore the preferences that were saved via a call to save settings. Note: if no preferences are found it doesn't do anything.
+     *
+     * @param window the window who's settings to save
+     * @param id a unique ID for these settings.
+     * @param windowClass Any class. Just used for the preferences mechanism to obtain an instance. Making this an argument gives you more flexibility.
+     */
+    public static SettingsNode restoreSettings(SettingsNode settingsNode, Window window, String id, Class windowClass) {
+        SettingsNode childNode = settingsNode.getChildNode(getPrefix(windowClass, id));
+        if (childNode == null) {
+            return null;
+        }
+
+        int x = childNode.getValueOfChildAsInt(WINDOW_X, window.getLocation().x);
+        int y = childNode.getValueOfChildAsInt(WINDOW_Y, window.getLocation().y);
+        int width = childNode.getValueOfChildAsInt(WINDOW_WIDTH, window.getSize().width);
+        int height = childNode.getValueOfChildAsInt(WINDOW_HEIGHT, window.getSize().height);
+
+        window.setLocation(x, y);
+        window.setSize(width, height);
+
+        return childNode;
+    }
+
+    /**
+     * This restores the position of a frame. We not only restore the size, but we'll maximize it if its was maximized when saved.
+     */
+    public static void restoreSettings(SettingsNode settingsNode, JFrame frame, String id, Class windowClass) {
+        SettingsNode childNode = restoreSettings(settingsNode, (Window) frame, id, windowClass);
+        if (childNode == null) {
+            return;
+        }
+
+        int extendedState = childNode.getValueOfChildAsInt(EXTENDED_STATE, frame.getExtendedState());
+
+        if (extendedState != JFrame.ICONIFIED) {
+            frame.setExtendedState(extendedState);
+        }
+    }
+
+    public static void saveSettings(SettingsNode settingsNode, JSplitPane splitter, String id, Class splitterClass) {
+        SettingsNode childNode = settingsNode.addChildIfNotPresent(getPrefix(splitterClass, id));
+
+        childNode.setValueOfChildAsInt(DIVIDER_LOCATION, splitter.getDividerLocation());
+    }
+
+    public static void restoreSettings(SettingsNode settingsNode, JSplitPane splitter, String id, Class splitterClass) {
+        SettingsNode childNode = settingsNode.getChildNode(getPrefix(splitterClass, id));
+        if (childNode == null) {
+            return;
+        }
+
+        int location = childNode.getValueOfChildAsInt(DIVIDER_LOCATION, splitter.getDividerLocation());
+        splitter.setDividerLocation(location);
+    }
+
+    private static String getPrefix(Class aClass, String id) {
+        return aClass.getSimpleName() + '_' + id;
+    }
+
+    /**
+     * Saves the settings of the file chooser; and by settings I mean the 'last visited directory'.
+     *
+     * @param saveCurrentDirectoryVsSelectedFilesParent this should be true true if you're selecting only directories, false if you're selecting only files. I don't know what if you allow both.
+     */
+    public static void saveSettings(SettingsNode settingsNode, JFileChooser fileChooser, String id, Class fileChooserClass, boolean saveCurrentDirectoryVsSelectedFilesParent) {
+        SettingsNode childNode = settingsNode.addChildIfNotPresent(getPrefix(fileChooserClass, id));
+
+        String save;
+        try {
+            if (saveCurrentDirectoryVsSelectedFilesParent) {
+                save = fileChooser.getCurrentDirectory().getCanonicalPath();
+            } else {
+                save = fileChooser.getSelectedFile().getCanonicalPath();
+            }
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+        if (save != null) {
+            childNode.setValueOfChild(DIRECTORY_NAME, save);
+        }
+    }
+
+    public static void restoreSettings(SettingsNode settingsNode, JFileChooser fileChooser, String id, Class fileChooserClass) {
+        SettingsNode childNode = settingsNode.getChildNode(getPrefix(fileChooserClass, id));
+        if (childNode == null) {
+            return;
+        }
+
+        String lastDirectory = childNode.getValueOfChild(DIRECTORY_NAME, null);
+
+        if (lastDirectory != null) {
+            fileChooser.setCurrentDirectory(new File(lastDirectory));
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/AbstractGradleUIInstance.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/AbstractGradleUIInstance.java
new file mode 100644
index 0000000..2d936c2
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/AbstractGradleUIInstance.java
@@ -0,0 +1,221 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.File;
+
+/**
+ * A simple UI for gradle that is meant to be embedded into an IDE. This doesn't have it own output since most IDEs have their own mechanism for that.
+ *
+ * @author mhunsicker
+ */
+public abstract class AbstractGradleUIInstance implements BasicGradleUI {
+    protected MainGradlePanel gradlePanel;
+    protected GradlePluginLord gradlePluginLord;
+    protected SettingsNode settings;
+    protected AlternateUIInteraction alternateUIInteraction;
+
+    protected JPanel mainPanel;
+
+    public AbstractGradleUIInstance() {
+        gradlePluginLord = new GradlePluginLord();
+    }
+
+    public void initialize(SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
+        this.settings = settings;
+        this.alternateUIInteraction = alternateUIInteraction;
+
+        setupUI();
+    }
+
+    public JComponent getComponent() {
+        return mainPanel;
+    }
+
+    protected void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(createMainGradlePanel(), BorderLayout.CENTER);
+    }
+
+    protected Component createMainGradlePanel() {
+        gradlePanel = new MainGradlePanel(gradlePluginLord, getOutputUILord(), settings, alternateUIInteraction);
+        return gradlePanel;
+    }
+
+    public abstract OutputUILord getOutputUILord();
+
+    /**
+     * Call this whenever you're about to show this panel. We'll do whatever initialization is necessary.
+     */
+    public void aboutToShow() {
+        gradlePanel.aboutToShow();
+    }
+
+    /**
+     * Call this to deteremine if you can close this pane. if we're busy, we'll ask the user if they want to close.
+     *
+     * @param closeInteraction allows us to interact with the user
+     * @return true if we can close, false if not.
+     */
+    public boolean canClose(CloseInteraction closeInteraction) {
+        if (!gradlePluginLord.isBusy()) {
+            return true;
+        }
+
+        return closeInteraction.promptUserToConfirmClosingWhileBusy();
+    }
+
+    /**
+     * Call this before you close the pane. This gives it an opportunity to do cleanup. You probably should call canClose before this. It gives the app a chance to cancel if its busy.
+     */
+    public void close() {
+        gradlePanel.aboutToClose();
+    }
+
+    public File getCurrentDirectory() {
+        return gradlePluginLord.getCurrentDirectory();
+    }
+
+    public void setCurrentDirectory(File currentDirectory) {
+        gradlePluginLord.setCurrentDirectory(currentDirectory);
+    }
+
+    /**
+     * Call this to add one of your own tabs to this. You can call this at any time.
+     *
+     * @param index where to add the tab
+     * @param gradleTab the tab to add
+     */
+    public void addGradleTab(int index, GradleTab gradleTab) {
+        gradlePanel.addGradleTab(index, gradleTab);
+    }
+
+    /**
+     * Call this to remove one of your own tabs from this.
+     *
+     * @param gradleTab the tab to remove
+     */
+    public void removeGradleTab(GradleTab gradleTab) {
+        gradlePanel.removeGradleTab(gradleTab);
+    }
+
+    /**
+     * @return the total number of tabs.
+     */
+    public int getGradleTabCount() {
+        return gradlePanel.getGradleTabCount();
+    }
+
+    /**
+     * @param index the index of the tab
+     * @return the name of the tab at the specified index.
+     */
+    public String getGradleTabName(int index) {
+        return gradlePanel.getGradleTabName(index);
+    }
+
+    public GradlePluginLord getGradlePluginLord() {
+        return gradlePluginLord;
+    }
+
+    /**
+     * Returns the index of the gradle tab with the specified name.
+     *
+     * @param name the name of the tab
+     * @return the index of the tab or -1 if not found
+     */
+    public int getGradleTabIndex(String name) {
+        return gradlePanel.getGradleTabIndex(name);
+    }
+
+    /**
+     * @return the currently selected tab
+     */
+    public int getCurrentGradleTab() {
+        return gradlePanel.getCurrentGradleTab();
+    }
+
+    /**
+     * Makes the specified tab the current tab.
+     *
+     * @param index the index of the tab.
+     */
+    public void setCurrentGradleTab(int index) {
+        gradlePanel.setCurrentGradleTab(index);
+    }
+
+    /*
+      This executes the given gradle command.
+
+      @param  commandLineArguments the command line arguments to pass to gradle.
+      @param displayName           the name displayed in the UI for this command
+      @author mhunsicker
+   */
+    public void executeCommand(String commandLineArguments, String displayName) {
+        gradlePluginLord.addExecutionRequestToQueue(commandLineArguments, displayName);
+    }
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     */
+    public void refreshTaskTree() {
+        gradlePluginLord.addRefreshRequestToQueue();
+    }
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     *
+     * @param additionalCommandLineArguments additional command line arguments to be passed to gradle when refreshing the task tree.
+     */
+    public void refreshTaskTree(String additionalCommandLineArguments) {
+        gradlePluginLord.addRefreshRequestToQueue(additionalCommandLineArguments);
+    }
+
+    /**
+     * Determines if commands are currently being executed or not.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy() {
+        return gradlePluginLord.isBusy();
+    }
+
+    /**
+     * This adds the specified component to the setup panel. It is added below the last 'default' item. You can only add 1 component here, so if you need to add multiple things, you'll have to handle
+     * adding that to yourself to the one component.
+     *
+     * @param component the component to add.
+     */
+    public void setCustomPanelToSetupTab(JComponent component) {
+        gradlePanel.setCustomPanelToSetupTab(component);
+    }
+
+    /**
+     * Sets the font for the output text
+     *
+     * @param font the new font
+     */
+    public void setOutputTextFont(Font font) {
+        getOutputUILord().setOutputTextFont(font);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/BasicGradleUI.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/BasicGradleUI.java
new file mode 100644
index 0000000..37307b0
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/BasicGradleUI.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
+
+import javax.swing.*;
+import java.awt.*;
+
+/**
+ * .
+ *
+ * @author mhunsicker
+ */
+public interface BasicGradleUI {
+    public GradlePluginLord getGradlePluginLord();
+
+    /*
+       @return the panel for this pane. This can be inserted directly into your UI.
+       @author mhunsicker
+    */
+    public JComponent getComponent();
+
+    /*
+       Call this whenever you're about to show this panel. We'll do whatever
+       initialization is necessary.
+       @author mhunsicker
+    */
+    public void aboutToShow();
+
+    //
+    public interface CloseInteraction {
+        /*
+           This is called if gradle tasks are being executed and you want to know if
+           we can close. Ask the user.
+           @return true if the user confirms cancelling the current tasks. False if not.
+           @author mhunsicker
+        */
+        public boolean promptUserToConfirmClosingWhileBusy();
+    }
+
+    /*
+       Call this to deteremine if you can close this pane. if we're busy, we'll
+       ask the user if they want to close.
+
+       @param  closeInteraction allows us to interact with the user
+       @return true if we can close, false if not.
+       @author mhunsicker
+    */
+    public boolean canClose(CloseInteraction closeInteraction);
+
+    /*
+       Call this before you close the pane. This gives it an opportunity to do
+       cleanup. You probably should call canClose before this. It gives the
+       app a chance to cancel if its busy.
+       @author mhunsicker
+    */
+    public void close();
+
+    /*
+       @return the total number of tabs.
+       @author mhunsicker
+    */
+    public int getGradleTabCount();
+
+    /*
+       @param  index      the index of the tab
+       @return the name of the tab at the specified index.
+       @author mhunsicker
+    */
+    public String getGradleTabName(int index);
+
+    /**
+     * Returns the index of the gradle tab with the specified name.
+     *
+     * @param name the name of the tab
+     * @return the index of the tab or -1 if not found
+     */
+    public int getGradleTabIndex(String name);
+
+    /**
+     * @return the currently selected tab
+     */
+    public int getCurrentGradleTab();
+
+    /**
+     * Makes the specified tab the current tab.
+     *
+     * @param index the index of the tab.
+     */
+    public void setCurrentGradleTab(int index);
+
+    /*
+       Call this to execute the given gradle command.
+
+       @param  commandLineArguments the command line arguments to pass to gradle.
+       @param displayName           the name displayed in the UI for this command
+       @author mhunsicker
+    */
+    public void executeCommand(String commandLineArguments, String displayName);
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     */
+    public void refreshTaskTree();
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     *
+     * @param additionalCommandLineArguments additional command line arguments to be passed to gradle when refreshing the task tree.
+     */
+    public void refreshTaskTree(String additionalCommandLineArguments);
+
+    /**
+     * Call this to add one of your own tabs to this. You can call this at any time.
+     *
+     * @param index where to add the tab
+     * @param gradleTab the tab to add
+     */
+    public void addGradleTab(int index, GradleTab gradleTab);
+
+    /**
+     * Call this to remove one of your own tabs from this.
+     *
+     * @param gradleTab the tab to remove
+     */
+    public void removeGradleTab(GradleTab gradleTab);
+
+    public OutputUILord getOutputUILord();
+
+    /**
+     * Determines if commands are currently being executed or not.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy();
+
+    /**
+     * This adds the specified component to the setup panel. It is added below the last 'default' item. You must call this after initialize
+     *
+     * @param component the component to add.
+     */
+    public void setCustomPanelToSetupTab(JComponent component);
+
+    /**
+     * Sets the font for the output text
+     *
+     * @param font the new font
+     */
+    public void setOutputTextFont(Font font);
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/DualPaneUIInstance.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/DualPaneUIInstance.java
new file mode 100644
index 0000000..55d91a6
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/DualPaneUIInstance.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+
+import javax.swing.*;
+import java.awt.*;
+
+/**
+ * A simple UI for gradle. This has two panels that can be inserted into a stand-alone application or an IDE. This is meant to hide most of the complexities of gradle. The two panes are a tabbed pane
+ * for executing tasks and an output pane.
+ *
+ * @author mhunsicker
+ */
+public class DualPaneUIInstance extends AbstractGradleUIInstance {
+    private OutputPanelLord outputPanelLord;
+
+    public DualPaneUIInstance() {
+    }
+
+    public void initialize(SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
+
+        outputPanelLord = new OutputPanelLord(gradlePluginLord, alternateUIInteraction);
+
+        super.initialize(settings, alternateUIInteraction);
+    }
+
+    /**
+     * We've overridden this to setup our splitter and our output window.
+     */
+    @Override
+    protected void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(createMainGradlePanel(), BorderLayout.CENTER);
+    }
+
+    public OutputUILord getOutputUILord() {
+        return outputPanelLord;
+    }
+
+    public Component getOutputPanel() {
+        return outputPanelLord.getMainPanel();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/MainGradlePanel.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/MainGradlePanel.java
new file mode 100644
index 0000000..1493d00
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/MainGradlePanel.java
@@ -0,0 +1,242 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.tabs.*;
+
+import javax.swing.*;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a tabbed pane meant to handle several tabs of gradle-related things. To use this, instantiate it, place it some Swing container (dialog, frame), then call aboutToShow() before you show the
+ * parent container. You can also add your own tabs to this (just call addGradleTab before calling aboutToShow()). When you shut down, call aboutToClose() before doing so.
+ *
+ * @author mhunsicker
+ */
+public class MainGradlePanel extends JPanel {
+    private static final String CURRENT_TAB = "current-tab";
+    private static final String MAIN_PANEL = "main_panel";
+
+    private GradlePluginLord gradlePluginLord;
+
+    private SettingsNode settings;
+    private AlternateUIInteraction alternateUIInteraction;
+
+    private List<GradleTab> gradleTabs = new ArrayList<GradleTab>();
+
+    private JTabbedPane tabbedPane;
+    private SetupTab setupTab;
+
+    public MainGradlePanel(GradlePluginLord gradlePluginLord, OutputUILord outputUILord, SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
+        this.alternateUIInteraction = alternateUIInteraction;
+        this.gradlePluginLord = gradlePluginLord;
+        this.settings = settings;
+        addDefaultTabs(outputUILord, alternateUIInteraction);
+    }
+
+    private void addDefaultTabs(OutputUILord outputUILord, AlternateUIInteraction alternateUIInteraction) {
+        //we'll give each tab their own settings node just so we don't have to worry about collisions.
+        gradleTabs.add(new TaskTreeTab(gradlePluginLord, settings.addChildIfNotPresent("task-tab"), alternateUIInteraction));
+        gradleTabs.add(new FavoriteTasksTab(gradlePluginLord, settings.addChildIfNotPresent("favorites-tab")));
+        gradleTabs.add(new CommandLineTab(gradlePluginLord, settings.addChildIfNotPresent("command_line-tab")));
+        setupTab = new SetupTab(gradlePluginLord, outputUILord, settings.addChildIfNotPresent("setup-tab"));
+        gradleTabs.add(setupTab);
+    }
+
+    private int getGradleTabIndex(Class soughtClass) {
+        for (int index = 0; index < gradleTabs.size(); index++) {
+            GradleTab gradleTab = gradleTabs.get(index);
+            if (gradleTab.getClass() == soughtClass) {
+                return index;
+            }
+        }
+        return -1;
+    }
+
+    public int getGradleTabIndex(String name) {
+        if (name != null) {
+            for (int index = 0; index < gradleTabs.size(); index++) {
+                GradleTab gradleTab = gradleTabs.get(index);
+                if (name.equals(gradleTab.getName())) {
+                    return index;
+                }
+            }
+        }
+        return -1;
+    }
+
+    /**
+     * @return the currently selected tab
+     */
+    public int getCurrentGradleTab() {
+        return tabbedPane.getSelectedIndex();
+    }
+
+    public void setCurrentGradleTab(int index) {
+        if (index >= 0 && index < getGradleTabCount()) {
+            tabbedPane.setSelectedIndex(index);
+        }
+    }
+
+    /**
+     * Call this to add one of your own tabs to this. You must call this before you call aboutToShow.
+     */
+    public void addGradleTab(int index, GradleTab gradleTab) {
+        //this can ultimately be called via external APIs so let's add a little extra error checking.
+        if (index < 0) {
+            index = 0;
+        }
+        if (index > gradleTabs.size()) {
+            index = gradleTabs.size();
+        }
+
+        gradleTabs.add(index, gradleTab);
+
+        if (tabbedPane != null) {   //if we've already displayed the tabs, we'll need to manually add it now to the tabbed pane.
+            addGradleTabToTabbedPane(index, gradleTab);
+        }
+    }
+
+    //this adds the tab. This is only to be used when adding a tab after the tabbed
+    //pane has already been displayed and populated with tabs.
+    private void addGradleTabToTabbedPane(int index, GradleTab gradleTab) {
+        tabbedPane.add(gradleTab.createComponent(), index);
+        tabbedPane.setTitleAt(index, gradleTab.getName());
+    }
+
+    public void removeGradleTab(GradleTab gradleTab) {
+        int existingIndex = gradleTabs.indexOf(gradleTab);
+        if (existingIndex == -1) {
+            return;
+        }
+
+        gradleTabs.remove(gradleTab);
+
+        tabbedPane.remove(existingIndex);
+
+        tabbedPane.invalidate();
+        tabbedPane.revalidate();
+        tabbedPane.repaint();
+    }
+
+    /**
+     * @return the total number of tabs.
+     */
+    public int getGradleTabCount() {
+        return gradleTabs.size();
+    }
+
+    /**
+     * @param index the index of the tab
+     * @return the name of the tab at the specified index.
+     */
+    public String getGradleTabName(int index) {
+        return gradleTabs.get(index).getName();
+    }
+
+    /**
+     * This is called when this about to displayed. Do any kind of initialization you need to do here.
+     */
+    public void aboutToShow() {
+        setupUI();
+
+        Iterator<GradleTab> iterator = gradleTabs.iterator();
+        while (iterator.hasNext()) {
+            GradleTab gradleTab = iterator.next();
+            gradleTab.aboutToShow();
+        }
+
+        //now start up the plugin now that everything has been initialized
+        gradlePluginLord.startExecutionQueue();
+    }
+
+    /**
+     * Notification that we're about to be closed. Here we're going to save our current settings.
+     */
+    public void aboutToClose() {
+    }
+
+    private void setupUI() {
+        setLayout(new BorderLayout());
+
+        tabbedPane = new JTabbedPane();
+        add(tabbedPane, BorderLayout.CENTER);
+
+        addTabs();
+
+        restoreLastTab();
+
+        //add a listener so we can store the current tab when it changes.
+        tabbedPane.addChangeListener(new ChangeListener() {
+            public void stateChanged(ChangeEvent e) {
+                int selection = tabbedPane.getSelectedIndex();
+                if (selection >= 0 && selection < gradleTabs.size()) {
+                    SettingsNode rootNode = settings.addChildIfNotPresent(MAIN_PANEL);
+                    rootNode.setValueOfChild(CURRENT_TAB, gradleTabs.get(selection).getName());
+                }
+            }
+        });
+    }
+
+    private void restoreLastTab() {
+        //if they're not setup, make the setup tab visible first.
+        if (!gradlePluginLord.isSetupComplete()) {
+            int tabToSelect = getGradleTabIndex(SetupTab.class);
+            if (tabToSelect != -1) {
+                tabbedPane.setSelectedIndex(tabToSelect);
+            }
+        } else {  //otherwise, try to get the last-used tab
+            int lastTabIndex = -1;
+
+            //all this is to just restore the last selected tab
+            SettingsNode rootNode = settings.getChildNode(MAIN_PANEL);
+            if (rootNode != null) {
+                String lastTabName = rootNode.getValueOfChild(CURRENT_TAB, "");
+                lastTabIndex = getGradleTabIndex(lastTabName);
+            }
+
+            if (lastTabIndex != -1) {
+                tabbedPane.setSelectedIndex(lastTabIndex);
+            }
+        }
+    }
+
+    private void addTabs() {
+        Iterator<GradleTab> iterator = gradleTabs.iterator();
+        while (iterator.hasNext()) {
+            GradleTab gradleTab = iterator.next();
+            tabbedPane.add(gradleTab.getName(), gradleTab.createComponent());
+        }
+    }
+
+    /**
+     * This adds the specified component to the setup panel. It is added below the last 'default' item. You can only add 1 component here, so if you need to add multiple things, you'll have to handle
+     * adding that to yourself to the one component.
+     *
+     * @param component the component to add.
+     */
+    public void setCustomPanelToSetupTab(JComponent component) {
+        setupTab.setCustomPanel(component);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanel.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanel.java
new file mode 100644
index 0000000..a5682b7
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanel.java
@@ -0,0 +1,462 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.BuildResult;
+import org.gradle.StartParameter;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.foundation.output.FileLinkDefinitionLord;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+/**
+ * This is a panel that displays the results of executing a gradle command. It shows gradle's output as well as progress.
+ *
+ * @author mhunsicker
+ */
+public class OutputPanel extends JPanel implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
+
+    private OutputPanelParent parent;
+    private AlternateUIInteraction alternateUIInteraction;
+
+    private JPanel gradleOutputTextPanel;
+    private OutputTextPane gradleOutputTextPane;
+
+    private JPanel progressPanel;
+    private JLabel progressLabel;
+    private JProgressBar progressBar;
+
+    private JPanel statusPanel;
+    private JLabel statusLabel;
+
+    private JButton executeAgainButton;
+
+    private JLabel forceShowOutputButtonLabel;   //a label that acts like a button
+
+    private boolean isBusy;     //is this actively showing output?
+    private boolean isPending;  //is this waitin got show output?
+    private boolean isPinned;   //keeps this panel open and disallows it from being re-used.
+    private boolean showProgress = true;
+    private boolean onlyShowOutputOnErrors;
+
+    private Request request;
+
+    public interface OutputPanelParent {
+
+        public void removeOutputPanel(OutputPanel outputPanel);
+
+        void reportExecuteFinished(Request request, boolean wasSuccessful);
+
+        void executeAgain(Request request, OutputPanel outputPanel);
+
+        public FileLinkDefinitionLord getFileLinkDefinitionLord();
+    }
+
+    public OutputPanel(OutputPanelParent parent, AlternateUIInteraction alternateUIInteraction) {
+        this.parent = parent;
+        this.alternateUIInteraction = alternateUIInteraction;
+    }
+
+    /**
+     * Call this after initializing this, but after setting any additional swing properties (actually, just the font for now). I really only added this as an optimization. Since we'll always be setting
+     * the font, I didn't want the various style objects created only to be thrown away and re-created. This way, you can set the font before we create the styles.
+     */
+    public void initialize() {
+        setupUI();
+    }
+
+    /**
+     * This is called whenever a new request is made. It associates this request with this output panel.
+     */
+    public void setRequest(Request request, boolean onlyShowOutputOnErrors) {
+        this.request = request;
+        if (request.forceOutputToBeShown()) {
+            setOnlyShowOutputOnErrors(false);
+        } else {
+            setOnlyShowOutputOnErrors(onlyShowOutputOnErrors);
+        }
+
+        //set this to indeterminate until we figure out how many tasks to execute.
+        progressBar.setIndeterminate(true);
+        progressBar.setStringPainted(false); //And don't show '0%' in the mean time.
+
+        setPending(true);
+        showProgress(true);   //make sure the progress is shown. It may have been turned off if we're reusing this component
+
+        appendGradleOutput(getPrefixText());
+    }
+
+    /**
+     * Returns a string stating the command we're currently executing. This is placed at the beginning of the output text. This is called when we start and when the command is finished (where we
+     * replace all of our text with the total output)
+     */
+    private String getPrefixText() {
+        return "Executing command: \"" + request.getFullCommandLine() + "\"\n";
+    }
+
+    public boolean isPinned() {
+        return isPinned;
+    }
+
+    public void setPinned(boolean pinned) {
+        isPinned = pinned;
+    }
+
+    public boolean isBusy() {
+        return isBusy;
+    }
+
+    protected void setBusy(boolean busy) {
+        isBusy = busy;
+    }   //this should be the only way to isBusy.
+
+    public boolean isPending() {
+        return isPending;
+    }
+
+    private void setPending(boolean pending) {
+        isPending = pending;
+        if (isPending) {
+            statusLabel.setText("Waiting to execute");
+        }
+
+        progressBar.setVisible(!isPending);
+    }
+
+    public Request getRequest() {
+        return request;
+    }
+
+    private void setupUI() {
+        setLayout(new BorderLayout());
+
+        add(createInfoPanel(), BorderLayout.NORTH);
+        add(createGradleOutputPanel(), BorderLayout.CENTER);
+    }
+
+    private Component createGradleOutputPanel() {
+        gradleOutputTextPanel = new JPanel(new BorderLayout());
+
+        gradleOutputTextPane = new OutputTextPane(new OutputTextPane.Interaction() {
+            public void fileClicked(File file, int line) {
+                alternateUIInteraction.openFile(file, line);
+            }
+        }, alternateUIInteraction.doesSupportEditingOpeningFiles(), getFont(), parent.getFileLinkDefinitionLord());
+
+        gradleOutputTextPanel.add(gradleOutputTextPane.asComponent(), BorderLayout.CENTER);
+
+        return gradleOutputTextPanel;
+    }
+
+    private Component createInfoPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        panel.add(createStatusPanel());
+        panel.add(createProgressPanel());
+
+        return panel;
+    }
+
+    private Component createProgressPanel() {
+        progressPanel = new JPanel(new BorderLayout());
+        progressLabel = new JLabel("Progress");
+        progressBar = new JProgressBar();
+        progressBar.setStringPainted(true);
+
+        progressPanel.add(progressBar, BorderLayout.NORTH);
+        progressPanel.add(progressLabel, BorderLayout.SOUTH);
+
+        progressPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
+
+        progressPanel.setVisible(false);
+        return progressPanel;
+    }
+
+    private Component createStatusPanel() {
+        statusPanel = new JPanel();
+        statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));
+        statusLabel = new JLabel();
+        executeAgainButton = Utility.createButton(OutputPanel.class, "/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png", "Execute Again", new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                parent.executeAgain(request, OutputPanel.this);
+            }
+        });
+        executeAgainButton.setVisible(false);
+
+        //this button is only shown when the output is hidden
+        forceShowOutputButtonLabel = new JLabel("Show Output");
+
+        forceShowOutputButtonLabel.addMouseListener(new MouseAdapter() {
+            public void mouseClicked(MouseEvent e) {
+                forciblyShowOutput();
+            }
+
+            public void mouseEntered(MouseEvent e) {
+                forceShowOutputButtonLabel.setForeground(UIManager.getColor("textHighlightText"));
+            }
+
+            public void mouseExited(MouseEvent e) {
+                forceShowOutputButtonLabel.setForeground(UIManager.getColor("Label.foreground"));
+            }
+        });
+
+        statusPanel.add(executeAgainButton);
+        statusPanel.add(Box.createHorizontalStrut(2));
+        statusPanel.add(statusLabel);
+        statusPanel.add(Box.createHorizontalGlue());
+        statusPanel.add(forceShowOutputButtonLabel);
+
+        statusPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
+        return statusPanel;
+    }
+
+    /**
+     * Call this if you're going to reuse this. it resets its output.
+     */
+    public void reset() {
+        executeAgainButton.setVisible(false);
+        statusLabel.setText("");
+        statusLabel.setForeground(UIManager.getColor("Label.foreground"));
+        gradleOutputTextPane.setText("");
+        progressLabel.setText("");
+    }
+
+    /**
+     * Call this to append text to the gradle output field. We'll also move the caret to the end.
+     *
+     * @param text the text to add
+     */
+    private void appendGradleOutput(final String text) {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                gradleOutputTextPane.appendText(text);
+            }
+        });
+    }
+
+    private void setProgress(final String text, final float percentComplete) {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                progressBar.setValue((int) percentComplete);
+                progressLabel.setText(text);
+            }
+        });
+    }
+
+    /**
+     * Notification that execution of a task or tasks has been started.
+     */
+    public void reportExecutionStarted() {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                setPending(false);
+                setBusy(true);
+                setProgress("Starting", 0);
+                if (showProgress) {
+                    progressPanel.setVisible(true);
+                }
+
+                statusLabel.setText("Executing");
+
+                //give the user the option to override this.
+                forceShowOutputButtonLabel.setVisible(onlyShowOutputOnErrors);
+            }
+        });
+    }
+
+    /**
+     * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
+     *
+     * @param size the total number of tasks.
+     */
+    public void reportNumberOfTasksToExecute(final int size) {  //if we only have a single task, then the intire process will be indeterminately long (it'll just from 0 to 100)
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                boolean isIndeterminate = size == 1;
+                progressBar.setIndeterminate(isIndeterminate);
+                progressBar.setStringPainted(!isIndeterminate);
+            }
+        });
+    }
+
+    /**
+     * Notification that execution of all tasks has completed. This is only called once at the end.
+     *
+     * @param wasSuccessful whether or not gradle encountered errors.
+     * @param buildResult contains more detailed information about the result of a build.
+     * @param output the text that gradle produced. May contain error information, but is usually just status.
+     */
+    public void reportExecutionFinished(boolean wasSuccessful, BuildResult buildResult, String output) {
+        reportExecutionFinished(wasSuccessful, output, buildResult.getFailure());
+    }
+
+    /**
+     * Notification that execution of a task has completed. This is the task you initiated and not for each subtask or dependent task.
+     *
+     * @param wasSuccessful whether or not gradle encountered errors.
+     * @param output the text that gradle produced. May contain error information, but is usually just status.
+     */
+    public void reportExecutionFinished(final boolean wasSuccessful, final String output, final Throwable throwable) {
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                setPending(false); //this can be called before we actually get a start message if it fails early. This clears the pending flag so we know we can reuse it.
+                setBusy(false);
+                progressPanel.setVisible(false);
+
+                //Make the output equal to all of our output. There are some timing issues where we don't get the last live output from gradle.
+                //This 'output' is the entire text. This way we always get all output.
+                String newText = getPrefixText() + output;
+                gradleOutputTextPane.setText(newText);
+
+                //show the user the time we finished this.
+                SimpleDateFormat formatter = new SimpleDateFormat("h:mm:ss aa");
+                String formattedTime = formatter.format(Calendar.getInstance().getTime());
+
+                if (wasSuccessful) {
+                    statusLabel.setText("Completed successfully at " + formattedTime);
+                    appendGradleOutput("\nCompleted Successfully");
+                } else {
+                    statusLabel.setText("Completed with errors at " + formattedTime);
+                    statusLabel.setForeground(Color.red.darker());
+
+                    //since errors occurred, show the output. If onlyShowOutputOnErrors is false, this textPanel will already be visible.
+                    gradleOutputTextPanel.setVisible(true);
+                }
+
+                executeAgainButton.setVisible(true);
+
+                appendThrowable(throwable);
+
+                //lastly, if the text output is not visible, make the 'show output' button visible
+                forceShowOutputButtonLabel.setVisible(!gradleOutputTextPanel.isVisible());
+
+                parent.reportExecuteFinished(request, wasSuccessful);
+            }
+        });
+    }
+
+    private void appendThrowable(Throwable throwable) {
+        if (throwable != null) {
+            String output = GradlePluginLord.getGradleExceptionMessage(throwable, StartParameter.ShowStacktrace.ALWAYS_FULL);
+            appendGradleOutput(output);
+        }
+    }
+
+    /**
+     * Notification that a single task has completed. Note: the task you kicked off probably executes other tasks.
+     *
+     * @param currentTaskName the task being executed
+     * @param percentComplete the percent complete of all the tasks that make up the task you requested.
+     */
+    public void reportTaskStarted(String currentTaskName, float percentComplete) {
+        setProgress(currentTaskName, percentComplete);
+    }
+
+    public void reportTaskComplete(String currentTaskName, float percentComplete) {
+        setProgress(currentTaskName, percentComplete);
+    }
+
+    public void reportFatalError(String message) {
+        appendGradleOutput('\n' + message + "\n\nFailed.\n");
+    }
+
+    /**
+     * Report real-time output from gradle and its subsystems (such as ant).
+     *
+     * @param output a single line of text to show.
+     * @author mhunsicker
+     */
+    public void reportLiveOutput(String output) {
+        appendGradleOutput(output);
+    }
+
+    /**
+     * Determines if this panel is ready to be reused. Currently, if its not busy or pinned, it can be reused.
+     *
+     * @author mhunsicker
+     */
+    public boolean canBeReusedNow() {
+        return !isPending && !isBusy && !isPinned;
+    }
+
+    /**
+     * Call this to show progress. Some tasks have no useful progress, so this allows you to disable it.
+     *
+     * @param showProgress true to show a progress bar, false not to.
+     */
+    private void showProgress(boolean showProgress) {
+        this.showProgress = showProgress;
+        progressPanel.setVisible(showProgress);
+    }
+
+    /**
+     * This overrides the onlyShowOutputOnErrors
+     */
+    private void forciblyShowOutput() {
+        gradleOutputTextPanel.setVisible(true);
+        forceShowOutputButtonLabel.setVisible(false);
+    }
+
+    public void setOnlyShowOutputOnErrors(boolean value) {
+        this.onlyShowOutputOnErrors = value;
+        gradleOutputTextPanel.setVisible(!value);
+    }
+
+    public boolean getOnlyShowOutputOnErrors() {
+        return onlyShowOutputOnErrors;
+    }
+
+    public boolean close() {
+        if (request != null)   //if we have a request, we can only close if it allows us to.
+        {
+            if (!request.cancel()) {
+                return false;
+            }
+        }
+
+        parent.removeOutputPanel(this);
+
+        setPinned(false);  //unpin it when it is removed
+        return true;
+    }
+
+    /**
+     * Sets the font for this component.
+     *
+     * @param font the desired <code>Font</code> for this component
+     * @beaninfo preferred: true bound: true attribute: visualUpdate true description: The font for the component.
+     * @see Component#getFont
+     */
+    @Override
+    public void setFont(Font font) {
+        super.setFont(font);
+        if (gradleOutputTextPane != null)  //this gets called by internal Swing APIs, so we may not have this yet.
+        {
+            gradleOutputTextPane.setFont(font);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanelLord.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanelLord.java
new file mode 100644
index 0000000..4c3a7e1
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputPanelLord.java
@@ -0,0 +1,436 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.foundation.common.ObserverLord;
+import org.gradle.foundation.output.FileLinkDefinitionLord;
+import org.gradle.foundation.queue.ExecutionQueue;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This class manages displaying the results of a gradle execution in a panel inside a JTabbedPane. It can reuse existing tabs but creates new ones if you run multiple things concurrently.
+ *
+ * @author mhunsicker
+ */
+public class OutputPanelLord implements OutputUILord, GradlePluginLord.RequestObserver, OutputPanel.OutputPanelParent {
+
+    private JPanel mainPanel;
+    private JTabbedPane tabbedPane;
+
+    private JPopupMenu popupMenu;
+
+    private boolean onlyShowOutputOnErrors;
+    private JMenuItem closeMenuItem;
+    private JMenuItem closeAllMenuItem;
+    private JMenuItem closeAllButThisMenuItem;
+    private JMenuItem togglePinStateMenuItem;
+
+    private ObserverLord<OutputObserver> observerLord = new ObserverLord<OutputObserver>();
+    private GradlePluginLord gradlePluginLord;
+    private AlternateUIInteraction alternateUIInteraction;
+    private Font font;
+
+    private FileLinkDefinitionLord fileLinkDefinitionLord;
+
+    private ExecutionRequest lastExecutionRequest;
+
+    public OutputPanelLord(GradlePluginLord gradlePluginLord, AlternateUIInteraction alternateUIInteraction) {
+        this.gradlePluginLord = gradlePluginLord;
+        this.alternateUIInteraction = alternateUIInteraction;
+
+        fileLinkDefinitionLord = new FileLinkDefinitionLord();
+
+        //add the OutputPanelLord as a request observer so it can create new tabs when new requests are added.
+        gradlePluginLord.addRequestObserver(this, true);
+
+        setupUI();
+
+        //gradle formats some output in 'ascii art' fashion. This ensures things line up properly.
+        Font font = new Font("Monospaced", Font.PLAIN, UIManager.getDefaults().getFont("Label.font").getSize());
+
+        setOutputTextFont(font);
+    }
+
+    public JPanel getMainPanel() {
+        return mainPanel;
+    }
+
+    private void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+
+        tabbedPane = new JTabbedPane();
+        mainPanel.add(tabbedPane, BorderLayout.CENTER);
+
+        setupPopupMenu();
+    }
+
+    private void setupPopupMenu() {
+        popupMenu = new JPopupMenu();
+
+        closeMenuItem = new JMenuItem(new AbstractAction("Close") {
+            public void actionPerformed(ActionEvent e) {
+                closeSelectedTab();
+            }
+        });
+        popupMenu.add(closeMenuItem);
+
+        closeAllMenuItem = new JMenuItem(new AbstractAction("Close All") {
+            public void actionPerformed(ActionEvent e) {
+                closeAllTabs();
+            }
+        });
+        popupMenu.add(closeAllMenuItem);
+
+        closeAllButThisMenuItem = new JMenuItem(new AbstractAction("Close All But This") {
+            public void actionPerformed(ActionEvent e) {
+                closeAllButSelectedTab();
+            }
+        });
+
+        popupMenu.add(closeAllButThisMenuItem);
+        popupMenu.addSeparator();
+
+        togglePinStateMenuItem = new JMenuItem(new AbstractAction("Pin") {
+            public void actionPerformed(ActionEvent e) {
+                togglePinSelectedTab();
+            }
+        });
+
+        popupMenu.add(togglePinStateMenuItem);
+
+        tabbedPane.addMouseListener(new MouseAdapter() {
+            public void mouseClicked(MouseEvent e) {
+                if (e.getClickCount() == 1 && e.getButton() == MouseEvent.BUTTON3) {
+                    enablePopupMenuAppropriately();
+                    Point point = e.getPoint();
+                    popupMenu.show(tabbedPane, point.x, e.getPoint().y);
+                }
+            }
+        });
+    }
+
+    private void enablePopupMenuAppropriately() {
+        OutputPanel panel = getSelectedOutputPanel();
+        if (panel == null) {
+            closeMenuItem.setEnabled(false);
+            togglePinStateMenuItem.setEnabled(false);
+        } else {
+            closeMenuItem.setEnabled(true);
+
+            //change the name of this to reflect what is actually happening.
+            if (panel.isPinned()) {
+                togglePinStateMenuItem.setText("Unpin");
+            } else {
+                togglePinStateMenuItem.setText("Pin");
+            }
+        }
+    }
+
+    /**
+     * This obtains an output panel for executing a task. It will try to reuse an existing tab.
+     *
+     * I don't like how this mechanism works. Its not obvious what you're going to get and how the tabs will be reused (from a user's standpoint). IntelliJ Idea doesn't allow multiple compiles/builds
+     * at a time, so they don't have this issue there. They do have it on Find where they have an option to explicitly display in a new tab. I don't think that quite works here as you don't normally
+     * think about the output. This is only an issue if you run multiple tasks at once or try to run new tasks while others are still executing. Ultimately, I don't think tabs are the way to go
+     * because closing a bunch of tabs is a pain.
+     *
+     * @param description the title we'll give to the output.
+     * @param selectOutputPanel true to select the output panel after we setup the tab, false if not. This is really only useful if you're calling this for multiple tasks one right after the other.
+     * Pass in false for all but the first (or last) one depending on what you want.
+     * @param reuseSelectedOutputPanelFirst true to attempt to reuse the current output tab. Otherwise, we'll go from left to right looking for a tab to reuse. This is really only useful if you're
+     * calling this for multiple tasks one after the other. In that case, you probably want to pass in false.
+     * @return an output panel.
+     */
+    private OutputPanel getOutputPanelForExecution(String description, boolean selectOutputPanel, boolean reuseSelectedOutputPanelFirst) {
+        OutputTab outputPanel = findExistingOutputPanelForExecution(reuseSelectedOutputPanelFirst);
+        if (outputPanel != null) {
+            outputPanel.setTabHeaderText(description);
+            outputPanel.reset();
+        } else {  //we don't have an existing tab. Create a new one.
+            outputPanel = new OutputTab(this, description, alternateUIInteraction);
+            outputPanel.setFont(font);
+            outputPanel.initialize();
+            tabbedPane.addTab(description, outputPanel);
+            if (selectOutputPanel) {
+                tabbedPane.setSelectedComponent(outputPanel);
+            }
+
+            Utility.setTabComponent15Compatible(tabbedPane, tabbedPane.getTabCount() - 1, outputPanel.getTabHeader());
+        }
+
+        return outputPanel;
+    }
+
+    /**
+     * This locates an existing panel to reuse.
+     */
+    private OutputTab findExistingOutputPanelForExecution(boolean considerSelectedTabFirst) {
+        OutputTab outputPanel = null;
+        if (considerSelectedTabFirst) {
+            outputPanel = (OutputTab) tabbedPane.getSelectedComponent();
+            if (outputPanel != null && outputPanel.canBeReusedNow()) {
+                return outputPanel;
+            }
+        }
+
+        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
+        while (iterator.hasNext()) {
+            outputPanel = (OutputTab) iterator.next();
+            if (outputPanel.canBeReusedNow()) {
+                return outputPanel;
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * @return a list of all the output panels currenly in the tabbed pane.
+     */
+    private List<OutputPanel> getOutputPanels() {
+        List<OutputPanel> panels = new ArrayList<OutputPanel>();
+        for (int index = 0; index < tabbedPane.getTabCount(); index++) {
+            OutputPanel outputPanel = (OutputPanel) tabbedPane.getComponentAt(index);
+            panels.add(outputPanel);
+        }
+
+        return panels;
+    }
+
+    /**
+     * This formats a display name so it isn't too long. The actual size is purely arbitrary.
+     *
+     * @param displayName the current display name
+     * @return a display name that isn't too long to display on tabs.
+     */
+    private String reformatDisplayName(String displayName) {
+        if (displayName.length() <= 20) {
+            return displayName;   //its fine
+        }
+
+        //I'm going 6 characters less because it looks stupid to replace 3 characters with 3 characters.
+        //There's no absolute amount here, this just seems to look better.
+        return displayName.substring(0, 14) + "...";
+    }
+
+    /**
+     * Determines if any tasks are currently being run. We check all of our OutputPanels.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy() {
+        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
+        while (iterator.hasNext()) {
+            OutputPanel outputPanel = iterator.next();
+            if (outputPanel.isBusy()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public void setOnlyShowOutputOnErrors(boolean value) {
+        this.onlyShowOutputOnErrors = value;
+    }
+
+    public boolean getOnlyShowOutputOnErrors() {
+        return onlyShowOutputOnErrors;
+    }
+
+    private void closeSelectedTab() {
+        OutputTab component = getSelectedOutputPanel();
+        if (component != null) {
+            component.close();
+        }
+    }
+
+    private void closeAllTabs() {
+        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
+        while (iterator.hasNext()) {
+            OutputPanel outputPanel = iterator.next();
+            outputPanel.close();
+        }
+    }
+
+    private void closeAllButSelectedTab() {
+        OutputTab component = getSelectedOutputPanel();
+        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
+        while (iterator.hasNext()) {
+            OutputPanel outputPanel = iterator.next();
+            if (outputPanel != component) {
+                outputPanel.close();
+            }
+        }
+    }
+
+    /**
+     * Changes the current pinned status of the selected tab.
+     */
+    private void togglePinSelectedTab() {
+        OutputTab component = getSelectedOutputPanel();
+        if (component != null) {
+            component.setPinned(!component.isPinned());
+        }
+    }
+
+    private OutputTab getSelectedOutputPanel() {
+        return (OutputTab) tabbedPane.getSelectedComponent();
+    }
+
+    //return the output panel for the specified request.
+    private OutputPanel getOutputPanel(ExecutionQueue.Request request) {
+        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
+        while (iterator.hasNext()) {
+            OutputPanel outputPanel = iterator.next();
+            if (outputPanel.getRequest() == request) {
+                return outputPanel;
+            }
+        }
+        return null;
+    }
+
+    public void executeAgain(Request request, OutputPanel outputPanel) {
+        //this needs to work better. It needs to do the execute again in the same
+        //OutputPanel. However, because this generically listens for requests and
+        //adds them to this panel, things are more complicated.
+        request.executeAgain(gradlePluginLord);
+    }
+
+    public void reportExecuteFinished(final Request request, final boolean wasSuccessful) {
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<OutputObserver>() {
+            public void notify(OutputObserver observer) {
+                observer.reportExecuteFinished(request, wasSuccessful);
+            }
+        });
+    }
+
+    public void removeOutputPanel(final OutputPanel outputPanel) {
+        tabbedPane.remove(outputPanel);
+
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<OutputObserver>() {
+            public void notify(OutputObserver observer) {
+                observer.outputTabClosed(outputPanel.getRequest());
+            }
+        });
+    }
+
+    public void executionRequestAdded(final ExecutionRequest request) {
+        lastExecutionRequest = request;
+
+        String displayName = reformatDisplayName(request.getDisplayName());
+        requestAdded(request, "Execute '" + displayName + "'");
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<OutputObserver>() {
+            public void notify(OutputObserver observer) {
+                observer.executionRequestAdded(request);
+            }
+        });
+    }
+
+    public void refreshRequestAdded(final RefreshTaskListRequest request) {
+        requestAdded(request, "Refresh");
+        observerLord.notifyObservers(new ObserverLord.ObserverNotification<OutputObserver>() {
+            public void notify(OutputObserver observer) {
+                observer.refreshRequestAdded(request);
+            }
+        });
+    }
+
+    private void requestAdded(Request request, String name) {
+        OutputPanel outputPanel = getOutputPanelForExecution(name, false, true);
+
+        outputPanel.setRequest(request, onlyShowOutputOnErrors);
+        request.setExecutionInteraction(outputPanel);
+    }
+
+    /**
+     * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files.
+     *
+     * @param request the request to be executed
+     * @author mhunsicker
+     */
+    public void aboutToExecuteRequest(Request request) {
+    }
+
+    /**
+     * Notification that the command has completed execution.
+     *
+     * @param request the original request containing the command that was executed
+     * @param result the result of the command
+     * @param output the output from gradle executing the command
+     */
+    public void requestExecutionComplete(Request request, int result, String output) {
+
+    }
+
+    public void addOutputObserver(OutputObserver observer, boolean inEventQueue) {
+        observerLord.addObserver(observer, inEventQueue);
+    }
+
+    public void removeOutputObserver(OutputObserver observer) {
+        observerLord.removeObserver(observer);
+    }
+
+    public int getTabCount() {
+        return tabbedPane.getTabCount();
+    }
+
+    /**
+     * Sets the font for the output text
+     *
+     * @param font the new font
+     */
+    public void setOutputTextFont(Font font) {
+
+        this.font = font;
+        Iterator<OutputPanel> iterator = getOutputPanels().iterator();
+        while (iterator.hasNext()) {
+            OutputPanel outputPanel = iterator.next();
+            outputPanel.setFont(font);
+        }
+    }
+
+    public Font getOutputTextFont() {
+        return font;
+    }
+
+    public FileLinkDefinitionLord getFileLinkDefinitionLord() {
+        return fileLinkDefinitionLord;
+    }
+
+    /*
+    This re-executes the last execution command (ignores refresh commands).
+    This is potentially useful for IDEs to hook into (hotkey to execute last command).
+     */
+    public void reExecuteLastCommand() {
+        ExecutionRequest executionRequest = lastExecutionRequest;
+        if (executionRequest != null) {
+            gradlePluginLord.addExecutionRequestToQueue(executionRequest.getFullCommandLine(), executionRequest.getDisplayName(), executionRequest.forceOutputToBeShown());
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTab.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTab.java
new file mode 100644
index 0000000..4030a6e
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTab.java
@@ -0,0 +1,155 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+
+import javax.imageio.ImageIO;
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * This just wraps up an OutputPanel so it has a tab header that can be dynamic. The current (rather awkward) JTabbedPane implementation is to separate the tab contents from its component. This only
+ * works with java 1.6 or later.
+ *
+ * @author mhunsicker
+ */
+public class OutputTab extends OutputPanel {
+
+    private static final Logger LOGGER = Logging.getLogger(OutputTab.class);
+
+    private JPanel mainPanel;
+    private JLabel mainTextLabel;
+    private JLabel pinnedLabel;
+    private JLabel closeLabel;
+
+    private static ImageIcon closeIcon;
+    private static ImageIcon closeHighlightIcon;
+
+    public OutputTab(OutputPanelParent parent, String header, AlternateUIInteraction alternateUIInteraction) {
+        super(parent, alternateUIInteraction);
+        mainPanel = new JPanel();
+        mainPanel.setOpaque(false);
+        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.X_AXIS));
+
+        mainTextLabel = new JLabel(header);
+        pinnedLabel = new JLabel("(Pinned) ");
+        pinnedLabel.setVisible(isPinned());
+
+        setupCloseLabel();
+
+        mainPanel.add(mainTextLabel);
+        mainPanel.add(Box.createHorizontalStrut(5));
+        mainPanel.add(pinnedLabel);
+        mainPanel.add(closeLabel);
+    }
+
+    private void setupCloseLabel() {
+        if (closeIcon == null) {
+            BufferedImage closeImage = getImageResource("close.png");
+            BufferedImage closeHighlightImage = getImageResource("close-highlight.png");
+
+            if (closeImage != null) {
+                closeIcon = new ImageIcon(closeImage);
+            }
+
+            if (closeHighlightImage != null) {
+                closeHighlightIcon = new ImageIcon(closeHighlightImage);
+            }
+        }
+
+        closeLabel = new JLabel(closeIcon);
+        closeLabel.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseEntered(MouseEvent e) {
+                closeLabel.setIcon(closeHighlightIcon);
+            }
+
+            @Override
+            public void mouseExited(MouseEvent e) {
+                closeLabel.setIcon(closeIcon);
+            }
+
+            public void mouseClicked(MouseEvent e) {
+                close();
+            }
+        });
+    }
+
+    private BufferedImage getImageResource(String imageResourceName) {
+        InputStream inputStream = getClass().getResourceAsStream(imageResourceName);
+        if (inputStream != null) {
+            try {
+                BufferedImage image = ImageIO.read(inputStream);
+                return image;
+            } catch (IOException e) {
+                LOGGER.error("Reading image " + imageResourceName, e);
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Call this if you're going to reuse this. it resets its output.
+     *
+     * @author mhunsicker
+     */
+    @Override
+    public void reset() {
+        super.reset();
+        closeLabel.setEnabled(true);
+    }
+
+    public Component getTabHeader() {
+        return mainPanel;
+    }
+
+    public void setTabHeaderText(String newText) {
+        mainTextLabel.setText(newText);
+    }
+
+    public boolean close() {
+        closeLabel.setEnabled(false); // provide feedback to the user that we received their click
+
+        boolean result = super.close();
+        if (result) {
+            closeLabel.setEnabled(true);
+        }
+
+        return result;
+    }
+
+    /**
+     * Overridden so we can indicate the pinned state.
+     *
+     * @param pinned whether or not we're pinned
+     * @author mhunsicker
+     */
+    @Override
+    public void setPinned(boolean pinned) {
+        pinnedLabel.setVisible(pinned);
+
+        super.setPinned(pinned);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTextPane.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTextPane.java
new file mode 100644
index 0000000..09ca6c0
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputTextPane.java
@@ -0,0 +1,316 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.foundation.output.FileLink;
+import org.gradle.foundation.output.FileLinkDefinitionLord;
+import org.gradle.foundation.output.LiveOutputParser;
+
+import javax.swing.*;
+import javax.swing.text.*;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+import java.awt.event.ActionEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Rich text pane meant to simplify adding text, scrolling, prevent line wrapping, and highlighting FileLinks.
+ */
+public class OutputTextPane {
+    private JScrollPane scroll;
+    private final TextPane textPane;
+    private DefaultStyledDocument document;
+
+    private Font font;
+
+    private AttributeSet defaultStyle;  //the style of most text
+    private AttributeSet fileStyle;     //the style of file links
+
+    private LiveOutputParser liveOutputParser;
+
+    private Interaction interaction;
+    private boolean hasClickableFiles;  //determines whether or not we allow the user to click on files. We'll highlight them if we allow this.
+
+    private JPopupMenu popupMenu;
+
+    /**
+     * This allows us to interact with our parent control.
+     */
+    public interface Interaction {
+        /**
+         * Notification that the user clicked a file link
+         *
+         * @param file the file that was clicked
+         * @param line the line number the file link points to. Will be -1 if no line was specified
+         */
+        public void fileClicked(File file, int line);
+    }
+
+    public OutputTextPane(Interaction interaction, boolean hasClickableFiles, Font font, FileLinkDefinitionLord fileLinkDefinitionLord) {
+        this.interaction = interaction;
+        this.hasClickableFiles = hasClickableFiles;
+        this.font = font;
+
+        document = new DefaultStyledDocument();
+        textPane = new TextPane(document);
+        textPane.setEditable(false);
+        textPane.setAutoscrolls(false);
+
+        scroll = new JScrollPane(textPane);
+        scroll.setAutoscrolls(false);
+        scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+        scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+
+        //we have to set a new caret so we can force it not to scroll. We want to control the scrolling.
+        //this is so a user can scroll up to look at the constantly updating output and not have it continue
+        //scrolling. It also allows them to select something while the output is being updated. Without
+        //this, their selection would be removed with each update.
+        DefaultCaret caret = new DefaultCaret();
+        caret.setUpdatePolicy(DefaultCaret.NEVER_UPDATE);
+        textPane.setCaret(caret);
+
+        Color background = Color.white;
+        textPane.setBackground(
+                background);  //its not editable, but it looks better with a white background. (I tried using UI.Manager.getColor( "TextArea.background" ) (and others) but it was showing up as gray when using inside Idea. I think the L&F remapped some things and we want it white.
+        scroll.setBackground(background);    //the scroll pane was showing up as grey in the Idea plugin. Not sure why. This should fix it.
+        scroll.getViewport().setBackground(background);    //this makes the non-text area of the scroll pane appear white on Windows (if you have short text).
+        resetFontStyles();
+
+        textPane.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                handleClick(e.getButton() == MouseEvent.BUTTON3, e.getPoint());
+            }
+        });
+        liveOutputParser = new LiveOutputParser(fileLinkDefinitionLord, true);
+    }
+
+    private void resetFontStyles() {
+        //setup the fileStyle
+        StyleContext styleContent = StyleContext.getDefaultStyleContext();
+
+        defaultStyle = createDefaultAttributeSet();
+
+        //modify the default to have a blue color and an underline
+        fileStyle = createDefaultAttributeSet();
+        fileStyle = styleContent.addAttribute(fileStyle, StyleConstants.Foreground, Color.blue);
+        fileStyle = styleContent.addAttribute(fileStyle, StyleConstants.Underline, true);
+    }
+
+    /**
+     * This creates a standard attribute set for the current text pane's font.
+     *
+     * @return an attribute set
+     */
+    private AttributeSet createDefaultAttributeSet() {
+        StyleContext styleContent = StyleContext.getDefaultStyleContext();
+        AttributeSet attributeSet = styleContent.addAttribute(SimpleAttributeSet.EMPTY, StyleConstants.FontFamily, font.getName());
+        attributeSet = styleContent.addAttribute(attributeSet, StyleConstants.FontSize, font.getSize());
+        return attributeSet;
+    }
+
+    public JComponent asComponent() {
+        return scroll;
+    }
+
+    public String getText() {
+        return textPane.getText();
+    }
+
+    /**
+     * When a user clicks, we determine if a FileLink was clicked on and if so, notify our interaction.
+     */
+    private void handleClick(boolean isRightButton, Point point) {
+        if (isRightButton) {
+            showPopup(point);
+        } else {
+            if (hasClickableFiles) {
+                FileLink fileLink = getFileLinkAt(point);
+                if (fileLink != null) {
+                    interaction.fileClicked(fileLink.getFile(), fileLink.getLineNumber());
+                }
+            }
+        }
+    }
+
+    private void showPopup(Point point) {
+        buildPopup();
+
+        popupMenu.show(textPane, point.x, point.y);
+    }
+
+    private void buildPopup() {
+        if (popupMenu != null) {
+            return;
+        }
+
+        popupMenu = new JPopupMenu();
+
+        popupMenu.add(new AbstractAction("Copy") {
+            public void actionPerformed(ActionEvent e) {
+                String text = textPane.getSelectedText();
+                if (text != null) {
+                    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(text), null);
+                }
+            }
+        });
+
+        popupMenu.add(new AbstractAction("Select All") {
+            public void actionPerformed(ActionEvent e) {
+                textPane.selectAll();
+            }
+        });
+    }
+
+    /**
+     * This appends the text to gradle's output window.
+     */
+    public void appendText(String text) {
+        appendText(text, false);
+    }
+
+    /**
+     * This sets the full text of this control, removing existing text.
+     *
+     * @param text the new text of this control
+     */
+    public void setText(String text) {
+        liveOutputParser.reset();
+        appendText(text, true);
+    }
+
+    /**
+     * This appends or replaces the text to gradle's output window. This should be simple, but we've got a complication: We want to scroll nicely. By default, adding text doesn't scroll at all. We want
+     * to scroll so the user can see the latest output. However, if the user scrolls manually to see older output, we don't want to keep scrolling to the end on them. This behavior is surprisingly
+     * complicated to achieve. We have to determine if we're at the end of the viewport. If we are, we can scroll. However, we have to perform the actual scroll in an invokeLater because the text
+     * control's size hasn't been updated yet. Also, this is where we parse the text looking for FileLinks
+     *
+     * @param text the text to add
+     * @param replaceExisting true to replace the existing text completely, false to just append to the end.
+     */
+    private void appendText(String text, boolean replaceExisting) {
+
+        Rectangle viewBounds = scroll.getViewport().getViewRect();  //the bounds of what we can see
+        Dimension viewSize = scroll.getViewport().getViewSize();    //the total bounds of the text
+
+        int maxViewBoundsY = viewBounds.y + viewBounds.height;
+
+        //if they're close to the end, we should scroll. I could have said if viewSize.height == maxViewBoundsY
+        //but this allows the user to scroll close to the end and get the same results
+        boolean shouldScroll = viewSize.height - maxViewBoundsY < 20;
+
+        try {
+            if (replaceExisting)   //if we're supposed to be replacing, then do so.
+            {
+                document.remove(0, document.getLength());
+            }
+
+            document.insertString(document.getLength(), text, defaultStyle);
+        } catch (BadLocationException e) {
+            e.printStackTrace();
+        }
+
+        //parse this text and apply the styles accordingly. Note: the LiveOutputParser only returns FileLinks for full lines. The text
+        //we add may contain a FileLink, but it won't parse it until it reaches a new line.
+        if (hasClickableFiles) {
+            List<FileLink> fileLinks = liveOutputParser.appendText(text);
+            highlightFileLinks(fileLinks);
+        }
+
+        if (shouldScroll) {
+            SwingUtilities.invokeLater(new Runnable() {
+                public void run() {
+                    scrollToBottom();
+                }
+            });
+        }
+    }
+
+    /**
+     * This applies a text style to the text where the FileLinks are. This makes them appear to be clickable hotspots.
+     *
+     * @param fileLinks the FileLinks to apply
+     */
+    private void highlightFileLinks(List<FileLink> fileLinks) {
+        Iterator<FileLink> iterator = fileLinks.iterator();
+        while (iterator.hasNext()) {
+            FileLink fileLink = iterator.next();
+
+            document.setCharacterAttributes(fileLink.getStartingIndex(), fileLink.getLength(), fileStyle, true);
+        }
+    }
+
+    /**
+     * This scrolls to the bottom of the output text. To do this, we can't just set the scroll bar to the maximum position. That would be too easy. We have to consider the height of the scrollbar
+     * 'thumb'. This way also preserves whatever horizontal scrolling the user has done.
+     */
+    private void scrollToBottom() {
+        int height = scroll.getVerticalScrollBar().getHeight();
+        int maximum = scroll.getVerticalScrollBar().getMaximum();
+        int newValue = maximum - height;
+        scroll.getVerticalScrollBar().setValue(newValue);
+    }
+
+    /**
+     * Returns the FileLink at the specified point.
+     *
+     * @param point the point where a FileLink may or may not be
+     * @return a FileLink object if one exists at the specified point, null otherwise.
+     */
+    public FileLink getFileLinkAt(Point point) {
+        int index = textPane.viewToModel(point);
+        return liveOutputParser.getFileLink(index);
+    }
+
+    /**
+     * This is only overridden to prevent line wrapping
+     */
+    private class TextPane extends JTextPane {
+
+        private TextPane(DefaultStyledDocument doc) {
+            super(doc);
+        }
+
+        /**
+         * Overridden to prevent line wrapping
+         *
+         * @return always false
+         */
+        @Override
+        public boolean getScrollableTracksViewportWidth() {
+            return false;
+        }
+    }
+
+    public void setFont(Font font) {
+        this.font = font;
+        resetFontStyles();
+        resetText();
+    }
+
+    /**
+     * This resets the text using the current font styles. This is useful if you change fonts. The simplest way to do this is just re-add our text.
+     */
+    private void resetText() {
+        String text = liveOutputParser.getText();
+        liveOutputParser.reset();
+        appendText(text, true);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputUILord.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputUILord.java
new file mode 100644
index 0000000..37b00a8
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/OutputUILord.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.foundation.output.FileLinkDefinitionLord;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+
+import java.awt.*;
+
+/**
+ * This interface manages the output of executing gradle tasks.
+ */
+public interface OutputUILord {
+    void setOnlyShowOutputOnErrors(boolean show);
+
+    boolean getOnlyShowOutputOnErrors();
+
+    public interface OutputObserver {
+        /**
+         * Notification that a request was added to the output. This means we've got some output that is useful to display.
+         *
+         * Note: this is slightly different from the GradlePluginLord.RequestObserver. While these are directly related, this one really means that it has been added to the UI. <!      Name
+         * Description>
+         *
+         * @param request the request that was added.
+         */
+        void executionRequestAdded(ExecutionRequest request);
+
+        /**
+         * Notification that a refresh task list request was added to the output. This means we've got some output that is useful to display.
+         *
+         * Note: this is slightly different from the GradlePluginLord.RequestObserver. While these are directly related, this one really means that it has been added to the UI. <!      Name
+         * Description>
+         *
+         * @param request the request that was added.
+         */
+        void refreshRequestAdded(RefreshTaskListRequest request);
+
+        /**
+         * Notification that an output tab was closed. You might want to know this if you want to close your IDE output window when all tabs are closed
+         */
+        public void outputTabClosed(Request request);
+
+        /**
+         * Notification that execution of a request is complete
+         *
+         * @param request the original request
+         */
+        public void reportExecuteFinished(Request request, boolean wasSuccessful);
+    }
+
+    public void addOutputObserver(OutputObserver observer, boolean inEventQueue);
+
+    public void removeOutputObserver(OutputObserver observer);
+
+    public int getTabCount();
+
+    /**
+     * Sets the font for the output text
+     *
+     * @param font the new font
+     */
+    public void setOutputTextFont(Font font);
+
+    public Font getOutputTextFont();
+
+    /**
+     * @return the object this is used to handle parsing of files in the output.
+     */
+    public FileLinkDefinitionLord getFileLinkDefinitionLord();
+
+    /*
+    This re-executes the last execution command (ignores refresh commands).
+    This is potentially useful for IDEs to hook into (hotkey to execute last command).
+     */
+    public void reExecuteLastCommand();
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SinglePaneUIInstance.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SinglePaneUIInstance.java
new file mode 100644
index 0000000..c2efdf2
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SinglePaneUIInstance.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+import org.gradle.gradleplugin.userinterface.swing.common.PreferencesAssistant;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.HierarchyEvent;
+import java.awt.event.HierarchyListener;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+/**
+ * A simple UI for gradle. This is a single panel that can be inserted into a stand-alone application or an IDE. This is meant to hide most of the complexities of gradle. 'single pane' means that both
+ * the tabbed pane and the output pane are contained within a single pane that this maintains. Meaning, you add this to a UI and its a self-contained gradle UI. This is opposed to a multi-pane concept
+ * where the output would be separated from the tabbed pane.
+ *
+ * @author mhunsicker
+ */
+public class SinglePaneUIInstance extends AbstractGradleUIInstance {
+    private static final String SPLITTER_PREFERENCES_ID = "splitter-id";
+
+    private JSplitPane splitter;
+    private OutputPanelLord outputPanelLord;
+
+    public SinglePaneUIInstance() {
+    }
+
+    public void initialize(SettingsNode settings, AlternateUIInteraction alternateUIInteraction) {
+
+        outputPanelLord = new OutputPanelLord(gradlePluginLord, alternateUIInteraction);
+
+        super.initialize(settings, alternateUIInteraction);
+    }
+
+    /**
+     * We've overridden this to setup our splitter and our output window.
+     */
+    @Override
+    protected void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+        mainPanel.add(createCenterPanel(), BorderLayout.CENTER);
+    }
+
+    public OutputUILord getOutputUILord() {
+        return outputPanelLord;
+    }
+
+    private Component createCenterPanel() {
+        splitter = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
+
+        splitter.setTopComponent(createMainGradlePanel());
+        splitter.setBottomComponent(outputPanelLord.getMainPanel());
+
+        splitter.setContinuousLayout(true);
+
+        //This little bit of tedium is so we can set our size based on window's size. This listens
+        //for when the window is actually shown. It then adds a listen to store the location.
+        splitter.addHierarchyListener(new HierarchyListener() {
+            public void hierarchyChanged(HierarchyEvent e) {
+                if (HierarchyEvent.SHOWING_CHANGED == (e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED)) {
+                    splitter.removeHierarchyListener(this); //we only want the first one of these, so remove ourselves as a listener.
+                    Window window = SwingUtilities.getWindowAncestor(splitter);
+                    if (window != null) {
+                        Dimension dimension = window.getSize();
+                        int halfHeight = dimension.height / 2; //we'll just make ourselves half the height of the window
+                        splitter.setDividerLocation(halfHeight);
+                    }
+                    PreferencesAssistant.restoreSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);
+
+                    //Now that we're visible, this is so we save the location when the splitter is moved.
+                    splitter.addPropertyChangeListener(new PropertyChangeListener() {
+                        public void propertyChange(PropertyChangeEvent evt) {
+                            if (JSplitPane.DIVIDER_LOCATION_PROPERTY.equals(evt.getPropertyName())) {
+                                PreferencesAssistant.saveSettings(settings, splitter, SPLITTER_PREFERENCES_ID, SinglePaneUIInstance.class);
+                            }
+                        }
+                    });
+                }
+            }
+        });
+
+        splitter.setResizeWeight(1);   //this keeps the bottom the same size when resizing the window. Extra space is added/removed from the top.
+
+        return splitter;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingAddMultipleFavoritesInteraction.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingAddMultipleFavoritesInteraction.java
new file mode 100644
index 0000000..64e0db6
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingAddMultipleFavoritesInteraction.java
@@ -0,0 +1,214 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.foundation.TaskView;
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.List;
+
+/**
+ * This handles prompting the user how to handle adding multiple tasks as favorites.
+ *
+ * @author mhunsicker
+ */
+public class SwingAddMultipleFavoritesInteraction implements FavoritesEditor.AddMultipleFavoritesInteraction {
+    private Window parent;
+
+    public SwingAddMultipleFavoritesInteraction(Window parent) {
+        this.parent = parent;
+    }
+
+    public FavoritesEditor.AddMultipleResult promptUserToCombineTasks(List<TaskView> tasksSample, String singleCommandSample) {
+        PromptToCombineTasksDialog dialog = new PromptToCombineTasksDialog();
+        return dialog.show(parent, tasksSample, singleCommandSample);
+    }
+
+    public class PromptToCombineTasksDialog {
+        private JDialog dialog;
+        private FavoritesEditor.AddMultipleResult addMultipleResult;
+        private JRadioButton separatelyRadioButton;
+        private JRadioButton combinedRadioButton;
+        private ButtonGroup buttonGroup;
+
+        private JLabel separateLine1;
+        private JLabel separateLine2;
+        private JLabel separateLine3;
+
+        private JLabel combinedLine1;
+
+        public FavoritesEditor.AddMultipleResult show(Window parent, List<TaskView> tasksSample, String singleCommandSample) {
+            setupUI(parent);
+            populateValues(tasksSample, singleCommandSample);
+            dialog.setVisible(true);
+            return this.addMultipleResult;
+        }
+
+        /**
+         * this populates the dialog's sample values. Most of this function is trying to be very explicit about showing precisely what we're going to do (but for space reasons, we'll only show 3
+         * commands in the list.
+         */
+        private void populateValues(List<TaskView> tasksSample, String singleCommandSample) {
+            separatelyRadioButton.setText("Add as separate " + tasksSample.size() + " commands:");
+
+            separateLine1.setText('\"' + tasksSample.get(0).getFullTaskName() + "\",");
+            String secondTask = '\"' + tasksSample.get(1).getFullTaskName() + "\"";
+            String thirdTask = "";
+
+            if (tasksSample.size() > 2) {
+                secondTask += ",";   //add a comma
+
+                thirdTask = '\"' + tasksSample.get(2).getFullTaskName() + "\"";
+                if (tasksSample.size() > 3)  //if there are more, show a comma and ellipses
+                {
+                    thirdTask += ", ... ";
+                }
+            }
+
+            separateLine2.setText(secondTask);
+            separateLine3.setText(thirdTask);
+            separateLine3.setVisible(tasksSample.size() > 2);   //only show this if there are more than 2 samples
+
+            combinedLine1.setText('\"' + singleCommandSample + '\"');
+        }
+
+        private void setupUI(Window parent) {
+            dialog = Utility.createDialog(parent, "Add Multiple Tasks", true);
+            dialog.setSize(400, 350);
+
+            dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
+            dialog.addWindowListener(new WindowAdapter() {
+                public void windowClosing(WindowEvent e) {
+                    close(FavoritesEditor.AddMultipleResult.Cancel);
+                }
+            });
+
+            JPanel panel = new JPanel(new BorderLayout());
+            dialog.getContentPane().add(panel);
+
+            panel.add(createMainPanel(), BorderLayout.CENTER);
+            panel.add(createButtonPanel(), BorderLayout.SOUTH);
+
+            panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+            dialog.setLocationRelativeTo(dialog.getParent());
+        }
+
+        private Component createMainPanel() {
+            JPanel panel = new JPanel();
+            panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+            separatelyRadioButton = new JRadioButton();
+            combinedRadioButton = new JRadioButton("Add as a single command:");
+            buttonGroup = new ButtonGroup();
+
+            buttonGroup.add(separatelyRadioButton);
+            buttonGroup.add(combinedRadioButton);
+            separatelyRadioButton.setSelected(true);
+
+            panel.add(Utility.addLeftJustifiedComponent(new JLabel("How you do want to add multiple tasks?")));
+            panel.add(Box.createVerticalStrut(20));
+            panel.add(Utility.addLeftJustifiedComponent(separatelyRadioButton));
+            panel.add(Box.createVerticalStrut(5));
+            panel.add(createSeparateSamplePanel());
+            panel.add(Box.createVerticalStrut(20));
+            panel.add(Utility.addLeftJustifiedComponent(combinedRadioButton));
+            panel.add(Box.createVerticalStrut(5));
+            panel.add(createCombinedSamplePanel());
+            panel.add(Box.createVerticalGlue());
+
+            return panel;
+        }
+
+        private JPanel createSeparateSamplePanel() {
+            separateLine1 = new JLabel();   //we'll use at most three samples (actually 2 with ellipses)
+            separateLine2 = new JLabel();
+            separateLine3 = new JLabel();
+
+            JPanel separateSamplePanel = new JPanel();
+            separateSamplePanel.setLayout(new BoxLayout(separateSamplePanel, BoxLayout.Y_AXIS));
+            separateSamplePanel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
+            separateSamplePanel.add(Utility.addLeftJustifiedComponent(separateLine1));
+            separateSamplePanel.add(Utility.addLeftJustifiedComponent(separateLine2));
+            separateSamplePanel.add(Utility.addLeftJustifiedComponent(separateLine3));
+
+            return separateSamplePanel;
+        }
+
+        private JPanel createCombinedSamplePanel() {
+            combinedLine1 = new JLabel();
+
+            JPanel combinedSamplePanel = new JPanel();
+            combinedSamplePanel.setLayout(new BoxLayout(combinedSamplePanel, BoxLayout.Y_AXIS));
+            combinedSamplePanel.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
+            combinedSamplePanel.add(Utility.addLeftJustifiedComponent(combinedLine1));
+
+            return combinedSamplePanel;
+        }
+
+        private FavoritesEditor.AddMultipleResult getCurrentSelection() {
+            if (separatelyRadioButton.isSelected()) {
+                return FavoritesEditor.AddMultipleResult.AddSeparately;
+            }
+            return FavoritesEditor.AddMultipleResult.AddAsSingleCommand;
+        }
+
+        private Component createButtonPanel() {
+            JPanel panel = new JPanel();
+            panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+            JButton okButton = new JButton(new AbstractAction("OK") {
+                public void actionPerformed(ActionEvent e) {
+                    close(getCurrentSelection());
+                }
+            });
+
+            //make OK the default button
+            dialog.getRootPane().setDefaultButton(okButton);
+
+            JButton cancelButton = new JButton(new AbstractAction("Cancel") {
+                public void actionPerformed(ActionEvent e) {
+                    close(FavoritesEditor.AddMultipleResult.Cancel);
+                }
+            });
+
+            //equate escape with cancle
+            dialog.getRootPane().registerKeyboardAction(new ActionListener() {
+                public void actionPerformed(ActionEvent actionEvent) {
+                    close(FavoritesEditor.AddMultipleResult.Cancel);
+                }
+            }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+            panel.add(Box.createHorizontalGlue());
+            panel.add(okButton);
+            panel.add(Box.createHorizontalStrut(10));
+            panel.add(cancelButton);
+            panel.add(Box.createHorizontalGlue());
+
+            panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
+
+            return panel;
+        }
+
+        private void close(FavoritesEditor.AddMultipleResult addMultipleResult) {
+            this.addMultipleResult = addMultipleResult;
+            dialog.setVisible(false);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingEditFavoriteInteraction.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingEditFavoriteInteraction.java
new file mode 100644
index 0000000..7469b6f
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingEditFavoriteInteraction.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+
+import javax.swing.*;
+import javax.swing.event.DocumentEvent;
+import javax.swing.event.DocumentListener;
+import javax.swing.text.BadLocationException;
+import java.awt.*;
+import java.awt.event.*;
+
+/**
+ * This edits the properties of a single favorite task.
+ *
+ * @author mhunsicker
+ */
+public class SwingEditFavoriteInteraction implements FavoritesEditor.EditFavoriteInteraction {
+    private JDialog dialog;
+    private JTextField fullCommandLineTextField;
+    private JTextField displayNameTextField;
+    private JCheckBox alwaysShowOutputCheckBox;
+    private boolean saveResults;
+    private boolean synchronizeDisplayNameWithCommand;
+
+    //pass in true to synchronizeDisplayNameWithCommand for new favorites.
+
+    public SwingEditFavoriteInteraction(Window parent, String title, boolean synchronizeDisplayNameWithCommand) {
+        this.synchronizeDisplayNameWithCommand = synchronizeDisplayNameWithCommand;
+        setupUI(parent, title);
+    }
+
+    private void setupUI(Window parent, String title) {
+        dialog = Utility.createDialog(parent, title, true);
+
+        dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
+        dialog.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {
+                close(false);
+            }
+        });
+
+        JPanel panel = new JPanel(new BorderLayout());
+        dialog.getContentPane().add(panel);
+
+        panel.add(createMainPanel(), BorderLayout.CENTER);
+        panel.add(createButtonPanel(), BorderLayout.SOUTH);
+
+        panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+        dialog.pack();
+    }
+
+    private Component createMainPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        fullCommandLineTextField = new JTextField();
+        displayNameTextField = new JTextField();
+        alwaysShowOutputCheckBox = new JCheckBox("Always Show Live Output");
+
+        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Command Line")));
+        panel.add(Utility.addLeftJustifiedComponent(fullCommandLineTextField));
+        panel.add(Box.createVerticalStrut(10));
+        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Display Name")));
+        panel.add(Utility.addLeftJustifiedComponent(displayNameTextField));
+        panel.add(Box.createVerticalStrut(10));
+        panel.add(Utility.addLeftJustifiedComponent(alwaysShowOutputCheckBox));
+        panel.add(Box.createVerticalGlue());
+
+        synchronizeDisplayNameWithCommand();
+
+        return panel;
+    }
+
+    /**
+     * This synchronizes the display name with the command line. This is so when you're adding a new favorite, the display name is automatic. If you type anything in the display name, we'll cancel
+     * synchronization.
+     */
+    private void synchronizeDisplayNameWithCommand() {
+        if (!synchronizeDisplayNameWithCommand) {
+            return;
+        }
+
+        final DocumentListener documentListener = new DocumentListener() {
+            public void insertUpdate(DocumentEvent documentEvent) {
+                setDisplayNameTextToCommandLineText();
+            }
+
+            public void removeUpdate(DocumentEvent documentEvent) {
+                setDisplayNameTextToCommandLineText();
+            }
+
+            public void changedUpdate(DocumentEvent documentEvent) {
+                setDisplayNameTextToCommandLineText();
+            }
+        };
+
+        fullCommandLineTextField.getDocument().addDocumentListener(documentListener);
+        displayNameTextField.addKeyListener(new KeyAdapter() {
+            @Override
+            public void keyPressed(KeyEvent keyEvent) {  //the user typed someting. Remove the document listener
+                fullCommandLineTextField.getDocument().removeDocumentListener(documentListener);
+            }
+        });
+    }
+
+    private void setDisplayNameTextToCommandLineText() {
+        try {
+            String text = fullCommandLineTextField.getDocument().getText(0, fullCommandLineTextField.getDocument().getLength());
+            displayNameTextField.setText(text);
+        } catch (BadLocationException e) {
+            e.printStackTrace();
+        }
+    }
+
+    private Component createButtonPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        JButton okButton = new JButton(new AbstractAction("OK") {
+            public void actionPerformed(ActionEvent e) {
+                close(true);
+            }
+        });
+
+        //make OK the default button
+        dialog.getRootPane().setDefaultButton(okButton);
+
+        JButton cancelButton = new JButton(new AbstractAction("Cancel") {
+            public void actionPerformed(ActionEvent e) {
+                close(false);
+            }
+        });
+
+        //equate escape with cancle
+        dialog.getRootPane().registerKeyboardAction(new ActionListener() {
+            public void actionPerformed(ActionEvent actionEvent) {
+                close(false);
+            }
+        }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        panel.add(Box.createHorizontalGlue());
+        panel.add(okButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(cancelButton);
+        panel.add(Box.createHorizontalGlue());
+
+        panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
+
+        return panel;
+    }
+
+    private void close(boolean saveResults) {
+        this.saveResults = saveResults;
+        dialog.setVisible(false);
+    }
+
+    public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
+        saveResults = false;
+
+        fullCommandLineTextField.setText(favoriteTask.fullCommandLine);
+        displayNameTextField.setText(favoriteTask.displayName);
+        alwaysShowOutputCheckBox.setSelected(favoriteTask.alwaysShowOutput);
+
+        dialog.pack();
+        dialog.setLocationRelativeTo(dialog.getParent());
+        dialog.setVisible(true);
+
+        if (saveResults) {
+            favoriteTask.fullCommandLine = fullCommandLineTextField.getText();
+            favoriteTask.displayName = displayNameTextField.getText();
+            favoriteTask.alwaysShowOutput = alwaysShowOutputCheckBox.isSelected();
+        }
+
+        return saveResults;
+    }
+
+    public void reportError(String error) {
+        if (dialog.isVisible()) {
+            JOptionPane.showMessageDialog(dialog, error);
+        } else {
+            JOptionPane.showMessageDialog(dialog.getParent(), error);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingExportInteraction.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingExportInteraction.java
new file mode 100644
index 0000000..cf0a838
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingExportInteraction.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.DOM4JSerializer;
+
+import javax.swing.*;
+import javax.swing.filechooser.FileFilter;
+import java.awt.*;
+import java.io.File;
+
+/**
+ * Swing implementation of ExportInteraction. This prompts the user for a file via the JFileChooser and handles reporting errors.
+ *
+ * @author mhunsicker
+ */
+public class SwingExportInteraction implements DOM4JSerializer.ExportInteraction {
+    private Window parent;
+
+    public SwingExportInteraction(Window parent) {
+        this.parent = parent;
+    }
+
+    /**
+     * This is called when you should ask the user for a source file to read.
+     *
+     * @return a file to read or null to cancel.
+     */
+    public File promptForFile(FileFilter fileFilter) {
+        JFileChooser chooser = new JFileChooser();
+        chooser.addChoosableFileFilter(fileFilter);
+
+        if (chooser.showSaveDialog(parent) != JFileChooser.APPROVE_OPTION) {
+            return null;
+        }
+
+        return chooser.getSelectedFile();
+    }
+
+    /**
+     * Report an error that occurred. The read failed.
+     *
+     * @param error the error message.
+     */
+    public void reportError(String error) {
+        JOptionPane.showMessageDialog(parent, error, "Error", JOptionPane.ERROR_MESSAGE);
+    }
+
+    /**
+     * The file already exists. Confirm whether or not you want to overwrite it.
+     *
+     * @param file the file in question
+     * @return true to overwrite it, false not to.
+     */
+    public boolean confirmOverwritingExisingFile(File file) {
+        int result = JOptionPane.showConfirmDialog(SwingUtilities.getWindowAncestor(parent), "The file '" + file.getAbsolutePath() + "' already exists. Overwrite?", "Confirm Overwriting File",
+                JOptionPane.YES_NO_OPTION);
+        return result == JOptionPane.YES_OPTION;
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingImportInteraction.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingImportInteraction.java
new file mode 100644
index 0000000..251d31f
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/SwingImportInteraction.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.gradleplugin.foundation.DOM4JSerializer;
+
+import javax.swing.*;
+import javax.swing.filechooser.FileFilter;
+import java.awt.*;
+import java.io.File;
+
+/**
+ * Swing implementation of ImportInteraction. This prompts the user for a file via the JFileChooser and handles reporting errors.
+ *
+ * @author mhunsicker
+ */
+public class SwingImportInteraction implements DOM4JSerializer.ImportInteraction {
+    private Window parent;
+
+    public SwingImportInteraction(Window parent) {
+        this.parent = parent;
+    }
+
+    /**
+     * This is called when you should ask the user for a source file to read.
+     *
+     * @return a file to read or null to cancel.
+     */
+    public File promptForFile(FileFilter fileFilter) {
+        JFileChooser chooser = new JFileChooser();
+        chooser.addChoosableFileFilter(fileFilter);
+
+        if (chooser.showOpenDialog(parent) != JFileChooser.APPROVE_OPTION) {
+            return null;
+        }
+
+        return chooser.getSelectedFile();
+    }
+
+    /**
+     * Report an error that occurred. The read failed.
+     *
+     * @param error the error message.
+     */
+    public void reportError(String error) {
+        JOptionPane.showMessageDialog(parent, error, "Error", JOptionPane.ERROR_MESSAGE);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/TaskTreeComponent.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/TaskTreeComponent.java
new file mode 100644
index 0000000..626c17a
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/TaskTreeComponent.java
@@ -0,0 +1,670 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.foundation.visitors.TaskTreePopulationVisitor;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.filters.ProjectAndTaskFilter;
+
+import javax.swing.*;
+import javax.swing.tree.*;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+
+/**
+ * This displays a tree of projects, subprojects, and tasks. You implement the Interaction to detemine how to handle right clicks and double clicking tasks. To use this, call populate and pass it a
+ * filter (allows you to change exactly what is displayed). There are several functions to obtaining the selected items, plus you can get the tree directly for any advanced functionality.
+ *
+ * @author mhunsicker
+ */
+public class TaskTreeComponent {
+    private GradlePluginLord gradlePluginLord;
+    private Interaction interaction;
+
+    private JTree tree;
+    private DefaultTreeModel model;
+    private TaskTreeBaseNode rootNode;
+
+    private boolean isPopulated;
+
+    private TaskTreeComponent.Renderer renderer;
+
+    public interface Interaction {
+        void rightClick(JTree tree, int x, int y);
+
+        /**
+         * Notification that a project was invoked (double-clicked). Do whatever you like, such as execute its default task.
+         *
+         * @param project the project that was invoked.
+         */
+        void projectInvoked(ProjectView project);
+
+        /**
+         * Notification that a task was invoked (double-clicked). Do whatever you like, such as execute it.
+         *
+         * @param task the task that was invoked.
+         * @param isCtrlKeyDown true if the CTRL key was pressed at the time
+         */
+        void taskInvoked(TaskView task, boolean isCtrlKeyDown);
+    }
+
+    public TaskTreeComponent(GradlePluginLord gradlePluginLord, Interaction interaction) {
+        this.gradlePluginLord = gradlePluginLord;
+        this.interaction = interaction;
+
+        createTreePanel();
+    }
+
+    private void createTreePanel() {
+        rootNode = new TaskTreeBaseNode();
+
+        model = new DefaultTreeModel(rootNode);
+        tree = new JTree(model);
+
+        tree.setRootVisible(false);
+        tree.setShowsRootHandles(true);
+
+        renderer = new Renderer();
+        tree.setCellRenderer(renderer);
+
+        ToolTipManager.sharedInstance().registerComponent(tree);
+
+        tree.setToggleClickCount(99);  //prevents double clicks from expanding/collapsing the tree. We want to treat them as double-clicks
+
+        tree.addMouseListener(new MyMouseListener());
+
+        //make hitting Enter and CTRL Enter on a node equal executing it (the first node at least)
+        tree.registerKeyboardAction(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                executeFirstSelectedNode(false);
+            }
+        }, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        tree.registerKeyboardAction(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                executeFirstSelectedNode(true);
+            }
+        }, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, KeyEvent.CTRL_MASK), JComponent.WHEN_IN_FOCUSED_WINDOW);
+    }
+
+    public JTree getTree() {
+        return tree;
+    }
+
+    public void setTreeCellRenderer(TreeCellRenderer renderer) {
+        tree.setCellRenderer(renderer);
+    }
+
+    /**
+     * This renders our projects and tasks. This removes the icon and optionally shows the description in a different color. Since there's quite a bit of code for handling rendering tree cells, I'm
+     * just going to mooch off of the DefaultTreeCellRenderer. I'll just modify it's behavior a little (I probably don't need that or the description since it's not going to draw a selection or
+     * highlight).
+     */
+    private class Renderer implements TreeCellRenderer {
+        private JPanel panel;
+        private DefaultTreeCellRenderer nameRenderer;
+        private DefaultTreeCellRenderer descriptionRenderer;
+        private Color descriptionColor;
+        private boolean showDescription = true;
+        private Component seperator;
+        private Font normalFont;
+        private Font boldFont;
+
+        private Renderer() {
+            setupRendererUI();
+            setShowDescription(true);
+
+            descriptionColor = Color.blue;
+        }
+
+        private void setupRendererUI() {
+            panel = new JPanel();
+            panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+            nameRenderer = new DefaultTreeCellRenderer();
+            descriptionRenderer = new DefaultTreeCellRenderer();
+
+            panel.add(nameRenderer);
+            seperator = Box.createHorizontalStrut(10);
+            panel.add(seperator);
+            panel.add(descriptionRenderer);
+
+            panel.setOpaque(false);
+
+            setupFonts();
+        }
+
+        /**
+         * Setup the fonts. On some platforms, bold is the typical version. We explicitly don't want that. So we'll make the fonts plain and use the bold for our own purposes (indicating default
+         * tasks).
+         */
+        private void setupFonts() {
+            normalFont = nameRenderer.getFont().deriveFont(Font.PLAIN);
+            boldFont = normalFont.deriveFont(Font.BOLD);
+
+            nameRenderer.setFont(normalFont);
+            descriptionRenderer.setFont(normalFont);
+        }
+
+        public boolean showDescription() {
+            return showDescription;
+        }
+
+        //the easiest thing to do is just hide the description and its separator
+
+        public void setShowDescription(boolean showDescription) {
+            this.showDescription = showDescription;
+            seperator.setVisible(showDescription);
+            descriptionRenderer.setVisible(showDescription);
+            seperator.invalidate();
+            nameRenderer.invalidate();
+            descriptionRenderer.invalidate();
+            panel.invalidate();
+
+            //have to tell the tree each node changed. This is so it will recalculate its size. Without this, if the description is
+            //initially disabled, the tree is populated and expanded, then description is enabled, nothing shows up because the tree
+            //caches the node's size for some dumb reason.
+            Enumeration enumeration = rootNode.breadthFirstEnumeration();
+            while (enumeration.hasMoreElements()) {
+                TaskTreeBaseNode treeNode = (TaskTreeBaseNode) enumeration.nextElement();
+                model.nodeChanged(treeNode);
+            }
+
+            tree.repaint();
+        }
+
+        public Component getTreeCellRendererComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
+            TaskTreeBaseNode node = (TaskTreeBaseNode) value;
+
+            String description = node.getDescription();
+
+            //we've already added these components to our panel. We know they're just labels. Calling getTreeCell... just sets their text and colors correctly.
+            this.nameRenderer.getTreeCellRendererComponent(tree, node.toString(), isSelected, expanded, leaf, row, hasFocus);
+            this.descriptionRenderer.getTreeCellRendererComponent(tree, description, isSelected, expanded, leaf, row, false);
+
+            //set the tooltip. This must be on the component we return not our sub renderers
+            panel.setToolTipText(description);
+
+            //just remove the icon entirely
+            nameRenderer.setIcon(null);
+            this.descriptionRenderer.setIcon(null);
+
+            if (node.isBold()) {
+                nameRenderer.setFont(boldFont);
+            } else {
+                nameRenderer.setFont(normalFont);
+            }
+
+            //set the description color. If its selected, make it the name renderer's color
+            //so we know the colors won't conflict (they do on Windows XP).
+            if (!isSelected) {
+                this.descriptionRenderer.setForeground(descriptionColor);
+            } else {
+                this.descriptionRenderer.setForeground(nameRenderer.getForeground());
+            }
+
+            nameRenderer.invalidate();
+            descriptionRenderer.invalidate();
+            seperator.invalidate();
+            panel.invalidate();
+            panel.validate();
+
+            return panel;
+        }
+    }
+
+    private class MyMouseListener extends MouseAdapter {
+        public void mousePressed(MouseEvent e) {
+            if (e.getButton() == MouseEvent.BUTTON3) {  //This is here just to select a node that we right click on.
+                //The tree really needs to handle this for us.
+                Point point = e.getPoint();
+                int row = tree.getRowForLocation(point.x, point.y);
+                if (row != -1) {
+                    if (tree.isRowSelected(row)) {
+                        return;
+                    }  //if its already selected, just leave it alone. This prevents us from changing selecting when a user right-clicks on one of many selected items.
+
+                    //we need to determine if we move the selection, or just add it to the existing selection.
+                    if (isAddToSelectionKey(e)) {
+                        tree.addSelectionRow(row);
+                    } else {
+                        tree.setSelectionRow(row);
+                    }
+                }
+            }
+        }
+
+        private boolean isAddToSelectionKey(MouseEvent e) {  //this is actually OS-specific, but for now, I'll just use CTRL.
+            return (e.getModifiers() & MouseEvent.CTRL_MASK) != 0;
+        }
+
+        public void mouseClicked(MouseEvent e) {
+            if (e.getClickCount() == 1) {
+                if (e.getButton() == MouseEvent.BUTTON3) {
+                    Point point = e.getPoint();
+                    interaction.rightClick(tree, point.x, point.y);
+                }
+            } else if (e.getClickCount() == 2) {
+                TaskTreeBaseNode node = getNodeAtPoint(e.getPoint());
+                if (node != null) {
+                    boolean isCtrlKeyDown = (e.getModifiers() & MouseEvent.CTRL_MASK) != 0;
+                    node.executeTask(isCtrlKeyDown);
+                }
+            }
+        }
+    }
+
+    /**
+     * This populates (and repopulates) the tree. This is surprisingly tedious in an effort to make the tree collapse as little as possible.
+     */
+    public void populate(ProjectAndTaskFilter filter) {
+        TaskTreePopulationVisitor.visitProjectAndTasks(gradlePluginLord.getProjects(), new PopulateTreeVisitor(), filter, rootNode);
+
+        model.reload();
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {  //this expands the 'root' project
+                tree.expandRow(0);
+            }
+        });
+
+        isPopulated = true;
+    }
+
+    public boolean isPopulated() {
+        return isPopulated;
+    }
+
+    /**
+     * This visitor populates the tree as we walk projects and tasks. This jumpts through quite a bit of hoops in an effort to keep the tree from collapsing. It still does, but not completely. In
+     * order to keep it from collapsing, you must track some additional information that frankly the tree could and should do for you.
+     */
+    private class PopulateTreeVisitor implements TaskTreePopulationVisitor.Visitor<TaskTreeBaseNode, TaskTreeNode> {
+        /**
+         * This is called for each project.
+         *
+         * @param project the project
+         * @param parentProjectObject whatever you handed back from a prior call to visitProject if this is a sub project. Otherwise, it'll be whatever was passed into the visitPojectsAndTasks
+         * function.
+         * @return an object that will be handed back to you for each of this project's tasks.
+         */
+        public TaskTreeBaseNode visitProject(ProjectView project, int indexOfProject, TaskTreeBaseNode parentProjectObject) {
+            ProjectTreeNode projectTreeNode = findProjectChild(parentProjectObject, project.getName());
+            if (projectTreeNode == null) {
+                projectTreeNode = new ProjectTreeNode(project);
+            }
+
+            int actualIndex = parentProjectObject.getIndex(projectTreeNode);
+            if (actualIndex != indexOfProject) //this will be -1 for a new node
+            {
+                if (actualIndex != -1) //only try to remove it if its already there. Swing doesn't like this otherwise.
+                {
+                    model.removeNodeFromParent(projectTreeNode);
+                }
+
+                insertChildNode(parentProjectObject, projectTreeNode, indexOfProject);
+            }
+
+            return projectTreeNode;
+        }
+
+        private ProjectTreeNode findProjectChild(TaskTreeBaseNode parentNode, String projectName) {
+            for (int index = 0; index < parentNode.getChildCount(); index++) {
+                TreeNode child = parentNode.getChildAt(index);
+                if (child instanceof ProjectTreeNode) {
+                    if (((ProjectTreeNode) child).getProject().getName().equals(projectName)) {
+                        return (ProjectTreeNode) child;
+                    }
+                }
+            }
+            return null;
+        }
+
+        /**
+         * This is called for each task.
+         *
+         * @param task the task
+         * @param indexOfTask index
+         * @param tasksProject the project for this task
+         */
+        public TaskTreeNode visitTask(TaskView task, int indexOfTask, ProjectView tasksProject, TaskTreeBaseNode parentTreeNode) {
+            TaskTreeNode taskTreeNode = findTaskChild((ProjectTreeNode) parentTreeNode, task.getName());
+
+            if (taskTreeNode == null) {
+                taskTreeNode = new TaskTreeNode(task);
+            }
+
+            int actualIndex = parentTreeNode.getIndex(taskTreeNode);
+            if (actualIndex != indexOfTask) {
+                //this will be -1 for a new node
+                if (actualIndex != -1) {
+                    //only try to remove it if its already there. Swing doesn't like this otherwise.
+                    model.removeNodeFromParent(taskTreeNode);
+                }
+
+                insertChildNode(parentTreeNode, taskTreeNode, indexOfTask);
+            }
+
+            return taskTreeNode;
+        }
+
+        //This only exists so we can call insert or add appropriately.
+        //The stupid tree isn't smart enough to do this for you.
+
+        private void insertChildNode(DefaultMutableTreeNode parent, DefaultMutableTreeNode child, int index) {
+            if (parent.getChildCount() < index) {
+                parent.add(child);
+                model.nodesWereInserted(parent, new int[]{parent.getChildCount() - 1});
+            } else {
+                parent.insert(child, index);
+                model.nodesWereInserted(parent, new int[]{index});
+            }
+        }
+
+        private TaskTreeNode findTaskChild(ProjectTreeNode parentNode, String taskName) {
+            for (int index = 0; index < parentNode.getChildCount(); index++) {
+                TreeNode child = parentNode.getChildAt(index);
+                if (child instanceof TaskTreeNode) {
+                    if (((TaskTreeNode) child).getTask().getName().equals(taskName)) {
+                        return (TaskTreeNode) child;
+                    }
+                }
+            }
+            return null;
+        }
+
+        /**
+         * This is called when a project has been visited completely and is just a notification giving you an opportunity to do whatever you like.
+         *
+         * Here, we're going to remove any nodes that aren't in either of the lists. This is when a task or project is hidden or when things simply change.
+         *
+         * @param parentProjectObject the object that represents the parent of the project and task objects below
+         * @param projectObjects a list of whatever you returned from visitProject
+         * @param taskObjects a list of whatever you returned from visitTask
+         */
+        public void completedVisitingProject(TaskTreeBaseNode parentProjectObject, List<TaskTreeBaseNode> projectObjects, List<TaskTreeNode> taskObjects) {
+            int index = 0;
+            while (index < parentProjectObject.getChildCount()) {
+                TaskTreeBaseNode child = (TaskTreeBaseNode) parentProjectObject.getChildAt(index);
+                if (!projectObjects.contains(child) && !taskObjects.contains(child)) {
+                    model.removeNodeFromParent(child);
+                } else {
+                    index++;
+                }
+            }
+        }
+    }
+
+    private void expandNode(TreeNode node) {
+        tree.expandPath(new TreePath(node));
+    }
+
+    /**
+     * This is a basic tree node. All nodes in this tree must extend this. This is so we don't have to deal with all the differing types of things that may be in this tree.
+     */
+    public class TaskTreeBaseNode extends DefaultMutableTreeNode {
+        public void executeTask(boolean isCtrlKeyDown) {
+        }  //do nothing by default.
+
+        public String toString() {
+            return "hidden-root";
+        }  //by default, its the root.
+
+        public String getDescription() {
+            return null;
+        }
+
+        public boolean isBold() {
+            return false;
+        }
+    }
+
+    /**
+     * This represents a project.
+     */
+    public class ProjectTreeNode extends TaskTreeBaseNode {
+        private ProjectView project;
+
+        private ProjectTreeNode(ProjectView project) {
+            this.project = project;
+        }
+
+        public String toString() {
+            return project.getName();
+        }
+
+        @Override
+        public void executeTask(boolean isCtrlKeyDown) {
+            interaction.projectInvoked(project);
+        }
+
+        @Override
+        public String getDescription() {
+            return project.getDescription();
+        }
+
+        public ProjectView getProject() {
+            return project;
+        }
+    }
+
+    /**
+     * This represents a single task.
+     */
+    public class TaskTreeNode extends TaskTreeBaseNode {
+        private TaskView task;
+
+        private TaskTreeNode(TaskView task) {
+            this.task = task;
+        }
+
+        public String toString() {
+            return task.getName();
+        }
+
+        @Override
+        public void executeTask(boolean isCtrlKeyDown) {
+            interaction.taskInvoked(task, isCtrlKeyDown);
+        }
+
+        public TaskView getTask() {
+            return task;
+        }
+
+        @Override
+        public String getDescription() {
+            return task.getDescription();
+        }
+
+        @Override
+        public boolean isBold() {
+            return task.isDefault();
+        }
+    }
+
+    /**
+     * Returns the node at the specified point.
+     */
+    public TaskTreeBaseNode getNodeAtPoint(Point point) {
+        int row = tree.getRowForLocation(point.x, point.y);
+        if (row == -1) {
+            return null;
+        }
+
+        TreePath path = tree.getPathForLocation(point.x, point.y);
+        if (path == null) {
+            return null;
+        }
+        return (TaskTreeBaseNode) path.getLastPathComponent();
+    }
+
+    /**
+     * @return the first selected node or null if nothing is selected.
+     */
+    public TaskTreeBaseNode getFirstSelectedNode() {
+        TreePath path = tree.getSelectionPath();
+        if (path == null) {
+            return null;
+        }
+
+        return (TaskTreeBaseNode) path.getLastPathComponent();
+    }
+
+    /**
+     * @return a list of TaskTabTreeNode based on what is selected in the tree or an empty list if nothing is selected.
+     */
+    public List<TaskTreeBaseNode> getSelectedNodes() {
+        TreePath[] treePaths = tree.getSelectionPaths();
+        if (treePaths == null) {
+            return Collections.emptyList();
+        }
+
+        List<TaskTreeBaseNode> nodes = new ArrayList<TaskTreeBaseNode>();
+
+        for (int index = 0; index < treePaths.length; index++) {
+            TreePath treePath = treePaths[index];
+            nodes.add((TaskTreeBaseNode) treePath.getLastPathComponent());
+        }
+
+        return nodes;
+    }
+
+    /**
+     * Determines if we have any projects selected. This ignores selected tasks.
+     *
+     * @return true if we have projects selected, false otherwise.
+     */
+    public boolean hasProjectsSelected() {
+        TreePath[] treePaths = tree.getSelectionPaths();
+        if (treePaths == null) {
+            return false;
+        }
+
+        for (int index = 0; index < treePaths.length; index++) {
+            TreePath treePath = treePaths[index];
+
+            Object o = treePath.getLastPathComponent();
+            if (o instanceof ProjectTreeNode) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * Determines if we have any tasks selected. This ignores selected projects.
+     *
+     * @return true if we have tasks selected, false otherwise.
+     */
+    public boolean hasTasksSelected() {
+        TreePath[] treePaths = tree.getSelectionPaths();
+        if (treePaths == null) {
+            return false;
+        }
+
+        for (int index = 0; index < treePaths.length; index++) {
+            TreePath treePath = treePaths[index];
+
+            Object o = treePath.getLastPathComponent();
+            if (o instanceof TaskTreeNode) {
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    /**
+     * This returns a list of selected tasks. This ignores selected projects.
+     *
+     * @return the selected tasks. Will return an empty list if no tasks are selected.
+     */
+    public List<TaskView> getSelectedTasks() {
+        TreePath[] treePaths = tree.getSelectionPaths();
+        if (treePaths == null) {
+            return Collections.emptyList();
+        }
+
+        List<TaskView> tasks = new ArrayList<TaskView>();
+
+        for (int index = 0; index < treePaths.length; index++) {
+            TreePath treePath = treePaths[index];
+
+            Object o = treePath.getLastPathComponent();
+            if (o instanceof TaskTreeNode) {
+                tasks.add(((TaskTreeNode) o).task);
+            }
+        }
+
+        return tasks;
+    }
+
+    /**
+     * Object to hold onto mutliple selections, but not just multiples of the same type of node. This separates the selected nodes by type. You can have multiple projects and tasks selected.
+     */
+    public class MultipleSelection {
+        public List<ProjectView> projects = new ArrayList<ProjectView>();
+        public List<TaskView> tasks = new ArrayList<TaskView>();
+    }
+
+    /**
+     * This returns the current selection broken up into projects and tasks.
+     *
+     * @return the selected projects and tasks. This never returns null and the contained lists are never null.
+     */
+    public MultipleSelection getSelectedProjectsAndTasks() {
+        MultipleSelection multipleSelection = new MultipleSelection();
+
+        TreePath[] treePaths = tree.getSelectionPaths();
+        if (treePaths == null) {
+            return multipleSelection;
+        }
+
+        for (int index = 0; index < treePaths.length; index++) {
+            TreePath treePath = treePaths[index];
+
+            Object o = treePath.getLastPathComponent();
+            if (o instanceof TaskTreeNode) {
+                multipleSelection.tasks.add(((TaskTreeNode) o).getTask());
+            } else if (o instanceof ProjectTreeNode) {
+                multipleSelection.projects.add(((ProjectTreeNode) o).getProject());
+            }
+        }
+
+        return multipleSelection;
+    }
+
+    public boolean showDescription() {
+        return renderer.showDescription();
+    }
+
+    public void setShowDescription(boolean showDescription) {
+        this.renderer.setShowDescription(showDescription);
+    }
+
+    private void executeFirstSelectedNode(boolean isCtrlKeyDown) {
+        TaskTreeComponent.TaskTreeBaseNode node = getFirstSelectedNode();
+        if (node != null) {
+            node.executeTask(isCtrlKeyDown);
+        }
+    }
+}
\ No newline at end of file
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/Utility.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/Utility.java
new file mode 100644
index 0000000..e9d7178
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/Utility.java
@@ -0,0 +1,186 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.gradleplugin.userinterface.swing.common.BorderlessImageButton;
+import org.gradle.gradleplugin.userinterface.swing.common.BorderlessImageToggleButton;
+
+import javax.imageio.ImageIO;
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.InputEvent;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.reflect.Method;
+
+/**
+ * Just some utility functions.
+ *
+ * @author mhunsicker
+ */
+public class Utility {
+    private static final Logger LOGGER = Logging.getLogger(Utility.class);
+
+    public static Component addLeftJustifiedComponent(Component component) {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        panel.add(component);
+        panel.add(Box.createHorizontalGlue());
+
+        return panel;
+    }
+
+    public static Component addRightJustifiedComponent(Component component) {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        panel.add(Box.createHorizontalGlue());
+        panel.add(component);
+
+        return panel;
+    }
+
+    /**
+     * This creates a dialog. I only created this because I was using JDK 1.6, then realized I needed to use 1.5 and one of the most useful features of 1.6 is dialogs taking Windows as parents. This
+     * abstracts that so I don't have to make major changes to the code by passing around JFrames and JDialogs explicitly.
+     *
+     * @param parent the parent window
+     * @param isModal true if its modal, false if not.
+     * @return a dialog
+     */
+    public static JDialog createDialog(Window parent, String title, boolean isModal) {
+        if (parent instanceof JDialog) {
+            return new JDialog((JDialog) parent, title, isModal);
+        } else if (parent instanceof JFrame) {
+            return new JDialog((JFrame) parent, title, isModal);
+        }
+
+        throw new RuntimeException("Unknown window type!");
+    }
+
+    /**
+     * This uses reflection to set the tab component if we're running under 1.6. It does nothing if you're running under 1.5. This is so you can run this on java 1.6 and get this benefit, but its not
+     * required to compile.
+     *
+     * This is the same as calling JTabbedPane.setTabComponentAt(). It just does so using reflection.
+     */
+    public static void setTabComponent15Compatible(JTabbedPane tabbedPane, int index, Component component) {
+        try {
+            Method method = tabbedPane.getClass().getMethod("setTabComponentAt", new Class[]{Integer.TYPE, Component.class});
+            method.invoke(tabbedPane, index, component);
+        } catch (NoSuchMethodException e) {
+            //e.printStackTrace();
+            //we're not requiring 1.6, so its not a problem if we don't find the method. We just don't get this feature.
+        } catch (Exception e) {
+            LOGGER.error("Setting tab component", e);
+        }
+    }
+
+    /**
+     * This creates a button with the specified action, image, and tooltip text. The main issue here is that it doesn't crash if the image is missing (which is just something that happens in real life
+     * from time to time). You probably should specify a name on the action just in case.
+     *
+     * @param imageResourceName the image resource
+     * @param tooltip the tooltip to display
+     * @param action the action to perform
+     * @return the button that was created.
+     */
+    public static JButton createButton(Class resourceClass, String imageResourceName, String tooltip, Action action) {
+
+        JButton button = null;
+        if (imageResourceName != null) {
+            InputStream inputStream = resourceClass.getResourceAsStream(imageResourceName);
+            if (inputStream != null) {
+                try {
+                    BufferedImage image = ImageIO.read(inputStream);
+
+                    button = new BorderlessImageButton(action, new ImageIcon(image));
+                } catch (IOException e) {
+                    LOGGER.error("Reading image " + imageResourceName, e);
+                }
+            }
+        }
+
+        if (button == null) {
+            button = new JButton(action);
+        }
+
+        if (tooltip != null) {
+            button.setToolTipText(tooltip);
+        }
+
+        return button;
+    }
+
+    public static JToggleButton createToggleButton(Class resourceClass, String imageResourceName, String tooltip, Action action) {
+
+        JToggleButton button = null;
+
+        if (imageResourceName != null) {
+            ImageIcon icon = getImageIcon(resourceClass, imageResourceName);
+            if (icon != null) {
+                button = new BorderlessImageToggleButton(action, icon);
+            }
+        }
+
+        if (button == null) {
+            button = new JToggleButton(action);
+        }
+
+        if (tooltip != null) {
+            button.setToolTipText(tooltip);
+        }
+
+        return button;
+    }
+
+    public static JMenuItem createMenuItem(Class resourceClass, String name, String imageResourceName, Action action) {
+        JMenuItem item = new JMenuItem(action);
+        item.setText(name);
+
+        if (imageResourceName != null) {
+            ImageIcon icon = getImageIcon(resourceClass, imageResourceName);
+            item.setIcon(icon);
+        }
+
+        return item;
+    }
+
+    /**
+     * this determines if the CTRL key is down based on the modifiers from an event. This actualy needs to be checking for different things. CTRL doesn't meant the same thing on each platform.
+     */
+    public static boolean isCTRLDown(int eventModifiersEx) {
+        return (eventModifiersEx & InputEvent.CTRL_DOWN_MASK) == InputEvent.CTRL_DOWN_MASK;
+    }
+
+    public static ImageIcon getImageIcon(Class resourceClass, String imageResourceName) {
+        InputStream inputStream = resourceClass.getResourceAsStream(imageResourceName);
+        if (inputStream != null) {
+            try {
+                BufferedImage image = ImageIO.read(inputStream);
+                return new ImageIcon(image);
+            } catch (IOException e) {
+                LOGGER.error("Reading image " + imageResourceName, e);
+            }
+        }
+
+        return null;
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/AbstractFilterEditorPanel.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/AbstractFilterEditorPanel.java
new file mode 100644
index 0000000..ec65697
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/AbstractFilterEditorPanel.java
@@ -0,0 +1,230 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic.filter;
+
+import javax.swing.*;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This panel displays something that is filtered. Its really just a list with show/hide buttons. You populate it with whatever you like (in String form).
+ *
+ * @author mhunsicker
+ */
+public abstract class AbstractFilterEditorPanel {
+    private JPanel mainPanel;
+    private DefaultListModel model;
+    private JList list;
+
+    private JButton hideButton;
+    private JButton showButton;
+
+    public AbstractFilterEditorPanel() {
+        setupUI();
+    }
+
+    public JComponent getComponent() {
+        return mainPanel;
+    }
+
+    private void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+
+        mainPanel.add(createOptionsPanel(), BorderLayout.NORTH);
+        mainPanel.add(createListPanel(), BorderLayout.CENTER);
+    }
+
+    private Component createOptionsPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        hideButton = new JButton(new AbstractAction("Hide") {
+            public void actionPerformed(ActionEvent e) {
+                hideSelected();
+            }
+        });
+
+        showButton = new JButton(new AbstractAction("Show") {
+            public void actionPerformed(ActionEvent e) {
+                showSelected();
+            }
+        });
+
+        panel.add(showButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(hideButton);
+        panel.add(Box.createHorizontalGlue());
+        panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
+
+        return panel;
+    }
+
+    private Component createListPanel() {
+        model = new DefaultListModel();
+        list = new JList(model);
+
+        list.setCellRenderer(new FilterRenderer());
+
+        list.addListSelectionListener(new ListSelectionListener() {
+            public void valueChanged(ListSelectionEvent e) {
+                if (!e.getValueIsAdjusting()) {
+                    enableAppropriately();
+                }
+            }
+        });
+
+        return new JScrollPane(list);
+    }
+
+    private class FilterRenderer extends DefaultListCellRenderer {
+        private Color defaultForegroundColor;
+
+        private FilterRenderer() {
+            defaultForegroundColor = getForeground();
+        }
+
+        public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
+            Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
+
+            setIcon(null);  //just remove the icon entirely
+
+            boolean isAllowed = isAllowed((String) value);
+
+            if (isAllowed) {
+                setForeground(defaultForegroundColor);
+            } else {
+                setForeground(Color.red);
+            }
+
+            return component;
+        }
+    }
+
+    /**
+     * Implement this to determine if this item is filtered or not. This is used by the list to indicate if this item is filtered or not.
+     *
+     * @param item the item in question
+     * @return true if its filtered, false if not.
+     */
+    protected abstract boolean isAllowed(String item);
+
+    public void enableAppropriately() {
+        boolean isShowEnabled = false;
+        boolean isHideEnabled = false;
+
+        List<String> selectedObjects = getSelectedValues();
+        if (selectedObjects.isEmpty()) {
+            isShowEnabled = false;
+            isHideEnabled = false;
+        } else {  //we've got something selected, figure out how things should be enabled based on the state of what is selected.
+            StateHolder stateHolder = new StateHolder();
+            determineShowHideEnabledState(stateHolder, selectedObjects);
+
+            //now reverse them. show is enabled, if hidden things are present.
+            isShowEnabled = stateHolder.containsHiddenObjects;
+            isHideEnabled = stateHolder.containsShownObjects;
+        }
+
+        showButton.setEnabled(isShowEnabled);
+        hideButton.setEnabled(isHideEnabled);
+    }
+
+    /**
+     * This determines the state of the show hide buttons. We only want to enable one if its appropriate. Because we have to handle multiple selection, we look for both hidden and shown items. We stop
+     * as soon as we find both or we're done with the list.
+     *
+     * @param stateHolder where we store our state.
+     * @param selectedObjects the objects to search.
+     */
+    protected void determineShowHideEnabledState(StateHolder stateHolder, List<String> selectedObjects) {
+        Iterator<String> iterator = selectedObjects.iterator();
+
+        //iterate through them all or until we've found both a hidden and shown object.
+        while (iterator.hasNext() && (!stateHolder.containsHiddenObjects || !stateHolder.containsShownObjects)) {
+            String object = iterator.next();
+            if (isAllowed(object)) {
+                stateHolder.containsShownObjects = true;
+            } else {
+                stateHolder.containsHiddenObjects = true;
+            }
+        }
+    }
+
+    /**
+     * Just a holder for 2 variables.
+     */
+    protected class StateHolder {
+        boolean containsHiddenObjects;
+        boolean containsShownObjects;
+    }
+
+    protected List<String> getSelectedValues() {
+        Object[] objects = list.getSelectedValues();
+        if (objects == null || objects.length == 0) {
+            return Collections.emptyList();
+        }
+
+        List<String> nodes = new ArrayList<String>();
+
+        for (int index = 0; index < objects.length; index++) {
+            Object object = objects[index];
+            nodes.add((String) object);
+        }
+
+        return nodes;
+    }
+
+    private void hideSelected() {
+        List<String> selection = getSelectedValues();
+
+        hideSelected(selection);
+
+        enableAppropriately();  //now update the buttons to reflect the change
+
+        list.repaint();
+    }
+
+    protected abstract void hideSelected(List<String> selection);
+
+    private void showSelected() {
+        List<String> selection = getSelectedValues();
+
+        showSelected(selection);
+
+        enableAppropriately();  //now update the buttons to reflect the change
+
+        list.repaint();
+    }
+
+    protected abstract void showSelected(List<String> selection);
+
+    public void populate(List<String> items) {
+        model.clear();
+
+        Iterator<String> iterator = items.iterator();
+
+        while (iterator.hasNext()) {
+            String item = iterator.next();
+            model.addElement(item);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/ProjectAndTaskFilterDialog.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/ProjectAndTaskFilterDialog.java
new file mode 100644
index 0000000..7ace00b
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/filter/ProjectAndTaskFilterDialog.java
@@ -0,0 +1,276 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic.filter;
+
+import org.gradle.foundation.visitors.AllProjectsAndTasksVisitor;
+import org.gradle.foundation.visitors.UniqueNameProjectAndTaskVisitor;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.filters.BasicFilterEditor;
+import org.gradle.gradleplugin.foundation.filters.BasicProjectAndTaskFilter;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingExportInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingImportInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.util.List;
+
+/**
+ * This dialog allows you to edit what tasks and projects are visible when a filter is enabled. Filters are used to weed out rarely-used things to make finding things easier.
+ *
+ * @author mhunsicker
+ */
+public class ProjectAndTaskFilterDialog {
+    private JDialog dialog;
+    private JPanel mainPanel;
+    private TaskFilterEditorPanel taskFilterEditorPanel;
+    private ProjectFilterEditorPanel projectFilterEditorPanel;
+
+    private JCheckBox filterOutTasksWithNoDescriptionCheckBox;
+
+    private BasicFilterEditor editor;
+    private GradlePluginLord gradlePluginLord;
+
+    private boolean saveResults;
+
+    public ProjectAndTaskFilterDialog(Window parent, GradlePluginLord gradlePluginLord) {
+        this.gradlePluginLord = gradlePluginLord;
+        this.dialog = Utility.createDialog(parent, "Filter", true);
+
+        setupUI();
+    }
+
+    /**
+     * Call this to start editing the given filter.
+     *
+     * @param filter the filter to edit
+     * @return a filter if the user OKs the changes, null if they cancel
+     */
+    public BasicProjectAndTaskFilter show(BasicProjectAndTaskFilter filter) {
+        this.editor = new BasicFilterEditor(filter);
+
+        if (mainPanel == null) {
+            setupUI();
+        }
+
+        populate();
+
+        taskFilterEditorPanel.enableAppropriately();
+        projectFilterEditorPanel.enableAppropriately();
+
+        dialog.setVisible(true);
+
+        if (this.saveResults) {
+            return editor.createFilter();
+        }
+
+        return null;
+    }
+
+    private void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+        dialog.getContentPane().add(mainPanel);
+
+        mainPanel.add(createOptionsPanel(), BorderLayout.NORTH);
+        mainPanel.add(createCenterPanel(), BorderLayout.CENTER);
+        mainPanel.add(createOkCancelPanel(), BorderLayout.SOUTH);
+
+        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+        dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
+        dialog.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {
+                close(false);
+            }
+        });
+
+        dialog.setSize(600, 750);
+        dialog.setLocationRelativeTo(dialog.getParent());
+    }
+
+    private Component createOptionsPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        JButton importButton = new JButton(new AbstractAction("Import...") {
+            public void actionPerformed(ActionEvent e) {
+                importFilter();
+            }
+        });
+
+        JButton exportButton = new JButton(new AbstractAction("Export...") {
+            public void actionPerformed(ActionEvent e) {
+                exportFilter();
+            }
+        });
+
+        filterOutTasksWithNoDescriptionCheckBox = new JCheckBox(new AbstractAction("Hide Tasks With No Description") {
+            public void actionPerformed(ActionEvent e) {
+                filterOutTasksWithNoDescription();
+            }
+        });
+
+        panel.add(filterOutTasksWithNoDescriptionCheckBox);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(importButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(exportButton);
+        panel.add(Box.createHorizontalGlue());
+
+        panel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));
+
+        return panel;
+    }
+
+    private Component createOkCancelPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        JButton okButton = new JButton(new AbstractAction("OK") {
+            public void actionPerformed(ActionEvent e) {
+                close(true);
+            }
+        });
+
+        JButton cancelButton = new JButton(new AbstractAction("Cancel") {
+            public void actionPerformed(ActionEvent e) {
+                close(false);
+            }
+        });
+
+        panel.add(Box.createHorizontalGlue());
+        panel.add(okButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(cancelButton);
+        panel.add(Box.createHorizontalGlue());
+
+        panel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
+
+        return panel;
+    }
+
+    /**
+     * This creates the two list panels. This may seem odd, but I'm putting each of them into a BoxLayout then inside another BorderLayout. This is to make each of them as large as they can be and
+     * divide the space evenly between them.
+     */
+    private Component createCenterPanel() {
+        JPanel outterPanel = new JPanel();
+        outterPanel.setLayout(new BoxLayout(outterPanel, BoxLayout.Y_AXIS));
+
+        JPanel projectPanel = new JPanel(new BorderLayout());
+        JPanel taskPanel = new JPanel(new BorderLayout());
+
+        projectPanel.add(createProjectPanel(), BorderLayout.CENTER);
+        taskPanel.add(createTasksPanel(), BorderLayout.CENTER);
+
+        projectPanel.setBorder(BorderFactory.createTitledBorder("Projects"));
+        taskPanel.setBorder(BorderFactory.createTitledBorder("Tasks"));
+
+        outterPanel.add(projectPanel);
+        outterPanel.add(Box.createVerticalStrut(10));
+        outterPanel.add(taskPanel);
+
+        return outterPanel;
+    }
+
+    private Component createTasksPanel() {
+        taskFilterEditorPanel = new TaskFilterEditorPanel();
+
+        return taskFilterEditorPanel.getComponent();
+    }
+
+    private Component createProjectPanel() {
+        projectFilterEditorPanel = new ProjectFilterEditorPanel();
+
+        return projectFilterEditorPanel.getComponent();
+    }
+
+    private void close(boolean saveResults) {
+        this.saveResults = saveResults;
+        dialog.setVisible(false);
+    }
+
+    /**
+     * This imports a filter from a file.
+     */
+    private void importFilter() {
+        if (editor.importFromFile(new SwingImportInteraction(dialog))) {
+            taskFilterEditorPanel.getComponent().repaint();
+            projectFilterEditorPanel.getComponent().repaint();
+        }
+    }
+
+    /**
+     * This exports a filter to a file.
+     */
+    private void exportFilter() {
+        editor.exportToFile(new SwingExportInteraction(dialog));
+    }
+
+    /**
+     * Populates our lists. We'll use a visitor to build up a list of unique names of projects and tasks. Then we'll sort them and add them to each filter editor panel.
+     */
+    private void populate() {
+        UniqueNameProjectAndTaskVisitor visitor = new UniqueNameProjectAndTaskVisitor();
+
+        AllProjectsAndTasksVisitor.visitProjectAndTasks(gradlePluginLord.getProjects(), visitor, null);
+
+        List<String> taskNames = visitor.getSortedTaskNames();
+        List<String> projectNames = visitor.getSortedProjectNames();
+
+        taskFilterEditorPanel.populate(taskNames);
+        projectFilterEditorPanel.populate(projectNames);
+
+        filterOutTasksWithNoDescriptionCheckBox.setSelected(editor.filterOutTasksWithNoDescription());
+    }
+
+    private class TaskFilterEditorPanel extends AbstractFilterEditorPanel {
+        protected boolean isAllowed(String item) {
+            return editor.doesAllowTask(item);
+        }
+
+        protected void hideSelected(List<String> selection) {
+            editor.hideTasksByName(selection);
+        }
+
+        protected void showSelected(List<String> selection) {
+            editor.showTasksByName(selection);
+        }
+    }
+
+    private class ProjectFilterEditorPanel extends AbstractFilterEditorPanel {
+        protected boolean isAllowed(String item) {
+            return editor.doesAllowProject(item);
+        }
+
+        protected void hideSelected(List<String> selection) {
+            editor.hideProjectsByName(selection);
+        }
+
+        protected void showSelected(List<String> selection) {
+            editor.showProjectsByName(selection);
+        }
+    }
+
+    private void filterOutTasksWithNoDescription() {
+        editor.setFilterOutTasksWithNoDescription(filterOutTasksWithNoDescriptionCheckBox.isSelected());
+        taskFilterEditorPanel.getComponent().repaint();
+        projectFilterEditorPanel.getComponent().repaint();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/CommandLineTab.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/CommandLineTab.java
new file mode 100644
index 0000000..4a7d72a
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/CommandLineTab.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+
+/**
+ * A tab that allows you to just type a straight command line that is sent to Gradle.
+ *
+ * @author mhunsicker
+ */
+public class CommandLineTab implements GradleTab {
+    private GradlePluginLord gradlePluginLord;
+    private FavoritesEditor favoritesEditor;
+
+    private JPanel mainPanel;
+    private JTextField commandLineField;
+
+    private JButton executeButton;
+    private JButton addToFavoritesButton;
+
+    public CommandLineTab(GradlePluginLord gradlePluginLord, SettingsNode settingsNode) {
+        this.gradlePluginLord = gradlePluginLord;
+
+        this.favoritesEditor = gradlePluginLord.getFavoritesEditor();
+    }
+
+    /**
+     * @return the name of this tab
+     */
+    public String getName() {
+        return "Command Line";
+    }
+
+    /**
+     * Notification that this component is about to be shown. Do whatever initialization you choose.
+     */
+    public void aboutToShow() {
+
+    }
+
+    /**
+     * This is where we should create your component.
+     *
+     * @return the component
+     */
+    public Component createComponent() {
+        JPanel mainPanel = new JPanel(new BorderLayout());
+
+        mainPanel.add(createCommandLinePanel(), BorderLayout.NORTH);
+        mainPanel.add(Box.createVerticalGlue(), BorderLayout.CENTER);
+
+        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+        return mainPanel;
+    }
+
+    private Component createCommandLinePanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        commandLineField = new JTextField();
+
+        //make Enter execute the command line.
+        commandLineField.registerKeyboardAction(new ExecuteAction(), KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        //we'll put 'gradle' in from the command line to make it more obvious that its not needed.
+        JPanel commandLinePanel = new JPanel();
+        commandLinePanel.setLayout(new BoxLayout(commandLinePanel, BoxLayout.X_AXIS));
+        commandLinePanel.add(new JLabel("gradle "));
+        commandLinePanel.add(commandLineField);
+
+        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Command Line:")));
+        panel.add(Box.createVerticalStrut(5));
+        panel.add(commandLinePanel);
+        panel.add(Box.createVerticalStrut(5));
+        panel.add(createButtonPanel());
+
+        return panel;
+    }
+
+    private class ExecuteAction extends AbstractAction {
+        private ExecuteAction() {
+            super("Execute");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            executeCommandLine();
+        }
+    }
+
+    private Component createButtonPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        executeButton = new JButton(new ExecuteAction());
+
+        addToFavoritesButton = new JButton(new AbstractAction("Add To Favorites") {
+            public void actionPerformed(ActionEvent e) {
+                addToFavorites();
+            }
+        });
+
+        panel.add(Box.createHorizontalGlue());
+        panel.add(executeButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(addToFavoritesButton);
+
+        return panel;
+    }
+
+    private void addToFavorites() {
+        String commandLineText = commandLineField.getText();
+        favoritesEditor.addFavorite(commandLineText, false);
+    }
+
+    private void executeCommandLine() {
+        String commandLineText = commandLineField.getText();
+        gradlePluginLord.addExecutionRequestToQueue(commandLineText, "Command Line");
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/FavoriteTasksTab.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/FavoriteTasksTab.java
new file mode 100644
index 0000000..da6bbaf
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/FavoriteTasksTab.java
@@ -0,0 +1,413 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingEditFavoriteInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingExportInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingImportInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
+
+import javax.swing.*;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
+import java.awt.*;
+import java.awt.event.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This displays a list of favorites and allows the user to add/remove items as well as change their order.
+ *
+ * @author mhunsicker
+ */
+public class FavoriteTasksTab implements GradleTab, GradlePluginLord.GeneralPluginObserver, FavoritesEditor.FavoriteTasksObserver {
+    private GradlePluginLord gradlePluginLord;
+    private FavoritesEditor favoritesEditor;
+
+    private SettingsNode settingsNode;
+
+    private JPanel mainPanel;
+    private DefaultListModel model;
+    private JList list;
+
+    private JPopupMenu popupMenu;
+    private JMenuItem executeMenuItem;
+    private JMenuItem editMenuItem;
+    private JMenuItem removeFavoritesMenuItem;
+    private JMenuItem copyFavoritesMenuItem;
+
+    private JButton executeButton;
+    private JButton addButton;
+    private JButton editButton;
+    private JButton removeButton;
+    private JButton moveUpButton;
+    private JButton moveDownButton;
+    private JButton importButton;
+    private JButton exportButton;
+
+    public FavoriteTasksTab(GradlePluginLord gradlePluginLord, SettingsNode settingsNode) {
+        this.gradlePluginLord = gradlePluginLord;
+        this.settingsNode = settingsNode;
+
+        this.favoritesEditor = gradlePluginLord.getFavoritesEditor();
+
+        gradlePluginLord.addGeneralPluginObserver(this, true);
+        favoritesEditor.addFavoriteTasksObserver(this, true);
+
+        //read in our settings before we populate things
+        favoritesEditor.serializeIn(settingsNode);
+    }
+
+    public String getName() {
+        return "Favorites";
+    }
+
+    public Component createComponent() {
+        setupUI();
+        enableThingsAppropriately();
+        return mainPanel;
+    }
+
+    /**
+     * Notification that this component is about to be shown. Do whatever initialization you choose.
+     */
+    public void aboutToShow() {
+        populate();
+    }
+
+    private void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+
+        mainPanel.add(createButtonPanel(), BorderLayout.NORTH);
+        mainPanel.add(createListPanel(), BorderLayout.CENTER);
+
+        setupPopupMenu();
+    }
+
+    private Component createButtonPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        executeButton = Utility.createButton(getClass(), "execute.png", "Execute the selected command", new AbstractAction("Execute") {
+            public void actionPerformed(ActionEvent e) {
+                executeSelectedTasks();
+            }
+        });
+
+        addButton = Utility.createButton(getClass(), "add.png", "Adds a new favorite gradle command", new AbstractAction("Add...") {
+            public void actionPerformed(ActionEvent e) {
+                addTask();
+            }
+        });
+
+        editButton = Utility.createButton(getClass(), "edit.png", "Edit the selected favorite", new AbstractAction("Edit...") {
+            public void actionPerformed(ActionEvent e) {
+                editTask();
+            }
+        });
+
+        removeButton = Utility.createButton(getClass(), "remove.png", "Delete the selected favorite", new AbstractAction("Remove") {
+            public void actionPerformed(ActionEvent e) {
+                removeSelectedFavorites();
+            }
+        });
+
+        moveUpButton = Utility.createButton(getClass(), "move-up.png", "Moves the selected favorites up", new AbstractAction("Move Up") {
+            public void actionPerformed(ActionEvent e) {
+                favoritesEditor.moveFavoritesBefore(getSelectedFavoriteTasks());
+            }
+        });
+
+        moveDownButton = Utility.createButton(getClass(), "move-down.png", "Moves the selected favorites down", new AbstractAction("Move Down") {
+            public void actionPerformed(ActionEvent e) {
+                favoritesEditor.moveFavoritesAfter(getSelectedFavoriteTasks());
+            }
+        });
+
+        importButton = Utility.createButton(getClass(), "import.png", "Imports current favorite settings", new AbstractAction("Import...") {
+            public void actionPerformed(ActionEvent e) {
+                importFavorites();
+            }
+        });
+
+        exportButton = Utility.createButton(getClass(), "export.png", "Exports current favorite settings", new AbstractAction("Export...") {
+            public void actionPerformed(ActionEvent e) {
+                exportFavorites();
+            }
+        });
+
+        panel.add(executeButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(addButton);
+        panel.add(Box.createHorizontalStrut(5));
+        panel.add(editButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(removeButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(moveUpButton);
+        panel.add(Box.createHorizontalStrut(5));
+        panel.add(moveDownButton);
+        panel.add(Box.createHorizontalGlue());
+        panel.add(importButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(exportButton);
+
+        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+        return panel;
+    }
+
+    private Component createListPanel() {
+        model = new DefaultListModel();
+        list = new JList(model);
+
+        list.addMouseListener(new MouseAdapter() {
+            public void mouseClicked(MouseEvent e) {
+                if (e.getClickCount() == 2) {
+                    executeSelectedTasks();
+                } else if (e.getButton() == MouseEvent.BUTTON3) {
+                    handleRightClick(e);
+                }
+            }
+        });
+
+        list.addListSelectionListener(new ListSelectionListener() {
+            public void valueChanged(ListSelectionEvent e) {
+                if (!e.getValueIsAdjusting()) {
+                    enableThingsAppropriately();
+                }
+            }
+        });
+
+        //hook 'enter' so it runs the selected tasks.
+        list.registerKeyboardAction(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                executeSelectedTasks();
+            }
+        }, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
+
+        return new JScrollPane(list);
+    }
+
+    private void populate() {
+        model.clear();
+
+        Iterator<FavoriteTask> taskIterator = favoritesEditor.getFavoriteTasks().iterator();
+        while (taskIterator.hasNext()) {
+            FavoriteTask favoriteTask = taskIterator.next();
+            model.addElement(favoriteTask);
+        }
+    }
+
+    private void handleRightClick(MouseEvent e) {
+        Point point = e.getPoint();
+        int index = list.locationToIndex(point);
+        if (index != -1)  //all of this is because the JList won't select things on right-click. Which means you won't be acting upon what you think you're acting upon.
+        {
+            if (!list.isSelectedIndex(index)) {
+                if (Utility.isCTRLDown(e.getModifiersEx())) {
+                    list.addSelectionInterval(index, index); //the CTRL key is down, just add this to our selection
+                } else {
+                    list.setSelectedIndex(index);            //the CTRL key is not down, just replace the selection
+                }
+                //we're not handling SHIFT! Nor are we handling OS X.
+            }
+        }
+        enableThingsAppropriately();
+        popupMenu.show(list, point.x, point.y);
+    }
+
+    /**
+     * Notification that we're about to reload the projects and tasks.
+     */
+    public void startingProjectsAndTasksReload() {
+        //we don't really care.
+    }
+
+    /**
+     * Notification that the projects and tasks have been reloaded. You may want to repopulate or update your views.
+     *
+     * @param wasSuccessful true if they were successfully reloaded. False if an error occurred so we no longer can show the projects and tasks (probably an error in a .gradle file).
+     */
+    public void projectsAndTasksReloaded(boolean wasSuccessful) {
+        //We need to repaint in case any are in error now, or no longer in error.
+        list.repaint();
+
+        //and possible change what is enabled
+        enableThingsAppropriately();
+    }
+
+    /**
+     * Notification that the favorites list has changed. We'll repopulate and then save our changes immediately. The save is useful for IDE integration where we don't control the settings.
+     */
+    public void favoritesChanged() {
+        populate();
+        favoritesEditor.serializeOut(settingsNode);
+    }
+
+    /**
+     * Notification that the favorites were re-ordered. We'll update our list and save our changes immediately. The save is useful for IDE integration where we don't control the settings.
+     *
+     * @param favoritesReordered the favorites that were reordered
+     */
+    public void favoritesReordered(List<FavoriteTask> favoritesReordered) {
+        Object[] previouslySelectedObjects = list.getSelectedValues();
+
+        populate();
+
+        list.clearSelection();
+        //now go re-select the things that were moved
+        if (previouslySelectedObjects != null) {
+            for (int index = 0; index < previouslySelectedObjects.length; index++) {
+                Object previouslySelectedObject = previouslySelectedObjects[index];
+                int listIndex = model.indexOf(previouslySelectedObject);
+                if (listIndex != -1) {
+                    list.addSelectionInterval(listIndex, listIndex);
+                }
+            }
+        }
+
+        favoritesEditor.serializeOut(settingsNode);
+    }
+
+    private void setupPopupMenu() {
+        popupMenu = new JPopupMenu();
+
+        executeMenuItem = Utility.createMenuItem(this.getClass(), "Execute", "execute.png", new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                executeSelectedTasks();
+            }
+        });
+
+        popupMenu.add(executeMenuItem);
+
+        editMenuItem = Utility.createMenuItem(this.getClass(), "Edit...", "edit.png", new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                editTask();
+            }
+        });
+
+        popupMenu.add(editMenuItem);
+
+        copyFavoritesMenuItem = Utility.createMenuItem(this.getClass(), "Duplicate ", "blank.png", new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                duplicateTasks();
+            }
+        });
+
+        popupMenu.add(copyFavoritesMenuItem);
+
+        removeFavoritesMenuItem = Utility.createMenuItem(this.getClass(), "Remove", "remove.png", new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                removeSelectedFavorites();
+            }
+        });
+
+        popupMenu.add(removeFavoritesMenuItem);
+    }
+
+    /**
+     * Executes the selected tasks. If only one is selected, we execute it as normal. If however, multiples are selected, we'll execute that all at once.
+     */
+    private void executeSelectedTasks() {
+        List<FavoriteTask> favorites = getSelectedFavoriteTasks();
+        gradlePluginLord.addExecutionRequestToQueue(favorites);
+    }
+
+    private void removeSelectedFavorites() {
+        List<FavoriteTask> favorites = getSelectedFavoriteTasks();
+        favoritesEditor.removeFavorites(favorites);
+    }
+
+    private List<FavoriteTask> getSelectedFavoriteTasks() {
+        Object[] objects = list.getSelectedValues();
+        if (objects == null) {
+            return Collections.emptyList();
+        }
+
+        List<FavoriteTask> favorites = new ArrayList<FavoriteTask>();
+        for (int index = 0; index < objects.length; index++) {
+            favorites.add((FavoriteTask) objects[index]);
+        }
+
+        return favorites;
+    }
+
+    private FavoriteTask getFirstSelectedFavoriteTask() {
+        return (FavoriteTask) list.getSelectedValue();
+    }
+
+    /**
+     * Enables buttons and menu items based on what is selected.
+     */
+    private void enableThingsAppropriately() {
+        Object[] objects = list.getSelectedValues();
+        boolean hasSelection = objects != null && objects.length != 0;
+        boolean hasSingleSelection = objects != null && objects.length == 1;
+
+        executeMenuItem.setEnabled(hasSelection);
+        removeFavoritesMenuItem.setEnabled(hasSelection);
+
+        executeButton.setEnabled(hasSelection);
+        removeButton.setEnabled(hasSelection);
+        moveUpButton.setEnabled(hasSelection);
+        moveDownButton.setEnabled(hasSelection);
+        copyFavoritesMenuItem.setEnabled(hasSelection);
+
+        editButton.setEnabled(hasSingleSelection);  //only can edit if a single task is selected
+    }
+
+    /**
+     * This imports favorites from a file.
+     */
+    private void importFavorites() {
+        favoritesEditor.importFromFile(new SwingImportInteraction(SwingUtilities.getWindowAncestor(mainPanel)));
+    }
+
+    /**
+     * This exports the favorites to a file.
+     */
+    private void exportFavorites() {
+        favoritesEditor.exportToFile(new SwingExportInteraction(SwingUtilities.getWindowAncestor(mainPanel)));
+    }
+
+    /**
+     * Call this to prompt the user for a task to add.
+     */
+    private void addTask() {
+        favoritesEditor.addFavorite(new SwingEditFavoriteInteraction(SwingUtilities.getWindowAncestor(mainPanel), "Add Favorite", true));
+    }
+
+    private void editTask() {
+        FavoriteTask selectedFavoriteTask = getFirstSelectedFavoriteTask();
+        //if the user has kept these two in synch, we'll continue to keep them in synch.
+        boolean synchronizeDisplayNameWithCommand = selectedFavoriteTask.getDisplayName().equals(selectedFavoriteTask.getFullCommandLine());
+        favoritesEditor.editFavorite(selectedFavoriteTask, new SwingEditFavoriteInteraction(SwingUtilities.getWindowAncestor(mainPanel), "Edit Favorite", synchronizeDisplayNameWithCommand));
+    }
+
+    /**
+     * This duplicates all the selected tasks
+     */
+    private void duplicateTasks() {
+        favoritesEditor.duplicateFavorites(getSelectedFavoriteTasks());
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/GradleTab.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/GradleTab.java
new file mode 100644
index 0000000..fd642bf
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/GradleTab.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
+
+import java.awt.*;
+
+/**
+ * Interface for a tab in the gradle UI.
+ *
+ * @author mhunsicker
+ */
+public interface GradleTab {
+    /**
+     * @return the name of this tab
+     * @author mhunsicker
+     */
+    public String getName();
+
+    /**
+     * This is where we should create the component.
+     *
+     * @return the component
+     */
+    public Component createComponent();
+
+    /**
+     * Notification that this component is about to be shown. Do whatever initialization you choose.
+     */
+    public void aboutToShow();
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/SetupTab.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/SetupTab.java
new file mode 100644
index 0000000..aa153ad
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/SetupTab.java
@@ -0,0 +1,594 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.swing.generic.OutputUILord;
+import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
+import org.gradle.initialization.DefaultCommandLineConverter;
+import org.gradle.logging.internal.LoggingCommandLineConverter;
+
+import javax.swing.*;
+import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.util.*;
+
+/**
+ * This tab contains general settings for the plugin.
+ *
+ * @author mhunsicker
+ */
+public class SetupTab implements GradleTab, GradlePluginLord.SettingsObserver {
+    private final Logger logger = Logging.getLogger(SetupTab.class);
+
+    private static final String STACK_TRACE_LEVEL_CLIENT_PROPERTY = "stack-trace-level-client-property";
+    private static final String SETUP = "setup";
+    private static final String STACK_TRACE_LEVEL = "stack-trace-level";
+    private static final String SHOW_OUTPUT_ON_ERROR = "show-output-on-error";
+    private static final String LOG_LEVEL = "log-level";
+    private static final String CURRENT_DIRECTORY = "current-directory";
+    private static final String CUSTOM_GRADLE_EXECUTOR = "custom-gradle-executor";
+
+    private GradlePluginLord gradlePluginLord;
+    private OutputUILord outputUILord;
+    private SettingsNode settingsNode;
+
+    private JPanel mainPanel;
+
+    private JRadioButton showNoStackTraceRadioButton;
+    private JRadioButton showStackTrackRadioButton;
+    private JRadioButton showFullStackTrackRadioButton;
+
+    private JComboBox logLevelComboBox;
+
+    private JCheckBox onlyShowOutputOnErrorCheckBox;
+
+    private ButtonGroup stackTraceButtonGroup;
+
+    private JTextField currentDirectoryTextField;
+
+    private JCheckBox useCustomGradleExecutorCheckBox;
+    private JTextField customGradleExecutorField;
+    private JButton browseForCustomGradleExecutorButton;
+
+    private JPanel customPanelPlaceHolder;
+
+    public SetupTab(GradlePluginLord gradlePluginLord, OutputUILord outputUILord, SettingsNode settingsNode) {
+        this.gradlePluginLord = gradlePluginLord;
+        this.outputUILord = outputUILord;
+        this.settingsNode = settingsNode.addChildIfNotPresent(SETUP);
+    }
+
+    public String getName() {
+        return "Setup";
+    }
+
+    public Component createComponent() {
+        setupUI();
+
+        return mainPanel;
+    }
+
+    /**
+     * Notification that this component is about to be shown. Do whatever initialization you choose.
+     */
+    public void aboutToShow() {
+        updatePluginLordSettings();
+        gradlePluginLord.addSettingsObserver(this, true);
+    }
+
+    private void setupUI() {
+        mainPanel = new JPanel();
+        mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
+
+        mainPanel.add(createCurrentDirectoryPanel());
+        mainPanel.add(Box.createVerticalStrut(10));
+        mainPanel.add(createLogLevelPanel());
+        mainPanel.add(Box.createVerticalStrut(10));
+        mainPanel.add(createStackTracePanel());
+        mainPanel.add(Box.createVerticalStrut(10));
+        mainPanel.add(createOptionsPanel());
+        mainPanel.add(Box.createVerticalStrut(10));
+        mainPanel.add(createCustomExecutorPanel());
+        mainPanel.add(Box.createVerticalStrut(10));
+
+        //add a panel that can be used to add custom things to the setup tab
+        customPanelPlaceHolder = new JPanel(new BorderLayout());
+        mainPanel.add(customPanelPlaceHolder);
+
+        //Glue alone doesn't work in this situation. This forces everything to the top.
+        JPanel expandingPanel = new JPanel(new BorderLayout());
+        expandingPanel.add(Box.createVerticalGlue(), BorderLayout.CENTER);
+        mainPanel.add(expandingPanel);
+
+        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+    }
+
+    private Component createCurrentDirectoryPanel() {
+        currentDirectoryTextField = new JTextField();
+        currentDirectoryTextField.setEditable(false);
+
+        String currentDirectory = settingsNode.getValueOfChild(CURRENT_DIRECTORY, null);
+        if (currentDirectory == null || "".equals(currentDirectory.trim())) {
+            currentDirectory = gradlePluginLord.getCurrentDirectory().getAbsolutePath();
+        }
+
+        currentDirectoryTextField.setText(currentDirectory);
+        gradlePluginLord.setCurrentDirectory(new File(currentDirectory));
+
+        JButton browseButton = new JButton(new AbstractAction("Browse...") {
+            public void actionPerformed(ActionEvent e) {
+                File file = browseForDirectory(gradlePluginLord.getCurrentDirectory());
+                if (file != null) {
+                    setCurrentDirectory(file);
+                }
+            }
+        });
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Current Directory")));
+        panel.add(createSideBySideComponent(currentDirectoryTextField, browseButton));
+
+        return panel;
+    }
+
+    private void setCurrentDirectory(File file) {
+
+        if (file == null) {
+            currentDirectoryTextField.setText("");
+            settingsNode.setValueOfChild(CURRENT_DIRECTORY, "");
+        } else {
+            currentDirectoryTextField.setText(file.getAbsolutePath());
+            settingsNode.setValueOfChild(CURRENT_DIRECTORY, file.getAbsolutePath());
+        }
+
+        if (gradlePluginLord.setCurrentDirectory(file)) {
+            //refresh the tasks only if we actually changed the current directory
+            gradlePluginLord.addRefreshRequestToQueue();
+        }
+    }
+
+    /**
+     * this creates a panel where the right component is its preferred size. This is useful for putting on a button on the right and a text field on the left.
+     */
+    public static JComponent createSideBySideComponent(Component leftComponent, Component rightComponent) {
+        JPanel xLayoutPanel = new JPanel();
+        xLayoutPanel.setLayout(new BoxLayout(xLayoutPanel, BoxLayout.X_AXIS));
+
+        Dimension preferredSize = leftComponent.getPreferredSize();
+        leftComponent.setMaximumSize(new Dimension(Integer.MAX_VALUE, preferredSize.height));
+
+        xLayoutPanel.add(leftComponent);
+        xLayoutPanel.add(Box.createHorizontalStrut(5));
+        xLayoutPanel.add(rightComponent);
+
+        return xLayoutPanel;
+    }
+
+    /**
+     * Browses for a file using the text value from the text field as the current value.
+     *
+     * @param fileTextField where we get the current value
+     */
+    private File browseForDirectory(File initialFile) {
+
+        if (initialFile == null) {
+            initialFile = new File(System.getProperty("user.dir"));
+        }
+
+        JFileChooser chooser = new JFileChooser(initialFile);
+        chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
+        chooser.setMultiSelectionEnabled(false);
+
+        File file = null;
+        if (chooser.showOpenDialog(mainPanel) == JFileChooser.APPROVE_OPTION) {
+            file = chooser.getSelectedFile();
+        }
+
+        return file;
+    }
+
+    /**
+     * Creates a panel that has a combo box to select a log level
+     */
+    private Component createLogLevelPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        logLevelComboBox = new JComboBox(getLogLevelWrappers());
+
+        panel.add(Utility.addLeftJustifiedComponent(new JLabel("Log Level")));
+        panel.add(Utility.addLeftJustifiedComponent(logLevelComboBox));
+
+        //initialize our value
+        String logLevelName = settingsNode.getValueOfChild(LOG_LEVEL, null);
+        LogLevel logLevel = gradlePluginLord.getLogLevel();
+        if (logLevelName != null) {
+            try {
+                logLevel = LogLevel.valueOf(logLevelName);
+            } catch (IllegalArgumentException e) //this may happen if the enum changes. We don't want this to stop the whole UI
+            {
+                logger.error("Converting log level text to log level enum '" + logLevelName + "'", e);
+            }
+        }
+
+        gradlePluginLord.setLogLevel(logLevel);
+        setLogLevelComboBoxSetting(logLevel);
+
+        logLevelComboBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                LogLevelWrapper wrapper = (LogLevelWrapper) logLevelComboBox.getSelectedItem();
+                if (wrapper != null) {
+                    gradlePluginLord.setLogLevel(wrapper.logLevel);
+                    settingsNode.setValueOfChild(LOG_LEVEL, wrapper.logLevel.name());
+                }
+            }
+        });
+
+        return panel;
+    }
+
+    /**
+     * This creates an array of wrapper objects suitable for passing to the constructor of the log level combo box.
+     */
+    private Vector<LogLevelWrapper> getLogLevelWrappers() {
+        Collection<LogLevel> collection = new LoggingCommandLineConverter().getLogLevels();
+
+        Vector<LogLevelWrapper> wrappers = new Vector<LogLevelWrapper>();
+
+        Iterator<LogLevel> iterator = collection.iterator();
+
+        while (iterator.hasNext()) {
+            LogLevel level = iterator.next();
+            wrappers.add(new LogLevelWrapper(level));
+        }
+
+        Collections.sort(wrappers, new Comparator<LogLevelWrapper>() {
+            public int compare(LogLevelWrapper o1, LogLevelWrapper o2) {
+                return o1.toString().compareToIgnoreCase(o2.toString());
+            }
+        });
+
+        return wrappers;
+    }
+
+    /**
+     * This exists solely for overriding toString to something nicer. We'll captilize the first letter. The rest become lower case. Ultimately, this should probably move into LogLevel. We'll also put
+     * the log level shortcut in parenthesis
+     */
+    private class LogLevelWrapper {
+        private LogLevel logLevel;
+        private String toString;
+
+        private LogLevelWrapper(LogLevel logLevel) {
+            this.logLevel = logLevel;
+
+            String temp = logLevel.toString().toLowerCase().replace('_', ' '); //replace underscores in the name with spaces
+            this.toString = Character.toUpperCase(temp.charAt(0)) + temp.substring(1);
+
+            //add the command line character to the end (so if an error message says use a log level, you can easily translate)
+            String commandLineCharacter = new LoggingCommandLineConverter().getLogLevelCommandLine(logLevel);
+            if (commandLineCharacter != null && !commandLineCharacter.equals("")) {
+                this.toString += " (-" + commandLineCharacter + ")";
+            }
+        }
+
+        public String toString() {
+            return toString;
+        }
+    }
+
+    /**
+     * Sets the log level combo box to the specified log level.
+     *
+     * @param logLevel the log level in question.
+     */
+    private void setLogLevelComboBoxSetting(LogLevel logLevel) {
+        DefaultComboBoxModel model = (DefaultComboBoxModel) logLevelComboBox.getModel();
+        for (int index = 0; index < model.getSize(); index++) {
+            LogLevelWrapper wrapper = (LogLevelWrapper) model.getElementAt(index);
+            if (wrapper.logLevel == logLevel) {
+                logLevelComboBox.setSelectedIndex(index);
+                return;
+            }
+        }
+    }
+
+    /**
+     * Creates a panel with stack trace level radio buttons that allow you to specify how much info is given when an error occurs.
+     */
+    private Component createStackTracePanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        panel.setBorder(BorderFactory.createTitledBorder("Stack Trace Output"));
+
+        showNoStackTraceRadioButton = new JRadioButton("Exceptions Only");
+        showStackTrackRadioButton = new JRadioButton("Standard Stack Trace (-" + DefaultCommandLineConverter.STACKTRACE
+                + ")");  //add the command line character to the end (so if an error message says use a stack trace level, you can easily translate)
+        showFullStackTrackRadioButton = new JRadioButton("Full Stack Trace (-" + DefaultCommandLineConverter.FULL_STACKTRACE + ")");
+
+        showNoStackTraceRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS);
+        showStackTrackRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.ALWAYS);
+        showFullStackTrackRadioButton.putClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY, StartParameter.ShowStacktrace.ALWAYS_FULL);
+
+        stackTraceButtonGroup = new ButtonGroup();
+        stackTraceButtonGroup.add(showNoStackTraceRadioButton);
+        stackTraceButtonGroup.add(showStackTrackRadioButton);
+        stackTraceButtonGroup.add(showFullStackTrackRadioButton);
+
+        showNoStackTraceRadioButton.setSelected(true);
+
+        ActionListener radioButtonListener = new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                updateStackTraceSetting(true);
+            }
+        };
+
+        showNoStackTraceRadioButton.addActionListener(radioButtonListener);
+        showStackTrackRadioButton.addActionListener(radioButtonListener);
+        showFullStackTrackRadioButton.addActionListener(radioButtonListener);
+
+        panel.add(Utility.addLeftJustifiedComponent(showNoStackTraceRadioButton));
+        panel.add(Utility.addLeftJustifiedComponent(showStackTrackRadioButton));
+        panel.add(Utility.addLeftJustifiedComponent(showFullStackTrackRadioButton));
+
+        String stackTraceLevel = settingsNode.getValueOfChild(STACK_TRACE_LEVEL, getSelectedStackTraceLevel().name());
+        if (stackTraceLevel != null) {
+            try {
+                setSelectedStackTraceLevel(StartParameter.ShowStacktrace.valueOf(stackTraceLevel));
+                updateStackTraceSetting(false);   //false because we're serializing this in
+            } catch (Exception e) {  //this can happen if the stack trace levels change because you're moving between versions.
+                logger.error("Converting stack trace level text to stack trace level enum '" + stackTraceLevel + "'", e);
+            }
+        }
+
+        return panel;
+    }
+
+    /**
+     * This stores the current stack trace setting (based on the UI controls) in the plugin.
+     */
+    private void updateStackTraceSetting(boolean saveSetting) {
+        StartParameter.ShowStacktrace stackTraceLevel = getSelectedStackTraceLevel();
+        gradlePluginLord.setStackTraceLevel(stackTraceLevel);
+
+        if (saveSetting) {
+            settingsNode.setValueOfChild(STACK_TRACE_LEVEL, stackTraceLevel.name());
+        }
+    }
+
+    /**
+     * Sets the selected strack trace level on the radio buttons. The radio buttons store their stack trace level as a client property and I'll look for a match using that. This way, we don't have to
+     * edit this if new levels are created.
+     *
+     * @param newStackTraceLevel the new stack trace level.
+     */
+    private void setSelectedStackTraceLevel(StartParameter.ShowStacktrace newStackTraceLevel) {
+        Enumeration<AbstractButton> buttonEnumeration = stackTraceButtonGroup.getElements();
+        while (buttonEnumeration.hasMoreElements()) {
+            JRadioButton radioButton = (JRadioButton) buttonEnumeration.nextElement();
+            StartParameter.ShowStacktrace level = (StartParameter.ShowStacktrace) radioButton.getClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY);
+            if (newStackTraceLevel == level) {
+                radioButton.setSelected(true);
+                return;
+            }
+        }
+    }
+
+    /**
+     * Returns the currently selected stack trace level.  The radio buttons store their stack trace level as a client property so once we get the selected button, we know the level. This way, we don't
+     * have to edit this if new levels are created. Unfortunately, Swing doesn't have an easy way to get the actual button from the group.
+     *
+     * @return the selected stack trace level
+     */
+    private StartParameter.ShowStacktrace getSelectedStackTraceLevel() {
+        ButtonModel selectedButtonModel = stackTraceButtonGroup.getSelection();
+        if (selectedButtonModel != null) {
+            Enumeration<AbstractButton> buttonEnumeration = stackTraceButtonGroup.getElements();
+            while (buttonEnumeration.hasMoreElements()) {
+                JRadioButton radioButton = (JRadioButton) buttonEnumeration.nextElement();
+                if (radioButton.getModel() == selectedButtonModel) {
+                    StartParameter.ShowStacktrace level = (StartParameter.ShowStacktrace) radioButton.getClientProperty(STACK_TRACE_LEVEL_CLIENT_PROPERTY);
+                    return level;
+                }
+            }
+        }
+
+        return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
+    }
+
+    private Component createOptionsPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        onlyShowOutputOnErrorCheckBox = new JCheckBox("Only Show Output When Errors Occur");
+
+        onlyShowOutputOnErrorCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                updateShowOutputOnErrorsSetting();
+                settingsNode.setValueOfChildAsBoolean(SHOW_OUTPUT_ON_ERROR, onlyShowOutputOnErrorCheckBox.isSelected());
+            }
+        });
+
+        //initialize its default value
+        boolean valueAsBoolean = settingsNode.getValueOfChildAsBoolean(SHOW_OUTPUT_ON_ERROR, onlyShowOutputOnErrorCheckBox.isSelected());
+        onlyShowOutputOnErrorCheckBox.setSelected(valueAsBoolean);
+
+        updateShowOutputOnErrorsSetting();
+
+        panel.add(Utility.addLeftJustifiedComponent(onlyShowOutputOnErrorCheckBox));
+
+        return panel;
+    }
+
+    private void updateShowOutputOnErrorsSetting() {
+        boolean value = onlyShowOutputOnErrorCheckBox.isSelected();
+
+        outputUILord.setOnlyShowOutputOnErrors(value);
+    }
+
+    private Component createCustomExecutorPanel() {
+        useCustomGradleExecutorCheckBox = new JCheckBox("Use Custom Gradle Executor");
+
+        customGradleExecutorField = new JTextField();
+        customGradleExecutorField.setEditable(false);
+
+        browseForCustomGradleExecutorButton = new JButton(new AbstractAction("Browse...") {
+            public void actionPerformed(ActionEvent e) {
+                browseForCustomGradleExecutor();
+            }
+        });
+
+        String customExecutorPath = settingsNode.getValueOfChild(CUSTOM_GRADLE_EXECUTOR, null);
+        if (customExecutorPath == null) {
+            setCustomGradleExecutor(null);
+        } else {
+            setCustomGradleExecutor(new File(customExecutorPath));
+        }
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
+
+        panel.add(Utility.addLeftJustifiedComponent(useCustomGradleExecutorCheckBox));
+        JComponent sideBySideComponent = createSideBySideComponent(customGradleExecutorField, browseForCustomGradleExecutorButton);
+        sideBySideComponent.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0)); //indent it
+        panel.add(sideBySideComponent);
+
+        useCustomGradleExecutorCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                if (useCustomGradleExecutorCheckBox.isSelected()) { //if they checked it, browse for a custom executor immediately
+                    browseForCustomGradleExecutor();
+                } else {
+                    setCustomGradleExecutor(null);
+                }
+            }
+        });
+
+        return panel;
+    }
+
+    /**
+     * Call this to browse for a custom gradle executor.
+     */
+    private void browseForCustomGradleExecutor() {
+        File startingDirectory = new File(System.getProperty("user.home"));
+        File currentFile = gradlePluginLord.getCustomGradleExecutor();
+        if (currentFile != null) {
+            startingDirectory = currentFile.getAbsoluteFile();
+        } else {
+            if (gradlePluginLord.getCurrentDirectory() != null) {
+                startingDirectory = gradlePluginLord.getCurrentDirectory();
+            }
+        }
+
+        JFileChooser chooser = new JFileChooser(startingDirectory);
+        chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
+        chooser.setMultiSelectionEnabled(false);
+
+        File file = null;
+        if (chooser.showOpenDialog(mainPanel) == JFileChooser.APPROVE_OPTION) {
+            file = chooser.getSelectedFile();
+        }
+
+        if (file != null) {
+            setCustomGradleExecutor(file);
+        } else {  //if they canceled, and they have no custom gradle executor specified, then we must clear things
+            //This will reset the UI back to 'not using a custom executor'. We can't have them check the
+            //field and not have a value here.
+            if (gradlePluginLord.getCustomGradleExecutor() == null) {
+                setCustomGradleExecutor(null);
+            }
+        }
+    }
+
+    /**
+     * Call this to set a custom gradle executor. We'll enable all fields appropriately and setup the foundation settings. We'll also fire off a refresh.
+     *
+     * @param file the file to use as a custom executor. Null not to use one.
+     */
+    private void setCustomGradleExecutor(File file) {
+        String storagePath;
+        boolean isUsingCustom = false;
+        if (file == null) {
+            isUsingCustom = false;
+            storagePath = null;
+        } else {
+            isUsingCustom = true;
+            storagePath = file.getAbsolutePath();
+        }
+
+        //set the executor in the foundation
+        if (gradlePluginLord.setCustomGradleExecutor(file)) {
+            //refresh the tasks only if we actually changed the executor
+            gradlePluginLord.addRefreshRequestToQueue();
+        }
+
+        //set the UI values
+        useCustomGradleExecutorCheckBox.setSelected(isUsingCustom);
+        customGradleExecutorField.setText(storagePath);
+
+        //enable the UI appropriately.
+        browseForCustomGradleExecutorButton.setEnabled(isUsingCustom);
+        customGradleExecutorField.setEnabled(isUsingCustom);
+
+        //store the settings
+        settingsNode.setValueOfChild(CUSTOM_GRADLE_EXECUTOR, storagePath);
+    }
+
+    /**
+     * This adds the specified component to the setup panel. It is added below the last 'default' item. You can only add 1 component here, so if you need to add multiple things, you'll have to handle
+     * adding that to yourself to the one component.
+     *
+     * @param component the component to add.
+     */
+    public void setCustomPanel(JComponent component) {
+        customPanelPlaceHolder.add(component, BorderLayout.CENTER);
+        customPanelPlaceHolder.invalidate();
+        mainPanel.validate();
+    }
+
+    /**
+     * Notification that some settings have changed for the plugin. Settings such as current directory, gradle home directory, etc. This is useful for UIs that need to update their UIs when this is
+     * changed by other means.
+     */
+    public void settingsChanged() {
+        updatePluginLordSettings();
+    }
+
+    /**
+     * Called upon start up and whenever GradlePluginLord settings are changed. We'll update our values. Note: this actually gets called several times in a row for each settings during initialization.
+     * Its not optimal, but functional and I didn't want to deal with numerous, specific-field notifications.
+     */
+    private void updatePluginLordSettings() {
+        setCustomGradleExecutor(gradlePluginLord.getCustomGradleExecutor());
+
+        setCurrentDirectory(gradlePluginLord.getCurrentDirectory());
+
+        setSelectedStackTraceLevel(gradlePluginLord.getStackTraceLevel());
+
+        setLogLevelComboBoxSetting(gradlePluginLord.getLogLevel());
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/TaskTreeTab.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/TaskTreeTab.java
new file mode 100644
index 0000000..94c67c7
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/generic/tabs/TaskTreeTab.java
@@ -0,0 +1,566 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.gradleplugin.userinterface.swing.generic.tabs;
+
+import org.gradle.api.logging.Logger;
+import org.gradle.api.logging.Logging;
+import org.gradle.foundation.CommandLineAssistant;
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.filters.AllowAllProjectAndTaskFilter;
+import org.gradle.gradleplugin.foundation.filters.BasicFilterEditor;
+import org.gradle.gradleplugin.foundation.filters.BasicProjectAndTaskFilter;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingAddMultipleFavoritesInteraction;
+import org.gradle.gradleplugin.userinterface.swing.generic.TaskTreeComponent;
+import org.gradle.gradleplugin.userinterface.swing.generic.Utility;
+import org.gradle.gradleplugin.userinterface.swing.generic.filter.ProjectAndTaskFilterDialog;
+
+import javax.swing.*;
+import javax.swing.event.TreeSelectionEvent;
+import javax.swing.event.TreeSelectionListener;
+import java.awt.*;
+import java.awt.datatransfer.StringSelection;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This displays a tree of projects and tasks.
+ *
+ * @author mhunsicker
+ */
+public class TaskTreeTab implements GradleTab, GradlePluginLord.GeneralPluginObserver, GradlePluginLord.RequestObserver {
+    private final Logger logger = Logging.getLogger(TaskTreeTab.class);
+
+    private static final String SHOW_DESCRIPTION = "show-description";
+    private static final String BLANK_PNG = "blank.png"; //a blank image used as a spacer on the context menu.
+    private static final String EXECUTE_PNG = "execute.png";
+
+    private JPanel mainPanel;
+    private GradlePluginLord gradlePluginLord;
+    private AlternateUIInteraction alternateUIInteraction;
+
+    private TaskTreeComponent treeComponent;
+
+    private JPopupMenu popupMenu;
+    private JMenuItem addToFavoritesMenuItem;
+    private JMenuItem executeMenuItem;
+    private JMenuItem executeOnlyThisMenuItem;
+    private JMenuItem filterOutMenuItem;
+    private JMenuItem editFileMenuItem;
+    private JMenuItem copyTaskNameMenuItem;
+
+    private JButton refreshButton;
+    private JButton executeButton;
+    private JToggleButton toggleFilterButton;
+    private JButton editFilterButton;
+
+    private JCheckBox showDescriptionCheckBox;
+
+    private BasicFilterEditor editor;
+
+    private boolean isRefreshing;
+
+    private Color defaultTreeBackground;
+    private Color workingBackgroundColor = UIManager.getDefaults().getColor("Panel.background"); //just something to provide better feedback that we're working.
+    private JScrollPane treeScrollPane;
+
+    private SettingsNode settingsNode;
+
+    public TaskTreeTab(GradlePluginLord gradlePluginLord, SettingsNode settingsNode, AlternateUIInteraction alternateUIInteraction) {
+        this.gradlePluginLord = gradlePluginLord;
+        this.settingsNode = settingsNode;
+        this.alternateUIInteraction = alternateUIInteraction;
+
+        gradlePluginLord.addGeneralPluginObserver(this, true);
+        gradlePluginLord.addRequestObserver(this, true);
+
+        initializeFilterEditor();
+    }
+
+    /**
+     * This initializes our filter editor. We create a filter, serialize in our settings and then use that to create the editor. Lastly, we add an observer to the editor so we can save our changes
+     * immediately (useful for IDE integration where we don't control the settings).
+     */
+    private void initializeFilterEditor() {
+        BasicProjectAndTaskFilter filter = new BasicProjectAndTaskFilter();
+        filter.serializeIn(settingsNode);
+        editor = new BasicFilterEditor(filter);
+
+        editor.addFilterEditorObserver(new BasicFilterEditor.FilterEditorObserver() {
+            public void filterChanged() {  //whenever changes are made, save them.
+                editor.createFilter().serializeOut(settingsNode);
+            }
+        }, false);
+    }
+
+    public String getName() {
+        return "Task Tree";
+    }
+
+    public Component createComponent() {
+        setupUI();
+
+        enableThingsAppropriately();
+
+        return mainPanel;
+    }
+
+    /**
+     * Notification that this component is about to be shown. Do whatever initialization you choose.
+     */
+    public void aboutToShow() {
+        resetShowDescription(); //make sure that our setting is pushed to the tree's setting.
+
+        //when we start up, refresh our list.
+        SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                if (gradlePluginLord.isSetupComplete()) {
+                    refresh();
+                } else {
+                    showTextInViewport("Cannot show tasks until configuration is complete. See Setup tab.");
+                }
+            }
+        });
+    }
+
+    public void setupUI() {
+        mainPanel = new JPanel(new BorderLayout());
+
+        mainPanel.add(createTopPanel(), BorderLayout.NORTH);
+        mainPanel.add(createTreePanel(), BorderLayout.CENTER);
+
+        setupPopupMenu();
+    }
+
+    private Component createTopPanel() {
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+
+        refreshButton = Utility.createButton(getClass(), "refresh.png", "Refreshes the task tree", new AbstractAction("Refresh") {
+            public void actionPerformed(ActionEvent e) {
+                refresh();
+            }
+        });
+
+        executeButton = Utility.createButton(getClass(), EXECUTE_PNG, "Execute the selected tasks", new AbstractAction("Execute") {
+            public void actionPerformed(ActionEvent e) {
+                executeSelectedTasks();
+            }
+        });
+
+        toggleFilterButton = Utility.createToggleButton(getClass(), "filter.png", "Toggles the view to show either everything or only the filtered items", new AbstractAction("Filter") {
+            public void actionPerformed(ActionEvent e) {
+                populate();
+            }
+        });
+
+        toggleFilterButton.setSelected(true);
+
+        editFilterButton = Utility.createButton(getClass(), "edit-filter.png", "Edits the filter to control what is visible", new AbstractAction("Edit Filter...") {
+            public void actionPerformed(ActionEvent e) {
+                configureFilter();
+            }
+        });
+
+        showDescriptionCheckBox = new JCheckBox("Description", true);
+        showDescriptionCheckBox.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                resetShowDescription();
+            }
+        });
+
+        showDescriptionCheckBox.setSelected(settingsNode.getValueOfChildAsBoolean(SHOW_DESCRIPTION, showDescriptionCheckBox.isSelected()));
+
+        panel.add(refreshButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(executeButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(toggleFilterButton);
+        panel.add(Box.createHorizontalStrut(10));
+        panel.add(showDescriptionCheckBox);
+        panel.add(Box.createHorizontalGlue());
+        panel.add(editFilterButton);
+
+        panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
+
+        return panel;
+    }
+
+    private Component createTreePanel() {
+        treeComponent = new TaskTreeComponent(gradlePluginLord, new TaskTreeComponent.Interaction() {
+            public void rightClick(JTree tree, int x, int y) {
+                enableThingsAppropriately();
+                popupMenu.show(tree, x, y);
+            }
+
+            public void taskInvoked(TaskView task, boolean isCtrlKeyDown) {
+                if (isCtrlKeyDown) {
+                    gradlePluginLord.addExecutionRequestToQueue(task, false, "-a");
+                } else {
+                    gradlePluginLord.addExecutionRequestToQueue(task, false);
+                }
+            }
+
+            public void projectInvoked(ProjectView project) {
+                executeDefaultTasksInProject(project);
+            }
+        });
+
+        treeComponent.getTree().addTreeSelectionListener(new TreeSelectionListener() {
+            public void valueChanged(TreeSelectionEvent e) {
+                enableThingsAppropriately();
+            }
+        });
+
+        defaultTreeBackground = treeComponent.getTree().getBackground();
+
+        treeScrollPane = new JScrollPane();
+
+        treeComponent.getTree().setBackground(workingBackgroundColor);  //change the color to better indicate that
+        showTextInViewport("Has not built projects/tasks yet.");
+
+        return treeScrollPane;
+    }
+
+    /**
+     * Replaces the tree with a label of text. This is used when there's nothing in the tree, but perhaps a 'working' or error message.
+     *
+     * @param text the text to display
+     */
+    private void showTextInViewport(String text) {
+        treeScrollPane.getViewport().removeAll();
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
+        panel.add(Box.createHorizontalGlue());
+        panel.add(new JLabel(text));
+        panel.add(Box.createHorizontalGlue());
+
+        treeScrollPane.getViewport().add(panel);
+        treeScrollPane.revalidate();
+    }
+
+    /**
+     * Puts the tree in the main view. This is used once we've gathered the projects and tasks and want to display them in the tree.
+     */
+    private void showTreeInViewport() {
+        treeScrollPane.getViewport().removeAll();
+        treeScrollPane.getViewport().add(treeComponent.getTree());
+        treeScrollPane.revalidate();
+    }
+
+    public void executionRequestAdded(ExecutionRequest request) {
+        //we don't really care
+    }
+
+    public void refreshRequestAdded(RefreshTaskListRequest request) {
+        //when someone adds a refresh request, update the UI to reflect this.
+        isRefreshing = true;
+
+        enableThingsAppropriately();
+
+        treeComponent.getTree().setBackground(workingBackgroundColor);
+        showTextInViewport("Refreshing projects and tasks.");
+    }
+
+    /**
+     * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files.
+     *
+     * @param request the request that's about to be executed.
+     * @author mhunsicker
+     */
+    public void aboutToExecuteRequest(Request request) {
+        //we don't really care
+    }
+
+    /**
+     * Notification that the command has completed execution.
+     *
+     * @param request the original request containing the command that was executed
+     * @param result the result of the command
+     * @param output the output from gradle executing the command
+     */
+    public void requestExecutionComplete(Request request, int result, String output) {
+        if (request instanceof RefreshTaskListRequest) {
+            isRefreshing = false;
+            enableThingsAppropriately();
+            if (result != 0) { //if something went wrong, let the user know
+                showTextInViewport("Error");
+            }
+        }
+    }
+
+    /**
+     * Call this to repopulate the tree. Useful if new tasks have been created.
+     */
+    private void refresh() {
+        gradlePluginLord.addRefreshRequestToQueue();
+    }
+
+    /**
+     * This populates (and repopulates) the tree.
+     */
+    private void populate() {
+        if (toggleFilterButton.isSelected()) {
+            treeComponent.populate(editor.createFilter());
+        } else {
+            treeComponent.populate(new AllowAllProjectAndTaskFilter());
+        }
+
+        //reset the background to indicate that we're populated
+        treeComponent.getTree().setBackground(defaultTreeBackground);
+
+        showTreeInViewport();
+    }
+
+    private void executeSelectedTasks(String... additionCommandLineOptions) {
+        List<TaskView> taskViews = treeComponent.getSelectedTasks();
+        String singleCommandLine = CommandLineAssistant.combineTasks(taskViews, additionCommandLineOptions);
+        if (singleCommandLine == null) {
+            return;
+        }
+
+        gradlePluginLord.addExecutionRequestToQueue(singleCommandLine, singleCommandLine, false);
+    }
+
+    /**
+     * Notification that we're about to reload the projects and tasks.
+     */
+    public void startingProjectsAndTasksReload() {
+        treeComponent.getTree().setBackground(workingBackgroundColor);
+        showTextInViewport("Building projects/tasks.");
+    }
+
+    /**
+     * Notification that the projects and tasks have been reloaded. You may want to repopulate or update your views.
+     *
+     * @param wasSuccessful true if they were successfully reloaded. False if an error occurred so we no longer can show the projects and tasks (probably an error in a .gradle file).
+     */
+    public void projectsAndTasksReloaded(boolean wasSuccessful) {
+        isRefreshing = false;
+        enableThingsAppropriately();
+
+        if (!wasSuccessful) {
+            showTextInViewport("Error");
+        } else {
+            populate();
+        }
+    }
+
+    /**
+     * Builds the popup menu
+     */
+    private void setupPopupMenu() {
+        popupMenu = new JPopupMenu();
+
+        executeMenuItem = Utility.createMenuItem(this.getClass(), "Execute", EXECUTE_PNG, new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                executeSelectedTasks();
+            }
+        });
+        popupMenu.add(executeMenuItem);
+
+        executeOnlyThisMenuItem = Utility.createMenuItem(this.getClass(), "Execute Ignoring Dependencies (-a)", BLANK_PNG, new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                executeSelectedTasks("-a");
+            }
+        });
+        popupMenu.add(executeOnlyThisMenuItem);
+
+        popupMenu.addSeparator();
+
+        addToFavoritesMenuItem = Utility.createMenuItem(this.getClass(), "Add To Favorites", BLANK_PNG, new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                addSelectedToFavorites();
+            }
+        });
+        popupMenu.add(addToFavoritesMenuItem);
+
+        filterOutMenuItem = Utility.createMenuItem(this.getClass(), "Hide", BLANK_PNG, new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                hideSelection();
+            }
+        });
+        popupMenu.add(filterOutMenuItem);
+
+        editFileMenuItem = Utility.createMenuItem(this.getClass(), "Edit File", BLANK_PNG, new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                editSelectedFiles();
+            }
+        });
+        popupMenu.add(editFileMenuItem);
+
+        copyTaskNameMenuItem = Utility.createMenuItem(this.getClass(), "Copy Task Name", BLANK_PNG, new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                copySelectedTaskNames();
+            }
+        });
+
+        popupMenu.addSeparator();
+        popupMenu.add(copyTaskNameMenuItem);
+    }
+
+    /**
+     * Enables buttons and menu items based on what is selected.
+     */
+    private void enableThingsAppropriately() {
+        boolean hasSelection = treeComponent.getTree().getSelectionPath() != null;
+        boolean hasTaskSelection = treeComponent.hasTasksSelected();
+        boolean canDoThings = !isRefreshing && treeComponent.isPopulated() && hasSelection; //can't be refreshing, is populated, and  hasSelections
+
+        refreshButton.setEnabled(!isRefreshing);
+
+        addToFavoritesMenuItem.setEnabled(canDoThings);
+        executeMenuItem.setEnabled(canDoThings);
+        executeOnlyThisMenuItem.setEnabled(canDoThings);
+
+        executeButton.setEnabled(canDoThings);
+
+        if (alternateUIInteraction
+                .doesSupportEditingOpeningFiles())   //I'll allow this to be dynamic. If we start supporting editing while running (say a user configured a setting to use a specific external tool), then we'll allow it.
+        {
+            editFileMenuItem.setVisible(true);
+            boolean hasProjectsSelected = treeComponent.hasProjectsSelected();
+            editFileMenuItem.setEnabled(hasProjectsSelected && canDoThings);
+        } else {
+            editFileMenuItem.setVisible(false);  //just hide it if we don't support this
+        }
+
+        copyTaskNameMenuItem.setVisible(!isRefreshing && hasTaskSelection);
+    }
+
+    /**
+     * Adds whatever is selected to the favorites.
+     */
+    private void addSelectedToFavorites() {
+        List<TaskView> tasks = treeComponent.getSelectedTasks();
+
+        gradlePluginLord.getFavoritesEditor().addMutlipleFavorites(tasks, false, new SwingAddMultipleFavoritesInteraction(SwingUtilities.getWindowAncestor(mainPanel)));
+    }
+
+    /**
+     * This displays a dialog that allows the user to determine what shows up in the tree. We give the filter dialog a filter rather than handing it out editor so teh user can cancel. That is, the
+     * dialog uses its own editor which it modifies freely and throws away. This way, if the user cancels, we dodon't have to deal with restoring the previous values in our local editor.
+     */
+    private void configureFilter() {
+        ProjectAndTaskFilterDialog dialog = new ProjectAndTaskFilterDialog(SwingUtilities.getWindowAncestor(mainPanel), gradlePluginLord);
+
+        BasicProjectAndTaskFilter newFilter = dialog.show(editor.createFilter());
+        if (newFilter != null) {
+            //if the user didn't cancel...
+            editor.initializeFromFilter(newFilter);
+            populate();
+        }
+    }
+
+    /**
+     * Call this to filter out the currently selected items.
+     */
+    private void hideSelection() {
+        TaskTreeComponent.MultipleSelection multipleSelection = treeComponent.getSelectedProjectsAndTasks();
+        if (!multipleSelection.projects.isEmpty() || !multipleSelection.tasks.isEmpty()) {
+            editor.hideProjects(multipleSelection.projects);
+            editor.hideTasks(multipleSelection.tasks);
+
+            populate(); //unfortunately, we have to repopulate now.
+        }
+    }
+
+    /**
+     * This resets whether the description is shown or not based on the check box. The tree component does the real work.
+     */
+    private void resetShowDescription() {
+        settingsNode.setValueOfChildAsBoolean(SHOW_DESCRIPTION, showDescriptionCheckBox.isSelected());   //save it immediately
+        treeComponent.setShowDescription(showDescriptionCheckBox.isSelected());
+    }
+
+    /**
+     * This opens the selected files. This gets the 'parent' of this to do it for us. This facilitates using this inside an IDE (you get the IDE to open it).
+     */
+    private void editSelectedFiles() {
+        TaskTreeComponent.MultipleSelection tasks = treeComponent.getSelectedProjectsAndTasks();
+
+        Iterator<ProjectView> iterator = tasks.projects.iterator();
+        while (iterator.hasNext()) {
+            ProjectView projectView = iterator.next();
+            File file = projectView.getBuildFile();
+            if (file != null) {
+                alternateUIInteraction.editFile(file, -1);
+            }
+        }
+    }
+
+    /**
+     * This executes all default tasks in the specified project.
+     *
+     * @param project the project to execute.
+     */
+    private void executeDefaultTasksInProject(ProjectView project) {
+        Iterator<TaskView> iterator = project.getDefaultTasks().iterator();
+        while (iterator.hasNext()) {
+            TaskView task = iterator.next();
+            gradlePluginLord.addExecutionRequestToQueue(task, false);
+        }
+    }
+
+    /**
+     * Copies the selected tasks names to the clipboard
+     */
+    private void copySelectedTaskNames() {
+
+        String names = getSelectedTaskNames();
+        if (names.length() == 0) {
+            return;
+        }
+
+        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(names), null);
+    }
+
+    /**
+     * This puts all the selected task names in a space-delimited String
+     *
+     * @return a string of all the tasks
+     */
+    private String getSelectedTaskNames() {
+        List<TaskView> tasks = treeComponent.getSelectedTasks();
+        if (tasks.isEmpty()) {
+            return null;
+        }
+
+        StringBuilder taskString = new StringBuilder();
+        Iterator<TaskView> iterator = tasks.iterator();
+        while (iterator.hasNext()) {
+            TaskView taskView = iterator.next();
+
+            taskString.append(taskView.getFullTaskName());
+            if (iterator.hasNext()) {
+                taskString.append(' ');
+            }
+        }
+
+        return taskString.toString();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/Application.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/Application.java
new file mode 100644
index 0000000..ad719b8
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/Application.java
@@ -0,0 +1,374 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.standalone;
+
+import org.gradle.gradleplugin.foundation.DOM4JSerializer;
+import org.gradle.gradleplugin.foundation.ExtensionFileFilter;
+import org.gradle.gradleplugin.foundation.settings.DOM4JSettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+import org.gradle.gradleplugin.userinterface.swing.common.PreferencesAssistant;
+import org.gradle.gradleplugin.userinterface.swing.generic.SinglePaneUIInstance;
+import org.gradle.util.UncheckedException;
+
+import javax.swing.*;
+import javax.swing.filechooser.FileFilter;
+import java.awt.*;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.File;
+import java.lang.reflect.Method;
+import java.net.URI;
+
+/**
+ * The main entry point for a stand-alone application for Gradle. The real work is not done here. This is just a UI containing components that are meant to be reuseable in other UIs (say an IDE
+ * plugin). Those other components do the real work. Most of the work is wrapped inside SinglePaneUIInstance.
+ *
+ * @author mhunsicker
+ */
+public class Application implements AlternateUIInteraction {
+    private static final int DEFAULT_WIDTH = 800;
+    private static final int DEFAULT_HEIGHT = 800;
+
+    private static final String WINDOW_PREFERENCES_ID = "window-id";
+    private static final String SETTINGS_EXTENSION = ".setting";
+
+    private JFrame frame;
+    private SinglePaneUIInstance singlePaneUIInstance;
+
+    private boolean doesSupportEditingFiles;
+
+    private LifecycleListener lifecycleListener;
+    private DOM4JSettingsNode rootSettingsNode;
+
+    /**
+     * Interface that allows the caller to do post shutdown processing. For example, you may want to exit the VM. You may not.
+     */
+    public interface LifecycleListener {
+        /**
+         * Notification that the application has started successfully. This is fired within the same thread that instantiates us.
+         */
+        public void hasStarted();
+
+        /**
+         * Notification that the application has shut down. This is fired from the Event Dispatch Thread.
+         */
+        public void hasShutDown();
+    }
+
+    public static void main(String[] args) {
+        new Application(new LifecycleListener() {
+            public void hasStarted() {
+                //we don't care
+            }
+
+            public void hasShutDown() {
+                System.exit(0);
+            }
+        });
+    }
+
+    public Application(LifecycleListener lifecycleListener) {
+        this.lifecycleListener = lifecycleListener;
+
+        try {   //try and make it look like a native app
+            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+        } catch (Exception e) {
+            throw UncheckedException.asUncheckedException(e);
+        }
+
+        this.doesSupportEditingFiles = determineIfSupportsEditingFiles();
+
+        //read in the settings
+        rootSettingsNode = DOM4JSerializer.readSettingsFile(new SettingsImportInteraction(), createFileFilter());
+        if (rootSettingsNode == null) {
+            rootSettingsNode = DOM4JSerializer.createBlankSettings();
+        }
+
+        singlePaneUIInstance = new SinglePaneUIInstance();
+        singlePaneUIInstance.initialize(rootSettingsNode, this);
+
+        setupUI();
+
+        restoreSettings();
+
+        frame.setVisible(true);
+
+        lifecycleListener.hasStarted();  //notify listeners that we have successfully started
+    }
+
+    private void setupUI() {
+        frame = new JFrame("Gradle");
+
+        JPanel mainPanel = new JPanel(new BorderLayout());
+        frame.getContentPane().add(mainPanel);
+
+        mainPanel.add(singlePaneUIInstance.getComponent());
+        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
+
+        singlePaneUIInstance.aboutToShow();
+
+        frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+        frame.addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {
+                close();
+            }
+        });
+
+        frame.setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
+        frame.setLocationByPlatform(true);
+    }
+
+    private void close() {
+        boolean canClose = singlePaneUIInstance.canClose(new SinglePaneUIInstance.CloseInteraction() {
+            public boolean promptUserToConfirmClosingWhileBusy() {
+                int result = JOptionPane.showConfirmDialog(frame, "Gradle tasks are being currently being executed. Exit anyway?", "Exit While Busy?", JOptionPane.YES_NO_OPTION,
+                        JOptionPane.QUESTION_MESSAGE);
+                return result == JOptionPane.YES_OPTION;
+            }
+        });
+
+        if (!canClose) {
+            return;
+        }
+
+        singlePaneUIInstance.close();
+
+        saveSettings();
+        frame.setVisible(false);
+
+        if (lifecycleListener != null) {
+            lifecycleListener.hasShutDown();
+        } else {
+            System.exit(0);
+        }
+    }
+
+    private void saveSettings() {
+        PreferencesAssistant.saveSettings(rootSettingsNode, frame, WINDOW_PREFERENCES_ID, Application.class);
+
+        DOM4JSerializer.exportToFile(new SettingsExportInteraction(), createFileFilter(), rootSettingsNode);
+    }
+
+    private void restoreSettings() {
+        PreferencesAssistant.restoreSettings(rootSettingsNode, frame, WINDOW_PREFERENCES_ID, Application.class);
+    }
+
+    /**
+     * Notification that you should open the specified file and go to the specified line. Its up to the application to determine if this file should be opened for editing or simply displayed. The
+     * difference comes into play for things like xml or html files where a user may want to open them in a browser vs a source code file where they may want to open it directly in an IDE.
+     *
+     * @param file the file to edit
+     * @param line the line to go to. -1 if no line is specified.
+     */
+    public void openFile(File file, int line) {
+        String name = file.getName().toLowerCase();
+        if (name.endsWith(".html") || name.endsWith(".htm")) {
+            browseFile(file);
+        } else {
+            editFile(file, line);
+        }
+    }
+
+    public void browseFile(File file) {
+        if (!file.exists())  //the file might not exist. This happens if its just using the default settings (no file is required).
+        {
+            JOptionPane.showMessageDialog(frame, "File does not exist '" + file.getAbsolutePath() + "'");
+        } else {
+
+            if (!invokeDesktopFunction("browse", URI.class, file.toURI())) {
+                String extension = getFileNameExtension(file.getName());
+                JOptionPane.showMessageDialog(frame, "Cannot browse file. Do you have an application assocated with '" + extension + "' files?");
+            }
+        }
+    }
+
+    /**
+     * This is called when we should edit the specified file. Open it in the current IDE or some external editor.
+     */
+    public void editFile(File file, int line) {
+        editFileInExternalApplication(file, true);
+    }
+
+    /**
+     * This edits the application using java.awt.Desktop. Since we're compiling with 1.5 and this is a 1.6 feature, this is done using reflection making this much uglier than it needs to be.
+     *
+     * @param file the file to edit
+     * @param attemptToOpen true if we should attempt to just open the file is editing it fails. Often, file associations don't distinguish edit from open and open is the default.
+     */
+    public void editFileInExternalApplication(File file, boolean attemptToOpen) {
+        if (!file.exists())  //the file might not exist. This happens if its just using the default settings (no file is required).
+        {
+            JOptionPane.showMessageDialog(frame, "File does not exist '" + file.getAbsolutePath() + "'");
+        } else {
+            if (!invokeDesktopFunction("edit", File.class, file)) {
+                openFileInExternalApplication(file);
+            }
+        }
+    }
+
+    public void openFileInExternalApplication(File file) {
+
+        if (!file.exists())  //the file might not exist. This happens if its just using the default settings (no file is required).
+        {
+            JOptionPane.showMessageDialog(frame, "File does not exist '" + file.getAbsolutePath() + "'");
+        } else {
+            if (!invokeDesktopFunction("open", File.class, file)) {
+                String extension = getFileNameExtension(file.getName());
+                JOptionPane.showMessageDialog(frame, "Cannot open file. Do you have an application assocated with '" + extension + "' files?");
+            }
+        }
+    }
+
+    /**
+     * This invokes one of the java.awt.Desktop functions. Since we're compiling with 1.5 and this is a 1.6 feature, this is done using reflection making this much uglier than it needs to be. This is
+     * for calling one of the 'edit', 'browse', 'open' or even 'mail' functions that always take a single argument.
+     *
+     * @param name the function to invoke
+     * @param argumentClass the class of the argument of the above function.
+     * @param argument the argument itself.
+     * @return true if it worked, false if not. It might fail if the platform doesn't support editing/opening the file passed in, for example.
+     */
+    public boolean invokeDesktopFunction(String name, Class argumentClass, Object argument) {
+        try {
+            Class<?> desktopClass = Class.forName("java.awt.Desktop");
+            Method getDesktopMethod = desktopClass.getDeclaredMethod("getDesktop", (Class<?>[]) null);
+            Object desktopObject = getDesktopMethod.invoke(null, (Object[]) null);
+            if (desktopObject != null)   //may be null if this plaform doesn't support this.
+            {
+                Method method = desktopClass.getMethod(name, new Class[]{argumentClass});
+                method.invoke(desktopObject, argument);
+                return true;
+            }
+        } catch (Exception e) {
+            //ignore this. Just return false. This is relatively normal to get these and if you look at where this is called with 'edit', if it fails, we'll try again with open.
+        }
+        return false;
+    }
+
+    /**
+     * <!===== getFileNameExtension ===========================================> Returns the file extension preserving its case.
+     *
+     * <!      Name       Description>
+     *
+     * @param fileName the file name
+     * @return its extension.
+     * @author mhunsicker <!=======================================================================>
+     */
+    public static String getFileNameExtension(String fileName) {
+        String result = fileName;
+        int indexOfDot = fileName.lastIndexOf('.');
+        if (indexOfDot > 0) {
+            result = fileName.substring(indexOfDot + 1, result.length());
+        }
+
+        return result;
+    }
+
+    /**
+     * Determines if we can call editFiles. This is not a dynamic answer and should always return either true of false. If you want to change the answer, return true and then handle the files
+     * differently in editFiles.
+     *
+     * @return true if support editing files, false otherwise.
+     */
+    public boolean doesSupportEditingOpeningFiles() {
+        return doesSupportEditingFiles;
+    }
+
+    /**
+     * Determines if we support editing files. At the time of this writing, we were mooching off of java 1.6's ability to get the OS to do this. If we're running on 1.5, this will fail.
+     *
+     * @return true if we support it, false if not.
+     */
+    public boolean determineIfSupportsEditingFiles() {
+        try {
+            Class<?> desktopClass = Class.forName("java.awt.Desktop");
+            Method getDesktopMethod = desktopClass.getDeclaredMethod("isDesktopSupported", (Class<?>[]) null);
+            Object desktopObject = getDesktopMethod.invoke(null, (Object[]) null);
+            return (Boolean) desktopObject;
+        } catch (Exception e) {
+            return false;
+        }
+    }
+
+    private ExtensionFileFilter createFileFilter() {
+        return new ExtensionFileFilter(SETTINGS_EXTENSION, "Setting");
+    }
+
+    /**
+     * @return the file that we save our settings to.
+     */
+    private File getSettingsFile() {
+        return new File(System.getProperty("user.dir"), "gradle-app" + SETTINGS_EXTENSION);
+    }
+
+    private class SettingsImportInteraction implements DOM4JSerializer.ImportInteraction {
+        /**
+         * This is called when you should ask the user for a source file to read.
+         *
+         * @return a file to read or null to cancel.
+         */
+        public File promptForFile(FileFilter fileFilters) {
+            File settingsFile = getSettingsFile();
+            if (!settingsFile.exists())  //if its not present (first time we've run on this machine), just cancel the read.
+            {
+                return null;
+            }
+            return settingsFile;
+        }
+
+        /**
+         * Report an error that occurred. The read failed.
+         *
+         * @param error the error message.
+         */
+        public void reportError(String error) {
+            JOptionPane.showMessageDialog(frame, "Failed to read settings: " + error);
+        }
+    }
+
+    /**
+     * This interaction is for saving our settings. As such, its not all that interactive unless errors occur.
+     */
+    private class SettingsExportInteraction implements DOM4JSerializer.ExportInteraction {
+        /**
+         * This is called when you should ask the user for a destination file of a save.
+         *
+         * @return a file to save to or null to cancel.
+         */
+        public File promptForFile(FileFilter fileFilters) {
+            return getSettingsFile();
+        }
+
+        /**
+         * The file already exists. Confirm whether or not you want to overwrite it.
+         *
+         * @param file the file in question
+         * @return true to overwrite it, false not to.
+         */
+        public boolean confirmOverwritingExisingFile(File file) {
+            return true;   //It's most likely going to exist. Always overwrite it.
+        }
+
+        /**
+         * Report an error that occurred. The save failed.
+         *
+         * @param error the error message.
+         */
+        public void reportError(String error) {
+            JOptionPane.showMessageDialog(frame, "Failed to save settings: " + error);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java
new file mode 100644
index 0000000..f31fdc6
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/gradleplugin/userinterface/swing/standalone/BlockingApplication.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.gradleplugin.userinterface.swing.standalone;
+
+import org.gradle.util.UncheckedException;
+
+import javax.swing.*;
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * This is the same as Application, but this version blocks the calling thread until the Application shuts down.
+ *
+ * @author mhunsicker
+ */
+public class BlockingApplication {
+
+    /**
+     * This launches this application and blocks until it closes. Useful for being called from the gradle command line. We launch this in the Event Dispatch Thread and block the calling thread.
+     */
+    public static void launchAndBlock() {
+        if (SwingUtilities.isEventDispatchThread()) {
+            throw new RuntimeException("Cannot launch and block from the Event Dispatch Thread!");
+        }
+
+        //create a lock to wait on
+        final WaitingLock waitingLock = new WaitingLock();
+
+        //instantiate the app in the Event Dispatch Thread
+        try {
+            SwingUtilities.invokeAndWait(new Runnable() {
+                public void run() {
+                    new Application(new Application.LifecycleListener() {
+                        /**
+                         Notification that the application has started successfully. This is
+                         fired within the same thread that instantiates us.
+                         */
+                        public void hasStarted() {  //only lock if we start
+                            waitingLock.lock();
+                        }
+
+                        /**
+                         Notification that the application has shut down. This is fired from the
+                         Event Dispatch Thread.
+                         */
+                        public void hasShutDown() {  //when we shutdown we'll unlock
+                            waitingLock.unlock();
+                        }
+                    });
+                }
+            });
+        } catch (InterruptedException e) {
+            throw UncheckedException.asUncheckedException(e);
+        } catch (InvocationTargetException e) {
+            throw UncheckedException.asUncheckedException(e.getCause());
+        }
+
+        //the calling thread will now block until the caller is complete.
+        waitingLock.waitOnLock();
+    }
+
+    /**
+     * Lock so the calling thread can wait on the Application to exit.
+     */
+    private static class WaitingLock {
+        private boolean isLocked;
+
+        public synchronized void lock() {
+            isLocked = true;
+
+            //Notify status has changed.
+            notifyAll();
+        }
+
+        public synchronized void unlock() {
+            isLocked = false;
+
+            //Notify status has changed.
+            notifyAll();
+        }
+
+        public synchronized void waitOnLock() {
+            //Wait only if we're locked
+            while (isLocked) {
+                try {
+                    wait();
+                } catch (InterruptedException e) {
+                    throw new UncheckedException(e);
+                }
+            }
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/RunnerWrapperFactory.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/RunnerWrapperFactory.java
new file mode 100644
index 0000000..4b3f730
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/RunnerWrapperFactory.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers;
+
+import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1;
+import org.gradle.openapi.external.runner.GradleRunnerVersion1;
+import org.gradle.openapi.wrappers.runner.GradleRunnerWrapper;
+
+import java.io.File;
+
+/**
+ * This factory instantiates GradleRunnerWrappers by an external process. It is meant to be called via the Open API GradleRunnerFactory class using reflection. This is because it is called
+ * dynamically. It is also meant to help shield a Gradle user from changes to different versions of the GradleRunner. It does so by using wrappers that can dynamically choose what/how to implement.
+ * The wrappers usually use the latest, however, some of the functionality requires a matching Open API jar (which will be included with the external process trying to use this). If the matching
+ * functionality is not found (a NoClassDefFoundError is thrown), it will fall back to earlier versions.
+ *
+ * This class should not be moved or renamed, nor should its functions be renamed or have arguments added to/removed from them. This is to ensure forward/backward compatibility with multiple versions
+ * of IDE plugins. Instead, consider changing the interaction that is passed to the functions as a means of having the caller provide different functionality.
+ *
+ * @author mhunsicker
+ */
+public class RunnerWrapperFactory {
+
+    /*
+      Call this to instantiate an object that you can use to execute gradle
+      commands directly.
+
+      Note: this function is meant to be backward and forward compatible. So
+      this signature should not change at all, however, it may take and return
+      objects that implement ADDITIONAL interfaces. That is, it will always
+      return a GradleRunnerVersion1, but it may also be an object that implements
+      GradleRunnerVersion2 (notice the 2). The caller will need to dynamically
+      determine that. The GradleRunnerInteractionVersion1 may take an object
+      that also implements GradleRunnerInteractionVersion2. If so, we'll
+      dynamically determine that and handle it. Of course, this all depends on
+      what happens in the future.
+
+      @param  gradleHomeDirectory  the root directory of a gradle installation
+      @param  interaction          this is how we interact with the caller.
+      @param  showDebugInfo        true to show some additional information that
+                                   may be helpful diagnosing problems is this
+                                   fails
+      @return a gradle runner
+      @author mhunsicker
+   */
+    public static GradleRunnerVersion1 createGradleRunner(File gradleHomeDirectory, GradleRunnerInteractionVersion1 interaction, boolean showDebugInfo) throws Exception {
+        return new GradleRunnerWrapper(gradleHomeDirectory, interaction);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/UIWrapperFactory.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/UIWrapperFactory.java
new file mode 100644
index 0000000..abdfaa2
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/UIWrapperFactory.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers;
+
+import org.gradle.openapi.external.ui.DualPaneUIInteractionVersion1;
+import org.gradle.openapi.external.ui.DualPaneUIVersion1;
+import org.gradle.openapi.external.ui.SinglePaneUIInteractionVersion1;
+import org.gradle.openapi.external.ui.SinglePaneUIVersion1;
+import org.gradle.openapi.wrappers.ui.DualPaneUIWrapper;
+import org.gradle.openapi.wrappers.ui.SinglePaneUIWrapper;
+
+/**
+ * This factory instantiates Gradle UIs used in IDE plugins. It is meant to be called via the Open API UIFactory class using reflection. This is because it is called dynamically. It is also meant to
+ * help shield a Gradle user from changes to different versions of UI. It does so by using wrappers that can dynamically choose what/how to implement. The wrappers usually use the latest, however,
+ * some of the functionality requires a matching Open API jar (which will be included with the plugin trying to use this). If the matching functionality is not found (a NoClassDefFoundError is
+ * thrown), it will fall back to earlier versions.
+ *
+ * This class should not be moved or renamed, nor should its functions be renamed or have arguments added to/removed from them. This is to ensure forward/backward compatibility with multiple versions
+ * of IDE plugins. Instead, consider changing the interaction that is passed to the functions as a means of having the caller provide different functionality.
+ *
+ * @author mhunsicker
+ */
+public class UIWrapperFactory {
+
+    /**
+     * Creates a single-pane Gradle UI. The main UI and output panes are self-contained.
+     *
+     * @param interaction this is how we interact with the caller.
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     * @return a single pane UI.
+     */
+    public static SinglePaneUIVersion1 createSinglePaneUI(final SinglePaneUIInteractionVersion1 interaction, boolean showDebugInfo) throws Exception {
+        return new SinglePaneUIWrapper(interaction);
+    }
+
+    /**
+     * Creates a dual-pane Gradle UI, consisting of a main panel (containing task tree, favorites, etc) and a separate panel containing the output.
+     *
+     * @param interaction this is how we interact with the caller.
+     * @param showDebugInfo true to show some additional information that may be helpful diagnosing problems is this fails
+     * @return a dual pane UI.
+     */
+    public static DualPaneUIVersion1 createDualPaneUI(final DualPaneUIInteractionVersion1 interaction, boolean showDebugInfo) throws Exception {
+        return new DualPaneUIWrapper(interaction);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion1.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion1.java
new file mode 100644
index 0000000..02e5cfd
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion1.java
@@ -0,0 +1,151 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.openapi.external.foundation.GradleInterfaceVersion1;
+import org.gradle.openapi.external.foundation.ProjectVersion1;
+import org.gradle.openapi.external.foundation.RequestObserverVersion1;
+import org.gradle.openapi.external.ui.CommandLineArgumentAlteringListenerVersion1;
+import org.gradle.openapi.wrappers.ui.CommandLineArgumentAlteringListenerWrapper;
+import org.gradle.util.GradleVersion;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Implementation of GradleInterfaceVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class GradleInterfaceWrapperVersion1 implements GradleInterfaceVersion1 {
+
+    protected GradlePluginLord gradlePluginLord;
+    private Map<CommandLineArgumentAlteringListenerVersion1, CommandLineArgumentAlteringListenerWrapper> commandLineListenerMap
+            = new HashMap<CommandLineArgumentAlteringListenerVersion1, CommandLineArgumentAlteringListenerWrapper>();
+    private Map<RequestObserverVersion1, RequestObserverWrapper> requestObserverMap = new HashMap<RequestObserverVersion1, RequestObserverWrapper>();
+
+    public GradleInterfaceWrapperVersion1(GradlePluginLord gradlePluginLord) {
+        this.gradlePluginLord = gradlePluginLord;
+    }
+
+    /**
+     * @return the version of gradle being run. This is basically the version from the jar file.
+     */
+    public String getVersion() {
+        return new GradleVersion().getVersion();
+    }
+
+    /**
+     * @return the root projects wrapped in a ProjectWrapper
+     */
+    public List<ProjectVersion1> getRootProjects() {
+
+        return ProjectWrapper.convertProjects(gradlePluginLord.getProjects());
+    }
+
+    /**
+     * Determines if commands are currently being executed or not. Refreshing tasks is not considered busy.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy() {
+        return gradlePluginLord.isBusy();
+    }
+
+    public void refreshTaskTree() {
+        gradlePluginLord.addRefreshRequestToQueue();
+    }
+
+    public void executeCommand(String commandLineArguments, String displayName) {
+        gradlePluginLord.addExecutionRequestToQueue(commandLineArguments, displayName);
+    }
+
+    public File getCurrentDirectory() {
+        return gradlePluginLord.getCurrentDirectory();
+    }
+
+    public void setCurrentDirectory(File currentDirectory) {
+        gradlePluginLord.setCurrentDirectory(currentDirectory);
+    }
+
+    public File getGradleHomeDirectory() {
+        return gradlePluginLord.getGradleHomeDirectory();
+    }
+
+    public File getCustomGradleExecutable() {
+        return gradlePluginLord.getCustomGradleExecutor();
+    }
+
+    /**
+     * Sets a custom gradle executable. See getCustomGradleExecutable
+     *
+     * @param customGradleExecutor the path to an executable (or script/batch file)
+     */
+    public void setCustomGradleExecutable(File customGradleExecutor) {
+        gradlePluginLord.setCustomGradleExecutor(customGradleExecutor);
+    }
+
+    /**
+     * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for
+     * example, an init script.
+     *
+     * @param listener the listener that modifies the command line arguments.
+     */
+    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
+        CommandLineArgumentAlteringListenerWrapper wrapper = new CommandLineArgumentAlteringListenerWrapper(listener);
+
+        //we have to store our wrapper so you can call remove the listener using your passed-in object
+        commandLineListenerMap.put(listener, wrapper);
+
+        gradlePluginLord.addCommandLineArgumentAlteringListener(wrapper);
+    }
+
+    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
+        CommandLineArgumentAlteringListenerWrapper wrapper = commandLineListenerMap.remove(listener);
+        if (wrapper != null) {
+            gradlePluginLord.removeCommandLineArgumentAlteringListener(wrapper);
+        }
+    }
+
+    /**
+     * Adds an observer that is notified when Gradle commands are executed and completed.
+     *
+     * @param observer the observer that is notified
+     */
+    public void addRequestObserver(RequestObserverVersion1 observer) {
+        RequestObserverWrapper wrapper = new RequestObserverWrapper(observer);
+
+        //we have to store our wrapper so you can call remove the listener using your passed-in object
+        requestObserverMap.put(observer, wrapper);
+
+        gradlePluginLord.addRequestObserver(wrapper, false);
+    }
+
+    /**
+     * Removes a request observer when you no longer wish to receive notifications about Gradle command being executed.
+     *
+     * @param observer the observer to remove
+     */
+    public void removeRequestObserver(RequestObserverVersion1 observer) {
+        RequestObserverWrapper wrapper = requestObserverMap.remove(observer);
+        if (wrapper != null) {
+            gradlePluginLord.removeRequestObserver(wrapper);
+        }
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion2.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion2.java
new file mode 100644
index 0000000..aaee959
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/GradleInterfaceWrapperVersion2.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.openapi.external.foundation.GradleInterfaceVersion2;
+import org.gradle.openapi.external.foundation.RequestVersion1;
+import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
+import org.gradle.openapi.wrappers.foundation.favorites.FavoriteTaskWrapper;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Implementation of GradleInterfaceVersion2 meant to help shield external users from internal changes. This adds new functionality to GradleInterfaceWrapperVersion1.
+ *
+ * @author mhunsicker
+ */
+public class GradleInterfaceWrapperVersion2 extends GradleInterfaceWrapperVersion1 implements GradleInterfaceVersion2 {
+
+    public GradleInterfaceWrapperVersion2(GradlePluginLord gradlePluginLord) {
+        super(gradlePluginLord);
+    }
+
+    private RequestVersion1 wrapRequest(Request request) {
+        if (request == null) {
+            return null;
+        }
+
+        return new RequestWrapper(request);
+    }
+
+    public RequestVersion1 refreshTaskTree2() {
+        return wrapRequest(gradlePluginLord.addRefreshRequestToQueue());
+    }
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     *
+     * @param additionalCommandLineArguments additional command line arguments to be passed to gradle when refreshing the task tree.
+     */
+    public RequestVersion1 refreshTaskTree2(String additionalCommandLineArguments) {
+        return wrapRequest(gradlePluginLord.addRefreshRequestToQueue(additionalCommandLineArguments));
+    }
+
+    public RequestVersion1 executeCommand2(String commandLineArguments, String displayName) {
+        return wrapRequest(gradlePluginLord.addExecutionRequestToQueue(commandLineArguments, displayName));
+    }
+
+    /**
+     * Executes several favorites commands at once as a single command. This has the affect of simply concatenating all the favorite command lines into a single line.
+     *
+     * @param favorites a list of favorites. If just one favorite, it executes it normally. If multiple favorites, it executes them all at once as a single command.
+     */
+    public RequestVersion1 executeFavorites(List<FavoriteTaskVersion1> favorites) {
+        List<FavoriteTask> tasks = new ArrayList<FavoriteTask>();
+
+        Iterator<FavoriteTaskVersion1> iterator = favorites.iterator();
+        while (iterator.hasNext()) {
+            FavoriteTaskVersion1 favoriteTaskVersion1 = iterator.next();
+            FavoriteTaskWrapper wrapper = (FavoriteTaskWrapper) favoriteTaskVersion1;
+            tasks.add(wrapper.getFavoriteTask());
+        }
+
+        return wrapRequest(gradlePluginLord.addExecutionRequestToQueue(tasks));
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/ProjectWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/ProjectWrapper.java
new file mode 100644
index 0000000..080e84a
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/ProjectWrapper.java
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation;
+
+import org.gradle.foundation.ProjectView;
+import org.gradle.foundation.TaskView;
+import org.gradle.openapi.external.foundation.ProjectVersion1;
+import org.gradle.openapi.external.foundation.TaskVersion1;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Implementation of ProjectVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class ProjectWrapper implements ProjectVersion1 {
+
+    private ProjectView projectView;
+
+    public ProjectWrapper(ProjectView projectView) {
+        this.projectView = projectView;
+    }
+
+    public String getName() {
+        return projectView.getName();
+    }
+
+    public File getFile() {
+        return projectView.getBuildFile();
+    }
+
+    public List<TaskVersion1> getTasks() {
+        return TaskWrapper.convertTasks(projectView.getTasks());
+    }
+
+    public List<ProjectVersion1> getSubProjects() {
+        return convertProjects(projectView.getSubProjects());
+    }
+
+    public ProjectVersion1 getParentProject() {
+        return new ProjectWrapper(projectView.getParentProject());
+    }
+
+    public List<ProjectVersion1> getDependantProjects() {
+        return convertProjects(projectView.getDependsOnProjects());
+    }
+
+    public ProjectVersion1 getSubProject(String name) {
+        ProjectView subProject = projectView.getSubProject(name);
+        if (subProject == null) {
+            return null;
+        }
+
+        return new ProjectWrapper(subProject);
+    }
+
+    public String getFullProjectName() {
+        return projectView.getFullProjectName();
+    }
+
+    public ProjectVersion1 getSubProjectFromFullPath(String fullProjectName) {
+        ProjectView projectFromFullPath = projectView.getSubProjectFromFullPath(fullProjectName);
+        if (projectFromFullPath == null) {
+            return null;
+        }
+        return new ProjectWrapper(projectFromFullPath);
+    }
+
+    public TaskVersion1 getTask(String name) {
+        TaskView taskView = projectView.getTask(name);
+        if (taskView == null) {
+            return null;
+        }
+        return new TaskWrapper(taskView);
+    }
+
+    /**
+     * Builds a list of default tasks. These are defined by specifying
+     *
+     * defaultTasks 'task name'
+     *
+     * in the gradle file. There can be multiple default tasks. This only returns default tasks directly for this project and does not return them for subprojects.
+     *
+     * @return a list of default tasks or an empty list if none exist
+     */
+    public List<TaskVersion1> getDefaultTasks() {
+        return TaskWrapper.convertTasks(projectView.getDefaultTasks());
+    }
+
+    public TaskVersion1 getTaskFromFullPath(String fullTaskName) {
+        TaskView taskView = projectView.getTaskFromFullPath(fullTaskName);
+        if (taskView == null) {
+            return null;
+        }
+
+        return new TaskWrapper(taskView);
+    }
+
+    /**
+     * Converts the list of ProjectView objects to ProjectVersion1 objects. It just wraps them.
+     *
+     * @param projectViewList the source projects
+     * @return the projects wrapped in ProjectWrappers.
+     */
+    public static List<ProjectVersion1> convertProjects(List<ProjectView> projectViewList) {
+        List<ProjectVersion1> returnProjects = new ArrayList<ProjectVersion1>();
+        if (projectViewList != null) {
+            Iterator<ProjectView> projectViewIterator = projectViewList.iterator();
+            while (projectViewIterator.hasNext()) {
+                ProjectView projectView = projectViewIterator.next();
+                returnProjects.add(new ProjectWrapper(projectView));
+            }
+        }
+
+        return returnProjects;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof ProjectWrapper)) {
+            return false;
+        }
+
+        ProjectWrapper otherProjectWrapper = (ProjectWrapper) obj;
+        return otherProjectWrapper.projectView.equals(projectView);
+    }
+
+    @Override
+    public int hashCode() {
+        return projectView.hashCode();
+    }
+
+    @Override
+    public String toString() {
+        return projectView.toString();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestObserverWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestObserverWrapper.java
new file mode 100644
index 0000000..0bb15e2
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestObserverWrapper.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.openapi.external.foundation.RequestObserverVersion1;
+
+/**
+ * * Implementation of RequestObserverVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class RequestObserverWrapper implements GradlePluginLord.RequestObserver {
+
+    private RequestObserverVersion1 requestObserver;
+
+    public RequestObserverWrapper(RequestObserverVersion1 requestObserver) {
+        this.requestObserver = requestObserver;
+    }
+
+    public void executionRequestAdded(ExecutionRequest request) {
+        requestObserver.executionRequestAdded(new RequestWrapper(request));
+    }
+
+    public void refreshRequestAdded(RefreshTaskListRequest request) {
+        requestObserver.refreshRequestAdded(new RequestWrapper(request));
+    }
+
+    /**
+     * Notification that a command is about to be executed. This is mostly useful for IDE's that may need to save their files.
+     */
+    public void aboutToExecuteRequest(Request request) {
+        requestObserver.aboutToExecuteRequest(new RequestWrapper(request));
+    }
+
+    /**
+     * Notification that the command has completed execution.
+     *
+     * @param request the original request containing the command that was executed
+     * @param result the result of the command
+     * @param output the output from gradle executing the command
+     */
+    public void requestExecutionComplete(Request request, int result, String output) {
+        requestObserver.requestExecutionComplete(new RequestWrapper(request), result, output);
+    }
+
+    @Override
+    public int hashCode() {
+        return requestObserver.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object otherObject) {
+        if (!(otherObject instanceof RequestObserverWrapper)) {
+            return false;
+        }
+
+        return ((RequestObserverWrapper) otherObject).requestObserver.equals(requestObserver);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestWrapper.java
new file mode 100644
index 0000000..561802f
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/RequestWrapper.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation;
+
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.openapi.external.foundation.RequestVersion1;
+
+/**
+ * Implementation of RequestVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class RequestWrapper implements RequestVersion1 {
+    private Request request;
+
+    public RequestWrapper(Request request) {
+        this.request = request;
+    }
+
+    /**
+     * @return the full gradle command line of this request
+     */
+    public String getFullCommandLine() {
+        return request.getFullCommandLine();
+    }
+
+    /**
+     * @return the display name of this request. Often this is the same as the full command line, but favorites may specify something more user-friendly.
+     */
+    public String getDisplayName() {
+        return request.getDisplayName();
+    }
+
+    /**
+     * @return whether or not output should always be shown. If false, only show it when errors occur.
+     */
+    public boolean forceOutputToBeShown() {
+        return request.forceOutputToBeShown();
+    }
+
+    /**
+     * Cancels this request.
+     */
+    public boolean cancel() {
+        return request.cancel();
+    }
+
+    @Override
+    public int hashCode() {
+        return request.hashCode();
+    }
+
+    @Override
+    public boolean equals(Object otherObject) {
+        if (!(otherObject instanceof RequestWrapper)) {
+            return false;
+        }
+
+        return ((RequestWrapper) otherObject).request.equals(request);
+    }
+
+    /**
+     * @return the type of the request. Either EXECUTION or REFRESH
+     */
+    public String getType() {
+        if (request.getType() == ExecutionRequest.TYPE) {
+            return EXECUTION_TYPE;
+        }
+
+        if (request.getType() == RefreshTaskListRequest.TYPE) {
+            return REFRESH_TYPE;
+        }
+
+        return UNKNOWN_TYPE_PREFIX + request.getType();
+    }
+
+    @Override
+    public String toString() {
+        return request.toString();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/TaskWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/TaskWrapper.java
new file mode 100644
index 0000000..c68ca1c
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/TaskWrapper.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation;
+
+import org.gradle.foundation.TaskView;
+import org.gradle.openapi.external.foundation.ProjectVersion1;
+import org.gradle.openapi.external.foundation.TaskVersion1;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Implementation of TaskVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class TaskWrapper implements TaskVersion1 {
+
+    private TaskView taskView;
+
+    public TaskWrapper(TaskView taskView) {
+        this.taskView = taskView;
+    }
+
+    public String getName() {
+        return taskView.getName();
+    }
+
+    public String getDescription() {
+        return taskView.getDescription();
+    }
+
+    public boolean isDefault() {
+        return taskView.isDefault();
+    }
+
+    public String getFullTaskName() {
+        return taskView.getFullTaskName();
+    }
+
+    public ProjectVersion1 getProject() {
+        return new ProjectWrapper(taskView.getProject());
+    }
+
+    /**
+     * Converts the list of TaskView objects to TaskVersion1 objects. It just wraps them.
+     *
+     * @param taskViewList the source tasks
+     * @return the tasks wrapped in TaskWrappers.
+     */
+    public static List<TaskVersion1> convertTasks(List<TaskView> taskViewList) {
+        List<TaskVersion1> returnTasks = new ArrayList<TaskVersion1>();
+        Iterator<TaskView> taskViewIterator = taskViewList.iterator();
+        while (taskViewIterator.hasNext()) {
+            TaskView taskView = taskViewIterator.next();
+            returnTasks.add(new TaskWrapper(taskView));
+        }
+
+        return returnTasks;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof TaskWrapper)) {
+            return false;
+        }
+
+        TaskWrapper otherTaskWrapper = (TaskWrapper) obj;
+        return otherTaskWrapper.taskView.equals(taskView);
+    }
+
+    @Override
+    public int hashCode() {
+        return taskView.hashCode();
+    }
+
+    @Override
+    public String toString() {
+        return taskView.toString();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoriteTaskWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoriteTaskWrapper.java
new file mode 100644
index 0000000..4c53ec7
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoriteTaskWrapper.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation.favorites;
+
+import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
+import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
+
+/**
+ * Implementation of FavoriteTaskVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class FavoriteTaskWrapper implements FavoriteTaskVersion1 {
+
+    private FavoriteTask favoriteTask;
+
+    public FavoriteTaskWrapper(FavoriteTask favoriteTask) {
+        this.favoriteTask = favoriteTask;
+    }
+
+    @Override
+    public boolean equals(Object otherObject) {
+        if (!(otherObject instanceof FavoriteTaskWrapper)) {
+            return false;
+        }
+
+        FavoriteTaskWrapper otherFavoritesTask = (FavoriteTaskWrapper) otherObject;
+        return otherFavoritesTask.favoriteTask.equals(favoriteTask);
+    }
+
+    public String getFullCommandLine() {
+        return favoriteTask.getFullCommandLine();
+    }
+
+    public String getDisplayName() {
+        return favoriteTask.getDisplayName();
+    }
+
+    public boolean alwaysShowOutput() {
+        return favoriteTask.alwaysShowOutput();
+    }
+
+    //Only to be used internally to get the favorite task this represents
+    public FavoriteTask getFavoriteTask() {
+        return favoriteTask;
+    }
+
+    @Override
+    public int hashCode() {
+        return favoriteTask.hashCode();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoritesEditorWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoritesEditorWrapper.java
new file mode 100644
index 0000000..a50cfc6
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/foundation/favorites/FavoritesEditorWrapper.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.foundation.favorites;
+
+import org.gradle.gradleplugin.foundation.favorites.FavoriteTask;
+import org.gradle.gradleplugin.foundation.favorites.FavoritesEditor;
+import org.gradle.gradleplugin.userinterface.swing.generic.SwingEditFavoriteInteraction;
+import org.gradle.openapi.external.foundation.TaskVersion1;
+import org.gradle.openapi.external.foundation.favorites.FavoriteTaskVersion1;
+import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1;
+
+import java.awt.*;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Implementation of FavoritesEditorVersion1 meant to help shield external users from internal changes.
+ *
+ * @author mhunsicker
+ */
+public class FavoritesEditorWrapper implements FavoritesEditorVersion1 {
+    private FavoritesEditor favoritesEditor;
+
+    public FavoritesEditorWrapper(FavoritesEditor favoritesEditor) {
+        this.favoritesEditor = favoritesEditor;
+    }
+
+    public FavoriteTaskVersion1 addFavorite(String fullCommandLine, String displayName, boolean alwaysShowOutput) {
+        return convertFavoriteTask(favoritesEditor.addFavorite(fullCommandLine, displayName, alwaysShowOutput));
+    }
+
+    public String editFavorite(FavoriteTaskVersion1 favoriteTaskVersion1, final String newFullCommandLine, final String newDisplayName, final boolean newAlwaysShowOutput) {
+        final StringHolder stringHolder = new StringHolder();
+        FavoriteTask favoriteTask = getFavoriteTask(favoriteTaskVersion1);
+        favoritesEditor.editFavorite(favoriteTask, new FavoritesEditor.EditFavoriteInteraction() {
+            public boolean editFavorite(FavoritesEditor.EditibleFavoriteTask favoriteTask) {
+                favoriteTask.fullCommandLine = newFullCommandLine;
+                favoriteTask.displayName = newDisplayName;
+                favoriteTask.alwaysShowOutput = newAlwaysShowOutput;
+                return true;
+            }
+
+            public void reportError(String error) {
+                stringHolder.string = error;
+            }
+        });
+
+        return stringHolder.string;
+    }
+
+    //
+    private class StringHolder {
+        private String string;
+    }
+
+    private FavoriteTaskVersion1 convertFavoriteTask(FavoriteTask favoriteTask) {
+        if (favoriteTask == null) {
+            return null;
+        }
+
+        return new FavoriteTaskWrapper(favoriteTask);
+    }
+
+    public List<FavoriteTaskVersion1> getFavoriteTasks() {
+        List<FavoriteTaskVersion1> returnedTasks = new ArrayList<FavoriteTaskVersion1>();
+        Iterator<FavoriteTask> taskIterator = favoritesEditor.getFavoriteTasks().iterator();
+        while (taskIterator.hasNext()) {
+            FavoriteTask favoriteTask = taskIterator.next();
+            returnedTasks.add(new FavoriteTaskWrapper(favoriteTask));
+        }
+        return returnedTasks;
+    }
+
+    public FavoriteTaskVersion1 getFavorite(String fullCommandLine) {
+        return convertFavoriteTask(favoritesEditor.getFavorite(fullCommandLine));
+    }
+
+    public FavoriteTaskVersion1 getFavoriteByDisplayName(String displayName) {
+        return convertFavoriteTask(favoritesEditor.getFavoriteByDisplayName(displayName));
+    }
+
+    public FavoriteTaskVersion1 getFavorite(TaskVersion1 task) {
+        return convertFavoriteTask(favoritesEditor.getFavorite(task.getFullTaskName()));
+    }
+
+    public FavoriteTaskVersion1 promptUserToAddFavorite(Window parent) {
+        FavoriteTask favoriteTask = favoritesEditor.addFavorite(new SwingEditFavoriteInteraction(parent, "Add Favorite", true));
+        return convertFavoriteTask(favoriteTask);
+    }
+
+    public boolean promptUserToEditFavorite(Window parent, FavoriteTaskVersion1 favorite) {
+        FavoriteTask favoriteTask = getFavoriteTask(favorite);
+        return favoritesEditor.editFavorite(favoriteTask, new SwingEditFavoriteInteraction(parent, "Edit Favorite", true));
+    }
+
+    public void removeFavorites(List<FavoriteTaskVersion1> favoritesToRemove) {
+        List<FavoriteTask> favoriteTasksToRemove = new ArrayList<FavoriteTask>();
+
+        Iterator<FavoriteTaskVersion1> iterator = favoritesToRemove.iterator();
+        while (iterator.hasNext()) {
+            FavoriteTaskVersion1 favoriteTaskVersion1 = iterator.next();
+            favoriteTasksToRemove.add(getFavoriteTask(favoriteTaskVersion1));
+        }
+
+        favoritesEditor.removeFavorites(favoriteTasksToRemove);
+    }
+
+    //gets the favorite task out of a FavoriteTaskVersion1.
+    private FavoriteTask getFavoriteTask(FavoriteTaskVersion1 favoriteTaskVersion1) {
+        return ((FavoriteTaskWrapper) favoriteTaskVersion1).getFavoriteTask();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerInteractionWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerInteractionWrapper.java
new file mode 100644
index 0000000..2c61d76
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerInteractionWrapper.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.runner;
+
+import org.gradle.StartParameter;
+import org.gradle.api.logging.LogLevel;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1;
+
+import java.io.File;
+
+/**
+ * Wrapper to shield version changes in GradleRunnerInteractionVersion1 from an external user of gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class GradleRunnerInteractionWrapper implements ExecuteGradleCommandServerProtocol.ExecutionInteraction {
+    private GradleRunnerInteractionVersion1 interactionVersion1;
+
+    public GradleRunnerInteractionWrapper(GradleRunnerInteractionVersion1 interactionVersion1) {
+        this.interactionVersion1 = interactionVersion1;
+    }
+
+    /**
+     * @return the log level. This determines the detail level of information reported via reportLiveOutput and reportExecutionFinished.
+     */
+    public LogLevel getLogLevel() {
+        GradleRunnerInteractionVersion1.LogLevel logLevel = interactionVersion1.getLogLevel();
+        switch (logLevel) {
+            case Quiet:
+                return LogLevel.QUIET;
+            case Lifecycle:
+                return LogLevel.LIFECYCLE;
+            case Debug:
+                return LogLevel.DEBUG;
+        }
+
+        return LogLevel.LIFECYCLE;
+    }
+
+    /**
+     * @return the stack trace level. This determines the detail level of any stack traces should an exception occur.
+     */
+    public StartParameter.ShowStacktrace getStackTraceLevel() {
+        GradleRunnerInteractionVersion1.StackTraceLevel stackTraceLevel = interactionVersion1.getStackTraceLevel();
+        switch (stackTraceLevel) {
+            case InternalExceptions:
+                return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
+            case Always:
+                return StartParameter.ShowStacktrace.ALWAYS;
+            case AlwaysFull:
+                return StartParameter.ShowStacktrace.ALWAYS_FULL;
+        }
+
+        return StartParameter.ShowStacktrace.INTERNAL_EXCEPTIONS;
+    }
+
+    /**
+     * Notification that overall execution has been started. This is only called once at the end.
+     */
+    public void reportExecutionStarted() {
+        this.interactionVersion1.reportExecutionStarted();
+    }
+
+    /**
+     * Notification of the total number of tasks that will be executed. This is called after reportExecutionStarted and before any tasks are executed.
+     *
+     * @param size the total number of tasks.
+     */
+    public void reportNumberOfTasksToExecute(int size) {
+        this.interactionVersion1.reportNumberOfTasksToExecute(size);
+    }
+
+    /**
+     * Notification that a single task has completed. Note: the task you kicked off probably executes other tasks and this notifies you of those tasks and provides completion progress.
+     *
+     * @param currentTaskName the task being executed
+     * @param percentComplete the percent complete of all the tasks that make up the task you requested.
+     */
+    public void reportTaskStarted(String currentTaskName, float percentComplete) {
+        this.interactionVersion1.reportTaskStarted(currentTaskName, percentComplete);
+    }
+
+    public void reportTaskComplete(String currentTaskName, float percentComplete) {
+        this.interactionVersion1.reportTaskComplete(currentTaskName, percentComplete);
+    }
+
+    /**
+     * Report real-time output from gradle and its subsystems (such as ant).
+     *
+     * @param output a single line of text to show.
+     */
+    public void reportLiveOutput(String output) {
+        this.interactionVersion1.reportLiveOutput(output);
+    }
+
+    public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+        this.interactionVersion1.reportExecutionFinished(wasSuccessful, message, throwable);
+    }
+
+    /*
+    * This is called to get a custom gradle executable file. If you don't run
+    * gradle.bat or gradle shell script to run gradle, use this to specify
+    * what you do run. Note: we're going to pass it the arguments that we would
+    * pass to gradle so if you don't like that, see alterCommandLineArguments.
+    * Normaly, this should return null.
+    * @return the Executable to run gradle command or null to use the default
+    */
+    public File getCustomGradleExecutable() {
+        return interactionVersion1.getCustomGradleExecutable();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerWrapper.java
new file mode 100644
index 0000000..866df99
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/runner/GradleRunnerWrapper.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.runner;
+
+import org.gradle.gradleplugin.foundation.runner.GradleRunner;
+import org.gradle.openapi.external.runner.GradleRunnerInteractionVersion1;
+import org.gradle.openapi.external.runner.GradleRunnerVersion1;
+
+import java.io.File;
+
+/**
+ * Wrapper to shield version changes in GradleRunner from an external user of gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class GradleRunnerWrapper implements GradleRunnerVersion1 {
+    private GradleRunner gradleRunner;
+    private File gradleHomeDirectory;
+    private File workingDirectory;
+    private GradleRunnerInteractionWrapper interactionWrapper;
+
+    public GradleRunnerWrapper(File gradleHomeDirectory, GradleRunnerInteractionVersion1 interactionVersion1) {
+        this.gradleHomeDirectory = gradleHomeDirectory;
+        this.workingDirectory = interactionVersion1.getWorkingDirectory();
+        interactionWrapper = new GradleRunnerInteractionWrapper(interactionVersion1);
+        File customGradleExecutable = interactionVersion1.getCustomGradleExecutable();
+
+        gradleRunner = new GradleRunner(workingDirectory, gradleHomeDirectory, customGradleExecutable);
+    }
+
+    public void executeCommand(String commandLine) {
+        gradleRunner.executeCommand(commandLine, interactionWrapper.getLogLevel(), interactionWrapper.getStackTraceLevel(), interactionWrapper);
+    }
+
+    /*
+       Call this to stop the gradle command. This is killing the process, not
+       gracefully exiting.
+    */
+
+    public void killProcess() {
+        gradleRunner.killProcess();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/AbstractOpenAPIUIWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/AbstractOpenAPIUIWrapper.java
new file mode 100644
index 0000000..ddc9c7c
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/AbstractOpenAPIUIWrapper.java
@@ -0,0 +1,324 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.gradleplugin.userinterface.swing.generic.BasicGradleUI;
+import org.gradle.openapi.external.foundation.GradleInterfaceVersion1;
+import org.gradle.openapi.external.foundation.favorites.FavoritesEditorVersion1;
+import org.gradle.openapi.external.ui.*;
+import org.gradle.openapi.wrappers.foundation.favorites.FavoritesEditorWrapper;
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Implementation of BasicGradleUI meant to help shield external users from internal changes. This also provides the basics for the UI regardless of whether the output is in a separate pane or not.
+ *
+ * @author mhunsicker
+ */
+public abstract class AbstractOpenAPIUIWrapper<U extends BasicGradleUI> {
+    private U basicGradleUI;
+    private Map<GradleTabVersion1, GradleTabVersionWrapper> tabMap = new HashMap<GradleTabVersion1, GradleTabVersionWrapper>();
+
+    protected SettingsNodeVersionWrapper settingsVersionWrapper;
+    protected AlternateUIInteractionVersionWrapper alternateUIInteractionVersionWrapper;
+    protected GradleInterfaceVersion1 gradleInterfaceWrapper;
+
+    private OutputUILordWrapper outputUILordWrapper;
+
+    public AbstractOpenAPIUIWrapper(SettingsNodeVersion1 settings, AlternateUIInteractionVersion1 alternateUIInteraction) {
+        settingsVersionWrapper = new SettingsNodeVersionWrapper(settings);
+        alternateUIInteractionVersionWrapper = new AlternateUIInteractionVersionWrapper(alternateUIInteraction, settingsVersionWrapper);
+    }
+
+    public void initialize(U basicGradleUI) {
+        this.basicGradleUI = basicGradleUI;
+        basicGradleUI.getGradlePluginLord().addRequestObserver(new GradlePluginLord.RequestObserver() {
+            /**
+             Notification that a command is about to be executed. This is mostly useful
+             for IDE's that may need to save their files.
+
+             @param request the request that's about to be executed
+             @author mhunsicker
+             */
+            public void aboutToExecuteRequest(Request request) {
+                alternateUIInteractionVersionWrapper.aboutToExecuteCommand(request.getFullCommandLine());
+            }
+
+            public void executionRequestAdded(ExecutionRequest request) {
+            }
+
+            public void refreshRequestAdded(RefreshTaskListRequest request) {
+            }
+
+            public void requestExecutionComplete(Request request, int result, String output) {
+            }
+        }, false);
+
+        outputUILordWrapper = new OutputUILordWrapper(basicGradleUI.getOutputUILord());
+        gradleInterfaceWrapper = instantiateGradleInterfaceWrapper();
+    }
+
+    /**
+     * This instantiates our GradleInterfaceVersion object. Additions have been made to it -- making new versions, so we have a choice of which one to load. We'll try to load the latest one first, if
+     * that fails, we'll fall back on older versions. The latest version would fail to load because it depends on classes that are part of the Open API project and it can't find those classes. It
+     * might not find them because this is loaded from the Open API and if its an older version, those classes won't exist.
+     *
+     * @return a version of GradleInterfaceVersionX
+     */
+    protected GradleInterfaceVersion1 instantiateGradleInterfaceWrapper() {
+        try {
+            //try to load the latest version. I'm explicitly using the full package name so any NoClassDefFoundErrors will only
+            //occur within this try/catch block.
+            return new org.gradle.openapi.wrappers.foundation.GradleInterfaceWrapperVersion2(basicGradleUI.getGradlePluginLord());
+        } catch (NoClassDefFoundError e) {  //if that's not found, fall back to version 1
+            return new org.gradle.openapi.wrappers.foundation.GradleInterfaceWrapperVersion1(basicGradleUI.getGradlePluginLord());
+        }
+    }
+
+    public U getGradleUI() {
+        return basicGradleUI;
+    }
+
+    /**
+     * Call this whenever you're about to show this panel. We'll do whatever initialization is necessary.
+     */
+    public void aboutToShow() {
+        basicGradleUI.aboutToShow();
+    }
+
+    /**
+     * Call this to deteremine if you can close this pane. if we're busy, we'll ask the user if they want to close.
+     *
+     * @param closeInteraction allows us to interact with the user
+     * @return true if we can close, false if not.
+     */
+    public boolean canClose(final BasicGradleUIVersion1.CloseInteraction closeInteraction) {
+        return basicGradleUI.canClose(new BasicGradleUI.CloseInteraction() {
+            public boolean promptUserToConfirmClosingWhileBusy() {
+                return closeInteraction.promptUserToConfirmClosingWhileBusy();
+            }
+        });
+    }
+
+    /**
+     * Call this before you close the pane. This gives it an opportunity to do cleanup. You probably should call canClose before this. It gives the app a chance to cancel if its busy.
+     */
+    public void close() {
+        basicGradleUI.close();
+    }
+
+    /**
+     * @return the root directory of your gradle project.
+     */
+    public File getCurrentDirectory() {
+        return gradleInterfaceWrapper.getCurrentDirectory();
+    }
+
+    /**
+     * @param currentDirectory the new root directory of your gradle project.
+     */
+    public void setCurrentDirectory(File currentDirectory) {
+        gradleInterfaceWrapper.setCurrentDirectory(currentDirectory);
+    }
+
+    /**
+     * @return the gradle home directory. Where gradle is installed.
+     */
+    public File getGradleHomeDirectory() {
+        return gradleInterfaceWrapper.getGradleHomeDirectory();
+    }
+
+    /**
+     * This is called to get a custom gradle executable file. If you don't run gradle.bat or gradle shell script to run gradle, use this to specify what you do run. Note: we're going to pass it the
+     * arguments that we would pass to gradle so if you don't like that, see alterCommandLineArguments. Normally, this should return null.
+     *
+     * @return the Executable to run gradle command or null to use the default
+     */
+    public File getCustomGradleExecutable() {
+        return gradleInterfaceWrapper.getCustomGradleExecutable();
+    }
+
+    /**
+     * Call this to add an additional tab to the gradle UI. You can call this at any time.
+     *
+     * @param index the index of where to add the tab.
+     * @param gradleTabVersion1 the tab to add.
+     */
+    public void addTab(int index, GradleTabVersion1 gradleTabVersion1) {
+        GradleTabVersionWrapper gradleVersionWrapper = new GradleTabVersionWrapper(gradleTabVersion1);
+
+        //we have to store our wrapper so you can call remove tab using your passed-in object
+        tabMap.put(gradleTabVersion1, gradleVersionWrapper);
+
+        basicGradleUI.addGradleTab(index, gradleVersionWrapper);
+    }
+
+    /**
+     * Call this to remove one of your own tabs from this.
+     *
+     * @param gradleTabVersion1 the tab to remove
+     */
+    public void removeTab(GradleTabVersion1 gradleTabVersion1) {
+        GradleTabVersionWrapper gradleTabVersionWrapper = tabMap.remove(gradleTabVersion1);
+        if (gradleTabVersionWrapper != null) {
+            basicGradleUI.removeGradleTab(gradleTabVersionWrapper);
+        }
+    }
+
+    public int getGradleTabCount() {
+        return basicGradleUI.getGradleTabCount();
+    }
+
+    /**
+     * @param index the index of the tab
+     * @return the name of the tab at the specified index.
+     */
+    public String getGradleTabName(int index) {
+        return basicGradleUI.getGradleTabName(index);
+    }
+
+    /**
+     * Returns the index of the gradle tab with the specified name.
+     *
+     * @param name the name of the tab
+     * @return the index of the tab or -1 if not found
+     */
+    public int getGradleTabIndex(String name) {
+        return basicGradleUI.getGradleTabIndex(name);
+    }
+
+    /**
+     * @return the currently selected tab
+     */
+    public int getCurrentGradleTab() {
+        return basicGradleUI.getCurrentGradleTab();
+    }
+
+    /**
+     * Makes the specified tab the current tab.
+     *
+     * @param index the index of the tab.
+     */
+    public void setCurrentGradleTab(int index) {
+        basicGradleUI.setCurrentGradleTab(index);
+    }
+
+    /**
+     * This allows you to add a listener that can add additional command line arguments whenever gradle is executed. This is useful if you've customized your gradle build and need to specify, for
+     * example, an init script.
+     *
+     * @param listener the listener that modifies the command line arguments.
+     */
+    public void addCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
+        gradleInterfaceWrapper.addCommandLineArgumentAlteringListener(listener);
+    }
+
+    public void removeCommandLineArgumentAlteringListener(CommandLineArgumentAlteringListenerVersion1 listener) {
+        gradleInterfaceWrapper.removeCommandLineArgumentAlteringListener(listener);
+    }
+
+    public OutputUILordVersion1 getOutputLord() {
+        return new OutputUILordWrapper(basicGradleUI.getOutputUILord());
+    }
+
+    public void addOutputObserver(OutputObserverVersion1 observer) {
+        outputUILordWrapper.addOutputObserver(observer);
+    }
+
+    public void removeOutputObserver(OutputObserverVersion1 observer) {
+        outputUILordWrapper.removeOutputObserver(observer);
+    }
+
+    /**
+     * Call this to execute the given gradle command.
+     *
+     * @param commandLineArguments the command line arguments to pass to gradle.
+     * @param displayName the name displayed in the UI for this command
+     */
+    public void executeCommand(String commandLineArguments, String displayName) {
+        //we go through the Swing version because it allows you to specify a display name
+        //for the command.
+        basicGradleUI.executeCommand(commandLineArguments, displayName);
+    }
+
+    /**
+     * This refreshes the task tree. Useful if you know you've changed something behind gradle's back or when first displaying this UI.
+     */
+    public void refreshTaskTree() {
+        basicGradleUI.refreshTaskTree();
+    }
+
+    /**
+     * Determines if commands are currently being executed or not.
+     *
+     * @return true if we're busy, false if not.
+     */
+    public boolean isBusy() {
+        return getGradleUI().isBusy();
+    }
+
+    /**
+     * Determines whether output is shown only when errors occur or always
+     *
+     * @return true to only show output if errors occur, false to show it always.
+     */
+    public boolean getOnlyShowOutputOnErrors() {
+        return getGradleUI().getOutputUILord().getOnlyShowOutputOnErrors();
+    }
+
+    /**
+     * This adds the specified component to the setup panel. It is added below the last 'default' item. You can only add 1 component here, so if you need to add multiple things, you'll have to handle
+     * adding that to yourself to the one component.
+     *
+     * @param component the component to add.
+     */
+    public void setCustomPanelToSetupTab(JComponent component) {
+        getGradleUI().setCustomPanelToSetupTab(component);
+    }
+
+    /**
+     * Sets the font for the output text
+     *
+     * @param font the new font
+     */
+    public void setOutputTextFont(Font font) {
+        getGradleUI().setOutputTextFont(font);
+    }
+
+    /**
+     * @return an object that works with lower level gradle and contains the current projects and tasks.
+     */
+    public GradleInterfaceVersion1 getGradleInterfaceVersion1() {
+        return gradleInterfaceWrapper;
+    }
+
+    /**
+     * Returns a FavoritesEditor. This is useful for getting a list of all favorites or modifying them.
+     *
+     * @return a FavoritesEditorVersion1. Use this to interact with the favorites.
+     */
+    public FavoritesEditorVersion1 getFavoritesEditor() {
+        return new FavoritesEditorWrapper(basicGradleUI.getGradlePluginLord().getFavoritesEditor());
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/AlternateUIInteractionVersionWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/AlternateUIInteractionVersionWrapper.java
new file mode 100644
index 0000000..68be510
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/AlternateUIInteractionVersionWrapper.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.foundation.settings.SettingsNode;
+import org.gradle.gradleplugin.userinterface.AlternateUIInteraction;
+import org.gradle.openapi.external.ui.AlternateUIInteractionVersion1;
+
+import java.io.File;
+
+/**
+ * Wrapper to shield version changes in AlternateUIInteraction from an external user of gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class AlternateUIInteractionVersionWrapper implements AlternateUIInteraction {
+    private AlternateUIInteractionVersion1 alternateUIInteractionVersion1;
+    private SettingsNode settings;
+
+    public AlternateUIInteractionVersionWrapper(AlternateUIInteractionVersion1 alternateUIInteractionVersion1, SettingsNode settings) {
+        this.alternateUIInteractionVersion1 = alternateUIInteractionVersion1;
+        this.settings = settings;
+
+        //when future versions are added, doing the following and then delegating
+        //the new functions to AlternateUIInteractionVersion2 keeps things compatible.
+        //try
+        //{
+        //   if( alternateUIInteractionVersion1 instanceof AlternateUIInteractionVersion2 )
+        //      alternateUIInteractionVersion2 = (AlternateUIInteractionVersion2) alternateUIInteractionVersion1;
+        //}
+        //catch( NoClassDefFoundError e )
+        //{
+        //   //this just means that we're being run with an old version of the open API. We have no alternateUIInteractionVersion2
+        //}
+    }
+
+    public void openFile(File file, int line) {
+        alternateUIInteractionVersion1.openFile(file, line);
+    }
+
+    public void editFile(File file, int line) {
+        alternateUIInteractionVersion1.editFile(file, line);
+    }
+
+    public boolean doesSupportEditingOpeningFiles() {
+        return alternateUIInteractionVersion1.doesSupportEditingOpeningFiles();
+    }
+
+    public void aboutToExecuteCommand(String fullCommandLine) {
+        alternateUIInteractionVersion1.aboutToExecuteCommand(fullCommandLine);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/CommandLineArgumentAlteringListenerWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/CommandLineArgumentAlteringListenerWrapper.java
new file mode 100644
index 0000000..30f3603
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/CommandLineArgumentAlteringListenerWrapper.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.foundation.CommandLineArgumentAlteringListener;
+import org.gradle.openapi.external.ui.CommandLineArgumentAlteringListenerVersion1;
+
+/**
+ * Wrapper to shield version changes in GradleTab from an external user of the gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class CommandLineArgumentAlteringListenerWrapper implements CommandLineArgumentAlteringListener {
+    private CommandLineArgumentAlteringListenerVersion1 listenerVersion1;
+
+    public CommandLineArgumentAlteringListenerWrapper(CommandLineArgumentAlteringListenerVersion1 listenerVersion1) {
+        this.listenerVersion1 = listenerVersion1;
+    }
+
+    /**
+     * This is called when you can add additional command line arguments. Return any additional arguments to add. This doesn't modify the existing commands.
+     *
+     * @param commandLineArguments the command line to execute.
+     * @return any command lines to add or null to leave it alone
+     */
+    public String getAdditionalCommandLineArguments(String commandLineArguments) {
+        return listenerVersion1.getAdditionalCommandLineArguments(commandLineArguments);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/DualPaneUIWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/DualPaneUIWrapper.java
new file mode 100644
index 0000000..0afeae6
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/DualPaneUIWrapper.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.userinterface.swing.generic.DualPaneUIInstance;
+import org.gradle.openapi.external.ui.DualPaneUIInteractionVersion1;
+import org.gradle.openapi.external.ui.DualPaneUIVersion1;
+
+import javax.swing.*;
+import java.awt.*;
+
+/**
+ * This wraps a DualPaneUIVersion1 for the purpose of being instantiated for an external tool such an IDE plugin. It wraps several interfaces and uses delegation in an effort to make this backward and
+ * forward compatible. Most of the work is done in AbstractOpenAPIUIWrapper
+ *
+ * @author mhunsicker
+ */
+public class DualPaneUIWrapper extends AbstractOpenAPIUIWrapper<DualPaneUIInstance> implements DualPaneUIVersion1 {
+    public DualPaneUIWrapper(DualPaneUIInteractionVersion1 dualPaneUIArguments) {
+
+        super(dualPaneUIArguments.instantiateSettings(), dualPaneUIArguments.instantiateAlternateUIInteraction());
+
+        //the main thing this does in instantiate the DualPaneUIInstance.
+        DualPaneUIInstance uiInstance = new DualPaneUIInstance();
+        uiInstance.initialize(settingsVersionWrapper, alternateUIInteractionVersionWrapper);
+        initialize(uiInstance);
+    }
+
+    /**
+     * Returns a component that shows the task tree tab, favorites tab, etc. suitable for inserting in your UI.
+     *
+     * @return the main component
+     */
+    public JComponent getMainComponent() {
+        return getGradleUI().getComponent();
+    }
+
+    /**
+     * Returns a component that shows the output of the tasks being executed.
+     *
+     * @return the output component
+     */
+    public Component getOutputPanel() {
+        return getGradleUI().getOutputPanel();
+    }
+
+    public int getNumberOfOpenedOutputTabs() {
+        return getGradleUI().getOutputUILord().getTabCount();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/GradleTabVersionWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/GradleTabVersionWrapper.java
new file mode 100644
index 0000000..b1b4353
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/GradleTabVersionWrapper.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.userinterface.swing.generic.tabs.GradleTab;
+import org.gradle.openapi.external.ui.GradleTabVersion1;
+
+import java.awt.*;
+
+/**
+ * Wrapper to shield version changes in GradleTab from an external user of the gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class GradleTabVersionWrapper implements GradleTab {
+    private GradleTabVersion1 gradleTabVersion1;
+
+    GradleTabVersionWrapper(GradleTabVersion1 gradleTabVersion1) {
+        this.gradleTabVersion1 = gradleTabVersion1;
+
+        //when future versions are added, doing the following and then delegating
+        //the new functions to GradleTabVersion2 keeps things compatible.
+        //if( gradleTabVersion1 instanceof GradleTabVersion2 )
+        //   gradleTabVersion2 = (GradleTabVersion2) gradleTabVersion1;
+    }
+
+    public String getName() {
+        return gradleTabVersion1.getName();
+    }
+
+    public Component createComponent() {
+        return gradleTabVersion1.createComponent();
+    }
+
+    public void aboutToShow() {
+        gradleTabVersion1.aboutToShow();
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputObserverWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputObserverWrapper.java
new file mode 100644
index 0000000..8ea8e19
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputObserverWrapper.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.gradleplugin.userinterface.swing.generic.OutputUILord;
+import org.gradle.openapi.external.ui.OutputObserverVersion1;
+
+/**
+ * Wrapper to shield version changes in OutputUILord.OutputObserver from an external user of the gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class OutputObserverWrapper implements OutputUILord.OutputObserver {
+    private OutputObserverVersion1 outputObserverVersion1;
+
+    public OutputObserverWrapper(OutputObserverVersion1 outputObserverVersion1) {
+        this.outputObserverVersion1 = outputObserverVersion1;
+
+        //when future versions are added, doing the following and then delegating
+        //the new functions to OutputObserverVersion2 keeps things compatible.
+        //if( outputObserverVersion1 instanceof OutputObserverVersion2 )
+        //   outputObserverVersion2 = (OutputObserverVersion2) outputObserverVersion1;
+    }
+
+    /**
+     * Notification that a request was added to the output. This means we've got some output that is useful to display.
+     *
+     * Note: this is slightly different from the GradlePluginLord.RequestObserver. While these are directly related, this one really means that it has been added to the UI. <!      Name
+     * Description>
+     *
+     * @param request the request that was added.
+     */
+    public void executionRequestAdded(ExecutionRequest request) {
+        //Note: I don't like passing the request itself here, but a user might need an ID and trying to
+        //map the requests to something else when they can live for an indeterminate amount of time was too complex.
+        //I considered using a straight unique ID
+        outputObserverVersion1.executionRequestAdded(request.getRequestID(), request.getFullCommandLine(), request.getDisplayName(), request.forceOutputToBeShown());
+    }
+
+    /**
+     * Notification that a refresh task list request was added to the output. This means we've got some output that is useful to display.
+     *
+     * Note: this is slightly different from the GradlePluginLord.RequestObserver. While these are directly related, this one really means that it has been added to the UI. <!      Name
+     * Description>
+     *
+     * @param request the request that was added.
+     */
+    public void refreshRequestAdded(RefreshTaskListRequest request) {
+        outputObserverVersion1.refreshRequestAdded(request.getRequestID(), request.forceOutputToBeShown());
+    }
+
+    /**
+     * Notification that an output tab was closed. You might want to know this if you want to close your IDE output window when all tabs are closed
+     *
+     * @param remainingTabCount the number of open tabs
+     */
+    public void outputTabClosed(Request request) {
+        outputObserverVersion1.outputTabClosed(request.getRequestID());
+    }
+
+    /**
+     * Notification that execution of a request is complete
+     *
+     * @param request the original request
+     */
+    public void reportExecuteFinished(Request request, boolean wasSuccessful) {
+        outputObserverVersion1.requestComplete(request.getRequestID(), wasSuccessful);
+    }
+}
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputUILordWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputUILordWrapper.java
new file mode 100644
index 0000000..8e0e815
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/OutputUILordWrapper.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.userinterface.swing.generic.OutputUILord;
+import org.gradle.openapi.external.ui.OutputObserverVersion1;
+import org.gradle.openapi.external.ui.OutputUILordVersion1;
+
+import java.awt.*;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Wrapper to shield version changes in OutputUILord from an external user of gradle open API.
+ *
+ * @author mhunsicker
+ */
+public class OutputUILordWrapper implements OutputUILordVersion1 {
+
+    private OutputUILord outputUILord;
+    private Map<OutputObserverVersion1, OutputObserverWrapper> outputObserverMap = new HashMap<OutputObserverVersion1, OutputObserverWrapper>();
+
+    public OutputUILordWrapper(OutputUILord outputUILord) {
+        this.outputUILord = outputUILord;
+    }
+
+    public void setOutputTextFont(Font font) {
+        outputUILord.setOutputTextFont(font);
+    }
+
+    public Font getOutputTextFont() {
+        return outputUILord.getOutputTextFont();
+    }
+
+    public void addFileExtension(String extension, String lineNumberDelimiter) {
+        outputUILord.getFileLinkDefinitionLord().addFileExtension(extension, lineNumberDelimiter);
+    }
+
+    public void addPrefixedFileLink(String name, String prefix, String extension, String lineNumberDelimiter) {
+        outputUILord.getFileLinkDefinitionLord().addPrefixedFileLink(name, prefix, extension, lineNumberDelimiter);
+    }
+
+    public List<String> getFileExtensions() {
+        return outputUILord.getFileLinkDefinitionLord().getFileExtensions();
+    }
+
+    public void addOutputObserver(OutputObserverVersion1 observer) {
+        //to avoid versioning conflicts, we have to wrap the observer. This means we have to track the observers.
+        OutputObserverWrapper wrapper = new OutputObserverWrapper(observer);
+        outputObserverMap.put(observer, wrapper);
+
+        outputUILord.addOutputObserver(wrapper, false);
+    }
+
+    public void removeOutputObserver(OutputObserverVersion1 observer) {
+        OutputObserverWrapper wrapper = outputObserverMap.remove(observer);
+        if (wrapper != null) {
+            outputUILord.removeOutputObserver(wrapper);
+        }
+    }
+
+    /*
+    This re-executes the last execution command (ignores refresh commands).
+    This is potentially useful for IDEs to hook into (hotkey to execute last command).
+     */
+    public void reExecuteLastCommand() {
+        outputUILord.reExecuteLastCommand();
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/SettingsNodeVersionWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/SettingsNodeVersionWrapper.java
similarity index 100%
rename from subprojects/gradle-ui/src/main/java/org/gradle/openapi/wrappers/ui/SettingsNodeVersionWrapper.java
rename to subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/SettingsNodeVersionWrapper.java
diff --git a/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/SinglePaneUIWrapper.java b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/SinglePaneUIWrapper.java
new file mode 100644
index 0000000..d9791b8
--- /dev/null
+++ b/subprojects/ui/src/main/java/org/gradle/openapi/wrappers/ui/SinglePaneUIWrapper.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.openapi.wrappers.ui;
+
+import org.gradle.gradleplugin.userinterface.swing.generic.SinglePaneUIInstance;
+import org.gradle.openapi.external.ui.SinglePaneUIInteractionVersion1;
+import org.gradle.openapi.external.ui.SinglePaneUIVersion1;
+
+import javax.swing.*;
+
+/**
+ * This wraps a SinglePaneUIVersion1 for the purpose of being instantiated for an external tool such an IDE plugin. It wraps several interfaces and uses delegation in an effort to make this backward
+ * and forward compatible. Most of the work is done in AbstractOpenAPIUIWrapper
+ *
+ * @author mhunsicker
+ */
+public class SinglePaneUIWrapper extends AbstractOpenAPIUIWrapper<SinglePaneUIInstance> implements SinglePaneUIVersion1 {
+    public SinglePaneUIWrapper(SinglePaneUIInteractionVersion1 singlePaneUIArguments) {
+
+        super(singlePaneUIArguments.instantiateSettings(), singlePaneUIArguments.instantiateAlternateUIInteraction());
+
+        //the main thing this does in instantiate the SinglePaneUIInstance.
+        SinglePaneUIInstance singlePaneUIInstance = new SinglePaneUIInstance();
+        singlePaneUIInstance.initialize(settingsVersionWrapper, alternateUIInteractionVersionWrapper);
+        initialize(singlePaneUIInstance);
+    }
+
+    /**
+     * Returns this panel as a Swing object suitable for inserting in your UI.
+     *
+     * @return the main component
+     */
+    public JComponent getComponent() {
+        return getGradleUI().getComponent();
+    }
+}
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/foundation/ipc/gradle/execute-command-init-script.gradle b/subprojects/ui/src/main/resources/org/gradle/foundation/ipc/gradle/execute-command-init-script.gradle
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/foundation/ipc/gradle/execute-command-init-script.gradle
rename to subprojects/ui/src/main/resources/org/gradle/foundation/ipc/gradle/execute-command-init-script.gradle
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/foundation/ipc/gradle/refresh-tasks-init-script.gradle b/subprojects/ui/src/main/resources/org/gradle/foundation/ipc/gradle/refresh-tasks-init-script.gradle
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/foundation/ipc/gradle/refresh-tasks-init-script.gradle
rename to subprojects/ui/src/main/resources/org/gradle/foundation/ipc/gradle/refresh-tasks-init-script.gradle
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close-highlight.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close-highlight.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close-highlight.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close-highlight.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/close.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/add.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/add.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/add.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/add.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/blank.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/blank.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/blank.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/blank.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit-filter.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit-filter.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit-filter.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit-filter.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/edit.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/execute.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/export.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/export.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/export.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/export.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/filter.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/filter.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/filter.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/filter.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/import.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/import.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/import.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/import.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-down.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-down.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-down.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-down.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-up.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-up.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-up.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/move-up.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/refresh.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/refresh.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/refresh.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/refresh.png
diff --git a/subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/remove.png b/subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/remove.png
similarity index 100%
rename from subprojects/gradle-ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/remove.png
rename to subprojects/ui/src/main/resources/org/gradle/gradleplugin/userinterface/swing/generic/tabs/remove.png
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/BuildInformation.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/BuildInformation.java
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/BuildInformation.java
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/BuildInformation.java
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/CommandLineAssistantTest.groovy b/subprojects/ui/src/test/groovy/org/gradle/foundation/CommandLineAssistantTest.groovy
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/CommandLineAssistantTest.groovy
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/CommandLineAssistantTest.groovy
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/CommandLineParsingTest.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/CommandLineParsingTest.java
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/CommandLineParsingTest.java
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/CommandLineParsingTest.java
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/DOM4JSettingsNodeTest.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/DOM4JSettingsNodeTest.java
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/DOM4JSettingsNodeTest.java
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/DOM4JSettingsNodeTest.java
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FavoritesTest.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/FavoritesTest.java
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FavoritesTest.java
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/FavoritesTest.java
diff --git a/subprojects/ui/src/test/groovy/org/gradle/foundation/FileLinkTests.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/FileLinkTests.java
new file mode 100644
index 0000000..4ff1dea
--- /dev/null
+++ b/subprojects/ui/src/test/groovy/org/gradle/foundation/FileLinkTests.java
@@ -0,0 +1,224 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import junit.framework.TestCase;
+import org.gradle.foundation.output.FileLink;
+import org.gradle.foundation.output.FileLinkDefinitionLord;
+import org.gradle.foundation.output.OutputParser;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ These test several aspects of parsing output looking for files.
+ @author mhunsicker
+ */
+public class FileLinkTests extends TestCase {
+    public static void parseOutputTest(String textToSearch, FileLink... expectedResults) {
+        parseTest(textToSearch, false, expectedResults);
+    }
+
+    public static void parseTest(String textToSearch, boolean verifyFileExists, FileLink... expectedResults) {
+        OutputParser outputParser = new OutputParser(new FileLinkDefinitionLord(), verifyFileExists);
+        List<FileLink> fileLinks = outputParser.parseText(textToSearch);
+
+        TestUtility.assertListContents(fileLinks, expectedResults);
+    }
+
+    public void testCompileErrors() {
+       String outputText = ":distributionDiskResources SKIPPED\n"
+               + ":installDiskResources SKIPPED\n"
+               + ":idea-plugins:ideagradle:compileJava\n"
+               + "[ant:javac] /home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java:186: cannot find symbol\n"
+               + "[ant:javac] symbol  : constructor Integer()\n"
+               + "[ant:javac] location: class java.lang.Integer\n"
+               + "[ant:javac]       SwingUtilities.invokeLater( new Integer() );\n"
+               + "[ant:javac]                                   ^\n";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java"), 114, 215, 186));
+   }
+
+   public void testNotes() {
+       String outputText = ":distributionDiskResources SKIPPED\n"
+               + ":installDiskResources SKIPPED\n"
+               + ":idea-plugins:ideagradle:compileJava\n"
+               + "[ant:javac] Note: /home/user/project/modules/plugins/gradle/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java uses or overrides a deprecated API.\n"
+               + "[ant:javac] Note: Recompile with -Xlint:deprecation for details.\n"
+               + "[ant:javac] 1 error\n"
+               + "Total time: 4.622 secs";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/project/modules/plugins/gradle/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java"), 120, 224, -1));
+   }
+
+   /**
+    Tests to see if we can find gradle files in the output. This message shows up when the build fails. We'll test two types (that probably wouldn't
+    occur naturally together. One with the line number, one without.
+    */
+   public void testGradleBuildFile() {
+       String outputText = "FAILURE: Build failed with an exception.\n"
+               + "\n"
+               + "* Where:\n"
+               + "Build file '/home/user/gradle/build.gradle' line: 431\n"
+               + "\n"
+               + "* What went wrong:\n"
+               + "blah blah blah\n"
+               + "Build file '/home/user/gradle/build.gradle'"
+               + "Total time: 4.622 secs";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/gradle/build.gradle"), 63, 104, 431), new FileLink(new File("/home/user/gradle/build.gradle"), 152, 182, -1));
+   }
+
+
+   /**
+    This attempts to find a single ant:checkstyle error that occurs when the checkstyle fails. This error consists of
+    the file, the line of the problem, and the cause.
+    */
+   public void testCheckstyleSingleErrorOutput() {
+       String outputText = ":processResources\n"
+               + ":idea-plugins:compile\n"
+               + ":compile\n"
+               + ":copyNativeLibs\n"
+               + ":distributionDiskResources SKIPPED\n"
+               + ":installDiskResources SKIPPED\n"
+               + "[ant:checkstyle] /home/user/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s."
+               + "FAILURE: Build failed with an exception.\n"
+               + "\n"
+               + "* What went wrong:\n"
+               + "blah blah blah\n"
+               + "Total time: 4.622 secs";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 147, 262, 38));
+   }
+
+   /**
+    This attemps to find the checkstyle error report file. This file will list all errors and where they are located.
+    The file link we're looking for just has the file's path
+    */
+   public void testCheckstyleReportErrorFile() {
+       String outputText = ":processResources\n"
+               + ":plugins:compile\n"
+               + ":compile\n"
+               + ":copyNativeLibs\n"
+               + ":distributionDiskResources SKIPPED\n"
+               + ":installDiskResources SKIPPED\n"
+               + "FAILURE: Build failed with an exception.\n"
+               + "\n"
+               + "* What went wrong:\n"
+               + "Cause: Checkstyle check violations were found in main Java source. See the report at /home/user/gradle/subprojects/gradle-core/build/checkstyle/main.xml\n"
+               + "Total time: 4.622 secs"
+               + "blah blah blah";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/gradle/subprojects/gradle-core/build/checkstyle/main.xml"), 271, 338, -1));
+   }
+
+   /**
+    Tests that any HTML reports (prefixed with "See the report at ") are found.
+    */
+   public void testHTMLReport() {
+       String outputText = "* What went wrong:\n"
+               + "Execution failed for task ':ui:codenarcTest'.\n"
+               + "Cause: CodeNarc check violations were found in test Groovy source. See the report at /home/user/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n"
+               + "\n"
+               + "* Try:\n"
+               + "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html"), 150, 222, -1));
+   }
+
+   /**
+    This tests a bug I discovered while coding this where the path matched by the Note: would start with the space
+    before the '/', but the Build file would start at the '/'. This test is here because my first attempt
+    I tracked the problem down to BasicFileLinkDefintion. It was assuming the file started at immediately after
+    the prefix. This was incorrect. There may be spaces between the prefix and the file (and I didn't want to put
+    spaces in the prefix). So I added BasicFileLinkDefintion.getStartOfFile() to skip over these spaces.
+    */
+   public void testOffByOneCharacterBug() {
+       String outputText = "[ant:javac] Note: /home/user/modules/f1j/src/main/java/com/thing/DesignerManager.java uses or overrides a deprecated API.\n"
+               + "Build file '/home/user/modules/build.gradle'";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/modules/f1j/src/main/java/com/thing/DesignerManager.java"), 18, 85, -1),
+               new FileLink(new File("/home/user/modules/build.gradle"), 134, 165, -1));
+   }
+
+   /**
+      This test that test reports file is found. This is a special case since we're not given
+      the actual file path and instead given only its parent path. The code assumes the report file
+      is present.
+      */
+   public void testFailedTestsReportFile() {
+       String outputText = "FAILURE: Build failed with an exception.\n"
+               + "\n"
+               + "* Where:\n"
+               + "Build file '/home/user/gradle/gradle/build.gradle'\n"
+               + "\n"
+               + "* What went wrong:\n"
+               + "Execution failed for task ':integTest'.\n"
+               + "Cause: There were failing tests. See the report at /home/user/gradle/gradle/build/reports/tests.\n"
+               + "Total time: 4.622 secs\n"
+               + "blah blah blah";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/gradle/gradle/build.gradle"), 63, 100, -1),
+               new FileLink(new File("/home/user/gradle/gradle/build/reports/tests/index.html"), 213, 258, -1));
+   }
+
+   /**
+    This tests for multiple files found in a single output.
+    */
+   public void testMultiples() {
+       String outputText = ":distributionDiskResources SKIPPED\n"
+               + ":installDiskResources SKIPPED\n"
+               + ":idea-plugins:ideagradle:compileJava\n\n"
+               + "[ant:checkstyle] /home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n"
+               + "Note: /home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java uses or overrides a deprecated API.\n"
+               + "\n"
+               + "Cause: Checkstyle check violations were found in main Java source. See the report at /home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml.\n"
+               + "\n"
+               + "\n"
+               + "Build file '/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle'\n"
+               + "\n"
+               + "* What went wrong:\n"
+               + "Execution failed for task ':ui:codenarcTest'.\n"
+               + "Cause: CodeNarc check violations were found in test Groovy source. See the report at /home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n"
+               + "\n"
+               + "* Try:\n"
+               + "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
+
+            parseOutputTest(outputText, new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 120, 243, 38),
+                    new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java"), 282, 408, -1),
+                    new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml"), 531, 606, -1),
+                    new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle"), 622, 679, -1),
+                    new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html"), 832, 912, -1));
+   }
+
+    /**
+     * This tests that different cases of file extensions do not prevent files from being found. I
+     * want to explicitly test this because I had to explicitly search for case insensitive matches.
+     */
+   public void testFileExtensionCaseSensitivity() {
+       String outputText = ":distributionDiskResources SKIPPED\n"
+               + ":installDiskResources SKIPPED\n"
+               + "/home/user/files/Thing.java:38: 'if' construct must use '{}'s.\n"
+               + "/home/user/files/Thing2.JAVA:929: cannot find symbol\n"
+               + "/home/user/files/Thing3.JaVa:77: incompatible types\n"
+               + "* Try:\n"
+               + "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
+
+       parseOutputTest(outputText, new FileLink(new File("/home/user/files/Thing.java"), 65, 95, 38),
+               new FileLink(new File("/home/user/files/Thing2.JAVA"), 128, 160, 929),
+               new FileLink(new File("/home/user/files/Thing3.JaVa"), 181, 212, 77));
+   }
+}
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FilterTest.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/FilterTest.java
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/FilterTest.java
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/FilterTest.java
diff --git a/subprojects/ui/src/test/groovy/org/gradle/foundation/LiveOutputParserTests.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/LiveOutputParserTests.java
new file mode 100644
index 0000000..1643c89
--- /dev/null
+++ b/subprojects/ui/src/test/groovy/org/gradle/foundation/LiveOutputParserTests.java
@@ -0,0 +1,255 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import junit.framework.TestCase;
+import junit.framework.AssertionFailedError;
+import org.gradle.foundation.output.FileLink;
+import org.gradle.foundation.output.FileLinkDefinitionLord;
+import org.gradle.foundation.output.LiveOutputParser;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * Tests aspects of LiveOutputParser. This finds FileLinks within text that is being output constantly.
+ *
+ * @author mhunsicker
+ */
+public class LiveOutputParserTests extends TestCase {
+    private LiveOutputParser parser;
+    private FileLinkDefinitionLord definitionLord;
+
+    @Override
+    protected void setUp() throws Exception {
+        definitionLord = new FileLinkDefinitionLord();
+        parser = new LiveOutputParser(definitionLord, false);
+    }
+
+    @Override
+    protected void tearDown() throws Exception {
+        definitionLord = null;
+        parser = null; //clean up after ourselves. Some test runners keep all tests in memory. This makes sure our parser isn't consuming any.
+    }
+
+    /**
+     * This does a basic test. Text is output in several waves breaking within lines. There is a single file link in it. We should find it. Specifically, this is going to break up the file so it comes
+     * in multiple parts.
+     */
+    public void testBasic() {
+        FileLink expectedFileLink = new FileLink(new File("/home/user/project/modules/plugins/src/main/java/com/thing/plugins/gradle/ui/GradleComponent.java"), 114, 215, 186);
+
+        appendTextWithoutFileLinks(":distributionDiskResources ");
+        appendTextWithoutFileLinks("SKIPPED\n:installDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n");
+        appendTextWithoutFileLinks("[ant:javac] /home/user/project/modules/plugins");
+        appendTextWithoutFileLinks("/src/main/java/com/thing/plugins/gradle/ui/Gradle");
+        appendTextWithFileLinks("Component.java:186: cannot find symbol\n", expectedFileLink);  //here's where we expect to get some results
+        appendTextWithoutFileLinks("[ant:javac] symbol  : constructor Integer()\n");
+        appendTextWithoutFileLinks("[ant:javac] location: class java.lang.Integer\n");
+        appendTextWithoutFileLinks("[ant:javac]       SwingUtilities.invokeLater( new Integer() );\n");
+        appendTextWithoutFileLinks("[ant:javac]                                   ^\n");
+
+        //at the end, verify we only found what was expected
+        TestUtility.assertListContents(parser.getFileLinks(), expectedFileLink);
+    }
+
+    private void appendTextWithoutFileLinks(String text) {
+        List<FileLink> fileLinks = parser.appendText(text);
+        if (!fileLinks.isEmpty()) {
+            throw new AssertionFailedError("FileLinks list is erroneously not empty: " + TestUtility.dumpList(fileLinks));
+        }
+    }
+
+    private void appendTextWithFileLinks(String text, FileLink... expectedResults) {
+        List<FileLink> fileLinks = parser.appendText(text);
+        TestUtility.assertListContents(fileLinks, expectedResults);
+    }
+
+    /**
+     * This tests live output coming in where the result is multiple FileLinks. We'll just add many lines some have FileLinks some don't. We want to make sure the LiveOutputParser tracks all of them
+     * correctly.
+     */
+    public void testMultipleFiles() {
+        FileLink fileLink1 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 120, 243, 38);
+        FileLink fileLink2 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java"), 282, 408, -1);
+        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml"), 531, 606, -1);
+        FileLink fileLink4 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle"), 622, 679, -1);
+        FileLink fileLink5 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html"), 832, 912, -1);
+
+        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n:installDiskResources");
+        appendTextWithoutFileLinks(" SKIPPED\n:idea-plugins:ideagradle:compileJava\n\n");
+        appendTextWithoutFileLinks("[ant:checkstyle] /home/user/modules/gradle/subprojects");
+        appendTextWithFileLinks("/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n", fileLink1);
+        appendTextWithFileLinks(
+                "Note: /home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java uses or overrides a deprecated API.\n",
+                fileLink2);
+        appendTextWithoutFileLinks("\n");
+        appendTextWithoutFileLinks("Cause: Checkstyle check violations were found in main ");
+        appendTextWithoutFileLinks("Java source. See the report ");
+        appendTextWithFileLinks("at /home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml.\n", fileLink3);
+        appendTextWithoutFileLinks("\n");
+        appendTextWithoutFileLinks("\n");
+        appendTextWithFileLinks("Build file '/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle'\n", fileLink4);
+        appendTextWithoutFileLinks("\n");
+        appendTextWithoutFileLinks("* What went wrong:\n");
+        appendTextWithoutFileLinks("Execution failed for task ':ui:codenarcTest'.\n");
+        appendTextWithoutFileLinks("Cause: CodeNarc check ");
+        appendTextWithFileLinks("violations were found in test Groovy source. See the report at /home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n", fileLink5);
+        appendTextWithoutFileLinks("\n");
+        appendTextWithoutFileLinks("* Try:\n");
+        appendTextWithoutFileLinks("Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.");
+
+        //at the end, verify we only found what was expected
+        TestUtility.assertListContents(parser.getFileLinks(), fileLink1, fileLink2, fileLink3, fileLink4, fileLink5);
+    }
+
+    /**
+     * This tests is we can successfully find FileLinks if several of them come in at once in one big block of multi-lined text. We'll add some text one line at a time, then add a single FileLink (on a
+     * single line), then add many many lines at once that has 4 FileLinks in it.
+     */
+    public void testMultiplesAtOnce() {
+        FileLink fileLink1 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 120, 243, 38);
+        FileLink fileLink2 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java"), 282, 408, -1);
+        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml"), 531, 606, -1);
+        FileLink fileLink4 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle"), 622, 679, -1);
+        FileLink fileLink5 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html"), 832, 912, -1);
+
+        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
+        appendTextWithFileLinks(
+                "[ant:checkstyle] /home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n",
+                fileLink1);
+        appendTextWithoutFileLinks("Note: /home/user/modules/gradle/"); //does NOT end with a newline. This is just to push a potential edge case
+
+        String remaindingOutputText = "subprojects/gradle-core/src/test/groovy/org/gradle/integtests/DistributionIntegrationTestRunner.java uses or overrides a deprecated API.\n"
+                + "\n"
+                + "Cause: Checkstyle check violations were found in main Java source. See the report at /home/user/modules/gradle/subprojects/gradle-core/build/checkstyle/main.xml.\n"
+                + "\n"
+                + "\n"
+                + "Build file '/home/user/modules/gradle/subprojects/gradle-ui/ui.gradle'\n"
+                + "\n"
+                + "* What went wrong:\n"
+                + "Execution failed for task ':ui:codenarcTest'.\n"
+                + "Cause: CodeNarc check violations were found in test Groovy source. See the report at /home/user/modules/gradle/subprojects/gradle-ui/build/reports/codenarc/test.html.\n"
+                + "\n"
+                + "* Try:\n"
+                + "Run with -s or -d option to get more details. Run with -S option to get the full (very verbose) stacktrace.";
+
+        //now add that one large chunk. We should find the last four
+        appendTextWithFileLinks(remaindingOutputText, fileLink2, fileLink3, fileLink4, fileLink5);
+
+        //at the end, verify we only found what was expected
+        TestUtility.assertListContents(parser.getFileLinks(), fileLink1, fileLink2, fileLink3, fileLink4, fileLink5);
+    }
+
+    /**
+     * This verifies that we can find a link to a groovy file as well as its line number. This was actually a bug and this test is based off of actual data (tests failed due to a compile error in
+     * groovy). I tracked the problem down to the space after the delimiter (".groovy: 24" vs. ".groovy:24" ). After running this test with actual data, I'm going to test it with a line that doesn't
+     * have a space just to make sure both work.
+     */
+    public void testGroovyFileLineDelimiter() {
+        FileLink fileLink1 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy"), 183, 306, 24);
+        FileLink fileLink2 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy"), 481, 603, 85);
+
+        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
+        appendTextWithoutFileLinks("org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n");
+
+        //notice the space between "GradleRunnerFactoryTest.groovy:" and "24:". That was causing our problem
+        appendTextWithFileLinks(
+                "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy: 24: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n",
+                fileLink1);
+        appendTextWithoutFileLinks(" @ line 24, column 10.\n");
+        appendTextWithoutFileLinks("   @RunWith(DistributionIntegrationTestRunner.class)\n");
+
+        //now test it without a space between the delimiter and line number to make sure it works both ways
+        appendTextWithFileLinks(
+                "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.groovy:85: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n",
+                fileLink2);
+    }
+
+    /**
+     * This tests that you can dynamically add file extensions to the parser. We're going to add 2 fake extensions (one with line number delimiter, one without) then verify that the parser correctly
+     * parses the output with said extensions.
+     */
+    public void testAddingFileExtensions() {
+        String myExtension1 = ".mytxtextension";
+        String myExtension2 = ".othertxtextension";
+
+        //make sure this fake extension isn't already in use
+        assertFalse("Fake extension 1 already present. This test is not setup correctly!", definitionLord.getFileExtensions().contains(myExtension1));
+        assertFalse("Fake extension 2 already present. This test is not setup correctly!", definitionLord.getFileExtensions().contains(myExtension2));
+
+        definitionLord.addFileExtension(myExtension1, ":");
+        definitionLord.addFileExtension(myExtension2, null); //this one has no line delimiter
+
+        //make sure it was added
+        assertTrue("Fake extension 1 was not added. ", definitionLord.getFileExtensions().contains(myExtension1));
+        assertTrue("Fake extension 2 was not added. ", definitionLord.getFileExtensions().contains(myExtension2));
+
+        //now verify the extension is used
+
+        FileLink fileLink1 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.mytxtextension"), 183, 313, 24);
+        FileLink fileLink2 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.othertxtextension"), 488, 618, -1);
+        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 632, 755, 38);
+
+        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
+        appendTextWithoutFileLinks("org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n");
+        appendTextWithFileLinks(
+                "/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.mytxtextension:24: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n",
+                fileLink1);
+        appendTextWithoutFileLinks(" @ line 24, column 10.\n");
+        appendTextWithoutFileLinks("   @RunWith(DistributionIntegrationTestRunner.class)\n");
+        appendTextWithFileLinks("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.othertxtextension: other error\n", fileLink2);
+
+        //do this just to make sure adding our custom extension didn't break existing extensions
+        appendTextWithFileLinks("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n",
+                fileLink3);
+    }
+
+    /**
+     * This tests that you can dynamically add file prefixes to the parser. We're going to add 2 fake prefixes (one with line number delimiter, one without) then verify that the parser correctly parses
+     * the output with said prefixes.
+     */
+    public void testAddingPrefixedFileLink() {
+        definitionLord.addPrefixedFileLink("Test Crap 1", "Some Garbage:", ".txt", ":");
+        definitionLord.addPrefixedFileLink("Test Crap 2", "Some Trash:", ".txt", null);    //no line delimiter on this one
+
+        FileLink fileLink1 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt"), 206, 325, 24);
+        FileLink fileLink2 = new FileLink(new File("/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt"), 517, 633, -1);
+        FileLink fileLink3 = new FileLink(new File("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java"), 651, 774, 38);
+
+        appendTextWithoutFileLinks(":distributionDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":installDiskResources SKIPPED\n");
+        appendTextWithoutFileLinks(":idea-plugins:ideagradle:compileJava\n\n");
+        appendTextWithoutFileLinks("org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:\n");
+        appendTextWithFileLinks(
+                "Blah blah Some Garbage:/home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt:24: unable to find class 'DistributionIntegrationTestRunner.class' for annotation attribute constant\n",
+                fileLink1);
+        appendTextWithoutFileLinks(" @ line 24, column 10.\n");
+        appendTextWithoutFileLinks("   @RunWith(DistributionIntegrationTestRunner.class)\n");
+        appendTextWithFileLinks("Blah Some Trash: /home/user/gradle/subprojects/gradle-open-api/src/integTest/groovy/org/gradle/integtests/GradleRunnerFactoryTest.txt Some other error\n", fileLink2);
+
+        //do this just to make sure adding our prefixed links didn't break existing extensions
+        appendTextWithFileLinks("/home/user/modules/gradle/subprojects/gradle-core/src/main/groovy/org/gradle/util/exec/ExecHandleShutdownHookAction.java:38: 'if' construct must use '{}'s.\n",
+                fileLink3);
+    }
+}
diff --git a/subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/ProjectConverterTest.groovy b/subprojects/ui/src/test/groovy/org/gradle/foundation/ProjectConverterTest.groovy
similarity index 100%
rename from subprojects/gradle-ui/src/test/groovy/org/gradle/foundation/ProjectConverterTest.groovy
rename to subprojects/ui/src/test/groovy/org/gradle/foundation/ProjectConverterTest.groovy
diff --git a/subprojects/ui/src/test/groovy/org/gradle/foundation/TestUtility.java b/subprojects/ui/src/test/groovy/org/gradle/foundation/TestUtility.java
new file mode 100644
index 0000000..9648f71
--- /dev/null
+++ b/subprojects/ui/src/test/groovy/org/gradle/foundation/TestUtility.java
@@ -0,0 +1,434 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.foundation;
+
+import junit.framework.Assert;
+import junit.framework.AssertionFailedError;
+import org.gradle.api.Project;
+import org.gradle.api.Task;
+import org.gradle.api.tasks.TaskContainer;
+import org.gradle.foundation.ipc.gradle.ExecuteGradleCommandServerProtocol;
+import org.gradle.gradleplugin.foundation.DOM4JSerializer;
+import org.gradle.gradleplugin.foundation.GradlePluginLord;
+import org.gradle.gradleplugin.foundation.request.ExecutionRequest;
+import org.gradle.gradleplugin.foundation.request.RefreshTaskListRequest;
+import org.gradle.gradleplugin.foundation.request.Request;
+import org.gradle.util.UncheckedException;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JUnit4Mockery;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.File;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Utility class for initializing various test objects related.
+ *
+ * @author mhunsicker
+ */
+public class TestUtility {
+    private static long uniqueNameCounter = 1; //used to make unique names for JMock objects.
+
+    /**
+     * Creates a mock project with the specified properties.
+     *
+     * Note: depth is 0 for a root project. 1 for a root project's subproject, etc.
+     */
+    public static Project createMockProject(JUnit4Mockery context, final String name, final String buildFilePath, final int depth, Project[] subProjectArray, Task[] tasks, String[] defaultTasks,
+                                            Project... dependsOnProjects) {
+        final Project project = context.mock(Project.class, "[project]_" + name + '_' + uniqueNameCounter++);
+
+        context.checking(new Expectations() {{
+            allowing(project).getName();
+            will(returnValue(name));
+            allowing(project).getDescription();
+            will(returnValue(null));
+            allowing(project).getBuildFile();
+            will(returnValue(new File(buildFilePath)));
+            allowing(project).getDepth();
+            will(returnValue(depth));
+        }});
+
+        attachSubProjects(context, project, subProjectArray);
+        attachTasks(context, project, tasks);
+        assignDefaultTasks(context, project, defaultTasks);
+        assignDependsOnProjects(context, project, dependsOnProjects);
+
+        return project;
+    }
+
+    /**
+     * This makes the sub projects children of the parent project. If you call this repeatedly on the same parentProject, any previous sub projects will be replaced with the new ones.
+     *
+     * @param context the mock context
+     * @param parentProject where to attach the sub projects. This must be a mock object.
+     * @param subProjectArray the sub projects to attach to the parent. These must be mock objects. Pass in null or an empty array to set no sub projects.
+     */
+    public static void attachSubProjects(JUnit4Mockery context, final Project parentProject, Project... subProjectArray) {
+        final Map<String, Project> childProjects = new LinkedHashMap<String, Project>();
+        if (subProjectArray != null) {
+            for (final Project subProject : subProjectArray) {
+                childProjects.put(String.valueOf(childProjects.size()), subProject);
+                context.checking(new Expectations() {{
+                    allowing(subProject).getParent();
+                    will(returnValue(parentProject));
+                }});
+            }
+        }
+
+        //populate the subprojects (this may be an empty set)
+        context.checking(new Expectations() {{
+            allowing(parentProject).getChildProjects();
+            will(returnValue(childProjects));
+        }});
+    }
+
+    /**
+     * Creates a mock task with the specified properites.
+     */
+    public static Task createTask(JUnit4Mockery context, final String name, final String description) {
+        final Task task = context.mock(Task.class, "[task]_" + name + '_' + uniqueNameCounter++);
+
+        context.checking(new Expectations() {{
+            allowing(task).getName();
+            will(returnValue(name));
+            allowing(task).getDescription();
+            will(returnValue(description));
+        }});
+
+        return task;
+    }
+
+    /**
+     * This makes the tasks children of the parent project. If you call this repeatedly on the same parentProject, any previous tasks will be replaced with the new ones.
+     *
+     * @param context the mock context
+     * @param parentProject where to attach the sub projects. This must be a mock object.
+     * @param taskArray the tasks to attach to the parent. these must be mock objects. Pass in null or an empty array to set no tasks.
+     */
+    public static void attachTasks(JUnit4Mockery context, final Project parentProject, Task... taskArray) {
+        //first, make our project return our task container
+        final TaskContainer taskContainer = context.mock(TaskContainer.class, "[taskcontainer]_" + parentProject.getName() + '_' + uniqueNameCounter++);
+
+        context.checking(new Expectations() {{
+            allowing(parentProject).getTasks();
+            will(returnValue(taskContainer));
+        }});
+
+        final Set<Task> set
+                = new LinkedHashSet<Task>();   //using a LinkedHashSet rather than TreeSet (which is what gradle uses) so I don't have to deal with compareTo() being called on mock objects.
+
+        if (taskArray != null && taskArray.length != 0) {
+            set.addAll(Arrays.asList(taskArray));
+
+            //set the parent project of the tasks
+            for (int index = 0; index < taskArray.length; index++) {
+                final Task task = taskArray[index];
+
+                context.checking(new Expectations() {{
+                    allowing(task).getProject();
+                    will(returnValue(parentProject));
+                }});
+            }
+        }
+
+        //populate the task container (this may be an empty set)
+        context.checking(new Expectations() {{
+            allowing(taskContainer).iterator();
+            will(returnIterator(set));
+        }});
+    }
+
+    private static void assignDefaultTasks(JUnit4Mockery context, final Project project, final String... defaultTasksArray) {
+        final List<String> defaultTaskList = new ArrayList<String>();
+
+        if (defaultTasksArray != null && defaultTasksArray.length != 0) {
+            defaultTaskList.addAll(Arrays.asList(defaultTasksArray));
+        }
+
+        context.checking(new Expectations() {{
+            allowing(project).getDefaultTasks();
+            will(returnValue(defaultTaskList));
+        }});
+    }
+
+    private static void assignDependsOnProjects(JUnit4Mockery context, final Project project, final Project... dependsOnProjects) {
+        final Set<Project> set
+                = new LinkedHashSet<Project>();   //using a LinkedHashSet rather than TreeSet (which is what gradle uses) so I don't have to deal with compareTo() being called on mock objects.
+
+        if (dependsOnProjects != null && dependsOnProjects.length != 0) {
+            set.addAll(Arrays.asList(dependsOnProjects));
+        }
+
+        //populate the subprojects (this may be an empty set)
+        context.checking(new Expectations() {{
+            allowing(project).getDependsOnProjects();
+            will(returnValue(set));
+        }});
+    }
+
+    public static <T> void assertListContents(List<T> actualObjects, T... expectedObjectsArray) {
+        assertListContents(actualObjects, Arrays.asList(expectedObjectsArray));
+    }
+
+    public static <T> void assertListContents(List<T> actualObjects, List<T> expectedObjects) {
+        assertUnorderedListContents(actualObjects, expectedObjects);
+    }
+
+    /**
+     * This asserts the contents of the list are as expected. The important aspect of this function is that we don't care about ordering. We just want to make sure the contents are the same.
+     *
+     * @param actualObjecs the list to check
+     * @param expectedObjects what we expect in the list
+     */
+    public static <T> void assertUnorderedListContents(List<T> actualObjecs, List<T> expectedObjects) {
+        List<T> expectedObjecsList = new ArrayList<T>(expectedObjects);   //make a copy of it, so we can modify it.
+
+        while (!expectedObjecsList.isEmpty()) {
+            T expectedObject = expectedObjecsList.remove(0);
+
+            if (!actualObjecs.contains(expectedObject)) {
+                throw new AssertionFailedError("Failed to locate object. Sought object:\n" + expectedObject + "\n\nExpected:\n" + dumpList(expectedObjects) + "\nActual:\n" + dumpList(actualObjecs));
+            }
+        }
+
+        if (actualObjecs.size() != expectedObjects.size()) {
+            throw new AssertionFailedError("Expected " + expectedObjects.size() + " items but found " + actualObjecs.size() + "\nExpected:\n" + dumpList(expectedObjects) + "\nActual:\n" + dumpList(
+                    actualObjecs));
+        }
+    }
+
+    //function for getting a prettier dump of a list.
+
+    public static String dumpList(List list) {
+        if (list == null) {
+            return "[null]";
+        }
+        if (list.isEmpty()) {
+            return "[empty]";
+        }
+
+        StringBuilder builder = new StringBuilder();
+        Iterator iterator = list.iterator();
+        while (iterator.hasNext()) {
+            Object object = iterator.next();
+            if (object == null) {
+                builder.append("**** [null object in list] ****\n");
+            } else {
+                builder.append(object.toString()).append('\n');
+            }
+        }
+
+        return builder.toString();
+    }
+
+    /**
+     * This is an ExportInteraction implemention meant to be used by tests. You pass it a file to use and we'll return that in promptForFile. This also checks to ensure something doesn't happen where
+     * we get into an endless loop if promptForFile is called repeatedly. This can happen if promptForFile is called and its return value fails some form of validation which makes promptForFile get
+     * called again or if you deny overwriting the file. You'll get prompted again.
+     */
+    public static class TestExportInteraction implements DOM4JSerializer.ExportInteraction {
+        private File file;
+        private boolean confirmOverwrite;
+        private int promptCount;
+
+        public TestExportInteraction(File file, boolean confirmOverwrite) {
+            this.file = file;
+            this.confirmOverwrite = confirmOverwrite;
+        }
+
+        public File promptForFile(FileFilter fileFilters) {
+            if (promptCount == 100) {
+                throw new AssertionFailedError("Possible endless loop. PromptForFile has been called 100 times.");
+            }
+
+            promptCount++;
+            return file;
+        }
+
+        /**
+         * The file already exists. Confirm whether or not you want to overwrite it.
+         *
+         * @param file the file in question
+         * @return true to overwrite it, false not to.
+         */
+        public boolean confirmOverwritingExisingFile(File file) {
+            return confirmOverwrite;
+        }
+
+        public void reportError(String error) {
+            throw new AssertionFailedError("Unexpected error: " + error);
+        }
+    }
+
+    /**
+     * This is an ImportInteraction implementation meant to be used by tests. See TestExportInteraction for more information.
+     */
+    public static class TestImportInteraction implements DOM4JSerializer.ImportInteraction {
+        private File file;
+        private int promptCount;
+
+        public TestImportInteraction(File file) {
+            this.file = file;
+        }
+
+        public File promptForFile(FileFilter fileFilters) {
+            if (promptCount == 100) {
+                throw new AssertionFailedError("Possible endless loop. PromptForFile has been called 100 times.");
+            }
+
+            promptCount++;
+            return file;
+        }
+
+        public void reportError(String error) {
+            throw new AssertionFailedError("Unexpected error: " + error);
+        }
+    }
+
+    //wrapper around File.createTempFile just so we don't have to deal with the exception for tests.
+
+    /**
+     * This refreshes the projects but blocks until it is complete (its being executed in a separate process).
+     *
+     * @param gradlePluginLord the plugin lord (will be used to execute the command and store the results).
+     */
+    public static void refreshProjectsBlocking(GradlePluginLord gradlePluginLord, int maximumWaitValue, TimeUnit maximumWaitUnits) {
+        refreshProjectsBlocking(gradlePluginLord, new ExecuteGradleCommandServerProtocol.ExecutionInteraction() {
+            public void reportExecutionStarted() {
+            }
+
+            public void reportNumberOfTasksToExecute(int size) {
+            }
+
+            public void reportExecutionFinished(boolean wasSuccessful, String message, Throwable throwable) {
+            }
+
+            public void reportTaskStarted(String message, float percentComplete) {
+            }
+
+            public void reportTaskComplete(String message, float percentComplete) {
+            }
+
+            public void reportLiveOutput(String message) {
+            }
+        }, maximumWaitValue, maximumWaitUnits);
+    }
+
+    private static void refreshProjectsBlocking(GradlePluginLord gradlePluginLord, final ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction, int maximumWaitValue,
+                                                TimeUnit maximumWaitUnits) {
+        gradlePluginLord.startExecutionQueue();   //make sure its started
+
+        final CountDownLatch complete = new CountDownLatch(1);
+
+        GradlePluginLord.RequestObserver observer = new GradlePluginLord.RequestObserver() {
+            public void executionRequestAdded(ExecutionRequest request) {
+            }
+
+            public void refreshRequestAdded(RefreshTaskListRequest request) {
+                request.setExecutionInteraction(executionInteraction);
+            }
+
+            public void aboutToExecuteRequest(Request request) {
+            }
+
+            public void requestExecutionComplete(Request request, int result, String output) {
+                complete.countDown();
+            }
+        };
+
+        gradlePluginLord.addRequestObserver(observer,
+                false);   //add the observer before we add the request due to timing issues. It's possible for it to completely execute before we return from addRefreshRequestToQueue.
+        Request request = gradlePluginLord.addRefreshRequestToQueue();
+
+        //make sure we've got a request
+        Assert.assertNotNull(request);
+
+        //now wait until we're complete, but bail if we wait too long
+        boolean completed;
+        try {
+            completed = complete.await(maximumWaitValue, maximumWaitUnits);
+        } catch (InterruptedException e) {
+            throw UncheckedException.asUncheckedException(e);
+        }
+
+        gradlePluginLord.removeRequestObserver(observer);
+
+        if (!completed) {
+            //its still running. Something is wrong.
+            request.cancel(); //just to clean up after ourselves a little, cancel the request.
+            throw new AssertionFailedError("Failed to complete refresh in alotted time: " + maximumWaitValue + " " + maximumWaitUnits + ". Considering this failed.");
+        }
+    }
+
+    /**
+     * This executes a command and waits until it is finished.
+     *
+     * @param gradlePluginLord the plugin lord
+     * @param fullCommandLine the command to execute
+     * @param displayName the display name of the command. It doesn't usuall matter.
+     * @param executionInteraction this gets the results of the execution
+     * @param maximumWaitSeconds the maximum time to wait before considering it failed.
+     */
+    public static void executeBlocking(GradlePluginLord gradlePluginLord, String fullCommandLine, String displayName,
+                                       final ExecuteGradleCommandServerProtocol.ExecutionInteraction executionInteraction, int maximumWaitSeconds) {
+        gradlePluginLord.startExecutionQueue();   //make sure its started
+
+        final CountDownLatch complete = new CountDownLatch(1);
+
+        GradlePluginLord.RequestObserver observer = new GradlePluginLord.RequestObserver() {
+            public void executionRequestAdded(ExecutionRequest request) {
+                request.setExecutionInteraction(executionInteraction);
+            }
+
+            public void refreshRequestAdded(RefreshTaskListRequest request) {
+            }
+
+            public void aboutToExecuteRequest(Request request) {
+            }
+
+            public void requestExecutionComplete(Request request, int result, String output) {
+                complete.countDown();
+            }
+        };
+
+        gradlePluginLord.addRequestObserver(observer,
+                false);   //add the observer before we add the request due to timing issues. It's possible for it to completely execute before we return from addExecutionRequestToQueue.
+        Request request = gradlePluginLord.addExecutionRequestToQueue(fullCommandLine, displayName);
+
+        //make sure we've got a request
+        Assert.assertNotNull(request);
+
+        //now sleep until we're complete, but bail if we wait too long
+        boolean timeout;
+        try {
+            timeout = !complete.await(maximumWaitSeconds, TimeUnit.SECONDS);
+        } catch (InterruptedException e) {
+            throw UncheckedException.asUncheckedException(e);
+        }
+
+        gradlePluginLord.removeRequestObserver(observer);
+
+        if (timeout) {
+            //its still running. Something is wrong.
+            request.cancel(); //just to clean up after ourselves a little, cancel the request.
+            throw new AssertionFailedError("Failed to comlete execution in alotted time: " + maximumWaitSeconds + " seconds. Considering this failed.");
+        }
+    }
+}
+
diff --git a/subprojects/gradle-ui/ui.gradle b/subprojects/ui/ui.gradle
similarity index 100%
rename from subprojects/gradle-ui/ui.gradle
rename to subprojects/ui/ui.gradle
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/Wrapper.java b/subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/Wrapper.java
similarity index 100%
rename from subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/Wrapper.java
rename to subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/Wrapper.java
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/DistributionLocator.java b/subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/DistributionLocator.java
similarity index 100%
rename from subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/DistributionLocator.java
rename to subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/DistributionLocator.java
diff --git a/subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/WrapperScriptGenerator.java b/subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/WrapperScriptGenerator.java
new file mode 100644
index 0000000..78504f8
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/internal/WrapperScriptGenerator.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.api.tasks.wrapper.internal;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.tools.ant.taskdefs.Chmod;
+import org.gradle.api.UncheckedIOException;
+import org.gradle.util.AntUtil;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+
+/**
+ * @author Hans Dockter
+ */
+public class WrapperScriptGenerator {
+    public static final String UNIX_NL = "\n";
+    public static final String CURRENT_DIR_UNIX = "`dirname \"$0\"`";
+    public static final String WINDOWS_NL = "\n";
+    public static final String CURRENT_DIR_WINDOWS = "%DIRNAME%";
+    private static final String FULLY_QUALIFIED_WRAPPER_NAME = "org.gradle.wrapper.GradleWrapperMain";
+
+    public void generate(String jarPath, String wrapperPropertiesPath, File scriptFile) {
+        try {
+            createUnixScript(jarPath, scriptFile, wrapperPropertiesPath);
+            createWindowsScript(jarPath, scriptFile, wrapperPropertiesPath);
+        } catch (IOException e) {
+            throw new UncheckedIOException(e);
+        }
+    }
+
+    private void createUnixScript(String jarPath, File scriptFile, String wrapperPropertiesPath) throws IOException {
+        String unixWrapperScriptHead = IOUtils.toString(getClass().getResourceAsStream("unixWrapperScriptHead.txt"));
+        String unixWrapperScriptTail = IOUtils.toString(getClass().getResourceAsStream("unixWrapperScriptTail.txt"));
+
+        String fillingUnix = "" + UNIX_NL
+                + "STARTER_MAIN_CLASS=" + FULLY_QUALIFIED_WRAPPER_NAME + UNIX_NL
+                + "CLASSPATH=" + CURRENT_DIR_UNIX + "/" + FilenameUtils.separatorsToUnix(jarPath) + UNIX_NL
+                + "WRAPPER_PROPERTIES=" + CURRENT_DIR_UNIX + "/" + FilenameUtils.separatorsToUnix(wrapperPropertiesPath) + UNIX_NL;
+
+        String unixScript = unixWrapperScriptHead + fillingUnix + unixWrapperScriptTail;
+        File unixScriptFile = scriptFile;
+        FileUtils.writeStringToFile(unixScriptFile, unixScript);
+        createExecutablePermission(unixScriptFile);
+    }
+
+    private void createExecutablePermission(File unixScriptFile) {
+        Chmod chmod = new Chmod();
+        chmod.setProject(AntUtil.createProject());
+        chmod.setFile(unixScriptFile);
+        chmod.setPerm("ugo+rx");
+        chmod.execute();
+    }
+
+    private void createWindowsScript(String jarPath, File scriptFile, String wrapperPropertiesPath) throws IOException {
+        String windowsWrapperScriptHead = IOUtils.toString(getClass().getResourceAsStream("windowsWrapperScriptHead.txt"));
+        String windowsWrapperScriptTail = IOUtils.toString(getClass().getResourceAsStream("windowsWrapperScriptTail.txt"));
+        String fillingWindows = "" + WINDOWS_NL
+                + "set STARTER_MAIN_CLASS=" + FULLY_QUALIFIED_WRAPPER_NAME + WINDOWS_NL
+                + "set CLASSPATH=" + CURRENT_DIR_WINDOWS + "\\" + FilenameUtils.separatorsToWindows(jarPath) + WINDOWS_NL
+                + "set WRAPPER_PROPERTIES=" + CURRENT_DIR_WINDOWS + "\\" + FilenameUtils.separatorsToWindows(wrapperPropertiesPath) + WINDOWS_NL;
+        String windowsScript = windowsWrapperScriptHead + fillingWindows + windowsWrapperScriptTail;
+        File windowsScriptFile = new File(scriptFile.getParentFile(), scriptFile.getName() + ".bat");
+        FileUtils.writeStringToFile(windowsScriptFile, transformIntoWindowsNewLines(windowsScript));
+    }
+
+    private String transformIntoWindowsNewLines(String s) {
+        StringWriter writer = new StringWriter();
+        for (char c : s.toCharArray()) {
+            if (c == '\n') {
+                writer.write('\r');
+                writer.write('\n');
+            } else if (c != '\r') {
+                writer.write(c);
+            }
+        }        
+        return writer.toString();
+    }
+}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/package-info.java b/subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/package-info.java
similarity index 100%
rename from subprojects/gradle-wrapper/src/main/java/org/gradle/api/tasks/wrapper/package-info.java
rename to subprojects/wrapper/src/main/java/org/gradle/api/tasks/wrapper/package-info.java
diff --git a/subprojects/wrapper/src/main/java/org/gradle/wrapper/BootstrapMainStarter.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/BootstrapMainStarter.java
new file mode 100644
index 0000000..dae4d04
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/wrapper/BootstrapMainStarter.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.wrapper;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+/**
+ * @author Hans Dockter
+ */
+public class BootstrapMainStarter {
+    public void start(String[] args, File gradleHome) throws Exception {
+        File gradleJar = findLauncherJar(gradleHome);
+        URLClassLoader contextClassLoader = new URLClassLoader(new URL[]{gradleJar.toURI().toURL()});
+        Thread.currentThread().setContextClassLoader(contextClassLoader);
+        Class<?> mainClass = contextClassLoader.loadClass("org.gradle.launcher.GradleMain");
+        Method mainMethod = mainClass.getMethod("main", String[].class);
+        mainMethod.invoke(null, new Object[]{args});
+    }
+
+    private File findLauncherJar(File gradleHome) {
+        for (File file : new File(gradleHome, "lib").listFiles()) {
+            if (file.getName().matches("gradle-launcher-.*\\.jar")) {
+                return file;
+            }
+        }
+        throw new RuntimeException(String.format("Could not locate the Gradle launcher JAR in Gradle distribution '%s'.", gradleHome));
+    }
+}
diff --git a/subprojects/wrapper/src/main/java/org/gradle/wrapper/Download.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/Download.java
new file mode 100644
index 0000000..d5e441b
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/wrapper/Download.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007-2009 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.wrapper;
+
+import java.io.*;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+
+/**
+ * @author Hans Dockter
+ */
+public class Download implements IDownload {
+    private static final int PROGRESS_CHUNK = 20000;
+    private static final int BUFFER_SIZE = 10000;
+
+    public void download(URI address, File destination) throws Exception {
+        if (destination.exists()) {
+            return;
+        }
+        destination.getParentFile().mkdirs();
+
+        downloadInternal(address, destination);
+    }
+
+    private void downloadInternal(URI address, File destination) throws Exception {
+        OutputStream out = null;
+        URLConnection conn;
+        InputStream in = null;
+        try {
+            URL url = address.toURL();
+            out = new BufferedOutputStream(
+                    new FileOutputStream(destination));
+            conn = url.openConnection();
+            in = conn.getInputStream();
+            byte[] buffer = new byte[BUFFER_SIZE];
+            int numRead;
+            long progressCounter = 0;
+            while ((numRead = in.read(buffer)) != -1) {
+                progressCounter += numRead;
+                if (progressCounter / PROGRESS_CHUNK > 0) {
+                    System.out.print(".");
+                    progressCounter = progressCounter - PROGRESS_CHUNK;
+                }
+                out.write(buffer, 0, numRead);
+            }
+        } finally {
+            System.out.println("");
+            if (in != null) {
+                in.close();
+            }
+            if (out != null) {
+                out.close();
+            }
+        }
+    }
+
+
+}
diff --git a/subprojects/wrapper/src/main/java/org/gradle/wrapper/GradleWrapperMain.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/GradleWrapperMain.java
new file mode 100644
index 0000000..bf64543
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/wrapper/GradleWrapperMain.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.wrapper;
+
+import java.io.File;
+
+/**
+ * @author Hans Dockter
+ */
+public class GradleWrapperMain {
+    public static final String ALWAYS_UNPACK_ENV = "GRADLE_WRAPPER_ALWAYS_UNPACK";
+    public static final String ALWAYS_DOWNLOAD_ENV = "GRADLE_WRAPPER_ALWAYS_DOWNLOAD";
+    public static final String DEFAULT_GRADLE_USER_HOME = System.getProperty("user.home") + "/.gradle";
+    public static final String GRADLE_USER_HOME_PROPERTY_KEY = "gradle.user.home";
+    public static final String GRADLE_USER_HOME_ENV_KEY = "GRADLE_USER_HOME";
+
+    public static void main(String[] args) throws Exception {
+        addSystemProperties(args);
+        
+        boolean alwaysDownload = Boolean.parseBoolean(System.getenv(ALWAYS_DOWNLOAD_ENV));
+        boolean alwaysUnpack = Boolean.parseBoolean(System.getenv(ALWAYS_UNPACK_ENV));
+
+        new Wrapper().execute(
+                args,
+                new Install(alwaysDownload, alwaysUnpack, new Download(), new PathAssembler(gradleUserHome())),
+                new BootstrapMainStarter());
+    }
+
+    private static void addSystemProperties(String[] args) {
+        System.getProperties().putAll(SystemPropertiesHandler.getSystemProperties(args));
+        System.getProperties().putAll(SystemPropertiesHandler.getSystemProperties(new File(gradleUserHome(), "gradle.properties")));
+        System.getProperties().putAll(SystemPropertiesHandler.getSystemProperties(new File("gradle.properties")));
+    }
+
+    private static File gradleUserHome() {
+        String gradleUserHome = System.getProperty(GRADLE_USER_HOME_PROPERTY_KEY);
+        if (gradleUserHome != null) {
+            return new File(gradleUserHome);
+        } else if((gradleUserHome = System.getenv(GRADLE_USER_HOME_ENV_KEY)) != null) {
+            return new File(gradleUserHome);
+        } else {
+            return new File(DEFAULT_GRADLE_USER_HOME);
+        }
+    }
+}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/IDownload.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/IDownload.java
similarity index 100%
rename from subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/IDownload.java
rename to subprojects/wrapper/src/main/java/org/gradle/wrapper/IDownload.java
diff --git a/subprojects/wrapper/src/main/java/org/gradle/wrapper/Install.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/Install.java
new file mode 100644
index 0000000..b56f6cb
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/wrapper/Install.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.wrapper;
+
+import java.io.*;
+import java.net.URI;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * @author Hans Dockter
+ */
+public class Install {
+    private final IDownload download;
+    private final boolean alwaysDownload;
+    private final boolean alwaysUnpack;
+    private final PathAssembler pathAssembler;
+
+    public Install(boolean alwaysDownload, boolean alwaysUnpack, IDownload download, PathAssembler pathAssembler) {
+        this.alwaysDownload = alwaysDownload;
+        this.alwaysUnpack = alwaysUnpack;
+        this.download = download;
+        this.pathAssembler = pathAssembler;
+    }
+
+    public File createDist(URI distributionUrl, String distBase, String distPath, String zipBase, String zipPath) throws Exception {
+        File gradleHome = pathAssembler.gradleHome(distBase, distPath, distributionUrl);
+        if (!alwaysDownload && !alwaysUnpack && gradleHome.isDirectory()) {
+            return gradleHome;
+        }
+        File localZipFile = pathAssembler.distZip(zipBase, zipPath, distributionUrl);
+        if (alwaysDownload || !localZipFile.exists()) {
+            File tmpZipFile = new File(localZipFile.getParentFile(), localZipFile.getName() + ".part");
+            tmpZipFile.delete();
+            System.out.println("Downloading " + distributionUrl);
+            download.download(distributionUrl, tmpZipFile);
+            tmpZipFile.renameTo(localZipFile);
+        }
+        if (gradleHome.isDirectory()) {
+            System.out.println("Deleting directory " + gradleHome.getAbsolutePath());
+            deleteDir(gradleHome);
+        }
+        File distDest = gradleHome.getParentFile();
+        System.out.println("Unzipping " + localZipFile.getAbsolutePath() + " to " + distDest.getAbsolutePath());
+        unzip(localZipFile, distDest);
+        if (!gradleHome.isDirectory()) {
+            throw new RuntimeException(String.format(
+                    "Gradle distribution '%s' does not contain expected directory '%s'.", distributionUrl,
+                    gradleHome.getName()));
+        }
+        setExecutablePermissions(gradleHome);
+        return gradleHome;
+    }
+
+    private void setExecutablePermissions(File gradleHome) {
+        if (isWindows()) {
+            return;
+        }
+        File gradleCommand = new File(gradleHome, "bin/gradle");
+        String errorMessage = null;
+        try {
+            ProcessBuilder pb = new ProcessBuilder("chmod", "755", gradleCommand.getCanonicalPath());
+            Process p = pb.start();
+            if (p.waitFor() == 0) {
+                System.out.println("Set executable permissions for: " + gradleCommand.getAbsolutePath());
+            } else {
+                BufferedReader is = new BufferedReader(new InputStreamReader(p.getInputStream()));
+                errorMessage = "";
+                String line;
+                while ((line = is.readLine()) != null) {
+                    errorMessage += line + System.getProperty("line.separator");
+                }
+            }
+        } catch (IOException e) {
+            errorMessage = e.getMessage();
+        } catch (InterruptedException e) {
+            errorMessage = e.getMessage();
+        }
+        if (errorMessage != null) {
+            System.out.println("Could not set executable permissions for: " + gradleCommand.getAbsolutePath());
+            System.out.println("Please do this manually if you want to use the Gradle UI.");
+        }
+    }
+
+    private boolean isWindows() {
+        String osName = System.getProperty("os.name").toLowerCase(Locale.US);
+        if (osName.indexOf("windows") > -1) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean deleteDir(File dir) {
+        if (dir.isDirectory()) {
+            String[] children = dir.list();
+            for (int i = 0; i < children.length; i++) {
+                boolean success = deleteDir(new File(dir, children[i]));
+                if (!success) {
+                    return false;
+                }
+            }
+        }
+
+        // The directory is now empty so delete it
+        return dir.delete();
+    }
+
+    public void unzip(File zip, File dest) throws IOException {
+        Enumeration entries;
+        ZipFile zipFile;
+
+        zipFile = new ZipFile(zip);
+
+        entries = zipFile.entries();
+
+        while (entries.hasMoreElements()) {
+            ZipEntry entry = (ZipEntry) entries.nextElement();
+
+            if (entry.isDirectory()) {
+                (new File(dest, entry.getName())).mkdirs();
+                continue;
+            }
+
+            copyInputStream(zipFile.getInputStream(entry),
+                    new BufferedOutputStream(new FileOutputStream(new File(dest, entry.getName()))));
+        }
+        zipFile.close();
+    }
+
+    public void copyInputStream(InputStream in, OutputStream out) throws IOException {
+        byte[] buffer = new byte[1024];
+        int len;
+
+        while ((len = in.read(buffer)) >= 0) {
+            out.write(buffer, 0, len);
+        }
+
+        in.close();
+        out.close();
+    }
+
+}
diff --git a/subprojects/wrapper/src/main/java/org/gradle/wrapper/PathAssembler.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/PathAssembler.java
new file mode 100644
index 0000000..2eca50b
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/wrapper/PathAssembler.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.wrapper;
+
+import java.io.File;
+import java.net.URI;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author Hans Dockter
+ */
+public class PathAssembler {
+    public static final String GRADLE_USER_HOME_STRING = "GRADLE_USER_HOME";
+    public static final String PROJECT_STRING = "PROJECT";
+
+    private File gradleUserHome;
+
+    public PathAssembler() {
+    }
+
+    public PathAssembler(File gradleUserHome) {
+        this.gradleUserHome = gradleUserHome;
+    }
+
+    public File gradleHome(String distBase, String distPath, URI distUrl) {
+        return new File(getBaseDir(distBase), distPath + "/" + getDistHome(distUrl));
+    }
+
+    public File distZip(String zipBase, String zipPath, URI distUrl) {
+        return new File(getBaseDir(zipBase), zipPath + "/" + getDistName(distUrl));
+    }
+
+    private String getDistHome(URI distUrl) {
+        String name = getDistName(distUrl);
+        Matcher matcher = Pattern.compile("(\\p{Alpha}+-\\d+\\.\\d+.*?)(-\\p{Alpha}+)?\\.zip").matcher(name);
+        if (!matcher.matches()) {
+            throw new RuntimeException(String.format("Cannot determine Gradle version from distribution URL '%s'.",
+                    distUrl));
+        }
+        return matcher.group(1);
+    }
+
+    private String getDistName(URI distUrl) {
+        String path = distUrl.getPath();
+        int p = path.lastIndexOf("/");
+        if (p < 0) {
+            return path;
+        }
+        return path.substring(p + 1);
+    }
+
+    private File getBaseDir(String base) {
+        if (base.equals(GRADLE_USER_HOME_STRING)) {
+            return gradleUserHome;
+        } else if (base.equals(PROJECT_STRING)) {
+            return new File(System.getProperty("user.dir"));
+        } else {
+            throw new RuntimeException("Base: " + base + " is unknown");
+        }
+    }
+}
diff --git a/subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/SystemPropertiesHandler.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/SystemPropertiesHandler.java
similarity index 100%
rename from subprojects/gradle-wrapper/src/main/java/org/gradle/wrapper/SystemPropertiesHandler.java
rename to subprojects/wrapper/src/main/java/org/gradle/wrapper/SystemPropertiesHandler.java
diff --git a/subprojects/wrapper/src/main/java/org/gradle/wrapper/Wrapper.java b/subprojects/wrapper/src/main/java/org/gradle/wrapper/Wrapper.java
new file mode 100644
index 0000000..18a6a0e
--- /dev/null
+++ b/subprojects/wrapper/src/main/java/org/gradle/wrapper/Wrapper.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.wrapper;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.Properties;
+
+/**
+ * @author Hans Dockter
+ */
+public class Wrapper {
+    public static final String WRAPPER_PROPERTIES_PROPERTY = "org.gradle.wrapper.properties";
+    
+    public static final String DISTRIBUTION_URL_PROPERTY = "distributionUrl";
+    public static final String DISTRIBUTION_BASE_PROPERTY = "distributionBase";
+    public static final String ZIP_STORE_BASE_PROPERTY = "zipStoreBase";
+    public static final String DISTRIBUTION_PATH_PROPERTY = "distributionPath";
+    public static final String ZIP_STORE_PATH_PROPERTY = "zipStorePath";
+
+    public void execute(String[] args, Install install, BootstrapMainStarter bootstrapMainStarter) throws Exception {
+        Properties wrapperProperties = new Properties();
+        InputStream inStream = new FileInputStream(getWrapperPropertiesFile());
+        try {
+            wrapperProperties.load(inStream);
+        } finally {
+            inStream.close();
+        }
+        File gradleHome = install.createDist(
+                new URI(getProperty(wrapperProperties, DISTRIBUTION_URL_PROPERTY)),
+                getProperty(wrapperProperties, DISTRIBUTION_BASE_PROPERTY),
+                getProperty(wrapperProperties, DISTRIBUTION_PATH_PROPERTY),
+                getProperty(wrapperProperties, ZIP_STORE_BASE_PROPERTY),
+                getProperty(wrapperProperties, ZIP_STORE_PATH_PROPERTY)
+        );
+        bootstrapMainStarter.start(args, gradleHome);
+    }
+
+    private File getWrapperPropertiesFile() {
+        return new File(System.getProperty(WRAPPER_PROPERTIES_PROPERTY));
+    }
+
+    private String getProperty(Properties wrapperProperties, String propertyName) {
+        String value = wrapperProperties.getProperty(propertyName);
+        if (value == null) {
+            throw new RuntimeException(String.format(
+                    "No value with key '%s' specified in wrapper properties file '%s'.", propertyName,
+                    getWrapperPropertiesFile()));
+        }
+        return value;
+    }
+}
diff --git a/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptHead.txt b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptHead.txt
new file mode 100644
index 0000000..116fae7
--- /dev/null
+++ b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptHead.txt
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+##############################################################################
+##                                                                          ##
+##  Gradle wrapper script for UN*X                                         ##
+##                                                                          ##
+##############################################################################
+
+# Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
+# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m"
+# JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+
+GRADLE_APP_NAME=Gradle
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set JAVA_HOME if it's not already set.
+if [ -z "$JAVA_HOME" ] ; then
+    if $darwin ; then
+        [ -z "$JAVA_HOME" -a -d "/Library/Java/Home" ] && export JAVA_HOME="/Library/Java/Home"
+        [ -z "$JAVA_HOME" -a -d "/System/Library/Frameworks/JavaVM.framework/Home" ] && export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
+    else
+        javaExecutable="`which javac`"
+        [ -z "$javaExecutable" -o "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ] && die "JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME."
+        # readlink(1) is not available as standard on Solaris 10.
+        readLink=`which readlink`
+        [ `expr "$readLink" : '\([^ ]*\)'` = "no" ] && die "JAVA_HOME not set and readlink not available, please set JAVA_HOME."
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+        export JAVA_HOME="$javaHome"
+    fi
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched.
+if $cygwin ; then
+    [ -n "$JAVACMD" ] && JAVACMD=`cygpath --unix "$JAVACMD"`
+    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+fi
diff --git a/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptTail.txt b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptTail.txt
new file mode 100644
index 0000000..d86da84
--- /dev/null
+++ b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/unixWrapperScriptTail.txt
@@ -0,0 +1,97 @@
+# Determine the Java command to use to start the JVM.
+if [ -z "$JAVACMD" ] ; then
+    if [ -n "$JAVA_HOME" ] ; then
+        if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+            # IBM's JDK on AIX uses strange locations for the executables
+            JAVACMD="$JAVA_HOME/jre/sh/java"
+        else
+            JAVACMD="$JAVA_HOME/bin/java"
+        fi
+    else
+        JAVACMD="java"
+    fi
+fi
+if [ ! -x "$JAVACMD" ] ; then
+    die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+if [ -z "$JAVA_HOME" ] ; then
+    warn "JAVA_HOME environment variable is not set"
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name
+if $darwin; then
+    JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME"
+# we may also want to set -Xdock:image
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    JAVA_HOME=`cygpath --path --mixed "$JAVA_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done 
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+GRADLE_APP_BASE_NAME=`basename "$0"`
+
+exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \
+        -classpath "$CLASSPATH" \
+        -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \
+        -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
+        $STARTER_MAIN_CLASS \
+        "$@"
diff --git a/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptHead.txt b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptHead.txt
new file mode 100644
index 0000000..5e53a46
--- /dev/null
+++ b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptHead.txt
@@ -0,0 +1,57 @@
+ at if "%DEBUG%" == "" @echo off
+ at rem ##########################################################################
+ at rem                                                                         ##
+ at rem  Gradle startup script for Windows                                      ##
+ at rem                                                                         ##
+ at rem ##########################################################################
+
+ at rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+ at rem Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together.
+ at rem set GRADLE_OPTS=%GRADLE_OPTS% -Xmx512m
+ at rem set JAVA_OPTS=%JAVA_OPTS% -Xmx512m
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.\
+
+ at rem Find java.exe
+set JAVA_EXE=java.exe
+if not defined JAVA_HOME goto init
+
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+echo.
+goto end
+
+:init
+ at rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+ at rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+ at rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+ at rem Setup the command line
diff --git a/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptTail.txt b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptTail.txt
new file mode 100644
index 0000000..45deb2d
--- /dev/null
+++ b/subprojects/wrapper/src/main/resources/org/gradle/api/tasks/wrapper/internal/windowsWrapperScriptTail.txt
@@ -0,0 +1,21 @@
+
+set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%"
+
+ at rem Execute Gradle
+"%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS%
+
+:end
+ at rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
+
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit "%ERRORLEVEL%"
+exit /b "%ERRORLEVEL%"
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
\ No newline at end of file
diff --git a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/api/tasks/wrapper/WrapperTest.java b/subprojects/wrapper/src/test/groovy/org/gradle/api/tasks/wrapper/WrapperTest.java
similarity index 100%
rename from subprojects/gradle-wrapper/src/test/groovy/org/gradle/api/tasks/wrapper/WrapperTest.java
rename to subprojects/wrapper/src/test/groovy/org/gradle/api/tasks/wrapper/WrapperTest.java
diff --git a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/DownloadTest.groovy b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/DownloadTest.groovy
similarity index 100%
rename from subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/DownloadTest.groovy
rename to subprojects/wrapper/src/test/groovy/org/gradle/wrapper/DownloadTest.groovy
diff --git a/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/InstallTest.groovy b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/InstallTest.groovy
new file mode 100644
index 0000000..6f91633
--- /dev/null
+++ b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/InstallTest.groovy
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.gradle.wrapper
+
+import org.gradle.api.tasks.wrapper.Wrapper.PathBase
+import org.gradle.util.TemporaryFolder
+import org.junit.Before
+import org.junit.Rule
+import org.junit.Test
+import static org.junit.Assert.assertEquals
+
+/**
+ * @author Hans Dockter
+ */
+class InstallTest {
+    File testDir
+    Install install
+    String testZipBase
+    String testZipPath
+    String testDistBase
+    String testDistPath
+    URI testDistUrl
+    IDownload downloadMock
+    PathAssembler pathAssemblerMock;
+    boolean downloadCalled
+    File zip
+    File distributionDir
+    File zipStore
+    File gradleScript
+    File gradleHomeDir
+    File zipDestination
+    @Rule
+    public TemporaryFolder tmpDir = new TemporaryFolder();
+
+    @Before public void setUp() {
+        downloadCalled = false
+        testDir = tmpDir.dir
+        testZipBase = PathBase.PROJECT.toString()
+        testZipPath = 'someZipPath'
+        testDistBase = PathBase.GRADLE_USER_HOME.toString()
+        testDistPath = 'someDistPath'
+        testDistUrl = new URI('http://server/gradle-0.9.zip')
+        distributionDir = new File(testDir, testDistPath)
+        gradleHomeDir = new File(distributionDir, 'gradle-0.9')
+        zipStore = new File(testDir, 'zips');
+        zipDestination = new File(zipStore, 'gradle-0.9.zip')
+        install = new Install(false, false, createDownloadMock(), createPathAssemblerMock())
+    }
+
+    IDownload createDownloadMock() {
+        [download: {URI url, File destination ->
+            assertEquals(testDistUrl, url)
+            assertEquals(zipDestination.getAbsolutePath() + '.part', destination.getAbsolutePath())
+            zip = createTestZip()
+            downloadCalled = true
+        }] as IDownload
+    }
+
+    PathAssembler createPathAssemblerMock() {
+        [gradleHome: {String distBase, String distPath, URI distUrl ->
+            assertEquals(testDistBase, distBase)
+            assertEquals(testDistPath, distPath)
+            assertEquals(testDistUrl, distUrl)
+            gradleHomeDir},
+         distZip: { String zipBase, String zipPath, URI distUrl ->
+            assertEquals(testZipBase, zipBase)
+            assertEquals(testZipPath, zipPath)
+             assertEquals(testDistUrl, distUrl)
+            zipDestination
+        }] as PathAssembler
+    }
+
+    @Test public void testInit() {
+        assert !install.alwaysDownload
+        assert !install.alwaysUnpack
+    }
+
+    File createTestZip() {
+        File explodedZipDir = new File(testDir, 'explodedZip')
+        File binDir = new File(explodedZipDir, 'bin')
+        binDir.mkdirs()
+        gradleScript = new File(binDir, 'gradle')
+        gradleScript.write('something')
+        zipStore.mkdirs()
+        AntBuilder antBuilder = new AntBuilder()
+        antBuilder.zip(destfile: zipDestination.absolutePath + '.part') {
+            zipfileset(dir: explodedZipDir, prefix: 'gradle-0.9')
+        }
+        (zipDestination.absolutePath + '.part') as File
+    }
+
+    @Test public void testCreateDist() {
+        assertEquals(gradleHomeDir, install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath))
+        assert downloadCalled
+        assert distributionDir.isDirectory()
+        assert zipDestination.exists()
+        assert gradleScript.exists()
+//        assert new File(gradleHomeDir, "bin/gradle").canExecute()
+    }
+
+    @Test public void testCreateDistWithExistingRoot() {
+        distributionDir.mkdirs()
+        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
+        assert downloadCalled
+        assert gradleHomeDir.isDirectory()
+        assert gradleScript.exists()
+    }
+
+    @Test public void testCreateDistWithExistingDist() {
+        gradleHomeDir.mkdirs()
+        long lastModified = gradleHomeDir.lastModified()
+        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
+        assert !downloadCalled
+        assert lastModified == gradleHomeDir.lastModified()
+    }
+
+    @Test public void testCreateDistWithExistingDistAndZipAndAlwaysUnpackTrue() {
+        install = new Install(false, true, createDownloadMock(), createPathAssemblerMock())
+        createTestZip().renameTo(zipDestination)
+        gradleHomeDir.mkdirs()
+        File testFile = new File(gradleHomeDir, 'testfile')
+        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
+        assert distributionDir.isDirectory()
+        assert gradleScript.exists()
+        assert !testFile.exists()
+        assert !downloadCalled
+    }
+
+    @Test public void testCreateDistWithExistingZipAndDistAndAlwaysDownloadTrue() {
+        install = new Install(true, false, createDownloadMock(), createPathAssemblerMock())
+        createTestZip().renameTo(zipDestination)
+        distributionDir.mkdirs()
+        File testFile = new File(gradleHomeDir, 'testfile')
+        install.createDist(testDistUrl, testDistBase, testDistPath, testZipBase, testZipPath)
+        assert gradleHomeDir.isDirectory()
+        assert gradleScript.exists()
+        assert !testFile.exists()
+        assert downloadCalled
+    }
+}
diff --git a/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/PathAssemblerTest.java b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/PathAssemblerTest.java
new file mode 100644
index 0000000..12a3a63
--- /dev/null
+++ b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/PathAssemblerTest.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.wrapper;
+
+import org.junit.Test;
+
+import java.io.File;
+import java.net.URI;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author Hans Dockter
+ */
+public class PathAssemblerTest {
+    public static final String TEST_GRADLE_USER_HOME = "someUserHome";
+    private PathAssembler pathAssembler = new PathAssembler(new File(TEST_GRADLE_USER_HOME));
+
+    @Test
+    public void gradleHomeWithGradleUserHomeBase() throws Exception {
+        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/dist/gradle-0.9-bin.zip"));
+        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9"), gradleHome);
+    }
+
+    @Test
+    public void gradleHomeWithProjectBase() throws Exception {
+        File gradleHome = pathAssembler.gradleHome(PathAssembler.PROJECT_STRING, "somePath", new URI("http://server/dist/gradle-0.9-bin.zip"));
+        assertEquals(file(currentDirPath() + "/somePath/gradle-0.9"), gradleHome);
+    }
+
+    @Test
+    public void gradleHomeForUriWithNoPath() throws Exception {
+        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-0.9-bin.zip"));
+        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9"), gradleHome);
+    }
+
+    @Test
+    public void gradleHomeForSnapshotVersion() throws Exception {
+        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-0.9-some-branch-2010+1100-bin.zip"));
+        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9-some-branch-2010+1100"), gradleHome);
+    }
+
+    @Test
+    public void gradleHomeForUrlWithNoClassifier() throws Exception {
+        File gradleHome = pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-0.9.zip"));
+        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle-0.9"), gradleHome);
+    }
+
+    @Test
+    public void gradleHomeForUrlWithNoVersion() throws Exception {
+        try {
+            pathAssembler.gradleHome(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/gradle-bin.zip"));
+            fail();
+        } catch (RuntimeException e) {
+            assertEquals("Cannot determine Gradle version from distribution URL 'http://server/gradle-bin.zip'.", e.getMessage());
+        }
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void gradleHomeWithUnknownBase() throws Exception {
+        pathAssembler.gradleHome("unknownBase", "somePath", new URI("http://server/gradle.zip"));
+    }
+
+    @Test
+    public void distZipWithGradleUserHomeBase() throws Exception {
+        File dist = pathAssembler.distZip(PathAssembler.GRADLE_USER_HOME_STRING, "somePath", new URI("http://server/dist/gradle.zip"));
+        assertEquals(file(TEST_GRADLE_USER_HOME + "/somePath/gradle.zip"), dist);
+    }
+
+    @Test
+    public void distZipWithProjectBase() throws Exception {
+        File dist = pathAssembler.distZip(PathAssembler.PROJECT_STRING, "somePath", new URI("http://server/dist/gradle.zip"));
+        assertEquals(file(currentDirPath() + "/somePath/gradle.zip"), dist);
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void distZipWithUnknownBase() throws Exception {
+        pathAssembler.distZip("unknownBase", "somePath", new URI("http://server/dist/gradle.zip"));
+    }
+
+    private File file(String path) {
+        return new File(path);
+    }
+    
+    private String currentDirPath() {
+        return System.getProperty("user.dir");
+    }
+}
diff --git a/subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/SystemPropertiesHandlerTest.groovy b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/SystemPropertiesHandlerTest.groovy
similarity index 100%
rename from subprojects/gradle-wrapper/src/test/groovy/org/gradle/wrapper/SystemPropertiesHandlerTest.groovy
rename to subprojects/wrapper/src/test/groovy/org/gradle/wrapper/SystemPropertiesHandlerTest.groovy
diff --git a/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/WrapperTest.java b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/WrapperTest.java
new file mode 100644
index 0000000..e9eb283
--- /dev/null
+++ b/subprojects/wrapper/src/test/groovy/org/gradle/wrapper/WrapperTest.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2007-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.gradle.wrapper;
+
+import org.gradle.util.JUnit4GroovyMockery;
+import org.gradle.util.SetSystemProperties;
+import org.gradle.util.TemporaryFolder;
+import org.jmock.Expectations;
+import org.jmock.integration.junit4.JUnit4Mockery;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URI;
+import java.util.Properties;
+
+/**
+ * @author Hans Dockter
+ */
+ at RunWith(org.jmock.integration.junit4.JMock.class)
+public class WrapperTest {
+    Wrapper wrapper;
+    BootstrapMainStarter bootstrapMainStarterMock;
+    Install installMock;
+    final JUnit4Mockery context = new JUnit4GroovyMockery();
+    @Rule
+    public final SetSystemProperties systemProperties = new SetSystemProperties();
+    @Rule
+    public final TemporaryFolder tmpDir = new TemporaryFolder();
+    private File propertiesDir = tmpDir.getDir();
+    private File propertiesFile = new File(propertiesDir, "wrapper.properties");
+
+    @Before
+    public void setUp() throws IOException {
+        wrapper = new Wrapper();
+        bootstrapMainStarterMock = context.mock(BootstrapMainStarter.class);
+        installMock = context.mock(Install.class);
+        Properties testProperties = new Properties();
+        testProperties.load(WrapperTest.class.getResourceAsStream("/org/gradle/wrapper/wrapper.properties"));
+        testProperties.store(new FileOutputStream(propertiesFile), null);
+        System.setProperty(Wrapper.WRAPPER_PROPERTIES_PROPERTY, propertiesFile.getCanonicalPath());
+    }
+
+    @Test
+    public void execute() throws Exception {
+        final String[] expectedArgs = {"arg1", "arg2"};
+        final File expectedGradleHome = new File("somepath");
+        context.checking(new Expectations() {{
+          one(installMock).createDist(
+                  new URI("http://server/test/gradle.zip"),
+                  "testDistBase",
+                  "testDistPath",
+                  "testZipBase",
+                  "testZipPath"
+          ); will(returnValue(expectedGradleHome));
+          one(bootstrapMainStarterMock).start(expectedArgs, expectedGradleHome);
+        }});
+        wrapper.execute(expectedArgs, installMock, bootstrapMainStarterMock);
+    }
+}
diff --git a/subprojects/gradle-wrapper/src/test/resources/org/gradle/wrapper/wrapper.properties b/subprojects/wrapper/src/test/resources/org/gradle/wrapper/wrapper.properties
similarity index 100%
rename from subprojects/gradle-wrapper/src/test/resources/org/gradle/wrapper/wrapper.properties
rename to subprojects/wrapper/src/test/resources/org/gradle/wrapper/wrapper.properties
diff --git a/subprojects/wrapper/wrapper.gradle b/subprojects/wrapper/wrapper.gradle
new file mode 100644
index 0000000..eefd65e
--- /dev/null
+++ b/subprojects/wrapper/wrapper.gradle
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2010 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+apply plugin: 'groovy'
+
+dependencies {
+    groovy libraries.groovy_depends
+    compile project(':core')
+
+    compile libraries.commons_io, libraries.ant, libraries.ant_nodeps
+
+    testCompile project(path: ':core', configuration: 'testFixtures')
+    testRuntime project(path: ':core', configuration: 'testFixturesRuntime')
+}
+
+task wrapperJar(type: Jar) {
+    dependsOn compileJava, processResources
+    from sourceSets.main.classesDir
+    include 'org/gradle/wrapper/**'
+    archiveName = 'gradle-wrapper.jar'
+    destinationDir = sourceSets.main.classesDir
+    manifest.mainAttributes("Main-Class": 'org.gradle.wrapper.GradleWrapperMain')
+}
+
+classes {
+    dependsOn wrapperJar
+}
diff --git a/wrapper/archetype.gradle b/wrapper/archetype.gradle
deleted file mode 100644
index bfdcfad..0000000
--- a/wrapper/archetype.gradle
+++ /dev/null
@@ -1,5 +0,0 @@
-task archetype << {
-    sourceSets.all.each { sourceSet ->
-        allSource.sourceTrees.srcDirs.flatten().each { project.mkdir(it) }
-    }
-}
\ No newline at end of file
diff --git a/wrapper/gradle-wrapper.properties b/wrapper/gradle-wrapper.properties
deleted file mode 100644
index 59555db..0000000
--- a/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright 2010 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-#Wed Nov 18 15:48:45 EST 2009
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-distributionVersion=0.9
-zipStorePath=wrapper/dists
-urlRoot=http\://gradle.artifactoryonline.com/gradle/distributions
-distributionName=gradle
-distributionClassifier=bin

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/gradle-1.12.git



More information about the pkg-java-commits mailing list