From 1fb2b387c0b450e586c9f8a17a8f61697c8f3b4b Mon Sep 17 00:00:00 2001 From: Andrey Belonogov Date: Wed, 12 Aug 2026 16:27:37 -0700 Subject: [PATCH] ci: stop running the unit test suite twice per build check pulled in both testDebugUnitTest and testReleaseUnitTest, so every CI run executed all 729 unit tests twice. The module has no variant-specific source sets, so the second pass compiled and ran identical code for no added coverage while doubling unit test time and doubling the chance that a run trips a flaky test. A recent PR failure landed in testReleaseUnitTest while the same flake failed a release in testDebugUnitTest. Disabling unit tests for the release variant leaves the release AAR, its publication, and lint untouched. Co-authored-by: Cursor --- launchdarkly-android-client-sdk/build.gradle | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/launchdarkly-android-client-sdk/build.gradle b/launchdarkly-android-client-sdk/build.gradle index 3b7566cb..affbc0de 100644 --- a/launchdarkly-android-client-sdk/build.gradle +++ b/launchdarkly-android-client-sdk/build.gradle @@ -52,6 +52,17 @@ android { useLibrary("android.test.mock") } +androidComponents { + // This module has no variant-specific source sets, so the release variant's unit tests compile + // and run exactly the same code as the debug variant's. Leaving them enabled makes `check`, and + // therefore every CI run, execute the whole suite twice: it doubles the unit test time and + // doubles the chance of a run tripping a flaky test. Re-enable if a variant-specific difference + // (such as the BuildConfig.DEBUG branch in LDTimberLogging) ever gains unit test coverage. + beforeVariants(selector().withBuildType("release")) { variantBuilder -> + variantBuilder.enableUnitTest = false + } +} + configurations { commonClasses { transitive = false