diff options
author | Lukacs Berki <lberki@google.com> | 2015-07-20 09:24:12 +0000 |
---|---|---|
committer | Lukacs Berki <lberki@google.com> | 2015-07-20 13:25:32 +0000 |
commit | 841cf455e280c2e4cbe6778e55388cd59588f1d2 (patch) | |
tree | 8c5dc797d50724c46dfaeec7a1ef21608505d554 /examples/android/README.md | |
parent | 99389fdf85c77f5d9b2eed4223b8a8b55f759b7e (diff) |
Make --android_crosstool_top default to the android_ndk_repository specified 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
Diffstat (limited to 'examples/android/README.md')
-rw-r--r-- | examples/android/README.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/android/README.md b/examples/android/README.md index 004d05f6ae..3ac5607633 100644 --- a/examples/android/README.md +++ b/examples/android/README.md @@ -15,11 +15,10 @@ android_ndk_repository( Then the following command can be used to build the example app: ``` -bazel build --android_crosstool_top=@androidndk//:toolchain //examples/android/java/bazel:hello_world +bazel build //examples/android/java/bazel:hello_world ``` Yes, we know that this is a little clunky. We are working on the following things (and more): - * Eliminating the need for the `--android_crosstool_top` command line option * Supporting other architectures than `armeabi-v7a` and compilers other than GCC 4.9 * Eliminating the big ugly deprecation message from the console output of Bazel @@ -28,8 +27,8 @@ We also have a nice way to speed up the edit-compile-install development cycle f * Set the `multidex` attribute to `native` * Set the `dex_shards` attribute to a number between 2 and 200. This controls the size of chunks the code is split into. As this number is increased, compilation and installation becomes faster but app startup becomes slower. A good initial guess is 10. * Connect your device over USB to your workstation and enable USB debugging on it - * Run `bazel mobile-install --android_crosstool_top=@androidndk//:toolchain <android_binary rule>` + * Run `bazel mobile-install <android_binary rule>` * Edit Java code or Android resources - * Run `blaze mobile-install --android_crosstool_top=@androidndk//:toolchain --incremental <android_binary rule>` + * Run `blaze mobile-install --incremental <android_binary rule>` Note that if you change anything other than Java code or Android resources (C++ code or something on the device), you must omit the `--incremental` command line option. Yes, we know that this is also clunky and we are working on improving it. |