From 0c9862c9966de342b24808b14c6289b2c2adea49 Mon Sep 17 00:00:00 2001 From: huangjian Date: Mon, 20 Dec 2021 11:10:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85apk=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 15 +++++++++++---- gradle.properties | 8 ++++---- 2 files changed, 15 insertions(+), 8 deletions(-) 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