aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android
Commit message (Collapse)AuthorAge
* Trying again with checking for the presence of the "resources" attribute.Gravatar Googler2015-10-19
| | | | | | | | | | | | | | | Change the resource dependency handling to separate between the transitive and direct resources from libraries. This slightly increases the complexity of resource propagation. The initial algorithm was to simply merge all transitive ResourceContainers together with any new ResourceContainer and propagate them via the AndroidResourcesProvider. The new algorithm is encapsulated inside a new ResourceDependencies class which works as follows: 1. Collect resources from the deps into transitive and direct NestedSets 2. If a rule provides a ResourceContainer, merge the transitive and direct into a new transitive set 3. Export the provider This results having a rule without resources "forward" the merged sets of transitive and direct resources to the next rule. -- MOS_MIGRATED_REVID=105631635
* []Rollback of commit 65425810207c9fd6892abfaa95da65e25db5e515.Gravatar Googler2015-10-16
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks []. *** Original change description *** Change the resource dependency handling to separate between the transitive and direct resources from libraries. This slightly increases the complexity of resource propagation. The initial algorithm was to simply merge all transitive ResourceContainers together with any new ResourceContainer and propagate them via the AndroidResourcesProvider. The new algorithm is encapsulated inside a new ResourceDependencies class which works as follows: 1. Collect resources from the deps into transitive and... *** -- MOS_MIGRATED_REVID=105598448
* Change the resource dependency handling to separate between the transitive ↵Gravatar Googler2015-10-16
| | | | | | | | | | | | | | | and direct resources from libraries. This slightly increases the complexity of resource propagation. The initial algorithm was to simply merge all transitive ResourceContainers together with any new ResourceContainer and propagate them via the AndroidResourcesProvider. The new algorithm is encapsulated inside a new ResourceDependencies class which works as follows: 1. Collect resources from the deps into transitive and direct NestedSets 2. If a rule provides a ResourceContainer, merge the transitive and direct into a new transitive set 3. Export the provider This results having a rule without resources "forward" the merged sets of transitive and direct resources to the next rule. -- MOS_MIGRATED_REVID=105515074
* Added android_compiler flag.Gravatar Austin Schuh2015-10-12
| | | | | | | | | | | | Added a flag which allows the user to specify the android compiler. This commit also disconnects the android compiler from the main --compiler flag. Changing the --compiler flag won't change the compiler used by the android rules. -- Change-Id: I788d3a353a1cc304e1c015b9dd283258e6e172d4 Reviewed-on: https://bazel-review.googlesource.com/2112 MOS_MIGRATED_REVID=105203751
* Make Bazel use tools that are embedded in its binary.Gravatar Lukacs Berki2015-10-12
| | | | | | | This requires changing all "//tools/language:target" implicit dependencies to "@tools//tools/language:target". -- MOS_MIGRATED_REVID=105193805
* Add isSource to Android aspect ArtifactLocation.Gravatar Googler2015-10-12
| | | | | | | | This supersedes bin/gen files on Android SDK. The fields are removed entirely since the proto isn't public yet. -- MOS_MIGRATED_REVID=105130701
* Add a custom converter to --crosstool_top so that select() works.Gravatar Lukacs Berki2015-10-08
| | | | | -- MOS_MIGRATED_REVID=104845397
* Implement the prefix stripping for Java resources.Gravatar Lukacs Berki2015-10-06
| | | | | | | | | This CL sure works, but it leaves a few call sites for JavaSemantics#getJavaResourcePath() which make me uncomfortable. RELNOTES: Java rules now support a resource_strip_prefix attribute that allows the removal of path prefixes from Java resources. -- MOS_MIGRATED_REVID=104748537
* Allow Java libraries to export and propagate proguard_specs.Gravatar Michael Staib2015-10-06
| | | | | | | | | | | | | | | It may be the case that a library used by Java clients is also used by Android clients, but when used for the latter, it requires a particular Proguard configuration. This change modifies Java library rules to accept Proguard specs and pass them up to Android rules. Note that this does not cause Proguard to be used on normal Java binaries. RELNOTES[NEW]: java_library now supports the proguard_specs attribute for passing Proguard configuration up to Android (not Java) binaries. -- MOS_MIGRATED_REVID=104661799
* Remove --treat_srcjars_as_srcs_for_strict_depsGravatar Liam Miller-Cushon2015-10-06
| | | | | -- MOS_MIGRATED_REVID=104661596
* Add a Constants.TOOLS_PREFIX constant that will serve to redirect the Bazel ↵Gravatar Lukacs Berki2015-10-05
| | | | | | | | | | | tools repository. This is a no-op refactoring CL. The actual switch will be made once everything passes with the new setup. As a side cleanup, change the awkward realAndroidSdk() / realAndroidCrosstoolTop() mechanism to a converter. -- MOS_MIGRATED_REVID=104649067
* Filter idl sources from AndroidStudioInfoAspect.Gravatar Googler2015-09-30
| | | | | | | These java sources are already included in the idl jars. -- MOS_MIGRATED_REVID=104309944
* Add Android aspect ijar support.Gravatar Googler2015-09-30
| | | | | -- MOS_MIGRATED_REVID=104296834
* Replace 'Google Inc' by the 'Bazel Authors'Gravatar Damien Martin-Guillerez2015-09-30
| | | | | | | | | | This is the new conventions for Copyrights line and some were missed in the previous change. Generated by: find -type f -exec sed -i -E 's/Copyright 201([54]) Google Inc/Copyright 201\1 The Bazel Authors/' '{}' ';' -- MOS_MIGRATED_REVID=104189975
* Add Android IDL jar outputs.Gravatar Googler2015-09-28
| | | | | | | | | | These outputs are a jar and source jar for the results of aidl processing. This is used to add aidl output to IDEs separate from the source code, similar to annotation output (gen jars). -- MOS_MIGRATED_REVID=104024453
* 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
* Tweak the installation order of split APKs so that there is less logcat spam ↵Gravatar Lukacs Berki2015-09-25
| | | | | | | during "mobile install --split_apks". -- MOS_MIGRATED_REVID=103927507
* Rollback of commit 402d112bc25449f1e690bbbace600bbcda834d24.Gravatar Googler2015-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fix *** Original change description *** Automated [] rollback of []. *** Reason for rollback *** Breaks tests. *** Original change description *** Remove gen jar implicit output. This allows us to only create a jar for libraries that use annotation processing. It also increases our flexibility by reducing the visibility of these gen jars to an undocumented output group. -- MOS_MIGRATED_REVID=103833283
* Add a main_dex_proguard_specs attribute to android_binary that lets users ↵Gravatar Lukacs Berki2015-09-24
| | | | | | | | | | | specify which classes should go into the main dex. This mode uses Proguard to determine the dependencies of these classes, which means that no error-prone manual listing required like in multidex="manual" mode. RELNOTES: android_binary now has a main_dex_proguard_specs attribute to specify which classes should be in the main dex. -- MOS_MIGRATED_REVID=103824119
* Rollback of commit 53330510c6ea5cd6257b9981b44e52d15a9e01aa.Gravatar Googler2015-09-24
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks tests. *** Original change description *** Remove gen jar implicit output. This allows us to only create a jar for libraries that use annotation processing. It also increases our flexibility by reducing the visibility of these gen jars to an undocumented output group. -- MOS_MIGRATED_REVID=103800137
* Remove gen jar implicit output.Gravatar Googler2015-09-24
| | | | | | | | | This allows us to only create a jar for libraries that use annotation processing. It also increases our flexibility by reducing the visibility of these gen jars to an undocumented output group. -- MOS_MIGRATED_REVID=103789186
* Remove gen jar info from JavaRuleOutputJarsProvider.Gravatar Googler2015-09-24
| | | | | -- MOS_MIGRATED_REVID=103754313
* Disable --treat_srcjars_as_srcs_for_strict_deps flagGravatar Liam Miller-Cushon2015-09-24
| | | | | | | | The default behaviour is now to count srcjars as sources. The flag will be removed after the next release. -- MOS_MIGRATED_REVID=103747858
* Fix ApplicationManifest#generatedManifest bug that would set the package as ↵Gravatar Andrew Pellegrini2015-09-24
| | | | | | | 'null' if the rule was not under either the java or javatests trees. Uses AndroidCommon#getJavaPackage to ensure consistent behavior. -- MOS_MIGRATED_REVID=103746264
* Make gen jars output group transitive.Gravatar Googler2015-09-24
| | | | | | | Also add gen jar provider, which we'll need for ide support. -- MOS_MIGRATED_REVID=103744649
* Stop AndroidResourceProcessingAction from creating a "_resources" folder in ↵Gravatar Andrew Pellegrini2015-09-22
| | | | | | | the source tree when invoked from ApplicationManifest and AndroidLibrary. -- MOS_MIGRATED_REVID=103648946
* Implement support for android_library and android_binary in ↵Gravatar Dmitry Lomov2015-09-22
| | | | | | | AndroidStudioInfoAspect. -- MOS_MIGRATED_REVID=103635637
* Unify AndroidLibrary code paths.Gravatar Googler2015-09-21
| | | | | | | | | | There were 2-3 code paths taken depending on whether resources are defined or not. These contained a lot of duplication. This CL factors out the similarities. -- MOS_MIGRATED_REVID=103538550
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Prevented catching/wrapping of InterruptedExceptions, especially in ↵Gravatar Florian Weikert2015-09-14
| | | | | | | BaseFunction. -- MOS_MIGRATED_REVID=102988766
* Make Android rules work againGravatar Lukacs Berki2015-09-08
| | | | | | | They were broken by commit 05e2c5b4e0da2f88e12d95adbc63cc3d46a6fca6. -- MOS_MIGRATED_REVID=102546907
* Remove references to the legacy android_resources rule from the Bazel BUILD ↵Gravatar Lukacs Berki2015-09-08
| | | | | | | | | encyclopedia. Fixes #426. -- MOS_MIGRATED_REVID=102496247
* Always inject the runfiles prefix into the Runfiles.Builder.Gravatar Ulf Adams2015-09-03
| | | | | | | The other constructor is now private. -- MOS_MIGRATED_REVID=102252544
* Code cleanupGravatar Laurent Le Brun2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102239051
* Aspects can get information from their base rule.Gravatar Marian Lobur2015-09-02
| | | | | -- MOS_MIGRATED_REVID=102126786
* Switches AndroidRobolectricTest to using .aars to provide transitive ↵Gravatar Andrew Pellegrini2015-09-01
| | | | | | | | | | | resources to the test runner instead of ResourceContainers. Update AndroidLibraryAarProvider to contain transitive closure of .aars. Provides an ~4x speed improvement in test startup time. NEW: Switched to ordered maps in CompositeLibraryAndroidManifestLocator to prevent manifest ordering flakiness bug. Switched to ImmutableSetMultimap in CompositeLibraryAndroidManifestLocator to prevent IllegalArgumentExceptions from duplicate package aliases and added test. RELNOTES: android_resources is no longer allowed as a dep for android_robolectric_test. -- MOS_MIGRATED_REVID=101972311
* Fix Jack's proguard specs.Gravatar Michael Staib2015-08-31
| | | | | | | | | Jack dexing currently only includes proguard specs from the binary itself, not from any dependencies. There's no reason for this, just an accidental inconsistency in the original implementation. -- MOS_MIGRATED_REVID=101776897
* Remove an unnecessary semicolon.Gravatar Ulf Adams2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101771182
* Always create a generating action for _proguard.jar, even if no specs are ↵Gravatar Michael Staib2015-08-28
| | | | | | | | | | | | | | specified. Because configurable attributes can be used to create an android_binary which has no proguard_specs, and because it's impossible to tell this case at the time the implicit outputs are defined, some generating action must be defined even if no proguard_specs actually make it to the rule. If the proguard_generate_mapping attribute is specified, the mapping is also generated. Both are generated by a FailAction and so are not actually produced. -- MOS_MIGRATED_REVID=101694294
* Fix check for srcs-less android_* rulesGravatar Liam Miller-Cushon2015-08-27
| | | | | | | | | | | | In android rules with no srcs, deps are treated like exports by strict java deps. This fixes the check for srcs-less targets to consider srcjars in addition to .java files. This bug was fixed for java_* rules by adding the runtime_deps attribute, and disallowing deps in srcs-less rules. -- MOS_MIGRATED_REVID=101581572
* Expose java_import and android_library information to skylarkGravatar Liam Miller-Cushon2015-08-27
| | | | | -- MOS_MIGRATED_REVID=101579648
* Copies shared object dependencies when building Android native binaries.Gravatar Michael Staib2015-08-25
| | | | | | | | | | | | Previously, shared objects in the transitive closure of an Android binary would be linked in, but not be sent to the apkbuilder. This sends all the shared objects used for linking to join the other native libraries in the APK, so they will be loadable when the main library created by the link step is loaded. Fixes #357. -- MOS_MIGRATED_REVID=101365491
* Prefer RuleContext.getFragment over BuildConfiguration.getFragment.Gravatar Ulf Adams2015-08-24
| | | | | | | This improves the coverage of the legality check in RuleContext.getFragment. -- MOS_MIGRATED_REVID=101208822
* A prototype implementation of top-level aspects.Gravatar Dmitry Lomov2015-08-20
| | | | | -- MOS_MIGRATED_REVID=101033236
* Set the workspace suffix for runfilesGravatar Kristina Chodorow2015-08-13
| | | | | | | This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones. -- MOS_MIGRATED_REVID=100479410
* Annotate every single rule with required configuration fragments.Gravatar Ulf Adams2015-08-10
| | | | | | | It's not locked down yet as Skylark rules can't declare required fragments. -- MOS_MIGRATED_REVID=100113647
* Description redacted.Gravatar Andrew Pellegrini2015-08-04
| | | | | -- MOS_MIGRATED_REVID=99828091
* Build a symlink tree for Android native library symlinks so that libraries ↵Gravatar Lukacs Berki2015-08-04
| | | | | | | | | from previous builds with a different CPU do not end up in the APK. Fixes #344. -- MOS_MIGRATED_REVID=99550457
* Add "warm" starting to mobile-install.Gravatar Googler2015-08-04
| | | | | | | | | | | | | | | | | | This introduces a new way to stop applications when deploying incremental changes that saves the current app state for the next run. This allows things like the back stack, and View/Fragment/Activity saved state to be restored when the app next launches, making it easier to quickly iterate on code changes. It adds a "--start" flag to mobile-install that replaces "--start_app". --start accepts an argument describing the mode: no, cold, or warm. "no" is now the equivalent of "--nostart_app", "cold" is the equivalent of "--start_app", and "warm" is the new start mode. Note that this is only useful with incremental installs, as Android clears out any previously saved state when an APK is replaced. -- MOS_MIGRATED_REVID=99508790