api / org.gradle.plugins.ide.api / FileContentMerger

FileContentMerger

open class FileContentMerger

Models the generation/parsing/merging capabilities.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

Constructors

<init>

FileContentMerger()

Models the generation/parsing/merging capabilities.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

Functions

beforeMerged

open fun beforeMerged(action: Action<*>): Unit

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 org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

open fun beforeMerged(closure: Closure<Any>): Unit

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 org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

getBeforeMerged

open fun getBeforeMerged(): MutableActionSet

getWhenMerged

open fun getWhenMerged(): MutableActionSet

setBeforeMerged

open fun setBeforeMerged(beforeMerged: MutableActionSet): Unit

setWhenMerged

open fun setWhenMerged(whenMerged: MutableActionSet): Unit

whenMerged

open fun whenMerged(action: Action<*>): Unit

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 org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

open fun whenMerged(closure: Closure<Any>): Unit

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 org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.

Inheritors

PropertiesFileContentMerger

open class PropertiesFileContentMerger : FileContentMerger

Models the generation/parsing/merging capabilities. Adds properties-related hooks.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseJdt and others.

XmlFileContentMerger

open class XmlFileContentMerger : FileContentMerger

Models the generation/parsing/merging capabilities. Adds XML-related hooks.

For examples see docs for org.gradle.plugins.ide.eclipse.model.EclipseProject or org.gradle.plugins.ide.idea.model.IdeaProject and others.