build.gradle 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. buildscript {
  2. ext {
  3. springBootVersion = '1.5.10.RELEASE'
  4. }
  5. repositories {
  6. maven { url "https://maven.aliyun.com/repository/public/" }
  7. maven { url 'https://repo.spring.io/plugins-release' }
  8. }
  9. dependencies {
  10. classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
  11. classpath 'org.springframework:springloaded:1.2.6.RELEASE'
  12. }
  13. }
  14. apply plugin: 'java'
  15. // 可生成maven pom文件
  16. // apply plugin: 'maven'
  17. apply plugin: 'idea'
  18. apply plugin: 'org.springframework.boot'
  19. apply plugin: 'war'
  20. idea {
  21. module {
  22. inheritOutputDirs = false
  23. outputDir file("$buildDir/classes/java/main")
  24. testOutputDir file("$buildDir/classes/java/test")
  25. }
  26. }
  27. group = 'com.bidding'
  28. version = '0.0.1-SNAPSHOT'
  29. sourceCompatibility = 1.8
  30. repositories {
  31. maven { url "https://maven.aliyun.com/repository/public/" }
  32. }
  33. //导出依赖jar包
  34. task copyJars(type: Copy) {
  35. from configurations.runtime
  36. into 'build/libs' // 目标位置
  37. }
  38. dependencies {
  39. compile('org.springframework.boot:spring-boot-starter-data-redis')
  40. // 模版引擎
  41. compile('org.springframework.boot:spring-boot-starter-freemarker')
  42. compile('org.springframework.boot:spring-boot-starter-jdbc')
  43. compile('org.springframework.boot:spring-boot-starter-web')
  44. //json转换
  45. compile group: 'com.alibaba', name: 'fastjson', version: '1.2.17'
  46. // aop 权限校验和全局异常
  47. compile('org.springframework.boot:spring-boot-starter-aop')
  48. //mybatisplus
  49. compile group: 'com.baomidou', name: 'mybatisplus-spring-boot-starter', version: '1.0.3'
  50. //mybatisplus 代码生成器生产默认模版
  51. compile group: 'com.baomidou', name: 'mybatis-plus', version: '2.1-gamma'
  52. // mybatisplus 代码生成器 模版用到velocity 用完可注释
  53. compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
  54. // 文档转换
  55. compile (group: 'com.itextpdf', name: 'itextpdf', version: '5.5.11')
  56. compile (group: 'com.itextpdf.tool', name: 'xmlworker', version: '5.5.1')
  57. compile (group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf', version: '9.1.5')
  58. compile (group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf-itext5', version: '9.1.5')
  59. //安全 权限 依赖
  60. compile group: 'org.apache.shiro', name: 'shiro-spring', version: '1.7.1'
  61. // shiro登录信息存入redis的中间件
  62. compile group: 'org.crazycake', name: 'shiro-redis', version: '2.4.2.1-RELEASE'
  63. // shiro权限验证和模版引擎标签的中间件
  64. compile group: 'net.mingsoft', name: 'shiro-freemarker-tags', version: '0.1'
  65. // 日志
  66. compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.8.2'
  67. compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.8.2'
  68. // 工具
  69. compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
  70. // compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.2.1'
  71. // compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.2.1'
  72. compile group: 'commons-io', name: 'commons-io', version: '2.5'
  73. compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.3'
  74. compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
  75. // 数据库连接池
  76. compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.12'
  77. // compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.26'
  78. compile group: 'com.alibaba', name: 'druid-spring-boot-starter', version: '1.1.9'
  79. // 阿里oss
  80. compile (group: 'com.aliyun.oss', name: 'aliyun-sdk-oss', version: '3.8.0')
  81. //支付宝
  82. compile (group: 'com.alipay.sdk', name: 'alipay-sdk-java', version: '4.11.72.ALL')
  83. // 缩略图
  84. compile group: 'net.coobird', name: 'thumbnailator', version: '0.4.2'
  85. // swagger2
  86. compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.7.0'
  87. compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.7.0'
  88. //jpush
  89. compile group: 'cn.jpush.api', name: 'jpush-client', version: '3.3.12'
  90. compile group: 'cn.jpush.api', name: 'jiguang-common', version: '1.1.11'
  91. compile 'org.projectlombok:lombok:1.18.6'
  92. // 编译有效,打包无效。替代旧版的 provider;
  93. compileOnly 'org.projectlombok:lombok:1.18.6'
  94. // gradle 5.0以上版本注解处理不再compile classpath,需要增加 annotation processor path
  95. annotationProcessor 'org.projectlombok:lombok:1.18.6'
  96. //forest
  97. compile group: 'com.dtflys.forest', name: 'forest-spring-boot-starter', version: '1.5.5'
  98. testCompile('org.springframework.boot:spring-boot-starter-test')
  99. //Hutool
  100. compile 'cn.hutool:hutool-all:5.4.7'
  101. }