spring-security-core.gradle 1.8 KB

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