From 7437149d21ef753be46dfc9192dcca8991b59da3 Mon Sep 17 00:00:00 2001 From: Laimonas Turauskas Date: Thu, 4 Jan 2024 10:05:50 -0500 Subject: [PATCH] Fix lint build. --- formula-lint/build.gradle.kts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/formula-lint/build.gradle.kts b/formula-lint/build.gradle.kts index f3c0fb15..ae2bcc0c 100644 --- a/formula-lint/build.gradle.kts +++ b/formula-lint/build.gradle.kts @@ -1,3 +1,6 @@ +import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask +import com.android.build.gradle.internal.lint.LintModelWriterTask + plugins { id("java-library") id("kotlin") @@ -19,3 +22,12 @@ dependencies { testImplementation(libs.lint.tests) testImplementation(libs.junit) } + +// Need to register direct task dependencies since jacocoTestReport is +// accessing the files produced by those lint tasks +plugins.withId("jacoco") { + tasks.named("jacocoTestReport") { + dependsOn(tasks.withType(AndroidLintAnalysisTask::class.java)) + dependsOn(tasks.withType(LintModelWriterTask::class.java)) + } +}