Package org.gradle.tooling.model
Interface GradleProject
-
- All Superinterfaces:
BuildableElement,Element,HierarchicalElement,Model,ProjectModel
public interface GradleProject extends HierarchicalElement, BuildableElement, ProjectModel
Represents a Gradle project.- Since:
- 1.0-milestone-5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GradleProjectfindByPath(java.lang.String path)Searches all descendants (children, grand-children, etc.), including self, by given path.java.io.FilegetBuildDirectory()Returns the build directory for this project.GradleScriptgetBuildScript()Returns the build script for this project.DomainObjectSet<? extends GradleProject>getChildren()Returns the child elements, or the empty set if there are no child elements.GradleProjectgetParent()Returns the parent of this element, ornullif there is no parent.java.lang.StringgetPath()Returns the path of this project.java.io.FilegetProjectDirectory()Returns the project directory for this project.ProjectIdentifiergetProjectIdentifier()Returns the identifier for this Gradle project.DomainObjectSet<? extends GradleTask>getTasks()Returns the tasks of this project.-
Methods inherited from interface org.gradle.tooling.model.Element
getDescription, getName
-
-
-
-
Method Detail
-
getProjectIdentifier
ProjectIdentifier getProjectIdentifier()
Returns the identifier for this Gradle project.- Specified by:
getProjectIdentifierin interfaceProjectModel- Since:
- 2.13
-
getTasks
DomainObjectSet<? extends GradleTask> getTasks()
Returns the tasks of this project.- Specified by:
getTasksin interfaceBuildableElement- Returns:
- The tasks of this project.
-
getParent
GradleProject getParent()
Returns the parent of this element, ornullif there is no parent.- Specified by:
getParentin interfaceHierarchicalElement- Returns:
- The parent of this element, or
nullif there is no parent.
-
getChildren
DomainObjectSet<? extends GradleProject> getChildren()
Returns the child elements, or the empty set if there are no child elements.- Specified by:
getChildrenin interfaceHierarchicalElement- Returns:
- The child elements, or the empty set if there are no child elements.
-
getPath
java.lang.String getPath()
Returns the path of this project. This is a unique identifier for this project within the build.- Returns:
- The path.
-
findByPath
@Nullable GradleProject findByPath(java.lang.String path)
Searches all descendants (children, grand-children, etc.), including self, by given path.- Returns:
- Gradle project with matching path or
nullif not found.
-
getBuildScript
GradleScript getBuildScript() throws UnsupportedMethodException
Returns the build script for this project.- Returns:
- The build script.
- Throws:
UnsupportedMethodException- For Gradle versions older than 1.8, where this method is not supported.- Since:
- 1.8
-
getBuildDirectory
java.io.File getBuildDirectory() throws UnsupportedMethodExceptionReturns the build directory for this project.- Returns:
- The build directory.
- Throws:
UnsupportedMethodException- For Gradle versions older than 2.0, where this method is not supported.- Since:
- 2.0
-
getProjectDirectory
java.io.File getProjectDirectory() throws UnsupportedMethodExceptionReturns the project directory for this project.- Returns:
- The project directory.
- Throws:
UnsupportedMethodException- For Gradle versions older than 2.4, where this method is not supported.- Since:
- 2.4
-
-