build.gradle 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. buildscript {
  2. /**
  3. * Kotlin统一版本
  4. */
  5. ext.kotlin_version = '1.2.40'
  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版本码
  40. */
  41. ext.app_version_code = 14
  42. /**
  43. * APP版本号
  44. */
  45. ext.app_version = "1.0.14"
  46. /**
  47. * 项目依赖库
  48. */
  49. dependencies {
  50. repositories {
  51. /**
  52. * 依赖仓储
  53. */
  54. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  55. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  56. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  57. //jcenter()
  58. mavenCentral()
  59. google()
  60. }
  61. /**
  62. * Gradle插件
  63. */
  64. classpath 'com.android.tools.build:gradle:3.0.1'
  65. /**
  66. * Kawo组件化插件
  67. */
  68. classpath "com.enation.geamtear.gradle:kawo:$kawo_version"
  69. /**
  70. * KotlinGradle插件
  71. */
  72. classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  73. /**
  74. * Kotlin辅助工具
  75. */
  76. classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
  77. /**
  78. * Aop埋点相关
  79. */
  80. classpath "org.aspectj:aspectjtools:$aspectj_version"
  81. }
  82. repositories {
  83. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  84. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  85. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  86. jcenter()
  87. mavenCentral()
  88. google()
  89. maven { url "https://jitpack.io" }
  90. }
  91. }
  92. /**
  93. * 统一依赖仓储
  94. */
  95. allprojects {
  96. repositories {
  97. maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
  98. maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}
  99. maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
  100. jcenter()
  101. mavenCentral()
  102. google()
  103. maven { url "https://jitpack.io" }
  104. }
  105. tasks.withType(Javadoc) { // 新增
  106. options.addStringOption('Xdoclint:none', '-quiet')
  107. options.addStringOption('encoding', 'UTF-8')
  108. }
  109. }
  110. /**
  111. * 清除Build配置时 删除根目录Build文件夹
  112. */
  113. task clean(type: Delete) {
  114. delete rootProject.buildDir
  115. }