Groovy Documentation

org.gradle.plugins.ide.idea.model
[Groovy] Class IdeaProject

java.lang.Object
  org.gradle.plugins.ide.idea.model.IdeaProject

class IdeaProject
extends java.lang.Object

Model for idea project.

Example of use with a blend of all possible properties. Bear in mind that usually you don't have configure idea module directly because Gradle configures it for free!

 apply plugin: 'java'
 apply plugin: 'idea'

 project {

   //if you want to set specific java version for the idea project
   javaVersion = '1.5'

   //you can update the source wildcards
   wildcards += '!?*.ruby'

   //you can update the project list that will make the modules list in the *.ipr
   //subprojects -= project(':someProjectThatWillBeExcluded')

   //you can change the output file
   outputFile = new File(outputFile.parentFile, 'someBetterName.ipr')

   //you can apply advanced logic to the xml generation/merging
   ipr {

     //you can tinker with the output *.ipr file before it's written to file
     withXml {
       def node = it.asNode()
       node.appendNode('iLove', 'tinkering with the output *.ipr file!')
     }
   }
 }
 
Author: Szczepan Faber, created at: 4/4/11


Property Summary
IdeaProjectIpr ipr

java.lang.String javaVersion

The java version used for defining the project sdk.

java.io.File outputFile

Output *.ipr

See the examples in the docs for IdeaProject

PathFactory pathFactory

java.util.Set subprojects

The subprojects that should be mapped to modules in the ipr file.

java.util.Set wildcards

The wildcard resource patterns.

Project xmlProject

 
Method Summary
void ipr(groovy.lang.Closure closure)

Enables advanced configuration like tinkering with the output xml or affecting the way existing *.ipr content is merged with gradle build information

See the examples in the docs for IdeaProject

void mergeXmlProject(Project xmlProject)

 
Methods inherited from class java.lang.Object
java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString()
 

Property Detail

ipr

IdeaProjectIpr ipr


javaVersion

java.lang.String javaVersion
The java version used for defining the project sdk.

See the examples in the docs for IdeaProject


outputFile

java.io.File outputFile
Output *.ipr

See the examples in the docs for IdeaProject


pathFactory

PathFactory pathFactory


subprojects

java.util.Set subprojects
The subprojects that should be mapped to modules in the ipr file. The subprojects will only be mapped if the Idea plugin has been applied to them.

See the examples in the docs for IdeaProject


wildcards

java.util.Set wildcards
The wildcard resource patterns.

See the examples in the docs for IdeaProject


xmlProject

Project xmlProject


 
Method Detail

ipr

void ipr(groovy.lang.Closure closure)
Enables advanced configuration like tinkering with the output xml or affecting the way existing *.ipr content is merged with gradle build information

See the examples in the docs for IdeaProject


mergeXmlProject

void mergeXmlProject(Project xmlProject)


 

Groovy Documentation