aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google
Commit message (Collapse)AuthorAge
* Enable proto based resource shrinkingGravatar corysmith2018-08-15
| | | | | RELNOTES: None PiperOrigin-RevId: 208831294
* 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
* Automated rollback of commit 18e76da46b0c15d3309ac9d41f16fbd0468bc672.Gravatar Googler2018-08-13
| | | | | | | | | | | | | *** Reason for rollback *** Continuous build failure *** Original change description *** Enable proto based resource shrinking. RELNOTES: None PiperOrigin-RevId: 208572831
* Enable proto based resource shrinking.Gravatar corysmith2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208532627
* 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
* Changed all instances of /*itf=*/ to /*isInterface=*/ to eliminate errors.Gravatar Googler2018-08-13
| | | | | RELNOTES: None PiperOrigin-RevId: 208523963
* update data binding to 3.2.0 release (gradle)Gravatar Googler2018-08-10
| | | | | | | This CL updates the data binding to the latest public release. RELNOTES: update data binding to 3.2.0 PiperOrigin-RevId: 208267702
* 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
* Turn on proto based resource shrinking.Gravatar corysmith2018-08-06
| | | | | RELNOTES: None PiperOrigin-RevId: 207584302
* 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
* Add profiling data to the resources zip.Gravatar corysmith2018-07-31
| | | | | RELNOTES:None PiperOrigin-RevId: 206762523
* 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
* Make default method stubbing resilient to core library renaming, to preserve ↵Gravatar kmb2018-07-17
| | | | | | | | idempotency. RELNOTES: None. PiperOrigin-RevId: 204957400
* Drop module-info "class" in Android desugaringGravatar kmb2018-07-13
| | | | | | RELNOTES: None. PiperOrigin-RevId: 204492527
* Cleanup Optional usageGravatar corysmith2018-07-11
| | | | | RELNOTES:None PiperOrigin-RevId: 204170706
* Bazel server, tools: ensure Readers are closedGravatar laszlocsomor2018-07-09
| | | | | | | | | | | | | | | | | | | | Follow-up to commit 59f17d6e0550bf63a0b6ef182e2d63474e058ede. Use try-with-resources to ensure Reader objects are closed eagerly. Eagerly closing Readers avoids hanging on to file handles until the garbage collector finalizes the object, meaning Bazel on Windows (and other processes) can delete or mutate these files. Hopefully this avoids intermittent file deletion errors that sometimes occur on Windows. See https://github.com/bazelbuild/bazel/issues/5512 RELNOTES: none PiperOrigin-RevId: 203771262
* Fail when resources use invalid java identifiers.Gravatar corysmith2018-06-15
| | | | | RELNOTES:None PiperOrigin-RevId: 200766836
* Improve DependencyAndroidData VALID_REGEX's robustness.Gravatar jingwen2018-05-31
| | | | | | | | | | | | | | This prevents an invalid flag like `resources:assets:AndroidManifest.xml:::local.bin` to match, as with the case in https://github.com/bazelbuild/bazel/issues/5214 where the R.txt file is missing (shouldn't happen, but let's be defensive) Error message: ``` .. invalid DependencyAndroidData: bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/resources/support-compat-25.0.0/res:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/_aar/unzipped/assets/support-compat-25.0.0/assets:bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_processed_manifest/AndroidManifest.xml:::bazel-out/android-armeabi-v7a-fastbuild/bin/external/androidsdk/com.android.support/support-compat-25.0.0_symbols/local.bin is not in the format 'resources[#resources]:assets[#assets]:manifest:r.txt(:symbols.zip?):symbols.bin' ``` RELNOTES: None. PiperOrigin-RevId: 198724816
* 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
* Use independently passed assets in aapt2 packaging as wellGravatar asteinb2018-05-29
| | | | | | | | | | | | | | Much earlier, I made a change that allowed passing assets without resources to aapt packaging. Do the same for aapt2 packaging too. The busybox seems to be expecting compiled symbols, so compile assets and pass the compiled version in. (Compiling assets doesn't save any time, but doesn't cost much either, and means that we'll eventually be able to phase out the parsed form entirely. Adapting the Busybox to take parsed assets would probably work too, but getting the code to handle it would be really messy.) RELNOTES: none PiperOrigin-RevId: 198417111
* tolerate missing outer classes for interface desugaringGravatar kmb2018-05-24
| | | | PiperOrigin-RevId: 197946783
* Send Aapt2Exception message to the logger.Gravatar jingwen2018-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, if there are non-suppressed errors during aapt2 processing, Bazel does not print them. This helps with debugging https://github.com/bazelbuild/bazel/pull/5222 With this, I get: ``` ERROR: /usr/local/google/home/jingwen/code/android_scratch_project/examples/android/java/bazel/BUILD:16:1: Processing Android resources for //examples/android/java/bazel:hello_world failed (Exit 1) May 21, 2018 5:31:01 PM com.google.devtools.build.android.ResourceProcessorBusyBox main SEVERE: java.io.IOException: Is a directory Target //examples/android/java/bazel:hello_world failed to build ``` instead of just: ``` ERROR: /usr/local/google/home/jingwen/code/android_scratch_project/examples/android/java/bazel/BUILD:16:1: Processing Android resources for //examples/android/java/bazel:hello_world failed (Exit 1) Target //examples/android/java/bazel:hello_world failed to build ``` RELNOTES: None. PiperOrigin-RevId: 197493881
* 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