build.gradle 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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_xiaomi_2"
  37. if (app_device_type == "yd_s5_w_qin2_2") {
  38. /**
  39. * SDK编译版本
  40. */
  41. ext.build_tools_version = "26.0.2"
  42. /**
  43. * 支持库版本
  44. */
  45. ext.support_library_version = "26.1.0"
  46. //多亲手机版本
  47. ext.app_version_code = 139
  48. ext.app_version = "1.3.57_qin2"
  49. } else if (app_device_type == "yd_w_xiaomi_2") {
  50. /**
  51. * SDK编译版本
  52. */
  53. ext.build_tools_version = "30.0.2"
  54. /**
  55. * 支持库版本
  56. */
  57. ext.support_library_version = "28.0.0"
  58. //小米手机版本
  59. ext.app_version_code = 140
  60. ext.app_version = "1.3.58_redmi"
  61. }
  62. else {
  63. /**
  64. * SDK编译版本
  65. */
  66. ext.build_tools_version = "26.0.2"
  67. /**
  68. * 支持库版本
  69. */
  70. ext.support_library_version = "26.1.0"
  71. ext.app_version_code = 139
  72. ext.app_version = "1.3.57"
  73. }
  74. /**
  75. * 项目依赖库
  76. */
  77. dependencies {
  78. repositories {
  79. /**
  80. * 依赖仓储
  81. */
  82. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  83. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  84. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  85. maven { url 'https://jitpack.io' }
  86. }
  87. /**
  88. * Gradle插件
  89. */
  90. classpath "com.android.tools.build:gradle:4.2.2"
  91. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  92. // NOTE: Do not place your application dependencies here; they belong
  93. // in the individual module build.gradle files
  94. /**
  95. * Kawo组件化插件
  96. */
  97. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  98. /**
  99. * KotlinGradle插件
  100. */
  101. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  102. /**
  103. * Kotlin辅助工具
  104. */
  105. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  106. /**
  107. * Aop埋点相关
  108. */
  109. classpath "org.aspectj:aspectjtools:$aspectj_version"
  110. }
  111. repositories {
  112. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  113. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  114. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  115. maven { url 'https://jitpack.io' }
  116. }
  117. }
  118. /**
  119. * 统一依赖仓储
  120. */
  121. allprojects {
  122. repositories {
  123. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  124. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  125. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  126. maven { url 'https://jitpack.io' }
  127. //maven { url 'https://dl.bintray.com/geamtear/maven' }
  128. }
  129. tasks.withType(Javadoc) { // 新增
  130. options.addStringOption('Xdoclint:none', '-quiet')
  131. options.addStringOption('encoding', 'UTF-8')
  132. }
  133. }
  134. /**
  135. * 清除Build配置时 删除根目录Build文件夹
  136. */
  137. task clean(type: Delete) {
  138. delete rootProject.buildDir
  139. }