diff options
author | Adam Michael <ajmichael@google.com> | 2016-09-30 21:31:29 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2016-10-04 08:53:17 +0000 |
commit | 1b4b207170a87fc8f1ac94413ed9af424b674025 (patch) | |
tree | 03651e309143c4c8cf64b2605988f4869cc5439f /src/main/java | |
parent | 5bb9cc96e3b20197a1a10d965ac64d07b1a25e5a (diff) |
Remove dependency on $unzip for aar_import. Replaces the functionality with //third_party/ijar/zipper.
--
MOS_MIGRATED_REVID=134827924
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImport.java | 6 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImportRule.java | 7 |
2 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImport.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImport.java index 02781401fb..8803d86b8d 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImport.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImport.java @@ -117,15 +117,15 @@ public class AarImport implements RuleConfiguredTargetFactory { private static Action[] createSingleFileExtractor(RuleContext ruleContext, Artifact aar, String filename, Artifact outputArtifact) { return new SpawnAction.Builder() - .setExecutable(ruleContext.getExecutablePrerequisite("$unzip", Mode.HOST)) + .setExecutable(ruleContext.getExecutablePrerequisite("$zipper", Mode.HOST)) .setMnemonic("AarFileExtractor") .setProgressMessage("Extracting " + filename + " from " + aar.getFilename()) - .addArgument("-j") + .addArgument("x") .addInputArgument(aar) - .addArgument(filename) .addArgument("-d") .addOutput(outputArtifact) .addArgument(outputArtifact.getExecPath().getParentDirectory().getPathString()) + .addArgument(filename) .build(ruleContext); } diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImportRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImportRule.java index dfc4483f1b..61618bdb6a 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImportRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/AarImportRule.java @@ -28,7 +28,6 @@ import com.google.devtools.build.lib.packages.RuleClass.Builder; import com.google.devtools.build.lib.rules.android.AndroidRuleClasses.AndroidAaptBaseRule; import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider; import com.google.devtools.build.lib.util.FileType; -import com.google.devtools.build.lib.util.FileTypeSet; /** Rule definition for the aar_import rule. */ public class AarImportRule implements RuleDefinition { @@ -49,12 +48,6 @@ public class AarImportRule implements RuleDefinition { .exec() .value(Label.parseAbsoluteUnchecked( environment.getToolsRepository() + "//tools/zip:zip_manifest_creator"))) - .add(attr("$unzip", LABEL) - .cfg(HOST) - .exec() - .value(Label.parseAbsoluteUnchecked( - environment.getToolsRepository() + "//tools/zip:unzip")) - .allowedFileTypes(FileTypeSet.ANY_FILE)) .add(attr("$zipper", LABEL) .cfg(HOST) .exec() |