build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. buildscript {
  2. /**
  3. * Kotlin统一版本
  4. */
  5. ext.kotlin_version = '1.3.21'
  6. /**
  7. * Aop编制版本
  8. */
  9. ext.aspectj_version = '1.8.9'
  10. /**
  11. * 是否开启单独Module编译
  12. */
  13. ext.componentTag = false
  14. /**
  15. * 路由注解处理器版本
  16. */
  17. ext.router_version = '1.0.2'
  18. /**
  19. * kawo组件化框架版本
  20. */
  21. ext.kawo_version = '1.0.9'
  22. /**
  23. * SDK最小支持版本
  24. */
  25. ext.min_sdk_version = 24
  26. /**
  27. * SDK目标支持版本
  28. */
  29. ext.target_sdk_version = 28
  30. /**
  31. * SDK编译版本
  32. */
  33. ext.build_tools_version = "26.0.2"
  34. /**
  35. * 支持库版本
  36. */
  37. ext.support_library_version = "26.0.1"
  38. /**
  39. * APP类型版本,参考: https://inxsfc.notion.site/APP-4d9b6bfee5c24b91b8f4337ca0830423
  40. * FJ-H5-Z_3128-1: 医院版5寸分机
  41. * FJ-H7_Z_3128_1: 医院版7寸分机
  42. * ...
  43. */
  44. ext.app_device_type = "fj_h5_z_3128_1"
  45. if (app_device_type == "fj_h5_z_3128_1") {
  46. //rk3128 5寸分机
  47. ext.app_version_code = 38
  48. ext.app_version = "1.1.32"
  49. }
  50. else if (app_device_type == "fj_h7_z_3128_1") {
  51. //rk3128 7寸分机
  52. ext.app_version_code = 35
  53. ext.app_version = "1.1.21"
  54. }
  55. else if (app_device_type == "fj_h10_w_yld_1") {
  56. //亿莱顿可视分机
  57. ext.app_version_code = 35
  58. ext.app_version = "1.1.21"
  59. }
  60. else if (app_device_type == "fj_h7_z_3128_2") {
  61. //rk3128 7寸月子中心分机
  62. ext.app_version_code = 12
  63. ext.app_version = "1.1.12"
  64. }
  65. else {
  66. ext.app_version_code = 1
  67. ext.app_version = "1.1.0"
  68. }
  69. /**
  70. * 项目依赖库
  71. */
  72. dependencies {
  73. repositories {
  74. /**
  75. * 依赖仓储
  76. */
  77. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  78. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  79. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  80. //jcenter()
  81. mavenCentral()
  82. google()
  83. }
  84. /**
  85. * Gradle插件
  86. */
  87. classpath 'com.android.tools.build:gradle:3.0.1'
  88. /**
  89. * Kawo组件化插件
  90. */
  91. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  92. /**
  93. * KotlinGradle插件
  94. */
  95. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  96. /**
  97. * Kotlin辅助工具
  98. */
  99. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  100. /**
  101. * Aop埋点相关
  102. */
  103. classpath "org.aspectj:aspectjtools:$aspectj_version"
  104. }
  105. repositories {
  106. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  107. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  108. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  109. jcenter()
  110. mavenCentral()
  111. google()
  112. maven { url "https://jitpack.io" }
  113. }
  114. }
  115. /**
  116. * 统一依赖仓储
  117. */
  118. allprojects {
  119. repositories {
  120. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  121. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  122. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  123. jcenter()
  124. mavenCentral()
  125. google()
  126. maven { url "https://jitpack.io" }
  127. }
  128. tasks.withType(Javadoc) { // 新增
  129. options.addStringOption('Xdoclint:none', '-quiet')
  130. options.addStringOption('encoding', 'UTF-8')
  131. }
  132. }
  133. /**
  134. * 清除Build配置时 删除根目录Build文件夹
  135. */
  136. task clean(type: Delete) {
  137. delete rootProject.buildDir
  138. }