apply plugin: 'com.android.application' android { compileSdkVersion rootProject.ext.android["compileSdkVersion"] buildToolsVersion rootProject.ext.android["buildToolsVersion"] useLibrary 'org.apache.http.legacy' compileOptions { targetCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8 } defaultConfig { minSdkVersion rootProject.ext.android["minSdkVersion"] targetSdkVersion rootProject.ext.android["targetSdkVersion"] versionCode rootProject.ext.android["versionCode"] versionName rootProject.ext.android["versionName"] testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" //https://developer.android.com/studio/build/multidex.html?hl=zh-cn multiDexEnabled true //Room javaCompileOptions { annotationProcessorOptions { arguments = ["room.schemaLocation": "$projectDir/schemas".toString()] } } } buildTypes { debug { buildConfigField "boolean", "LOG_DEBUG", "true" buildConfigField "boolean", "USE_CANARY", "true" minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } release { buildConfigField "boolean", "LOG_DEBUG", "false" buildConfigField "boolean", "USE_CANARY", "false" minifyEnabled true shrinkResources true zipAlignEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } //DataBinding dataBinding { enabled true } lintOptions { abortOnError false } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) //arms implementation project(':arms') //JCenter // implementation rootProject.ext.dependencies["arms"] //view implementation rootProject.ext.dependencies["constraint-layout"] implementation rootProject.ext.dependencies["SuperTextView"] implementation rootProject.ext.dependencies["MaterialSearchView"] //mvvm(Lifecycles, LiveData, and ViewModel, Room) annotationProcessor rootProject.ext.dependencies["lifecycle-compiler"] annotationProcessor rootProject.ext.dependencies["room-compiler"] testImplementation(rootProject.ext.dependencies["room-testing"]) { exclude module: 'support-compat' exclude module: 'support-annotations' exclude module: 'support-core-utils' exclude module: 'gson' } //tools annotationProcessor(rootProject.ext.dependencies["dagger2-compiler"]) { exclude module: 'js305' } annotationProcessor(rootProject.ext.dependencies["dagger2-android-processor"]) { exclude module: 'jsr305' } //test testImplementation rootProject.ext.dependencies["junit"] androidTestImplementation(rootProject.ext.dependencies["espresso-core"]) { exclude module: 'support-annotations' } debugImplementation rootProject.ext.dependencies["canary-debug"] releaseImplementation rootProject.ext.dependencies["canary-release"] testImplementation rootProject.ext.dependencies["canary-release"] }