Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2111)

Unified Diff: build/android/envsetup_functions.sh

Issue 22873004: [Android] Allow more support for experimentation with SDK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/envsetup_functions.sh
diff --git a/build/android/envsetup_functions.sh b/build/android/envsetup_functions.sh
index 9554bc9f299c6db6bac703589c5f200a4b649747..f7cf4a1b2c10426c717e880e074b7b3cf120cf1e 100755
--- a/build/android/envsetup_functions.sh
+++ b/build/android/envsetup_functions.sh
@@ -218,23 +218,24 @@ process_options() {
# > make
################################################################################
sdk_build_init() {
- export ANDROID_SDK_VERSION=18
- export ANDROID_SDK_BUILD_TOOLS_VERSION=18.0.1
- # If ANDROID_NDK_ROOT is set when envsetup is run, use the ndk pointed to by
- # the environment variable. Otherwise, use the default ndk from the tree.
+ # Allow the caller to override a few environment variables. If any of them is
+ # unset, we default to a sane value that's known to work. This allows for
+ # experimentation with a custom SDK.
if [[ -z "${ANDROID_NDK_ROOT}" || ! -d "${ANDROID_NDK_ROOT}" ]]; then
Isaac (away) 2013/08/13 02:19:54 How about we remove the -d check (checks the varia
export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/"
fi
-
- # If ANDROID_SDK_ROOT is set when envsetup is run, and if it has the
- # right SDK-compatible directory layout, use the sdk pointed to by the
- # environment variable. Otherwise, use the default sdk from the tree.
+ if [[ -z "${ANDROID_SDK_VERSION}" ]]; then
Isaac (away) 2013/08/13 02:19:54 technically quotes aren't needed in a double brack
+ export ANDROID_SDK_VERSION=18
+ fi
local sdk_suffix=platforms/android-${ANDROID_SDK_VERSION}
if [[ -z "${ANDROID_SDK_ROOT}" || \
! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then
Isaac (away) 2013/08/13 02:19:54 ditto on -d here
Yaron 2013/08/13 02:24:46 I actually like this. It helped me catch an issue
export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/"
fi
+ if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then
+ export ANDROID_SDK_BUILD_TOOLS_VERSION=18.0.1
+ fi
unset ANDROID_BUILD_TOP
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698