javaprojects.gradle 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. apply plugin: 'java'
  2. apply plugin: 'eclipse'
  3. springVersion = '3.0.3.RELEASE'
  4. springLdapVersion = '1.3.0.RELEASE'
  5. ehcacheVersion = '1.6.2'
  6. aspectjVersion = '1.6.8'
  7. apacheDsVersion = '1.5.5'
  8. jstlVersion = '1.2'
  9. jettyVersion = '6.1.22'
  10. hsqlVersion = '1.8.0.10'
  11. slf4jVersion = '1.6.1'
  12. logbackVersion = '0.9.24'
  13. configurations {
  14. // Configuration which is ONLY used for compileJava and will not be inherited by any others
  15. // Revisit post Gradle 1.0
  16. compileOnly
  17. // Used to identify deps whcih should be marked as "provided" in maven poms
  18. provided
  19. compile.extendsFrom provided
  20. compile.transitive = false
  21. }
  22. dependencies {
  23. compileOnly 'commons-logging:commons-logging:1.1.1'
  24. compile ("org.springframework:spring-core:$springVersion") {
  25. exclude(group: 'commons-logging', module: 'commons-logging')
  26. }
  27. testCompile 'junit:junit:4.7',
  28. 'org.mockito:mockito-core:1.8.3',
  29. 'org.jmock:jmock:2.5.1',
  30. 'org.jmock:jmock-junit4:2.5.1',
  31. 'org.hamcrest:hamcrest-core:1.1',
  32. 'org.hamcrest:hamcrest-library:1.1',
  33. "org.springframework:spring-test:$springVersion"
  34. // Use slf4j/logback for logging
  35. testRuntime "org.slf4j:slf4j-api:$slf4jVersion",
  36. "org.slf4j:jcl-over-slf4j:$slf4jVersion",
  37. "ch.qos.logback:logback-core:$logbackVersion",
  38. "ch.qos.logback:logback-classic:$logbackVersion"
  39. }
  40. [configurations.runtime, configurations.default]*.exclude(module: 'commons-logging')
  41. sourceSets.main.compileClasspath += configurations.compileOnly
  42. test {
  43. onlyIf {
  44. !project.hasProperty('skipTests')
  45. }
  46. jvmArgs = ['-ea', '-Xms128m', '-Xmx500m', '-XX:MaxPermSize=128m']
  47. }