name.remal.gradle_plugins.dsl.reflective_project_plugin.mixin.SkipIfOnlyCleanTasksAreRequestedToExecuteMixin.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.reflective_project_plugin.mixin
import name.remal.gradle_plugins.dsl.PluginCondition
import org.gradle.StartParameter
import org.gradle.api.plugins.BasePlugin.CLEAN_TASK_NAME
interface SkipIfOnlyCleanTasksAreRequestedToExecuteMixin {
@PluginCondition
fun StartParameter.`Skip if only 'clean' tasks are requested to execute`(): Boolean {
return taskRequests.isEmpty() || taskRequests.any {
it.args.isEmpty() || it.args.any {
CLEAN_TASK_NAME != it
}
}
}
}