javaprojects.gradle 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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.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. provided
  15. compile.extendsFrom provided
  16. compile.transitive = false
  17. }
  18. dependencies {
  19. // We only compile against commons logging. It is excluded from all other configurations
  20. compile 'commons-logging:commons-logging:1.1.1'
  21. compile ("org.springframework:spring-core:$springVersion") {
  22. exclude(group: 'commons-logging', module: 'commons-logging')
  23. }
  24. testCompile 'junit:junit:4.7',
  25. 'org.mockito:mockito-core:1.8.3',
  26. 'org.jmock:jmock:2.5.1',
  27. 'org.jmock:jmock-junit4:2.5.1',
  28. 'org.hamcrest:hamcrest-core:1.1',
  29. 'org.hamcrest:hamcrest-library:1.1',
  30. "org.springframework:spring-test:$springVersion"
  31. // Use slf4j/logback for logging
  32. testRuntime "org.slf4j:slf4j-api:$slf4jVersion",
  33. "org.slf4j:jcl-over-slf4j:$slf4jVersion",
  34. "ch.qos.logback:logback-core:$logbackVersion",
  35. "ch.qos.logback:logback-classic:$logbackVersion"
  36. }
  37. // Get rid of commons logging
  38. [configurations.runtime, configurations.default]*.exclude(module: 'commons-logging')
  39. test {
  40. onlyIf {
  41. !project.hasProperty('skipTests')
  42. }
  43. jvmArgs = ['-ea', '-Xms128m', '-Xmx500m', '-XX:MaxPermSize=128m']
  44. }