Skip to content

Commit 7b220c6

Browse files
Android set different maven package names of flavors (#15212)
Different flavor name generates different maven packages --------- Co-authored-by: Hansong Zhang <[email protected]> Co-authored-by: Hansong Zhang <[email protected]>
1 parent 0fbaaf7 commit 7b220c6

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/android-release-artifacts.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
if curl -I "https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}-${FLAVOR}/executorch.aar" | grep "200 OK"; then
3939
echo "AAR already exists at https://ossci-android.s3.amazonaws.com/executorch/release/${VERSION}-${FLAVOR}/executorch.aar"
4040
echo "Will skip build/upload"
41-
exit 1
4241
fi
4342
4443
build-aar:
@@ -90,6 +89,10 @@ jobs:
9089
fi
9190
9291
FLAVOR="${{ inputs.flavor }}"
92+
if [ ! -z "$FLAVOR" ]; then
93+
GRADLE_ARGS+=" -Dflavor=${FLAVOR}"
94+
fi
95+
9396
if [[ "$FLAVOR" == "vulkan" || -z "$FLAVOR" ]]; then
9497
curl -O https://sdk.lunarg.com/sdk/download/1.4.321.1/linux/vulkansdk-linux-x86_64-1.4.321.1.tar.xz
9598
tar xf vulkansdk-linux-x86_64-1.4.321.1.tar.xz -C /tmp

extension/android/executorch_android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ plugins {
1515

1616
def qnnVersion = System.properties['qnnVersion']
1717
def execuTorchVersion = System.properties['execuTorchVersion']
18+
def flavor = System.properties['flavor']
1819

1920
android {
2021
namespace = "org.pytorch.executorch"
@@ -69,7 +70,7 @@ mavenPublishing {
6970
publishToMavenCentral()
7071
signAllPublications()
7172

72-
coordinates("org.pytorch", "executorch-android" + (qnnVersion ? "-qnn" : ""), execuTorchVersion ? execuTorchVersion : "0.7.0-SNAPSHOT")
73+
coordinates("org.pytorch", "executorch-android" + (flavor ? "-" + flavor : ""), execuTorchVersion ? execuTorchVersion : "1.0.0-SNAPSHOT")
7374

7475
pom {
7576
name = "ExecuTorch Android"

0 commit comments

Comments
 (0)