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

name.remal.gradle_plugins.plugins.code_quality.sonar.SonarPropertiesMixin.kt Maven / Gradle / Ivy

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

import name.remal.gradle_plugins.dsl.extensions.unwrapProviders
import name.remal.uncheckedCast

interface SonarPropertiesMixin> {

    var sonarProperties: MutableMap

    fun sonarProperty(name: Any?, value: Any?): Chain {
        val stringName = name.unwrapProviders()?.toString()
        if (stringName != null) {
            val stringValue = value.unwrapProviders()?.toString()
            sonarProperties[stringName] = stringValue
        }
        return this.uncheckedCast()
    }

    fun sonarProperties(map: Map): Chain {
        map.forEach { name, value -> sonarProperty(name, value) }
        return this.uncheckedCast()
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy