Optimize updateCopyrights, checkTestConfigs tasks

* The Gradle `checkTestConfigs` task deals only with resources,
so narrowing its `outputs` to the `build/resources`
* The Gradle `updateCopyrights`  tasks deals only with compiled classes,
so narrowing its `outputs` to the `build/classes`
This commit is contained in:
Artem Bilan
2019-02-21 19:04:32 -05:00
parent 7e3b56939e
commit 9c84eceec2

View File

@@ -204,7 +204,7 @@ subprojects { subproject ->
.include('**/*.xml')
.exclude('**/log4j2-test.xml')
})
outputs.dir('build')
outputs.dir('build/resources')
doLast {
def wrongConfigs = inputs.files.filter {
new XmlParser(false, false)
@@ -223,7 +223,7 @@ subprojects { subproject ->
task updateCopyrights {
onlyIf { !System.getenv('TRAVIS') && !System.getenv('bamboo_buildKey') }
inputs.files(modifiedFiles.filter { f -> f.path.contains(subproject.name) })
outputs.dir('build')
outputs.dir('build/classes')
doLast {
def now = Calendar.instance.get(Calendar.YEAR) as String