File tree Expand file tree Collapse file tree 2 files changed +12
-506
lines changed
demo-apps/android/LlamaDemo Expand file tree Collapse file tree 2 files changed +12
-506
lines changed Original file line number Diff line number Diff line change 77
88set -eu
99
10+ BASEDIR=$( dirname " $0 " )
11+ source " $BASEDIR " /../../../../build/build_android_llm_demo.sh
12+
1013BUILD_AAR_DIR=" $( mktemp -d) "
11- mkdir -p " ${BUILD_AAR_DIR} /jni/${ANDROID_ABI} " " ${BUILD_AAR_DIR} /libs"
12- cp " ${CMAKE_OUT} " /extension/android/libexecutorch_jni.so " ${BUILD_AAR_DIR} /jni/${ANDROID_ABI} /libexecutorch.so"
13- cp extension/android/build/libs/executorch.jar " ${BUILD_AAR_DIR} /libs"
14- echo \< manifest xmlns:android=\" http://schemas.android.com/apk/res/android\" \
15- package=\" org.pytorch.executorch\"\> \
16- \< uses-sdk android:minSdkVersion=\" 19\" /\> \
17- \< /manifest\> > " ${BUILD_AAR_DIR} /AndroidManifest.xml"
18- pushd " ${BUILD_AAR_DIR} "
19- zip -r executorch-llama.aar libs jni/${ANDROID_ABI} AndroidManifest.xml
20- popd
21- mkdir -p examples/demo-apps/android/LlamaDemo/app/libs
22- mv " ${BUILD_AAR_DIR} /executorch-llama.aar" examples/demo-apps/android/LlamaDemo/app/libs
14+ export BUILD_AAR_DIR
15+
16+ build_jar
17+ build_android_native_library " arm64-v8a"
18+ build_android_native_library " x86_64"
19+ build_aar
20+ mkdir -p " $BASEDIR " /app/libs
21+ cp " $BUILD_AAR_DIR /executorch.aar" " $BASEDIR " /app/libs/executorch.aar
You can’t perform that action at this time.
0 commit comments