apply plugin: 'com.android.application' apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'android-aspectjx' apply plugin: 'bugly' apply plugin: 'apm-plugin' //apply ByteX宿主 apply plugin: 'bytex' ByteX { enable true enableInDebug true logLevel "DEBUG" } /*apply plugin: 'chain.log.hook' hooklog{ enableLoggerToServer true }*/ bugly { appId = 'ac71228f85' // 注册时分配的App ID appKey = '3c736249-d6be-4066-b577-b7a6dc975cf7' // 注册时分配的App Key } Properties properties = new Properties(); properties.load(project.rootProject.file("gradle.properties").newDataInputStream()) android { compileSdkVersion rootProject.ext.android.compileSdkVersion defaultConfig { minSdkVersion rootProject.ext.android.minSdkVersion targetSdkVersion rootProject.ext.android.targetSdkVersion versionCode rootProject.versionCode as int versionName rootProject.versionName applicationId rootProject.ext.android.applicationId testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" javaCompileOptions { annotationProcessorOptions { arguments = [AROUTER_MODULE_NAME: project.getName()] } } multiDexEnabled true } packagingOptions { exclude 'META-INF/proguard/coroutines.pro' exclude 'META-INF/*' } signingConfigs { release { keyAlias = 'CarLauncher' storeFile file('../keystore/car_launcher.jks') storePassword 'ZDauto123456' keyPassword 'ZDauto123456' } } buildTypes { debug { debuggable true minifyEnabled false zipAlignEnabled false shrinkResources false signingConfig signingConfigs.release manifestPlaceholders = [ MAP_SDK_VERSION: properties.getProperty("MAP_SDK_VERSION") ] } release { minifyEnabled false zipAlignEnabled false shrinkResources false signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' manifestPlaceholders = [ MAP_SDK_VERSION: properties.getProperty("MAP_SDK_VERSION") ] } } compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } sourceSets { main { manifest.srcFile 'src/main/AndroidManifest.xml' } f8xxLauncherOnlineRelease { manifest.srcFile 'src/f8xxLauncherOnlineRelease/AndroidManifest.xml' } } flavorDimensions "product", "basic", "env" productFlavors { // launcher app launcher { dimension "basic" // 是否启动位置服务 buildConfigField 'boolean', 'LAUNCH_LOCATION_SERVICE', 'true' // 是否作为 launcher 运行 buildConfigField 'boolean', 'IS_LAUNCHER', 'true' buildConfigField 'String', 'SOCKET_APP_ID', '\"com.mogo.launcher\"' // 是否支持目的地导航策略 buildConfigField 'boolean', 'IS_SUPPORT_SCHEDULE_CALCULATE_NOT_HOME_COMPANY_DISTANCE_FOR_PUSH', 'false' } // 配置网络环境,QA、线上、演示 qa { dimension "env" buildConfigField 'int', 'NET_ENV', '2' } online { dimension "env" buildConfigField 'int', 'NET_ENV', '3' } demo { dimension "env" buildConfigField 'int', 'NET_ENV', '4' } } // 配置不同渠道参数,直接影响功能完整度 apply from: "./productFlavors/f8Amap.gradle" apply from: "./productFlavors/f8xx.gradle" apply from: "./productFlavors/f80x.gradle" apply from: "./productFlavors/fochbus.gradle" apply from: "./productFlavors/fochtaxi.gradle" apply from: "./productFlavors/fPadLenovo.gradle" apply from: "./productFlavors/fPadLenovoOchBus.gradle" apply from: "./productFlavors/fPadLenovoOchTaxi.gradle" packagingOptions { exclude 'META-INF/io.netty.versions.properties' } } repositories { flatDir { dirs 'libs' } } aspectjx { include "com.mogo.chat" } ApmPlugin { // 是否进行插桩 enable true // 是否在Debug包插桩,默认不插桩 enableInDebug true // DEBUG("DEBUG"), INFO("INFO"), WARN("WARN"), ERROR("ERROR"); // INFO 级别Log会汇总所有被插桩处理的类供查看,路径 app/build/ByteX/ApmPlugin logLevel "DEBUG" // 启动分析开关:监控App启动耗时,需要同时开启pageLoadSwitch startSwitch = true // 页面响应开关:监控Activity的生命周期耗时 pageLoadSwitch = true // 网络监控开关:监控okhttp3的网络请求 okHttp3Switch = true // 白名单下的包进行插桩,需要填写要插装类所在的包名,支持前缀配置 whiteList = [ "com.mogo" ] // 黑名单包下类不进行插桩,可以配置包名和类名,没有可以填空 blackList = [ ] } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) //Crash日志收集 implementation rootProject.ext.dependencies.crashSdk implementation rootProject.ext.dependencies.androidxappcompat implementation rootProject.ext.dependencies.arouter implementation rootProject.ext.dependencies.boostmultidex implementation 'com.volcengine:apm_insight:1.4.4.cn' implementation 'com.volcengine:apm_insight_crash:1.4.2' implementation rootProject.ext.dependencies.mogologlib compileOnly rootProject.ext.dependencies.adasapi compileOnly rootProject.ext.dependencies.adasconfigapi debugImplementation rootProject.ext.dependencies.debugleakcanary releaseImplementation rootProject.ext.dependencies.releaseleakcanary if (Boolean.valueOf(USE_MAVEN_PACKAGE)) { implementation rootProject.ext.dependencies.mogoaicloudservicesdk implementation rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.modulecommon implementation rootProject.ext.dependencies.mogoservice implementation rootProject.ext.dependencies.moduleV2x implementation rootProject.ext.dependencies.moduleshare implementation rootProject.ext.dependencies.tanluupload implementation rootProject.ext.dependencies.mogomonitor implementation rootProject.ext.dependencies.moduleextensions implementation rootProject.ext.dependencies.modulemap implementation rootProject.ext.dependencies.mogomodulewidgets implementation rootProject.ext.dependencies.moduleADAS implementation rootProject.ext.dependencies.mogomoduleback implementation rootProject.ext.dependencies.moduleapps implementation rootProject.ext.dependencies.modulepushbase implementation rootProject.ext.dependencies.modulepush implementation rootProject.ext.dependencies.callchat implementation rootProject.ext.dependencies.callchatprovider implementation rootProject.ext.dependencies.mapcustom implementation rootProject.ext.dependencies.crashreportupgrade // implementation rootProject.ext.dependencies.crashreportbugly implementation rootProject.ext.dependencies.mogo_core_data implementation rootProject.ext.dependencies.mogo_core_function_main implementation rootProject.ext.dependencies.mogo_core_function_obu_mogo implementation rootProject.ext.dependencies.mogo_core_function_smp implementation rootProject.ext.dependencies.mogo_core_function_hmi implementation rootProject.ext.dependencies.mogo_core_function_notice implementation rootProject.ext.dependencies.mogo_core_function_autopilot implementation rootProject.ext.dependencies.mogo_core_function_check implementation rootProject.ext.dependencies.mogo_core_function_map implementation rootProject.ext.dependencies.mogo_core_function_v2x implementation rootProject.ext.dependencies.mogo_core_function_monitoring } else { implementation project(':foudations:mogo-aicloud-services-sdk') implementation project(':foudations:mogo-commons') implementation project(':modules:mogo-module-common') implementation project(':modules:mogo-module-service') implementation project(':modules:mogo-module-v2x') implementation project(':modules:mogo-module-share') implementation project(':modules:tanlulib') implementation project(':modules:mogo-module-monitor') implementation project(':modules:mogo-module-extensions') implementation project(':modules:mogo-module-map') implementation project(':modules:mogo-module-widgets') implementation project(':modules:mogo-module-adas') implementation project(':modules:mogo-module-back') implementation project(':modules:mogo-module-apps') implementation project(":modules:mogo-module-push-base") implementation project(":modules:mogo-module-push") implementation project(':modules:mogo-module-carchatting') implementation project(':modules:mogo-module-carchattingprovider') implementation project(':libraries:map-custom') implementation project(':test:crashreport-upgrade') // implementation project(':test:crashreport-bugly') implementation project(':core:mogo-core-data') implementation project(':core:function-impl:mogo-core-function-main') implementation project(':core:function-impl:mogo-core-function-obu-mogo') implementation project(':core:function-impl:mogo-core-function-smp') implementation project(':core:function-impl:mogo-core-function-hmi') implementation project(':core:function-impl:mogo-core-function-autopilot') implementation project(':core:function-impl:mogo-core-function-check') implementation project(':core:function-impl:mogo-core-function-map') implementation project(':core:function-impl:mogo-core-function-notice') implementation project(':core:function-impl:mogo-core-function-v2x') implementation project(':core:function-impl:mogo-core-function-monitoring') } apply from: "./functions/tts.gradle" apply from: "./functions/och.gradle" // implementation group: "com.tencent.matrix", name: "matrix-android-lib", version: '0.6.6', changing: true // implementation group: "com.tencent.matrix", name: "matrix-android-commons", version: '0.6.6', changing: true // implementation group: "com.tencent.matrix", name: "matrix-trace-canary", version:'0.6.6', changing: true // implementation group: "com.tencent.matrix", name: "matrix-io-canary", version: '0.6.6', changing: true } //apply plugin: 'com.tencent.matrix-plugin' //matrix { // trace { // enable = true //if you don't want to use trace canary, set false // baseMethodMapFile = "${project.projectDir}/matrixOutput/Debug.methodmap" // blackListFile = "${project.projectDir}/matrixTrace/blackMethodList.txt" // } //} android.applicationVariants.all { variant -> def buildTime = new Date().format("yyyyMMdd", TimeZone.getTimeZone("GMT+08:00")) def flavor = variant.productFlavors.collect { it.name }.join('-') variant.outputs.all { output -> outputFileName = [ rootProject.applicationName, "v${variant.versionName}", buildTime, flavor.length() > 0 ? "[${flavor}]" : "", variant.buildType.name ].findAll { it.length() > 0 }.join('_') << ".apk" } } apply from: "./regroup.gradle"