Skip to content

Instantly share code, notes, and snippets.

@adavis adavis/CompanionObject.kt
Last active Apr 20, 2017

What would you like to do?
companion object {
const val PMD_FILE_NAME = "pmd-ruleset.xml"
const val CHECKSTYLE_FILE_NAME = "checkstyle.xml"
const val FINDBUGS_FILE_NAME = "findbugs-exclude.xml"
const val WRITE_PMD_CONFIG_FILE_TASK = "writePmdConfigFile"
const val WRITE_CHECK_STYLE_CONFIG_FILE_TASK = "writeCheckStyleConfigFile"
const val WRITE_FIND_BUGS_EXCLUSION_FILE_TASK = "writeFindBugsExclusionFile"
const val VERIFICATION_GROUP = "verification"
const val PLUGIN_EXTENSION_NAME = "qualityChecks"
fun `plugin should add tasks when applied`() {
with(project) {
class QualityChecksExtension {
String pmdConfigFile = 'quality-checks/pmd-ruleset.xml'
String checkstyleConfigFile = 'quality-checks/checkstyle.xml'
String findBugsExclusionFile = 'quality-checks/findbugs-exclude.xml'
import info.adavis.qualitychecks.QualityChecksPlugin.Companion.CHECKSTYLE_FILE_NAME
import info.adavis.qualitychecks.QualityChecksPlugin.Companion.FINDBUGS_FILE_NAME
import info.adavis.qualitychecks.QualityChecksPlugin.Companion.PMD_FILE_NAME
open class QualityChecksExtension(var pmdConfigFile: String = "quality-checks/$PMD_FILE_NAME",
var checkstyleConfigFile: String = "quality-checks/$CHECKSTYLE_FILE_NAME",
var findBugsExclusionFile: String = "quality-checks/$FINDBUGS_FILE_NAME")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.