build.gradle 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'kotlin-kapt'
  5. //apply plugin: 'com.enation.javashop.aspectjrt'
  6. kapt {
  7. arguments {
  8. arg("moduleName", project.getName())
  9. }
  10. }
  11. android {
  12. // wuyq add for sign begin
  13. signingConfigs {
  14. release {
  15. storeFile file("keystore_wuyuqing_3128/rk3128.jks")
  16. storePassword "111111"
  17. keyAlias "rk3128"
  18. keyPassword "111111"
  19. }
  20. debug {
  21. storeFile file("keystore_wuyuqing_3128/rk3128.jks")
  22. storePassword "111111"
  23. keyAlias "rk3128"
  24. keyPassword "111111"
  25. }
  26. }
  27. // wuyq add for sign end
  28. compileSdkVersion target_sdk_version
  29. buildToolsVersion build_tools_version
  30. aaptOptions.cruncherEnabled = false
  31. aaptOptions.useNewCruncher = false
  32. aaptOptions.noCompress("mp3","wav")
  33. defaultConfig {
  34. if ("fj_h5_z_3128_1" == app_device_type) {
  35. //3128 5寸分机
  36. applicationId "com.wdkl.app.ncs.callingbed"
  37. } else if ("fj_h7_z_3128_1" == app_device_type || "fj_h7_z_3128_2" == app_device_type) {
  38. //3128 7寸分机
  39. applicationId "com.wdkl.app.ncs.callingbed2"
  40. } else if (app_device_type == "fj_h10_w_yld_1") {
  41. //亿莱顿10寸分机
  42. applicationId "com.wdkl.app.ncs.callingbed2"
  43. }
  44. minSdkVersion min_sdk_version
  45. targetSdkVersion target_sdk_version
  46. versionCode app_version_code
  47. versionName app_version
  48. multiDexEnabled true
  49. dataBinding {
  50. enabled = true
  51. }
  52. ndk {
  53. //选择要添加的对应cpu类型的.so库。
  54. //abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a' ,'x86', 'x86_64', 'mips', 'mips64'
  55. abiFilters 'armeabi-v7a', 'armeabi-v8a'
  56. }
  57. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  58. }
  59. buildTypes {
  60. release {
  61. signingConfig signingConfigs.release
  62. minifyEnabled false
  63. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  64. }
  65. debug {
  66. signingConfig signingConfigs.debug
  67. minifyEnabled false
  68. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  69. }
  70. }
  71. sourceSets {
  72. main.java.srcDirs += 'src/main/code'
  73. //不同设备使用不同的manifest文件
  74. if ("fj_h5_z_3128_1" == app_device_type || "fj_h7_z_3128_1" == app_device_type || "fj_h7_z_3128_2" == app_device_type) {
  75. main.manifest.srcFile 'src/main/sharedUserId/AndroidManifest.xml'
  76. } else {
  77. main.manifest.srcFile 'src/main/AndroidManifest.xml'
  78. }
  79. }
  80. lintOptions{
  81. checkReleaseBuilds false
  82. abortOnError false
  83. }
  84. dexOptions {
  85. javaMaxHeapSize "4g"
  86. jumboMode=true
  87. preDexLibraries=true
  88. threadCount=8
  89. }
  90. compileOptions {
  91. sourceCompatibility JavaVersion.VERSION_1_8
  92. targetCompatibility JavaVersion.VERSION_1_8
  93. }
  94. }
  95. dependencies {
  96. //compile fileTree(include: ['*.jar'], dir: 'libs')
  97. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  98. exclude group: 'com.android.support', module: 'support-annotations'
  99. })
  100. /**
  101. * 单元测试
  102. */
  103. testCompile 'junit:junit:4.12'
  104. /**
  105. * Dagger编译依赖
  106. */
  107. kapt 'com.google.dagger:dagger-compiler:2.7'
  108. /**
  109. * 内存泄漏监控
  110. */
  111. debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
  112. releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  113. testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  114. /**
  115. * Kotlin依赖
  116. */
  117. kapt 'com.android.databinding:compiler:2.3.3'
  118. /**
  119. * 路由注解处理器
  120. */
  121. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  122. /**
  123. * 外部化Moudle配置
  124. * moudle独立编译配置
  125. */
  126. compile project(':welcome')
  127. compile project(':android_bed')
  128. /**
  129. * JavaShopAndroid 中间件依赖库
  130. */
  131. compile project(':middleware')
  132. /**
  133. * constraint-layout布局依赖
  134. */
  135. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  136. }