diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java index 4f0994271bba96..1451ec0cc08213 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java @@ -813,6 +813,7 @@ public static class Options extends FragmentOptions { help = "Skips resource parsing action for library targets" + " and uses the output of the compile action instead for resource merging.") + // TODO(b/136572475): Remove this flag once the usage has been removed from blazerc files. public boolean skipParsingAction; @Option( @@ -1073,7 +1074,6 @@ public ImmutableSet> requiredOptions() { private final boolean useAapt2ForRobolectric; private final boolean throwOnResourceConflict; private final boolean useParallelDex2Oat; - private final boolean skipParsingAction; private final boolean omitResourcesInfoProviderFromAndroidBinary; private final boolean fixedResourceNeverlinking; private final AndroidRobolectricTestDeprecationLevel robolectricTestDeprecationLevel; @@ -1122,7 +1122,6 @@ private AndroidConfiguration(Options options) throws InvalidConfigurationExcepti this.useAapt2ForRobolectric = options.useAapt2ForRobolectric; this.throwOnResourceConflict = options.throwOnResourceConflict; this.useParallelDex2Oat = options.useParallelDex2Oat; - this.skipParsingAction = options.skipParsingAction; this.omitResourcesInfoProviderFromAndroidBinary = options.omitResourcesInfoProviderFromAndroidBinary; this.fixedResourceNeverlinking = options.fixedResourceNeverlinking; @@ -1342,11 +1341,6 @@ public boolean throwOnResourceConflict() { return throwOnResourceConflict; } - @Override - public boolean skipParsingAction() { - return this.skipParsingAction; - } - @Override public boolean omitResourcesInfoProviderFromAndroidBinary() { return this.omitResourcesInfoProviderFromAndroidBinary; diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/MergedAndroidResources.java b/src/main/java/com/google/devtools/build/lib/rules/android/MergedAndroidResources.java index baf6317ec8a1ad..33fb4901b35754 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/MergedAndroidResources.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/MergedAndroidResources.java @@ -43,10 +43,7 @@ public static MergedAndroidResources mergeFrom( AndroidAaptVersion aaptVersion) throws InterruptedException { - AndroidConfiguration androidConfiguration = dataContext.getAndroidConfig(); - - boolean useCompiledMerge = - aaptVersion == AndroidAaptVersion.AAPT2 && androidConfiguration.skipParsingAction(); + boolean useCompiledMerge = aaptVersion == AndroidAaptVersion.AAPT2; Preconditions.checkState( !useCompiledMerge || parsed.getCompiledSymbols() != null, diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java b/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java index fd3a7bce2769e6..d89f019aa4d396 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/ProcessedAndroidData.java @@ -184,9 +184,7 @@ public static ProcessedAndroidData processLocalTestDataFrom( return builderForNonIncrementalTopLevelTarget( dataContext, manifest, manifestValues, aaptVersion) - .setUseCompiledResourcesForMerge( - aaptVersion == AndroidAaptVersion.AAPT2 - && dataContext.getAndroidConfig().skipParsingAction()) + .setUseCompiledResourcesForMerge(aaptVersion == AndroidAaptVersion.AAPT2) .setManifestOut( dataContext.createOutputArtifact(AndroidRuleClasses.ANDROID_PROCESSED_MANIFEST)) .setMergedResourcesOut( diff --git a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java index e602e942e7efc9..6ff5994dc2dd75 100644 --- a/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java +++ b/src/main/java/com/google/devtools/build/lib/skylarkbuildapi/android/AndroidConfigurationApi.java @@ -177,9 +177,6 @@ public interface AndroidConfigurationApi { documented = false) boolean throwOnResourceConflict(); - @SkylarkCallable(name = "skip_parsing_action", structField = true, doc = "", documented = false) - boolean skipParsingAction(); - @SkylarkCallable( name = "omit_resources_info_provider_from_android_binary", structField = true, diff --git a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java index 198f294fb83f0b..c2736191edf0d8 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/android/AndroidBinaryTest.java @@ -4492,7 +4492,7 @@ public void alwaysSkipParsingActionWithAapt2() throws Exception { List resourceMergingArgs = getGeneratingSpawnActionArgs(getValidatedResources(b).getJavaClassJar()); - assertThat(resourceMergingArgs).contains("MERGE"); + assertThat(resourceMergingArgs).contains("MERGE_COMPILED"); } @Test