build.gradle 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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-web')
  52. compile('org.springframework.boot:spring-boot-starter-aop')
  53. compile('org.springframework.boot:spring-boot-starter-jdbc')
  54. // Mybatis Spring Boot
  55. compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}")
  56. // Mybatis支持使用LocalDateTime
  57. compile("org.mybatis:mybatis-typehandlers-jsr310:${mybatis_typehandlers_jsr310}")
  58. /*runtime('mysql:mysql-connector-java')*/
  59. runtime('com.microsoft.sqlserver:mssql-jdbc')
  60. // Mariadb jdbc
  61. compile('org.mariadb.jdbc:mariadb-java-client')
  62. // HikariCP
  63. compile('com.zaxxer:HikariCP')
  64. // logback对spring的支持
  65. compile("org.logback-extensions:logback-ext-spring:${logback_ext_spring}")
  66. // 数据序列化
  67. compile("com.fasterxml.jackson.core:jackson-databind:${jackson}")
  68. compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson}")
  69. compile("com.fasterxml.jackson.module:jackson-module-afterburner:${jackson}")
  70. // 工具类
  71. compile("com.google.guava:guava:${google_guava}")
  72. compile("org.apache.commons:commons-lang3:${apache_commons_lang3}")
  73. //gson
  74. compile("com.google.code.gson:gson:${gson}")
  75. }