140 lines
4.5 KiB
Groovy
140 lines
4.5 KiB
Groovy
plugins {
|
||
id 'com.android.application'
|
||
id 'org.jetbrains.kotlin.android'
|
||
}
|
||
|
||
android {
|
||
namespace 'com.pukka.mediaapp'
|
||
compileSdk app_android.compileSdkVersion
|
||
|
||
defaultConfig {
|
||
applicationId "com.pukka.mediaapp"
|
||
minSdk app_android.minSdkVersion
|
||
targetSdk app_android.targetSdkVersion
|
||
versionCode 1
|
||
versionName "1.0"
|
||
multiDexEnabled true
|
||
|
||
ndk {
|
||
abiFilters "armeabi-v7a", "arm64-v8a"
|
||
}
|
||
}
|
||
|
||
signingConfigs {
|
||
release {
|
||
storeFile file('../key/jiecheng.jks')
|
||
storePassword 'abc@123'
|
||
keyAlias 'key0'
|
||
keyPassword 'abc@123'
|
||
}
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
minifyEnabled false
|
||
signingConfig signingConfigs.release
|
||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||
}
|
||
debug {
|
||
signingConfig signingConfigs.release
|
||
}
|
||
}
|
||
|
||
buildFeatures {
|
||
viewBinding true
|
||
buildConfig true
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_17
|
||
targetCompatibility JavaVersion.VERSION_17
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = '17'
|
||
}
|
||
|
||
sourceSets {
|
||
main {
|
||
jniLibs.srcDirs = ['libs']
|
||
}
|
||
}
|
||
|
||
packagingOptions {
|
||
// 确保 .so 文件不解压,避免对齐问题
|
||
jniLibs {
|
||
// useLegacyPackaging=true:.so 安装时解压到文件系统,由系统处理页对齐
|
||
// 绕过 Android 15 的 16KB 对齐要求(Fresco 的 .so 为 4KB 对齐)
|
||
useLegacyPackaging = true
|
||
}
|
||
resources {
|
||
excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/license.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt', 'META-INF/notice.txt', 'META-INF/ASL2.0', 'META-INF/*.kotlin_module']
|
||
}
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
// 基础依赖(来自根 config.gradle,与 libcore/libdata 保持一致)
|
||
app_base_dependencies.each { k, v -> implementation v }
|
||
|
||
// 模块依赖(复用 jiecheng 基础设施)
|
||
implementation project(':libcore')
|
||
implementation project(':libdata')
|
||
implementation project(':mediaplayertv')
|
||
|
||
// Kotlin & AndroidX
|
||
implementation 'androidx.core:core-ktx:1.12.0'
|
||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||
implementation 'com.google.android.material:material:1.11.0'
|
||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||
implementation 'androidx.recyclerview:recyclerview:1.3.2'
|
||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
|
||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
|
||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
|
||
implementation 'androidx.activity:activity-ktx:1.8.2'
|
||
implementation 'androidx.cardview:cardview:1.0.0'
|
||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||
|
||
// multidex(Android 4.4 兼容)
|
||
implementation 'androidx.multidex:multidex:2.0.1'
|
||
|
||
// Retrofit(okhttp 由 libcore 传递 3.12,兼容 Android 4.4)
|
||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||
|
||
// Gson
|
||
implementation 'com.google.code.gson:gson:2.10.1'
|
||
|
||
// Glide(图片加载)
|
||
implementation 'com.github.bumptech.glide:glide:4.16.0'
|
||
|
||
// Coroutines
|
||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
||
|
||
// JetsenxSdk + NewTVSDK(使用 api-future 生产域名)
|
||
implementation files('libs/JetsenxSdk-api-future-release-v1.23.aar')
|
||
implementation files('libs/NewTVSDK-v4.0.3-app-lite.jar')
|
||
|
||
// ExoPlayer
|
||
implementation 'com.google.android.exoplayer:exoplayer:2.19.1'
|
||
|
||
// commons-codec(SDK 依赖)
|
||
implementation 'commons-codec:commons-codec:1.15'
|
||
|
||
// 火山引擎 TLS 日志库(JetsenxSdk 内部依赖)
|
||
implementation('io.github.volcengine-tls:tls-android-producer:2.0.2-api16') {
|
||
exclude group: 'com.google.guava', module: 'guava'
|
||
exclude group: 'com.google.guava', module: 'guava-jdk5'
|
||
exclude group: 'com.google.guava', module: 'guava-android'
|
||
exclude group: 'com.google.guava', module: 'listenablefuture'
|
||
}
|
||
implementation 'net.jpountz.lz4:lz4:1.3.0'
|
||
implementation 'org.slf4j:slf4j-android:1.7.36'
|
||
|
||
// ZXing 二维码生成
|
||
implementation 'com.google.zxing:core:3.5.3'
|
||
|
||
// OAID(设备识别)
|
||
implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.1.3'
|
||
}
|