Skip to content

Commit ad8dc4b

Browse files
committed
Simplify stuff
1 parent 315d897 commit ad8dc4b

File tree

3 files changed

+4
-49
lines changed

3 files changed

+4
-49
lines changed

build/build_android_library.sh

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -137,37 +137,6 @@ build_aar() {
137137
popd
138138
}
139139

140-
build_android_demo_apps() {
141-
mkdir -p examples/demo-apps/android/LlamaDemo/app/libs
142-
cp ${BUILD_AAR_DIR}/executorch.aar examples/demo-apps/android/LlamaDemo/app/libs
143-
pushd examples/demo-apps/android/LlamaDemo
144-
ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew build assembleAndroidTest
145-
popd
146-
147-
mkdir -p extension/benchmark/android/benchmark/app/libs
148-
cp ${BUILD_AAR_DIR}/executorch.aar extension/benchmark/android/benchmark/app/libs
149-
pushd extension/benchmark/android/benchmark
150-
ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew build assembleAndroidTest
151-
popd
152-
}
153-
154-
collect_artifacts_to_be_uploaded() {
155-
ARTIFACTS_DIR_NAME="$1"
156-
DEMO_APP_DIR="${ARTIFACTS_DIR_NAME}/llm_demo"
157-
# The app directory is named using its build flavor as a suffix.
158-
mkdir -p "${DEMO_APP_DIR}"
159-
# Collect the app and its test suite
160-
cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/debug/*.apk "${DEMO_APP_DIR}"
161-
cp examples/demo-apps/android/LlamaDemo/app/build/outputs/apk/androidTest/debug/*.apk "${DEMO_APP_DIR}"
162-
# Collect AAR
163-
cp "${BUILD_AAR_DIR}/executorch.aar" "${DEMO_APP_DIR}"
164-
# Collect MiniBench APK
165-
MINIBENCH_APP_DIR="${ARTIFACTS_DIR_NAME}/minibench"
166-
mkdir -p "${MINIBENCH_APP_DIR}"
167-
cp extension/benchmark/android/benchmark/app/build/outputs/apk/debug/*.apk "${MINIBENCH_APP_DIR}"
168-
cp extension/benchmark/android/benchmark/app/build/outputs/apk/androidTest/debug/*.apk "${MINIBENCH_APP_DIR}"
169-
}
170-
171140
main() {
172141
if [[ -z "${BUILD_AAR_DIR:-}" ]]; then
173142
BUILD_AAR_DIR="$(mktemp -d)"
@@ -185,10 +154,6 @@ main() {
185154
build_android_native_library ${ANDROID_ABI}
186155
done
187156
build_aar
188-
# build_android_demo_apps
189-
# if [ -n "$ARTIFACTS_DIR_NAME" ]; then
190-
# collect_artifacts_to_be_uploaded ${ARTIFACTS_DIR_NAME}
191-
# fi
192157
}
193158

194159
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then

examples/demo-apps/android/LlamaDemo/setup-with-qnn.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ if [ -z "$QNN_SDK_ROOT" ]; then
1313
fi
1414

1515
BASEDIR=$(dirname "$0")
16-
source "$BASEDIR"/../../../../build/build_android_library.sh
16+
ANDROID_ABIS="arm64-v8a" bash "$BASEDIR"/setup.sh
1717

1818
BUILD_AAR_DIR="$(mktemp -d)"
1919
export BUILD_AAR_DIR
20-
21-
build_jar
22-
build_android_native_library "arm64-v8a"
23-
build_aar
24-
mkdir -p "$BASEDIR"/app/libs
25-
cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch.aar

examples/demo-apps/android/LlamaDemo/setup.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@
77

88
set -eu
99

10-
BASEDIR=$(dirname "$0")
11-
source "$BASEDIR"/../../../../build/build_android_library.sh
12-
1310
BUILD_AAR_DIR="$(mktemp -d)"
1411
export BUILD_AAR_DIR
1512

16-
build_jar
17-
build_android_native_library "arm64-v8a"
18-
build_android_native_library "x86_64"
19-
build_aar
13+
BASEDIR=$(dirname "$0")
2014
mkdir -p "$BASEDIR"/app/libs
15+
bash "$BASEDIR"/../../../../build/build_android_library.sh
16+
2117
cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch.aar

0 commit comments

Comments
 (0)