build.gradle 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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.1.0"
  38. /**
  39. * APP类型版本,参考: https://inxsfc.notion.site/APP-4d9b6bfee5c24b91b8f4337ca0830423
  40. * ZJ-H10_Z_3128-1H: 医院版3128 10寸主机
  41. * ZJ-H10_W_KE-1H: 医院版卡尔10寸主机
  42. * ...
  43. */
  44. ext.app_device_type = "zj_h10_z_3128_1"
  45. if (app_device_type == "zj_h10_z_3128_1") {
  46. //rk3128 10寸护士主机
  47. ext.app_version_code = 70
  48. ext.app_version = "1.1.56"
  49. } else if (app_device_type == "zj_h10_w_ke_1") {
  50. //卡尔10寸护士主机
  51. ext.app_version_code = 62
  52. ext.app_version = "1.1.47"
  53. }
  54. else {
  55. ext.app_version_code = 48
  56. ext.app_version = "1.1.34"
  57. }
  58. /**
  59. * 项目依赖库
  60. */
  61. dependencies {
  62. repositories {
  63. /**
  64. * 依赖仓储
  65. */
  66. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  67. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  68. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  69. jcenter()
  70. mavenCentral()
  71. google()
  72. }
  73. /**
  74. * Gradle插件
  75. */
  76. classpath 'com.android.tools.build:gradle:3.0.1'
  77. /**
  78. * Kawo组件化插件
  79. */
  80. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  81. /**
  82. * KotlinGradle插件
  83. */
  84. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  85. /**
  86. * Kotlin辅助工具
  87. */
  88. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  89. /**
  90. * Aop埋点相关
  91. */
  92. classpath "org.aspectj:aspectjtools:$aspectj_version"
  93. }
  94. repositories {
  95. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  96. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  97. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  98. google()
  99. maven {
  100. // Replace snapshots by releases for releases !
  101. url "https://linphone.org/maven_repository"
  102. }
  103. }
  104. }
  105. /**
  106. * 统一依赖仓储
  107. */
  108. allprojects {
  109. repositories {
  110. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  111. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  112. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  113. jcenter()
  114. mavenCentral()
  115. google()
  116. maven { url "https://jitpack.io" }
  117. maven {
  118. // Replace snapshots by releases for releases !
  119. url "https://linphone.org/maven_repository"
  120. }
  121. }
  122. }
  123. /**
  124. * 清除Build配置时 删除根目录Build文件夹
  125. */
  126. task clean(type: Delete) {
  127. delete rootProject.buildDir
  128. }