| Commit message (Collapse) | Author | Age |
|
|
|
| |
PiperOrigin-RevId: 195100125
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 179425421
|
|
|
|
|
|
|
| |
Fixes https://github.com/bazelbuild/bazel/issues/2709
RELNOTES: None.
PiperOrigin-RevId: 155097576
|
|
|
|
|
|
|
| |
This is not exhaustive of all combinable attributes, but of those that have common uses. More combinable attributes can be added by adding to ResourcesAttribute.AttributeType.
RELNOTES: None.
PiperOrigin-RevId: 152694650
|
|
|
|
|
|
|
|
| |
toolchain.
--
PiperOrigin-RevId: 149963021
MOS_MIGRATED_REVID=149963021
|
|
|
|
|
|
| |
--
PiperOrigin-RevId: 144360540
MOS_MIGRATED_REVID=144360540
|
|
|
|
|
|
|
|
| |
The DataSource object will then be used to track which values have been
overwritten and avoid incorrect merge warnings.
--
MOS_MIGRATED_REVID=137159260
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* Add in some line breaks for easier to read output.
--
MOS_MIGRATED_REVID=126315204
|
|
|
|
|
|
|
|
|
| |
is necessary for <style parent="">.
The previous code omitted empty strings to avoid the <attr format=""> case which is an error for aapt.
--
MOS_MIGRATED_REVID=126305040
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new "define" method replaces the now deprecated writeToValuesXml method. This provides three benefits:
* An agnostic writing interface to the XmlResourceValue classes, easing the replacement of them with a proper xml writer.
* A delayed write which allows the StyleableXmlResourceValue to claim AttrXmlResourceValue definitions before writing.
* Centralized method of source attribution, enabling a less verbose way to indicate multiple values came from a single xml source file.
An example of the new interface writing the StyleXmlResourceValue:
ValuesResourceDefinition definition = mergedDataWriter
.define(key)
.derivedFrom(source)
.startTag("style")
.named(key)
.optional()
.attribute("parent")
.setTo(parent)
.closeTag();
for (Entry<String, String> entry : values.entrySet()) {
definition = definition
.startItemTag()
.named(entry.getKey())
.close()
.addCharactersOf(entry.getValue())
.endTag();
}
definition.endTag().save();
--
MOS_MIGRATED_REVID=126196028
|
|
|
|
|
|
|
| |
Cleans up a few warts from the last few changes.
--
MOS_MIGRATED_REVID=121588557
|
|
|
|
|
|
|
|
|
|
| |
* Uses the png cruncher for crunching pngs.
* Respects qualifiers when generating the values/values.xml.
* Improvements to testability.
* Standardizes on throwing merging exceptions instead of random IOExceptions.
--
MOS_MIGRATED_REVID=121483439
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
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
|