rename android library folder name
This commit is contained in:
parent
8596b8c6bf
commit
1abae81589
12
android.sh
12
android.sh
|
@ -34,14 +34,14 @@ BUILD_TYPE_ID=""
|
|||
BUILD_VERSION=$(git describe --tags --always 2>>"${BASEDIR}"/build.log)
|
||||
|
||||
# PROCESS LTS BUILD OPTION FIRST AND SET BUILD TYPE: MAIN OR LTS
|
||||
rm -f "${BASEDIR}"/android/app/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
cp "${BASEDIR}"/tools/release/android/build.gradle "${BASEDIR}"/android/app/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
cp "${BASEDIR}"/tools/release/android/build.gradle "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
for argument in "$@"; do
|
||||
if [[ "$argument" == "-l" ]] || [[ "$argument" == "--lts" ]]; then
|
||||
enable_lts_build
|
||||
BUILD_TYPE_ID+="LTS "
|
||||
rm -f "${BASEDIR}"/android/app/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
cp "${BASEDIR}"/tools/release/android/build.lts.gradle "${BASEDIR}"/android/app/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
cp "${BASEDIR}"/tools/release/android/build.lts.gradle "${BASEDIR}"/android/ffmpeg-kit-android-lib/build.gradle 1>>"${BASEDIR}"/build.log 2>&1
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -273,7 +273,7 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then
|
|||
echo -e -n "\n\nCreating Android archive under prebuilt: "
|
||||
|
||||
# BUILD ANDROID ARCHIVE
|
||||
./gradlew app:clean app:assembleRelease app:testReleaseUnitTest 1>>"${BASEDIR}"/build.log 2>&1
|
||||
./gradlew ffmpeg-kit-android-lib:clean ffmpeg-kit-android-lib:assembleRelease ffmpeg-kit-android-lib:testReleaseUnitTest 1>>"${BASEDIR}"/build.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "failed\n"
|
||||
exit 1
|
||||
|
@ -283,7 +283,7 @@ if [[ -n ${ANDROID_ARCHITECTURES} ]]; then
|
|||
FFMPEG_KIT_AAR="${BASEDIR}/prebuilt/$(get_aar_directory)/ffmpeg-kit"
|
||||
rm -rf "${FFMPEG_KIT_AAR}" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
mkdir -p "${FFMPEG_KIT_AAR}" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
cp "${BASEDIR}"/android/app/build/outputs/aar/ffmpeg-kit-release.aar "${FFMPEG_KIT_AAR}"/ffmpeg-kit.aar 1>>"${BASEDIR}"/build.log 2>&1
|
||||
cp "${BASEDIR}"/android/ffmpeg-kit-android-lib/build/outputs/aar/ffmpeg-kit-release.aar "${FFMPEG_KIT_AAR}"/ffmpeg-kit.aar 1>>"${BASEDIR}"/build.log 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "failed\n"
|
||||
exit 1
|
||||
|
|
2
android/.gitignore
vendored
2
android/.gitignore
vendored
|
@ -4,4 +4,4 @@
|
|||
/.gradle/
|
||||
/libs/
|
||||
/obj/
|
||||
/app/build/
|
||||
/ffmpeg-kit-android-lib/build/
|
||||
|
|
|
@ -4,7 +4,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
||||
classpath 'com.android.tools.build:gradle:4.1.2'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ FFMPEG_INCLUDES := $(MY_LOCAL_PATH)/../../prebuilt/$(MY_BUILD_DIR)/ffmpeg/includ
|
|||
|
||||
MY_ARM_MODE := arm
|
||||
MY_ARM_NEON := false
|
||||
LOCAL_PATH := $(MY_LOCAL_PATH)/../app/src/main/cpp
|
||||
LOCAL_PATH := $(MY_LOCAL_PATH)/../ffmpeg-kit-android-lib/src/main/cpp
|
||||
|
||||
# DEFINE ARCH FLAGS
|
||||
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
|
||||
|
@ -76,7 +76,7 @@ MY_BUILD_GENERIC_FFMPEG_KIT := true
|
|||
|
||||
ifeq ($(MY_ARMV7_NEON), true)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_PATH := $(MY_LOCAL_PATH)/../app/src/main/cpp
|
||||
LOCAL_PATH := $(MY_LOCAL_PATH)/../ffmpeg-kit-android-lib/src/main/cpp
|
||||
LOCAL_ARM_MODE := $(MY_ARM_MODE)
|
||||
LOCAL_MODULE := ffmpegkit_armv7a_neon
|
||||
LOCAL_SRC_FILES := $(MY_SRC_FILES)
|
||||
|
@ -98,7 +98,7 @@ endif
|
|||
|
||||
ifeq ($(MY_BUILD_GENERIC_FFMPEG_KIT), true)
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_PATH := $(MY_LOCAL_PATH)/../app/src/main/cpp
|
||||
LOCAL_PATH := $(MY_LOCAL_PATH)/../ffmpeg-kit-android-lib/src/main/cpp
|
||||
LOCAL_ARM_MODE := $(MY_ARM_MODE)
|
||||
LOCAL_MODULE := ffmpegkit
|
||||
LOCAL_SRC_FILES := $(MY_SRC_FILES)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
include ':app'
|
||||
include ':ffmpeg-kit-android-lib'
|
||||
include ':ffmpeg-kit'
|
||||
project(':ffmpeg-kit').projectDir = new File('..')
|
||||
rootProject.name = 'ffmpeg-kit-android'
|
||||
|
|
|
@ -310,7 +310,7 @@ export LDFLAGS+=" -L${ANDROID_NDK_ROOT}/platforms/android-${API}/arch-${TOOLCHAI
|
|||
|
||||
# LINKING WITH ANDROID LTS SUPPORT LIBRARY IS NECESSARY FOR API < 18
|
||||
if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]] && [[ ${API} -lt 18 ]]; then
|
||||
export LDFLAGS+=" -Wl,--whole-archive ${BASEDIR}/android/app/src/main/cpp/libandroidltssupport.a -Wl,--no-whole-archive"
|
||||
export LDFLAGS+=" -Wl,--whole-archive ${BASEDIR}/android/ffmpeg-kit-android-lib/src/main/cpp/libandroidltssupport.a -Wl,--no-whole-archive"
|
||||
fi
|
||||
|
||||
# ALWAYS BUILD SHARED LIBRARIES
|
||||
|
|
|
@ -11,7 +11,7 @@ fi
|
|||
# UPDATE BUILD FLAGS
|
||||
# LINKING WITH ANDROID LTS SUPPORT LIBRARY IS NECESSARY FOR API < 18
|
||||
if [[ -n ${FFMPEG_KIT_LTS_BUILD} ]] && [[ ${API} -lt 18 ]]; then
|
||||
LTS_SUPPORT_LIBS=" -Wl,--no-whole-archive ${BASEDIR}/android/app/src/main/cpp/libandroidltssupport.a -Wl,--no-whole-archive"
|
||||
LTS_SUPPORT_LIBS=" -Wl,--no-whole-archive ${BASEDIR}/android/ffmpeg-kit-android-lib/src/main/cpp/libandroidltssupport.a -Wl,--no-whole-archive"
|
||||
else
|
||||
LTS_SUPPORT_LIBS=""
|
||||
fi
|
||||
|
|
|
@ -15,7 +15,7 @@ enable_default_android_libraries() {
|
|||
}
|
||||
|
||||
get_ffmpeg_kit_version() {
|
||||
local FFMPEG_KIT_VERSION=$(grep '#define FFMPEG_KIT_VERSION' "${BASEDIR}"/android/app/src/main/cpp/ffmpegkit.h | grep -Eo '\".*\"' | sed -e 's/\"//g')
|
||||
local FFMPEG_KIT_VERSION=$(grep '#define FFMPEG_KIT_VERSION' "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/ffmpegkit.h | grep -Eo '\".*\"' | sed -e 's/\"//g')
|
||||
|
||||
echo "${FFMPEG_KIT_VERSION}"
|
||||
}
|
||||
|
@ -968,8 +968,8 @@ set_toolchain_paths() {
|
|||
build_android_lts_support() {
|
||||
|
||||
# CLEAN OLD BUILD
|
||||
rm -f "${BASEDIR}"/android/app/src/main/cpp/android_lts_support.o 1>>"${BASEDIR}"/build.log 2>&1
|
||||
rm -f "${BASEDIR}"/android/app/src/main/cpp/android_lts_support.a 1>>"${BASEDIR}"/build.log 2>&1
|
||||
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o 1>>"${BASEDIR}"/build.log 2>&1
|
||||
rm -f "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.a 1>>"${BASEDIR}"/build.log 2>&1
|
||||
|
||||
echo -e "INFO: Building android-lts-support objects for ${ARCH}\n" 1>>"${BASEDIR}"/build.log 2>&1
|
||||
|
||||
|
@ -983,6 +983,6 @@ build_android_lts_support() {
|
|||
LDFLAGS=$(get_ldflags ${LIB_NAME})
|
||||
|
||||
# BUILD
|
||||
"$(get_clang_host)"-clang ${CFLAGS} -Wno-unused-command-line-argument -c "${BASEDIR}"/android/app/src/main/cpp/android_lts_support.c -o "${BASEDIR}"/android/app/src/main/cpp/android_lts_support.o ${LDFLAGS} 1>>"${BASEDIR}"/build.log 2>&1
|
||||
"${HOST}"-ar rcs "${BASEDIR}"/android/app/src/main/cpp/libandroidltssupport.a "${BASEDIR}"/android/app/src/main/cpp/android_lts_support.o 1>>"${BASEDIR}"/build.log 2>&1
|
||||
"$(get_clang_host)"-clang ${CFLAGS} -Wno-unused-command-line-argument -c "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.c -o "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o ${LDFLAGS} 1>>"${BASEDIR}"/build.log 2>&1
|
||||
"${HOST}"-ar rcs "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/libandroidltssupport.a "${BASEDIR}"/android/ffmpeg-kit-android-lib/src/main/cpp/android_lts_support.o 1>>"${BASEDIR}"/build.log 2>&1
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ rm -rf ../.tmp
|
|||
rm -f ../build.log
|
||||
|
||||
rm -rf ../android/build
|
||||
rm -rf ../android/app/build
|
||||
rm -rf ../android/ffmpeg-kit-android-lib/build
|
||||
rm -rf ../android/obj
|
||||
rm -rf ../android/libs
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user