Backed out changeset 0c01a856e4c3 (bug 1870427) as requested by Emilio CLOSED TREE
[gecko.git] / taskcluster / scripts / misc / wrench-android-build.sh
blob1e7a3c1f15513f14f208f1f6d98fc2f4f0058b4d
1 #!/bin/bash
2 set -x -e -v
4 MODE=${1?"First argument must be debug|release"}
6 pushd "${MOZ_FETCHES_DIR}"
7 mv wrench-deps/{vendor,.cargo} ${GECKO_PATH}/gfx/wr
8 popd
10 pushd "${GECKO_PATH}/gfx/wr/wrench"
11 # These things come from the toolchain dependencies of the job that invokes
12 # this script (webrender-wrench-android-build).
13 export PATH="${PATH}:${MOZ_FETCHES_DIR}/rustc/bin"
14 export PATH="${PATH}:${JAVA_HOME}/bin"
15 export ANDROID_SDK_ROOT="${MOZ_FETCHES_DIR}/android-sdk-linux"
16 export ANDROID_NDK_ROOT="${MOZ_FETCHES_DIR}/android-ndk"
18 if [ "$MODE" == "debug" ]; then
19 $MOZ_FETCHES_DIR/cargo-apk/cargo-apk apk build --frozen --verbose --lib
20 elif [ "$MODE" == "release" ]; then
21 $MOZ_FETCHES_DIR/cargo-apk/cargo-apk apk build --frozen --verbose --lib --release
22 else
23 echo "Unknown mode '${MODE}'; must be 'debug' or 'release'"
24 exit 1
26 popd