org.gradle.api.tasks.ide.eclipse
Class EclipseClasspath

java.lang.Object
  extended by org.gradle.api.internal.AbstractTask
      extended by org.gradle.api.DefaultTask
          extended by org.gradle.api.internal.ConventionTask
              extended by org.gradle.api.tasks.ide.eclipse.EclipseClasspath
All Implemented Interfaces:
groovy.lang.GroovyObject, java.lang.Comparable<Task>, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Task

public class EclipseClasspath
extends org.gradle.api.internal.ConventionTask

Generates an eclipse .classpath file.


Field Summary
static java.lang.String CLASSPATH_FILE_NAME
           
 
Fields inherited from interface org.gradle.api.Task
AUTOSKIP_PROPERTY_PREFIX, TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
 
Constructor Summary
EclipseClasspath(Project project, java.lang.String name)
           
 
Method Summary
 java.util.List<java.lang.Object> getClasspathLibs()
          Returns a list with library paths to be transformed into eclipse lib dependencies.
 boolean getFailForMissingDependencies()
          Returns whether the build should fail if lib dependencies intended to be used by this task can not be resolved.
 java.lang.Object getOutputDirectory()
          Returns the eclipse output directory for compiled sources
 java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> getProjectDependencies()
          Returns the project dependencies to be transformed into eclipse project dependencies.
 java.util.List<java.lang.Object> getSrcDirs()
          A list of directories which contain the sources.
 java.lang.Object getTestOutputDirectory()
          Returns the eclipse output directory for compiled test sources
 java.util.List getTestSrcDirs()
          Returns a list of paths to be transformed into eclipse test source dirs.
 void setClasspathLibs(java.util.List<java.lang.Object> classpathLibs)
          Sets a list with library paths to be transformed into eclipse lib dependencies.
 void setFailForMissingDependencies(boolean failForMissingDependencies)
          Sets whether the build should fail if lib dependencies intended to be used by this task can not be resolved.
 void setOutputDirectory(java.lang.Object outputDirectory)
          Sets the eclipse output directory for compiled sources.
 void setProjectDependencies(java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> projectDependencies)
          Sets the project dependencies to be transformed into eclipse project dependencies.
 void setSrcDirs(java.util.List<java.lang.Object> srcDirs)
          Sets a list of paths to be transformed into eclipse source dirs.
 void setTestOutputDirectory(java.lang.Object testOutputDirectory)
          Sets the eclipse output directory for compiled test sources.
 void setTestSrcDirs(java.util.List testSrcDirs)
          Sets a list of paths to be transformed into eclipse test source dirs.
 
Methods inherited from class org.gradle.api.internal.ConventionTask
conv, conventionMapping, conventionMapping, conventionProperty, getConventionAwareHelper, getConventionMapping, setConventionAwareHelper, setConventionMapping
 
Methods inherited from class org.gradle.api.DefaultTask
configure, doFirst, doLast, leftShift, methodMissing, propertyMissing, setProperty
 
Methods inherited from class org.gradle.api.internal.AbstractTask
captureStandardOutput, compareTo, defineProperty, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuted, getLogger, getName, getPath, getProject, getSkipProperties, getStandardOutputCapture, getTaskDependencies, hashCode, hasProperty, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setProject, setSkipProperties, setStandardOutputCapture, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface groovy.lang.GroovyObject
getMetaClass, getProperty, invokeMethod, setMetaClass
 

Field Detail

CLASSPATH_FILE_NAME

public static final java.lang.String CLASSPATH_FILE_NAME
See Also:
Constant Field Values
Constructor Detail

EclipseClasspath

public EclipseClasspath(Project project,
                        java.lang.String name)
Method Detail

getSrcDirs

public java.util.List<java.lang.Object> getSrcDirs()
A list of directories which contain the sources. The directories are specified by a relative path to the project root.

Returns:
list of directories which contain the sources.

setSrcDirs

public void setSrcDirs(java.util.List<java.lang.Object> srcDirs)
Sets a list of paths to be transformed into eclipse source dirs. This list should contain also contain the paths to resources directories. The assigned path may be described by an absolute or a relative path. A relative path is interpreted as relative to the project root dir. An absolute path is transformed into a relative path in the resulting eclipse file. If an absolute source path is not a sub directory of project root an GradleException is thrown at execution time.

Parameters:
srcDirs - An list with objects which toString value is interpreted as a path

getTestSrcDirs

public java.util.List getTestSrcDirs()
Returns a list of paths to be transformed into eclipse test source dirs.

See Also:
(java.util.List)

setTestSrcDirs

public void setTestSrcDirs(java.util.List testSrcDirs)
Sets a list of paths to be transformed into eclipse test source dirs. This list should contain also contain the paths to test resources directories. The assigned path may be described by an absolute or a relative path. A relative path is interpreted as relative to the project root dir. An absolute path is transformed into a relative path in the resulting eclipse file. If an absolute source path is not a sub directory of project root an GradleException is thrown at execution time.

Parameters:
testSrcDirs - An list with objects which toString value is interpreted as a path

getOutputDirectory

public java.lang.Object getOutputDirectory()
Returns the eclipse output directory for compiled sources

See Also:
setOutputDirectory(Object)

setOutputDirectory

public void setOutputDirectory(java.lang.Object outputDirectory)
Sets the eclipse output directory for compiled sources. The assigned path may be described by an absolute or a relative path. A relative path is interpreted as relative to the project root dir. An absolute path is transformed into a relative path in the resulting eclipse file. If an absolute source path is not a sub directory of project root an GradleException is thrown at execution time.

Parameters:
outputDirectory - An object which toString value is interpreted as a path

getTestOutputDirectory

public java.lang.Object getTestOutputDirectory()
Returns the eclipse output directory for compiled test sources

See Also:
setTestOutputDirectory(Object)

setTestOutputDirectory

public void setTestOutputDirectory(java.lang.Object testOutputDirectory)
Sets the eclipse output directory for compiled test sources. The assigned path may be described by an absolute or a relative path. A relative path is interpreted as relative to the project root dir. An absolute path is transformed into a relative path in the resulting eclipse file. If an absolute source path is not a sub directory of project root an GradleException is thrown at execution time.

Parameters:
testOutputDirectory - An object which toString value is interpreted as a path

getProjectDependencies

public java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> getProjectDependencies()
Returns the project dependencies to be transformed into eclipse project dependencies.

See Also:
setProjectDependencies(java.util.List)

setProjectDependencies

public void setProjectDependencies(java.util.List<org.gradle.api.internal.artifacts.dependencies.DefaultProjectDependency> projectDependencies)
Sets the project dependencies to be transformed into eclipse project dependencies.

Parameters:
projectDependencies -

getClasspathLibs

public java.util.List<java.lang.Object> getClasspathLibs()
Returns a list with library paths to be transformed into eclipse lib dependencies.

See Also:
setClasspathLibs(java.util.List)

setClasspathLibs

public void setClasspathLibs(java.util.List<java.lang.Object> classpathLibs)
Sets a list with library paths to be transformed into eclipse lib dependencies.

Parameters:
classpathLibs - An list with objects which toString value is interpreted as a path

getFailForMissingDependencies

public boolean getFailForMissingDependencies()
Returns whether the build should fail if lib dependencies intended to be used by this task can not be resolved.

See Also:
setFailForMissingDependencies(boolean)

setFailForMissingDependencies

public void setFailForMissingDependencies(boolean failForMissingDependencies)
Sets whether the build should fail if lib dependencies intended to be used by this task can not be resolved. It is important to note that this task does not do any resolve. The purpose of this property is to inform for example a plugin which configures this task. This plugin is supposed to make the build fail, if not all the dependencies it intends to assign to this task can be resolved.

Parameters:
failForMissingDependencies -