aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/aapt2/ResourceCompiler.java
Commit message (Collapse)AuthorAge
* Parse raw xml resources for tools annotations.Gravatar corysmith2018-08-01
| | | | | RELNOTES: None PiperOrigin-RevId: 206960066
* 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
* 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 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
* 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
* 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
* Improve the error messaging by suppressing stack traces for expected errors.Gravatar corysmith2017-11-30
| | | | | RELNOTES: None PiperOrigin-RevId: 177460834
* Action for resource shrinking with aapt2Gravatar corysmith2017-09-22
| | | | | | | Introduces the ResourcesZip class to more easily handle processing merged resources. RELNOTES: None PiperOrigin-RevId: 169622715
* Final tweaks and fixes to enable aapt2 for Blaze.Gravatar corysmith2017-08-24
| | | | | | | Implemented processing databinding for compile passes RELNOTES: None PiperOrigin-RevId: 166215052
* Adds compile action for aapt2: Aapt2ResourcePackagingActionGravatar corysmith2017-08-23
| | | | | | | | Adds a ManifestContainer interface to centralize the types that provide manifests. Adds PackagedResources to represent a linked dexless resource apk RELNOTES: None PiperOrigin-RevId: 166193049
* Adds aapt2.ResourceCompiler and CompileLibraryResourcesAction.Gravatar corysmith2017-08-11
Refactorings: * Change data binding to have configurable archive generation * Extract a ZipBuilder class from the ZipBuilderVisitor to provide a general purpose archiving class. * Small changes to visibility AaptCommandLineBuilder for reuse in the aapt2 code. RELNOTES: None PiperOrigin-RevId: 164880571