Keep JavaCompilationArgsProvider in JavaInfo for Starlark java_binary
This will change the contents of JavaInfo as seen by Starlark code but is necessary for single_jar to extract transitive deps for java_binary inputs. This was earlier extracted using compilation_info (which we are removing)
@@ -341,6 +341,10 @@ public class JavaStarlarkCommon
JavaInfo.Builder builder = JavaInfo.Builder.create();
if (javaInfo.getProvider(JavaCompilationInfoProvider.class) != null) {
builder.addProvider(JavaCompilationInfoProvider.class, javaInfo.getCompilationInfoProvider());
+ } else if (javaInfo.getProvider(JavaCompilationArgsProvider.class) != null) {
+ builder.addProvider(
+ JavaCompilationArgsProvider.class,
+ javaInfo.getProvider(JavaCompilationArgsProvider.class));
}
if (javaInfo.getProvider(JavaGenJarsProvider.class) != null) {
builder.addProvider(JavaGenJarsProvider.class, javaInfo.getGenJarsProvider());
