1
0

build.gradle 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. group = 'com.emato'
  21. version = '1.0.0'
  22. sourceCompatibility = 1.8
  23. // 解决中文乱码
  24. tasks.withType(JavaCompile) {
  25. options.encoding = "UTF-8"
  26. }
  27. repositories {
  28. /*本地仓库*/
  29. mavenLocal()
  30. jcenter()
  31. mavenCentral()
  32. maven {
  33. url('http://central.maven.org/maven2')
  34. }
  35. }
  36. ext {
  37. mybatis_spring_boot = '1.3.1'
  38. mybatis_typehandlers_jsr310 = '1.0.2'
  39. logback_ext_spring = '0.1.4'
  40. jackson = '2.8.4'
  41. google_guava = '23.3-jre'
  42. cage = '1.0'
  43. okhttp = '3.4.1'
  44. apache_commons_lang3 = '3.6'
  45. }
  46. dependencies {
  47. // Spring Boot
  48. testCompile('org.springframework.boot:spring-boot-starter-test')
  49. compile('org.springframework.boot:spring-boot-starter-web')
  50. compile('org.springframework.boot:spring-boot-starter-aop')
  51. compile('org.springframework.boot:spring-boot-starter-jdbc')
  52. // Mybatis Spring Boot
  53. compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatis_spring_boot}")
  54. // Mybatis支持使用LocalDateTime
  55. compile("org.mybatis:mybatis-typehandlers-jsr310:${mybatis_typehandlers_jsr310}")
  56. /*runtime('mysql:mysql-connector-java')*/
  57. runtime('com.microsoft.sqlserver:mssql-jdbc')
  58. // Mariadb jdbc
  59. compile('org.mariadb.jdbc:mariadb-java-client')
  60. // HikariCP
  61. compile('com.zaxxer:HikariCP')
  62. // logback对spring的支持
  63. compile("org.logback-extensions:logback-ext-spring:${logback_ext_spring}")
  64. // 数据序列化
  65. compile("com.fasterxml.jackson.core:jackson-databind:${jackson}")
  66. compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jackson}")
  67. compile("com.fasterxml.jackson.module:jackson-module-afterburner:${jackson}")
  68. // 工具类
  69. compile("com.google.guava:guava:${google_guava}")
  70. compile("org.apache.commons:commons-lang3:${apache_commons_lang3}")
  71. }