From a7aee4af575ac3d192e9afefc1bbd550c5660876 Mon Sep 17 00:00:00 2001 From: lijia Date: Tue, 10 Oct 2023 17:28:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A5=BD=E8=BF=90=E6=B5=8B=E8=AF=95=E5=9B=BE?= =?UTF-8?q?=E6=A0=87=E8=87=AA=E5=8A=A8=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 65 +++++++++++++++++--------------- app/src/main/AndroidManifest.xml | 2 +- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5b8dfbb..15dedd4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -40,12 +40,13 @@ android { versionCode 60 versionName "3.3.0" flavorDimensions "CHANNEL_VALUE" + flavorDimensions "app_icon" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true - arguments = [moduleName :project.getName() ] + arguments = [moduleName: project.getName()] } } @@ -59,17 +60,17 @@ android { manifestPlaceholders = [ JPUSH_PKGNAME : applicationId, - JPUSH_APPKEY : "571d93ae5117da6dee848c92", //JPush 上注册的包名对应的 Appkey. + JPUSH_APPKEY : "571d93ae5117da6dee848c92", //JPush 上注册的包名对应的 Appkey. JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可. - MEIZU_APPKEY : "MZ-魅族的APPKEY", - MEIZU_APPID : "MZ-魅族的APPID", - XIAOMI_APPID : "MI-小米的APPID", + MEIZU_APPKEY : "MZ-魅族的APPKEY", + MEIZU_APPID : "MZ-魅族的APPID", + XIAOMI_APPID : "MI-小米的APPID", XIAOMI_APPKEY : "MI-小米的APPKEY", - OPPO_APPKEY : "OP-oppo的APPKEY", - OPPO_APPID : "OP-oppo的APPID", - OPPO_APPSECRET : "OP-oppo的APPSECRET", - VIVO_APPKEY : "vivo的APPKEY", - VIVO_APPID : "vivo的APPID" + OPPO_APPKEY : "OP-oppo的APPKEY", + OPPO_APPID : "OP-oppo的APPID", + OPPO_APPSECRET: "OP-oppo的APPSECRET", + VIVO_APPKEY : "vivo的APPKEY", + VIVO_APPID : "vivo的APPID" ] } // sourceSets { @@ -107,7 +108,7 @@ android { } } - repositories{ + repositories { flatDir { dirs 'libs' } @@ -115,7 +116,8 @@ android { productFlavors { qa { - manifestPlaceholders = [CHANNEL_VALUE: "好运司机测试"] + manifestPlaceholders = [CHANNEL_VALUE: "好运司机测试", + app_icon : "@drawable/diver_logo_text"] buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com\"") buildConfigField("String", "BASE_URL", "\"http://app.test.dahehuoyun.com/api/\"") buildConfigField "boolean", "isTest", "true" @@ -123,7 +125,8 @@ android { resValue "string", "appName", "司机测试" } product { - manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"] + manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机", + app_icon : "@drawable/diver_logo"] buildConfigField("String", "OPEN_AL_URL", "\"https://oapi.alct56.com\"") buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"") buildConfigField "boolean", "isTest", "false" @@ -132,22 +135,22 @@ android { } } - productFlavors.all { flavor -> - flavor.manifestPlaceholders = [CHANNEL_VALUE: name] - } +// productFlavors.all { flavor -> +// flavor.manifestPlaceholders = [CHANNEL_VALUE: name] +// } android.applicationVariants.all { variant -> variant.outputs.all { - def date = new Date().format("MMdd_HH-mm" , TimeZone.getTimeZone("GMT+08")) - def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value") + def date = new Date().format("MMdd_HH-mm", TimeZone.getTimeZone("GMT+08")) + def isText = variant.productFlavors[0].properties.get("buildConfigFields").getAt("isTest").properties.get("value") def appName = null - if (isText=="true") { + if (isText == "true") { appName = '大河好运司机测试_' - }else{ + } else { appName = '大河好运司机_' } - outputFileName =appName+"${variant.buildType.name}_${defaultConfig.versionName}_${date}.apk" + outputFileName = appName + "${variant.buildType.name}_${defaultConfig.versionName}_${date}.apk" } } lintOptions { @@ -171,10 +174,10 @@ dependencies { //角标 implementation 'com.haozhang.libary:android-slanted-textview:1.2' //刷新头部,底部样式 - implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1' - implementation 'com.scwang.smart:refresh-header-material:2.0.1' - implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载 - implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载 + implementation 'com.scwang.smart:refresh-layout-kernel:2.0.1' + implementation 'com.scwang.smart:refresh-header-material:2.0.1' + implementation 'com.scwang.smart:refresh-footer-ball:2.0.1' //球脉冲加载 + implementation 'com.scwang.smart:refresh-footer-classics:2.0.1' //经典加载 //更新版本 implementation 'com.github.jenly1314.AppUpdater:app-updater:1.2.0' implementation 'com.github.jenly1314.AppUpdater:app-dialog:1.2.0' @@ -189,7 +192,7 @@ dependencies { implementation 'com.alibaba:fastjson:1.2.61' implementation 'org.bouncycastle:bcprov-jdk15on:1.55' implementation 'org.apache.commons:commons-lang3:3.5' - implementation (name:'locationgd-androidx_2.1.0', ext:'aar')//交通厅 + implementation(name: 'locationgd-androidx_2.1.0', ext: 'aar')//交通厅 //安联 // implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.loopj.android:android-async-http:1.4.9' @@ -204,10 +207,10 @@ dependencies { //友盟 // 下面各SDK根据宿主App是否使用相关业务按需引入。 // 友盟统计SDK - implementation 'com.umeng.umsdk:common:9.4.2'// 必选 - implementation 'com.umeng.umsdk:asms:1.4.1'// 必选 + implementation 'com.umeng.umsdk:common:9.4.2'// 必选 + implementation 'com.umeng.umsdk:asms:1.4.1'// 必选 implementation 'com.umeng.umsdk:apm:1.4.2' // 错误分析升级为独立SDK,看crash数据请一定集成,可选 - implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选 + implementation 'com.umeng.umsdk:abtest:1.0.0'//使用U-App中ABTest能力,可选 //动态权限获取 implementation "org.permissionsdispatcher:permissionsdispatcher:4.6.0" kapt "org.permissionsdispatcher:permissionsdispatcher-processor:4.6.0" @@ -216,8 +219,8 @@ dependencies { //EventBus implementation 'org.greenrobot:eventbus:3.1.1' //易签宝 - implementation(name:'EsignSDK', ext:'aar') - implementation'pub.devrel:easypermissions:1.3.0' + implementation(name: 'EsignSDK', ext: 'aar') + implementation 'pub.devrel:easypermissions:1.3.0' implementation "com.squareup.retrofit2:retrofit:2.4.0" // implementation "com.squareup.retrofit2:converter-gson:2.4.0" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 034ec6a..edb1cb8 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -53,7 +53,7 @@ android:name="com.arpa.hndahesudintocctmsdriver.App" android:allowBackup="true" android:excludeFromRecents="true" - android:icon="@drawable/diver_logo" + android:icon="${app_icon}" android:label="@string/appName" android:largeHeap="true" android:requestLegacyExternalStorage="true"