build.gradle 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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. ext.app_device_type = "mk_h10_a133_1"
  39. //UI版本: default, mom, yanglao
  40. ext.ui_type = "default"
  41. if (app_device_type == "mk_h10_z_3128_1") {
  42. //rk3128 10寸门口机
  43. ext.app_version_code = 61
  44. ext.app_version = "1.2.11"
  45. } else if (app_device_type == "mk_h10_a133_1") {
  46. //志合a133 10寸门口机
  47. ext.app_version_code = 64
  48. ext.app_version = "1.2.15"
  49. } else if (app_device_type == "mk_h10_z_3128_1_chile") {
  50. //rk3128 10寸门口机-智利
  51. ext.app_version_code = 50
  52. ext.app_version = "1.2.1"
  53. } else if (app_device_type == "mk_h10_w_a133_1_chile") {
  54. //志合A133 10寸门口机-智利
  55. ext.app_version_code = 58
  56. ext.app_version = "1.2.8"
  57. }
  58. else {
  59. ext.app_version_code = 1
  60. ext.app_version = "1.1.0"
  61. }
  62. /**
  63. * 项目依赖库
  64. */
  65. dependencies {
  66. repositories {
  67. /**
  68. * 依赖仓储
  69. */
  70. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  71. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  72. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  73. //jcenter()
  74. mavenCentral()
  75. google()
  76. }
  77. /**
  78. * Gradle插件
  79. */
  80. classpath 'com.android.tools.build:gradle:4.2.2'
  81. /**
  82. * Kawo组件化插件
  83. */
  84. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  85. /**
  86. * KotlinGradle插件
  87. */
  88. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  89. /**
  90. * Kotlin辅助工具
  91. */
  92. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  93. /**
  94. * Aop埋点相关
  95. */
  96. classpath "org.aspectj:aspectjtools:$aspectj_version"
  97. }
  98. repositories {
  99. maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
  100. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
  101. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  102. maven { url 'https://jitpack.io' }
  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. maven { url 'https://jitpack.io' }
  114. //maven { url 'https://dl.bintray.com/geamtear/maven' }
  115. flatDir {
  116. dirs '../common/libs' //申明本地库
  117. }
  118. }
  119. tasks.withType(Javadoc) { // 新增
  120. options.addStringOption('Xdoclint:none', '-quiet')
  121. options.addStringOption('encoding', 'UTF-8')
  122. }
  123. }
  124. /**
  125. * 清除Build配置时 删除根目录Build文件夹
  126. */
  127. task clean(type: Delete) {
  128. delete rootProject.buildDir
  129. }