aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/android
Commit message (Collapse)AuthorAge
* Expose Bazel's Android data binding support to users.Gravatar gregce2017-04-18
| | | | | | | | | | | | The logic is already in Bazel but wasn't available to build rules. This change makes it available, but still requires data binding's {build|run}time libraries to be checked into appropriate depot spots for everything to work. Followup changes will make those libraries easily available. Issue: #2694 PiperOrigin-RevId: 153359861
* Make android_sdk_repository generate filegroups containing system image ↵Gravatar ajmichael2017-04-12
| | | | | | | | | | | | | | | | | | files for all android system images installed in the SDK. For system images that are not installed, create genrule "poison pills" that print a helpful error message if you attempt to build them. These filegroups are intended to be used as the system_image attribute of the android_device rule. Example: $ bazel build @android_test_support//tools/android/emulated_devices/pixel:android_25_x86 Extracting Bazel installation... . INFO: Found 1 target... ERROR: /usr/local/google/home/ajmichael/.cache/bazel/_bazel_ajmichael/efa32264346ef1fc4fec492202b88b31/external/androidsdk/BUILD.bazel:56:1: Executing genrule @androidsdk//:emulator_images_android_25_x86 failed: Process exited with status 1 [sandboxed]. This rule requires that the Android SDK used by Bazel has the following system image installed: emulator_images_android_25_x86. Please install this system image through the Android SDK Manager and try again. RELNOTES: None PiperOrigin-RevId: 152889824
* Remove apkbuilder from Bazel's android_sdk.Gravatar ajmichael2017-04-06
| | | | | | RELNOTES: None PiperOrigin-RevId: 152292294
* Remove jack tools from Bazel.Gravatar ajmichael2017-04-05
| | | | | | | | #1391 RELNOTES: None PiperOrigin-RevId: 152179305
* Make mobile-install wait for debuggerGravatar Googler2017-03-17
| | | | | | -- PiperOrigin-RevId: 150372383 MOS_MIGRATED_REVID=150372383
* Rollback of commit adf051ead3b747081639600fb4a9e043a798b2df.Gravatar Googler2017-03-16
| | | | | | | | | | | | | | | *** Reason for rollback *** this flag isn't needed with unknown commit *** Original change description *** Add --activity_name_file flag and modify --start flag in incremental_install. This is a first step to add the ability for mobile-install to wait for the debugger before starting the app. -- PiperOrigin-RevId: 150340712 MOS_MIGRATED_REVID=150340712
* Replace all instances of org_unified_launcher with android_test_support.Gravatar Adam Michael2017-03-16
| | | | | | -- PiperOrigin-RevId: 150194430 MOS_MIGRATED_REVID=150194430
* Add emulator_images_%s filegroups for Bazel Android devices.Gravatar Adam Michael2017-03-15
| | | | | | | | A previous change added this filegroup with the name %s_files. Recent discussions have suggested changing the naming convention to be a prefix instead before it is too late. -- PiperOrigin-RevId: 150117207 MOS_MIGRATED_REVID=150117207
* Add --activity_name_file flag and modify --start flag in ↵Gravatar Googler2017-03-14
| | | | | | | | | | incremental_install. This is a first step to add the ability for mobile-install to wait for the debugger before starting the app. -- PiperOrigin-RevId: 149897848 MOS_MIGRATED_REVID=149897848
* Improve AndroidSdkRepositoryTest.Gravatar Adam Michael2017-02-20
| | | | | | | | | | Also, remove some tests from android_integration_test.sh that are now covered by AndroidSdkRepositoryTest. This should hopefully reduce breakages of android_integration_test.sh that are not caught until the change makes its way to Jenkins. I haven't yet figured out how to move the environment variable settings tests into AndroidSdkRepositoryTest. -- PiperOrigin-RevId: 147864723 MOS_MIGRATED_REVID=147864723
* Make android_device pass --android_sdk_path to unified launcher.Gravatar Adam Michael2017-02-14
| | | | | | | | Creates filegroup containing sdk path in Bazel embedded Android SDK repository. -- PiperOrigin-RevId: 147426838 MOS_MIGRATED_REVID=147426838
* gen_java_lang_invoke_jar should not use java from $PATH.Gravatar Adam Michael2017-02-13
| | | | | | | | | | This caused a failure in http://ci.bazel.io/job/Gerrit-bazel-tests/368/BAZEL_VERSION=latest,PLATFORM_NAME=ubuntu_15.10-x86_64/console where the genrule used java from a jdk7 instead of a jdk8. -- PiperOrigin-RevId: 147198518 MOS_MIGRATED_REVID=147198518
* Open source java 8 desugarer.Gravatar Adam Michael2017-02-10
| | | | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/2222. RELNOTES: Support for Java 8 lambdas, method references, type annotations and repeated annotations in Android builds with --experimental_desugar_for_android. -- PiperOrigin-RevId: 147109786 MOS_MIGRATED_REVID=147109786
* Rollback of commit 602a98cbebeff2ba1c2d8605a9552b2c8f5622ae.Gravatar Googler2017-02-09
| | | | | | | | | | | | | | | | *** Reason for rollback *** Rolling forward with fixes for the incremental tool. *** Original change description *** Automated [] rollback of commit d11d510c571b10787856395709f9ad945ca70bb2. *** Reason for rollback *** -- PiperOrigin-RevId: 146940409 MOS_MIGRATED_REVID=146940409
* Rollback of commit d11d510c571b10787856395709f9ad945ca70bb2.Gravatar Alex Humesky2017-02-08
| | | | | | | | *** Reason for rollback *** -- PiperOrigin-RevId: 146820790 MOS_MIGRATED_REVID=146820790
* Move all the resource processing tools into a "busybox".Gravatar Googler2017-02-08
| | | | | | | | | This makes the code simpler as well as reducing the number of targets to build. It also makes testing and profiling different action strategies vastly easier. -- PiperOrigin-RevId: 146812659 MOS_MIGRATED_REVID=146812659
* Add emulator shared libs to android_device launcher runfiles.Gravatar Adam Michael2017-02-02
| | | | | | -- PiperOrigin-RevId: 146300001 MOS_MIGRATED_REVID=146300001
* Rollback of commit 932d1abfa34267a9e5abc7441c9e2a081beedd85.Gravatar Adam Michael2017-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes and a test. Previously AndroidSdkRepository required that system-images/ directory exist in the Android SDK. However, it does not exist until you download the first system image. *** Original change description *** Automated [] rollback of commit 06072c557290b97cb2d2e4fd255b647a9208cb5c. *** Reason for rollback *** Broke andriod_sdk_repository on ci.bazel.io See https://github.com/bazelbuild/bazel/issues/2465 *** Original change description *** Make android_sdk_repository discover all system-images directories in the sdk. This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146258003 MOS_MIGRATED_REVID=146258003
* Rollback of commit 06072c557290b97cb2d2e4fd255b647a9208cb5c.Gravatar Yun Peng2017-02-01
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Broke andriod_sdk_repository on ci.bazel.io See https://github.com/bazelbuild/bazel/issues/2465 *** Original change description *** Make android_sdk_repository discover all system-images directories in the sdk. This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146235800 MOS_MIGRATED_REVID=146235800
* Make android_sdk_repository discover all system-images directories in the sdk.Gravatar Adam Michael2017-02-01
| | | | | | | | This will be used by the upcoming android_device rule that launches emulators. -- PiperOrigin-RevId: 146183077 MOS_MIGRATED_REVID=146183077
* Make the Bazel unified launcher alias point to unified_launcher_head.Gravatar Adam Michael2017-02-01
| | | | | | -- PiperOrigin-RevId: 146142811 MOS_MIGRATED_REVID=146142811
* Create aliases for tools for upcoming android_device rule.Gravatar Adam Michael2017-01-27
| | | | | | | | Note that these aliases are intentionally not yet functional. Nothing should be trying to build them. -- PiperOrigin-RevId: 145746166 MOS_MIGRATED_REVID=145746166
* Fix build_split_manifest.py to not include the versionCode or versionNameGravatar Alex Humesky2017-01-27
| | | | | | | | attributes if they aren't present in the original manifest. Before, it would make them None, and aapt would fail. -- PiperOrigin-RevId: 145726642 MOS_MIGRATED_REVID=145726642
* Don't bundle android tests into the Bazel binary.Gravatar Adam Michael2017-01-20
| | | | | | | | Saves 12kB! :) -- PiperOrigin-RevId: 144997917 MOS_MIGRATED_REVID=144997917
* Make android_sdk_repository create one android_sdk per api level in the SDK.Gravatar Adam Michael2017-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | api_level is no longer required. It now sets the default android_sdk that is used if the --android_sdk flag is not passed. If it is not set, the highest api_level will be used as the default. The new behavior is demonstrated by the following example: $ ls $ANDROID_HOME/platforms android-21 android-22 android-23 $ cat WORKSPACE android_sdk_repository( name = "foo", ) $ bazel build //java/my/app # uses api level 23 $ bazel build --android_sdk=@foo//:sdk-22 //java/my/app # uses api level 22 $ cat > WORKSPACE <<EOF android_sdk_repository( name = "foo", api_level = 21, ) EOF $ bazel build //java/my/app # uses api level 21 $ bazel build --android_sdk=@foo//:sdk-23 //java/my/app # uses api level 23 See https://github.com/bazelbuild/bazel/issues/2284 for the master plan for android_sdk_repository. RELNOTES: android_sdk_repository no longer requires api_level. If one is not specified, the highest android platform installed will be used. Furthermore, android_sdk's are created for all android platforms installed and can be specified with the --android_sdk flag. -- PiperOrigin-RevId: 144258881 MOS_MIGRATED_REVID=144258881
* Remove filegroups in tools/android/BUILD.tools in favor of aliases.Gravatar Adam Michael2017-01-09
| | | | | | -- PiperOrigin-RevId: 143825037 MOS_MIGRATED_REVID=143825037
* Split tools/android/BUILD into BUILD and BUILD.tools.Gravatar Adam Michael2017-01-05
| | | | | | | | | | | | | | This should help clear up the confusion that caused https://github.com/bazelbuild/bazel/issues/2283. Now all of the following work: bazel build //tools/android/... bazel test //tools/android/... bazel build @bazel_tools//tools/android/... -- PiperOrigin-RevId: 143666995 MOS_MIGRATED_REVID=143666995
* Rollback of commit e81ff0e156647ae680346ac833313319e7ea69d6.Gravatar Alex Humesky2016-12-22
| | | | | | | | | | | | | | | | | *** Reason for rollback *** breaks bazel: https://github.com/bazelbuild/bazel/issues/2283 http://ci.bazel.io/job/bazel-tests/432/BAZEL_VERSION=HEAD,PLATFORM_NAME=linux-x86_64/console *** Original change description *** Remove broken and unused Android tools aliases. -- PiperOrigin-RevId: 142768488 MOS_MIGRATED_REVID=142768488
* Remove broken and unused Android tools aliases.Gravatar Adam Michael2016-12-22
| | | | | | -- PiperOrigin-RevId: 142702623 MOS_MIGRATED_REVID=142702623
* Rollback of commit 27cd7f6bb4a02f56f9ad73e57e71e69a1c00d5ea.Gravatar Adam Michael2016-12-15
| | | | | | | | | | | | *** Reason for rollback *** Rolling forward, intentionally breaking loading phase (and therefore `bazel fetch`) for android_binary in Bazel if no android_sdk_repository is set up. Will not submit until Tensorflow's use case is cleaned up in https://github.com/tensorflow/tensorflow/pull/6225. -- PiperOrigin-RevId: 142068703 MOS_MIGRATED_REVID=142068703
* Rollback of commit 14e35546302a48d1074bc2456ef4d63c27c9d3a1.Gravatar Adam Michael2016-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Rollforward with fixes to android_integration_test.sh. The test now uses the new syntax for the Support Library AARs. All CIs that have been created since last December should have this library installed due to https://github.com/bazelbuild/continuous-integration/blob/master/mac/mac-android.sh#L36. *** Original change description *** Automated [] rollback of commit f699b502ef6a57dc68570486191ad1c318e8fd1b. *** Reason for rollback *** Breaks android_integration_test.sh which relies on the old targets. I don't have time to update the test to use the new targets at the moment, so rolling the change back for now. https://github.com/bazelbuild/bazel/issues/2159 RELNOTES: -- PiperOrigin-RevId: 141233182 MOS_MIGRATED_REVID=141233182
* Bazel uses apksigner from SDK build-tools instead of embedded jar.Gravatar Adam Michael2016-12-06
| | | | | | | | | | | | A followup change will remove the apksigner jar that is bundled with Bazel. RELNOTES: Bazel Android builds use the apksigner tool from the Android SDK build-tools. Bazel Android builds now require build-tools version 24.0.3 or later. -- PiperOrigin-RevId: 141181612 MOS_MIGRATED_REVID=141181612
* Rollback of commit f699b502ef6a57dc68570486191ad1c318e8fd1b.Gravatar Adam Michael2016-12-01
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks android_integration_test.sh which relies on the old targets. I don't have time to update the test to use the new targets at the moment, so rolling the change back for now. https://github.com/bazelbuild/bazel/issues/2159 RELNOTES: -- MOS_MIGRATED_REVID=140733556
* Delete old targets from android_sdk_repository_template.bzlGravatar Adam Michael2016-11-30
| | | | | | | | | | | | | | | | In December 2015, these JARs needed for these targets were removed from all subsequent Android SDK releases. They were replaced by a two local maven repositories: <android sdk>/extras/android/m2repository and <android sdk>/extras/google/m2repository. Furthermore, the new dependencies are AARs and the Maven repositories are sem-ver'd so the developer needs to select the version of the library to use. In https://github.com/bazelbuild/bazel/commit/2fcf0e I added support for android_sdk_repository to parse these local maven repositories and generate java_import and aar_import rules along with their dependencies. Since these "extras" do not ship with the SDK by default and are not versioned with the build-tools, you cannot currently download the old JAR versions. As such, anyone who has updated their Android SDK in the last year should not have been able to download the old JARs. See https://github.com/bazelbuild/bazel/issues/1745 for the tracking issue and information on migrating from the old targets to the new ones. RELNOTES: Top level @androidsdk support library targets have been replaced by @androidsdk//<group id>:<artifact id>-<version> for Android SDK Support and Google Play Services libraries. -- MOS_MIGRATED_REVID=140562616
* resource_extractor.py should preserve the timestamps of entries of the input JARGravatar Adam Michael2016-11-17
| | | | | | | RELNOTES: -- MOS_MIGRATED_REVID=139370787
* Open source resource_extractor.py for singlejar apk building.Gravatar Adam Michael2016-11-16
| | | | | | | Now, apks can be built faster in Bazel using the --use_singlejar_apkbuilder flag. -- MOS_MIGRATED_REVID=139285943
* Make aar_embedded_jar_extractor.py not try to recreate the output directory.Gravatar Adam Michael2016-11-09
| | | | | -- MOS_MIGRATED_REVID=138516288
* Make android_integration_test run again!Gravatar Adam Michael2016-10-27
| | | | | | | | Prior to this change, the android SDK for the integration tests was empty so they were not run. -- MOS_MIGRATED_REVID=137307968
* Use TEST_TMPDIR for zip_manifest_extractor_test.sh.Gravatar Adam Michael2016-10-26
| | | | | -- MOS_MIGRATED_REVID=137209855
* Fix zip_manifest_creator dep in bazel_tools repo with an alias.Gravatar Adam Michael2016-10-26
| | | | | | | | | | | In commit 78c19807d2cbb308b830022dcdcc8b03f19f90a9 I accidentally broke aar_import when I moved zip_manifest_creator from tools/android to tools/zip because tools/android does not have separate BUILD and BUILD.tools files. The test did not catch this, because the dependency in tools/android/BUILD is correct in the context of the bazel tree but not in the context of the bazel_tools embedded workspace. -- MOS_MIGRATED_REVID=137209500
* Merge all jars in AAR in aar_import, not just classes.jarGravatar Adam Michael2016-10-26
| | | | | | | See https://github.com/bazelbuild/bazel/issues/1935 -- MOS_MIGRATED_REVID=137202533
* Adds support to aar_import for native libs in /jni.Gravatar Adam Michael2016-10-25
| | | | | | | The libs that are extracted are dependent on the CPU from the Android split transition. This is set either from --fat_apk_cpu or --android_cpu if fat_apk_cpu is empty. -- MOS_MIGRATED_REVID=137188695
* Refactor AarImportRule into a base rule.Gravatar Adam Michael2016-10-14
| | | | | | | Also moves AAR-specific tools from tools/zip into tools/android and renames embedded_jar_extractor to aar_embedded_jars_extractor because in a future change it will extract classes.jar and libs/*.jar. -- MOS_MIGRATED_REVID=136099324
* Explicitly specify the directories in the Android SDK needed for tests.Gravatar Adam Michael2016-10-12
| | | | | | | | | | | | //src/test/shell/bazel/test-setup.sh uses this filegroup to symlink the contents of the Android SDK into the workspace for the test. However, since we add BUILD files into the Android SDK, we don't want to copy those into the workspace because they will be regenerated by the integration test. Fixes https://github.com/bazelbuild/bazel/issues/1927. -- MOS_MIGRATED_REVID=135858750
* Added support for rex to optionally compress dex files.Gravatar Googler2016-10-12
| | | | | -- MOS_MIGRATED_REVID=135805730
* Rollback of commit af8ebca2b88a0ee1129b72b4ce825f6489c31e67.Gravatar Damien Martin-Guillerez2016-10-05
| | | | | | | | | | | | | | | | | | | | *** Reason for rollback *** Break `bazel fetch ...` Discovered by bisecting `bazel fetch tensorflow/...`, see attached bug for more information Fixes https://github.com/bazelbuild/bazel/issues/1880 *** Original change description *** Open source dex merging tools for incremental dexing. Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=135220785
* Open source dex merging tools for incremental dexing.Gravatar Adam Michael2016-09-30
| | | | | | | | Tested with bazel build --incremental_dexing_binary_types=monodex,multidex_unsharded,multidex_sharded -- //examples/android/java/bazel:hello_world -- MOS_MIGRATED_REVID=134690103
* patch bootclasspath to allow javac to compile lambdas and method references ↵Gravatar Googler2016-09-28
| | | | | | | in android_* targets (behind existing flag). -- MOS_MIGRATED_REVID=134453743
* Change the filegroup for the android sdk to an alias to unbreak android in ↵Gravatar Alex Humesky2016-09-23
| | | | | | | bazel after commit 1092e9d68773adb7444cc85a47af650aeeaf65fc -- MOS_MIGRATED_REVID=134036851
* Java 8 support for Android builds, initially with incremental dexing only.Gravatar Googler2016-09-19
| | | | | -- MOS_MIGRATED_REVID=133436157