build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. minSdkVersion min_sdk_version
  20. targetSdkVersion target_sdk_version
  21. versionCode app_version_code
  22. versionName app_version
  23. multiDexEnabled true
  24. dataBinding {
  25. enabled = true
  26. }
  27. }
  28. sourceSets {
  29. println 'config app_device_type ===== ' + app_device_type
  30. if ("fj_h7_z_3128_1" == app_device_type) {
  31. main.java.srcDirs += 'src/main/h7_3128/java'
  32. main.res.srcDirs += 'src/main/h7_3128/res'
  33. main.manifest.srcFile 'src/main/h7_3128/AndroidManifest.xml'
  34. }
  35. }
  36. lintOptions {
  37. abortOnError false
  38. }
  39. buildTypes {
  40. release {
  41. minifyEnabled false
  42. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  43. }
  44. }
  45. compileOptions {
  46. sourceCompatibility JavaVersion.VERSION_1_8
  47. targetCompatibility JavaVersion.VERSION_1_8
  48. }
  49. }
  50. dependencies {
  51. compile fileTree(dir: 'libs', include: ['*.jar'])
  52. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  53. exclude group: 'com.android.support', module: 'support-annotations'
  54. })
  55. /**
  56. * 单元测试
  57. */
  58. testCompile 'junit:junit:4.12'
  59. /**
  60. * Android基础依赖库
  61. */
  62. compile "com.android.support:design:$support_library_version"
  63. compile "com.android.support:support-v4:$support_library_version"
  64. compile "com.android.support:cardview-v7:$support_library_version"
  65. compile "com.android.support:appcompat-v7:$support_library_version"
  66. /**
  67. * 公共库依赖
  68. */
  69. compile project(':welcome')
  70. compile project(':middleware')
  71. //janus信令
  72. compile project(':janus')
  73. /**
  74. * Dagger编译依赖
  75. */
  76. kapt 'com.google.dagger:dagger-compiler:2.7'
  77. /**
  78. * Kotlin依赖
  79. */
  80. kapt 'com.android.databinding:compiler:2.3.3'
  81. /**
  82. * 路由注解处理器
  83. */
  84. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  85. /**
  86. * constraint-layout布局依赖
  87. */
  88. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  89. //compile 'com.github.anrwatchdog:anrwatchdog:1.3.0'
  90. //使用xCrash捕获异常
  91. implementation 'com.iqiyi.xcrash:xcrash-android-lib:3.0.0'
  92. }
  93. /**
  94. * kawo组件化框架配置
  95. */
  96. if(componentTag){
  97. kawo {
  98. /**
  99. * Aop注解排除Jar
  100. */
  101. aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
  102. }
  103. }