xref: /aosp_15_r20/external/executorch/examples/demo-apps/android/LlamaDemo/setup.sh (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1#!/usr/bin/env bash
2# Copyright (c) Meta Platforms, Inc. and affiliates.
3# All rights reserved.
4#
5# This source code is licensed under the BSD-style license found in the
6# LICENSE file in the root directory of this source tree.
7
8set -eu
9
10BASEDIR=$(dirname "$0")
11source "$BASEDIR"/../../../../build/build_android_llm_demo.sh
12
13BUILD_AAR_DIR="$(mktemp -d)"
14export BUILD_AAR_DIR
15
16build_jar
17build_android_native_library "arm64-v8a"
18build_android_native_library "x86_64"
19build_aar
20mkdir -p "$BASEDIR"/app/libs
21cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch.aar
22