aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/XmlResourceValue.java
Commit message (Collapse)AuthorAge
* Automated rollback of commit f672a31b8b19baab95373e4f2f6d110aa8b8f0fb.Gravatar corysmith2018-02-16
| | | | | | | | | | | | | *** Reason for rollback *** Unclassified general breakages in tests. Rolling back for further investigation. *** Original change description *** Normalized the serialization proto to save space and allow greater versatility in storage. RELNOTES: None PiperOrigin-RevId: 186057879
* Normalized the serialization proto to save space and allow greater ↵Gravatar corysmith2018-02-16
| | | | | | | versatility in storage. RELNOTES: None PiperOrigin-RevId: 186036607
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Further Refactoring/Yak ShavingGravatar corysmith2017-05-15
| | | | | | | | | * Extract the FieldInitializer with placeholder ids from the AndroidResourceClassWriter * Extract a resource sink interface from the AndroidResourceClassWriter (a little renaming, the change isn't actually that big.) RELNOTES: None PiperOrigin-RevId: 156053478
* Improve the error message for simple values by including the value.Gravatar Googler2017-03-31
| | | | | | RELNOTES: None PiperOrigin-RevId: 151630049
* Wrap the source Path in a DataSource object.Gravatar Googler2016-10-25
| | | | | | | | The DataSource object will then be used to track which values have been overwritten and avoid incorrect merge warnings. -- MOS_MIGRATED_REVID=137159260
* Share source paths for more compact res proto serializationGravatar Googler2016-08-17
| | | | | | | | | | | | | | | | | | | | | | | Source abs paths can be pretty long. If a value file like colors.xml has N resources then we serialize the path N times. Instead, make a table and just serialize the index. Can reduce resource proto sizes from X to 0.65*X. in some experiments. CPU instructions executed is slightly lower, but critical path impact is pretty minimal since parsing happens in parallel anyway. This doesn't help with drawables (path only shows up once) but doesn't really hurt (an extra index number). I tried sharing the root (a table of the res dirs). That can be another 10%, and helps with the drawable case. However, a naive enumeration of roots (src.getParent().getParent()) added *much* more overhead to the writing stage, so I didn't go on with that. -- MOS_MIGRATED_REVID=130440810
* Add a resource merger state -> R class writer.Gravatar Googler2016-07-22
| | | | | | | | | | | | | | | | Collects the R class fields from the new merger's internal state, and then writes out either an R.java or R.class. TBD which to use. One concern is that users may want the javadoc. If so, perhaps this could generate the R.class, and then aapt could generate the srcjar off of the build critical path. Refactor the RClassGenerator to make it easier to use from merger state (vs from R.txt). -- MOS_MIGRATED_REVID=128181306
* Record and propagate namespaces from the <resources> element correctly.Gravatar Googler2016-07-15
| | | | | | | | | | | * Reduces the size of merged values.xml * Improves correctness of merged xml Sadly, this is also backwards compatible by allowing multiple definitions of a prefix with different namespaces. Will be cleaned up after transition. -- MOS_MIGRATED_REVID=127481147
* 4.99 of 5: Fix styleable combining.Gravatar Googler2016-05-10
| | | | | | | Changes non-overwriting resources (id and styleable) to combine on duplication. This change ignores the issue of multiple sources, which will be addressed in a later cl. -- MOS_MIGRATED_REVID=121840285
* 4 of 5: Serialization of UnwrittenMergedAndroidData.Gravatar Googler2016-04-20
| | | | | | | | | | | Adding AndroidDataSerializer, the serialize_format proto, and KeyValueConsumers (utility class for keeping consumers straight). The serializtion is a bit more manual as previous experience has proven to me that simply writing all the resources into a proto map and pulling them out is not performant in the least. So, the serializer stores each message independent, the keys and then the values allowing for potential lazy loading and other optimizations in the future. Also adds tests for parsing and writing style resources. -- MOS_MIGRATED_REVID=120274904
* 4.25 of 5: Writing of UnwrittenMergedAndroidDataGravatar Googler2016-04-07
| | | | | | | | | | | Introduces the AndroidDataWriter and AndroidDataWritingVisitor to abstract the io operations from the data classes. Necessary refactoring to the stubbed write method on DataValue in DataAsset.writeAsset and DataResource.writeResource. New interface for the AttributeValues to reflect the simplifications of writing Resource Attributes. Of special note is the fact all xml is written into a single file, values.xml. This is following the Gradle convention and aapt has demonstrated a preference of only reading a values.xml and ignoring all other xml files in the values directory. Unless profiling demonstrates an advantage to writing multiple files (which I doubt), this merger carries on this convention. -- MOS_MIGRATED_REVID=119066611
* Part 2 of 5: Optimize the resource merge process, XmlProcessing.Gravatar Googler2016-03-08
Introduces the XmlDataResource and all the associated cruft that comes with parsing Android Resource value xmls: XmlValues, XmlValue. -- MOS_MIGRATED_REVID=116540181