Open
Bug 1229269
Opened 10 years ago
Updated 3 years ago
Remove all uses Resources.getResourceIdentifier from Fennec to enable Gradle's shrinkResources
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Firefox Build System
Android Studio and Gradle Integration
Tracking
(firefox45 affected)
NEW
| Tracking | Status | |
|---|---|---|
| firefox45 | --- | affected |
People
(Reporter: nalexander, Unassigned)
Details
This ticket tracks enabling Gradle's "shrinkResources" option (see http://tools.android.com/tech-docs/new-build-system/resource-shrinking). In fact, this is easy -- but more or less useless, since Resources.getResourceIdentifier stymies the analysis, marking almost all resources as "reachable" since they match an overly broad prefix. (See https://android.googlesource.com/platform/tools/base/+/70835c6423962449ba7032ee4ee19ec096e8c5ff/build-system/gradle-core/src/main/groovy/com/android/build/gradle/tasks/ResourceUsageAnalyzer.java#2448, which I believe is current as of com.android.tools.build:gradle:2.0.0-alpha1.)
There are ways to improve this by setting some flags and using tools prefixes, but perhaps we can figure out how to just do better. There are only about 3 consumers of getIdentifiers() in the tree (see https://dxr.mozilla.org/mozilla-central/search?q=getIdentifier+path%3A*.java&redirect=true&case=false) although they actually appear legitimate.
Updated•7 years ago
|
Product: Firefox for Android → Firefox Build System
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•