aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com
Commit message (Collapse)AuthorAge
* Cleanup android rules and android tools so that my IDE stops complaining to me.Gravatar Adam Michael2017-01-25
| | | | | | -- PiperOrigin-RevId: 145569440 MOS_MIGRATED_REVID=145569440
* Description redacted.Gravatar Carmi Grushko2017-01-20
| | | | | | -- PiperOrigin-RevId: 145030082 MOS_MIGRATED_REVID=145030082
* Description redacted.Gravatar Vladimir Moskva2017-01-19
| | | | | | -- PiperOrigin-RevId: 144965845 MOS_MIGRATED_REVID=144965845
* If --strict_proto_deps=default and a proto_library didn't specify ↵Gravatar Carmi Grushko2017-01-18
| | | | | | | | strict_proto_deps, then strictness is enforced. -- PiperOrigin-RevId: 144836042 MOS_MIGRATED_REVID=144836042
* Rename symbolsTxt to symbols reflecting it's actual usage.Gravatar Googler2017-01-18
| | | | | | -- PiperOrigin-RevId: 144741831 MOS_MIGRATED_REVID=144741831
* Create LibraryRClassGeneratorAction for generating R classes outside of theGravatar Googler2017-01-17
| | | | | | | | AndroidResourceMergingAction. -- PiperOrigin-RevId: 144726723 MOS_MIGRATED_REVID=144726723
* Move the serialize and write functionality from UnwrittenMergedAndroidData ↵Gravatar Googler2017-01-13
| | | | | | | | to ParsedAndroidData. This improves reuse. -- PiperOrigin-RevId: 144369566 MOS_MIGRATED_REVID=144369566
* Cleanup unthrown exceptions.Gravatar Googler2017-01-13
| | | | | | -- PiperOrigin-RevId: 144360540 MOS_MIGRATED_REVID=144360540
* Add static factory methods to the AndroidResourceClassWriter for easier setup.Gravatar Googler2017-01-13
| | | | | | -- PiperOrigin-RevId: 144342246 MOS_MIGRATED_REVID=144342246
* Expose the ability to define a binary output to the merge call.Gravatar Googler2017-01-12
| | | | | | | | | | | New method to deserialize parsed resources. Remove unthrown exceptions. RELNOTES:None -- PiperOrigin-RevId: 144221111 MOS_MIGRATED_REVID=144221111
* Make sure the classloader is closed after use.Gravatar Googler2017-01-12
| | | | | | | | RELNOTES:None -- PiperOrigin-RevId: 144218174 MOS_MIGRATED_REVID=144218174
* Delete some dead android rules and tools code.Gravatar Adam Michael2017-01-09
| | | | | | -- PiperOrigin-RevId: 143823562 MOS_MIGRATED_REVID=143823562
* Delete Bazel local version ResourceShrinker.java.Gravatar Andrew Pellegrini2016-12-21
| | | | | | -- PiperOrigin-RevId: 142573704 MOS_MIGRATED_REVID=142573704
* Allow ResourceShrinkerAction to support splits.Gravatar Michael Staib2016-12-20
| | | | | | | | | | This is needed to support both shrinking and splitting at the same time, which will become the default for any android_binary which has splits defined on it once shrinking becomes default (if it hasn't already). -- PiperOrigin-RevId: 142497302 MOS_MIGRATED_REVID=142497302
* Switch Bazel to use ResourceUsageAnalyzer.java instead of ResourceShrinker.java.Gravatar Andrew Pellegrini2016-12-19
| | | | | | -- PiperOrigin-RevId: 142484589 MOS_MIGRATED_REVID=142484589
* Rollback of commit 27cd7f6bb4a02f56f9ad73e57e71e69a1c00d5ea.Gravatar Adam Michael2016-12-15
| | | | | | | | | | | | *** Reason for rollback *** Rolling forward, intentionally breaking loading phase (and therefore `bazel fetch`) for android_binary in Bazel if no android_sdk_repository is set up. Will not submit until Tensorflow's use case is cleaned up in https://github.com/tensorflow/tensorflow/pull/6225. -- PiperOrigin-RevId: 142068703 MOS_MIGRATED_REVID=142068703
* Fix NPE in RClassGenerator when dev has code in unnamed packageGravatar Googler2016-12-05
| | | | | | | | | | | | | | | | | | | | Just put the R class in the unnamed package. If we disable the RClassGenerator and use the old code path, we would have constructed a cmdline flag set to "null" for aapt, and aapt would write "package null;" which also wouldn't work... This may allow you to build an android_library but it may be hard to build an android_binary because ultimately AAPT will reject an empty "package" attribute in the AndroidManifest.xml when you try to build the APK, so you'd need to stamp that differently. -- PiperOrigin-RevId: 140945125 MOS_MIGRATED_REVID=140945125
* unknown commit of 5: Fixing the merge warning messages in transitive library ↵Gravatar Googler2016-12-01
| | | | | | | | | overwrites. Record the sources are overwritten during merging. -- MOS_MIGRATED_REVID=140654137
* Add logging for creation of stub IDs for public.xml entries.Gravatar Andrew Pellegrini2016-11-24
| | | | | -- MOS_MIGRATED_REVID=140064545
* Mark resources with no declarations as deleted if they are also unused, ↵Gravatar Andrew Pellegrini2016-11-24
| | | | | | | allowing them to be removed from the public.xml file as well. This handles inline resources which have no explicit declaration and are deleted as part of their parent resource. -- MOS_MIGRATED_REVID=140056329
* Remove limitation of only analyzing files with known extensions as resources.Gravatar Andrew Pellegrini2016-11-23
| | | | | -- MOS_MIGRATED_REVID=140044141
* Fix resource shrinker failing to fully remove unused style, plurals, and ↵Gravatar Andrew Pellegrini2016-11-17
| | | | | | | array resource types. -- MOS_MIGRATED_REVID=139357164
* Fix target info in conflict error message, to avoid toString on objectsGravatar Googler2016-11-04
| | | | | | | that don't implement it. -- MOS_MIGRATED_REVID=138126904
* Wrap the source Path in a DataSource object.Gravatar Googler2016-10-25
| | | | | | | | The DataSource object will then be used to track which values have been overwritten and avoid incorrect merge warnings. -- MOS_MIGRATED_REVID=137159260
* Support input srcjar in filtered gen jar.Gravatar Googler2016-10-14
| | | | | | | | | | | This supports genrules that output srcjars that are then inputs to java_libraries. Also add support to produce a source jar with the contents of the gen jar. -- MOS_MIGRATED_REVID=136099457
* Rollback of commit f21d35ead25167ca7191229c7a365ccdf1a2550e.Gravatar Googler2016-10-07
| | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** With this approach, the R.class winds up in the filtered jar because its origin isn't among the "normal" Java sources. I'll have to be a little smarter, but start with rolling this back. *** Original change description *** Support srcjar files in filtered gen jar. If a java_library has any srcjar files in its sources attribute, the output of these would be discarded. To make it more robust, invert the jar filter to keep everything *except* source artifact java files. Previously, we would build a manifest containing all the generated java files and use that to filter. This should also be ever so slightly faster since we can skip an action. -- MOS_MIGRATED_REVID=135406849
* Update android_ide_common to 25.0.0 and clean up FolderConfigsGravatar Googler2016-10-07
| | | | | | | | | | | Older android_ide_common does not handle BCP 47, so we update the code to handle that and remove most of the workarounds. This also pulls in a fix for 3-letter locales, unblocks resource shrinking whitelisting, etc. -- MOS_MIGRATED_REVID=135396457
* Support srcjar files in filtered gen jar.Gravatar Googler2016-10-07
| | | | | | | | | | | | | | | | If a java_library has any srcjar files in its sources attribute, the output of these would be discarded. To make it more robust, invert the jar filter to keep everything *except* source artifact java files. Previously, we would build a manifest containing all the generated java files and use that to filter. This should also be ever so slightly faster since we can skip an action. -- MOS_MIGRATED_REVID=135351129
* Description redacted.Gravatar Damien Martin-Guillerez2016-10-06
| | | | | -- MOS_MIGRATED_REVID=135331287
* Description redacted.Gravatar Googler2016-10-06
| | | | | -- MOS_MIGRATED_REVID=135310637
* Rollback of commit af8ebca2b88a0ee1129b72b4ce825f6489c31e67.Gravatar Damien Martin-Guillerez2016-10-05
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break `bazel fetch ...` Discovered by bisecting `bazel fetch tensorflow/...`, see attached bug for more information Fixes https://github.com/bazelbuild/bazel/issues/1880 *** Original change description *** Open source dex merging tools for incremental dexing. Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=135220785
* Global cleanup change.Gravatar Googler2016-10-05
| | | | | -- MOS_MIGRATED_REVID=135162284
* Global cleanup change.Gravatar Liam Miller-Cushon2016-10-05
| | | | | -- MOS_MIGRATED_REVID=135108901
* Add visibility to ↵Gravatar Yun Peng2016-09-30
| | | | | | | | | //src/tools/android/java/com/google/devtools/build/android/dexer:srcs Fix https://github.com/bazelbuild/bazel/issues/1864 -- MOS_MIGRATED_REVID=134762013
* Open source dex merging tools for incremental dexing.Gravatar Adam Michael2016-09-30
| | | | | | | | Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=134690103
* Update the density filter to account for all passed densities.Gravatar Googler2016-09-27
| | | | | -- MOS_MIGRATED_REVID=134321948
* Add options to ResourceShrinkerAction to generate an updated R.txt.Gravatar Andrew Pellegrini2016-09-27
| | | | | -- MOS_MIGRATED_REVID=134312343
* Add manifest merger output log.Gravatar Andrew Pellegrini2016-09-26
| | | | | | | RELNOTES: When using android_binary.manifest_merger="android" the merger produces a summary log next to the merged manifest artifact. -- MOS_MIGRATED_REVID=134082985
* Remove absolute paths from protoGravatar Googler2016-09-21
| | | | | | | RELNOTES: Remove deprecated absolute paths in blaze IDE artifacts -- MOS_MIGRATED_REVID=133758389
* Handle multiply-defined attrs in AndroidResourceClassWriterGravatar Googler2016-09-09
| | | | | | | | | | | | | | Currently, we do multiple put calls into the ImmutableMap.builder(), which asserts. See bug for examples from projects. Tweak the aapt comparison test method to actually merge before writing out the R.class (to match the aapt side, which also merges first). -- MOS_MIGRATED_REVID=132607034
* Remove dependency data from AarGeneratorActionGravatar Googler2016-09-08
| | | | | | | | | | | It's not supposed to cover direct deps and trans deps according to the documentation anyway. Also prepare to move the --strictMerge flag. The option isn't checked anymore. There's only one type of merging. -- MOS_MIGRATED_REVID=132444314
* Adds a jar filter to the IntelliJ IDE aspect.Gravatar Googler2016-09-06
| | | | | | | | | | | | | | | | Any java rule that mixes generated and non-generated sources will produce a filtered jar containing only the generated output. For a java rule with only "normal" sources or only generated source files, no filtered jar is produced. This will allow the IDE to resolve those generated sources. RELNOTES:None -- MOS_MIGRATED_REVID=132113568
* Restore anydpi support, working around the lack of FolderConfig support.Gravatar Googler2016-09-01
| | | | | -- MOS_MIGRATED_REVID=131853638
* Add parsing of Proguard mapping file for resource class fields. Fixes issue ↵Gravatar Andrew Pellegrini2016-09-01
| | | | | | | with obfuscated fields being stripped because they fail to match any known resource. -- MOS_MIGRATED_REVID=131830443
* Add a resource validator action for android_libraryGravatar Googler2016-08-30
| | | | | | | | | | | | | | | | | | Part 3 of the 3 new proposed android_library res processing actions. Pulls a zip file from the merging action, unpacks it, and then validates the results with aapt. Get an R.txt and srcjar w/ javadocs from aapt. In order to the get the R.txt, I think you need to ask for the R.java sources anyway. Split the processResources() into a runAapt() function that can be reused. Hookup in bazel coming separately. -- MOS_MIGRATED_REVID=131618410
* Add a lightweight resource merge action.Gravatar Googler2016-08-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Part 2 of the 3 new proposed android_library res processing actions. The primary and deps are all assumed to be parsed+summarized in a protobuf. Represent that with a new class (similar to DependencyAndroidData but w/out R.txt). Avoid having "manifest" artifacts as deps input, and instead use "label", since that is only used in a warning. DepAD still uses the manifest for #asSymbolFileProvider, so we keep it there. Move loading the primary out of the merge function so that we can share the merge function with this style of primary data, and the existing style of of primary data (UnvalidatedAndroidData). This produces an R class.jar and a zip file to pass along to a future validation action. Images are stubbed out since they are irrelevant to the validation action. -- MOS_MIGRATED_REVID=131604421
* Adds data binding support to the Android resource processor.Gravatar Greg Estren2016-08-23
| | | | | | | | | | | | | | | | This is invoked via the new --dataBindingInfoOut flag. If specified and the rule has resources, data binding declarations in layout .xmls are stripped and fed into an aggregated .zip file under that name. The original (stripped) .xml is then fed into aapt for normal processing. If specified and the rule has no resources, an empty file is created. If not specified, everything works as before. -- MOS_MIGRATED_REVID=130973265
* Flip on @+id parsing by defaultGravatar Googler2016-08-22
| | | | | | | | | | | | | | | | | Avoid writing the non-values IdXmlResourceValues to the merged values.xml file. It's redundant since the merged resources will include the src layout / menu, etc. file. E.g., adds 25KB out of 250KB to some merged values.xml. It can also change the way R.fields are initialized (ids from values.xml are numbered before other sources), that would have changed the numbering in AndroidIntegratinoTest#testAndroidBinaryResourceShrinking and in AndroidResourceClassWriterAaptTest. -- MOS_MIGRATED_REVID=130789333
* Share source paths for more compact res proto serializationGravatar Googler2016-08-17
| | | | | | | | | | | | | | | | | | | | | | | Source abs paths can be pretty long. If a value file like colors.xml has N resources then we serialize the path N times. Instead, make a table and just serialize the index. Can reduce resource proto sizes from X to 0.65*X. in some experiments. CPU instructions executed is slightly lower, but critical path impact is pretty minimal since parsing happens in parallel anyway. This doesn't help with drawables (path only shows up once) but doesn't really hurt (an extra index number). I tried sharing the root (a table of the res dirs). That can be another 10%, and helps with the drawable case. However, a naive enumeration of roots (src.getParent().getParent()) added *much* more overhead to the writing stage, so I didn't go on with that. -- MOS_MIGRATED_REVID=130440810
* Handle public tags in merger -> R.class writerGravatar Googler2016-08-17
| | | | | | | | | | | | | | | Developers do use public tags, and before this change it would assert in the AndroidResourceClassWriter as an unhandled ResourceType. We probably didn't want to write out a R.public.field anyway. Also, handle public tags with the same name, but different type. They get mapped to the same FQN, so use the combining mechanism to keep track of the different types and ids. -- MOS_MIGRATED_REVID=130395089