Files
sousa-gecko/third_party/application-services/libs/android_defaults.sh
T
Ted Campbell 1eeb7b63d1 Bug 2019144 - Vendor much more of application-services. r=nalexander
The GitHub repo is still the source of truth and this is a read-only vendor.
This should let us experiment more incrementally with the monorepo.

Differential Revision: https://phabricator.services.mozilla.com/D282538
2026-04-30 00:42:51 +00:00

28 lines
865 B
Bash
Executable File

#!/usr/bin/env bash
# Find the NDK.
if [[ -z "${ANDROID_NDK_HOME:-}" || -z "${ANDROID_NDK_ROOT:-}" ]]; then
pushd ..
echo "Initializing NDK. Can take a few seconds."
NDK_VERSION=$(./gradlew -q printNdkVersion | tail -1)
export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$NDK_VERSION"
export ANDROID_NDK_ROOT="$ANDROID_NDK_HOME"
popd || exit
else
echo "Using ANDROID_NDK_HOME=${ANDROID_NDK_HOME} and ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT}"
fi
if [[ -z "${ANDROID_NDK_API_VERSION:-}" ]]; then
export ANDROID_NDK_API_VERSION=21
echo "The ANDROID_NDK_API_VERSION environment variable is not set. Defaulting to ${ANDROID_NDK_API_VERSION}"
fi
if [[ "$(uname -s)" == "Darwin" ]]; then
export NDK_HOST_TAG="darwin-x86_64"
elif [[ "$(uname -s)" == "Linux" ]]; then
export NDK_HOST_TAG="linux-x86_64"
else
echo "Unsupported OS."
fi