apply plugin: 'com.android.application' apply plugin: 'com.alibaba.arouter' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'android-aspectjx' 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" } 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 debugImplementation rootProject.ext.dependencies.debugleakcanary releaseImplementation rootProject.ext.dependencies.releaseleakcanary implementation rootProject.ext.dependencies.callchatprovider implementation rootProject.ext.dependencies.callchat implementation rootProject.ext.dependencies.mogologlib compileOnly rootProject.ext.dependencies.adasapi compileOnly rootProject.ext.dependencies.adasconfigapi if (Boolean.valueOf(RELEASE)) { implementation rootProject.ext.dependencies.mogoaicloudservicesdk implementation rootProject.ext.dependencies.mogocommons implementation rootProject.ext.dependencies.modulecommon implementation rootProject.ext.dependencies.modulesearch implementation rootProject.ext.dependencies.mogomoduleauth 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.moduleSmallMap implementation rootProject.ext.dependencies.moduleobu implementation rootProject.ext.dependencies.moduleADAS implementation rootProject.ext.dependencies.mogomoduleback implementation rootProject.ext.dependencies.mogomodulewidgets implementation rootProject.ext.dependencies.modulemainlauncher implementation rootProject.ext.dependencies.moduleapps implementation rootProject.ext.dependencies.modulepushbase implementation rootProject.ext.dependencies.modulepush implementation rootProject.ext.dependencies.moduleleftpanelnoop implementation rootProject.ext.dependencies.crashreportupgrade implementation rootProject.ext.dependencies.crashreportbugly } else { implementation project(':foudations:mogo-aicloud-services-sdk') implementation project(':foudations:mogo-commons') implementation project(':modules:mogo-module-common') implementation project(':modules:mogo-module-search') implementation project(':modules:mogo-module-authorize') implementation project(':modules:mogo-module-service') implementation project(':modules:mogo-module-v2x') implementation project(':modules:mogo-module-share') implementation project(':libraries:tanlulib') implementation project(':modules:mogo-module-monitor') implementation project(':modules:mogo-module-extensions') implementation project(':modules:mogo-module-map') implementation project(':modules:mogo-module-smp') implementation project(':modules:mogo-module-obu-mogo') implementation project(':modules:mogo-module-hmi') implementation project(':modules:mogo-module-adas') implementation project(':modules:mogo-module-back') implementation project(':modules:mogo-module-widgets') implementation project(':main-extensions:mogo-module-main-launcher') implementation project(':modules:mogo-module-apps') implementation project(":modules:mogo-module-push-base") implementation project(":modules:mogo-module-push") implementation project(':modules:mogo-module-left-panel-noop') implementation project(':test:crashreport-upgrade') implementation project(':test:crashreport-bugly') } apply from: "./functions/basedmap.gradle" apply from: "./functions/skin.gradle" 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"