Class FileContentMerger

java.lang.Object
org.gradle.plugins.ide.api.FileContentMerger
Direct Known Subclasses:
PropertiesFileContentMerger, XmlFileContentMerger

public class FileContentMerger extends Object
Models the generation/parsing/merging capabilities.

For examples see docs for EclipseProject or IdeaProject and others.

Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a closure to be called after content is loaded from existing file but before gradle build information is merged.
    void
    beforeMerged(Action<?> action)
    Adds an action to be called after content is loaded from existing file but before gradle build information is merged.
    org.gradle.internal.MutableActionSet
    Returns the before merged.
    org.gradle.internal.MutableActionSet
    Returns the when merged.
    void
    setBeforeMerged(org.gradle.internal.MutableActionSet beforeMerged)
    Sets the before merged.
    void
    setWhenMerged(org.gradle.internal.MutableActionSet whenMerged)
    Sets the when merged.
    void
    Adds a closure to be called after content is loaded from existing file and after gradle build information is merged.
    void
    whenMerged(Action<?> action)
    Adds an action to be called after content is loaded from existing file and after gradle build information is merged.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FileContentMerger

      public FileContentMerger()
  • Method Details

    • getWhenMerged

      public org.gradle.internal.MutableActionSet getWhenMerged()
      Returns the when merged.
      Since:
      1.0
    • setWhenMerged

      public void setWhenMerged(org.gradle.internal.MutableActionSet whenMerged)
      Sets the when merged.
      Since:
      3.5
    • getBeforeMerged

      public org.gradle.internal.MutableActionSet getBeforeMerged()
      Returns the before merged.
      Since:
      1.0
    • setBeforeMerged

      public void setBeforeMerged(org.gradle.internal.MutableActionSet beforeMerged)
      Sets the before merged.
      Since:
      3.5
    • beforeMerged

      public void beforeMerged(Action<?> action)
      Adds an action to be called after content is loaded from existing file but before gradle build information is merged.

      This is advanced api that gives access to internal implementation. It might be useful if you want to alter the way gradle build information is merged into existing file content.

      For examples see docs for EclipseProject or IdeaProject and others.

      Parameters:
      action - The action to execute.
      Since:
      3.0
    • whenMerged

      public void whenMerged(Action<?> action)
      Adds an action to be called after content is loaded from existing file and after gradle build information is merged.

      This is advanced api that gives access to internal implementation of idea plugin. Use it only to tackle some tricky edge cases.

      For examples see docs for EclipseProject or IdeaProject and others.

      Parameters:
      action - The action to execute.
      Since:
      3.0
    • beforeMerged

      public void beforeMerged(Closure closure)
      Adds a closure to be called after content is loaded from existing file but before gradle build information is merged.

      This is advanced api that gives access to internal implementation. It might be useful if you want to alter the way gradle build information is merged into existing file content.

      For examples see docs for EclipseProject or IdeaProject and others.

      Parameters:
      closure - The closure to execute.
      Since:
      1.0
    • whenMerged

      public void whenMerged(Closure closure)
      Adds a closure to be called after content is loaded from existing file and after gradle build information is merged.

      This is advanced api that gives access to internal implementation of idea plugin. Use it only to tackle some tricky edge cases.

      For examples see docs for EclipseProject or IdeaProject and others.

      Parameters:
      closure - The closure to execute.
      Since:
      1.0