Skip to content

Commit 2be0105

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Rename executorch-llama.aar to executorch.aar (#6313)
Summary: Let's use a uniform name. It's easier to maintain and less error prone. It won't cause BC issue. All renaming are happening within this repo, this version. For user apps, after they download or build the AAR, they can rename in their build.gradle.kts. Pull Request resolved: #6313 Test Plan: 1. `sh examples/demo-apps/android/LlamaDemo/download_prebuilt_lib.sh` run twice! 2. `sh build/build_android_llm_demo.sh` 3. `sh examples/demo-apps/android/LlamaDemo/setup.sh` 4. `sh examples/demo-apps/android/LlamaDemo/setup-with-qnn.sh` Reviewed By: cmodi-meta Differential Revision: D64501756 Pulled By: kirklandsign fbshipit-source-id: 1ea7c58478f467ebc53cdaaa355cb117e0bfea08
1 parent 3b8b28b commit 2be0105

File tree

7 files changed

+8
-10
lines changed

7 files changed

+8
-10
lines changed

build/build_android_llm_demo.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,12 @@ build_aar() {
115115
find jni -type f -name "libexecutorch_jni.so" -exec bash -c 'mv "$1" "${1/_jni/}"' bash {} \;
116116
# Zip all necessary files into the AAR file
117117
zip -r executorch.aar libs jni/*/libexecutorch.so jni/*/libqnn*.so jni/*/libQnn*.so jni/*/libneuron_backend.so jni/*/libneuron_buffer_allocator.so jni/*/libneuronusdk_adapter.mtk.so AndroidManifest.xml
118-
cp executorch.aar executorch-llama.aar
119118
popd
120119
}
121120

122121
build_android_demo_apps() {
123122
mkdir -p examples/demo-apps/android/LlamaDemo/app/libs
124-
cp ${BUILD_AAR_DIR}/executorch-llama.aar examples/demo-apps/android/LlamaDemo/app/libs
123+
cp ${BUILD_AAR_DIR}/executorch.aar examples/demo-apps/android/LlamaDemo/app/libs
125124
pushd examples/demo-apps/android/LlamaDemo
126125
ANDROID_HOME="${ANDROID_SDK:-/opt/android/sdk}" ./gradlew build assembleAndroidTest
127126
popd

docs/source/android-prebuilt-library.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ To add the Java library to your app, simply download the AAR, and add it to your
2323
In your app working directory, such as example executorch/examples/demo-apps/android/LlamaDemo,
2424
```
2525
mkdir -p app/libs
26-
curl https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar -o app/libs/executorch-llama.aar
26+
curl https://ossci-android.s3.amazonaws.com/executorch/release/executorch-241002/executorch.aar -o app/libs/executorch.aar
2727
```
2828

2929
And include it in gradle:
3030
```
3131
# app/build.grardle.kts
3232
dependencies {
33-
implementation(files("libs/executorch-llama.aar"))
33+
implementation(files("libs/executorch.aar"))
3434
}
3535
```
3636

examples/demo-apps/android/LlamaDemo/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ dependencies {
5757
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha12")
5858
implementation("com.facebook.fbjni:fbjni:0.5.1")
5959
implementation("com.google.code.gson:gson:2.8.6")
60-
implementation(files("libs/executorch-llama.aar"))
60+
implementation(files("libs/executorch.aar"))
6161
implementation("com.google.android.material:material:1.12.0")
6262
implementation("androidx.activity:activity:1.9.0")
6363
testImplementation("junit:junit:4.13.2")

examples/demo-apps/android/LlamaDemo/docs/delegates/xnnpack_README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ sh examples/demo-apps/android/LlamaDemo/setup.sh
159159

160160
This is running the shell script which configures the required core ExecuTorch, Llama2/3, and Android libraries, builds them, and copies them to jniLibs.
161161

162-
**Output**: The executorch-llama.aar file will be generated in a newly created folder in the example/demo-apps/android/LlamaDemo/app/libs directory. This is the path that the Android app expects it to be in.
162+
**Output**: The executorch.aar file will be generated in a newly created folder in the example/demo-apps/android/LlamaDemo/app/libs directory. This is the path that the Android app expects it to be in.
163163

164164
**Note**: If you are building the Android app mentioned in the next section on a separate machine (i.e. MacOS but building and exporting on Linux), make sure you copy the aar file generated from setup script to “examples/demo-apps/android/LlamaDemo/app/libs” before building the Android app.
165165

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ mkdir -p "$LIBS_PATH"
1515

1616
pushd "$LIBS_PATH"
1717
curl -O "${AAR_SHASUM_URL}"
18-
sed -i -e 's/executorch.aar/executorch-llama.aar/g' executorch.aar.sha256sums
19-
shasum --check --status executorch.aar.sha256sums || curl "${AAR_URL}" -o executorch-llama.aar
18+
shasum --check --status executorch.aar.sha256sums || curl "${AAR_URL}" -o executorch.aar
2019
popd

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ build_jar
2222
build_android_native_library "arm64-v8a"
2323
build_aar
2424
mkdir -p "$BASEDIR"/app/libs
25-
cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch-llama.aar
25+
cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch.aar

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ build_android_native_library "arm64-v8a"
1818
build_android_native_library "x86_64"
1919
build_aar
2020
mkdir -p "$BASEDIR"/app/libs
21-
cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch-llama.aar
21+
cp "$BUILD_AAR_DIR/executorch.aar" "$BASEDIR"/app/libs/executorch.aar

0 commit comments

Comments
 (0)