public class BaseSettings extends Object implements SettingsInternal
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BUILD_SRC_DIR |
DEFAULT_SETTINGS_FILE| Modifier | Constructor and Description |
|---|---|
protected |
BaseSettings() |
|
BaseSettings(GradleInternal gradle,
IProjectDescriptorRegistry projectDescriptorRegistry,
URLClassLoader classloader,
File settingsDir,
ScriptSource settingsScript,
StartParameter startParameter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDynamicProperties(Map<String,?> properties) |
DefaultProjectDescriptor |
createProjectDescriptor(DefaultProjectDescriptor parent,
String name,
File dir) |
DefaultProjectDescriptor |
findProject(File projectDir)
Returns the project with the given project directory.
|
DefaultProjectDescriptor |
findProject(String path)
Returns the project with the given path.
|
URLClassLoader |
getClassLoader() |
protected DynamicObject |
getDynamicObject() |
GradleInternal |
getGradle()
Returns the
Gradle instance for the current build. |
IProjectDescriptorRegistry |
getProjectDescriptorRegistry() |
IProjectRegistry<DefaultProjectDescriptor> |
getProjectRegistry() |
File |
getRootDir()
Returns the root directory of the build.
|
ProjectDescriptor |
getRootProject()
Returns the root project of the build.
|
Settings |
getSettings()
Returns this settings object.
|
File |
getSettingsDir()
Returns the settings directory of the build.
|
ScriptSource |
getSettingsScript() |
StartParameter |
getStartParameter()
Returns the set of parameters used to invoke this instance of Gradle.
|
void |
include(String[] projectPaths)
Adds the given projects to the build.
|
void |
includeFlat(String[] projectNames)
Adds the given projects to the build.
|
DefaultProjectDescriptor |
project(File projectDir)
Returns the project with the given project directory.
|
DefaultProjectDescriptor |
project(String path)
Returns the project with the given path.
|
void |
setProjectDescriptorRegistry(IProjectDescriptorRegistry projectDescriptorRegistry) |
void |
setRootProjectDescriptor(DefaultProjectDescriptor rootProjectDescriptor) |
void |
setSettingsDir(File settingsDir) |
void |
setSettingsScript(ScriptSource settingsScript) |
void |
setStartParameter(StartParameter startParameter) |
String |
toString() |
public static final String DEFAULT_BUILD_SRC_DIR
protected BaseSettings()
public BaseSettings(GradleInternal gradle, IProjectDescriptorRegistry projectDescriptorRegistry, URLClassLoader classloader, File settingsDir, ScriptSource settingsScript, StartParameter startParameter)
public GradleInternal getGradle()
SettingsGradle instance for the current build.public Settings getSettings()
SettingsReturns this settings object.
getSettings in interface Settingspublic DefaultProjectDescriptor createProjectDescriptor(DefaultProjectDescriptor parent, String name, File dir)
public DefaultProjectDescriptor findProject(String path)
SettingsReturns the project with the given path.
findProject in interface Settingspath - The pathpublic DefaultProjectDescriptor findProject(File projectDir)
SettingsReturns the project with the given project directory.
findProject in interface SettingsprojectDir - The project directory.public DefaultProjectDescriptor project(String path)
SettingsReturns the project with the given path.
public DefaultProjectDescriptor project(File projectDir)
SettingsReturns the project with the given project directory.
public void include(String[] projectPaths)
SettingsAdds the given projects to the build. Each path in the supplied list is treated as the path of a project to add to the build. Note that these path are not file paths, but instead specify the location of the new project in the project heirarchy. As such, the supplied paths must use the ':' character as separator.
The last element of the supplied path is used as the project name. The supplied path is converted to a project directory relative to the root project directory.
As an example, the path a:b adds a project with path :a:b, name b and project
directory $rootDir/a/b.
public void includeFlat(String[] projectNames)
SettingsAdds the given projects to the build. Each name in the supplied list is treated as the name of a project to add to the build.
The supplied name is converted to a project directory relative to the parent directory of the root project directory.
As an example, the name a add a project with path :a, name a and project directory
$rootDir/../a.
includeFlat in interface SettingsprojectNames - the projects to add.public URLClassLoader getClassLoader()
getClassLoader in interface SettingsInternalpublic ProjectDescriptor getRootProject()
SettingsReturns the root project of the build.
getRootProject in interface Settingspublic void setRootProjectDescriptor(DefaultProjectDescriptor rootProjectDescriptor)
public File getRootDir()
SettingsReturns the root directory of the build. The root directory is the project directory of the root project.
getRootDir in interface Settingspublic StartParameter getStartParameter()
SettingsReturns the set of parameters used to invoke this instance of Gradle.
getStartParameter in interface SettingsgetStartParameter in interface SettingsInternalpublic void setStartParameter(StartParameter startParameter)
public File getSettingsDir()
SettingsReturns the settings directory of the build. The settings directory is the directory containing the settings file.
getSettingsDir in interface Settingspublic void setSettingsDir(File settingsDir)
public ScriptSource getSettingsScript()
getSettingsScript in interface SettingsInternalpublic void setSettingsScript(ScriptSource settingsScript)
public IProjectDescriptorRegistry getProjectDescriptorRegistry()
public void setProjectDescriptorRegistry(IProjectDescriptorRegistry projectDescriptorRegistry)
protected DynamicObject getDynamicObject()
public IProjectRegistry<DefaultProjectDescriptor> getProjectRegistry()
getProjectRegistry in interface SettingsInternalCopyright © 2013. All rights reserved