aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/android/AndroidRuleClasses.java
Commit message (Collapse)AuthorAge
* support hidden --java_optimization_mode flag in java_test rule.Gravatar Googler2016-01-18
| | | | | -- MOS_MIGRATED_REVID=112290581
* Fixing broken named anchors for common-attributes*.Gravatar Googler2016-01-13
| | | | | | | RELNOTES: -- MOS_MIGRATED_REVID=111951279
* Description redacted.Gravatar Googler2016-01-07
| | | | | -- MOS_MIGRATED_REVID=111413026
* Remove obsolete documentation for jars in srcsGravatar Liam Miller-Cushon2015-12-21
| | | | | -- MOS_MIGRATED_REVID=110701982
* Refactor android_tools_defaults_jarGravatar Liam Miller-Cushon2015-12-07
| | | | | -- MOS_MIGRATED_REVID=109587887
* add option to provide proguard specs on blaze command lineGravatar Googler2015-11-25
| | | | | -- MOS_MIGRATED_REVID=108626077
* Changes R.java to be a compile time dependency in android compilation. This ↵Gravatar Andrew Pellegrini2015-11-13
| | | | | | | results in the removal of R classes from the lib<name>.jar which is required to build proper aar artifacts. As an added benefit, android targets with only resources are no longer treated as having sources, making auto-export behavior more consistent with the build encyclopedia documentation and less surprising. -- MOS_MIGRATED_REVID=107691842
* Disallow jars in srcs of java-based rulesGravatar Liam Miller-Cushon2015-11-04
| | | | | -- MOS_MIGRATED_REVID=107000128
* Add support for proguard's -applymapping option to android_binary.Gravatar Googler2015-11-03
| | | | | | | | RELNOTES[NEW]: android_binary now supports proguard_apply_mapping to re-use a previously generated proguard mapping. -- MOS_MIGRATED_REVID=106945104
* Eliminate the Android tools repository, and with it, ↵Gravatar Lukacs Berki2015-10-27
| | | | | | | | | Constants.ANDROID_DEP_PREFIX. This regrettably entails adding the options parser to the embedded tools in the Bazel binary, but that's only a temporary measure until the embedded binaries are compiled (and not provided in source from) -- MOS_MIGRATED_REVID=106379028
* 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 a custom converter to --crosstool_top so that select() works.Gravatar Lukacs Berki2015-10-08
| | | | | -- MOS_MIGRATED_REVID=104845397
* 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
* 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
* 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
* 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
* 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
* 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
* Make Bazel always build with --fat_apk_cpu.Gravatar Lukacs Berki2015-07-29
| | | | | | | | | Also tweak the Android NDK CROSSTOOL file a bit so that it actually works. Fixes #335. -- MOS_MIGRATED_REVID=99377509
* Use SafeImplicitOutputFunctions for all except the skylark ones.Gravatar Ulf Adams2015-07-23
| | | | | -- MOS_MIGRATED_REVID=98926819
* Make --android_crosstool_top default to the android_ndk_repository specified ↵Gravatar Lukacs Berki2015-07-20
| | | | | | | | | | | | | in the WORKSPACE file. The error reporting if an android_ndk_repository rule is present is not very user-friendly (it just uses the non-Android toolchain, resulting in compile errors) but given that --android_crosstool_top is an interim solution until we get reasonable multi-platform support, I suppose it's fine. As a side effect, instead of prefixing fat APK output directories with "fat-apk-", we prefix Android output directories with "android-". This makes it possible to build Android apps with zero command line options. Rejoice! -- MOS_MIGRATED_REVID=98624120
* 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
* Add an --android_crosstool_top that sets the C++ toolchain to be used for ↵Gravatar Lukacs Berki2015-07-13
| | | | | | | Android targets. -- MOS_MIGRATED_REVID=98095093
* Adds gen jar and manifest proto outputs.Gravatar Alex Humesky2015-07-10
| | | | | | | Adds a jar output to Java and Android rules which contains the class files for source files generated from Java annotation processors. For a java_binary foo, the jar will be foo-gen.jar, and for a java_library foo the jar will be libfoo-gen.jar, and similarly for Android. Also adds a binary serialized proto manifest file output to Java and Android rules which describes the contents of the output class jar of those rules, which is used to create the -gen.jar. See src/main/protobuf/java_compilation.proto. -- MOS_MIGRATED_REVID=97793715
* Remove references to all Android tools from AndroidConfiguration.Gravatar Lukacs Berki2015-06-29
| | | | | | | | | Bazel unconditionally loads all the labels in configurations for now, and we don't want Android stuff to be loaded if the build doesn't have anything to do with Android. The alternative would be to fix this by not loading all configuration fragments, but this is the more expedient solution. The SDK will be dealt with by binding //external:android/sdk to a dummy SDK unless overridden by an android_sdk_repository rule. -- MOS_MIGRATED_REVID=97116824
* Description redacted.Gravatar John Field2015-06-19
| | | | | -- MOS_MIGRATED_REVID=96384950
* Add a tools/android/jack package to the Bazel tree so that Android rules ↵Gravatar Lukacs Berki2015-06-17
| | | | | | | | | actually work. This is a temporary measure until these targets are integrated into android_sdk . Also make handling invalid tools/android/jack packages in JackCompilationHelper a bit more robust. -- MOS_MIGRATED_REVID=96202009
* 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 a new input and output to resource processing, symbols txt, which will ↵Gravatar Googler2015-06-16
| | | | | | | be used to express the direct dependencies for resource processing. -- MOS_MIGRATED_REVID=96037997
* Remove the debug_key attribute from android_binary and the associated -ks ↵Gravatar Lukacs Berki2015-06-16
| | | | | | | argument from the ApkBuilder invocation, because it turns out that ApkBuilder doesn't support it. -- MOS_MIGRATED_REVID=96035676
* 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
* Merges class jars specified as srcs into the android library class jar in ↵Gravatar Andrew Pellegrini2015-06-10
| | | | | | | | | order to create the classes.jar to be used in aar generation. RELNOTES: The classes.jar in .aar files now also contains the contents of any class jars specified in the android_library.srcs attribute. -- MOS_MIGRATED_REVID=95542278
* 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
* Rollback of unknown previous commit.Gravatar Googler2015-06-05
| | | | | -- MOS_MIGRATED_REVID=95215123
* Changes the android rules to invoke jarjar directly instead of through a script.Gravatar Alex Humesky2015-06-01
| | | | | -- MOS_MIGRATED_REVID=94791363
* 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