Skip to content

Commit 9eb9d07

Browse files
committed
Force rerun of connected tests for coverage report
1 parent efa6727 commit 9eb9d07

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scripts/android/lib/PatchGradleFiles.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ private static Result ensureJacocoConfiguration(String content) {
275275
group = "verification"
276276
description = "Generates Jacoco coverage report for the debug variant"
277277
dependsOn("connectedDebugAndroidTest")
278+
outputs.upToDateWhen { false }
278279
279280
reports {
280281
xml.required = true
@@ -322,6 +323,10 @@ private static Result ensureJacocoConfiguration(String content) {
322323
logger.lifecycle("Jacoco coverage inputs: ${existing}")
323324
}
324325
}
326+
327+
tasks.matching { it.name == "connectedDebugAndroidTest" }.configureEach {
328+
outputs.upToDateWhen { false }
329+
}
325330
""".stripTrailing();
326331

327332
return new Result(ensureTrailingNewline(content) + "\n" + jacocoBlock + "\n", true);

0 commit comments

Comments
 (0)