build.gradle 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'realm-android'
  3. android {
  4. compileSdkVersion rootProject.ext.android.compileSdkVersion
  5. defaultConfig {
  6. minSdkVersion rootProject.ext.android.minSdkVersion
  7. targetSdkVersion rootProject.ext.android.targetSdkVersion
  8. versionCode rootProject.ext.android.versionCode
  9. versionName rootProject.ext.android.versionName
  10. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  11. vectorDrawables.useSupportLibrary = true
  12. javaCompileOptions {
  13. annotationProcessorOptions {
  14. includeCompileClasspath = true
  15. }
  16. }
  17. }
  18. lintOptions {
  19. abortOnError false
  20. }
  21. buildTypes {
  22. release {
  23. minifyEnabled false
  24. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  25. }
  26. release {
  27. minifyEnabled false
  28. }
  29. // 注意这里,跟第一点的 raedebugCompile project的configuration要匹配。
  30. zj_release {
  31. initWith release
  32. }
  33. }
  34. }
  35. dependencies {
  36. compile fileTree(include: ['*.jar'], dir: 'libs')
  37. // androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
  38. // exclude group: 'com.android.support', module: 'support-annotations'
  39. // })
  40. compile rootProject.ext.dependencies.appcompatV7
  41. compile rootProject.ext.dependencies.recyclerviewV7
  42. compile rootProject.ext.dependencies.design
  43. compile rootProject.ext.dependencies.cardviewV7
  44. compile rootProject.ext.dependencies.supportV4
  45. compile rootProject.ext.dependencies.constraint
  46. //Log日志打印库
  47. compile rootProject.ext.dependencies.xlog
  48. //网络请求库
  49. compile rootProject.ext.dependencies.okgo
  50. //九宫格图片
  51. compile rootProject.ext.dependencies.ninegridview
  52. //图片框架
  53. compile rootProject.ext.dependencies.glide
  54. annotationProcessor rootProject.ext.dependencies.compiler
  55. compile rootProject.ext.dependencies.transformations
  56. //为"单Activity + 多Fragment","多模块Activity + 多Fragment"架构而生,替代官方fragment
  57. compile rootProject.ext.dependencies.fragmentation
  58. //事件总线 eventBus
  59. compile rootProject.ext.dependencies.eventbus
  60. //透明状态栏导航栏、沉浸式状态栏导航栏的终极解决方案
  61. compile(rootProject.ext.dependencies.statusbarutil) {
  62. exclude group: 'com.android.support' //exclude 可以解决 lib冲突的问题。
  63. }
  64. /*时间轴*/
  65. compile rootProject.ext.dependencies.poweradapter
  66. //RecyclerView的强大的BaseAdapter
  67. compile rootProject.ext.dependencies.BaseRecyclerViewAdapterHelper
  68. compile rootProject.ext.dependencies.fastjson
  69. compile rootProject.ext.dependencies.gson
  70. compile rootProject.ext.dependencies.Toasty
  71. /*沉浸式状态栏*/
  72. // compile rootProject.ext.dependencies.barlibrary
  73. /*启动的粒子动画*/
  74. compile rootProject.ext.dependencies.ParticleView
  75. /*底部导航栏*/
  76. compile rootProject.ext.dependencies.JPTabBar
  77. /*Android智能下拉刷新框架*/
  78. compile rootProject.ext.dependencies.SmartRefreshLayout
  79. compile rootProject.ext.dependencies.SmartRefreshHeader
  80. /*ViewPagerIndicator 导航*/
  81. compile rootProject.ext.dependencies.ViewPagerIndicator
  82. /*Spinner*/
  83. compile rootProject.ext.dependencies.Spinner
  84. //拍照添加图片库
  85. compile rootProject.ext.dependencies.takephoto
  86. /*视频拍摄库*/
  87. compile rootProject.ext.dependencies.LandscapeVideoCamera
  88. /*涂鸦库*/
  89. compile rootProject.ext.dependencies.graffiti
  90. /*权限管理库*/
  91. compile rootProject.ext.dependencies.hipermission
  92. compile rootProject.ext.dependencies.permission
  93. /*apk更新库*/
  94. compile rootProject.ext.dependencies.updateplugin
  95. /*视频播放器*/
  96. compile rootProject.ext.dependencies.gsyVideoPlayer
  97. /*日期选择器*/
  98. compile rootProject.ext.dependencies.TimePickerDialog
  99. /*图片选择*/
  100. compile rootProject.ext.dependencies.PictureSelector
  101. /*腾讯云精简版*/
  102. compile (rootProject.ext.dependencies.cosxmlLite){
  103. // 增加这行
  104. exclude group: 'com.tencent.qcloud', module: 'beacon-android-release'
  105. }
  106. compile 'com.android.support:multidex:1.0.3'
  107. compile 'com.aliyun.dpa:oss-android-sdk:2.9.5'
  108. testImplementation 'junit:junit:4.12'
  109. api files('libs/zxing_core_3.0.1.jar')
  110. }
  111. configurations.all {
  112. resolutionStrategy.eachDependency { details ->
  113. def requested = details.requested
  114. if (requested.group == 'com.android.support') {
  115. if (!requested.name.startsWith("multidex")) {
  116. //这里写你想统一的版本是多少,前提是你sdk里有
  117. details.useVersion '27.0.1'
  118. }
  119. }
  120. }
  121. }