Groovy Documentation

org.gradle.plugins.idea
[Groovy] Class IdeaModule

java.lang.Object
  org.gradle.api.internal.ConventionTask
      org.gradle.plugins.idea.IdeaModule

class IdeaModule
extends ConventionTask

Authors:
Hans Dockter


Property Summary
boolean downloadJavadoc

Whether to download and add javadoc associated with the dependency jars.

boolean downloadSources

Whether to download and add sources associated with the dependency jars.

java.util.Set excludeDirs

The dirs to be excluded by idea.

java.io.File gradleCacheHome

This variable is used in conjunction with the gradleCacheVariable.

java.lang.String gradleCacheVariable

If this variable is set, dependencies in the existing iml file will be parsed for this variable.

java.lang.String javaVersion

If this is null the value of the existing or default ipr XML (inherited) is used.

java.io.File moduleDir

The content root directory of the module.

java.io.File outputDir

The idea output dir for the production sources.

java.io.File outputFile

The iml file.

java.util.Map scopes

The keys of this map are the Intellij scopes.

java.util.Set sourceDirs

The dirs containing the production sources.

java.io.File testOutputDir

The idea output dir for the test sources.

java.util.Set testSourceDirs

The dirs containing the test sources.

 
Constructor Summary
IdeaModule()

 
Method Summary
protected java.lang.Object addJavadocArtifact(DefaultExternalModuleDependency dependency)

protected java.lang.Object addSourceArtifact(DefaultExternalModuleDependency dependency)

void beforeConfigured(groovy.lang.Closure closure)

protected java.util.Set getAllDeps(java.util.Set deps)

protected Path getContentPath()

protected java.util.Set getDependencies()

protected java.util.Set getExcludePaths()

protected java.util.Set getModuleLibraries(java.lang.String scope)

protected java.util.Set getModules(java.lang.String scope)

protected Path getOutputPath()

protected Path getPath(java.io.File file)

protected java.util.Set getSourcePaths()

protected Path getTestOutputPath()

protected java.util.Set getTestSourcePaths()

protected java.lang.Object getVariableReplacement()

void updateXML()

void whenConfigured(groovy.lang.Closure closure)

void withXml(groovy.lang.Closure closure)

 

Property Detail

downloadJavadoc

@Input
boolean downloadJavadoc
Whether to download and add javadoc associated with the dependency jars. Defaults to false.


downloadSources

@Input
boolean downloadSources
Whether to download and add sources associated with the dependency jars. Defaults to true.


excludeDirs

@InputFiles
java.util.Set excludeDirs
The dirs to be excluded by idea. Must not be null.


gradleCacheHome

@InputFiles
@Optional
java.io.File gradleCacheHome
This variable is used in conjunction with the gradleCacheVariable.


gradleCacheVariable

@Input
@Optional
java.lang.String gradleCacheVariable
If this variable is set, dependencies in the existing iml file will be parsed for this variable. If they use it, it will be replaced with a path that has the $MODULE_DIR$ variable as a root and then a relative path to gradleCacheHome . That way Gradle can recognize equal dependencies.


javaVersion

@Input
@Optional
java.lang.String javaVersion
If this is null the value of the existing or default ipr XML (inherited) is used. If it is set to inherited, the project SDK is used. Otherwise the SDK for the corresponding value of java version is used for this module


moduleDir

@InputFiles
java.io.File moduleDir
The content root directory of the module. Must not be null.


outputDir

@InputFiles
@Optional
java.io.File outputDir
The idea output dir for the production sources. If null no entry for output dirs is created.


outputFile

@OutputFile
java.io.File outputFile
The iml file. Used to look for existing files as well as the target for generation. Must not be null.


scopes

java.util.Map scopes
The keys of this map are the Intellij scopes. Each key points to another map that has two keys, plus and minus. The values of those keys are sets of Configuration objects. The files of the plus configurations are added minus the files from the minus configurations.


sourceDirs

@InputFiles
java.util.Set sourceDirs
The dirs containing the production sources. Must not be null.


testOutputDir

@InputFiles
@Optional
java.io.File testOutputDir
The idea output dir for the test sources. If null no entry for test output dirs is created.


testSourceDirs

@InputFiles
java.util.Set testSourceDirs
The dirs containing the test sources. Must not be null.


 
Constructor Detail

IdeaModule

IdeaModule()


 
Method Detail

addJavadocArtifact

protected java.lang.Object addJavadocArtifact(DefaultExternalModuleDependency dependency)


addSourceArtifact

protected java.lang.Object addSourceArtifact(DefaultExternalModuleDependency dependency)


beforeConfigured

void beforeConfigured(groovy.lang.Closure closure)


getAllDeps

protected java.util.Set getAllDeps(java.util.Set deps)


getContentPath

protected Path getContentPath()


getDependencies

protected java.util.Set getDependencies()


getExcludePaths

protected java.util.Set getExcludePaths()


getModuleLibraries

protected java.util.Set getModuleLibraries(java.lang.String scope)


getModules

protected java.util.Set getModules(java.lang.String scope)


getOutputPath

protected Path getOutputPath()


getPath

protected Path getPath(java.io.File file)


getSourcePaths

protected java.util.Set getSourcePaths()


getTestOutputPath

protected Path getTestOutputPath()


getTestSourcePaths

protected java.util.Set getTestSourcePaths()


getVariableReplacement

protected java.lang.Object getVariableReplacement()


updateXML

@TaskAction
void updateXML()


whenConfigured

void whenConfigured(groovy.lang.Closure closure)


withXml

void withXml(groovy.lang.Closure closure)


 

Groovy Documentation