diff options
author | 2018-02-26 16:57:42 -0800 | |
---|---|---|
committer | 2018-02-26 16:59:42 -0800 | |
commit | 8aad4db092624284b686036a042856b883f8e414 (patch) | |
tree | 102fc8cb6e217cf0d77af30b60b3db3ff5208d74 /src/main/java/com/google/devtools/build | |
parent | 0175ce3630f15262172731e00e8413c534ed6a62 (diff) |
Refactor AarImport by extracting javaCompilationArgsProvider. This provider will be used for the dependency checker later. Refactoring it now just avoids future potential merge conflicts.
RELNOTES: None
PiperOrigin-RevId: 187103807
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java index 51aa58c6b7..935844b15f 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AarImport.java @@ -133,19 +133,20 @@ public class AarImport implements RuleConfiguredTargetFactory { .addCompileTimeJarAsFullJar(mergedJar) .build()); + JavaCompilationArgsProvider javaCompilationArgsProvider = + JavaCompilationArgsProvider.create( + common.collectJavaCompilationArgs( + /* recursive = */ false, + JavaCommon.isNeverLink(ruleContext), + /* srcLessDepsExport = */ false), + common.collectJavaCompilationArgs( + /* recursive = */ true, + JavaCommon.isNeverLink(ruleContext), + /* srcLessDepsExport = */ false)); + JavaInfo.Builder javaInfoBuilder = JavaInfo.Builder.create() - .addProvider( - JavaCompilationArgsProvider.class, - JavaCompilationArgsProvider.create( - common.collectJavaCompilationArgs( - /* recursive = */ false, - JavaCommon.isNeverLink(ruleContext), - /* srcLessDepsExport = */ false), - common.collectJavaCompilationArgs( - /* recursive = */ true, - JavaCommon.isNeverLink(ruleContext), - /* srcLessDepsExport = */ false))) + .addProvider(JavaCompilationArgsProvider.class, javaCompilationArgsProvider) .addProvider(JavaRuleOutputJarsProvider.class, jarProviderBuilder.build()); common.addTransitiveInfoProviders( |