99 lines
3.5 KiB
Groovy
99 lines
3.5 KiB
Groovy
import java.text.SimpleDateFormat
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "com.zhidao.adas.client"
|
|
minSdkVersion 21
|
|
targetSdkVersion 25
|
|
multiDexEnabled true
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
flavorDimensions "multi_device"
|
|
|
|
packagingOptions {
|
|
//解决编译时com.android.builder.merge.DuplicateRelativeFileException: More than one file was found with OS independent path 'META-INF/rxjava.properties'这个错误
|
|
exclude 'META-INF/rxjava.properties'
|
|
}
|
|
externalNativeBuild {
|
|
ndk {
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a'
|
|
}
|
|
}
|
|
}
|
|
signingConfigs {
|
|
release {
|
|
keyAlias 'CarLauncher'
|
|
keyPassword 'ZDauto123456'
|
|
storeFile file(getProjectDir().getParent() + '/keystore/car_launcher.jks')
|
|
storePassword 'ZDauto123456'
|
|
}
|
|
}
|
|
buildTypes {
|
|
debug {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
release {
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.release
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
//插入构建时间
|
|
buildTypes.each {
|
|
//设置时间格式
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd.HHmmss", Locale.getDefault())
|
|
//获取当前时间
|
|
Date curDate = new Date(System.currentTimeMillis())
|
|
String buildTime = formatter.format(curDate)
|
|
it.buildConfigField 'String', 'BUILD_TIME', "\"${buildTime}\""
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
productFlavors {
|
|
passenger {
|
|
dimension "multi_device"
|
|
buildConfigField 'boolean', 'IS_CLIENT', 'true'
|
|
}
|
|
driver {
|
|
dimension "multi_device"
|
|
buildConfigField 'boolean', 'IS_CLIENT', 'false'
|
|
}
|
|
|
|
}
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
// Or, if you prefer, you can continue to check for errors in release builds,
|
|
// but continue the build even when errors are found:
|
|
abortOnError false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
implementation rootProject.ext.dependencies.material
|
|
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
|
implementation rootProject.ext.dependencies.androidxappcompat
|
|
implementation "androidx.recyclerview:recyclerview:1.2.0"
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
|
implementation rootProject.ext.dependencies.gson
|
|
implementation project(':libraries:mogo-adas')
|
|
implementation project(':libraries:mogo-adas-other')
|
|
// implementation 'com.zhidao.support.adas:high:2.8.0.0'
|
|
// implementation 'com.zhjt.mogo.adas.data:adas-data:2.6.6.0'
|
|
compileOnly project(':core:mogo-core-data')
|
|
implementation project(':core:mogo-core-utils')
|
|
implementation 'org.greenrobot:eventbus:3.2.0'
|
|
implementation 'com.android.support:multidex:1.0.3'
|
|
implementation 'com.mogo.cloud:telematic:1.3.59'
|
|
implementation 'com.jcraft:jsch:0.1.55'
|
|
}
|