aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android
Commit message (Collapse)AuthorAge
* Allow honoring select dexopts in incremental dexingGravatar Googler2016-05-25
| | | | | -- MOS_MIGRATED_REVID=123149803
* Allow use of Exceptions to exit early out of configured-target creation, ↵Gravatar Chris Parsons2016-05-24
| | | | | | | | | | instead of passing and checking null in all helpers. Demonstrates this pattern usage in a few select rules (e.g. AndroidBinary) where this was particularly egregious. There are many places which can benefit from this pattern -- this change doesn't try to fix them all at once. -- MOS_MIGRATED_REVID=123012378
* Update Bazel native rule documentation to use new ${link} syntax.Gravatar David Chen2016-05-20
| | | | | -- MOS_MIGRATED_REVID=122772973
* Rollback of commit 9f046cba37de6088b2f81717bc263889a5146d86.Gravatar Googler2016-05-19
| | | | | | | | | | | | | *** Reason for rollback *** Rollback of commit e37c55eccbd4516b2db7aaf58ef95209dfad3ed4 is complete so rolling this semantically unrelated change forward again *** Original change description *** Automated [] rollback of commit b8946eabd60a199a66a1892701d52d9801c7fb1a. -- MOS_MIGRATED_REVID=122736257
* Rollback of commit e37c55eccbd4516b2db7aaf58ef95209dfad3ed4.Gravatar Ulf Adams2016-05-19
| | | | | -- MOS_MIGRATED_REVID=122626656
* Rollback of commit b8946eabd60a199a66a1892701d52d9801c7fb1a.Gravatar Ulf Adams2016-05-18
| | | | | -- MOS_MIGRATED_REVID=122620007
* Add attribute to android binaries to explicitly control incremental dexing.Gravatar Googler2016-05-17
| | | | | -- MOS_MIGRATED_REVID=122473346
* Honor a whitelist of dx flags in incremental dexingGravatar Googler2016-05-16
| | | | | -- MOS_MIGRATED_REVID=122342484
* Adds configuration fragment requirements for AndroidNeverlinkAspect.Gravatar Michael Staib2016-05-16
| | | | | | | | | | | | | In the near future, aspect RuleContexts will enforce that they only access the configuration fragments they have declared as required, in order to prepare for the eventual migration to dynamic configurations (where only configuration fragments which are actually necessary for a particular build are loaded for that build). This change adds those declarations to AndroidNeverlinkAspect. -- MOS_MIGRATED_REVID=122296909
* Finally remove the android_jack attribute from android_sdk.Gravatar Michael Staib2016-05-13
| | | | | | | | | Deletes the now-useless android_jack attribute; its functionality has already been turned off, so there is not much to remove besides the attribute definition. -- MOS_MIGRATED_REVID=122171309
* Fix NullPointerException when using android resource shrinking with an ↵Gravatar Andrew Pellegrini2016-05-12
| | | | | | | incomplete primary resource container. -- MOS_MIGRATED_REVID=122160699
* Avoid generating an ap_ file for android_libraryGravatar Googler2016-05-10
| | | | | | | | Saves roughly 200ms per aapt invocation, when aapt is only used for validation of resources. -- MOS_MIGRATED_REVID=121863470
* Persist manifest changes made in AndroidResourceProcessingAction back to ↵Gravatar Andrew Pellegrini2016-05-10
| | | | | | | android_manifest rules to allow use in further processing steps. -- MOS_MIGRATED_REVID=121852819
* Fixes .aar being created with manifest placeholders ${applicationId} and ↵Gravatar Andrew Pellegrini2016-05-09
| | | | | | | ${packageName} replaced for android_library targets. -- MOS_MIGRATED_REVID=121691343
* With incremental dexing copy java resources from deploy jar into APKs ↵Gravatar Googler2016-05-06
| | | | | | | (instead of jar generated by shuffle_jar tool). This helps with bazel mobile-install performance -- MOS_MIGRATED_REVID=121611634
* [Android] Support aapt-generated main dex specs.Gravatar Googler2016-05-05
| | | | | | | | Add bazel support for using the "aapt -D" command to generate a proguard specification for components which need to be in the main dex. -- MOS_MIGRATED_REVID=121531584
* Fix manifest_values.applicationId not being picked up by ↵Gravatar Andrew Pellegrini2016-05-04
| | | | | | | ApplicationManifest#getOverridePackage for building split and stub manifests. -- MOS_MIGRATED_REVID=121426669
* Skip building JackAspect when the base rule already provides Jack libraries.Gravatar Michael Staib2016-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | Context: AndroidLibrary provides JavaSourceInfoProvider, which JackAspect wants. But it doesn't advertise it, so it will never have JackAspect applied. This is good, because they both have an :android_sdk attribute and want to provide JackLibraryProvider. Rules in the external repository created with bind() don't have their real advertisements, but instead are considered to advertise everything. So, when an android_library depends on another android_library through a bind() alias... Boom. This avoids the boom by making JackAspect bail out immediately if its current target looks like an Android rule. It wouldn't be doing anything useful anyway if the base rule already provides Jack libraries. Fixes #1222. -- MOS_MIGRATED_REVID=121401981
* Rollback of commit 140634eccee693b567ba7591df550f7b72db1612.Gravatar Lukacs Berki2016-05-03
| | | | | | | | | | | | | *** Reason for rollback *** Breaks backwards compatibility. *** Original change description *** Collect logic related to extra Proguard outputs in one place. -- MOS_MIGRATED_REVID=121363782
* Move android deploy info from the default files to build to its own output groupGravatar Alex Humesky2016-05-02
| | | | | | | | named "android_deploy_info" so that the .deployinfo.pb file doesn't show up in bazel output. -- MOS_MIGRATED_REVID=121140355
* Adds the text output parameter and a partial manifest to the action key for ↵Gravatar Alex Humesky2016-04-29
| | | | | | | ApkManifestAction, so that the key correctly changes when the structure of the manifest changes. -- MOS_MIGRATED_REVID=121058425
* Inject the tools repository constant in the JackAspect and delete the ↵Gravatar Luis Fernando Pino Duque2016-04-27
| | | | | | | reference to Constants.TOOLS_REPOSITORY -- MOS_MIGRATED_REVID=120909538
* Collect logic related to extra Proguard outputs in one place.Gravatar Googler2016-04-27
| | | | | -- MOS_MIGRATED_REVID=120865329
* Delete the interface NativeAspectFactory and make native aspects extend from ↵Gravatar Luis Fernando Pino Duque2016-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NativeAspectClass. This a large refactoring of the aspects, currently we have the following: - AspectClasses: The interface AspectClass is a implemented by either SkylarkAspectClass or NativeAspectClass<NativeAspectFactory>. They are wrappers for the AspectFactories and they hold the information about the Class<> of the factory. - AspectFactories (FooAspect.java): Represented by the interfaces ConfiguredAspectFactory and NativeAspectFactory, also by the interface ConfiguredNativeAspectFactory which is the union of the two aforementioned interfaces. All aspects implement ConfiguredNativeAspectFactory except Skylark aspects which implement only ConfiguredAspectFactory. After this CL the distinction between NativeAspectFactories and NativeAspectClasses dissappear, namely aspect that extends NativeAspectClass is considered native and if it implements ConfiguredAspectFactory it is configured. Therefore the interfaces NativeAspectFactory and ConfiguredNativeAspectFactory both disappear. With this refactoring the aspectFactoryMap in the ConfiguredRuleClassProvider changes its type from (String -> Class<? extends NativeAspectClass>) to (String -> NativeAspectClass) which means it is now able to have an instance of the aspect instead of its Class only. By doing this, it is now possible to pass parameters when creating an aspect in the ConfiguredRuleClassProvider. -- MOS_MIGRATED_REVID=120819647
* Set --android_sdk=@bazel_tools//tools/android:sdk by default and delete ↵Gravatar Luis Fernando Pino Duque2016-04-27
| | | | | | | | | Constants.ANDROID_DEFAULT_SDK. This CL also updates the test infrastructure to include a mock of @bazel_tools//tools/android:sdk. -- MOS_MIGRATED_REVID=120815577
* Add a --legacy_external_runfiles optionGravatar Kristina Chodorow2016-04-25
| | | | | | | | This isn't hooked up to anything yet, but is another piece of getting #848 rolled forward. -- MOS_MIGRATED_REVID=120582973
* Register instances instead of classes as Skylark-visible globals.Gravatar Dmitry Lomov2016-04-22
| | | | | -- MOS_MIGRATED_REVID=120538736
* Automated [] rollback of commit 857cda2c45a5cc68c3fa398311c48c571a64915d and ↵Gravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 790d2f6009d47fe92cf0cd92a1473bbf0141f32e. *** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
* Remove all internal calls to FileProvider.getLabel.Gravatar Ulf Adams2016-04-22
| | | | | | | | The method will be removed in a subsequent change to facilitate reverting the change in case it goes bad. -- MOS_MIGRATED_REVID=120526894
* Add android deploy info.Gravatar Googler2016-04-22
| | | | | | | | | | | | Each android binary build operation will output a deploy info proto providing information about how to deploy and launch the APK. The information will vary between build mode (normal, mobile-install, split-apk) and is configuration-dependent. NO_SQ: Presubmit broken -- MOS_MIGRATED_REVID=120494036
* Add JavaSemantics.checkRule to Android rules.Gravatar Greg Estren2016-04-22
| | | | | -- MOS_MIGRATED_REVID=120480051
* Remove FilesToRunProvider.label.Gravatar Ulf Adams2016-04-22
| | | | | | | The TransitiveInfoProvider already contains a label, use that instead. -- MOS_MIGRATED_REVID=120443298
* 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
* Move the runfiles for external repositories to under the x.runfiles/ directoryGravatar Kristina Chodorow2016-04-20
| | | | | | | | | | | | | | | This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. --- Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=120224534
* Review a number of action subclasses and update them according to the spec.Gravatar Ulf Adams2016-04-19
| | | | | | | | Consists of adding @Immutable annotations, adding final modifiers, and changing the types of fields to immutable types. -- MOS_MIGRATED_REVID=120221067
* Rename LateBoundLabel#getDefault(Rule, AttributeMap, T) to #resolve().Gravatar Lukacs Berki2016-04-19
| | | | | | | Its old name was confusing because resolve() and getDefault() do radically different things: getDefault() returns a good enough lie for when BuildConfiguration is not available, and resolve() resolves the dependency when we do have a BuildConfiguration. -- MOS_MIGRATED_REVID=120212630
* Deprecate top-level Java toolchain flags in favour of java_toolchainGravatar Liam Miller-Cushon2016-04-19
| | | | | | | | | | | | | This change disables --java_langtools, --javabuilder_top, --singlejar_top, --genclass_top, and --ijar_top, and finishes replacing them with java_toolchain.{javac,javabuilder,singlejar,genclass,ijar}. RELNOTES: Replace --java_langtools, --javabuilder_top, --singlejar_top, --genclass_top, and --ijar_top with java_toolchain.{javac,javabuilder,singlejar,genclass,ijar} -- MOS_MIGRATED_REVID=120154954
* Check for the presence of an AndroidSdkProvider in JackAspect.Gravatar Michael Staib2016-04-19
| | | | | | | | | If no AndroidSdkProvider is present, JackAspect exits with an error instead of throwing and thus crashing Bazel. This is acceptable; the Android rules which JackAspect is attached to will do the same. -- MOS_MIGRATED_REVID=120150996
* Use DexBuilder tool such that it can be a persistent workerGravatar Googler2016-04-18
| | | | | -- MOS_MIGRATED_REVID=119999213
* 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
* Say which target is being processed in the progress message for Android resourceGravatar Alex Humesky2016-04-15
| | | | | | | processing. -- MOS_MIGRATED_REVID=119873729
* Provide ResourceShrinker with the generated R.java packages in addition to ↵Gravatar Andrew Pellegrini2016-04-08
| | | | | | | packages from manifests. This prevents resources from being removed when they have been generated into a package other than the one specified in their target's manifest. -- MOS_MIGRATED_REVID=119294591
* Fix incremental dexing with bazel testGravatar Googler2016-04-07
| | | | | -- MOS_MIGRATED_REVID=119104560
* transition to two blaze flags for incremental dexingGravatar Googler2016-04-05
| | | | | -- MOS_MIGRATED_REVID=118969066
* Adds the output of -printconfiguration from proguard to the implicit outputs ofGravatar Alex Humesky2016-04-05
| | | | | | | | | | | android_binary (and java_binary). RELNOTES[NEW]: The output of -printconfiguration of proguard is available through an implicit "[target_name]_proguard.confg" output of android_binary (and java_binary). -- MOS_MIGRATED_REVID=118958246
* Simplify some of the code around invoking proguard.Gravatar Alex Humesky2016-04-04
| | | | | -- MOS_MIGRATED_REVID=118819625
* Set --fat_apk_cpu=armeabi-v7a by default and remove ↵Gravatar Luis Fernando Pino Duque2016-03-31
| | | | | | | Constants.ANDROID_DEFAULT_FAT_APK_CPUS. -- MOS_MIGRATED_REVID=118675987
* Improve 'exports' explanation in android_library docGravatar Googler2016-03-31
| | | | | | | | Slight improvement, mirroring the updated java_library 'exports' explanation. Less deceptive. -- MOS_MIGRATED_REVID=118608946
* Provide the final merged AndroidManifest.xml file in the apk_manifest.Gravatar Alex Humesky2016-03-31
| | | | | -- MOS_MIGRATED_REVID=118598917
* Use the local shell environment for invoking build-runfiles.Gravatar Lukacs Berki2016-03-30
| | | | | | | This is necessary because build-runfiles depends on the msys shared library, which (as per DLL lookup rules on Windows) is checked under the entries of PATH. -- MOS_MIGRATED_REVID=118556684