build.gradle 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. apply plugin: 'java'
  2. mainClassName = 'com.qxgmat.Application'
  3. dependencies {
  4. // shiro
  5. // compile(libraries."shiro-core", libraries."shiro-spring", libraries."shiro-cache")
  6. compileClasspath libraries."shiro"
  7. testCompile libraries."shiro"
  8. // druid
  9. compileClasspath 'com.alibaba:druid-spring-boot-starter:1.1.10'
  10. testCompile 'com.alibaba:druid-spring-boot-starter:1.1.10'
  11. // swagger
  12. compileClasspath libraries."springfox-bean-validators", libraries."springfox-swagger2", libraries."springfox-swagger-ui"
  13. testCompile libraries."springfox-bean-validators", libraries."springfox-swagger2", libraries."springfox-swagger-ui"
  14. compileClasspath 'com.github.penggle:kaptcha:2.3.2'
  15. testCompile 'com.github.penggle:kaptcha:2.3.2'
  16. // https://mvnrepository.com/artifact/org.apache.poi/poi
  17. compileClasspath group: 'org.apache.poi', name: 'poi', version: '3.17'
  18. testCompile group: 'org.apache.poi', name: 'poi', version: '3.17'
  19. compileClasspath group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17'
  20. testCompile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17'
  21. // compileClasspath group: 'e-iceblue', name: 'spire.pdf', version: '2.2.0'
  22. compileClasspath group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13.1'
  23. testCompile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13.1'
  24. compileClasspath group: 'com.itextpdf', name: 'itext-asian', version: '5.2.0'
  25. testCompile group: 'com.itextpdf', name: 'itext-asian', version: '5.2.0'
  26. // compile group: 'commons-lang', name: 'commons-lang', version:'2.6'
  27. // compile group: 'commons-fileupload', name: 'commons-fileupload', version:'1.3.3'
  28. // compile group: 'commons-io', name: 'commons-io', version:'2.6'
  29. // compile group: 'commons-codec', name: 'commons-codec', version:'1.11'
  30. // compile group: 'commons-configuration', name: 'commons-configuration', version:'1.10'
  31. }
  32. bootJar {
  33. classifier = 'boot'
  34. // lib目录的清除和复制任务
  35. dependsOn clearJar
  36. dependsOn copyJar
  37. manifest {
  38. // Properties 允许加载扩展jar,是compileClasspath生效,定义在loader.properties
  39. // https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#executable-jar-launching
  40. attributes 'Main-Class': 'org.springframework.boot.loader.PropertiesLauncher'
  41. attributes 'Start-Class': mainClassName
  42. }
  43. excludeDevtools = true
  44. }
  45. bootRun {
  46. dependsOn copyJar
  47. classpath +=files(fileTree(dir:"${libsDir}/lib/",include:['*.jar']))
  48. // jvmArgs = ["-Dloader.path=${libsDir}/lib", "-Dloader.debug=true"]
  49. // mainClassName = 'org.springframework.boot.loader.PropertiesLauncher'
  50. }
  51. //task runLocal(type: JavaExec) {
  52. // dependsOn bootJar
  53. // main="org.springframework.boot.loader.PropertiesLauncher"
  54. // args("-Dloader.path=${libsDir}/lib -Dloader.debug=true")
  55. //}