diff --git a/gradle/check-licenses.gradle b/gradle/check-licenses.gradle index cbb129f188..400b2dd4a0 100644 --- a/gradle/check-licenses.gradle +++ b/gradle/check-licenses.gradle @@ -153,7 +153,7 @@ downloadLicenses { } 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' } }