aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/aapt2
Commit message (Collapse)AuthorAge
* Optimize the shrinking pass to prevent timeouts.Gravatar corysmith2018-08-14
| | | | | RELNOTES: None PiperOrigin-RevId: 208666806
* Add test to ensure that the binary building pipeline works.Gravatar corysmith2018-08-14
| | | | | RELNOTES: None PiperOrigin-RevId: 208647642
* Correctly manage the ProtoApk lifecycle by ensuring it is closed when finished.Gravatar corysmith2018-08-13
| | | | | | | | | Move finding used resources to ProtoResourceUsageAnalyzer for correctness and memory improvements. New report format: now records the kept resource along with the resource that keep it, as well maintaining the root status for each resource. Example line: {number/foo[isRoot: false] = 0x07f...} => [{array/foos[isRoot: true] = 0x...}...] RELNOTES: None PiperOrigin-RevId: 208529350
* Adding test for an instance of Style having both reference and item.Gravatar corysmith2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208525880
* Automated rollback of commit 29b57c3afcfeb8e3fedcc2edcb0f28f13c784179.Gravatar corysmith2018-08-10
| | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with assets being included after relinking. *** Original change description *** Automated rollback of commit bab4b04ad09a571615d04aacadf8b3a2b820ba5f. *** Reason for rollback *** Appears to cause issues with the new apk. *** Original change description *** Relink instead of convert proto apks. RELNOTES: None PiperOrigin-RevId: 208245517
* Automated rollback of commit bab4b04ad09a571615d04aacadf8b3a2b820ba5f.Gravatar corysmith2018-08-06
| | | | | | | | | | | | | *** Reason for rollback *** Appears to cause issues with the new apk. *** Original change description *** Relink instead of convert proto apks. RELNOTES: None PiperOrigin-RevId: 207590807
* Relink instead of convert proto apks.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207575371
* Added functionality to let the ResourceLinker link ProtoApks.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207570745
* Allow a ProtoApk to write a manifest as xmlGravatar corysmith2018-08-06
| | | | | | RELNOTES: None PiperOrigin-RevId: 207548204
* aapt2 creates larger apks when converting from proto.Gravatar corysmith2018-08-03
| | | | | | | Create binary directly then convert to proto format. RELNOTES: None PiperOrigin-RevId: 207273767
* Tool attribute processing added to resource shrinking.Gravatar corysmith2018-08-02
| | | | | RELNOTES: None PiperOrigin-RevId: 207171755
* Expose AndroidResourceUsageAnalyzer methods to enable proto-based resource ↵Gravatar corysmith2018-08-02
| | | | | | | shrinking without tool attributes. RELNOTES: PiperOrigin-RevId: 207132534
* Parse raw xml resources for tools annotations.Gravatar corysmith2018-08-01
| | | | | RELNOTES: None PiperOrigin-RevId: 206960066
* Add the ability to do a filtered copy of a ProtoApkGravatar corysmith2018-08-01
| | | | | RELNOTES: None PiperOrigin-RevId: 206949407
* Add support for extracting references and declarations from a proto ↵Gravatar corysmith2018-08-01
| | | | | | | formatted apk RELNOTES: None PiperOrigin-RevId: 206945173
* Automated rollback of commit 0a635c5236ce30ea84b765ce752267992733a649.Gravatar corysmith2018-07-31
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with the correct attribute handling. *** Original change description *** Automated rollback of commit 8fe0f45852a620a078013310989396caed273342. *** Reason for rollback *** Breaks a couple of builds due to a bad merge. *** Original change description *** Add apk converted to proto and all attributes from CompiledResources to ResourcesZip. Add new proto format for tool attributes stored in the AndroidDataXml for storing them in the resources.zip. RELNOTES:None PiperOrigin-RevId: 206786645
* Automated rollback of commit 8fe0f45852a620a078013310989396caed273342.Gravatar corysmith2018-07-31
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks a couple of builds due to a bad merge. *** Original change description *** Add apk converted to proto and all attributes from CompiledResources to ResourcesZip. Add new proto format for tool attributes stored in the AndroidDataXml for storing them in the resources.zip. RELNOTES:None PiperOrigin-RevId: 206774364
* Add apk converted to proto and all attributes from CompiledResources to ↵Gravatar corysmith2018-07-31
| | | | | | | | | ResourcesZip. Add new proto format for tool attributes stored in the AndroidDataXml for storing them in the resources.zip. RELNOTES:None PiperOrigin-RevId: 206765679
* Enable aapt2 for aar_import by adding the AndroidConfiguration fragment.Gravatar corysmith2018-07-18
| | | | | RELNOTES: Fixed compatibility with aar_import when using aapt2. AAPT2 is now supported for Android app builds without resource shrinking. To use it, pass the `--android_aapt=aapt2` flag or define android_binary.aapt_version=aapt2. PiperOrigin-RevId: 205136160
* Cleanup Optional usageGravatar corysmith2018-07-11
| | | | | RELNOTES:None PiperOrigin-RevId: 204170706
* Turn on pseudo locale generation for compilation.Gravatar corysmith2018-05-30
| | | | | RELNOTES: android_binary.aapt_version='aapt2' now supports en_XA and ar_XB PiperOrigin-RevId: 198555305
* Automated rollback of commit feeccd8c0a5d97493cabfeb9481cf6f3800b9b84.Gravatar corysmith2018-05-10
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with correct handling for pseudo locale generation flags *** Original change description *** Only include generated resources when pseudo locales are asked for. CompileResources: generate pseudo locales into a separate compiled resource file when the pseudo locale flag is true and the locale is default (e.g. absent). The generated resources must be first in the returned list of compiled resource paths. This allows the user to define custom values to the pseudo locales (which, for some obscure reason, is accepted as a reasonable practice by aapt{,2}) AndroidResourceOutputs: record the type of compiled resource in the comment field of the zip entry for fast comparison. ResourceLinker: only include the generated resources when the pseudo locale is explicitly asked for. It's important to note that the ordering for compiled resources in the zip goes <generated>...<normal>...<default>. This means the default locale will overwrite the generated locale values. Annoying, but necessary, as that is current order before introducing this cl. RELNOTES:None PiperOrigin-RevId: 196159094
* Internal changeGravatar Googler2018-05-10
| | | | PiperOrigin-RevId: 196113268
* Only include generated resources when pseudo locales are asked for.Gravatar corysmith2018-05-10
| | | | | | | | | CompileResources: generate pseudo locales into a separate compiled resource file when the pseudo locale flag is true and the locale is default (e.g. absent). The generated resources must be first in the returned list of compiled resource paths. This allows the user to define custom values to the pseudo locales (which, for some obscure reason, is accepted as a reasonable practice by aapt{,2}) AndroidResourceOutputs: record the type of compiled resource in the comment field of the zip entry for fast comparison. ResourceLinker: only include the generated resources when the pseudo locale is explicitly asked for. It's important to note that the ordering for compiled resources in the zip goes <generated>...<normal>...<default>. This means the default locale will overwrite the generated locale values. Annoying, but necessary, as that is current order before introducing this cl. RELNOTES:None PiperOrigin-RevId: 196111843
* Generate a separate psuedo locale .flat file only for default locale on ↵Gravatar corysmith2018-05-08
| | | | | | | values resources. RELNOTES:None PiperOrigin-RevId: 195821595
* Extract Qualifiers class for reuse.Gravatar corysmith2018-05-07
| | | | | | | | | | | | Also, introduce caching for duplicated qualifiers. Rolling Forward: Fixed attempting to parse non-resource directories with dashes as resource directories. Added test for this case. RELNOTES: None PiperOrigin-RevId: 195658978
* Internal changeGravatar Googler2018-05-03
| | | | PiperOrigin-RevId: 195321054
* Extract Qualifiers class for reuse.Gravatar corysmith2018-05-03
| | | | | | | Also, introduce caching for duplicated qualifiers. RELNOTES:None PiperOrigin-RevId: 195313195
* Avoid failing when a fixed locale conflicts with a provided locale qualifer ↵Gravatar corysmith2018-05-01
| | | | | | | | | for resources. Refactor: Move the resource compilation out of the treewalk. RELNOTES: None PiperOrigin-RevId: 194982664
* Normalize parameter name commentsGravatar cushon2018-04-27
| | | | PiperOrigin-RevId: 194512971
* Automated rollback of commit 047688a129b444ba918ae4c31767dce73b17b049.Gravatar Googler2018-04-24
| | | | | | | | | | | | | *** Reason for rollback *** This broke Hangouts Meet on Android tests: [] *** Original change description *** Add support for pseudo locales to ResourceLinker. RELNOTES: None PiperOrigin-RevId: 194167109
* Add support for pseudo locales to ResourceLinker.Gravatar corysmith2018-04-24
| | | | | RELNOTES: None PiperOrigin-RevId: 194126334
* Remove use of bare Immutable{List,Map,Set} Builder classes.Gravatar jcater2018-04-20
| | | | | | Always use the more-qualified class name for clarity at the site of use. There are too many classes named Builder. PiperOrigin-RevId: 193649193
* Add --debug-mode to aapt2 invocations when building without -c opt.Gravatar corysmith2018-04-19
| | | | | RELNOTES: None PiperOrigin-RevId: 193562885
* Update ApkSubject to use the AndroidCompiledDataDeserializer for proto apks.Gravatar corysmith2018-04-19
| | | | | | | Minor fixes to the AndroidCompiledDataDeserializer RELNOTES: None PiperOrigin-RevId: 193535766
* Add the --pseudo-localize flag to resource compilation, gated by the ↵Gravatar corysmith2018-04-19
| | | | | | | | | --generatePseudoLocale flag. Cleaned up the CompileLIbraryResourcesAction to use the Aapt2ConfigOptions. RELNOTES: PiperOrigin-RevId: 193525850
* Make android tools stop accepting --annotationJar.Gravatar ajmichael2018-03-22
| | | | | | | Bazel stopped passing it in https://github.com/bazelbuild/bazel/commit/1a6ca6f47aef36d56b5cb2f9da114af75dde583d. RELNOTES: None PiperOrigin-RevId: 190064697
* Filter out non-.flat files while linking.Gravatar corysmith2018-03-06
| | | | | RELNOTES: None PiperOrigin-RevId: 188121571
* Don't fail if special resource directories contain multiple resourcesGravatar Googler2018-02-15
| | | | | | | | | | | | | We run ResourceCompiler#visitFile once per resource file being compiled. If the file has qualifiers aapt2 doesn't support (es-419 or sr-latn), we copy the file into a new directory with corrected qualifiers. However, Files.createDirectory fails if the folder already exists (because, for example, we just copied another file). Instead, use Files.createDirectories, which allows the folder to already exist. RELNOTES: none PiperOrigin-RevId: 185887192
* Add the ability to output the resource table as a protocol buffer to the ↵Gravatar corysmith2018-01-25
| | | | | | | | | Aapt2ResourcePackagingAction Ensure that the custom package is respected in aapt2. This only impact the srcjar, as the classes are generated via another method. RELNOTES: None PiperOrigin-RevId: 183260369
* Support DTD when processing resource files in the aapt2 pipelineGravatar Googler2018-01-22
| | | | | | | | Unfortunately, the getTag() function explicitly fails when it encounters a DTD item, so we need to do a bit of custom handling instead. RELNOTES: none PiperOrigin-RevId: 182821046
* Also support es-r419 as a locale.Gravatar Googler2018-01-16
| | | | | RELNOTES: none PiperOrigin-RevId: 182099868
* Fix parsing for some aapt2-generated resources.Gravatar Googler2018-01-10
| | | | | RELNOTES: none PiperOrigin-RevId: 181506851
* Serialize and package xml attributes from resources xml tags in values ↵Gravatar Googler2018-01-08
| | | | | | | folders for aapt2. RELNOTES: none PiperOrigin-RevId: 181226483
* Use assets from the resource APK for resource shrinking rather than from the ↵Gravatar Googler2017-12-20
| | | | | | | merge actions. RELNOTES: none PiperOrigin-RevId: 179695515
* Automatic formatting cleanup of Android *.java files.Gravatar jingwen2017-12-18
| | | | | RELNOTES: None. PiperOrigin-RevId: 179425421
* Automated rollback of commit 70c2be189c9c0021f7c424c7399f8bdecc579b4e.Gravatar Googler2017-12-15
| | | | | | | | | | | | | *** Reason for rollback *** Broke some cakemix tap projects *** Original change description *** Use assets from the APK for resource shrinking rather than from the merge actions. RELNOTES: none PiperOrigin-RevId: 179252805
* Use assets from the APK for resource shrinking rather than from the merge ↵Gravatar Googler2017-12-15
| | | | | | | actions. RELNOTES: none PiperOrigin-RevId: 179227857
* Improve the error messaging by suppressing stack traces for expected errors.Gravatar corysmith2017-11-30
| | | | | RELNOTES: None PiperOrigin-RevId: 177460834
* Add option to enable resource cycle shrinking.Gravatar Googler2017-11-21
| | | | | | | | This will instruct AAPT2 to produce conditional keep rules to allow for more aggressive code and resource shrinking. RELNOTES[NEW]: Add --experimental_android_resource_cycle_shrinking option to allow for more aggressive code and resource shrinking. PiperOrigin-RevId: 176530749