spring-security-core.gradle 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 'commons-collections:commons-collections'
  20. testImplementation 'io.projectreactor:reactor-test'
  21. testImplementation "org.assertj:assertj-core"
  22. testImplementation "org.junit.jupiter:junit-jupiter-api"
  23. testImplementation "org.junit.jupiter:junit-jupiter-params"
  24. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  25. testImplementation "org.mockito:mockito-core"
  26. testImplementation 'org.mockito:mockito-inline'
  27. testImplementation "org.mockito:mockito-junit-jupiter"
  28. testImplementation "org.springframework:spring-test"
  29. testImplementation 'org.skyscreamer:jsonassert'
  30. testImplementation 'org.springframework:spring-test'
  31. testRuntimeOnly 'org.hsqldb:hsqldb'
  32. }
  33. task springVersion(type: org.gradle.api.tasks.WriteProperties) {
  34. outputFile = file("${buildDir}/versions/spring-security.versions")
  35. property("org.springframework:spring-core", springVersion())
  36. }
  37. tasks.processResources {
  38. into('META-INF') {
  39. from project.tasks.springVersion.outputs
  40. }
  41. }
  42. configure(project.tasks.withType(Test)) {
  43. doFirst {
  44. systemProperties['springSecurityVersion'] = version
  45. systemProperties['springVersion'] = springVersion().call()
  46. }
  47. }
  48. Callable<String> springVersion() {
  49. return (Callable<String>) { project.configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts
  50. .find { it.name == 'spring-core' }.moduleVersion.id.version }
  51. }