Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apply plugin: 'io.gitlab.arturbosch.detekt'
apply plugin: 'org.jmailen.kotlinter'
apply plugin: 'checkstyle'
checkstyle {
toolVersion = "8.28"
}
task checkstyle(type: Checkstyle) {
source("src")
include("**/*.java")
exclude("**/gen/**")
classpath = files()
configFile = new File("$rootDir/config/checkstyle/checkstyle.xml")
tasks.findByName("check")?.dependsOn("checkStyle")
}
kotlinter {
indentSize = 2
continuationIndentSize = 2
tasks.findByName("lint")?.dependsOn("lintKotlin")
}
detekt {
version = Version.detektVersion
input = files("$projectDir/src/")
config = files("$rootDir/config/detekt/detekt-config.yml")
filters = ".*test.*,.*/resources/.*,.*/tmp/.*"
tasks.findByName("check")?.dependsOn("detekt")
}
tasks.withType(Test) {
reports {
html.setEnabled(true)
}
}
// applying the plugin to all the modules
allprojects {
apply from: "$rootDir/gradle/static-analysis.gradle"
}
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.