aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinaryOnlyRule.java
Commit message (Collapse)AuthorAge
* Rename bazel-user-manual.html into user-manual.htmlGravatar dmarting2017-09-04
| | | | PiperOrigin-RevId: 167477112
* Add manifest_merger and manifest_values attributes to android_test to allow ↵Gravatar apell2017-05-10
| | | | | | | manifest placeholders to be used for test APKs. RELNOTES: android_test may use manifest placeholders with 'manifest_merger = "android"'. PiperOrigin-RevId: 155534958
* Un-rollback and fix bugs in resource density filteringGravatar Googler2017-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rollback of commit df366408188f0451bae9b2ed079c795a4beb2e2b. In addition to undoing the rollback of my previous change, fix the bugs it introduced and add tests for those bugs. Always ignore empty filters. Empty filters are always useless or counterproductive. Before the original change, empty filters as a single item within the list of filters (e.g., ["en", ""]) were ignored, but empty filters as a portion of a string in the list (e.g., ["en,"]) were not. I can't imagine any reason people would actually want the empty filter (if it were handled correctly, it would effectively tell Bazel to just ignore every other filter the user passed in). Since it makes more sense with the new code, represent the stringified filters as a list of strings, rather than a single string of comma-seperated values. Manually trim whitespace from each token. Before the original change, the code trimmed whitespace following commas (e.g., ["en, es"] -> ["en,es"]) but not otherwise. If we're allowing whitespace in filter strings anyway, there doesn't seem to be any reason to allow it in some places but not others. -- PiperOrigin-RevId: 151128685 MOS_MIGRATED_REVID=151128685
* Rollback of commit 1e18045ed9d6ab9c945cec69286a7d8bd288a507.Gravatar Tobias Werth2017-03-23
| | | | | | -- PiperOrigin-RevId: 151000602 MOS_MIGRATED_REVID=151000602
* Filter android_binary resources by screen density in the analysis phaseGravatar Googler2017-03-22
| | | | | | | | | | | | | | In addition to filtering android_binary resources by resource_configuration_filters, we also filter by densities. Doing this in analysis rather than execution should also result in a speed-up as there's no need to copy files unwanted for actions to use. This behavior is controlled by the same object and flags that already control resource configuration filtering, simplifying the code. -- PiperOrigin-RevId: 150871620 MOS_MIGRATED_REVID=150871620
* Filter android_binary resources during analysisGravatar Googler2017-02-24
| | | | | | | | | | | | | | | | | | | | | | Before this change, resource_configuration_filters were only used to filter resources out of android_binary targets during resource processing. Instead, we can filter these unwanted resources out during analysis. This means we won't have to copy these resources for use in execution, and that execution itself will have a smaller set of inputs. This should produce a speed-up in android_binary targets with resource_configuration_filters. Also add a flag that controls this behavior. Currently, the flag defaults to not doing this prefiltering. We'll change that after further testing. Also, do some related cleanup: - Replace repeated used of the constant "resource_configuration_filters" with references to the new class - Pass around instances of the new class rather that List<String> objects meant to represent ResourceConfigurationFilters -- PiperOrigin-RevId: 148353501 MOS_MIGRATED_REVID=148353501
* Update documentation to note that the shrinker behavior differs from the ↵Gravatar Andrew Pellegrini2017-02-01
| | | | | | | | Gradle version in that it removes values resources instead of only minifying them. -- PiperOrigin-RevId: 146124871 MOS_MIGRATED_REVID=146124871
* Move Android resource shrinking from experimental to stable.Gravatar Andrew Pellegrini2017-01-26
| | | | | | | | RELNOTES: Android resource shrinking is now available for android_binary rules. To enable, set the attribute 'shrink_resources = 1'. See https://bazel.build/versions/master/docs/be/android.html#android_binary.shrink_resources. -- PiperOrigin-RevId: 145674372 MOS_MIGRATED_REVID=145674372
* Add a flag to android_binary to allow resource shrinking to be controlled on ↵Gravatar Googler2016-10-14
| | | | | | | | | a per-target basis. This flag only affects builds that have --experimental_android_resource_shrinking enabled. This will allow us to enable and disable the feature without needing to update [] or Rapid configs and on a module by module basis inside GmsCore. It will also let us enable/disable for GmsCore modules on a team by team basis. Tested by adding to an android_binary target and building with the resource shrinking flag enabled. -- MOS_MIGRATED_REVID=136189212
* Moves multidex attribute up the rule inheritance hierarchy.Gravatar Alex Humesky2016-09-22
| | | | | -- MOS_MIGRATED_REVID=133852628
* Adds the Android manifest merger as an option for android_binary rules. The ↵Gravatar Andrew Pellegrini2016-06-23
| | | | | | | | | merger that is used (legacy or android) is controlled by the manifest_merger attribute on android_binary and the default is controlled by the --android_manifest_merger flag. RELNOTES: The Android manifest merger is now available as an option for android_binary rules. The merger will honor tools annotations in AndroidManifest.xml and will perform placeholder substitutions using the values specified in android_binary.manifest_values. The merger may be selected by setting the manifest_merger attribute on android_binary. -- MOS_MIGRATED_REVID=125603954
* Remove application_id, version_code and version_name attributes from ↵Gravatar Andrew Pellegrini2016-06-23
| | | | | | | android_binary rule. They have been replaced by manifest_values. -- MOS_MIGRATED_REVID=125568465
* Updates android_binary.multidex docs.Gravatar Alex Humesky2016-06-16
| | | | | -- MOS_MIGRATED_REVID=124968182
* Update Bazel native rule documentation to use new ${link} syntax.Gravatar David Chen2016-05-20
| | | | | -- MOS_MIGRATED_REVID=122772973
* Adds manifest_values attribute to android_binary as a preliminary for ↵Gravatar Andrew Pellegrini2016-04-21
| | | | | | | removing application_id, version_code and version_name attributes and switching to the Gradle manifest merger. -- MOS_MIGRATED_REVID=120335565
* Add a crunch_png attribute to android_binaryGravatar Googler2016-04-18
| | | | | | | | | | | This allows a user to turn off png crunching during the final merge (with crunch_png = 0), but it does not skip nine-patch processing. RELNOTES: adds crunch_png attribute to android_binary -- MOS_MIGRATED_REVID=119986498
* Replace getToolsRepository() with getToolsLabel(String labelValue) which ↵Gravatar Luis Fernando Pino Duque2016-02-09
| | | | | | | | | prepends the tools repository path to the given string and parses the result as a label. This is a cleaner way to access the tools repository label. -- MOS_MIGRATED_REVID=114105929
* Replace occurrences of Constants.TOOLS_REPOSITORY in places where it can be ↵Gravatar Luis Fernando Pino Duque2016-02-03
| | | | | | | | | referenced via the rule class provider (using the RuleDefinitionEnvironment). This is the second phase of the removal of the TOOLS_REPOSITORY constants. -- MOS_MIGRATED_REVID=113734334
* Remove unused ${SYNOPSIS} variable from Bazel native rule inline documentation.Gravatar David Chen2016-01-28
| | | | | | | | | | This variable is no longer used because the docgen template directly calls RuleDocumentationAttribte.getSynopsis() instead of using the SYNOPSIS variable, and RuleDocumentationAttribute.getHtmlDocumentation() resolves the SYNOPSIS variable to the empty string. -- MOS_MIGRATED_REVID=113249993
* Fix remaining links in inline native rule docs.Gravatar David Chen2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112931111
* Update android screen densities to include 420 dpi added for the Nexus 5X. ↵Gravatar Andrew Pellegrini2015-10-27
| | | | | | | | | Adds documentation about the associated manifest processing to add a compatible-screens section. RELNOTES: 420 dpi is now a valid density for andoid_binary.densities. -- MOS_MIGRATED_REVID=106324044
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Remove references to the legacy android_resources rule from the Bazel BUILD ↵Gravatar Lukacs Berki2015-09-08
| | | | | | | | | encyclopedia. Fixes #426. -- MOS_MIGRATED_REVID=102496247
* Move the source code of the Android rules to the Bazel tree.Gravatar Lukacs Berki2015-05-19
This is mostly a "[] mv", except for the extra constant that specifies the location of the Android SDK and moving the $zip attribute. They are minor enough to be included in this CL. Tested by creating a Bazel tree, compiling it and verifying that the Android classes are in libblaze.jar. I also eyeballed the source as a final check that nothing sensitive gets leaked. -- MOS_MIGRATED_REVID=93971892