android_test also needs the legacy behavior in RuleContext.getPrerequisites.
android_test inherits from android_binary and thus also has a split transition on "deps". I inspected the codebase and no other native rules have this issue.
@@ -1026,7 +1026,9 @@ public final class RuleContext extends TargetContext
}
List<ConfiguredTargetAndData> prerequisiteConfiguredTargets;
- if (getRule().getRuleClass().equals("android_binary")
+ // android_binary and android_test override deps to use a split transition.
+ if ((getRule().getRuleClass().equals("android_binary")
+ || getRule().getRuleClass().equals("android_test"))
&& attributeName.equals("deps")
&& attributes().getAttributeDefinition(attributeName).getTransitionFactory().isSplit()) {
// TODO(b/168038145): Restore legacy behavior of returning the prerequisites from the first
