Merge branch 'dev_robobus-d_230322_3.0.0' into dev_robobus_gradle_och_230317
# Conflicts: # app/build.gradle # app/productFlavors/fOchShuttlePassengerM2.gradle # app/productFlavors/flavorsFilterConfig.gradle # app/script/functions/och.gradle # app/script/vehicleFlavors/fOchShuttleM2.gradle
This commit is contained in:
@@ -232,15 +232,18 @@ android {
|
||||
mogo {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("mogo").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("mogo").replace("\"", "\\\"")}\""
|
||||
}
|
||||
yantai {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("yantai").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("yantai").replace("\"", "\\\"")}\""
|
||||
}
|
||||
|
||||
dali {
|
||||
dimension "project"
|
||||
buildConfigField 'String', 'URLs', "\"${readFileToJson("dali").replace("\"", "\\\"")}\""
|
||||
buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("dali").replace("\"", "\\\"")}\""
|
||||
}
|
||||
|
||||
// 配置网络环境,QA、线上、演示
|
||||
@@ -311,8 +314,6 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
implementation rootProject.ext.dependencies.lancetx_runtime
|
||||
implementation rootProject.ext.dependencies.mogocustommap
|
||||
implementation project(':libraries:map-usbcamera')
|
||||
|
||||
implementation project(':core:function-impl:mogo-core-function-startup')
|
||||
implementation project(':core:function-impl:mogo-core-function-devatools')
|
||||
implementation project(':core:function-impl:mogo-core-function-datacenter')
|
||||
@@ -445,7 +446,7 @@ boolean isReleaseBuild() {
|
||||
Object readFileToJson(env){
|
||||
try {
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/urlConfig.json")
|
||||
File file = new File("${rootDir}/app/config/urlConfig.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
// 解析json
|
||||
def config = jsonSlurper.parse(file)
|
||||
@@ -495,3 +496,38 @@ def variantName() {
|
||||
|
||||
}
|
||||
|
||||
Object readFileToJsonTemp(env){
|
||||
try {
|
||||
// 加载config.json 文件
|
||||
File file = new File("${rootDir}/app/config/tempConfig.json")
|
||||
def jsonSlurper = new JsonSlurper()
|
||||
// 解析json
|
||||
def config = jsonSlurper.parse(file)
|
||||
def flavorNames = variantVehicleName()
|
||||
def jsonOutput = new JsonOutput()
|
||||
def getKey = flavorNames
|
||||
config.get(env).each {key, value ->
|
||||
// 匹配flavor对应的 json
|
||||
if(flavorNames.toLowerCase().contains(key)){
|
||||
getKey = key
|
||||
return true
|
||||
}
|
||||
}
|
||||
return jsonOutput.toJson(config.get(env).get(getKey))
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
def variantVehicleName() {
|
||||
if(gradle.startParameter.taskNames.size()>0) {
|
||||
for (String taskName : gradle.startParameter.taskNames) {
|
||||
if (taskName.contains("Debug") | taskName.contains("Release")) {
|
||||
return taskName
|
||||
}
|
||||
}
|
||||
}
|
||||
return "buspassenger"
|
||||
}
|
||||
|
||||
|
||||
176
app/config/tempConfig.json
Normal file
176
app/config/tempConfig.json
Normal file
@@ -0,0 +1,176 @@
|
||||
{
|
||||
"mogo": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "2"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"title": "3"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "4"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
"type": 0,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "5"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "6"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "7"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "8"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "9"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"title": "10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210902933/erhaim2.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"dali": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "2"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357557335/3.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357382357/2.png",
|
||||
"title": "3"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "4"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357834634/5.m4v",
|
||||
"type": 0,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "5"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676358660379/6.m4v",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357598483/4.jpg",
|
||||
"title": "6"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360154589/7.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "7"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360185500/8.jpg",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "8"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"type": 0,
|
||||
"cacheImgPath": "",
|
||||
"title": "9"
|
||||
},
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360274126/10.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676360224773/9.png",
|
||||
"title": "10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210902933/erhaim2.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"yantai": {
|
||||
"shuttlepassenger": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1680774790614/yangmadao_photo.jpg",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"shuttlepassengerm2": {
|
||||
"ads": [
|
||||
{
|
||||
"path": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210902933/erhaim2.mp4",
|
||||
"type": 1,
|
||||
"cacheImgPath": "",
|
||||
"title": "1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,9 @@
|
||||
"socket_base_url": "",
|
||||
"socket_tech_url": "",
|
||||
"eagle_mis_url": "",
|
||||
"eagle_dns_url": ""
|
||||
"eagle_dns_url": "",
|
||||
"bind_driver_qr_url": "",
|
||||
"chart_socket_url":""
|
||||
},
|
||||
"online": {
|
||||
"och_url": "https://tech.zhidaohulian.com",
|
||||
@@ -16,7 +18,9 @@
|
||||
"socket_base_url": "",
|
||||
"socket_tech_url": "",
|
||||
"eagle_mis_url": "",
|
||||
"eagle_dns_url": ""
|
||||
"eagle_dns_url": "",
|
||||
"bind_driver_qr_url": "",
|
||||
"chart_socket_url":""
|
||||
},
|
||||
"demo": {
|
||||
"och_url": "http://tech-dev.zhidaohulian.com",
|
||||
@@ -25,7 +29,9 @@
|
||||
"socket_base_url": "",
|
||||
"socket_tech_url": "",
|
||||
"eagle_mis_url": "",
|
||||
"eagle_dns_url": ""
|
||||
"eagle_dns_url": "",
|
||||
"bind_driver_qr_url": "",
|
||||
"chart_socket_url":""
|
||||
}
|
||||
},
|
||||
"dali": {
|
||||
@@ -36,16 +42,20 @@
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/"
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s",
|
||||
"chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws"
|
||||
},
|
||||
"online": {
|
||||
"och_url": "https://och-driver-eh.zhidaozhixing.com:18182",
|
||||
"shuttle_url": "https://och-driver-eh.zhidaozhixing.com:18182",
|
||||
"passport_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/passport/",
|
||||
"socket_base_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/push/",
|
||||
"socket_tech_url": "https://och-driver-eh.zhidaozhixing.com:18182/arch/",
|
||||
"eagle_mis_url": "https://och-hailing-eh.zhidaozhixing.com:18182/",
|
||||
"eagle_dns_url": "https://och-hailing-eh.zhidaozhixing.com:18182/"
|
||||
"och_url": "https://och-driver-eh.zhidaozhixing.com",
|
||||
"shuttle_url": "https://och-driver-eh.zhidaozhixing.com",
|
||||
"passport_url": "https://och-driver-eh.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://och-driver-eh.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-driver-eh.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "https://och-hailing-eh.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "https://och-hailing-eh.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ehsafety&sn=%1$s",
|
||||
"chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws"
|
||||
},
|
||||
"demo": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
@@ -53,8 +63,10 @@
|
||||
"passport_url": "https://och-a.zhidaozhixing.com/arch/passport/",
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "http://och-hailing-eh.zhidaozhixing.com:18181/",
|
||||
"eagle_dns_url": "http://och-hailing-eh.zhidaozhixing.com:18181/"
|
||||
"eagle_mis_url": "http://och-hailing-eh.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "http://och-hailing-eh.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ehsafety&sn=%1$s",
|
||||
"chart_socket_url":"wss://acp-eh.zhidaozhixing.com/ws"
|
||||
}
|
||||
},
|
||||
"yantai": {
|
||||
@@ -65,7 +77,9 @@
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/"
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=asafety&sn=%1$s",
|
||||
"chart_socket_url":""
|
||||
},
|
||||
"online": {
|
||||
"och_url": "https://och-driver-yt.zhidaozhixing.com",
|
||||
@@ -74,7 +88,9 @@
|
||||
"socket_base_url": "https://och-driver-yt.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-driver-yt.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "https://och-hailing-yt.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "https://och-hailing-yt.zhidaozhixing.com/"
|
||||
"eagle_dns_url": "https://och-hailing-yt.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s",
|
||||
"chart_socket_url":""
|
||||
},
|
||||
"demo": {
|
||||
"och_url": "https://och-a.zhidaozhixing.com",
|
||||
@@ -83,7 +99,9 @@
|
||||
"socket_base_url": "https://och-a.zhidaozhixing.com/arch/push/",
|
||||
"socket_tech_url": "https://och-a.zhidaozhixing.com/arch/",
|
||||
"eagle_mis_url": "http://eagle-mis-a.zhidaozhixing.com/",
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/"
|
||||
"eagle_dns_url": "http://eagle-dns-a.zhidaozhixing.com/",
|
||||
"bind_driver_qr_url": "https://tech.zhidaohulian.com?pipe=ytsafety&sn=%1$s",
|
||||
"chart_socket_url":""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,8 @@ object ConfigStartUp {
|
||||
FunctionBuildConfig.urlJson = GsonUtils.fromJson(BuildConfig.URLs, UrlConfig::class.java)
|
||||
//不能启动自动驾驶的档位
|
||||
FunctionBuildConfig.unableLaunchAutopilotGear = BuildConfig.UNABLE_LAUNCH_AUTOPILOT_GEAR
|
||||
// 临时配置json
|
||||
FunctionBuildConfig.tempConfig = BuildConfig.tempConfig
|
||||
|
||||
// // 这里影响当前Activity的身份信息,多进程先保持与原来一样,主进程为司机端,:passenger 进程为乘客端 TODO 暂时不启用,仅做洱海交付,独立乘客屏+宣传视频
|
||||
// if (ProcessUtils.getCurrentProcessName().contains(":passenger")) {
|
||||
@@ -90,20 +92,20 @@ object ConfigStartUp {
|
||||
|
||||
if (AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.chuzuche
|
||||
}else if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.m2
|
||||
} else if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
} else if (AppIdentityModeUtils.isSweeper(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.huanwei
|
||||
} else if (AppIdentityModeUtils.isShuttle(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
} else if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
} else if (AppIdentityModeUtils.isCharter(FunctionBuildConfig.appIdentityMode)){
|
||||
}
|
||||
if (AppIdentityModeUtils.isJL(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.xiaobache
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isM1(FunctionBuildConfig.appIdentityMode)){
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.m1
|
||||
}
|
||||
if (AppIdentityModeUtils.isM2(FunctionBuildConfig.appIdentityMode)) {
|
||||
HdMapBuildConfig.currentCarVrIconRes = R.raw.m2
|
||||
}
|
||||
|
||||
if (AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)) {
|
||||
if (AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode) ||
|
||||
|
||||
Reference in New Issue
Block a user