diff --git a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/AndroidCommonPlugin.kt b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/AndroidCommonPlugin.kt index ac1d0cd5..8c7a4680 100644 --- a/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/AndroidCommonPlugin.kt +++ b/build-logic/src/main/kotlin/dev/msfjarvis/claw/gradle/AndroidCommonPlugin.kt @@ -70,7 +70,8 @@ class AndroidCommonPlugin : Plugin { } // Disable unit test tasks on the release build type for Android Library projects extensions.findByType()?.run { - beforeVariants(selector().withBuildType("release")) { + beforeVariants(selector().all()) { + if (it.name == "debug") return@beforeVariants (it as HasUnitTestBuilder).enableUnitTest = false it.enableAndroidTest = false } @@ -78,7 +79,8 @@ class AndroidCommonPlugin : Plugin { // Disable unit test tasks on the release build type for Android Application projects. extensions.findByType()?.run { - beforeVariants(selector().withBuildType("release")) { + beforeVariants(selector().all()) { + if (it.name == "debug") return@beforeVariants (it as HasUnitTestBuilder).enableUnitTest = false it.enableAndroidTest = false }