build.gradle 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. buildscript {
  2. /**
  3. * Kotlin统一版本
  4. */
  5. //ext.kotlin_version = '1.3.21'
  6. ext.kotlin_version = "1.5.10"
  7. /**
  8. * Aop编制版本
  9. */
  10. ext.aspectj_version = '1.8.9'
  11. /**
  12. * 是否开启单独Module编译
  13. */
  14. ext.componentTag = false
  15. /**
  16. * 路由注解处理器版本
  17. */
  18. ext.router_version = '1.0.2'
  19. /**
  20. * kawo组件化框架版本
  21. */
  22. ext.kawo_version = '1.0.9'
  23. /**
  24. * SDK最小支持版本
  25. */
  26. ext.min_sdk_version = 24
  27. /**
  28. * SDK目标支持版本
  29. */
  30. ext.target_sdk_version = 30
  31. /**
  32. * APP类型版本,参考: https://inxsfc.notion.site/APP-4d9b6bfee5c24b91b8f4337ca0830423
  33. * YD-S5-W_QIN2PRO-2: 多亲手机
  34. * ...
  35. */
  36. ext.app_device_type = "yd_w_gionee_2"
  37. //腕表类型:g6s,asr
  38. ext.watch_type = ""
  39. if (app_device_type == "yd_s5_w_qin2_2") {
  40. ext.build_tools_version = "26.0.2"
  41. ext.support_library_version = "26.1.0"
  42. //多亲手机版本
  43. ext.app_version_code = 153
  44. ext.app_version = "1.4.4_qin2"
  45. } else if (app_device_type == "yd_s5_w_qin2_2_chile") {
  46. ext.build_tools_version = "26.0.2"
  47. ext.support_library_version = "26.1.0"
  48. //多亲手机版本-智利项目
  49. ext.app_version_code = 145
  50. ext.app_version = "1.4.2_qin2"
  51. } else if (app_device_type == "yd_w_xiaomi_2") {
  52. ext.build_tools_version = "30.0.2"
  53. ext.support_library_version = "28.0.0"
  54. //小米手机版本
  55. ext.app_version_code = 163
  56. ext.app_version = "1.4.14_rm"
  57. } else if (app_device_type == "yd_w_xiaomi_2_chile") {
  58. ext.build_tools_version = "30.0.2"
  59. ext.support_library_version = "28.0.0"
  60. //小米手机版本
  61. ext.app_version_code = 156
  62. ext.app_version = "1.4.7_rm"
  63. } else if (app_device_type == "yd_w_gionee_2") {
  64. ext.build_tools_version = "30.0.2"
  65. ext.support_library_version = "28.0.0"
  66. //金立手机,L2型号Android 14版手机
  67. ext.app_version_code = 175
  68. ext.app_version = "1.4.25_gn"
  69. } else if (app_device_type == "yd_w_gionee_2_chile") {
  70. ext.build_tools_version = "30.0.2"
  71. ext.support_library_version = "28.0.0"
  72. //金立手机
  73. ext.app_version_code = 160
  74. ext.app_version = "1.4.10_gn"
  75. } else if (app_device_type == "yd_watch_2") {
  76. ext.build_tools_version = "26.0.2"
  77. ext.support_library_version = "26.1.0"
  78. //腕表类型:g6s,asr
  79. ext.watch_type = "asr"
  80. if (watch_type == "g6s") {
  81. //g6s腕表
  82. ext.app_version_code = 10005
  83. ext.app_version = "1.10.5_g6s"
  84. } else if (watch_type == "asr") {
  85. //新款asr H07腕表
  86. ext.app_version_code = 6
  87. ext.app_version = "1.1.6_asr"
  88. } else {
  89. //其他腕表
  90. ext.app_version_code = 11
  91. ext.app_version = "1.4.2_watch"
  92. }
  93. }
  94. else {
  95. /**
  96. * SDK编译版本
  97. */
  98. ext.build_tools_version = "26.0.2"
  99. /**
  100. * 支持库版本
  101. */
  102. ext.support_library_version = "26.1.0"
  103. ext.app_version_code = 139
  104. ext.app_version = "1.3.57"
  105. }
  106. /**
  107. * 项目依赖库
  108. */
  109. dependencies {
  110. repositories {
  111. /**
  112. * 依赖仓储
  113. */
  114. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  115. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  116. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  117. maven { url 'https://jitpack.io' }
  118. google()
  119. }
  120. /**
  121. * Gradle插件
  122. */
  123. classpath "com.android.tools.build:gradle:4.2.2"
  124. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  125. // NOTE: Do not place your application dependencies here; they belong
  126. // in the individual module build.gradle files
  127. /**
  128. * Kawo组件化插件
  129. */
  130. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  131. /**
  132. * KotlinGradle插件
  133. */
  134. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  135. /**
  136. * Kotlin辅助工具
  137. */
  138. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  139. /**
  140. * Aop埋点相关
  141. */
  142. classpath "org.aspectj:aspectjtools:$aspectj_version"
  143. }
  144. repositories {
  145. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  146. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  147. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  148. maven { url 'https://jitpack.io' }
  149. google()
  150. }
  151. }
  152. /**
  153. * 统一依赖仓储
  154. */
  155. allprojects {
  156. repositories {
  157. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  158. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  159. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  160. maven { url 'https://jitpack.io' }
  161. //maven { url 'https://dl.bintray.com/geamtear/maven' }
  162. google()
  163. flatDir {
  164. dirs '../common/libs' //申明本地库
  165. }
  166. }
  167. tasks.withType(Javadoc) { // 新增
  168. options.addStringOption('Xdoclint:none', '-quiet')
  169. options.addStringOption('encoding', 'UTF-8')
  170. }
  171. }
  172. /**
  173. * 清除Build配置时 删除根目录Build文件夹
  174. */
  175. task clean(type: Delete) {
  176. delete rootProject.buildDir
  177. }