aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java
diff options
context:
space:
mode:
authorGravatar asteinb <asteinb@google.com>2018-08-07 11:47:49 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-07 11:49:40 -0700
commitdb8a2e8a652b8900dce127b30d3d20bfa97a2052 (patch)
tree91746806d3fdd841178a10227d2ac25d2a7e848e /src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java
parentf12d58509f3e41b253205533b211ee226e99ad65 (diff)
Remove analysis code for old resource processing pipeline
This code should all be unused now. Some code it calls into will be removed in the next changes. RELNOTES: none PiperOrigin-RevId: 207753966
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java93
1 files changed, 31 insertions, 62 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java
index 88877f93ec..348698f062 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryMobileInstall.java
@@ -38,8 +38,6 @@ import com.google.devtools.build.lib.rules.java.JavaCompilationArgsProvider;
import com.google.devtools.build.lib.rules.java.JavaInfo;
import com.google.devtools.build.lib.rules.java.JavaSemantics;
import com.google.devtools.build.lib.rules.java.JavaTargetAttributes;
-import com.google.devtools.build.lib.rules.java.ProguardHelper;
-import com.google.devtools.build.lib.syntax.Type;
import java.util.Map;
/** Encapsulates the logic for creating actions for mobile-install. */
@@ -60,70 +58,41 @@ public final class AndroidBinaryMobileInstall {
static MobileInstallResourceApks createMobileInstallResourceApks(
RuleContext ruleContext,
AndroidDataContext dataContext,
- ApplicationManifest applicationManifest,
- ResourceDependencies resourceDeps)
+ ApplicationManifest applicationManifest)
throws RuleErrorException, InterruptedException {
final ResourceApk incrementalResourceApk;
final ResourceApk splitResourceApk;
- if (AndroidResources.decoupleDataProcessing(dataContext)) {
- StampedAndroidManifest manifest =
- new StampedAndroidManifest(
- applicationManifest.getManifest(), /* pkg = */ null, /* exported = */ true);
-
- incrementalResourceApk =
- ProcessedAndroidData.processIncrementalBinaryDataFrom(
- ruleContext,
- dataContext,
- manifest.addMobileInstallStubApplication(ruleContext),
- ruleContext.getImplicitOutputArtifact(
- AndroidRuleClasses.ANDROID_INCREMENTAL_RESOURCES_APK),
- getMobileInstallArtifact(ruleContext, "merged_incremental_resources.bin"),
- "incremental",
- applicationManifest.getManifestValues())
- // Intentionally skip building an R class JAR - incremental binaries handle this
- // separately.
- .withValidatedResources(null);
-
- splitResourceApk =
- ProcessedAndroidData.processIncrementalBinaryDataFrom(
- ruleContext,
- dataContext,
- manifest.createSplitManifest(ruleContext, "android_resources", false),
- getMobileInstallArtifact(ruleContext, "android_resources.ap_"),
- getMobileInstallArtifact(ruleContext, "merged_split_resources.bin"),
- "incremental_split",
- applicationManifest.getManifestValues())
- // Intentionally skip building an R class JAR - incremental binaries handle this
- // separately.
- .withValidatedResources(null);
- } else {
- incrementalResourceApk =
- applicationManifest
- .addMobileInstallStubApplication(ruleContext)
- .packIncrementalBinaryWithDataAndResources(
- ruleContext,
- dataContext,
- ruleContext.getImplicitOutputArtifact(
- AndroidRuleClasses.ANDROID_INCREMENTAL_RESOURCES_APK),
- resourceDeps,
- ruleContext.getExpander().withDataLocations().tokenized("nocompress_extensions"),
- ruleContext.attributes().get("crunch_png", Type.BOOLEAN),
- ProguardHelper.getProguardConfigArtifact(ruleContext, "incremental"));
- ruleContext.assertNoErrors();
-
- splitResourceApk =
- applicationManifest
- .createSplitManifest(ruleContext, "android_resources", false)
- .packIncrementalBinaryWithDataAndResources(
- ruleContext,
- dataContext,
- getMobileInstallArtifact(ruleContext, "android_resources.ap_"),
- resourceDeps,
- ruleContext.getExpander().withDataLocations().tokenized("nocompress_extensions"),
- ruleContext.attributes().get("crunch_png", Type.BOOLEAN),
- ProguardHelper.getProguardConfigArtifact(ruleContext, "incremental_split"));
- }
+ StampedAndroidManifest manifest =
+ new StampedAndroidManifest(
+ applicationManifest.getManifest(), /* pkg = */ null, /* exported = */ true);
+
+ incrementalResourceApk =
+ ProcessedAndroidData.processIncrementalBinaryDataFrom(
+ ruleContext,
+ dataContext,
+ manifest.addMobileInstallStubApplication(ruleContext),
+ ruleContext.getImplicitOutputArtifact(
+ AndroidRuleClasses.ANDROID_INCREMENTAL_RESOURCES_APK),
+ getMobileInstallArtifact(ruleContext, "merged_incremental_resources.bin"),
+ "incremental",
+ applicationManifest.getManifestValues())
+ // Intentionally skip building an R class JAR - incremental binaries handle this
+ // separately.
+ .withValidatedResources(null);
+
+ splitResourceApk =
+ ProcessedAndroidData.processIncrementalBinaryDataFrom(
+ ruleContext,
+ dataContext,
+ manifest.createSplitManifest(ruleContext, "android_resources", false),
+ getMobileInstallArtifact(ruleContext, "android_resources.ap_"),
+ getMobileInstallArtifact(ruleContext, "merged_split_resources.bin"),
+ "incremental_split",
+ applicationManifest.getManifestValues())
+ // Intentionally skip building an R class JAR - incremental binaries handle this
+ // separately.
+ .withValidatedResources(null);
ruleContext.assertNoErrors();
return new MobileInstallResourceApks(incrementalResourceApk, splitResourceApk);