build.gradle 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. plugins {
  2. //id 'org.springframework.boot' version '2.2.0.RELEASE'
  3. id 'org.springframework.boot' version '2.1.0.RELEASE'
  4. id 'io.spring.dependency-management' version '1.0.8.RELEASE'
  5. id "org.hidetake.ssh" version "2.10.1"
  6. id 'java'
  7. }
  8. group = 'com.zcxk'
  9. version = '0.0.1-SNAPSHOT'
  10. sourceCompatibility = '1.8'
  11. repositories {
  12. mavenCentral()
  13. }
  14. ext {
  15. //set('springCloudVersion', "Hoxton.M3")
  16. //set('springCloudVersion', "Finchley.SR1")
  17. set('springCloudVersion', "Greenwich.SR2")
  18. set('springCloudAlibabaVersion', "2.1.0.RELEASE")
  19. //set('springCloudAlibabaVersion', "0.2.2.RELEASE")
  20. //set('springCloudAlibabaVersion', "0.9.0.RELEASE")
  21. }
  22. subprojects {
  23. apply {
  24. apply plugin:'java'
  25. apply plugin:'idea'
  26. apply plugin:'eclipse'
  27. apply plugin:'jacoco'
  28. apply plugin:'org.springframework.boot'
  29. apply plugin:'io.spring.dependency-management'
  30. apply plugin: 'org.hidetake.ssh'
  31. group ='com.example'
  32. sourceCompatibility =1.8
  33. targetCompatibility =1.8
  34. // java编译的时候缺省状态下会因为中文字符而失败
  35. [compileJava,compileTestJava,javadoc]*.options*.encoding ='UTF-8'
  36. bootJar {
  37. enabled =false // 默认不需要打可执行jar包
  38. }
  39. repositories {
  40. mavenLocal()
  41. mavenCentral()
  42. maven { url 'https://repo.spring.io/milestone' }
  43. }
  44. dependencies {
  45. compileOnly 'org.projectlombok:lombok'
  46. annotationProcessor 'org.projectlombok:lombok'
  47. //swagger在线接口文档生成工具
  48. compile('io.springfox:springfox-swagger2:2.7.0')
  49. compile('io.springfox:springfox-swagger-ui:2.7.0')
  50. //json工具
  51. compile('com.alibaba:fastjson:1.2.41')
  52. testImplementation('org.springframework.boot:spring-boot-starter-test') {
  53. exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
  54. }
  55. }
  56. dependencyManagement {
  57. imports {
  58. mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
  59. mavenBom "com.alibaba.cloud:spring-cloud-alibaba-dependencies:${springCloudAlibabaVersion}"
  60. }
  61. }
  62. remotes {
  63. //开发环境服务器
  64. devServer {
  65. host = '114.135.61.188'
  66. port = 30154
  67. user = 'root'
  68. password = '1qaz2wsx!'
  69. }
  70. //测试环境服务器
  71. sitServer {
  72. host = '10.0.0.154'
  73. port = 22
  74. user = 'root'
  75. password = '1qaz2wsx!'
  76. }
  77. //演示环境155服务器
  78. uatServer155 {
  79. host = '10.0.0.155'
  80. port = 22
  81. user = 'root'
  82. password = '1qaz2wsx!'
  83. }
  84. //演示环境156服务器
  85. uatServer156 {
  86. host = '10.0.0.156'
  87. port = 22
  88. user = 'root'
  89. password = '1qaz2wsx!'
  90. }
  91. //测试环境服务器
  92. sitServer153 {
  93. host = '114.135.61.188'
  94. port = 30153
  95. user = 'root'
  96. password = '1qaz2wsx!'
  97. }
  98. }
  99. }
  100. }
  101. test {
  102. useJUnitPlatform()
  103. }