This repository was archived by the owner on Sep 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android - Update aar handling script
- Loading branch information
Jakub Audykowicz
committed
Sep 17, 2023
1 parent
af06853
commit e9e534f
Showing
1 changed file
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
#!/bin/sh | ||
AAR_PATH=$1 | ||
AAR_NO_PREFAB_PATH=$2 | ||
if [[ -z "$AAR_PATH" ]]; then | ||
AAR_PATH=~/.m2/repository/io/dolby/comms-sdk-android-cppsdk/2.6.0/*.aar | ||
AAR_SHARED_PATH=$3 | ||
|
||
if [[ -z "$AAR_PATH" ]]; then # use Maven | ||
AAR_PATH=~/.m2/repository/io/dolby/comms-sdk-android-cppsdk/2.7.0/*.aar | ||
AAR_NO_PREFAB_PATH=~/.m2/repository/io/dolby/comms-sdk-android-cppsdk-noprefab/2.7.0/*.aar | ||
AAR_SHARED_PATH=~/.m2/repository/io/dolby/comms-sdk-android-cppsdk-shared/2.7.0/*.aar | ||
fi | ||
|
||
AAR_TMP=aar_tmp | ||
RELEASE_PATH="DolbyIO/sdk-release-android" | ||
|
||
# clean release | ||
rm -rf ${RELEASE_PATH} | ||
mkdir ${RELEASE_PATH} | ||
|
||
# get includes from main aar | ||
unzip ${AAR_PATH} -d ${AAR_TMP} | ||
|
||
cp -r ${AAR_TMP}/prefab/modules/sdk/include ${RELEASE_PATH} | ||
rm -rf ${AAR_TMP} | ||
|
||
# get libs from noprefab aar | ||
unzip ${AAR_NO_PREFAB_PATH} -d ${AAR_TMP} | ||
for ARCH in arm64-v8a | ||
do | ||
LIBS_PATH=libs/android.${ARCH} | ||
mkdir -p ${RELEASE_PATH}/${LIBS_PATH} | ||
cp -r ${AAR_TMP}/prefab/modules/sdk/${LIBS_PATH} ${RELEASE_PATH}/libs | ||
|
||
LIB_PATH=${AAR_TMP}/jni/${ARCH} | ||
cp ${LIB_PATH}/libdolbyio_comms_media.so ${LIB_PATH}/libdolbyio_comms_sdk_android_cppsdk.so ${RELEASE_PATH}/libs/android.${ARCH} | ||
LIBS_PATH=${RELEASE_PATH}/libs/android.${ARCH} | ||
mkdir -p ${LIBS_PATH} | ||
for LIB in media sdk | ||
do | ||
cp ${AAR_TMP}/jni/${ARCH}/libdolbyio_comms_${LIB}.so ${LIBS_PATH} | ||
done | ||
done | ||
rm -rf ${AAR_TMP} | ||
|
||
if [[ "$AAR_NO_PREFAB_PATH" ]]; then | ||
cp ${AAR_NO_PREFAB_PATH} ${RELEASE_PATH} | ||
fi | ||
|
||
rm -rf $AAR_TMP | ||
# copy noprefab and shared aar | ||
cp ${AAR_NO_PREFAB_PATH} ${RELEASE_PATH} | ||
cp ${AAR_SHARED_PATH} ${RELEASE_PATH} |