Interface EclipseProject
- All Superinterfaces:
Element
,HasGradleProject
,HierarchicalEclipseProject
,HierarchicalElement
,Model
,ProjectModel
Note that the names of Eclipse projects are unique, and can be used as an identifier for the project.
- Since:
- 1.0-milestone-3
-
Method Summary
Modifier and TypeMethodDescriptionDomainObjectSet<? extends EclipseBuildCommand>
Returns the Eclipse build commands configured on the project.DomainObjectSet<? extends EclipseProject>
Returns the child elements, or the empty set if there are no child elements.DomainObjectSet<? extends EclipseExternalDependency>
Returns the external dependencies which make up the classpath of this project.DomainObjectSet<? extends EclipseClasspathContainer>
Returns the Eclipse classpath containers defined on the project.The gradle project that is associated with this project.Returns the Java source settings for this project.Returns the output location of this project.Returns the parent of this element, ornull
if there is no parent.DomainObjectSet<? extends EclipseProjectNature>
Returns the Eclipse natures configured on the project.Methods inherited from interface org.gradle.tooling.model.Element
getDescription, getName
Methods inherited from interface org.gradle.tooling.model.HasGradleProject
getProjectIdentifier
Methods inherited from interface org.gradle.tooling.model.eclipse.HierarchicalEclipseProject
getLinkedResources, getProjectDependencies, getProjectDirectory, getSourceDirectories
-
Method Details
-
getParent
EclipseProject getParent()Returns the parent of this element, ornull
if there is no parent.- Specified by:
getParent
in interfaceHierarchicalEclipseProject
- Specified by:
getParent
in interfaceHierarchicalElement
- Returns:
- The parent of this element, or
null
if there is no parent.
-
getChildren
DomainObjectSet<? extends EclipseProject> getChildren()Returns the child elements, or the empty set if there are no child elements.- Specified by:
getChildren
in interfaceHierarchicalEclipseProject
- Specified by:
getChildren
in interfaceHierarchicalElement
- Returns:
- The child elements, or the empty set if there are no child elements.
-
getJavaSourceSettings
@Nullable @Incubating EclipseJavaSourceSettings getJavaSourceSettings() throws UnsupportedMethodExceptionReturns the Java source settings for this project.- Returns:
- the settings for Java sources or
null
if not a Java element. - Throws:
UnsupportedMethodException
- For Gradle versions older than 2.10, where this method is not supported.- Since:
- 2.10
-
getGradleProject
GradleProject getGradleProject()The gradle project that is associated with this project. Typically, a single Eclipse project corresponds to a single gradle project.See
HasGradleProject
- Specified by:
getGradleProject
in interfaceHasGradleProject
- Returns:
- associated gradle project
- Since:
- 1.0-milestone-5
-
getClasspath
DomainObjectSet<? extends EclipseExternalDependency> getClasspath()Returns the external dependencies which make up the classpath of this project.- Returns:
- The dependencies. Returns an empty set if the project has no external dependencies.
- Since:
- 1.0-milestone-3
-
getProjectNatures
@Incubating DomainObjectSet<? extends EclipseProjectNature> getProjectNatures() throws UnsupportedMethodExceptionReturns the Eclipse natures configured on the project.Some natures are automatically added to the result based on the Gradle plugins applied on the project. For example, if the project applies the 'java' plugin the result will contain the
"org.eclipse.jdt.core.javanature"
entry. Note, that the exact list of automatically added natures is not part of the API and can vary between Gradle releases.The result can be customized via the 'eclipse' plugin configuration.
- Returns:
- The list of Eclipse project natures.
- Throws:
UnsupportedMethodException
- For Gradle versions older than 2.9, where this method is not supported.- Since:
- 2.9
-
getBuildCommands
@Incubating DomainObjectSet<? extends EclipseBuildCommand> getBuildCommands() throws UnsupportedMethodExceptionReturns the Eclipse build commands configured on the project.Some build commands are automatically added to the result based on the Gradle plugins applied on the project. For example, if the project applies the 'java' plugin the result will contain the
"org.eclipse.jdt.core.javabuilder"
build command. Note, that the exact list of automatically added build commands is not part of the API and can vary between Gradle releases.The result can be customized via the 'eclipse' plugin configuration.
- Returns:
- The list of Eclipse build commands.
- Throws:
UnsupportedMethodException
- For Gradle versions older than 2.9, where this method is not supported.- Since:
- 2.9
-
getClasspathContainers
@Incubating DomainObjectSet<? extends EclipseClasspathContainer> getClasspathContainers() throws UnsupportedMethodExceptionReturns the Eclipse classpath containers defined on the project.- Returns:
- The list of classpath containers.
- Throws:
UnsupportedMethodException
- For Gradle versions older than 3.0, where this method is not supported.- Since:
- 3.0
-
getOutputLocation
Returns the output location of this project.- Returns:
- The project's output location.
- Throws:
UnsupportedMethodException
- For Gradle versions older than 3.0, where this method is not supported.- Since:
- 3.0
-