iamthevoid
08/04/2021, 12:20 PM./gradlew build
if failsArun
08/04/2021, 1:20 PMbuild
both assemble and tests will be executed, so it seems like your tests are failing, you could confirm by simple running gradlew test.
The error in particular can happen when you have dependencies in wrong configuration, for example a pure Java Kotlin library depends on Android module. This is invalid since only Android modules can depend on Android modules.Vampire
08/04/2021, 1:24 PMrun
depends on jar
assemble
also depends on jar
build
depends on assemble
and check
detektAndroidStagingUnitTest
sounds like something that is wired to check
So if you do run
or assemble
the task detektAndroidStagingUnitTest
is not run and thus its dependencies are not resolved and you don't get the error.
I'm not too faimilar with Android, but from pure variant-aware resolution, the attributes that are requested are fulfilled by all 7 listed variants. You would need additionally the artifactType
attribute to uniquely select one it seems.Vampire
08/04/2021, 1:25 PMWhen you runThat will not reproduce the error, as it is not a test that is failing, but running detekt on the test sources if I interpret the task name correctly. ;-)both assemble and tests will be executed, so it seems like your tests are failing, you could confirm by simple running gradlew test.build