force downloadLicenses when clean (#2104) (#2247)

when clean task is mentioned the lazyDownloadLicenses gets called before the clean runs, but during clean the license-dependency.xml also gets removed hence the checkLicenses.doLast fails. added the check to force downloadLicenses when clean task is going to run

Signed-off-by: Saravana Perumal Shanmugam <perusworld@linux.com>
pull/2254/head
Saravana Perumal Shanmugam 4 years ago committed by GitHub
parent 1e2411cb17
commit 772a238a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      gradle/check-licenses.gradle

@ -153,7 +153,7 @@ downloadLicenses {
} }
task lazyDownloadLicenses() { task lazyDownloadLicenses() {
if (!file("$rootProject.buildDir/reports/license/license-dependency.xml").exists()) { if (gradle.startParameter.taskNames.contains('clean') || !file("$rootProject.buildDir/reports/license/license-dependency.xml").exists()) {
dependsOn ':downloadLicenses' dependsOn ':downloadLicenses'
} }
} }

Loading…
Cancel
Save