Detekt tasks config for each subproject
This commit is contained in:
parent
6d81c5630d
commit
ede5d3c902
|
|
@ -207,7 +207,7 @@ getLintTask = { buildVariant ->
|
|||
return lintTaskPath
|
||||
}
|
||||
|
||||
getKotlinDetektTasks = { subprojects.collect { it.tasks.findByName("detekt").path }.findAll { !it.contains(":libs") } }
|
||||
getKotlinDetektTasks = { subprojects.findResults { it.tasks.findByName("detekt")?.path }.findAll { !it.contains(":libs") } }
|
||||
|
||||
task optimizePng {
|
||||
doFirst {
|
||||
|
|
|
|||
|
|
@ -81,12 +81,16 @@ gradle.projectsEvaluated {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.withType(io.gitlab.arturbosch.detekt.Detekt) {
|
||||
exclude '**/test/'
|
||||
exclude 'resources/'
|
||||
exclude 'build/'
|
||||
exclude 'tmp/'
|
||||
jvmTarget = "1.8"
|
||||
def regex = ~':detekt$'
|
||||
tasks.forEach { task ->
|
||||
if (!task.name.contains(":libs") && task.path =~ regex) {
|
||||
task.exclude '**/test/**'
|
||||
task.exclude 'resources/'
|
||||
task.exclude 'build/'
|
||||
task.exclude 'tmp/'
|
||||
|
||||
task.jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
|
||||
detekt {
|
||||
|
|
|
|||
Loading…
Reference in New Issue