if (componentTag){ apply plugin: 'com.android.application' apply plugin: 'com.enation.javashop.aspectjrt' }else{ apply plugin: 'com.android.library' } apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' kapt { arguments { arg("moduleName", project.getName()) } } android { compileSdkVersion target_sdk_version buildToolsVersion build_tools_version defaultConfig { if (componentTag){ applicationId "com.wdkl.app.ncs.callingbed" multiDexEnabled true } minSdkVersion min_sdk_version targetSdkVersion target_sdk_version versionCode app_version_code versionName app_version dataBinding { enabled = true } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "String", "BUILD_TIME", getDate() } lintOptions { abortOnError false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } //获取编译日期 String getDate() { Date date = new Date(); String dates = "\""+date.format("yyyy年MM月dd日", TimeZone.getTimeZone("UTC"))+"\""; return dates; } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) /** * 单元测试 */ testCompile 'junit:junit:4.12' /** * Android基础依赖库 */ compile "com.android.support:design:$support_library_version" compile "com.android.support:support-v4:$support_library_version" compile "com.android.support:cardview-v7:$support_library_version" compile "com.android.support:appcompat-v7:$support_library_version" /** * 公共库依赖 */ compile project(':middleware') compile project(':sip2') compile project(':bedlib') //netty compile 'io.netty:netty-all:4.1.20.Final' //eventbus compile 'org.greenrobot:eventbus:3.0.0' if(componentTag){ debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1' releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1' } /** * Dagger编译依赖 */ kapt 'com.google.dagger:dagger-compiler:2.7' /** * Kotlin依赖 */ kapt 'com.android.databinding:compiler:2.3.3' /** * 路由注解处理器 */ kapt "com.enation.geamtear:jrouter-compiler:$router_version" /** * constraint-layout布局依赖 */ compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5' } /** * kawo组件化框架配置 */ if(componentTag){ kawo { /** * Aop注解排除Jar */ aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk' } }