aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Andrew Pellegrini <apell@google.com>2017-01-31 16:59:28 +0000
committerGravatar Yun Peng <pcloudy@google.com>2017-02-01 08:55:03 +0000
commit400c24aad97b43f782f5d8973edbbef61a7ef124 (patch)
tree5be2f8ef21e622bbcae84ec19c218d114986491a
parente9552d4e09906d5abd823e8dd278483a095f956d (diff)
Update documentation to note that the shrinker behavior differs from the Gradle version in that it removes values resources instead of only minifying them.
-- PiperOrigin-RevId: 146124871 MOS_MIGRATED_REVID=146124871
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java1
-rw-r--r--third_party/java/aosp_gradle_core/java/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
index f796f65ca6..63bce10067 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
@@ -93,6 +93,7 @@ public final class AndroidBinaryOnlyRule implements RuleDefinition {
(https://developer.android.com/studio/build/shrink-code.html#shrink-resources).
<p>Notable differences:
<ul>
+ <li>resources in <code>values/</code> will be removed as well as file based resources</li>
<li>uses <code>strict mode</code> by default</li>
<li>removing unused ID resources is not supported</li>
</ul>
diff --git a/third_party/java/aosp_gradle_core/java/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java b/third_party/java/aosp_gradle_core/java/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java
index 3b40c958b0..fe12f83357 100644
--- a/third_party/java/aosp_gradle_core/java/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java
+++ b/third_party/java/aosp_gradle_core/java/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java
@@ -138,9 +138,7 @@ import org.xml.sax.SAXException;
* named "foo" as potentially used. However, if the string is "bar/foo" or " foo " these strings are
* ignored. This means we can potentially miss resources usages where the resource name is completed
* computed (e.g. by concatenating individual characters or taking substrings of strings that do not
- * look like resource names), but that seems extremely unlikely to be a real-world scenario. <p> For
- * now, for reasons detailed in the code, this only applies to file-based resources like layouts,
- * menus and drawables, not value-based resources like strings and dimensions.
+ * look like resource names), but that seems extremely unlikely to be a real-world scenario.
*/
public class ResourceUsageAnalyzer {
private static final String ANDROID_RES = "android_res/";