aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java
diff options
context:
space:
mode:
authorGravatar corysmith <corysmith@google.com>2018-05-10 13:02:33 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-10 13:04:29 -0700
commit448c09dcc44bda216c554af0b4987eba16c2e17b (patch)
treec2c12e318fe91c29c32a67e09838c6e1d67339c7 /src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java
parent4f0051c61045bedab87253b1c8db61cd22926708 (diff)
Automated rollback of commit feeccd8c0a5d97493cabfeb9481cf6f3800b9b84.
*** Reason for rollback *** Rolling forward with correct handling for pseudo locale generation flags *** Original change description *** Only include generated resources when pseudo locales are asked for. CompileResources: generate pseudo locales into a separate compiled resource file when the pseudo locale flag is true and the locale is default (e.g. absent). The generated resources must be first in the returned list of compiled resource paths. This allows the user to define custom values to the pseudo locales (which, for some obscure reason, is accepted as a reasonable practice by aapt{,2}) AndroidResourceOutputs: record the type of compiled resource in the comment field of the zip entry for fast comparison. ResourceLinker: only include the generated resources when the pseudo locale is explicitly asked for. It's important to note that the ordering for compiled resources in the zip goes <generated>...<normal>...<default>. This means the default locale will overwrite the generated locale values. Annoying, but necessary, as that is current order before introducing this cl. RELNOTES:None PiperOrigin-RevId: 196159094
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java b/src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java
index 025533ee6a..b903ebec66 100644
--- a/src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java
+++ b/src/tools/android/java/com/google/devtools/build/android/Aapt2ResourcePackagingAction.java
@@ -175,6 +175,7 @@ public class Aapt2ResourcePackagingAction {
.conditionalKeepRules(aaptConfigOptions.conditionalKeepRules == TriState.YES)
.filterToDensity(options.densities)
.debug(aaptConfigOptions.debug)
+ .includeGeneratedLocales(aaptConfigOptions.generatePseudoLocale)
.includeOnlyConfigs(aaptConfigOptions.resourceConfigs)
.link(compiled)
.copyPackageTo(options.packagePath)