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

main.name.remal.gradle_plugins.plugins.code_quality.ExcludesExtension.kt Maven / Gradle / Ivy

There is a newer version: 1.9.2
Show newest version
package name.remal.gradle_plugins.plugins.code_quality

import name.remal.gradle_plugins.dsl.Extension

@Extension
class ExcludesExtension {

    var classNames: MutableSet = sortedSetOf()
        set(value) {
            field = value.toSortedSet()
        }

    fun className(value: String) = classNames(value)

    fun classNames(vararg values: String) {
        classNames.addAll(values)
    }

    fun classNames(values: Iterable) {
        classNames.addAll(values)
    }


    var sources: MutableSet = sortedSetOf()
        set(value) {
            field = value.toSortedSet()
        }

    fun source(value: String) = sources(value)

    fun sources(vararg values: String) {
        sources.addAll(values)
    }

    fun sources(values: Iterable) {
        sources.addAll(values)
    }


    var messages: MutableSet = sortedSetOf()
        set(value) {
            field = value.toSortedSet()
        }

    fun message(value: String) = messages(value)

    fun messages(vararg values: String) {
        messages.addAll(values)
    }

    fun messages(values: Iterable) {
        messages.addAll(values)
    }


    fun kotlin() {
        sources.add("*.kt")
        sources.add("*.kts")
    }

    fun groovy() {
        sources.add("*.groovy")
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy