|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
// 10,00,000 major-minor-build
|
|
|
|
def AppMajorVersion = 1
|
|
|
|
def AppMinorVersion = 0
|
|
|
|
def AppBuildNumber = 3
|
|
|
|
|
|
|
|
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
|
|
|
|
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion 33
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId "com.xypower.mplive"
|
|
|
|
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')
|
|
|
|
}
|