Class GenerateIdeaModule

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>

@DisableCachingByDefault(because="Not made cacheable, yet") public abstract class GenerateIdeaModule extends XmlGeneratorTask<Module>
Generates an IDEA module file. If you want to fine tune the idea configuration

Please refer to interesting examples on idea configuration in IdeaModule.

At this moment nearly all configuration is done via IdeaModule.

  • Constructor Details

    • GenerateIdeaModule

      public GenerateIdeaModule()
    • GenerateIdeaModule

      @Inject public GenerateIdeaModule(IdeaModule module)
  • Method Details

    • create

      protected Module create()
      Specified by:
      create in class XmlGeneratorTask<Module>
    • configure

      protected void configure(Module xmlModule)
      Specified by:
      configure in class XmlGeneratorTask<Module>
    • getXmlTransformer

      public org.gradle.internal.xml.XmlTransformer getXmlTransformer()
      Overrides:
      getXmlTransformer in class XmlGeneratorTask<Module>
    • getOutputFile

      public File getOutputFile()
      Configures output *.iml file. It's optional because the task should configure it correctly for you (including making sure it is unique in the multi-module build). If you really need to change the output file name it is much easier to do it via the idea.module.name property.

      Please refer to documentation in IdeaModule name property. In IntelliJ IDEA the module name is the same as the name of the *.iml file.

      Overrides:
      getOutputFile in class GeneratorTask<Module>
      Returns:
      The output file.
    • setOutputFile

      public void setOutputFile(File newOutputFile)
      Description copied from class: GeneratorTask
      Sets the output file to write the final configuration to.
      Overrides:
      setOutputFile in class GeneratorTask<Module>
      Parameters:
      newOutputFile - The output file.
    • getModule

      @Internal public IdeaModule getModule()
      The Idea module model containing the details required to generate the module file.
    • setModule

      public void setModule(IdeaModule module)