Fixed
Status Update
Comments
am...@google.com <am...@google.com> #2
It seems that the assertion asserts that there will be always a main source set, but in this case there is only androidTest source set.
Iza, is this intended?
Iza, is this intended?
im...@google.com <im...@google.com> #3
Ah yes, app android test shouldn't include the main app source set, afaik. It should be okay to add the generated res (most likely empty) to the top most source set (again, most likely an empty test resource source set).
note: I mirror Chris' opinion that we should disable resources in android tests altogether (enable behind a flag). I'm working on disabling them for dynamic features android test now.
note: I mirror Chris' opinion that we should disable resources in android tests altogether (enable behind a flag). I'm working on disabling them for dynamic features android test now.
Description
~/projects/studio-master-dev/tools/gradlew clean assembleReleaseAndroidTest -Dorg.gradle.jvmargs=-ea -s
fails with
Caused by: java.lang.AssertionError: Assertion failed
at com.android.build.gradle.internal.DependencyResourcesComputer.compute(DependencyResourcesComputer.kt:131)
at com.android.build.gradle.tasks.MergeResources.getConfiguredResourceSets(MergeResources.java:531)
at com.android.build.gradle.tasks.MergeResources.doFullTaskAction(MergeResources.java:239)
at com.android.build.gradle.internal.tasks.IncrementalTask.handleIncrementalInputs(IncrementalTask.kt:107)
at com.android.build.gradle.internal.tasks.IncrementalTask.access$handleIncrementalInputs(IncrementalTask.kt:64)
at com.android.build.gradle.internal.tasks.IncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(AndroidVariantTask.kt:73)
at com.android.build.gradle.internal.tasks.IncrementalTask$taskAction$$inlined$recordTaskAction$1.invoke(AndroidVariantTask.kt:34)
at com.android.build.gradle.internal.tasks.Blocks.recordSpan(Blocks.java:91)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction$gradle(IncrementalTask.kt:134)
Amr, can you please take a look?