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 { minSdkVersion min_sdk_version targetSdkVersion target_sdk_version versionCode app_version_code versionName app_version multiDexEnabled true dataBinding { enabled = true } buildConfigField "String", "BUILD_TIME", getDate() } sourceSets { println 'config app_device_type ===== ' + app_device_type if ("zj_h10_z_3128_1" == app_device_type) { main.java.srcDirs += 'src/main/h10_z3128_1h/java' main.res.srcDirs += 'src/main/h10_z3128_1h/res' main.manifest.srcFile 'src/main/h10_z3128_1h/AndroidManifest.xml' } else if (app_device_type == "zj_h10_w_ke_1") { main.java.srcDirs += 'src/main/h10_wke_1h/java' main.res.srcDirs += 'src/main/h10_wke_1h/res' main.manifest.srcFile 'src/main/h10_wke_1h/AndroidManifest.xml' } } lintOptions { abortOnError false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } //获取编译日期 static 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') 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' //compile 'com.github.anrwatchdog:anrwatchdog:1.3.0' //使用xCrash捕获异常 implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.0.0' //compile project(':starRTC') //compile project(':AmDemo_R') //web rtc //compile project(':webrtc') //compile project(':rtc-chat') //janus信令 compile project(':janus') //串口 compile project(':nurseMainLib') compile project(':listenvision') //广播喊话组件 compile project(':gstream') } /** * kawo组件化框架配置 */ if(componentTag){ kawo { /** * Aop注解排除Jar */ aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk' } }