2
0

spring-security-core.gradle 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. }
  38. task springVersion(type: org.gradle.api.tasks.WriteProperties) {
  39. destinationFile = file("${buildDir}/versions/spring-security.versions")
  40. property("org.springframework:spring-core", springVersion())
  41. }
  42. tasks.processResources {
  43. into('META-INF') {
  44. from project.tasks.springVersion.outputs
  45. }
  46. }
  47. configure(project.tasks.withType(Test)) {
  48. doFirst {
  49. systemProperties['springSecurityVersion'] = version
  50. systemProperties['springVersion'] = springVersion().call()
  51. }
  52. }
  53. Callable<String> springVersion() {
  54. return (Callable<String>) { project.configurations.compileClasspath.resolvedConfiguration.resolvedArtifacts
  55. .find { it.name == 'spring-core' }.moduleVersion.id.version }
  56. }
  57. tasks.withType(KotlinCompile).configureEach {
  58. kotlinOptions {
  59. languageVersion = "1.7"
  60. apiVersion = "1.7"
  61. freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings"]
  62. jvmTarget = "17"
  63. }
  64. }