diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java index 197bd38e1e5e5d..d08e51ccc6dfc5 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java @@ -1026,7 +1026,9 @@ public List getPrerequisites(String attribut } List 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