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

Unified Diff: build/android/envsetup_functions.sh

Issue 23171022: [Android] Set sdk version and sdk root in GYP_DEFINES via envsetup.sh. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make new env var local 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 | « no previous file | 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 fef07ef9cf93c57d5f547f3388c6bdedcbdd2164..2777d2dfc8b301c6fcd820778066bde7ae7331a7 100755
--- a/build/android/envsetup_functions.sh
+++ b/build/android/envsetup_functions.sh
@@ -223,16 +223,21 @@ sdk_build_init() {
# 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.
+ local sdk_defines=""
if [[ -z "${ANDROID_NDK_ROOT}" || ! -d "${ANDROID_NDK_ROOT}" ]]; then
export ANDROID_NDK_ROOT="${CHROME_SRC}/third_party/android_tools/ndk/"
fi
if [[ -z "${ANDROID_SDK_VERSION}" ]]; then
export ANDROID_SDK_VERSION=18
+ else
+ sdk_defines+=" android_sdk_version=${ANDROID_SDK_VERSION}"
fi
local sdk_suffix=platforms/android-${ANDROID_SDK_VERSION}
if [[ -z "${ANDROID_SDK_ROOT}" || \
! -d "${ANDROID_SDK_ROOT}/${sdk_suffix}" ]]; then
export ANDROID_SDK_ROOT="${CHROME_SRC}/third_party/android_tools/sdk/"
+ else
+ sdk_defines+=" android_sdk_root=${ANDROID_SDK_ROOT}"
fi
if [[ -z "${ANDROID_SDK_BUILD_TOOLS_VERSION}" ]]; then
export ANDROID_SDK_BUILD_TOOLS_VERSION=18.0.1
@@ -248,6 +253,9 @@ sdk_build_init() {
unset ANDROID_TOOLCHAIN
common_vars_defines
+
+ DEFINES+="${sdk_defines}"
+
common_gyp_vars
if [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698