spring-security-core.gradle 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. import java.util.concurrent.Callable
  3. apply plugin: 'io.spring.convention.spring-module'
  4. apply plugin: 'kotlin'
  5. dependencies {
  6. management platform(project(":spring-security-dependencies"))
  7. api project(':spring-security-crypto')
  8. api 'org.springframework:spring-aop'
  9. api 'org.springframework:spring-beans'
  10. api 'org.springframework:spring-context'
  11. api 'org.springframework:spring-core'
  12. api 'org.springframework:spring-expression'
  13. api 'io.micrometer:micrometer-observation'
  14. optional 'com.fasterxml.jackson.core:jackson-databind'
  15. optional 'io.micrometer:context-propagation'
  16. optional 'io.projectreactor:reactor-core'
  17. optional 'jakarta.annotation:jakarta.annotation-api'
  18. optional 'org.aspectj:aspectjrt'
  19. optional 'org.springframework:spring-jdbc'
  20. optional 'org.springframework:spring-tx'
  21. optional 'org.jetbrains.kotlinx:kotlinx-coroutines-reactor'
  22. testImplementation 'commons-collections:commons-collections'
  23. testImplementation 'io.projectreactor:reactor-test'
  24. testImplementation "org.assertj:assertj-core"
  25. testImplementation "org.junit.jupiter:junit-jupiter-api"
  26. testImplementation "org.junit.jupiter:junit-jupiter-params"
  27. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  28. testImplementation "org.mockito:mockito-core"
  29. testImplementation "org.mockito:mockito-junit-jupiter"
  30. testImplementation "org.springframework:spring-core-test"
  31. testImplementation "org.springframework:spring-test"
  32. testImplementation 'org.skyscreamer:jsonassert'
  33. testImplementation 'org.springframework:spring-test'
  34. testImplementation 'org.jetbrains.kotlin:kotlin-reflect'
  35. testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
  36. testImplementation 'io.mockk:mockk'
  37. testRuntimeOnly 'org.hsqldb:hsqldb'
  38. testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
  39. }
  40. task springVersion(type: org.gradle.api.tasks.WriteProperties) {
  41. destinationFile = file("${buildDir}/versions/spring-security.versions")
  42. property("org.springframework:spring-core", springVersion())
  43. }
  44. tasks.processResources {
  45. into('META-INF') {
  46. from project.tasks.springVersion.outputs
  47. }
  48. }
  49. configure(project.tasks.withType(Test)) {
  50. doFirst {
  51. systemProperties['springSecurityVersion'] = version
  52. systemProperties['springVersion'] = springVersion().call()
  53. }
  54. }
  55. Callable<String> springVersion() {
  56. return (Callable<String>) { project.configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts
  57. .find { it.name == 'spring-core' }.moduleVersion.id.version }
  58. }
  59. tasks.withType(KotlinCompile).configureEach {
  60. kotlinOptions {
  61. languageVersion = "1.7"
  62. apiVersion = "1.7"
  63. freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings"]
  64. jvmTarget = "17"
  65. }
  66. }