public interface EclipseProject extends HierarchicalEclipseProject, HasGradleProject, JavaSourceAware
Note that the names of Eclipse projects are unique, and can be used as an identifier for the project.
Modifier and Type | Method and Description |
---|---|
DomainObjectSet<? extends EclipseBuildCommand> |
getBuildCommands()
Returns the Eclipse build commands configured on the project.
|
DomainObjectSet<? extends EclipseProject> |
getChildren()
Returns the child elements, or the empty set if there are no child elements.
|
DomainObjectSet<? extends ExternalDependency> |
getClasspath()
Returns the external dependencies which make up the classpath of this project.
|
GradleProject |
getGradleProject()
The gradle project that is associated with this project.
|
EclipseJavaSourceSettings |
getJavaSourceSettings()
Returns the settings for Java sources or
null if not a Java element. |
EclipseProject |
getParent()
Returns the parent of this element, or
null if there is no parent. |
DomainObjectSet<? extends EclipseProjectNature> |
getProjectNatures()
Returns the Eclipse natures configured on the project.
|
getLinkedResources, getProjectDependencies, getProjectDirectory, getSourceDirectories
getDescription, getName
EclipseProject getParent()
null
if there is no parent.getParent
in interface HierarchicalEclipseProject
getParent
in interface HierarchicalElement
null
if there is no parent.DomainObjectSet<? extends EclipseProject> getChildren()
getChildren
in interface HierarchicalEclipseProject
getChildren
in interface HierarchicalElement
@Nullable EclipseJavaSourceSettings getJavaSourceSettings()
null
if not a Java element.getJavaSourceSettings
in interface JavaSourceAware
GradleProject getGradleProject()
See HasGradleProject
getGradleProject
in interface HasGradleProject
DomainObjectSet<? extends ExternalDependency> getClasspath()
@Incubating DomainObjectSet<? extends EclipseProjectNature> getProjectNatures() throws UnsupportedMethodException
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.
UnsupportedMethodException
- For Gradle versions older than 2.9, where this method is not supported.@Incubating DomainObjectSet<? extends EclipseBuildCommand> getBuildCommands() throws UnsupportedMethodException
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.
UnsupportedMethodException
- For Gradle versions older than 2.9, where this method is not supported.