打包apk名字修改

This commit is contained in:
huangjian
2021-12-20 11:10:25 +08:00
parent 0e14197bd6
commit 0c9862c996
2 changed files with 15 additions and 8 deletions

View File

@@ -6,6 +6,8 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.huawei.agconnect'
apply plugin: 'com.tencent.vasdolly'
def onlyArm64 = Boolean.parseBoolean(only_arm64)
android {
compileSdkVersion 30
@@ -21,7 +23,11 @@ android {
ndk {
//设置支持的SO库架构
abiFilters "armeabi-v7a", "arm64-v8a"
if (onlyArm64) {
abiFilters "arm64-v8a"
} else {
abiFilters "armeabi-v7a", "arm64-v8a"
}
}
flavorDimensions 'default'
@@ -286,11 +292,12 @@ repositories {
}
}
channel{
channel {
//多渠道包的输出目录默认为new File(project.buildDir,"channel")
outputDir = new File(project.buildDir,"channelapk")
outputDir = new File(project.buildDir, "channelapk")
//多渠道包的命名规则,默认为:${appName}-${versionName}-${versionCode}-${flavorName}-${buildType}-${buildTime}
apkNameFormat ='${appName}-${buildType}-${flavorName}-${versionName}-${buildTime}'
def only64 = onlyArm64 ? "-only64" : ""
apkNameFormat = 'big_goose-${buildType}only64-${flavorName}-v${versionName}-${buildTime}'.replace("only64", only64)
//快速模式生成渠道包时不进行校验速度可以提升10倍以上默认为false
fastMode = false
//buildTime的时间格式默认格式yyyyMMdd-HHmmss

View File

@@ -15,12 +15,12 @@ org.gradle.daemon=true
android.injected.testOnly=false
android.useAndroidX=true
android.enableJetifier=true
version_name=4.0.0
version_code=400
with_flutter_aar=true
with_jenkins=false
channel=official
only_arm64=false
channel_file=channel.txt
version_name=4.0.0
version_code=400