diff --git a/app/build.gradle b/app/build.gradle index 7307c7ffd3..397708a575 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,6 +49,7 @@ android { zipAlignEnabled false shrinkResources false signingConfig signingConfigs.release + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/config.gradle b/config.gradle index 5d8b58abb6..f1b9873c27 100644 --- a/config.gradle +++ b/config.gradle @@ -242,6 +242,9 @@ ext { mogoaicloudrealtime : "com.mogo.cloud:realtime:${MOGO_REALTIME_VERSION}", mogoaicloudtanlu : "com.mogo.cloud:tanlu:${MOGO_TANLU_VERSION}", mogoaicloudtrafficlive : "com.mogo.cloud:trafficlive:${MOGO_TRAFFICLIVE_VERSION}", + + mogocustommap : "com.zhidaoauto.machine:map:${MAP_SDK_VERSION}", + ] } \ No newline at end of file diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java index ef027bcaac..7d355d88c0 100644 --- a/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java +++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/AppUtils.java @@ -6,6 +6,7 @@ import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; +import android.os.Bundle; import android.text.TextUtils; import java.util.List; @@ -48,6 +49,26 @@ public class AppUtils { } } + private static final String MOGO_MAP_SDK_VERSION = "MAP_SDK_VERSION"; + + public static String getCustomMapSDKVersion(Context context){ + return getApplicationMetaValue(context,MOGO_MAP_SDK_VERSION); + } + + private static String getApplicationMetaValue(Context context,String metaName){ + try { + ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(),PackageManager.GET_META_DATA); + Bundle bundle = applicationInfo.metaData; + if (bundle != null){ + return bundle.getString(metaName); + } + } catch (PackageManager.NameNotFoundException e) { + e.printStackTrace(); + } + return ""; + } + + public static String getApplicationLabel( Context context, String pkgName ) { try { PackageManager pm = context.getPackageManager(); diff --git a/gradle.properties b/gradle.properties index 0da7be3e55..275d17abcc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -177,7 +177,8 @@ MOGO_AICLOUD_SERVICES_APK_VERSION=1.0.0-SNAPSHOT # mogoAiCloud sdk services MOGO_AICLOUD_SERVICES_SDK_VERSION=1.0.0-SNAPSHOT - +# 自研地图 +MAP_SDK_VERSION=1.0.0-vr-8.5.77-1 ## 产品库必备配置,产品库自动对versionCode和versionName版本进行升级 applicationId=com.mogo.launcer diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle index 7f86893d23..d0614104a6 100644 --- a/libraries/map-custom/build.gradle +++ b/libraries/map-custom/build.gradle @@ -67,8 +67,7 @@ dependencies { implementation project(':foudations:mogo-commons') } - implementation 'com.zhidaoauto.machine:map:1.0.0-vr-8.5.77-1' -// implementation 'com.zhidaoauto.machine:map:1.0.0-vr-test-3.4' + implementation rootProject.ext.dependencies.mogocustommap } apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString() diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java index c826faf416..2f33265028 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/status/EnvStatusManager.java @@ -14,6 +14,7 @@ import com.mogo.map.uicontroller.EnumMapUI; import com.mogo.module.common.MogoApisHandler; import com.mogo.module.common.wm.WindowManagerView; import com.mogo.module.service.R; +import com.mogo.utils.AppUtils; import com.mogo.utils.NetworkUtils; import static com.mogo.utils.CommonUtils.getVersionName; @@ -90,8 +91,8 @@ public class EnvStatusManager { stringBuilder.append(NetworkUtils.isConnected(mContext)).append("\n"); } else if (i == 8) { stringBuilder.append(getVersionName(mContext, "com.mogo.launcher.f")).append("\n"); - } else if (i == 9) { //TODO - stringBuilder.append("").append("\n"); + } else if (i == 9) { + stringBuilder.append(AppUtils.getCustomMapSDKVersion(mContext)).append("\n"); } else { stringBuilder.append("true".equals(DebugConfig.getStatus(i, true)) ? "正常" : "异常").append("\n"); }