build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. apply plugin: 'org.jetbrains.kotlin.android.extensions'
  11. kapt {
  12. arguments {
  13. arg("moduleName", project.getName())
  14. }
  15. }
  16. android {
  17. compileSdkVersion target_sdk_version
  18. buildToolsVersion build_tools_version
  19. aaptOptions.noCompress("mp3","wav")
  20. defaultConfig {
  21. if (componentTag) {
  22. applicationId "com.wdkl.ncs.android.component.home"
  23. multiDexEnabled true
  24. }
  25. minSdkVersion min_sdk_version
  26. targetSdkVersion target_sdk_version
  27. versionCode app_version_code
  28. versionName app_version
  29. dataBinding {
  30. enabled = true
  31. }
  32. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  33. buildConfigField "String", "BUILD_TIME", getDate()
  34. }
  35. lintOptions {
  36. abortOnError false
  37. }
  38. buildTypes {
  39. release {
  40. minifyEnabled false
  41. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  42. }
  43. }
  44. sourceSets {
  45. println 'config app_device_type ===== ' + app_device_type
  46. if ("yd_s5_w_qin2_2" == app_device_type) {
  47. main.java.srcDirs += 'src/main/yd_w_qin2_2/code'
  48. main.java.srcDirs += 'src/main/yd_w_qin2_2/aidl'
  49. main.res.srcDirs += 'src/main/yd_w_qin2_2/res'
  50. main.manifest.srcFile 'src/main/yd_w_qin2_2/AndroidManifest.xml'
  51. }
  52. }
  53. compileOptions {
  54. sourceCompatibility JavaVersion.VERSION_1_8
  55. targetCompatibility JavaVersion.VERSION_1_8
  56. }
  57. }
  58. //获取编译日期
  59. String getDate() {
  60. Date date = new Date();
  61. String dates = "\"" + date.format("yyyy-MM-dd", TimeZone.getTimeZone("UTC")) + "\"";
  62. return dates;
  63. }
  64. dependencies {
  65. compile fileTree(dir: 'libs', include: ['*.aar'])
  66. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  67. exclude group: 'com.android.support', module: 'support-annotations'
  68. })
  69. /**
  70. * 单元测试
  71. */
  72. testCompile 'junit:junit:4.12'
  73. /**
  74. * Android基础依赖库
  75. */
  76. compile "com.android.support:design:$support_library_version"
  77. compile "com.android.support:support-v4:$support_library_version"
  78. compile "com.android.support:cardview-v7:$support_library_version"
  79. compile "com.android.support:appcompat-v7:$support_library_version"
  80. /**
  81. * 公共库依赖
  82. */
  83. compile project(':middleware')
  84. if (componentTag) {
  85. debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
  86. releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  87. testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  88. }
  89. /**
  90. * Dagger编译依赖
  91. */
  92. kapt 'com.google.dagger:dagger-compiler:2.7'
  93. /**
  94. * Kotlin依赖
  95. */
  96. kapt 'com.android.databinding:compiler:2.3.3'
  97. /**
  98. * 路由注解处理器
  99. */
  100. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  101. /**
  102. * constraint-layout布局依赖
  103. */
  104. implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  105. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  106. //web rtc
  107. implementation project(':keepalive')
  108. implementation project(':janus')
  109. implementation 'org.webrtc:google-webrtc:1.0.32006'
  110. }
  111. /**
  112. * kawo组件化框架配置
  113. */
  114. if (componentTag) {
  115. kawo {
  116. /**
  117. * Aop注解排除Jar
  118. */
  119. aspectExcludeJarFilter 'com.enation.geamtear.pay', 'AlipaySdk'
  120. }
  121. }
  122. repositories {
  123. }