build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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: 'org.springframework.boot'
  20. apply plugin: 'war'
  21. group = 'com.emato'
  22. version = '1.0.0'
  23. sourceCompatibility = 1.8
  24. // 解决中文乱码
  25. tasks.withType(JavaCompile) {
  26. options.encoding = "UTF-8"
  27. }
  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. cage = '1.0'
  44. okhttp = '3.4.1'
  45. apache_commons_lang3 = '3.6'
  46. gson = '2.8.0'
  47. }
  48. dependencies {
  49. // Spring Boot
  50. testCompile('org.springframework.boot:spring-boot-starter-test')
  51. compile('org.springframework.boot:spring-boot-starter-tomcat')
  52. compile('org.springframework.boot:spring-boot-starter-web')
  53. compile('org.springframework.boot:spring-boot-starter-aop')
  54. compile('org.springframework.boot:spring-boot-starter-jdbc')
  55. // Mybatis Spring Boot
  56. compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}")
  57. // Mybatis支持使用LocalDateTime
  58. compile("org.mybatis:mybatis-typehandlers-jsr310:${mybatis_typehandlers_jsr310}")
  59. /*runtime('mysql:mysql-connector-java')*/
  60. runtime('com.microsoft.sqlserver:mssql-jdbc')
  61. // Mariadb jdbc
  62. compile('org.mariadb.jdbc:mariadb-java-client')
  63. // HikariCP
  64. compile('com.zaxxer:HikariCP')
  65. // logback对spring的支持
  66. compile("org.logback-extensions:logback-ext-spring:${logback_ext_spring}")
  67. // 数据序列化
  68. compile("com.fasterxml.jackson.core:jackson-databind:${jackson}")
  69. compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson}")
  70. compile("com.fasterxml.jackson.module:jackson-module-afterburner:${jackson}")
  71. // 工具类
  72. compile("com.google.guava:guava:${google_guava}")
  73. compile("org.apache.commons:commons-lang3:${apache_commons_lang3}")
  74. //gson
  75. compile("com.google.code.gson:gson:${gson}")
  76. }