build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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.ncs.android.component.home"
  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 "android.support.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.txt'), 'proguard-rules.pro'
  40. }
  41. }
  42. sourceSets {
  43. if ("v_h8_ke_1h" == app_device_type) {
  44. main.java.srcDirs += 'src/main/h8_ke_1h/java'
  45. main.res.srcDirs += 'src/main/h8_ke_1h/res'
  46. main.manifest.srcFile 'src/main/h8_ke_1h/AndroidManifest.xml'
  47. } else if ("v_h10_yld_1h" == app_device_type) {
  48. main.java.srcDirs += 'src/main/h10_yld_1h/java'
  49. main.res.srcDirs += 'src/main/h10_yld_1h/res'
  50. main.manifest.srcFile 'src/main/h10_yld_1h/AndroidManifest.xml'
  51. }
  52. }
  53. }
  54. //获取编译日期
  55. String getDate() {
  56. Date date = new Date();
  57. String dates = "\"" + date.format("yyyy年MM月dd日", TimeZone.getTimeZone("UTC")) + "\"";
  58. return dates;
  59. }
  60. dependencies {
  61. compile fileTree(dir: 'libs', include: ['*.aar'])
  62. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  63. exclude group: 'com.android.support', module: 'support-annotations'
  64. })
  65. /**
  66. * 单元测试
  67. */
  68. testCompile 'junit:junit:4.12'
  69. /**
  70. * Android基础依赖库
  71. */
  72. compile "com.android.support:design:$support_library_version"
  73. compile "com.android.support:support-v4:$support_library_version"
  74. compile "com.android.support:cardview-v7:$support_library_version"
  75. compile "com.android.support:appcompat-v7:$support_library_version"
  76. /**
  77. * 公共库依赖
  78. */
  79. compile project(':middleware')
  80. if (componentTag) {
  81. debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
  82. releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  83. testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  84. }
  85. /**
  86. * Dagger编译依赖
  87. */
  88. kapt 'com.google.dagger:dagger-compiler:2.7'
  89. /**
  90. * Kotlin依赖
  91. */
  92. kapt 'com.android.databinding:compiler:2.3.3'
  93. /**
  94. * 路由注解处理器
  95. */
  96. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  97. /**
  98. * constraint-layout布局依赖
  99. */
  100. implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  101. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  102. compile 'com.github.anrwatchdog:anrwatchdog:1.3.0'
  103. // compile project(':starRTC')
  104. // compile project(':AmDemo_R')
  105. //web rtc
  106. //compile project(':webrtc')
  107. //compile project(':libwebrtc')
  108. //compile project(':rtc-chat')
  109. //compile project(':keepalive')
  110. compile project(':janus')
  111. }
  112. /**
  113. * kawo组件化框架配置
  114. */
  115. if (componentTag) {
  116. kawo {
  117. /**
  118. * Aop注解排除Jar
  119. */
  120. aspectExcludeJarFilter 'com.enation.geamtear.pay', 'AlipaySdk'
  121. }
  122. }
  123. repositories {
  124. }