name.remal.gradle_plugins.dsl.utils.isPluginDisabledBySystemProperty.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugins-kotlin-dsl Show documentation
Show all versions of gradle-plugins-kotlin-dsl Show documentation
Remal Gradle plugins: gradle-plugins-kotlin-dsl
package name.remal.gradle_plugins.dsl.utils
import name.remal.gradle_plugins.dsl.PluginId
fun isPluginDisabledBySystemProperty(pluginId: PluginId): Boolean {
return pluginId.allIds.any {
System.getProperty("plugin-disabled.$it")?.toString()?.toBoolean() == true
}
}
fun isPluginDisabledBySystemProperty(pluginId: String) = isPluginDisabledBySystemProperty(PluginId(pluginId))