diff --git a/app/build.gradle b/app/build.gradle index 59d97e0c1..239844dec 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 diff --git a/gradle.properties b/gradle.properties index b7f5ee1e9..f69a45d5b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 \ No newline at end of file