diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java | 17 |
1 files changed, 17 insertions, 0 deletions
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 6b48275d3f..e4b8c4d845 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 @@ -670,6 +670,17 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment { ) public boolean inheritResourcesInTests; + @Option( + name = "android_fixed_resource_neverlinking", + defaultValue = "false", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.LOADING_AND_ANALYSIS}, + help = "If true, resources will properly not get propagated through neverlinked libraries." + + " Otherwise, the old behavior of propagating those resources if no resource-related" + + " attributes are specified in the neverlink library will be preserved." + ) + public boolean fixedResourceNeverlinking; + @Override public FragmentOptions getHost() { Options host = (Options) super.getHost(); @@ -753,6 +764,7 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment { private final boolean allowResourcesAttr; private final boolean inheritResourcesInTests; private final boolean skipParsingAction; + private final boolean fixedResourceNeverlinking; AndroidConfiguration(Options options) throws InvalidConfigurationException { @@ -791,6 +803,7 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment { this.allowResourcesAttr = options.allowResourcesAttr; this.inheritResourcesInTests = options.inheritResourcesInTests; this.skipParsingAction = options.skipParsingAction; + this.fixedResourceNeverlinking = options.fixedResourceNeverlinking; if (!dexoptsSupportedInIncrementalDexing.contains("--no-locals")) { // TODO(bazel-team): Still needed? See DexArchiveAspect @@ -954,6 +967,10 @@ public class AndroidConfiguration extends BuildConfiguration.Fragment { return this.skipParsingAction; } + public boolean fixedResourceNeverlinking() { + return this.fixedResourceNeverlinking; + } + @Override public void addGlobalMakeVariables(ImmutableMap.Builder<String, String> globalMakeEnvBuilder) { globalMakeEnvBuilder.put("ANDROID_CPU", cpu); |