build.gradle 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. if (componentTag){
  2. apply plugin: 'com.android.application'
  3. apply plugin: 'com.enation.javashop.aspectjrt'
  4. }else{
  5. apply plugin: 'com.android.library'
  6. }
  7. apply plugin: 'kotlin-android'
  8. apply plugin: 'kotlin-android-extensions'
  9. apply plugin: 'kotlin-kapt'
  10. kapt {
  11. arguments {
  12. arg("moduleName", project.getName())
  13. }
  14. }
  15. android {
  16. compileSdkVersion target_sdk_version
  17. buildToolsVersion build_tools_version
  18. defaultConfig {
  19. if (componentTag){
  20. applicationId "com.wdkl.app.ncs.callingbed"
  21. multiDexEnabled true
  22. }
  23. minSdkVersion min_sdk_version
  24. targetSdkVersion target_sdk_version
  25. versionCode app_version_code
  26. versionName app_version
  27. dataBinding {
  28. enabled = true
  29. }
  30. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  31. buildConfigField "String", "BUILD_TIME", getDate()
  32. }
  33. lintOptions {
  34. abortOnError false
  35. }
  36. buildTypes {
  37. release {
  38. minifyEnabled false
  39. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  40. }
  41. }
  42. }
  43. //获取编译日期
  44. String getDate() {
  45. Date date = new Date();
  46. String dates = "\""+date.format("yyyy年MM月dd日", TimeZone.getTimeZone("UTC"))+"\"";
  47. return dates;
  48. }
  49. dependencies {
  50. compile fileTree(dir: 'libs', include: ['*.jar'])
  51. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  52. exclude group: 'com.android.support', module: 'support-annotations'
  53. })
  54. /**
  55. * 单元测试
  56. */
  57. testCompile 'junit:junit:4.12'
  58. /**
  59. * Android基础依赖库
  60. */
  61. compile "com.android.support:design:$support_library_version"
  62. compile "com.android.support:support-v4:$support_library_version"
  63. compile "com.android.support:cardview-v7:$support_library_version"
  64. compile "com.android.support:appcompat-v7:$support_library_version"
  65. /**
  66. * 公共库依赖
  67. */
  68. compile project(':welcome')
  69. compile project(':middleware')
  70. //compile project(':sip2')
  71. //compile project(':bedlib')
  72. //web rtc
  73. //compile project(':webrtc')
  74. //compile project(':libwebrtc')
  75. //compile project(':rtc-chat')
  76. //janus信令
  77. compile project(':janus')
  78. //implementation 'org.webrtc:google-webrtc:1.0.32006'
  79. if(componentTag){
  80. debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
  81. releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  82. testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  83. }
  84. /**
  85. * Dagger编译依赖
  86. */
  87. kapt 'com.google.dagger:dagger-compiler:2.7'
  88. /**
  89. * Kotlin依赖
  90. */
  91. kapt 'com.android.databinding:compiler:2.3.3'
  92. /**
  93. * 路由注解处理器
  94. */
  95. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  96. /**
  97. * constraint-layout布局依赖
  98. */
  99. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  100. //compile 'com.github.anrwatchdog:anrwatchdog:1.3.0'
  101. //使用xCrash捕获异常
  102. implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.0.0'
  103. }
  104. /**
  105. * kawo组件化框架配置
  106. */
  107. if(componentTag){
  108. kawo {
  109. /**
  110. * Aop注解排除Jar
  111. */
  112. aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
  113. }
  114. }