me.xx2bab.seal.SealExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of seal Show documentation
Show all versions of seal Show documentation
A Gradle Plugin to resolve AndroidManifest.xml merge conflicts.
The newest version!
package me.xx2bab.seal
import org.gradle.api.Named
import java.util.concurrent.atomic.AtomicInteger
abstract class SealExtension {
val rules = mutableSetOf()
private val idGenerator = AtomicInteger(0)
fun beforeMerge(ruleName: String = ""): SealRuleBuilder {
return SealRuleBuilder(rules,
SealRuleBuilder.HookType.BEFORE_MERGE,
ruleName,
idGenerator.incrementAndGet())
}
fun afterMerge(ruleName: String = ""): SealRuleBuilder {
return SealRuleBuilder(rules,
SealRuleBuilder.HookType.AFTER_MERGE,
ruleName,
idGenerator.incrementAndGet())
}
}