build.gradle 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. compileSdkVersion target_sdk_version
  13. buildToolsVersion build_tools_version
  14. aaptOptions.cruncherEnabled = false
  15. aaptOptions.useNewCruncher = false
  16. defaultConfig {
  17. applicationId "com.enation.app.javashop"
  18. minSdkVersion min_sdk_version
  19. targetSdkVersion target_sdk_version
  20. versionCode app_version_code
  21. versionName app_version
  22. multiDexEnabled true
  23. dataBinding {
  24. enabled = true
  25. }
  26. ndk {
  27. //选择要添加的对应cpu类型的.so库。
  28. abiFilters 'armeabi', 'armeabi-v7a', 'armeabi-v8a' ,'x86', 'x86_64', 'mips', 'mips64'
  29. }
  30. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  31. }
  32. buildTypes {
  33. release {
  34. minifyEnabled false
  35. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  36. }
  37. debug {
  38. minifyEnabled false
  39. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  40. }
  41. }
  42. sourceSets {
  43. main.java.srcDirs += 'src/main/code'
  44. }
  45. lintOptions{
  46. checkReleaseBuilds false
  47. abortOnError false
  48. }
  49. dexOptions {
  50. javaMaxHeapSize "4g"
  51. jumboMode=true
  52. preDexLibraries=true
  53. threadCount=8
  54. }
  55. }
  56. dependencies {
  57. compile fileTree(include: ['*.jar'], dir: 'libs')
  58. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  59. exclude group: 'com.android.support', module: 'support-annotations'
  60. })
  61. /**
  62. * 单元测试
  63. */
  64. testCompile 'junit:junit:4.12'
  65. /**
  66. * Dagger编译依赖
  67. */
  68. kapt 'com.google.dagger:dagger-compiler:2.7'
  69. /**
  70. * 内存泄漏监控
  71. */
  72. debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
  73. releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  74. testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
  75. /**
  76. * Kotlin依赖
  77. */
  78. kapt 'com.android.databinding:compiler:2.3.3'
  79. /**
  80. * 路由注解处理器
  81. */
  82. kapt "com.enation.geamtear:jrouter-compiler:$router_version"
  83. /**
  84. * 外部化Moudle配置
  85. * moudle独立编译配置
  86. */
  87. if (!componentTag) {
  88. compile project(':welcome') // ===> 开始模块 建议在模块内添加广告 欢迎页 等页面
  89. compile project(':home') // ===> 主页模块 里面一般是App的首页 分类楼层页面
  90. compile project(':cart') // ===> 购物车模块 主要就是购物车的逻辑的Item
  91. compile project(':goods') // ===> 商品模块 主要是商品列表 商品详细 等等页面
  92. compile project(':member') // ===> 会员模块 主要是会员信息 会员修改 会员主页 等
  93. compile project(':order') // ===> 订单模块 订单列表 详细 退货等
  94. compile project(':promotion') // ===> 促销模块 秒杀 团购 等
  95. compile project(':shop') // ===> 店铺模块 店铺列表 详细 等
  96. compile project(':setting') // ===> 设置模块 设置 缓存 App分享等
  97. compile project(':extra') // ===> 额外的一些页面 比如二维码扫描等一些附加功能
  98. }
  99. /**
  100. * JavaShopAndroid 中间件依赖库
  101. */
  102. compile project(':middleware')
  103. /**
  104. * constraint-layout布局依赖
  105. */
  106. compile 'com.android.support.constraint:constraint-layout:1.1.0-beta5'
  107. }
  108. ///**
  109. // * kawo组件化框架配置
  110. // */
  111. //kawo {
  112. // /**
  113. // * Aop注解排除Jar
  114. // */
  115. // aspectExcludeJarFilter 'com.enation.geamtear.pay','AlipaySdk'
  116. //}
  117. //