aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android
Commit message (Collapse)AuthorAge
* Enable proguarded Android builds with --experimental_desugar_java8_libs in BazelGravatar kmb2018-05-16
| | | | | | RELNOTES: Bazel supports including select Java 8 APIs into Android apps targeting pre-Nougat Android devices with --experimental_desugar_java8_libs PiperOrigin-RevId: 196833987
* Remove references to internal targetsGravatar ulfjack2018-05-14
| | | | PiperOrigin-RevId: 196476639
* Set Locale to English when uppercasing strings to match EnumsGravatar Jingwen Chen2018-05-11
| | | | | | | | | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/5157 If a user's default system locale is not `en`, `en_US` or `en_UK`, there may be a chance that `String#toUpperCase` will result in a string that does not exist in the Enum declaration. This is the case in #5157. To fix this, it's either 1) setting the Locale in the individual `toUpperCase` calls or 2) set Locale to English by default from `Bazel.java`. I chose the first because it seemed less intrusive, but I'm open to suggestions. Closes #5184. PiperOrigin-RevId: 196261078
* 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
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-02
| | | | PiperOrigin-RevId: 195100670
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-02
| | | | PiperOrigin-RevId: 195100125
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-02
| | | | PiperOrigin-RevId: 195094385
* Clean up code that directly imports nested classes like Builder, Entry, etc.Gravatar jcater2018-05-01
| | | | PiperOrigin-RevId: 195040539
* 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
* For --checkHashMismatch=ERROR, emit all errors instead of stopping at the ↵Gravatar cushon2018-04-26
| | | | | | first one PiperOrigin-RevId: 194491274
* 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
* Add error message on empty public resourcesGravatar asteinb2018-04-23
| | | | | | | | This should provide more understandable behavior in the case described in https://github.com/bazelbuild/bazel/issues/5077 RELNOTES: none PiperOrigin-RevId: 193968203
* 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
* Relax the assertion in Desugar for checking the calls to $closeResource(...).Gravatar cnsun2018-04-17
| | | | | | | | It is possible that $closeResource(...) is not used as the calls to it might be eliminated by some optimization tools, such as Proguard. RELNOTES: n/a. PiperOrigin-RevId: 193262552
* Ability to pass decoupled assets into monolithic resource processing actionGravatar asteinb2018-04-17
| | | | | | | | | - New flags to pass in asset deps - Pass assets into merging in the monolithic action - Field for asset deps in asset builder action RELNOTES: none PiperOrigin-RevId: 193211038
* Create asset merging actionGravatar asteinb2018-04-16
| | | | | | | | | | | | This action is a trimmed-down version of the resource merging action (no resources or manifests). Also, create a base class to collect boilerplate action code, and a new Exception to indicate that we should exit an action immediately (rather than throw and print the stack trace). RELNOTES: none PiperOrigin-RevId: 193054422
* Remove some deprecated resources flags.Gravatar ajmichael2018-04-04
| | | | | RELNOTES: None PiperOrigin-RevId: 191624839
* Automated rollback of commit e8bed799d59526541afa2a0e9ef5d4c49e3ba390.Gravatar corysmith2018-04-03
| | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with improved handling and testing for Styleables, and correct package management. *** Original change description *** Automated rollback of commit a76f7db51a90cc2e35c1d66782056c310729eef0. *** Reason for rollback *** Breaks Kix. *** Original change description *** Modify the .flat decompilation to account for multiple configurations by converting the aapt2 proto ConfigValue to a FolderConfiguration. Adds new aapt2 compiled deserialization test. RELNOTES: None PiperOrigin-RevId: 191444658
* Create proguard.txt in android_library AAR output.Gravatar ajmichael2018-04-02
| | | | | | | | | The proguard.txt is the concatenation of the proguard_specs on the android_library rule itself. Note that it does not include transitively defined proguard_specs. Fixes https://github.com/bazelbuild/bazel/issues/4467 RELNOTES: android_library AAR output now contains proguard.txt PiperOrigin-RevId: 191302610
* build and test KeepScanner tool open-sourceGravatar kmb2018-03-30
| | | | PiperOrigin-RevId: 191159996
* Automated rollback of commit a76f7db51a90cc2e35c1d66782056c310729eef0.Gravatar corysmith2018-03-30
| | | | | | | | | | | | | | *** Reason for rollback *** Breaks Kix. *** Original change description *** Modify the .flat decompilation to account for multiple configurations by converting the aapt2 proto ConfigValue to a FolderConfiguration. Adds new aapt2 compiled deserialization test. RELNOTES: None PiperOrigin-RevId: 191058952
* Modify the .flat decompilation to account for multiple configurations by ↵Gravatar corysmith2018-03-29
| | | | | | | | | converting the aapt2 proto ConfigValue to a FolderConfiguration. Adds new aapt2 compiled deserialization test. RELNOTES: None PiperOrigin-RevId: 190976708
* stub simple core library bridge methods that only differ in return typeGravatar kmb2018-03-26
| | | | | | RELNOTES: None. PiperOrigin-RevId: 190559240
* Enable params files for DexMapper.Gravatar ahumesky2018-03-26
| | | | | RELNOTES: None PiperOrigin-RevId: 190516662
* Detect main dex list entries that will be missingGravatar kmb2018-03-22
| | | | | | RELNOTES: None. PiperOrigin-RevId: 190154101
* Make ManifestMergerAction able to not take a primary manifestGravatar asteinb2018-03-22
| | | | | | | | | This is the only difference in action implementation required for the new Skylark Android Data API design. Even if rules have resources or assets, after this API is adopted, they will no longer have to specify a primary manifest. Instead, a dummy manifest will be generated (either to merge with dependency manifests, or for use by IDEs if there are no dependency manifests). Support this in the ManifestMergerAction by supporting not having a --manifest value passed. RELNOTES: None PiperOrigin-RevId: 190095623
* 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
* Have the Android R class generators add the target label to the class jar.Gravatar tomlu2018-03-20
| | | | | | | This re-enables support for add_deps. RELNOTES: None PiperOrigin-RevId: 189737607
* Reflect core library moves in super calls, even in default method stubs. ↵Gravatar kmb2018-03-16
| | | | | | | | Always generate default method stubs for emulated methods. RELNOTES: None. PiperOrigin-RevId: 189423933
* Android tools: remove mtime-modificationsGravatar Laszlo Csomor2018-03-15
| | | | | | | | | | | | | | | | | | | | | | | | The Android tools no longer modify output file mtimes in hopes of achievening better action cache hits. Modifying the mtimes was confusing Bazel and causing correctness bugs. Modifying the mtimes is unnecessary because Bazel is smart about picking up filesystem changes and observes more signals than just the mtime, though as the corresponding bug shows it's sadly not bullet-proof. Fixes https://github.com/bazelbuild/bazel/issues/4734 Change-Id: I4aa8abf29486841ba8133f927e2816d7f85881fe Closes #4848. Change-Id: I0615fae1f20d786771d742705ab4a6ddf7f2306e PiperOrigin-RevId: 189183742
* Make KeepScanner tool search classpath for nearest definition of each member ↵Gravatar kmb2018-03-12
| | | | | | | | | reference, instead of potentially referring to a subtype. Refactor desugar's class loading machinery and related code into a separate package for easier reuse in this tool. RELNOTES: None. PiperOrigin-RevId: 188825305
* Minor fixes to KeepScanner tool:Gravatar kmb2018-03-12
| | | | | | | | - use Guava to read zip entries - Fix keep rules emitted for constructors RELNOTES: None. PiperOrigin-RevId: 188781547
* Support custom implementations of emulated core interface methodsGravatar kmb2018-03-12
| | | | | | RELNOTES: None. PiperOrigin-RevId: 188760099
* Don't check contents of conflicting compiled resourcesGravatar asteinb2018-03-07
| | | | | | | | Until we properly support checking the contents of these files, don't try to do so. RELNOTES: none PiperOrigin-RevId: 188192286
* Filter out non-.flat files while linking.Gravatar corysmith2018-03-06
| | | | | RELNOTES: None PiperOrigin-RevId: 188121571
* emulate dynamic dispatch of emulated default interface methodsGravatar kmb2018-03-02
| | | | | | RELNOTES: None. PiperOrigin-RevId: 187671513
* Android desugar config options to exclude methods from interface emulationGravatar kmb2018-03-01
| | | | | | RELNOTES: None. PiperOrigin-RevId: 187551970
* send invocations to emulated interfaces through dispatch helper.Gravatar kmb2018-03-01
| | | | | | | fix logic for implementing emulated interfaces. RELNOTES: None. PiperOrigin-RevId: 187520298
* Ensure configurations are still filtered after shrinking.Gravatar corysmith2018-02-27
| | | | | RELNOTES: None PiperOrigin-RevId: 187239449