Android/XixunPlayer/app/build.gradle

63 lines
1.8 KiB
Groovy
Raw Normal View History

2023-11-09 08:37:59 +08:00
plugins {
id 'com.android.application'
}
android {
namespace 'com.xixun.xixunplayer'
2023-12-01 16:17:06 +08:00
compileSdk 34
2023-11-09 08:37:59 +08:00
defaultConfig {
applicationId "com.xixun.xixunplayer"
2024-01-24 20:17:59 +08:00
minSdk 24
2023-12-01 16:17:06 +08:00
targetSdk 34
2023-11-09 08:37:59 +08:00
versionCode 1
2024-02-18 15:15:24 +08:00
versionName "1.0.23-sche"
2023-11-09 08:37:59 +08:00
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
aidl true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
2023-12-11 15:17:48 +08:00
implementation 'androidx.media3:media3-exoplayer:1.2.0'
2023-12-01 16:17:06 +08:00
// implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
// implementation 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
2023-11-09 08:37:59 +08:00
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.25'
2023-12-01 16:17:06 +08:00
implementation files('libs/gnph.jar')
2024-01-24 20:17:59 +08:00
implementation files('libs/zip4j-2.10.0.jar')
2023-12-01 16:17:06 +08:00
implementation files('libs/xixun_card_settings_1.2.4.jar')
implementation files('libs/ijkplayer-java-0.8.8.aar')
2024-01-24 20:17:59 +08:00
implementation files('libs/ijkplayer-armv7a-0.8.8.aar')
2023-12-01 16:17:06 +08:00
implementation files('libs/ijkplayer-arm64-0.8.8.aar')
2024-01-24 20:17:59 +08:00
}
def getAppName() {
def stringsFile = android.sourceSets.main.res.sourceFiles.find { it.name.equals 'strings.xml' }
String s = new XmlParser().parse(stringsFile).string.find { it.@name.equals 'app_name' }.text();
return s.replaceAll("\"", "");
}
// 修改 Apk 名
android.applicationVariants.all { variant ->
variant.outputs.all {
def fileName = "${getAppName()}-${versionName}.apk"
outputFileName = fileName
}
}