All Downloads are FREE. Search and download functionalities are using the official Maven repository.

me.xx2bab.seal.SealExtension.kt Maven / Gradle / Ivy

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())
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy