build.gradle 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. def SpringVersion = '4.2.2.RELEASE'
  2. def JettyVersion = '9.4.6.v20170531' //''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.springframework:spring-context:${SpringVersion}"
  55. compile "org.springframework:spring-context-support:${SpringVersion}"
  56. compile "org.springframework:spring-jdbc:${SpringVersion}"
  57. compile "org.springframework:spring-web:${SpringVersion}"
  58. compile "org.springframework:spring-webmvc:${SpringVersion}"
  59. compile "org.springframework.security:spring-security-web:${SpringVersion}"
  60. compile "org.springframework.security:spring-security-config:${SpringVersion}"
  61. compile 'joda-time:joda-time:2.9.9'
  62. compile 'com.fasterxml.jackson.core:jackson-databind:2.8.9'
  63. compile 'org.apache.httpcomponents:httpclient:4.5.5'
  64. compile 'org.apache.commons:commons-lang3:3.6'
  65. compile 'commons-fileupload:commons-fileupload:1.3.3'
  66. compile "org.apache.poi:poi:3.17"
  67. compile "org.apache.poi:poi-ooxml:3.17"
  68. compile "org.apache.poi:poi-ooxml-schemas:3.17"
  69. testCompile 'junit:junit:4.12'
  70. }
  71. }
  72. project(':saas-enterprise') {
  73. dependencies {
  74. compile project(':saas-core')
  75. compile fileTree( dir: "lib", include: '*.jar' )
  76. compile 'org.freemarker:freemarker:2.3.26-incubating'
  77. compile 'com.thoughtworks.xstream:xstream:1.4.8'
  78. compile 'xpp3:xpp3_min:1.1.4c'
  79. compile 'commons-pool:commons-pool:1.6'
  80. compile 'com.google.protobuf:protobuf-java:2.4.1'
  81. compile 'javax.mail:mail:1.5.0-b01'
  82. }
  83. task deploy(dependsOn: [copyLib, copyWebapp])
  84. }
  85. project(':saas-operation') {
  86. dependencies {
  87. compile project(':saas-core')
  88. compile fileTree( dir: "lib", include: '*.jar' )
  89. compile 'org.freemarker:freemarker:2.3.26-incubating'
  90. }
  91. task deploy(dependsOn: [copyLib, copyWebapp])
  92. }
  93. project(':saas-task') {
  94. dependencies {
  95. compile project(':saas-core')
  96. compile fileTree( dir: "lib", include: '*.jar' )
  97. compile 'io.netty:netty-all:4.1.13.Final'
  98. // compile 'io.netty:netty-transport-native-epoll:4.1.13.Final'
  99. }
  100. task deploy(dependsOn: [copyLib, copyWebapp])
  101. }