core.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Core build file
  2. // We don't define a module dependency on crypto to avoid creating a transitive dependency
  3. def cryptoProject = project(':spring-security-crypto')
  4. def cryptoClasses = cryptoProject.sourceSets.main.classes
  5. dependencies {
  6. compile cryptoProject,
  7. 'aopalliance:aopalliance:1.0',
  8. "net.sf.ehcache:ehcache:$ehcacheVersion",
  9. "org.springframework:spring-aop:$springVersion",
  10. "org.springframework:spring-beans:$springVersion",
  11. "org.springframework:spring-context:$springVersion",
  12. "org.springframework:spring-expression:$springVersion",
  13. "org.springframework:spring-jdbc:$springVersion",
  14. "org.springframework:spring-tx:$springVersion",
  15. "org.aspectj:aspectjrt:$aspectjVersion",
  16. 'javax.annotation:jsr250-api:1.0'
  17. testCompile 'commons-collections:commons-collections:3.2',
  18. "org.springframework:spring-test:$springVersion",
  19. "org.slf4j:jcl-over-slf4j:$slf4jVersion"
  20. testRuntime "hsqldb:hsqldb:$hsqlVersion",
  21. "cglib:cglib-nodep:$cglibVersion"
  22. }
  23. compileJava.dependsOn cryptoProject.compileJava
  24. classes.dependsOn cryptoProject.classes
  25. classes.doLast {
  26. copy {
  27. from cryptoClasses
  28. into sourceSets.main.classesDir
  29. }
  30. }
  31. sourceSets.main.compileClasspath += cryptoClasses
  32. sourceSets.test.compileClasspath += cryptoClasses
  33. sourceJar.from cryptoProject.sourceSets.main.java
  34. test {
  35. systemProperties['springSecurityVersion'] = version
  36. systemProperties['springVersion'] = springVersion
  37. }
  38. // Add the crypto module in the IDE
  39. ideaModule {
  40. def cryptoDep = new org.gradle.plugins.ide.idea.model.ModuleDependency('spring-security-crypto', 'COMPILE')
  41. cryptoDep.exported = true
  42. module.dependencies.add(cryptoDep)
  43. }
  44. eclipseProject {
  45. referencedProjects.add('spring-security-crypto')
  46. }