Merge branch 'test_MogoAP_eagle-220_211207_8.0.15.2'
This commit is contained in:
@@ -106,6 +106,8 @@ android {
|
||||
// 是否作为 launcher 运行
|
||||
buildConfigField 'boolean', 'IS_LAUNCHER', 'true'
|
||||
buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"'
|
||||
buildConfigField 'String', 'WORKING_BRANCH_NAME', getWorkingBranchName()
|
||||
buildConfigField 'String', 'WORKING_BRANCH_HASH', getWorkingBranchHash()
|
||||
// 是否支持目的地导航策略
|
||||
buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'false'
|
||||
}
|
||||
@@ -231,3 +233,29 @@ android.applicationVariants.all { variant ->
|
||||
}
|
||||
|
||||
apply from: "./regroup.gradle"
|
||||
|
||||
/**
|
||||
* @return 获取当前分支名称
|
||||
*/
|
||||
def getWorkingBranchName() {
|
||||
def workingBranchName = ""
|
||||
def proc = "git rev-parse --abbrev-ref HEAD".execute()
|
||||
proc.in.eachLine { line -> workingBranchName = line }
|
||||
proc.err.eachLine { line -> println line }
|
||||
proc.waitFor()
|
||||
workingBranchName = "\"${workingBranchName}\""
|
||||
println "Working branch name: " + workingBranchName
|
||||
return workingBranchName
|
||||
}
|
||||
/**
|
||||
* @return 获取当前分支hash
|
||||
*/
|
||||
def getWorkingBranchHash() {
|
||||
def workingBranchHash = ""
|
||||
def proc = "git log -n1 --format=format:\"%h\"".execute()
|
||||
proc.in.eachLine { line -> workingBranchHash = line }
|
||||
proc.err.eachLine { line -> println line }
|
||||
proc.waitFor()
|
||||
println "Working branch hash: " + workingBranchHash
|
||||
return workingBranchHash
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.bytedance.apm.insight.ApmInsight;
|
||||
import com.bytedance.apm.insight.ApmInsightInitConfig;
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo;
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig;
|
||||
import com.mogo.eagle.core.function.main.MainMoGoApplication;
|
||||
import com.mogo.module.v2x.utils.ObuConfig;
|
||||
@@ -156,6 +157,10 @@ public class MogoApplication extends MainMoGoApplication {
|
||||
DebugConfig.setNeedUploadCoordinatesInTime(BuildConfig.IS_NEED_UPLOAD_COORDINATES_IN_TIME);
|
||||
DebugConfig.setObuType(SharedPrefsMgr.getInstance(this).getInt("OBU_TYPE", DebugConfig.OBU_TYPE_CIDI));
|
||||
|
||||
// 初始化构建APP的时候的分支及提交HASH,用于辅助定位问题
|
||||
AppConfigInfo.INSTANCE.setWorkingBranchName(BuildConfig.WORKING_BRANCH_NAME);
|
||||
AppConfigInfo.INSTANCE.setWorkingBranchHash(BuildConfig.WORKING_BRANCH_HASH);
|
||||
|
||||
ObuConfig.useObuLocation = false;
|
||||
// 使用与渠道配置一样的gps提供者提供的数据,app/productFlavors/fPadLenovo.gradle GPS_PROVIDER 0-Android系统,1-工控机,2-OBU
|
||||
FunctionBuildConfig.gpsProvider = BuildConfig.GPS_PROVIDER;
|
||||
|
||||
Reference in New Issue
Block a user