aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibraryBaseRule.java
Commit message (Collapse)AuthorAge
* Fold AndroidAaptBaseRule into AndroidBaseRule.Gravatar ajmichael2017-07-21
| | | | | | | This is a no-op, the same classes inherited from them. RELNOTES: None PiperOrigin-RevId: 162627873
* Add idl_preprocessed field to android_library.Gravatar Googler2017-06-27
| | | | | RELNOTES: Add idl_preprocessed attribute to android_library, so that preprocessed aidl files can be passed to android_library for compiling PiperOrigin-RevId: 160185474
* Make default value of exports_manifest depend on a flag.Gravatar ajmichael2017-05-08
| | | | | RELNOTES: None PiperOrigin-RevId: 155321388
* Remove jack support and make jack/jill attributes of android_sdk optional.Gravatar ajmichael2017-04-04
| | | | | | | | | Closes https://github.com/bazelbuild/bazel/issues/1391. RELNOTES: Removed --experimental_use_jack_for_dexing and libname.jack output of android_library. PiperOrigin-RevId: 152131075
* Add support for exported_plugins to android_libraryGravatar Googler2016-10-24
| | | | | | | | | AndroidLibrary already has the support for exported_plugins thanks to its use of JavaCommon.getTransitivePlugins() RELNOTES[NEW]: android_library now has a "exported_plugins" attribute just like java_library -- MOS_MIGRATED_REVID=137053056
* Moves exports_manifest attribute to AndroidLibraryBaseRule instead ofGravatar Googler2016-07-27
| | | | | | | | | | AndroidResourceSupportRule. This removes the exports_manifest attribute from AndroidBinaryBaseRule and its children. RELNOTES: Removes exports_manifest attribute from android_binary rule. -- MOS_MIGRATED_REVID=128472120
* Update Bazel native rule documentation to use new ${link} syntax.Gravatar David Chen2016-05-20
| | | | | -- MOS_MIGRATED_REVID=122772973
* 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
* 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
* Stop using preprocessed .aidl files for types in the same android_library.Gravatar Michael Staib2016-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes very little sense, because we only do this when compiling them within a rule. The preprocessed files are not shipped to other rules, meaning we treat things differently depending on the dependency structure. And, worst of all, this can lead to a bug in the aidl compiler, which causes the preprocessed definition to take precedence over the input file, which causes certain modifiers to be stripped away. Also, Gradle doesn't do it, and that's proof enough that this is no longer the way to go, if ever it was. Unfortunately, this causes a problem: the preprocessing had an effect, in that all preprocessed types are available without the use of imports. This means that .aidl files which were previously legal before this change may now be broken, if they relied on this behavior. But, those .aidl files are actually not legal according to the .aidl specification. Unfortunate, but the right thing to do. This CL also updates the idl documentation. Which, let's face it, could probably have used some improvement. RELNOTES[INC]: .aidl files correctly require import statements for types defined in the same package and the same android_library. -- MOS_MIGRATED_REVID=115718918
* 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
* Readds the JackAspect for Jack support for Java dependencies.Gravatar Michael Staib2016-01-27
| | | | | | | | | | | This creates a JackAspect which is calculated for Java dependencies of Android libraries and binaries and their Java dependencies. Note that this only applies to java_library and java_import at this time because they are the only ones exporting the necessary provider. -- MOS_MIGRATED_REVID=113107408
* Fix remaining links in inline native rule docs.Gravatar David Chen2016-01-25
| | | | | -- MOS_MIGRATED_REVID=112931111
* Remove obsolete documentation for jars in srcsGravatar Liam Miller-Cushon2015-12-21
| | | | | -- MOS_MIGRATED_REVID=110701982
* Support exports attribute for android_libraryGravatar Googler2015-11-13
| | | | | | | RELNOTES: Support exports attribute for android_library -- MOS_MIGRATED_REVID=107681545
* Disallow jars in srcs of java-based rulesGravatar Liam Miller-Cushon2015-11-04
| | | | | -- MOS_MIGRATED_REVID=107000128
* 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
* 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 Jack's tools into AndroidSdkProvider.Gravatar Michael Staib2015-07-16
| | | | | | | | | | | | | | | | | This also eliminates the JackRule, which is no longer necessary, as its sole purpose was to allow Jack's tools to be found. This is now part of AndroidSdkProvider, like all other Android tools. For now, the new attributes on android_sdk are optional and default to their old values. In the future, the new attributes will become mandatory with no defaults, like the other attributes on that rule. Also fixes a bug where errors found during AndroidCommon.initJava would not result in a null return from init, previously obscured by the early return from initJack. -- MOS_MIGRATED_REVID=98305022
* Description redacted.Gravatar John Field2015-06-19
| | | | | -- MOS_MIGRATED_REVID=96384950
* Default Android dependencies to a //external: label with a default binding ↵Gravatar Lukacs Berki2015-06-16
| | | | | | | | | | | | | | | | to //tools/android: . This is useful because we can then eventually implement an android_tools_repository() rule that lets Bazel download the Android tools from somewhere instead of requiring it to be in every workspace with Android tools. The number of tools here is somewhat scary, therefore, I'm considering creating an android_tools rule which would have an attribute for each of these things. Some non-trivial things about this CL: - The labels to load are removed from AndroidConfiguration because they would resolve to e.g. //external:dx_jar, which labels just don't exist and I don't want to add dummy //external:labels not prefixed with android_ - RedirectChaser is taught how to chase redirect through bind() rules because the Android SDK is now found by //external:android_sdk -> //tools/android:sdk -> @androidsdk//:sdk . Ideally, it would be ///external:android_sdk -> @androidsdk//:sdk, but I figured I'd not fix that in this CL. -- MOS_MIGRATED_REVID=96080553
* Adds the JackAspect for Jack support for Java dependencies.Gravatar Michael Staib2015-06-15
| | | | | | | | | | | This creates a JackAspect which is calculated for Java dependencies of Android libraries and binaries and their Java dependencies. Note that this only applies to java_library and java_import at this time because they are the only ones exporting the necessary provider. -- MOS_MIGRATED_REVID=95844097
* Enable AndroidBinary to dex with Jack.Gravatar Michael Staib2015-06-10
| | | | | | | | | | | | | Until the Jack aspect implementation is submitted (in a coming CL), only android_library dependencies can be used by Jack dexing, as no other rule type exports the right provider. But for now, android_binaries which depend purely on android_libraries can build their dexes using Jack if --experimental_android_dex_with_jack is specified. -- MOS_MIGRATED_REVID=95534421
* Use an aspect to calculate the Android neverlink libraries.Gravatar Lukacs Berki2015-05-29
| | | | | | | This cuts the .java -> .android dependency between Java packages, which is nice at the cost of some cavalier over-estimation of the direct dependencies in AndroidNeverlinkAspect. -- MOS_MIGRATED_REVID=94745544
* Adds tools for building Android apps.Gravatar Alex Humesky2015-05-27
| | | | | -- MOS_MIGRATED_REVID=94515805
* 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