208 lines
7.3 KiB
Groovy
208 lines
7.3 KiB
Groovy
apply plugin: 'com.android.application'
|
||
|
||
static def appName() {
|
||
return "HomeVideoPlayer"
|
||
}
|
||
|
||
static def releaseTime() {
|
||
return new Date().format("yyyyMMdd_HHmmss", TimeZone.getDefault())
|
||
}
|
||
|
||
android {
|
||
compileSdkVersion 28
|
||
buildToolsVersion "30.0.3"
|
||
|
||
defaultConfig {
|
||
applicationId "com.uiui.videoplayer"
|
||
minSdkVersion 24
|
||
targetSdkVersion 28
|
||
versionCode 118
|
||
versionName "1.1.7"
|
||
|
||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||
|
||
multiDexEnabled true
|
||
ndk {
|
||
// add support lib
|
||
abiFilters /*"armeabi",*/ "armeabi-v7a", "arm64-v8a", "x86"
|
||
/*, "x86_64", "mips", "mips64"*/
|
||
}
|
||
|
||
lintOptions {
|
||
checkReleaseBuilds false
|
||
abortOnError false
|
||
}
|
||
|
||
viewBinding{
|
||
enabled = true
|
||
}
|
||
|
||
dataBinding {
|
||
enabled true
|
||
}
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility JavaVersion.VERSION_1_8
|
||
targetCompatibility JavaVersion.VERSION_1_8
|
||
}
|
||
|
||
//签名
|
||
signingConfigs {
|
||
tuixin {// 签名文件
|
||
storeFile file("keystore/tuixin.jks")
|
||
storePassword "123456"
|
||
keyAlias "universal"
|
||
keyPassword "123456"
|
||
v1SigningEnabled true
|
||
v2SigningEnabled true
|
||
}
|
||
}
|
||
|
||
//多版本
|
||
productFlavors {
|
||
uiui {
|
||
flavorDimensions "default"
|
||
}
|
||
|
||
uiuios {
|
||
flavorDimensions "default"
|
||
}
|
||
}
|
||
|
||
sourceSets {
|
||
uiui {
|
||
java {
|
||
srcDirs += ['uiui/java'] // 5 添加
|
||
}
|
||
aidl.srcDirs 'src/uiui/aidl'
|
||
}
|
||
|
||
uiuios {
|
||
java {
|
||
srcDirs += ['uiuios/java'] // 5 添加
|
||
}
|
||
aidl.srcDirs 'src/uiuios/aidl'
|
||
}
|
||
}
|
||
|
||
buildTypes {
|
||
debug {
|
||
buildConfigField "String", "platform", '"UMTK11"'
|
||
versionNameSuffix "_debug"
|
||
//Zipalign优化
|
||
zipAlignEnabled true
|
||
minifyEnabled false
|
||
signingConfig signingConfigs.tuixin
|
||
applicationVariants.all { variant ->
|
||
variant.outputs.each { output ->
|
||
if (outputFile != null) {
|
||
def fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType.name}.apk"
|
||
output.outputFileName = fileName
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
release {
|
||
buildConfigField "String", "platform", '"UMTK11"'
|
||
//Zipalign优化
|
||
zipAlignEnabled true
|
||
//混淆
|
||
minifyEnabled false
|
||
//前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件
|
||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||
//签名
|
||
signingConfig signingConfigs.tuixin
|
||
// 将release版本的包名重命名,加上版本及日期
|
||
applicationVariants.all { variant ->
|
||
variant.outputs.each { output ->
|
||
def outputFile = ""
|
||
if (outputFile != null) {
|
||
def fileName = "${appName()}_${variant.versionCode}_V${variant.versionName}_${releaseTime()}_${buildType.name}.apk"
|
||
output.outputFileName = new File(outputFile, fileName)
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||
|
||
implementation project(path: ':FlycoTabLayoutZ_Lib')
|
||
implementation project(path: ':JZVideo')
|
||
implementation project(path: ':niceimageview')
|
||
|
||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||
implementation "androidx.viewpager2:viewpager2:1.0.0"
|
||
|
||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||
testImplementation 'junit:junit:4.12'
|
||
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
|
||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
|
||
|
||
//okhttp
|
||
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
|
||
//Retrofit
|
||
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||
implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
|
||
//RxJava
|
||
implementation 'io.reactivex.rxjava3:rxjava:3.0.0'
|
||
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
|
||
//生命周期管理
|
||
implementation 'com.trello.rxlifecycle4:rxlifecycle:4.0.2'
|
||
implementation 'com.trello.rxlifecycle4:rxlifecycle-android:4.0.2'
|
||
implementation 'com.trello.rxlifecycle4:rxlifecycle-components:4.0.2'
|
||
implementation 'com.trello.rxlifecycle4:rxlifecycle-components-preference:4.0.2'
|
||
implementation 'com.trello.rxlifecycle4:rxlifecycle-android-lifecycle:4.0.2'
|
||
//Google
|
||
implementation 'com.google.code.gson:gson:2.10.1'
|
||
implementation 'com.google.zxing:core:3.5.0'
|
||
//图片加载框架
|
||
implementation 'com.github.bumptech.glide:glide:4.13.2'
|
||
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.2'
|
||
//磁盘缓存
|
||
implementation 'com.jakewharton:disklrucache:2.0.2'
|
||
//Aria
|
||
implementation 'com.arialyy.aria:core:3.8.15'
|
||
annotationProcessor 'com.arialyy.aria:compiler:3.8.15'
|
||
//MMKV
|
||
implementation 'com.tencent:mmkv-static:1.2.13'
|
||
//工具类
|
||
implementation 'com.blankj:utilcodex:1.31.0'
|
||
//沉浸状态栏
|
||
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
|
||
// implementation 'cn.jzvd:jiaozivideoplayer:7.6.0'
|
||
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-core:1.0.15'
|
||
implementation 'com.github.wseemann:FFmpegMediaMetadataRetriever-native:1.0.15'
|
||
implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.4'
|
||
implementation 'com.github.ctiao:DanmakuFlameMaster:0.9.25'
|
||
implementation 'com.github.ctiao:ndkbitmap-armv7a:0.9.21'
|
||
implementation 'com.danikula:videocache:2.7.0'
|
||
implementation 'com.aliyun.sdk.android:AliyunPlayer:4.5.0-full'
|
||
implementation 'com.alivc.conan:AlivcConan:0.9.5'
|
||
// implementation 'com.scwang.smart:menu_refresh-layout-kernel:2.0.1'
|
||
// implementation 'com.scwang.smart:menu_refresh-header-material:2.0.1'
|
||
// implementation 'com.scwang.smart:menu_refresh-footer-classics:2.0.1'
|
||
implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
|
||
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.4'
|
||
|
||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
|
||
// implementation 'com.github.SheHuan:NiceImageView:1.0.5'
|
||
//指示器
|
||
implementation 'com.github.hackware1993:MagicIndicator:1.7.0' // for androidx
|
||
implementation 'com.github.Othershe:CombineBitmap:1.0.5'
|
||
// implementation 'com.github.wuao:FlycoTabLayout2:Tag1.1.3'
|
||
//autosize会改变第三方view的大小
|
||
//https://github.com/JessYanCoding/AndroidAutoSize
|
||
//implementation 'me.jessyan:autosize:1.2.1'
|
||
// 权限请求框架:https://github.com/getActivity/XXPermissions
|
||
implementation 'com.github.getActivity:XXPermissions:20.0'
|
||
}
|