Skip to content

Commit

Permalink
Step 1 of removing android_sdk.annotations_jar.
Browse files Browse the repository at this point in the history
It seems we don't actually need it for anything.

The next step will be to remove the flag from the tools, to stop passing it in
all android_sdk rules and then to delete it from android_sdk.

RELNOTES: None
PiperOrigin-RevId: 183285855
  • Loading branch information
aj-michael authored and Copybara-Service committed Jan 25, 2018
1 parent bc4f5c4 commit 1a6ca6f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,6 @@ private ResourceContainer createValidateAction(

ImmutableList.Builder<Artifact> inputs = ImmutableList.builder();

builder.addExecPath("--annotationJar", sdk.getAnnotationsJar());
inputs.add(sdk.getAnnotationsJar());

builder.addExecPath("--androidJar", sdk.getAndroidJar());
inputs.add(sdk.getAndroidJar());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,6 @@ private void configureCommonFlags(
builder.add("--buildToolsVersion", sdk.getBuildToolsVersion());
}

builder.addExecPath("--annotationJar", sdk.getAnnotationsJar());
inputs.add(sdk.getAnnotationsJar());

builder.addExecPath("--androidJar", sdk.getAndroidJar());
inputs.add(sdk.getAndroidJar());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ public RuleClass build(Builder builder, RuleDefinitionEnvironment environment) {
.cfg(HostTransition.INSTANCE)
.allowedFileTypes(ANY_FILE))
.add(attr("annotations_jar", LABEL)
.mandatory()
.cfg(HostTransition.INSTANCE)
.allowedFileTypes(ANY_FILE))
.add(attr("main_dex_classes", LABEL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public ConfiguredTarget create(RuleContext ruleContext)
Artifact sourceProperties = ruleContext.getHostPrerequisiteArtifact("source_properties");
Artifact shrinkedAndroidJar =
ruleContext.getPrerequisiteArtifact("shrinked_android_jar", Mode.HOST);
Artifact annotationsJar = ruleContext.getPrerequisiteArtifact("annotations_jar", Mode.HOST);
Artifact mainDexClasses = ruleContext.getPrerequisiteArtifact("main_dex_classes", Mode.HOST);

if (ruleContext.hasErrors()) {
Expand All @@ -77,7 +76,6 @@ public ConfiguredTarget create(RuleContext ruleContext)
androidJar,
sourceProperties,
shrinkedAndroidJar,
annotationsJar,
mainDexClasses,
adb,
dx,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public static AndroidSdkProvider create(
Artifact androidJar,
@Nullable Artifact sourceProperties,
Artifact shrinkedAndroidJar,
Artifact annotationsJar,
Artifact mainDexClasses,
FilesToRunProvider adb,
FilesToRunProvider dx,
Expand All @@ -56,7 +55,6 @@ public static AndroidSdkProvider create(
androidJar,
sourceProperties,
shrinkedAndroidJar,
annotationsJar,
mainDexClasses,
adb,
dx,
Expand Down Expand Up @@ -101,8 +99,6 @@ public static void verifyPresence(RuleContext ruleContext) throws RuleErrorExcep

public abstract Artifact getShrinkedAndroidJar();

public abstract Artifact getAnnotationsJar();

public abstract Artifact getMainDexClasses();

public abstract FilesToRunProvider getAdb();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,6 @@ public Artifact build() throws RuleErrorException {
commandLine.addExecPath("--aapt", aapt.getExecutable());
}

commandLine.addExecPath("--annotationJar", sdk.getAnnotationsJar());
inputs.add(sdk.getAnnotationsJar());

commandLine.addExecPath("--androidJar", sdk.getAndroidJar());
inputs.add(sdk.getAndroidJar());

Expand Down

0 comments on commit 1a6ca6f

Please sign in to comment.