4 MODE
=${1?"First argument must be debug|release"}
6 pushd "${MOZ_FETCHES_DIR}"
7 mv wrench-deps
/{vendor
,.cargo
} ${GECKO_PATH}/gfx
/wr
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
23 echo "Unknown mode '${MODE}'; must be 'debug' or 'release'"