Could anybody explain to me, where are from except...
# gradle
i
Could anybody explain to me, where are from exceptions like that ? when i run or assemble project build is successful, but when i run
./gradlew build
if fails
a
When you run
build
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.
v
run
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.
When you run 
build
 both assemble and tests will be executed, so it seems like your tests are failing, you could confirm by simple running gradlew test.
That 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. ;-)