build.gradle 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. buildscript {
  2. ext {
  3. springBootVersion = '1.5.8.RELEASE'
  4. }
  5. repositories {
  6. /*本地仓库*/
  7. mavenLocal()
  8. jcenter()
  9. mavenCentral()
  10. maven {
  11. url "http://central.maven.org/maven2"
  12. }
  13. }
  14. dependencies {
  15. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  16. }
  17. }
  18. apply plugin: 'java'
  19. apply plugin: 'idea'
  20. apply plugin: 'org.springframework.boot'
  21. // 部署为外部服务器时, 配置为war包
  22. apply plugin: 'war'
  23. // 此配置在外部部署时, 为请求url的上下文路径
  24. archivesBaseName='ccnet'
  25. group = 'com.emato'
  26. version = '1.0.0'
  27. sourceCompatibility = 1.8
  28. repositories {
  29. /*本地仓库*/
  30. mavenLocal()
  31. jcenter()
  32. mavenCentral()
  33. maven {
  34. url('http://central.maven.org/maven2')
  35. }
  36. }
  37. ext {
  38. mybatis_spring_boot = '1.3.1'
  39. mybatis_typehandlers_jsr310 = '1.0.2'
  40. logback_ext_spring = '0.1.4'
  41. jackson = '2.8.4'
  42. google_guava = '23.3-jre'
  43. okhttp = '3.4.1'
  44. apache_commons_beanutils = '1.9.3'
  45. apache_commons_lang3 = '3.6'
  46. apache_commons_io = '2.6'
  47. jxls = '2.4.2'
  48. jxls_poi = '1.0.13'
  49. jxls_jexcel = '1.0.6'
  50. jxls_reader = '2.0.3'
  51. dom4j = '1.6.1'
  52. jsonLib = '2.4'
  53. xom = '1.2.5'
  54. jedis = '2.9.0'
  55. fastjson = '1.2.15'
  56. gson = '2.6.2'
  57. spring_boot_starter_amqp = '1.5.2.RELEASE'
  58. }
  59. dependencies {
  60. // Spring Boot
  61. testCompile('org.springframework.boot:spring-boot-starter-test')
  62. compile('org.springframework.boot:spring-boot-starter-web')
  63. compile('org.springframework.boot:spring-boot-starter-aop')
  64. compile('org.springframework.boot:spring-boot-configuration-processor')
  65. compile('org.springframework.boot:spring-boot-starter-jdbc')
  66. // Mybatis Spring Boot
  67. compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}")
  68. // Mybatis支持使用LocalDateTime
  69. compile("org.mybatis:mybatis-typehandlers-jsr310:${mybatis_typehandlers_jsr310}")
  70. /*runtime('mysql:mysql-connector-java')*/
  71. runtime('com.microsoft.sqlserver:mssql-jdbc')
  72. // Mariadb jdbc
  73. compile('org.mariadb.jdbc:mariadb-java-client')
  74. // HikariCP
  75. compile('com.zaxxer:HikariCP')
  76. // logback对spring的支持
  77. compile("org.logback-extensions:logback-ext-spring:${logback_ext_spring}")
  78. // 数据序列化
  79. compile("com.fasterxml.jackson.core:jackson-databind:${jackson}")
  80. compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson}")
  81. compile("com.fasterxml.jackson.module:jackson-module-afterburner:${jackson}")
  82. // 工具类
  83. compile("com.google.guava:guava:${google_guava}")
  84. // HTTP工具
  85. compile("com.squareup.okhttp3:okhttp:${okhttp}")
  86. /* apache commons */
  87. compile("commons-beanutils:commons-beanutils:${apache_commons_beanutils}")
  88. compile("org.apache.commons:commons-lang3:${apache_commons_lang3}")
  89. compile("commons-io:commons-io:${apache_commons_io}")
  90. // excel工具类
  91. compile("org.jxls:jxls:${jxls}")
  92. compile("org.jxls:jxls-poi:${jxls_poi}")
  93. compile("org.jxls:jxls-jexcel:${jxls_jexcel}")
  94. compile("org.jxls:jxls-reader:${jxls_reader}")
  95. //xml转map
  96. compile("dom4j:dom4j:${dom4j}")
  97. compile("net.sf.json-lib:json-lib:${jsonLib}:jdk15")
  98. compile("xom:xom:${xom}")
  99. //redis缓存
  100. compile("redis.clients:jedis:${jedis}")
  101. compile("com.alibaba:fastjson:${fastjson}")
  102. compile("com.google.code.gson:gson:${gson}")
  103. compile("org.springframework.boot:spring-boot-starter-amqp:${spring_boot_starter_amqp}")
  104. }