versions.gradle 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. /**
  2. * Shared file between builds so that they can all use the same dependencies and
  3. * maven repositories.
  4. **/
  5. ext.deps = [:]
  6. def versions = [:]
  7. versions.android_gradle_plugin = '4.0.1'
  8. versions.kotlin = "1.4.0"
  9. versions.lifecycle = "2.2.0"
  10. versions.support = "1.0.0"
  11. versions.multidex = "1.0.2"
  12. versions.constraint_layout = "2.0.1"
  13. versions.dagger = "2.23.2"
  14. versions.glide = "4.11.0"
  15. versions.glide_transformations = "4.1.0"
  16. versions.rxjava2 = "2.2.13"
  17. versions.rx_android = "2.1.1"
  18. versions.retrofit = "2.6.2"
  19. versions.okhttp3 = "3.12.0"
  20. versions.imagepicker = "2.2.3"
  21. versions.fastjson = "1.2.46"
  22. versions.butterknife = "10.2.1"
  23. versions.event_bus = "3.1.1"
  24. versions.photo_view = "2.0.0"
  25. versions.persistent_cookie = "v1.0.1"
  26. versions.gson = "2.8.5"
  27. versions.qmui = "2.0.0-alpha10"
  28. versions.flow_layout = "1.0.3"
  29. versions.swipe_recycler = "1.1.3"
  30. versions.easy_recycler = "4.4.2"
  31. versions.utils = "1.29.0"
  32. versions.top_snackbar = "1.1.1"
  33. versions.litepal = "1.6.1"
  34. versions.material_dialog = "0.9.6.0"
  35. versions.autosize = "1.2.1"
  36. versions.circleimageview = "2.2.0" // 圆形
  37. versions.immersionbar = "3.0.0" // 沉浸式状态栏
  38. versions.baseRecyclerViewAdapterHelper = "2.9.47" // BaseRecyclerViewAdapterHelper
  39. versions.collapsibletextview = "1.1.2" // 可展开的TextView
  40. versions.lottie = "3.4.0" // 动画
  41. versions.avi = "2.1.3" // 加载动画
  42. versions.progressmanager = "1.5.0" // 进度
  43. versions.wechat_sdk = "5.3.1" // 微信
  44. versions.room = "1.1.1" // 数据库
  45. versions.loopView = "0.2.1" // 滚动选择器
  46. versions.matisse = "0.5.3-beta3" // 知乎相册选择
  47. versions.aliyun_oss = "2.9.3" // oss
  48. versions.smarttablayout = "2.0.0@aar" // Tab Layout
  49. versions.smarttablayout_ogaclejapan = "2.0.0@aar" // TabLayoutUtil
  50. versions.layoutManagerGroup = "1e6f4f96eb" // LayoutManagerGroup 'com.github.DingMouRen:LayoutManagerGroup:1e6f4f96eb'
  51. versions.niceImageView = "1.0.5" // 圆角 View com.github.SheHuan:NiceImageView:1.0.5 https://github.com/SheHuan/NiceImageView
  52. versions.pagerlayoutmanager = "2.3.8" // RecyclerView 布局管理器 com.gcssloop.recyclerview:pagerlayoutmanager:2.3.8
  53. versions.flexbox = "1.0.0" // //谷歌流式布局库
  54. versions.smartrefresh = "1.1.0" // com.scwang.smartrefresh:SmartRefreshLayout:1.1.0
  55. versions.flowlayout = "1.1.2" // com.hyman:flowlayout-lib:1.1.2
  56. versions.luban = "1.1.8" // 'top.zibin:Luban:1.1.8'
  57. versions.exoplayer = "2.11.3" // com.google.android.exoplayer:exoplayer:2.X.X'
  58. versions.danmaku = "0.9.25" // 'com.github.ctiao:DanmakuFlameMaster:0.2.25'
  59. versions.pickerView = "4.1.9" // 'com.contrarywind:Android-PickerView:4.1.9'
  60. versions.database_room = "2.2.4" // room 数据库
  61. versions.filedownloader = "1.7.7" // filedownloader 'com.liulishuo.filedownloader:library:1.7.7'
  62. versions.youth_banner = "2.0.8" // com.youth.banner:banner:2.0.8'
  63. versions.calligraphy = "2.3.0" // 'uk.co.chrisjenx:calligraphy:2.3.0' // 字体
  64. versions.gif_lib = "1.2.19" // "pl.droidsonroids.gif:android-gif-drawable:1.2.19" // gif
  65. versions.easySwipeMenuLayout = "1.1.4" // com.github.anzaizai:EasySwipeMenuLayout:1.1.4
  66. versions.fillblankview = "2.3" // 'com.xw.repo:fillblankview:2.3'
  67. versions.videoProcessor = "2.4.0" // 压缩 https://github.com/yellowcath/VideoProcessor
  68. versions.magicIndicator = "1.6.0"
  69. versions.universalimageloader = "1.9.5"
  70. versions.pageindicatorview = "1.0.3"
  71. //Arouter
  72. versions.arouter_compiler = "1.2.2"
  73. versions.arouter_api = "1.5.0"
  74. def support = [:]
  75. support.annotations = "androidx.annotation:annotation:$versions.support"
  76. support.app_compat = 'androidx.appcompat:appcompat:1.2.0'
  77. //support.v13 = "com.android.support:support-v13:$versions.support"
  78. support.percent = 'androidx.percentlayout:percentlayout:1.0.0'
  79. support.recyclerview = 'androidx.recyclerview:recyclerview:1.1.0'
  80. support.cardview = 'androidx.cardview:cardview:1.0.0'
  81. support.design = 'com.google.android.material:material:1.2.1'
  82. support.v4 = "androidx.legacy:legacy-support-v4:$versions.support"
  83. support.core_utils = "androidx.legacy:legacy-support-core-utils:$versions.support"
  84. support.multidex = 'androidx.multidex:multidex:2.0.0'
  85. deps.support = support
  86. def retrofit = [:]
  87. retrofit.runtime = "com.squareup.retrofit2:retrofit:$versions.retrofit"
  88. retrofit.adapter = "com.squareup.retrofit2:adapter-rxjava2:$versions.retrofit"
  89. retrofit.gson = "com.squareup.retrofit2:converter-gson:$versions.retrofit"
  90. deps.retrofit = retrofit
  91. def dagger = [:]
  92. dagger.runtime = "com.google.dagger:dagger:$versions.dagger"
  93. dagger.android = "com.google.dagger:dagger-android:$versions.dagger"
  94. dagger.android_support = "com.google.dagger:dagger-android-support:$versions.dagger"
  95. dagger.compiler = "com.google.dagger:dagger-compiler:$versions.dagger"
  96. dagger.android_support_compiler = "com.google.dagger:dagger-android-processor:$versions.dagger"
  97. deps.dagger = dagger
  98. def kotlin = [:]
  99. kotlin.stdlib = "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0"
  100. kotlin.coroutines_android = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6"
  101. kotlin.coroutines_core = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6"
  102. deps.kotlin = kotlin
  103. def lifecycle = [:]
  104. // ViewModel
  105. lifecycle.viewmodel = "androidx.lifecycle:lifecycle-viewmodel-ktx:$versions.lifecycle"
  106. // LiveData
  107. lifecycle.livedata = "androidx.lifecycle:lifecycle-livedata-ktx:$versions.lifecycle"
  108. // ProcessLife
  109. lifecycle.process = "androidx.lifecycle:lifecycle-process:$versions.lifecycle"
  110. // alternately - if using Java8, use the following instead of lifecycle-compiler
  111. lifecycle.common = "androidx.lifecycle:lifecycle-common-java8:$versions.lifecycle"
  112. deps.lifecycle = lifecycle
  113. //view
  114. deps.constraint_layout = "androidx.constraintlayout:constraintlayout:$versions.constraint_layout"
  115. deps.qmui = "com.qmuiteam:qmui:$versions.qmui"
  116. deps.flow_layout = "com.zhy:flowlayout-lib:$versions.flow_layout"
  117. deps.swipe_recycler = "com.yanzhenjie:recyclerview-swipe:$versions.swipe_recycler"
  118. deps.easy_recycler = "com.jude:easyrecyclerview:$versions.easy_recycler"
  119. deps.photo_view = "com.github.chrisbanes:PhotoView:$versions.photo_view"
  120. deps.material_dialog = "com.afollestad.material-dialogs:core:$versions.material_dialog"
  121. deps.android_gradle_plugin = "com.android.tools.build:gradle:$versions.android_gradle_plugin"
  122. deps.kotlin_gradle_plugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlin"
  123. deps.rxjava2 = "io.reactivex.rxjava2:rxjava:$versions.rxjava2"
  124. deps.rx_android = "io.reactivex.rxjava2:rxandroid:$versions.rx_android"
  125. deps.okhttp3 = "com.squareup.okhttp3:okhttp:$versions.okhttp3"
  126. deps.logging_interceptor = "com.squareup.okhttp3:logging-interceptor:$versions.okhttp3"
  127. deps.glide = "com.github.bumptech.glide:glide:$versions.glide"
  128. deps.glide_compiler = "com.github.bumptech.glide:compiler:$versions.glide"
  129. deps.glide_transformations = "jp.wasabeef:glide-transformations:$versions.glide_transformations"
  130. deps.event_bus = "org.greenrobot:eventbus:$versions.event_bus"
  131. deps.persistent_cookie = "com.github.franmontiel:PersistentCookieJar:$versions.persistent_cookie"
  132. deps.gson = "com.google.code.gson:gson:$versions.gson"
  133. deps.fastjson = "com.alibaba:fastjson:$versions.fastjson"
  134. deps.utils = "com.blankj:utilcodex:$versions.utils"
  135. deps.top_snackbar = "com.androidadvance:topsnackbar:$versions.top_snackbar"
  136. deps.litepal = "org.litepal.android:core:$versions.litepal"
  137. deps.arouter_api = "com.alibaba:arouter-api:$versions.arouter_api"
  138. deps.arouter_compiler = "com.alibaba:arouter-compiler:$versions.arouter_compiler"
  139. deps.butterknife = "com.jakewharton:butterknife:$versions.butterknife"
  140. deps.butterknife_annotationProcessor = "com.jakewharton:butterknife-compiler:$versions.butterknife"
  141. deps.butterknife_gradle_plugin = "com.jakewharton:butterknife-gradle-plugin:$versions.butterknife"
  142. deps.autosize = "me.jessyan:autosize:$versions.autosize"
  143. deps.circleimageview = "de.hdodenhof:circleimageview:$versions.circleimageview"
  144. deps.baseRecyclerViewAdapterHelper = "com.github.CymChad:BaseRecyclerViewAdapterHelper:$versions.baseRecyclerViewAdapterHelper"
  145. deps.collapsibletextview = "com.timqi.collapsibletextview:library:$versions.collapsibletextview"
  146. deps.lottie = "com.airbnb.android:lottie:$versions.lottie"
  147. deps.avi = "com.wang.avi:library:$versions.avi"
  148. deps.progressmanager = "me.jessyan:progressmanager:$versions.progressmanager"
  149. deps.imagepicker = "com.lcw.library:imagepicker:$versions.imagepicker"
  150. deps.wechat_sdk = "com.tencent.mm.opensdk:wechat-sdk-android-without-mta:$versions.wechat_sdk"
  151. deps.immersionbar = "com.gyf.immersionbar:immersionbar:$versions.immersionbar"
  152. deps.immersionbar_components = "com.gyf.immersionbar:immersionbar-components:$versions.immersionbar"
  153. deps.room_runtime = "android.arch.persistence.room:runtime:$versions.room"
  154. deps.room_compiler = "android.arch.persistence.room:compiler:$versions.room"
  155. deps.loopView = "com.weigan:loopView:$versions.loopView"
  156. deps.matisse = "com.zhihu.android:matisse:$versions.matisse"
  157. deps.aliyun_oss = "com.aliyun.dpa:oss-android-sdk:$versions.aliyun_oss"
  158. deps.smarttablayout = "com.ogaclejapan.smarttablayout:library:$versions.smarttablayout"
  159. deps.smarttablayout_ogaclejapan = "com.ogaclejapan.smarttablayout:utils-v4:$versions.smarttablayout_ogaclejapan"
  160. deps.layoutManagerGroup = "com.github.DingMouRen:LayoutManagerGroup:$versions.layoutManagerGroup"
  161. deps.niceImageView = "com.github.SheHuan:NiceImageView:$versions.niceImageView"
  162. deps.pagerlayoutmanager = "com.gcssloop.recyclerview:pagerlayoutmanager:$versions.pagerlayoutmanager"
  163. deps.flexbox = "com.google.android:flexbox:$versions.flexbox"
  164. deps.smartrefresh = "com.scwang.smartrefresh:SmartRefreshLayout:$versions.smartrefresh"
  165. deps.smartRefreshHeader = "com.scwang.smartrefresh:SmartRefreshHeader:$versions.smartrefresh"
  166. deps.flowlayout = "com.hyman:flowlayout-lib:$versions.flowlayout"
  167. deps.luban = "top.zibin:Luban:$versions.luban"
  168. deps.exoplayer = "com.google.android.exoplayer:exoplayer-core:$versions.exoplayer"
  169. deps.exoplayer_ui = "com.google.android.exoplayer:exoplayer-ui:$versions.exoplayer"
  170. deps.danmaku = "com.github.ctiao:DanmakuFlameMaster:$versions.danmaku"
  171. deps.viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
  172. deps.pickerView = "com.contrarywind:Android-PickerView:$versions.pickerView"
  173. deps.room_runtime = "androidx.room:room-runtime:$versions.database_room"
  174. deps.room_rxjava2 = "androidx.room:room-compiler:$versions.database_room"
  175. deps.room_compiler = "androidx.room:room-rxjava2:$versions.database_room"
  176. deps.filedownloader = "com.liulishuo.filedownloader:library:$versions.filedownloader"
  177. deps.youth_banner = "com.youth.banner:banner:$versions.youth_banner"
  178. deps.calligraphy = "uk.co.chrisjenx:calligraphy:$versions.calligraphy"
  179. deps.gif_lib = "pl.droidsonroids.gif:android-gif-drawable:$versions.gif_lib"
  180. deps.easySwipeMenuLayout = "com.github.anzaizai:EasySwipeMenuLayout:$versions.easySwipeMenuLayout"
  181. deps.fillblankview = "com.xw.repo:fillblankview:$versions.fillblankview"
  182. deps.videoProcessor = "com.github.yellowcath:VideoProcessor:$versions.videoProcessor"
  183. deps.magicIndicator = "com.github.hackware1993:MagicIndicator:$versions.magicIndicator"
  184. deps.universalimageloader = "com.nostra13.universalimageloader:universal-image-loader:$versions.universalimageloader"
  185. deps.pageindicatorview = "com.romandanylyk:pageindicatorview:$versions.pageindicatorview"
  186. ext.deps = deps
  187. def build_versions = [:]
  188. build_versions.min_sdk = 21
  189. build_versions.target_sdk = 29
  190. build_versions.build_tools = "29.0.3"
  191. build_versions.version_code = 29
  192. build_versions.version_name = "2.2.0"
  193. ext.build_versions = build_versions
  194. def addRepos(RepositoryHandler handler) {
  195. handler.google()
  196. handler.jcenter()
  197. handler.mavenCentral()
  198. //Add the JitPack repository
  199. handler.maven { url "https://jitpack.io" }
  200. handler.maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  201. }
  202. ext.addRepos = this.&addRepos