spring-security-core.gradle 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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.projectreactor:reactor-core'
  16. optional 'jakarta.annotation:jakarta.annotation-api'
  17. optional 'org.aspectj:aspectjrt'
  18. optional 'org.springframework:spring-jdbc'
  19. optional 'org.springframework:spring-tx'
  20. optional 'org.jetbrains.kotlinx:kotlinx-coroutines-reactor'
  21. testImplementation 'commons-collections:commons-collections'
  22. testImplementation 'io.projectreactor:reactor-test'
  23. testImplementation "org.assertj:assertj-core"
  24. testImplementation "org.junit.jupiter:junit-jupiter-api"
  25. testImplementation "org.junit.jupiter:junit-jupiter-params"
  26. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  27. testImplementation "org.mockito:mockito-core"
  28. testImplementation "org.mockito:mockito-junit-jupiter"
  29. testImplementation "org.springframework:spring-test"
  30. testImplementation 'org.skyscreamer:jsonassert'
  31. testImplementation 'org.springframework:spring-test'
  32. testImplementation 'org.jetbrains.kotlin:kotlin-reflect'
  33. testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
  34. testImplementation 'io.mockk:mockk'
  35. testRuntimeOnly 'org.hsqldb:hsqldb'
  36. }
  37. task springVersion(type: org.gradle.api.tasks.WriteProperties) {
  38. destinationFile = file("${buildDir}/versions/spring-security.versions")
  39. property("org.springframework:spring-core", springVersion())
  40. }
  41. tasks.processResources {
  42. into('META-INF') {
  43. from project.tasks.springVersion.outputs
  44. }
  45. }
  46. configure(project.tasks.withType(Test)) {
  47. doFirst {
  48. systemProperties['springSecurityVersion'] = version
  49. systemProperties['springVersion'] = springVersion().call()
  50. }
  51. }
  52. Callable<String> springVersion() {
  53. return (Callable<String>) { project.configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts
  54. .find { it.name == 'spring-core' }.moduleVersion.id.version }
  55. }
  56. tasks.withType(KotlinCompile).configureEach {
  57. kotlinOptions {
  58. languageVersion = "1.7"
  59. apiVersion = "1.7"
  60. freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings"]
  61. jvmTarget = "17"
  62. }
  63. }