spring-security-core.gradle 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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-core-test"
  30. testImplementation "org.springframework:spring-test"
  31. testImplementation 'org.skyscreamer:jsonassert'
  32. testImplementation 'org.springframework:spring-test'
  33. testImplementation 'org.jetbrains.kotlin:kotlin-reflect'
  34. testImplementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
  35. testImplementation 'io.mockk:mockk'
  36. testRuntimeOnly 'org.hsqldb:hsqldb'
  37. testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
  38. }
  39. task springVersion(type: org.gradle.api.tasks.WriteProperties) {
  40. destinationFile = file("${buildDir}/versions/spring-security.versions")
  41. property("org.springframework:spring-core", springVersion())
  42. }
  43. tasks.processResources {
  44. into('META-INF') {
  45. from project.tasks.springVersion.outputs
  46. }
  47. }
  48. configure(project.tasks.withType(Test)) {
  49. doFirst {
  50. systemProperties['springSecurityVersion'] = version
  51. systemProperties['springVersion'] = springVersion().call()
  52. }
  53. }
  54. Callable<String> springVersion() {
  55. return (Callable<String>) { project.configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts
  56. .find { it.name == 'spring-core' }.moduleVersion.id.version }
  57. }
  58. tasks.withType(KotlinCompile).configureEach {
  59. kotlinOptions {
  60. languageVersion = "1.7"
  61. apiVersion = "1.7"
  62. freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings"]
  63. jvmTarget = "17"
  64. }
  65. }