build.gradle 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. plugins {
  2. id 'org.springframework.boot' version '2.6.1' apply(false)
  3. id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply(false)
  4. id 'java'
  5. id 'war'
  6. }
  7. // 所有子项目通用配置
  8. subprojects {
  9. group = 'com.songmao'
  10. version = '1.0.0'
  11. apply plugin: 'java'
  12. apply plugin: 'war'
  13. project (':analog-api', {
  14. apply plugin: 'org.springframework.boot'
  15. //提供类似Maven dependencyManagement依赖管理功能
  16. apply plugin: 'io.spring.dependency-management'
  17. })
  18. // 指定子项目配置
  19. /*configure (subprojects.findAll({
  20. // 满足条件的子模块应用配置
  21. it.name == 'analog-api'
  22. }), {
  23. apply plugin: 'org.springframework.boot'
  24. //提供类似Maven dependencyManagement依赖管理功能
  25. apply plugin: 'io.spring.dependency-management'
  26. })*/
  27. // 指定子项目配置
  28. /*configure (subprojects.findAll(){
  29. // 满足条件的子模块应用配置
  30. it.name == 'songmao-common'
  31. }) {
  32. bootJar {
  33. // 符合条件的子项目不使用bootJar打包方式
  34. enabled = false
  35. }
  36. }*/
  37. // Task type of JavaCompile
  38. tasks.withType(JavaCompile, {
  39. //enable compilation in a separate daemon process
  40. sourceCompatibility = 8
  41. targetCompatibility = 8
  42. //options.release = 8
  43. // default to true
  44. options.incremental = true
  45. // default to true
  46. options.failOnError = false
  47. // default to false
  48. options.fork = true
  49. options.encoding = "UTF-8"
  50. // default to true
  51. options.debug = true
  52. })
  53. // tag::repositories[]
  54. repositories {
  55. // 本地仓库
  56. mavenLocal()
  57. // ali 代理的central仓
  58. maven {url 'https://maven.aliyun.com/repository/central'}
  59. // ali 代理的central仓和jcenter仓的聚合仓
  60. maven {url 'https://maven.aliyun.com/repository/public'}
  61. maven {url 'https://maven.aliyun.com/repository/google'}
  62. maven {url 'https://maven.aliyun.com/repository/gradle-plugin'}
  63. maven {url 'https://maven.aliyun.com/repository/spring'}
  64. maven {url 'https://maven.aliyun.com/repository/spring-plugin'}
  65. maven {url 'https://maven.aliyun.com/repository/grails-core'}
  66. // 远程中央仓库
  67. mavenCentral()
  68. maven {url 'https://repo1.maven.org/maven2/'}
  69. maven {url 'https://plugins.gradle.org/m2/'}
  70. maven {url 'https://repo.spring.io/libs-milestone/'}
  71. maven {url 'https://repo.spring.io/plugins-release/'}
  72. maven {url 'https://repo.grails.org/grails/core/'}
  73. maven {url 'https://repository.apache.org/content/groups/public/'}
  74. maven {url 'https://repository.jboss.org/nexus/content/repositories/releases/'}
  75. // 配置使用本机nexus 私服
  76. /*maven {
  77. // 非https需要增加对不安全协议的信任
  78. allowInsecureProtocol true
  79. url 'http://127.0.0.1:8081/repository/local-maven-public/'
  80. credentials {
  81. username 'admin'
  82. password 'admin123'
  83. }
  84. }*/
  85. // 配置使用其它nexus 私服
  86. maven {
  87. // 非https需要增加对不安全协议的信任
  88. allowInsecureProtocol true
  89. url 'http://nexus.ds-bay.com/content/groups/public/'
  90. credentials {
  91. username 'admin'
  92. password 'admin123'
  93. }
  94. }
  95. //maven {url 'others url'}
  96. }
  97. // end::repositories[]
  98. ext {
  99. lombok = '1.18.22'
  100. javax_annotation_api = '1.3.2'
  101. javax_servlet = '4.0.1'
  102. spring_boot = '2.6.1'
  103. spring = '5.3.13'
  104. // logback对spring的支持
  105. logback_ext_spring = '0.1.4'
  106. jackson = '2.11.2'
  107. // 工具类
  108. google_guava = '29.0-jre'
  109. // Java工具包类库,各种Util工具类
  110. hutool = '5.6.2'
  111. // (推荐)Forest,Java HTTP 客户端框架
  112. forest = '1.5.0-RC5'
  113. // alibaba 出品 excel 工具类, 需要 lombok 支持
  114. easyexcel = '3.0.5'
  115. }
  116. }
  117. // others project() {}