build.gradle 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. def SpringVersion = '5.0.3.RELEASE'
  2. def JettyVersion = '9.4.8.v20171121' //''9.2.21.v20170120'
  3. subprojects {
  4. apply plugin: 'java'
  5. apply plugin: 'eclipse'
  6. //apply plugin: 'idea'
  7. //apply plugin: 'maven'
  8. version = '1.0'
  9. sourceCompatibility = 1.8
  10. targetCompatibility = 1.8
  11. [compileJava, compileTestJava]*.options*.encoding = "UTF-8"
  12. repositories {
  13. jcenter()
  14. //maven { url "http://192.168.2.199:8081/nexus/content/groups/public/" }
  15. //mavenCentral()
  16. }
  17. configurations.all {
  18. resolutionStrategy.eachDependency { DependencyResolveDetails details ->
  19. if (details.requested.group == "org.springframework") {
  20. details.useVersion "${SpringVersion}"
  21. }
  22. }
  23. }
  24. configurations {
  25. all*.exclude group: 'commons-logging', module: 'commons-logging'
  26. }
  27. task wrapper(type: Wrapper) {
  28. gradleVersion = '3.5'
  29. }
  30. task copyLib(type: Sync, dependsOn: jar) {
  31. from configurations.compile
  32. from jar.archivePath
  33. into 'build/deploy'
  34. }
  35. task copyWebapp(type: Sync) {
  36. from 'src/main/webapp'
  37. into 'build/deploy/webapp'
  38. }
  39. }
  40. project(':saas-core') {
  41. jar.exclude 'logback-test.xml'
  42. jar.exclude 'config.properties'
  43. jar.exclude 'env.properties'
  44. dependencies {
  45. compile fileTree( dir: "lib", include: '*.jar' )
  46. compile 'org.slf4j:slf4j-api:1.7.25'
  47. compile 'org.slf4j:jcl-over-slf4j:1.7.25'
  48. compile 'ch.qos.logback:logback-classic:1.2.2'
  49. compile 'com.google.guava:guava:20.0'
  50. compile 'mysql:mysql-connector-java:5.1.35'
  51. compile 'com.alibaba:druid:1.0.29'
  52. compile "org.eclipse.jetty:jetty-server:${JettyVersion}"
  53. compile "org.eclipse.jetty:jetty-webapp:${JettyVersion}"
  54. compile "org.eclipse.jetty.websocket:websocket-server:${JettyVersion}"
  55. compile "org.springframework:spring-context:${SpringVersion}"
  56. compile "org.springframework:spring-context-support:${SpringVersion}"
  57. compile "org.springframework:spring-jdbc:${SpringVersion}"
  58. compile "org.springframework:spring-web:${SpringVersion}"
  59. compile "org.springframework:spring-webmvc:${SpringVersion}"
  60. compile "org.springframework.security:spring-security-web:${SpringVersion}"
  61. compile "org.springframework.security:spring-security-config:${SpringVersion}"
  62. compile "org.springframework.security:spring-security-crypto:${SpringVersion}"
  63. compile "org.springframework:spring-websocket:${SpringVersion}"
  64. compile "org.springframework:spring-messaging:${SpringVersion}"
  65. compile 'joda-time:joda-time:2.9.9'
  66. compile 'com.fasterxml.jackson.core:jackson-core:2.9.4'
  67. compile 'com.fasterxml.jackson.core:jackson-databind:2.9.4'
  68. compile 'org.apache.httpcomponents:httpclient:4.5.5'
  69. compile 'org.apache.commons:commons-lang3:3.6'
  70. compile 'commons-fileupload:commons-fileupload:1.3.3'
  71. compile "org.apache.poi:poi:3.17"
  72. compile "org.apache.poi:poi-ooxml:3.17"
  73. compile "org.apache.poi:poi-ooxml-schemas:3.17"
  74. testCompile 'junit:junit:4.12'
  75. }
  76. }
  77. project(':saas-enterprise') {
  78. dependencies {
  79. compile project(':saas-core')
  80. compile fileTree( dir: "lib", include: '*.jar' )
  81. compile 'org.freemarker:freemarker:2.3.26-incubating'
  82. compile 'com.thoughtworks.xstream:xstream:1.4.8'
  83. compile 'xpp3:xpp3_min:1.1.4c'
  84. compile 'commons-pool:commons-pool:1.6'
  85. compile 'com.google.protobuf:protobuf-java:2.4.1'
  86. compile 'javax.mail:mail:1.5.0-b01'
  87. }
  88. task deploy(dependsOn: [copyLib, copyWebapp])
  89. }
  90. project(':saas-operation') {
  91. dependencies {
  92. compile project(':saas-core')
  93. compile fileTree( dir: "lib", include: '*.jar' )
  94. compile 'org.freemarker:freemarker:2.3.26-incubating'
  95. }
  96. task deploy(dependsOn: [copyLib, copyWebapp])
  97. }
  98. project(':saas-task') {
  99. dependencies {
  100. compile project(':saas-core')
  101. compile fileTree( dir: "lib", include: '*.jar' )
  102. compile 'io.netty:netty-all:4.1.13.Final'
  103. // compile 'io.netty:netty-transport-native-epoll:4.1.13.Final'
  104. }
  105. task deploy(dependsOn: [copyLib, copyWebapp])
  106. }