From ebacec7fe315e8d7343d17f21b1cbb1b0e77ae61 Mon Sep 17 00:00:00 2001 From: "Sue N. Cooper" Date: Mon, 11 Sep 2023 23:05:00 +0300 Subject: [PATCH 1/4] fix maven-publish plugin for agp 8 --- android/ffmpeg-kit-android-lib/build.gradle | 9 +++++++++ tools/android/build.gradle | 8 ++++++++ tools/android/build.lts.gradle | 8 ++++++++ 3 files changed, 25 insertions(+) diff --git a/android/ffmpeg-kit-android-lib/build.gradle b/android/ffmpeg-kit-android-lib/build.gradle index 0cdbe1d..f1dd6ed 100644 --- a/android/ffmpeg-kit-android-lib/build.gradle +++ b/android/ffmpeg-kit-android-lib/build.gradle @@ -49,6 +49,15 @@ android { } } +task javadoc(type: Javadoc) { + title = 'FFmpegKit' + destinationDir = file("${projectDir}/../../docs/android/javadoc") + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + source = android.sourceSets.main.java.srcDirs + configurations.implementation.setCanBeResolved(true) + classpath += configurations.implementation +} + dependencies { api 'com.arthenica:smart-exception-java:0.2.1' testImplementation "androidx.test.ext:junit:1.1.5" diff --git a/tools/android/build.gradle b/tools/android/build.gradle index 4205879..b583815 100644 --- a/tools/android/build.gradle +++ b/tools/android/build.gradle @@ -40,6 +40,14 @@ android { systemProperty 'enable.ffmpeg.kit.test.mode', 'true' } } + + + publishing { + singleVariant('release') { + withJavadocJar() + withSourcesJar() + } + } } task javadoc(type: Javadoc) { diff --git a/tools/android/build.lts.gradle b/tools/android/build.lts.gradle index 8e184d6..8deb4ea 100644 --- a/tools/android/build.lts.gradle +++ b/tools/android/build.lts.gradle @@ -40,6 +40,14 @@ android { systemProperty 'enable.ffmpeg.kit.test.mode', 'true' } } + + + publishing { + singleVariant('release') { + withJavadocJar() + withSourcesJar() + } + } } task javadoc(type: Javadoc) { From 8851938d6de64bf1735d963c159d67c1882bac55 Mon Sep 17 00:00:00 2001 From: "Sue N. Cooper" Date: Wed, 13 Sep 2023 00:29:46 +0300 Subject: [PATCH 2/4] make libilbc depend on c++, fixes #825 --- .../src/main/java/com/arthenica/ffmpegkit/NativeLoader.java | 2 +- scripts/function-android.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/ffmpeg-kit-android-lib/src/main/java/com/arthenica/ffmpegkit/NativeLoader.java b/android/ffmpeg-kit-android-lib/src/main/java/com/arthenica/ffmpegkit/NativeLoader.java index e9446fe..163fb55 100644 --- a/android/ffmpeg-kit-android-lib/src/main/java/com/arthenica/ffmpegkit/NativeLoader.java +++ b/android/ffmpeg-kit-android-lib/src/main/java/com/arthenica/ffmpegkit/NativeLoader.java @@ -36,7 +36,7 @@ public class NativeLoader { static final String[] FFMPEG_LIBRARIES = {"avutil", "swscale", "swresample", "avcodec", "avformat", "avfilter", "avdevice"}; - static final String[] LIBRARIES_LINKED_WITH_CXX = {"chromaprint", "openh264", "rubberband", "snappy", "srt", "tesseract", "x265", "zimg"}; + static final String[] LIBRARIES_LINKED_WITH_CXX = {"chromaprint", "openh264", "rubberband", "snappy", "srt", "tesseract", "x265", "zimg", "libilbc"}; static boolean isTestModeDisabled() { return (System.getProperty("enable.ffmpeg.kit.test.mode") == null); diff --git a/scripts/function-android.sh b/scripts/function-android.sh index 5e87b04..0e4b78a 100755 --- a/scripts/function-android.sh +++ b/scripts/function-android.sh @@ -70,7 +70,7 @@ build_application_mk() { local LTS_BUILD_FLAG="-DFFMPEG_KIT_LTS " fi - if [[ ${ENABLED_LIBRARIES[$LIBRARY_X265]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_TESSERACT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_OPENH264]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SNAPPY]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_RUBBERBAND]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_ZIMG]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SRT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_CHROMAPRINT]} -eq 1 ]] || [[ -n ${CUSTOM_LIBRARY_USES_CPP} ]]; then + if [[ ${ENABLED_LIBRARIES[$LIBRARY_X265]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_TESSERACT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_OPENH264]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SNAPPY]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_RUBBERBAND]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_ZIMG]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_SRT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_CHROMAPRINT]} -eq 1 ]] || [[ ${ENABLED_LIBRARIES[$LIBRARY_LIBILBC]} -eq 1 ]] || [[ -n ${CUSTOM_LIBRARY_USES_CPP} ]]; then local APP_STL="c++_shared" else local APP_STL="none" From 3129962b156264735ef72e2fd180e6e827665f28 Mon Sep 17 00:00:00 2001 From: "Sue N. Cooper" Date: Sun, 17 Sep 2023 22:56:33 +0300 Subject: [PATCH 3/4] fix github actions --- .github/workflows/android-build-scripts.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/android-build-scripts.yml b/.github/workflows/android-build-scripts.yml index 659e30f..e2dac25 100644 --- a/.github/workflows/android-build-scripts.yml +++ b/.github/workflows/android-build-scripts.yml @@ -41,6 +41,8 @@ jobs: with: distribution: 'adopt' java-version: '17' + - name: prerequisites + run: ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1" - name: set up android ndk run: | curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip @@ -70,6 +72,8 @@ jobs: with: distribution: 'adopt' java-version: '17' + - name: prerequisites + run: ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1" - name: set up android ndk run: | curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip @@ -157,6 +161,8 @@ jobs: with: distribution: 'adopt' java-version: '17' + - name: prerequisites + run: ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1" - name: set up android ndk run: | curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip From d6be56d7aec286eb3c292d6b23ff07a6b70d8693 Mon Sep 17 00:00:00 2001 From: "Sue N. Cooper" Date: Mon, 18 Sep 2023 00:22:43 +0300 Subject: [PATCH 4/4] update android readme --- android/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/README.md b/android/README.md index f678926..b252cb4 100644 --- a/android/README.md +++ b/android/README.md @@ -77,7 +77,7 @@ All libraries created by `android.sh` can be found under the `prebuilt` director } dependencies { - implementation 'com.arthenica:ffmpeg-kit-full:6.0-1' + implementation 'com.arthenica:ffmpeg-kit-full:6.0-2' } ```