Change path separator for Checkstyle suppressions to be Windows compatible
This commit is contained in:
parent
608f4f8b6e
commit
89a5eadfea
|
@ -91,11 +91,12 @@ class PrecommitTasks {
|
||||||
// on them. But we want `precommit` to depend on `checkstyle` which depends on them so
|
// on them. But we want `precommit` to depend on `checkstyle` which depends on them so
|
||||||
// we have to swap them.
|
// we have to swap them.
|
||||||
project.pluginManager.apply('checkstyle')
|
project.pluginManager.apply('checkstyle')
|
||||||
|
URL checkstyleSuppressions = PrecommitTasks.getResource('/checkstyle_suppressions.xml')
|
||||||
project.checkstyle {
|
project.checkstyle {
|
||||||
config = project.resources.text.fromFile(
|
config = project.resources.text.fromFile(
|
||||||
PrecommitTasks.getResource('/checkstyle.xml'), 'UTF-8')
|
PrecommitTasks.getResource('/checkstyle.xml'), 'UTF-8')
|
||||||
configProperties = [
|
configProperties = [
|
||||||
suppressions: PrecommitTasks.getResource('/checkstyle_suppressions.xml')
|
suppressions: checkstyleSuppressions
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
for (String taskName : ['checkstyleMain', 'checkstyleTest']) {
|
for (String taskName : ['checkstyleMain', 'checkstyleTest']) {
|
||||||
|
@ -103,6 +104,7 @@ class PrecommitTasks {
|
||||||
if (task != null) {
|
if (task != null) {
|
||||||
project.tasks['check'].dependsOn.remove(task)
|
project.tasks['check'].dependsOn.remove(task)
|
||||||
checkstyleTask.dependsOn(task)
|
checkstyleTask.dependsOn(task)
|
||||||
|
task.inputs.file(checkstyleSuppressions)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return checkstyleTask
|
return checkstyleTask
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue