Skip to content

Commit

Permalink
Return JavaProvider from java_import.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 152229562
  • Loading branch information
iirina authored and damienmg committed Apr 5, 2017
1 parent e7c8438 commit b7096cb
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,16 @@ protected void collect(CcLinkParams.Builder builder, boolean linkingStatically,
.setSourceJarsProvider(sourceJarsProvider)
.setCompilationArgsProvider(compilationArgsProvider);
common.addTransitiveInfoProviders(ruleBuilder, skylarkApiProvider, filesToBuild, null);
JavaProvider javaProvider = JavaProvider.Builder.create()
.addProvider(JavaCompilationArgsProvider.class, compilationArgsProvider)
.addProvider(JavaRuleOutputJarsProvider.class, ruleOutputJarsProvider)
.addProvider(JavaSourceJarsProvider.class, sourceJarsProvider)
.build();
return ruleBuilder
.setFilesToBuild(filesToBuild)
.addSkylarkTransitiveInfo(JavaSkylarkApiProvider.NAME, skylarkApiProvider.build())
.addNativeDeclaredProvider(javaProvider)
.addProvider(JavaProvider.class, javaProvider)
.add(JavaRuleOutputJarsProvider.class, ruleOutputJarsProvider)
.add(
JavaRuntimeJarProvider.class,
Expand Down

0 comments on commit b7096cb

Please sign in to comment.