Files
MoGoEagleEye/app/build.gradle
董宏宇 e236699315 修复发布失败的Notice 模块
Signed-off-by: 董宏宇 <martindhy@gmail.com>
2021-10-29 21:36:54 +08:00

268 lines
10 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
apply plugin: 'com.android.application'
apply plugin: 'com.alibaba.arouter'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'android-aspectjx'
////apply ByteX宿主
//apply plugin: 'bytex'
//ByteX {
// enable true
// enableInDebug true
// logLevel "DEBUG"
//}
//
//apply plugin: 'chain.log.hook'
//hooklog{
// enableLoggerToServer true
//}
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.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.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.modulemainlauncher
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_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(':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-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-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"