[gradle 名称简写]
This commit is contained in:
yangyakun
2024-04-10 17:55:22 +08:00
parent ef0624e929
commit 4fa9d64fa6
13 changed files with 94 additions and 100 deletions

View File

@@ -4,34 +4,34 @@ project.dependencies {
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
} else { } else {
if (isCurrentDriver("ochFT")) { if (isCurrentDriver("C1")) {
implementation project.project(':OCH:sweeper:driver') implementation project.project(':OCH:sweeper:driver')
} else if (isCurrentDriver("ochJL")) { } else if (isCurrentDriver("B1")) {
implementation project.project(':OCH:shuttle:driver') implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:bus:driver') implementation project.project(':OCH:bus:driver')
} else if (isCurrentPassenger("ochJL")) { } else if (isCurrentPassenger("B1")) {
implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:bus:passenger')
implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger')
} else if (isCurrentDriver("ochM1")) { } else if (isCurrentDriver("M1")) {
println "utils.gradle------isDriverOchM1" println "utils.gradle------isDriverM1"
implementation project.project(':OCH:charter:driver') implementation project.project(':OCH:charter:driver')
} else if (isCurrentPassenger("ochM1")) { } else if (isCurrentPassenger("M1")) {
implementation project.project(':OCH:charter:passenger') implementation project.project(':OCH:charter:passenger')
println "utils.gradle------isPassengerM1" println "utils.gradle------isPassengerM1"
} else if (isCurrentDriver("ochM2")) { } else if (isCurrentDriver("B2")) {
implementation project.project(':OCH:shuttle:driver') implementation project.project(':OCH:shuttle:driver')
implementation project.project(':OCH:bus:driver') implementation project.project(':OCH:bus:driver')
} else if (isCurrentPassenger("ochM2")) { } else if (isCurrentPassenger("B2")) {
implementation project.project(':OCH:bus:passenger') implementation project.project(':OCH:bus:passenger')
implementation project.project(':OCH:shuttle:passenger') implementation project.project(':OCH:shuttle:passenger')
} else if (isCurrentDriver("ochDFHQ")) { } else if (isCurrentDriver("ochT1T2")) {
if(isCurrentDriver("saas")){ if(isCurrentDriver("saas")){
implementation project.project(':OCH:taxi:unmanned-driver') implementation project.project(':OCH:taxi:unmanned-driver')
} }
if(isCurrentDriver("mogo")){ if(isCurrentDriver("mogo")){
implementation project.project(':OCH:taxi:driver') implementation project.project(':OCH:taxi:driver')
} }
} else if (isCurrentPassenger("ochDFHQ")) { } else if (isCurrentPassenger("ochT1T2")) {
if(isCurrentDriver("saas")){ if(isCurrentDriver("saas")){
implementation project.project(':OCH:taxi:unmanned-passenger') implementation project.project(':OCH:taxi:unmanned-passenger')
} }

View File

@@ -32,7 +32,7 @@ boolean isPassenger() {
boolean isJL() { boolean isJL() {
for (String s : gradle.startParameter.taskNames) { for (String s : gradle.startParameter.taskNames) {
if (s.contains("OchJL") | s.contains("ochJL")) { if (s.contains("b1") | s.contains("B1")) {
return true return true
} }
} }
@@ -41,7 +41,7 @@ boolean isJL() {
boolean isM2() { boolean isM2() {
for (String s : gradle.startParameter.taskNames) { for (String s : gradle.startParameter.taskNames) {
if (s.contains("OchM2") | s.contains("ochM2")) { if (s.contains("b2") | s.contains("B2")) {
return true return true
} }
} }

View File

@@ -29,6 +29,31 @@ android {
} }
} }
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 'String', 'APP_BUILD_TIME', getBuildTime()
buildConfigField 'String', 'MAP_SDK_VERSION', "\"${MAP_SDK_VERSION}\""
buildConfigField 'String', 'MAP_SDK_OPT_VERSION', "\"${MAP_SDK_OPERATION_VERSION}\""
// ②车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
// ④GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
// ⑤构建的是否是演示(美化)模式
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
// 是否支持卡顿检测
buildConfigField 'boolean', 'IS_SUPPORT_JUNK_DETECT', "${rootProject.isJunkDetectEnable()}"
buildConfigField 'String', 'SWEEPER_DEFAULT_MODE', '\"Cloud\"'
buildConfigField 'boolean', 'SWEEPER_CAN_SWITCH_MODE', 'true'
multiDexEnabled true multiDexEnabled true
} }
@@ -114,37 +139,8 @@ android {
// 项目 business // 项目 business
// 业务线 product // 业务线 product
// 车型 vehicle // 车型 vehicle
flavorDimensions "project","vehicle" ,"role","basic", "env" flavorDimensions "project","vehicle" ,"role", "env"
productFlavors { productFlavors {
// launcher app
launcher {
dimension "basic"
// 是否作为 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 'String', 'APP_BUILD_TIME', getBuildTime()
buildConfigField 'String', 'MAP_SDK_VERSION', "\"${MAP_SDK_VERSION}\""
buildConfigField 'String', 'MAP_SDK_OPT_VERSION', "\"${MAP_SDK_OPERATION_VERSION}\""
// ②车机类型主要用于区分自研车机还是别人家的车机自研车机类型为0
buildConfigField 'int', 'CAR_MACHINE_TYPE', '2'
// ④GPS数据提供源 0-Android系统1-工控机2-OBU
buildConfigField 'int', 'GPS_PROVIDER', "1"
// ⑤构建的是否是演示(美化)模式
buildConfigField 'boolean', 'IS_DEMO_MODE', 'false'
buildConfigField 'String', 'ADAS_CONNECT_IP', "\"192.168.8.102\""
// 是否支持卡顿检测
buildConfigField 'boolean', 'IS_SUPPORT_JUNK_DETECT', "${rootProject.isJunkDetectEnable()}"
buildConfigField 'String', 'SWEEPER_DEFAULT_MODE', '\"Cloud\"'
buildConfigField 'boolean', 'SWEEPER_CAN_SWITCH_MODE', 'true'
}
mogo { mogo {
dimension "project" dimension "project"
@@ -194,12 +190,12 @@ android {
apply from: "./script/roleFlavors/driverpassenger.gradle" apply from: "./script/roleFlavors/driverpassenger.gradle"
// 配置不同渠道参数,直接影响功能完整度 // 配置不同渠道参数,直接影响功能完整度
apply from: "./script/vehicleFlavors/ochJL.gradle" apply from: "./script/vehicleFlavors/B1.gradle"
apply from: "./script/vehicleFlavors/ochM2.gradle" apply from: "./script/vehicleFlavors/B2.gradle"
apply from: "./script/vehicleFlavors/ochDFHQ.gradle" apply from: "./script/vehicleFlavors/T1T2.gradle"
apply from: "./script/vehicleFlavors/ochFT.gradle" apply from: "./script/vehicleFlavors/C1.gradle"
//包车 //包车
apply from: "./script/vehicleFlavors/ochM1.gradle" apply from: "./script/vehicleFlavors/M1.gradle"
apply from: "./script/flavorfilter/flavorsFilterConfig.gradle" apply from: "./script/flavorfilter/flavorsFilterConfig.gradle"
packagingOptions { packagingOptions {

View File

@@ -1,6 +1,6 @@
{ {
"mogo": { "mogo": {
"shuttlepassengerochjl": { "shuttlepassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
@@ -64,7 +64,7 @@
} }
] ]
}, },
"buspassengerochjl": { "buspassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
@@ -128,7 +128,7 @@
} }
] ]
}, },
"shuttlepassengerochm2": { "shuttlepassengerb2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
@@ -144,7 +144,7 @@
} }
] ]
}, },
"taxiunmannedpassengerochdfhq": { "taxiunmannedpassengerocht1t2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -172,7 +172,7 @@
} }
] ]
}, },
"charterpassengerochm1": { "charterpassengerm1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -202,7 +202,7 @@
} }
}, },
"dali": { "dali": {
"shuttlepassengerochjl": { "shuttlepassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
@@ -266,7 +266,7 @@
} }
] ]
}, },
"buspassengerochjl": { "buspassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
@@ -330,7 +330,7 @@
} }
] ]
}, },
"shuttlepassengerochm2": { "shuttlepassengerb2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
@@ -346,7 +346,7 @@
} }
] ]
}, },
"taxiunmannedpassengerochdfhq": { "taxiunmannedpassengerochdt1t2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -374,7 +374,7 @@
} }
] ]
}, },
"charterpassengerochm1": { "charterpassengerm1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -404,7 +404,7 @@
} }
}, },
"yantai": { "yantai": {
"shuttlepassengerochjl": { "shuttlepassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
@@ -420,7 +420,7 @@
} }
] ]
}, },
"buspassengerochjl": { "buspassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681210971943/yangmadou.mp4",
@@ -436,7 +436,7 @@
} }
] ]
}, },
"shuttlepassengerochm2": { "shuttlepassengerb2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
@@ -452,7 +452,7 @@
} }
] ]
}, },
"taxiunmannedpassengerochdfhq": { "taxiunmannedpassengerocht1t2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -480,7 +480,7 @@
} }
] ]
}, },
"charterpassengerochm1": { "charterpassengerm1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -510,7 +510,7 @@
} }
}, },
"saas": { "saas": {
"shuttlepassengerochjl": { "shuttlepassengerb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
@@ -574,7 +574,7 @@
} }
] ]
}, },
"buspassengerochjl": { "buspassengerochb1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1676357256102/1.jpg",
@@ -638,7 +638,7 @@
} }
] ]
}, },
"shuttlepassengerochm2": { "shuttlepassengerb2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1681716116231/6923474a99a1983c9a0410ad3357888d.mov",
@@ -654,7 +654,7 @@
} }
] ]
}, },
"taxiunmannedpassengerochdfhq": { "taxiunmannedpassengerocht1t2": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",
@@ -682,7 +682,7 @@
} }
] ]
}, },
"charterpassengerochm1": { "charterpassengerm1": {
"medias": [ "medias": [
{ {
"fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v", "fileUrl": "https://img.zhidaohulian.com/fileServer/online_car_hailing/1655708499497/大运会合作解说版.m4v",

View File

@@ -1,6 +1,6 @@
{ {
"mogo": { "mogo": {
"taxipassengerochdfhq": { "taxipassengerocht1t2": {
"musics": [ "musics": [
{ {
"id": "1", "id": "1",
@@ -124,7 +124,7 @@
} }
] ]
}, },
"charterpassengerochm1": { "charterpassengerm1": {
"musics": [ "musics": [
{ {
"id": "1", "id": "1",
@@ -250,7 +250,7 @@
} }
}, },
"dali": { "dali": {
"charterpassengerochm1": { "charterpassengerm1": {
"musics": [ "musics": [
{ {
"id": "1", "id": "1",
@@ -376,7 +376,7 @@
} }
}, },
"yantai": { "yantai": {
"charterpassengerochm1": { "charterpassengerm1": {
"musics": [ "musics": [
{ {
"id": "1", "id": "1",
@@ -502,7 +502,7 @@
} }
}, },
"saas": { "saas": {
"taxiunmannedpassengerochdfhq": { "taxiunmannedpassengerocht1t2": {
"musics": [ "musics": [
{ {
"id": "1", "id": "1",
@@ -626,7 +626,7 @@
} }
] ]
}, },
"charterpassengerochm1": { "charterpassengerm1": {
"musics": [ "musics": [
{ {
"id": "1", "id": "1",

View File

@@ -2,14 +2,11 @@
afterEvaluate { afterEvaluate {
def launcher = [ def launcher = [
"ochFT", "C1",
"fOchTaxi", "fOchTaxi",
"ochJL", "B1",
"ochJL",
"fOchBusPassengerM1", "fOchBusPassengerM1",
"ochM2", "B2",
"ochJL",
"ochJL",
"fOchTaxiPassenger", "fOchTaxiPassenger",
"MultiDisplayOchBus", "MultiDisplayOchBus",
"MultiDisplayOchTaxi"] "MultiDisplayOchTaxi"]

View File

@@ -1,26 +1,26 @@
{ {
"mogo": { "mogo": {
"ochFT":["driver"], "C1":["driver"],
"ochJL":["driver","passenger"], "B1":["driver","passenger"],
"ochM2":["driver","passenger"], "B2":["driver","passenger"],
"ochDFHQ":["driver","passenger"], "T1T2":["driver","passenger"],
"ochM1":["driver","passenger"] "M1":["driver","passenger"]
}, },
"dali": { "dali": {
"ochJL":["driver","passenger"], "B1":["driver","passenger"],
"ochM1":["driver","passenger"], "M1":["driver","passenger"],
"ochM2":["driver","passenger"] "B2":["driver","passenger"]
}, },
"yantai": { "yantai": {
"ochJL":["driver","passenger"], "B1":["driver","passenger"],
"ochM1":["driver","passenger"], "M1":["driver","passenger"],
"ochM2":["driver","passenger"], "B2":["driver","passenger"],
"ochFT":["driver"] "C1":["driver"]
}, },
"saas": { "saas": {
"ochDFHQ":["driver","passenger"], "T1T2":["driver","passenger"],
"ochJL":["driver","passenger"], "B1":["driver","passenger"],
"ochM2":["driver","passenger"], "B2":["driver","passenger"],
"ochM1":["driver","passenger"] "M1":["driver","passenger"]
} }
} }

View File

@@ -23,6 +23,7 @@ boolean isDriver() {
boolean isPassenger() { boolean isPassenger() {
for (String s : gradle.startParameter.taskNames) { for (String s : gradle.startParameter.taskNames) {
println "----------isPassenger------${s}"
if (s.contains("Passenger") | s.contains("passenger")) { if (s.contains("Passenger") | s.contains("passenger")) {
return true return true
} }

View File

@@ -1,6 +1,6 @@
project.android.productFlavors { project.android.productFlavors {
// -Pad-- // -Pad--
ochJL { B1 {
dimension "vehicle" dimension "vehicle"
matchingFallbacks = ['jinlvvan'] matchingFallbacks = ['jinlvvan']
missingDimensionStrategy "vehicle", "jinlvvan" missingDimensionStrategy "vehicle", "jinlvvan"

View File

@@ -2,7 +2,7 @@ apply from: "./script/utils.gradle"
project.android.productFlavors { project.android.productFlavors {
// -Pad--- // -Pad---
ochM2 { B2 {
dimension "vehicle" dimension "vehicle"
// och/mogo-och-bus-passenger flavors的m2对应 // och/mogo-och-bus-passenger flavors的m2对应
if(isPassenger()){ if(isPassenger()){

View File

@@ -1,6 +1,6 @@
project.android.productFlavors { project.android.productFlavors {
// //
ochFT { C1 {
dimension "vehicle" dimension "vehicle"
missingDimensionStrategy "vehicle","ft","jinlvvan" missingDimensionStrategy "vehicle","ft","jinlvvan"

View File

@@ -2,7 +2,7 @@ apply from: "./script/utils.gradle"
project.android.productFlavors { project.android.productFlavors {
// M1车 // M1车
ochM1 { M1 {
dimension "vehicle" dimension "vehicle"
missingDimensionStrategy "vehicle", "jinlvvan" missingDimensionStrategy "vehicle", "jinlvvan"

View File

@@ -1,6 +1,6 @@
project.android.productFlavors { project.android.productFlavors {
// //
ochDFHQ { ochT1T2 {
dimension "vehicle" dimension "vehicle"
missingDimensionStrategy "vehicle","dfhq","jinlvvan" missingDimensionStrategy "vehicle","dfhq","jinlvvan"