build.gradle 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /*
  2. * ********************************************************************************************************************
  3. *
  4. * :*$@@%$*: ;: ;; ;;
  5. * :@@%! :!@@%: %! ;%%@@%$ =@@@@@@@%; @%@@@%%%%@@@@@
  6. * :@%; :$= %%$$$%$$ ;$$ ;$@= !@$
  7. * =@! %! @ $=;% !@@@%: !$$$$$$$$$$$$$$=
  8. * =@* %! @ $= % %@= =%@! %=
  9. * *$%%! @@= ;=$%%%$*: %! @ $= % =%%%%%%@$ *%: =%
  10. * %@@!: !@@@%=$@@@@%! :*@@$: %! @ $= % $* ;@ @* :%*
  11. * ;@@! ;!!!;: ;@%: =======@%========* @ $$ % $%*****$@ :@$=*********=@$
  12. * $@* ;@@@%=!: *@*
  13. * =@$ ;;;!=%@@@@=! =@!
  14. * %@$: =@%: :*@@@* %@= Copyright (c) 2016-2019. 北京上格云技术有限公司
  15. * ;%@@$=$@@%* *@@@$=%@@%;
  16. * ::;:: ::;:: All rights reserved.
  17. *
  18. * ********************************************************************************************************************
  19. */
  20. group rootProject.group
  21. version rootProject.version
  22. apply plugin: "kotlin"
  23. apply plugin: "org.jetbrains.dokka"
  24. apply plugin: "war"
  25. apply plugin: 'org.springframework.boot'
  26. apply plugin: 'io.spring.dependency-management'
  27. sourceCompatibility = JVM_TARGET
  28. compileKotlin {
  29. kotlinOptions.jvmTarget = JVM_TARGET
  30. }
  31. compileTestKotlin {
  32. kotlinOptions.jvmTarget = JVM_TARGET
  33. }
  34. dependencies {
  35. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  36. // kotlin 依赖
  37. compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib-jdk8", version: KOTLIN_VERSION
  38. compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: KOTLIN_VERSION
  39. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  40. // 页面
  41. compile group: "org.springframework.boot", name: "spring-boot-starter-freemarker", version: SPRING_BOOT_VERSION
  42. // spring boot 依赖
  43. compile group: "org.springframework.boot", name: "spring-boot-starter-web", version: SPRING_BOOT_VERSION
  44. compile group: "org.springframework.boot", name: "spring-boot-configuration-processor", version: SPRING_BOOT_VERSION
  45. compile group: "org.springframework.boot", name: "spring-boot-starter-actuator", version: SPRING_BOOT_VERSION
  46. compile group: "org.springframework.boot", name: "spring-boot-starter-logging", version: SPRING_BOOT_VERSION
  47. //消息
  48. // compile group: "org.springframework.boot", name: "spring-boot-starter-activemq", version: SPRING_BOOT_VERSION
  49. // RabbitMQ
  50. compile group: 'org.springframework.boot', name: 'spring-boot-starter-amqp', version: SPRING_BOOT_VERSION
  51. providedCompile group: "org.springframework.boot", name:"spring-boot-starter-tomcat", version: SPRING_BOOT_VERSION
  52. // spring boot 缓存
  53. compile group:"org.springframework.boot", name:"spring-boot-starter-cache", version: SPRING_BOOT_VERSION
  54. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  55. // spring cloud 依赖
  56. // compile group: 'org.springframework.cloud', name: 'spring-cloud-starter-eureka', version: SPRING_CLOUD_VERSION
  57. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  58. // MySQL
  59. // https://mvnrepository.com/artifact/mysql/mysql-connector-java
  60. // compile group: 'mysql', name: 'mysql-connector-java', version: MYSQL_VERSION
  61. // PostgreSQL
  62. //https://mvnrepository.com/artifact/org.postgresql/postgresql
  63. // compile group: 'org.postgresql', name: 'postgresql', version: POSTGRESQL_VERSION
  64. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  65. // RESTful API 文档生成工具
  66. // https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui
  67. compile group: "io.springfox", name: "springfox-swagger-ui", version: SWAGGER_VERSION
  68. compile group: "io.springfox", name: "springfox-swagger2", version: SWAGGER_VERSION
  69. // compile group: "com.github.xiaoymin", name: "swagger-bootstrap-ui", version: SWAGGER_BOOTSTRAP_VERSION
  70. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  71. // compile group: "cn.sagacloud", name: "saga-kotlin-base", version: SAGA_KOTLIN_VERSION
  72. // compile group: "cn.sagacloud", name: "saga-kotlin-database", version: SAGA_KOTLIN_VERSION
  73. // compile group: "cn.sagacloud", name: "saga-kotlin-mybatis", version: SAGA_KOTLIN_VERSION
  74. // compile group: "cn.sagacloud", name: "saga-kotlin-postgresql", version: SAGA_KOTLIN_VERSION
  75. // compile group: "cn.sagacloud", name: "saga-service-base", version: SAGA_SERVICE_VERSION
  76. // compile group: "cn.sagacloud", name: "saga-service-mybatis", version: SAGA_SERVICE_VERSION
  77. compile group: "com.persagy", name: "persagy-kotlin-base", version: PERSAGY_KOTLIN_VERSION
  78. compile group: "com.persagy", name: "persagy-kotlin-database", version: PERSAGY_KOTLIN_VERSION
  79. compile group: "com.persagy", name: "persagy-kotlin-mybatis", version: PERSAGY_KOTLIN_VERSION
  80. compile group: "com.persagy", name: "persagy-kotlin-postgresql", version: PERSAGY_KOTLIN_VERSION
  81. compile group: "com.persagy", name: "persagy-service-base", version: PERSAGY_SERVICE_VERSION
  82. compile group: "com.persagy", name: "persagy-service-mybatis", version: PERSAGY_SERVICE_VERSION
  83. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  84. // Excel操作
  85. // https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml
  86. compile group: 'org.apache.poi', name: 'poi-ooxml', version: POI_VERSION
  87. // kafka
  88. // compile group: 'com.persagy', name: 'sybotan-service-kafka', version: SYBOTAN_SERVICE_VERSION
  89. //文档
  90. compile group: 'com.persagy', name: 'persagy-service-postgresql', version: PERSAGY_SERVICE_VERSION
  91. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  92. // 实体类依赖
  93. compile project(":data-core")
  94. }
  95. dependencyManagement {
  96. imports {
  97. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${SPRING_CLOUD_DEPENDENCIES}"
  98. }
  99. }
  100. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-dev']
  101. //ext.needTest = 'true'
  102. task buildProd {
  103. doFirst {
  104. sourceSets.main.resources.srcDirs = ["src/main/resources", "src/main/resources-prod"]
  105. test.onlyIf {
  106. project.hasProperty("needTest")
  107. }
  108. }
  109. finalizedBy(build)
  110. }
  111. //
  112. task buildDev {
  113. doFirst {
  114. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-dev']
  115. }
  116. finalizedBy(build)
  117. }
  118. task buildTest {
  119. doFirst {
  120. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-test']
  121. test.onlyIf {
  122. project.hasProperty("needTest")
  123. }
  124. }
  125. finalizedBy(build)
  126. }
  127. task buildjm {
  128. doFirst {
  129. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-jm']
  130. }
  131. finalizedBy(build)
  132. }
  133. task buildsuning {
  134. doFirst {
  135. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-suning']
  136. }
  137. finalizedBy(build)
  138. }
  139. task buildguancheng {
  140. doFirst {
  141. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-guancheng']
  142. }
  143. finalizedBy(build)
  144. }
  145. task buildasia {
  146. doFirst {
  147. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-asia']
  148. }
  149. finalizedBy(build)
  150. }
  151. task buildwanda {
  152. doFirst {
  153. sourceSets.main.resources.srcDirs = ['src/main/resources', 'src/main/resources-wanda']
  154. }
  155. finalizedBy(build)
  156. }