From 49b5567769064b49a6337e4b4b9913c94f6e46cf Mon Sep 17 00:00:00 2001 From: Goooler Date: Tue, 5 Dec 2023 20:14:28 +0800 Subject: [PATCH] Fix task dependencies for release build --- app/build.gradle.kts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index b5601566154..d88884b347a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,4 +1,7 @@ import com.android.build.gradle.internal.api.ApkVariantOutputImpl +import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask +import com.android.build.gradle.internal.lint.LintModelWriterTask +import com.android.build.gradle.tasks.MergeSourceSetFolders import java.io.FileInputStream import java.util.Locale import java.util.Properties @@ -104,11 +107,12 @@ android { from(reporting.file("licensee/android$capitalizedName/artifacts.json")) into(layout.buildDirectory.dir("generated/dependencyAssets/")) } - tasks.named("merge${capitalizedName}Assets").configure { - dependsOn(copyArtifactList) - } - if (buildType.name == "release") { - tasks.named("lintVitalAnalyze$capitalizedName").configure { + listOf( + AndroidLintAnalysisTask::class, + LintModelWriterTask::class, + MergeSourceSetFolders::class, + ).forEach { + tasks.withType(it).configureEach { dependsOn(copyArtifactList) } }