build.gradle 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. buildscript {
  2. /**
  3. * Kotlin统一版本
  4. */
  5. ext.kotlin_version = '1.5.10'
  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 = 30
  30. /**
  31. * SDK编译版本
  32. */
  33. ext.build_tools_version = "30.0.2"
  34. /**
  35. * 支持库版本
  36. */
  37. ext.support_library_version = "28.0.0"
  38. /**
  39. * 配置要打包的模块
  40. */
  41. ext.callingdoor = false
  42. ext.android_bed = false
  43. ext.android_host = true
  44. ext.android_mobile = false
  45. ext.android_visiting = false
  46. ext.is_mom = false
  47. /**
  48. * 配置默认是否启动的设备
  49. */
  50. //床垫
  51. ext.open_sleep = false
  52. //433
  53. ext.open_433 = false
  54. //设备类型 0 医院 1 月子中心 2 养老院 3 公寓
  55. ext.device_type = "0"
  56. //设备类型 0 4g 1 串口 2 蓝牙 3 wifi
  57. ext.sleep_type = "0"
  58. //声网探视
  59. ext.is_agora = false
  60. //广播
  61. ext.is_broadcast =false
  62. if (callingdoor) {
  63. //门口机
  64. ext.app_version_code = 105
  65. ext.app_version = "1.3.5"
  66. } else if (android_bed) {
  67. //分机
  68. ext.app_version_code =105
  69. ext.app_version = "1.3.5"
  70. } else if (android_host) {
  71. //主机
  72. ext.app_version_code = 105
  73. ext.app_version = "1.3.5"
  74. } else if (android_mobile) {
  75. //移动端
  76. ext.app_version_code = 100
  77. ext.app_version = "1.3.0"
  78. } else if (android_visiting) {
  79. //家属探视机
  80. ext.app_version_code = 51
  81. ext.app_version = "1.3.1"
  82. } else {
  83. /**
  84. * APP版本码
  85. */
  86. ext.app_version_code = 100
  87. /**
  88. * APP版本号
  89. */
  90. ext.app_version = "1.3.0"
  91. }
  92. /**
  93. * 项目依赖库
  94. */
  95. dependencies {
  96. repositories {
  97. /**
  98. * 依赖仓储
  99. */
  100. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  101. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  102. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  103. //jcenter()
  104. mavenCentral()
  105. google()
  106. }
  107. /**
  108. * Gradle插件
  109. */
  110. classpath 'com.android.tools.build:gradle:4.2.2'
  111. /**
  112. * Kawo组件化插件
  113. */
  114. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  115. /**
  116. * KotlinGradle插件
  117. */
  118. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  119. /**
  120. * Kotlin辅助工具
  121. */
  122. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  123. /**
  124. * Aop埋点相关
  125. */
  126. classpath "org.aspectj:aspectjtools:$aspectj_version"
  127. }
  128. repositories {
  129. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  130. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  131. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  132. maven { url "https://jitpack.io" }
  133. jcenter()
  134. mavenCentral()
  135. google()
  136. }
  137. }
  138. /**
  139. * 统一依赖仓储
  140. */
  141. allprojects {
  142. repositories {
  143. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  144. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  145. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  146. maven { url "https://jitpack.io" }
  147. maven {
  148. // Replace snapshots by releases for releases !
  149. url "https://linphone.org/maven_repository"
  150. }
  151. jcenter()
  152. mavenCentral()
  153. google()
  154. flatDir {
  155. dirs '../common/libs' //申明本地库
  156. }
  157. }
  158. tasks.withType(Javadoc) { // 新增
  159. options.addStringOption('Xdoclint:none', '-quiet')
  160. options.addStringOption('encoding', 'UTF-8')
  161. }
  162. }
  163. /**
  164. * 清除Build配置时 删除根目录Build文件夹
  165. */
  166. task clean(type: Delete) {
  167. delete rootProject.buildDir
  168. }