Groovy Documentation

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

java.lang.Object
  org.gradle.api.internal.AbstractTask
      org.gradle.api.DefaultTask
          org.gradle.api.internal.ConventionTask
              org.gradle.api.tasks.ide.eclipse.EclipseClasspath

class EclipseClasspath
extends ConventionTask

Generates an eclipse .classpath file.

author:
Hans Dockter


Field Summary
static java.lang.String CLASSPATH_FILE_NAME

 
Constructor Summary
EclipseClasspath(Project project, java.lang.String name)

 
Method Summary
List 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

List getProjectDependencies()

Returns the project dependencies to be transformed into eclipse project dependencies.

List getSrcDirs()

A list of directories which contain the sources.

java.lang.Object getTestOutputDirectory()

Returns the eclipse output directory for compiled test sources

List getTestSrcDirs()

Returns a list of paths to be transformed into eclipse test source dirs.

void setClasspathLibs(List 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(List projectDependencies)

Sets the project dependencies to be transformed into eclipse project dependencies.

void setSrcDirs(List 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(List testSrcDirs)

Sets a list of paths to be transformed into eclipse test source dirs.

 
Methods inherited from class ConventionTask
conv, conventionMapping, conventionMapping, conventionProperty, getConventionAwareHelper, getConventionMapping, setConventionAwareHelper, setConventionMapping
 
Methods inherited from class DefaultTask
leftShift, methodMissing, propertyMissing
 
Methods inherited from class 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, hasProperty, hashCode, isDidWork, isEnabled, isExecuted, onlyIf, onlyIf, property, setActions, setAdditionalProperties, setDependsOn, setDescription, setDidWork, setEnabled, setExecuted, setName, setProject, setProperty, setSkipProperties, setStandardOutputCapture, toString
 
Methods inherited from class java.lang.Object
hashCode, getClass, equals, toString, wait, wait, wait, notify, notifyAll
 

Field Detail

CLASSPATH_FILE_NAME

static final java.lang.String CLASSPATH_FILE_NAME


 
Constructor Detail

EclipseClasspath

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


 
Method Detail

getClasspathLibs

public List getClasspathLibs()
Returns a list with library paths to be transformed into eclipse lib dependencies.
see:
#setClasspathLibs(java.util.List)


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:
#setFailForMissingDependencies(boolean)


getOutputDirectory

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


getProjectDependencies

public List getProjectDependencies()
Returns the project dependencies to be transformed into eclipse project dependencies.
see:
#setProjectDependencies(java.util.List)


getSrcDirs

public List getSrcDirs()
A list of directories which contain the sources. The directories are specified by a relative path to the project root.
return:
list of directories which contain the sources.


getTestOutputDirectory

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


getTestSrcDirs

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


setClasspathLibs

public void setClasspathLibs(List classpathLibs)
Sets a list with library paths to be transformed into eclipse lib dependencies.
param:
classpathLibs An list with objects which toString value is interpreted as a path


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.
param:
failForMissingDependencies


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.
param:
outputDirectory An object which toString value is interpreted as a path


setProjectDependencies

public void setProjectDependencies(List projectDependencies)
Sets the project dependencies to be transformed into eclipse project dependencies.
param:
projectDependencies


setSrcDirs

public void setSrcDirs(List 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.
param:
srcDirs An list with objects which toString value is interpreted as a path


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.
param:
testOutputDirectory An object which toString value is interpreted as a path


setTestSrcDirs

public void setTestSrcDirs(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.
param:
testSrcDirs An list with objects which toString value is interpreted as a path


 

Groovy Documentation