|
|
|
@ -1,5 +1,13 @@
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
|
|
// 10,00,000 major-minor-build
|
|
|
|
|
def AppMajorVersion = 1
|
|
|
|
|
def AppMinorVersion = 0
|
|
|
|
|
def AppBuildNumber = 1
|
|
|
|
|
|
|
|
|
|
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
|
|
|
|
|
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
compileSdkVersion 26
|
|
|
|
|
|
|
|
|
@ -7,8 +15,8 @@ android {
|
|
|
|
|
applicationId "com.xypower.mplive"
|
|
|
|
|
minSdkVersion 21
|
|
|
|
|
targetSdkVersion 26
|
|
|
|
|
versionCode 1
|
|
|
|
|
versionName "1.0"
|
|
|
|
|
versionCode AppVersionCode
|
|
|
|
|
versionName AppVersionName
|
|
|
|
|
ndk {
|
|
|
|
|
abiFilters "armeabi-v7a", "arm64-v8a"
|
|
|
|
|
}
|
|
|
|
@ -30,6 +38,22 @@ android {
|
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|