好运测试图标自动切换

This commit is contained in:
lijia 2023-10-10 17:28:45 +08:00
parent 1c3d20ac43
commit a7aee4af57
2 changed files with 35 additions and 32 deletions

View File

@ -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' // SDKcrash数据请一定集成
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"

View File

@ -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"