You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
MpRemote/app/build.gradle

181 lines
6.8 KiB
Groovy

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

plugins {
id 'com.android.application'
}
def AppMajorVersion = 1
def AppMinorVersion = 0
def AppBuildNumber = 17
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
android {
namespace "com.xypower.mpremote"
compileSdk 33
defaultConfig {
applicationId "com.xypower.mpremote"
minSdk 24
targetSdk 28
versionCode AppVersionCode
versionName AppVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags "-std=c++11 -frtti -fexceptions"
arguments "-DENABLE_API=on", "-DENABLE_API_STATIC_LIB=on", "-DENABLE_TESTS=off", "-DENABLE_HLS=on", "-DENABLE_PLAYER=off", "-DENABLE_SERVER_LIB=on"
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.18.1'
}
}
android.applicationVariants.all { variant ->
variant.outputs.all { output ->
if (outputFileName.endsWith('.apk')) {
def buildTypeFlag = "dbg"
if(variant.buildType.name.equals('release')) {
buildTypeFlag = "rel"
}
def fileName = "mprmt_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}.apk"
outputFileName = fileName
}
}
}
buildFeatures {
viewBinding true
}
packagingOptions {
exclude 'META-INF/LICENSE-notice.md'
exclude 'META-INF/LICENSE.md'
}
ndkVersion '25.2.9519653'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
// implementation 'io.vov.vitamio:vitamio:4.2.2'
// implementation 'com.google.android.exoplayer:exoplayer:2.14.0' // 添加 ExoPlayer 库
// // ExoPlayer 核心库
// implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.19.1'
// implementation 'com.google.android.exoplayer:exoplayer-dash:2.19.1'
// implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.19.1'
//
//// RTSP 官方扩展
// implementation 'com.google.android.exoplayer:exoplayer-rtsp:2.19.1'
//
//// RTMP 第三方扩展 (基于ExoPlayer 2.19.1)
// implementation 'com.github.Piasy:ExoPlayerRtmp:v2.19.1.0'
//
//// H.265(HEVC) 和 AV1 解码器支持
// implementation 'com.google.android.exoplayer:exoplayer-codec-av1:2.19.1'
// implementation "androidx.media3:media3-exoplayer:1.1.1"
// implementation "androidx.media3:media3-exoplayer-dash:1.1.1"
// implementation "androidx.media3:media3-ui:1.1.1"
// implementation "androidx.media3:media3-datasource-rtmp:1.1.1"
// implementation ("androidx.media3:media3-exoplayer-rtsp:1.1.1"){
// exclude group: 'com.google.android.exoplayer', module: 'exoplayer-core'
// }
// implementation 'androidx.media3:media3-decoder:1.1.1'
// Media3 统一版本
// implementation "androidx.media3:media3-exoplayer:1.7.1"
// implementation "androidx.media3:media3-exoplayer-rtsp:1.7.1"
// implementation "androidx.media3:media3-ui:1.7.1"
// implementation "androidx.media3:media3-datasource-rtmp:1.7.1"
// // 排除所有旧版 ExoPlayer关键
// configurations.all {
// exclude group: 'com.google.android.exoplayer', module: 'exoplayer-core'
// exclude group: 'com.google.android.exoplayer', module: 'exoplayer-dash'
// exclude group: 'com.google.android.exoplayer', module: 'exoplayer-ui'
// }
// implementation 'androidx.media3:media3-decoder-extension-ffmpeg:1.1.0'
// implementation 'androidx.media3:media3-decoder-extension-ffmpeg-full:1.1.1'
// 完整版(包含所有 FFmpeg 解码器,推荐用于 H.265/HEVC
// implementation 'androidx.media3:media3-decoder-extension-ffmpeg-full:1.1.1'
// // 使用 BOM 管理 Media3 版本
// implementation platform('androidx.media3:media3-bom:1.1.1')
//
// // 引入具体依赖(无需指定版本号)
// implementation 'androidx.media3:media3-exoplayer'
// implementation 'androidx.media3:media3-exoplayer-dash'
// implementation 'androidx.media3:media3-ui'
// implementation 'androidx.media3:media3-datasource-rtmp'
// implementation 'androidx.media3:media3-exoplayer-rtsp'
// implementation 'androidx.media3:media3-decoder'
// implementation 'androidx.media3:media3-decoder-extension-ffmpeg-full'
////// IJKPlayer相关库
// implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
// implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8' // ARMv7a 架构
// implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8' // ARM64 架构
// implementation 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8' // x86 架构
//
// implementation 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
// implementation 'com.google.android.exoplayer:exoplayer-core:2.18.1'
// implementation 'com.google.android.exoplayer:exoplayer-hls:2.18.1' // HLS 支持
// implementation 'com.google.android.exoplayer:exoplayer-dash:2.18.1' // DASH 支持
// RTSP 支持需额外添加扩展
// implementation 'com.googlecode.rtsp-client:rtsp-client:2.1.0'
// implementation 'com.github.videolan:vlc-android-sdk:3.3.10'
// implementation 'com.github.videolan:libvlc-android:3.4.11'
// 使用更具体的ABI过滤减少APK大小
// implementation 'com.github.videolan:libvlc-android:3.4.11:arm64-v8a'
// 或者包含所有ABI
// implementation 'com.github.videolan:libvlc-android:3.4.11:all'
// implementation 'org.videolan.android:libvlc-all:4.0.0-eap9'
implementation 'org.videolan.android:libvlc-all:3.6.0'
implementation 'com.github.bumptech.glide:glide:4.16.0'
// https://mvnrepository.com/artifact/dev.mobile/dadb
implementation 'dev.mobile:dadb:1.2.8'
implementation files('libs/common-release.aar')
// implementation project(path: ':dadb')
// implementation 'org.videolan.android:libvlc-all:3.4.5'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}