Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
path: dl3/android/DeepLabV3Demo
- name: MV3Demo
path: mv3/android/MV3Demo
- name: YoloDemo
path: Yolo/android


name: Build ${{ matrix.name }}
Expand All @@ -50,15 +52,15 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Download local AAR
if: ${{ inputs.local_aar && matrix.name == 'LlamaDemo' }}
if: ${{ inputs.local_aar && (matrix.name == 'LlamaDemo' || matrix.name == 'YoloDemo') }}
run: |
mkdir -p ${{ matrix.path }}/app/libs
curl -fL -o ${{ matrix.path }}/app/libs/executorch.aar "${{ inputs.local_aar }}"

- name: Build with Gradle
working-directory: ${{ matrix.path }}
run: |
if [ -n "${{ inputs.local_aar }}" ] && [ "${{ matrix.name }}" == "LlamaDemo" ]; then
if [ -n "${{ inputs.local_aar }}" ] && ([ "${{ matrix.name }}" == "LlamaDemo" ] || [ "${{ matrix.name }}" == "YoloDemo" ]); then
./gradlew build --no-daemon -PuseLocalAar=true
else
./gradlew build --no-daemon
Expand Down Expand Up @@ -112,6 +114,7 @@ jobs:
- LlamaDemo APKs (`app-debug-LlamaDemo.apk`, `app-release-unsigned-LlamaDemo.apk`)
- DeepLabV3Demo APKs (`app-debug-DeepLabV3Demo.apk`, `app-release-unsigned-DeepLabV3Demo.apk`)
- MV3Demo APKs (`app-debug-MV3Demo.apk`, `app-release-unsigned-MV3Demo.apk`)
- YoloDemo APKs (`app-debug-YoloDemo.apk`, `app-release-unsigned-YoloDemo.apk`)

**Build Date:** ${{ steps.tag.outputs.build_date }}
**Commit:** ${{ github.sha }}
Expand Down
6 changes: 5 additions & 1 deletion Yolo/android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ dependencies {
implementation("androidx.constraintlayout:constraintlayout:2.2.0-alpha12")
implementation("com.facebook.fbjni:fbjni:0.5.1")
implementation("com.google.code.gson:gson:2.8.6")
implementation(files("libs/executorch.aar"))
if (useLocalAar == true) {
implementation(files("libs/executorch.aar"))
} else {
implementation("org.pytorch:executorch-android:1.1.0")
}

implementation("com.google.android.material:material:1.12.0")
implementation("androidx.activity:activity:1.9.0")
Expand Down
2 changes: 2 additions & 0 deletions Yolo/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />

<uses-feature android:name="android.hardware.camera" android:required="false" />

<application
android:allowBackup="false"
android:dataExtractionRules="@xml/data_extraction_rules"
Expand Down