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.
MpLive/app/build.gradle

82 lines
2.4 KiB
Groovy

apply plugin: 'com.android.application'
// 10,00,000 major-minor-build
def AppMajorVersion = 1
def AppMinorVersion = 0
3 months ago
def AppBuildNumber = 3
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
android {
7 months ago
compileSdkVersion 33
defaultConfig {
applicationId "com.xypower.mplive"
3 months ago
minSdkVersion 28
targetSdkVersion 30
versionCode AppVersionCode
versionName AppVersionName
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"
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
}
// 签名配置
signingConfigs {
config {
keyAlias 'key0'
keyPassword '123456'
storeFile file('../keystore.jks')
storePassword '123456'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
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 abi = output.getFilter(com.android.build.OutputFile.ABI)
if (abi == null) abi = "all"
def fileName = "mplive_v${defaultConfig.versionName}_${buildTypeFlag}_${new Date(System.currentTimeMillis()).format("yyyyMMdd")}_${abi}.apk"
outputFileName = fileName
}
}
}
buildFeatures {
viewBinding true
}
}
dependencies {
implementation fileTree(dir: 'libx264.libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation files('libs/devapi.aar')
implementation project(path: ':library')
}