2
0

spring-security-core.gradle 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import java.util.concurrent.Callable
  2. apply plugin: 'io.spring.convention.spring-module'
  3. def includeProject = project(':spring-security-crypto')
  4. configurations {
  5. included
  6. compile.extendsFrom included
  7. }
  8. dependencies {
  9. compile 'org.springframework:spring-aop'
  10. compile 'org.springframework:spring-beans'
  11. compile 'org.springframework:spring-context'
  12. compile 'org.springframework:spring-core'
  13. compile 'org.springframework:spring-expression'
  14. included includeProject
  15. optional 'com.fasterxml.jackson.core:jackson-databind'
  16. optional 'io.projectreactor:reactor-core'
  17. optional 'javax.annotation:jsr250-api'
  18. optional 'net.sf.ehcache:ehcache'
  19. optional 'org.aspectj:aspectjrt'
  20. optional 'org.springframework:spring-jdbc'
  21. optional 'org.springframework:spring-tx'
  22. testCompile powerMock2Dependencies
  23. testCompile 'commons-collections:commons-collections'
  24. testCompile 'io.projectreactor:reactor-test'
  25. testCompile 'org.skyscreamer:jsonassert'
  26. testCompile 'org.slf4j:jcl-over-slf4j'
  27. testCompile 'org.springframework:spring-test'
  28. testRuntime 'org.hsqldb:hsqldb'
  29. }
  30. task springVersion(type: org.gradle.api.tasks.WriteProperties) {
  31. outputFile = file("${buildDir}/versions/spring-security.versions")
  32. property("org.springframework:spring-core", springVersion())
  33. }
  34. tasks.processResources {
  35. into('META-INF') {
  36. from project.tasks.springVersion.outputs
  37. }
  38. }
  39. tasks.jar.from { includeProject.sourceSets.main.output }
  40. tasks.sourcesJar.from {includeProject.sourceSets.main.java}
  41. configure(project.tasks.withType(Test)) {
  42. doFirst {
  43. systemProperties['springSecurityVersion'] = version
  44. systemProperties['springVersion'] = springVersion().call()
  45. }
  46. }
  47. Callable<String> springVersion() {
  48. return (Callable<String>) { project.configurations.compile.resolvedConfiguration.resolvedArtifacts
  49. .find { it.name == 'spring-core' }.moduleVersion.id.version }
  50. }