aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com
Commit message (Collapse)AuthorAge
...
* Xml processing fixes:Gravatar Googler2016-06-13
| | | | | | | | | * Support for <item name="foo" type="id">7x0000</item> * Adds <eat-comment/> after source attributions to ensure they are not sent to the final binary * Store attributes for arrays to the string translatable=false case -- MOS_MIGRATED_REVID=124684322
* Small fixes:Gravatar Googler2016-06-07
| | | | | | | | * Sort the FullyQualifiedNames during writing for determinism. * Crunch all pngs not in raw -- MOS_MIGRATED_REVID=124245017
* Change the readContentsAsString to use the XMLOutputFactory instead of the ↵Gravatar Googler2016-06-07
| | | | | | | manual writing. -- MOS_MIGRATED_REVID=124243184
* Enable the AndroidResourceProcessingAction to accept splits.Gravatar Michael Staib2016-06-06
| | | | | | | | | These splits will be passed through to aapt, which will create additional resource packages (and reduce the set found in the base ap_) as a result. -- MOS_MIGRATED_REVID=123995947
* Add support for an "inclusion filter" to DexMapper toolGravatar Googler2016-06-03
| | | | | -- MOS_MIGRATED_REVID=123887669
* Rollback of commit d3cccae7b663d5defea2943509b0d9d245279830.Gravatar Googler2016-05-23
| | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with api tolerance. *** Original change description *** Automated [] rollback of commit 941ef4d96d85e114eb6cca2fc0f646578ab0ef27. *** Reason for rollback *** Breaks Bazel due to internal patch for Round qualifier. *** Original change description *** * Adds handling for anydpi and watch, two unsupported qualifiers in FolderConfiguration. * Handles resources nested in directories. * Makes the resource processing resilient to invalid qualifiers. -- MOS_MIGRATED_REVID=122910358
* Rollback of commit 941ef4d96d85e114eb6cca2fc0f646578ab0ef27.Gravatar Googler2016-05-19
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel due to internal patch for Round qualifier. *** Original change description *** * Adds handling for anydpi and watch, two unsupported qualifiers in FolderConfiguration. * Handles resources nested in directories. * Makes the resource processing resilient to invalid qualifiers. -- MOS_MIGRATED_REVID=122747030
* * Adds handling for anydpi and watch, two unsupported qualifiers in ↵Gravatar Googler2016-05-19
| | | | | | | | | | FolderConfiguration. * Handles resources nested in directories. * Makes the resource processing resilient to invalid qualifiers. -- MOS_MIGRATED_REVID=122688529
* Use BufferedOutputStream for zipping / jar.Gravatar Googler2016-05-19
| | | | | | | | | | | | | | | | | | | | | | | | | This is for the resources.zip and the srcjar and aar. For the srcjar this is only slightly faster (100ms), but we might as well? Perhaps this is because the files are quite large anyway. Not sure if there would be smaller writes with compression. For the resources.zip it seems to make a bigger difference: > 1s when run locally. Perhaps this is because there are more small files. Didn't benchmark aar at all, just noticed it. Kevin mentioned the Buffering on one of the issues, so I happened to notice this when using similar code for prototype of R.class jar creation (seemed to be > 1s faster in that case, but that was also compressing). -- MOS_MIGRATED_REVID=122663374
* Handle b+.{2}+{3,4} qualifiers, as well as mobile country code and mobile ↵Gravatar Googler2016-05-18
| | | | | | | network code qualifiers. -- MOS_MIGRATED_REVID=122591469
* Switch the qualifier parsing to use FolderConfiguration. There is some extra ↵Gravatar Googler2016-05-17
| | | | | | | processing due to the missing support for ll-{3,4}, which should be removed with the android-ide-common update. -- MOS_MIGRATED_REVID=122536342
* Fix for combining resources so that the transitive, direct, and primary ↵Gravatar Googler2016-05-17
| | | | | | | | | | | | | | | | resources are combined for the primary writing. Example: transitive resource: styleable/RubADubDub has an attr of butcher direct resource: styleable/RubADubDub has an attr of baker primary resource: styleable/RubADubDub has an attr of candlestickmaker The merged resources should have: transitive resource: <no matching key> primary resource: styleable/RubADubDub has attrs of butcher, baker, candlestickmaker -- MOS_MIGRATED_REVID=122453026
* Make AarGeneratorAction deterministic by zeroing zip entry timestamps.Gravatar Nicholas Lativy2016-05-17
| | | | | | | | ZipOutputStream#putNextEntry(ZipEntry) sets the modification time to the current time if no time is set on the ZipEntry passed to it. -- MOS_MIGRATED_REVID=122436300
* Memory Optimizations:Gravatar Googler2016-05-16
| | | | | | | | * Cache the FullyQualifiedName instances. Due to a very high number of duplicated resource keys, all FullyQualifiedNames should be effectively interned. * Presume xliff in all resources. Inlining the xmlns is a bit costly. -- MOS_MIGRATED_REVID=122375955
* Speed Optimizations:Gravatar Googler2016-05-16
| | | | | | | | | * Adds threading to the AndroidDataWriter and AndroidDataSerializer. * Changes to a BufferedWriter for the Writer (turns out it's faster for string writing.) * Added buffers to the serializer reading. -- MOS_MIGRATED_REVID=122280993
* Fix wrong method accessor in "this dep isGravatar Greg Estren2016-05-13
| | | | | | | allowed but with a warning" messages. -- MOS_MIGRATED_REVID=122194162
* Add mpdi and ldpi to the v4 adjustment of qualifiers.Gravatar Googler2016-05-10
| | | | | -- MOS_MIGRATED_REVID=121949151
* Renaming nonOverwriting to combining resources.Gravatar Googler2016-05-10
| | | | | -- MOS_MIGRATED_REVID=121863653
* Avoid generating an ap_ file for android_libraryGravatar Googler2016-05-10
| | | | | | | | Saves roughly 200ms per aapt invocation, when aapt is only used for validation of resources. -- MOS_MIGRATED_REVID=121863470
* 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
* Adds support for stamping 280dpi into the density filtered manifest.Gravatar Googler2016-05-05
| | | | | -- MOS_MIGRATED_REVID=121598015
* 4.99 of 5: Cleanup.Gravatar Googler2016-05-05
| | | | | | | Cleans up a few warts from the last few changes. -- MOS_MIGRATED_REVID=121588557
* [Android] Support aapt-generated main dex specs.Gravatar Googler2016-05-05
| | | | | | | | Add bazel support for using the "aapt -D" command to generate a proguard specification for components which need to be in the main dex. -- MOS_MIGRATED_REVID=121531584
* 4.95 of 5: Merger changesGravatar Googler2016-05-05
| | | | | | | | | * Merge conflicts are now bright red warnings, as the previous merger was simultaneously stricter and looser than expected. * Legacy resource rules are now detected and cause bright red warnings. * Merge conflicts will test for equality either of file contents or parsed xml -- MOS_MIGRATED_REVID=121510152
* 4.8 of 5: Xml Fixes for Merger IntegrationGravatar Googler2016-05-04
| | | | | | | | | | | | | | * SimpleXmlResourceValue records all attributes except name. (I'd like to toss description, just as soon as I know I can -- bloats the serialized form.) * Added handling for <item> to SimpleXmlResourceValue: this can be used as placeholders, or (apparently) mostly unvalidated value definitions. * drawable can be used to put in colored backgrounds in a values.xml * Strings, Plurals, need to read sub tags such as xliff as string * <eat-comment/> and <skip/> need to be handled: we ignore them as all comments are eaten right now; and skip appears to be for localization diffs * xml parser must be resilient to random characters in resources defined in values. * Handles the <resource> not <resources> coding mistake gracefully. * Supports a <public> declaration. This feature is more wildly used than the nonexistant documentation suggests. -- MOS_MIGRATED_REVID=121490019
* 4.9 of 5: Writer fixes for integration.Gravatar Googler2016-05-04
| | | | | | | | | | * 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
* 4.85 of 5: DataKey fixes for integrationGravatar Googler2016-05-04
| | | | | | | | | * values directories now respect qualifiers (whoops.) * qualifiers must deal with 3-4 letter region codes * qualifiers must add api version for normalization -- MOS_MIGRATED_REVID=121417370
* Change ResourceShrinker instance of Charset.defaultCharset() being used to ↵Gravatar Andrew Pellegrini2016-05-03
| | | | | | | parse resource file to use UTF_8 explicitly. Fixes crash when reading R.txt with non-ASCII characters. -- MOS_MIGRATED_REVID=121415056
* 4.7 of 5: Remove serialization of transitive dependencies.Gravatar Googler2016-05-03
| | | | | | | Serializer no longer serializes transitive resources. That turned out to be a performance issue with large trees. Instead,it relies on the build tool to indicate the direct and transitive resources. This reduces the number of keys that get pulled from diamond dependencies and stays much, much leaner. -- MOS_MIGRATED_REVID=121382705
* Backports support for round and 280dpi to resource qualifiers.Gravatar Googler2016-04-26
| | | | | | | See unknown commit for the full library update that will overwrite this cl. -- MOS_MIGRATED_REVID=120810846
* Fix the srcs filegroup in BazelGravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | This broke tools/cpp/test/... due to missing files. Unfortunately those tests uses docker and until we can run docker in userland, we cannot run those on Jenkins. -- MOS_MIGRATED_REVID=120445118
* Adds new ManifestMergerAction to replace existing python merger script. ↵Gravatar Andrew Pellegrini2016-04-21
| | | | | | | Replacement will occur in a followup cl. New action uses the Gradle manifest merger through AndroidResourceProcessor. -- MOS_MIGRATED_REVID=120359118
* Fix incorrect package path.Gravatar Alex Humesky2016-04-20
| | | | | -- MOS_MIGRATED_REVID=120282869
* 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
* Add a crunch_png attribute to android_binaryGravatar Googler2016-04-18
| | | | | | | | | | | This allows a user to turn off png crunching during the final merge (with crunch_png = 0), but it does not skip nine-patch processing. RELNOTES: adds crunch_png attribute to android_binary -- MOS_MIGRATED_REVID=119986498
* Increase ResourceShrinker MethodVisitor level to ASM5 from ASM4 so that it ↵Gravatar Andrew Pellegrini2016-04-12
| | | | | | | can process class jars generated with javacopts=["-parameters"]. -- MOS_MIGRATED_REVID=119568210
* Adds a small temporary hack to the Android resource processor so that it doesn'tGravatar Alex Humesky2016-04-08
| | | | | | | | | | error on a build tools version ending in "-preview", because the current version of the android_common libraries that bazel uses are slightly old and it will take some time to upgrade to the latest version, which know how to parse the new revision format. -- MOS_MIGRATED_REVID=119308647
* Provide ResourceShrinker with the generated R.java packages in addition to ↵Gravatar Andrew Pellegrini2016-04-08
| | | | | | | packages from manifests. This prevents resources from being removed when they have been generated into a package other than the one specified in their target's manifest. -- MOS_MIGRATED_REVID=119294591
* Fix the java compile for non-compatible type inference between java 7 and 8.Gravatar Googler2016-04-07
| | | | | -- MOS_MIGRATED_REVID=119116506
* 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
* 3.75 of 5: Renaming classes and interfacesGravatar Googler2016-03-31
| | | | | | | | | | | | AndroidDataSet becomes ParsedAndroidData, reflecting the placement in the current AndroidData lifecycle: UnvalidatedAndroidData -> ParsedAndroidData -> UnwrittenMergedAndroidData -> MergeAndroidData -> DensityFilteredAndroidData -> DependencyAndroidData DataResourceFile becomes DataValueFile reflecting it's dual roles of DataAsset and DataResource. XmlDataResource becomes DataResourceXml for consistancy. -- MOS_MIGRATED_REVID=118689441
* Updates stub application resource handling to work with Android N.Gravatar Alex Humesky2016-03-30
| | | | | -- MOS_MIGRATED_REVID=118532668
* 3.74 of 5: Remove DataKey from DataValue, FileDataResource and XmlDataResource.Gravatar Googler2016-03-30
| | | | | | | This is mostly mechanical, cleaning up the vestigal marks of combining the value and key. The only mildly odd change is making the OverwritableConsumer and NonOverwritableConsumer package visible, for testing purposes. -- MOS_MIGRATED_REVID=118474980
* 3.73 of 5: Convert xml parsing to use the map based storageGravatar Googler2016-03-30
| | | | | | | | | Introduces two new interfaces: DataValue, which compliments DataKey and allows a cleaner interface MergeConflict AndroidDataSet.KeyValueConsumer, abstraction that allows a common interface for consuming parsed resources, which is a lot cleanr for DataValue as well. -- MOS_MIGRATED_REVID=118466739
* 3.71: Remove ResourceMap, Fix testsGravatar Googler2016-03-25
| | | | | | | | | | Removes ResourceMap from AndroidDataSet, now the merge operates directly on the AndroidDataSet instances. Change tests to use Map<DataKey, Data?> instead of List<Data?>. Add tests for finding conflicts during AndroidDataSet creation. Make MergeConflict more test friendly by sorting Paths on creation. -- MOS_MIGRATED_REVID=118240635
* 3.7 of 5: Refactoring ResourceMap generation.Gravatar Googler2016-03-25
| | | | | | | | | The end goal is to remove ResourceMap and separate the DataKey from the DataResource and DataAsset. This moves the resource map to AndroidDataSet and switches the generation to the Resource and Asset visitors. Which is nice, because it removes a traversal of the overwritable resources and assets. -- MOS_MIGRATED_REVID=118071238
* Part 3.5 of 5: AssetsGravatar Googler2016-03-25
| | | | | | | Adds support for parsing and merging assets. This introduces the DataKey and DataAsset interfaces which allow reuse of the FileDataResource for assets, the RelativeAssetPath which acts as a DataKey for assets (the relative asset path is the path that the asset will reside inside the final apk.) It also extends the AndroidDataSetBuilder to handle the creation of assets, and cleans up the interface a little. -- MOS_MIGRATED_REVID=118060379
* Global cleanup change.Gravatar Googler2016-03-21
| | | | | -- MOS_MIGRATED_REVID=117717104
* Part 3 of 5: Merging semantics.Gravatar Googler2016-03-18
| | | | | | | | | Introduces the AndroidDataMerger, MergeConflict, and UnwrittenMergedAndroidData which is the entry point in the AndroidResourceProcessing *AndroidData lifecycle. Also, refactors the AndroidDataSet parsing of resources, making it functionally immutable. -- MOS_MIGRATED_REVID=117492690
* Add Python protobuf to Bazel third_party and move all protobuf targets intoGravatar David Chen2016-03-17
| | | | | | | //third_party/protobuf. -- MOS_MIGRATED_REVID=117336377