diff --git a/app/build.gradle b/app/build.gradle index e291cd56c..ae81a8245 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,17 +1,25 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-parcelize' +plugins { + id 'com.android.application' + id 'kotlin-android' + id 'kotlin-parcelize' +} android { compileSdk 35 + ndkVersion '29.0.14206865' buildToolsVersion = '35.0.0' defaultConfig { + def abiFilter = project.findProperty("abiFilter") minSdkVersion 24 targetSdk 35 versionCode 17 versionName '4.9.8' + if (abiFilter) { + def abiCodeMap = ["arm64-v8a": 1, "armeabi-v7a": 2] + versionCode = versionCode * 10 + abiCodeMap[abiFilter] + } testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' javaCompileOptions { @@ -89,6 +97,8 @@ android { } dependencies { + def media3_version = '1.9.2' + implementation files('../libs/lib-decoder-ffmpeg-release.aar') // AndroidX @@ -110,12 +120,12 @@ dependencies { implementation 'com.github.bumptech.glide:annotations:4.16.0' // Media3 - implementation 'androidx.media3:media3-session:1.8.0' - implementation 'androidx.media3:media3-common:1.8.0' - implementation 'androidx.media3:media3-exoplayer:1.8.0' - implementation 'androidx.media3:media3-ui:1.8.0' - implementation 'androidx.media3:media3-exoplayer-hls:1.8.0' - tempusImplementation 'androidx.media3:media3-cast:1.8.0' + implementation "androidx.media3:media3-session:$media3_version" + implementation "androidx.media3:media3-common:$media3_version" + implementation "androidx.media3:media3-exoplayer:$media3_version" + implementation "androidx.media3:media3-ui:$media3_version" + implementation "androidx.media3:media3-exoplayer-hls:$media3_version" + tempusImplementation "androidx.media3:media3-cast:$media3_version" annotationProcessor 'com.github.bumptech.glide:compiler:4.16.0' @@ -126,8 +136,3 @@ dependencies { implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.14' implementation 'com.squareup.retrofit2:converter-gson:2.11.0' } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(17) - } -} diff --git a/libs/README.md b/libs/README.md new file mode 100644 index 000000000..71f193a05 --- /dev/null +++ b/libs/README.md @@ -0,0 +1,45 @@ +The binary ffmpeg extension was built with following decoders: + +``` +ENABLED_DECODERS=(alac) +``` + +Complete [build instructions](https://github.com/androidx/media/blob/release/libraries/decoder_ffmpeg/README.md). + +To assemble ``.aar``: + +Full instructions if you want to update current lib-decoder-ffmpeg-release.aar +These are for linux, if you use another platform see complete build instructions above. + +```bash +FFMPEG_MODULE_PATH="$(pwd)/media/libraries/decoder_ffmpeg/src/main" +ANDROID_SDK_ROOT=$HOME/Android/Sdk +NDK_PATH="$ANDROID_SDK_ROOT/ndk/27.0.12077973" +HOST_PLATFORM="linux-x86_64" +ANDROID_ABI=24 +ENABLED_DECODERS=(alac) + +git clone git://source.ffmpeg.org/ffmpeg && \ +cd ffmpeg && \ +git checkout release/6.0 && \ +FFMPEG_PATH="$(pwd)" +cd .. + +git clone --depth 1 git@github.com:androidx/media.git + +cd "${FFMPEG_MODULE_PATH}/jni" && \ +ln -s "$FFMPEG_PATH" ffmpeg + +cd ../../../../../../ + +cd "${FFMPEG_MODULE_PATH}/jni" && \ +./build_ffmpeg.sh \ + "${FFMPEG_MODULE_PATH}" "${NDK_PATH}" "${HOST_PLATFORM}" "${ANDROID_ABI}" "${ENABLED_DECODERS[@]}" + +cd ../../../../../../ + +cd media +./gradlew :media-lib-decoder-ffmpeg:bundleReleaseAar +cd .. +cp media/libraries/decoder_ffmpeg/buildout/outputs/aar/lib-decoder-ffmpeg-release.aar libs/ +``` diff --git a/libs/lib-decoder-ffmpeg-release.aar b/libs/lib-decoder-ffmpeg-release.aar index d91160eb4..dff241a0f 100644 Binary files a/libs/lib-decoder-ffmpeg-release.aar and b/libs/lib-decoder-ffmpeg-release.aar differ diff --git a/settings.gradle b/settings.gradle index 1cd079ae5..a7c6dd418 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,2 @@ -plugins { - id 'org.gradle.toolchains.foojay-resolver-convention' version '0.8.0' -} include ':app' rootProject.name = "Tempo" \ No newline at end of file