Files
MoGoEagleEye/app_mogo_magic_ring/build.gradle
2023-07-21 18:25:28 +08:00

68 lines
2.4 KiB
Groovy

import java.text.SimpleDateFormat
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.android.compileSdkVersion
defaultConfig {
applicationId "com.zhidao.adas.magic"
minSdkVersion rootProject.ext.android.minSdkVersion
targetSdkVersion rootProject.ext.android.targetSdkVersion
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
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'
}
}
buildTypes {
release {
minifyEnabled false
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
}
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.1"
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-data')
implementation 'org.greenrobot:eventbus:3.2.0'
implementation 'com.android.support:multidex:1.0.3'
}