net.twisterrob.gradle.quality.QualityExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of twister-quality Show documentation
Show all versions of twister-quality Show documentation
All quality plugins bundled in one.
The newest version!
package net.twisterrob.gradle.quality
import net.twisterrob.gradle.checkstyle.CheckStyleExtension
import net.twisterrob.gradle.pmd.PmdExtension
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.api.plugins.ExtensionAware
import org.gradle.api.plugins.ExtensionContainer
import org.gradle.kotlin.dsl.getByType
@Suppress("detekt.UnnecessaryAbstractClass") // Gradle convention.
abstract class QualityExtension(
val project: Project
) {
private val extensions: ExtensionContainer
get() = (this as ExtensionAware).extensions
fun checkstyle(closure: Action) {
closure.execute(extensions.getByType())
}
fun pmd(closure: Action) {
closure.execute(extensions.getByType())
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy