spring-security-config.gradle 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
  2. apply plugin: 'io.spring.convention.spring-module'
  3. apply plugin: 'trang'
  4. apply plugin: 'kotlin'
  5. repositories {
  6. maven { url "https://build.shibboleth.net/nexus/content/repositories/releases/" }
  7. }
  8. dependencies {
  9. management platform(project(":spring-security-dependencies"))
  10. // NB: Don't add other compile time dependencies to the config module as this breaks tooling
  11. api project(':spring-security-core')
  12. api 'org.springframework:spring-aop'
  13. api 'org.springframework:spring-beans'
  14. api 'org.springframework:spring-context'
  15. api 'org.springframework:spring-core'
  16. optional project(':spring-security-ldap')
  17. optional project(':spring-security-messaging')
  18. optional project(':spring-security-saml2-service-provider')
  19. optional project(':spring-security-oauth2-client')
  20. optional project(':spring-security-oauth2-jose')
  21. optional project(':spring-security-oauth2-resource-server')
  22. optional project(':spring-security-rsocket')
  23. optional project(':spring-security-web')
  24. optional 'io.projectreactor:reactor-core'
  25. optional 'org.aspectj:aspectjweaver'
  26. optional 'org.springframework:spring-jdbc'
  27. optional 'org.springframework:spring-messaging'
  28. optional 'org.springframework:spring-tx'
  29. optional 'org.springframework:spring-webmvc'
  30. optional'org.springframework:spring-web'
  31. optional'org.springframework:spring-webflux'
  32. optional'org.springframework:spring-websocket'
  33. optional 'org.jetbrains.kotlin:kotlin-reflect'
  34. optional 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
  35. optional 'jakarta.annotation:jakarta.annotation-api'
  36. provided 'jakarta.servlet:jakarta.servlet-api'
  37. testImplementation project(':spring-security-aspects')
  38. testImplementation project(':spring-security-test')
  39. testImplementation project(path : ':spring-security-core', configuration : 'tests')
  40. testImplementation project(path : ':spring-security-ldap', configuration : 'tests')
  41. testImplementation project(path : ':spring-security-oauth2-client', configuration : 'tests')
  42. testImplementation project(path : ':spring-security-oauth2-resource-server', configuration : 'tests')
  43. testImplementation project(':spring-security-saml2-service-provider')
  44. testImplementation project(path : ':spring-security-saml2-service-provider', configuration : 'tests')
  45. testImplementation project(path : ':spring-security-web', configuration : 'tests')
  46. testImplementation "jakarta.inject:jakarta.inject-api"
  47. testImplementation "org.assertj:assertj-core"
  48. testImplementation "org.junit.jupiter:junit-jupiter-api"
  49. testImplementation "org.junit.jupiter:junit-jupiter-params"
  50. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  51. testImplementation "org.mockito:mockito-core"
  52. testImplementation "org.mockito:mockito-junit-jupiter"
  53. testImplementation "org.springframework:spring-test"
  54. testImplementation 'com.squareup.okhttp3:mockwebserver'
  55. testImplementation 'ch.qos.logback:logback-classic'
  56. testImplementation 'io.projectreactor.netty:reactor-netty'
  57. testImplementation 'io.rsocket:rsocket-transport-netty'
  58. testImplementation 'jakarta.annotation:jakarta.annotation-api'
  59. testImplementation 'jakarta.xml.bind:jakarta.xml.bind-api'
  60. testImplementation 'jakarta.websocket:jakarta.websocket-api'
  61. testImplementation 'jakarta.websocket:jakarta.websocket-client-api'
  62. testImplementation 'ldapsdk:ldapsdk:4.1'
  63. testImplementation('net.sourceforge.htmlunit:htmlunit') {
  64. exclude group: 'commons-logging', module: 'commons-logging'
  65. exclude group: 'xml-apis', module: 'xml-apis'
  66. }
  67. testImplementation "org.apache.directory.server:apacheds-core"
  68. testImplementation "org.apache.directory.server:apacheds-core-entry"
  69. testImplementation "org.apache.directory.server:apacheds-protocol-shared"
  70. testImplementation "org.apache.directory.server:apacheds-protocol-ldap"
  71. testImplementation "org.apache.directory.server:apacheds-server-jndi"
  72. testImplementation 'org.apache.directory.shared:shared-ldap'
  73. testImplementation "com.unboundid:unboundid-ldapsdk"
  74. testImplementation 'jakarta.persistence:jakarta.persistence-api'
  75. testImplementation "org.hibernate.orm:hibernate-core"
  76. testImplementation 'org.hsqldb:hsqldb'
  77. testImplementation 'org.mockito:mockito-core'
  78. testImplementation "org.mockito:mockito-inline"
  79. testImplementation('org.seleniumhq.selenium:htmlunit-driver') {
  80. exclude group: 'commons-logging', module: 'commons-logging'
  81. exclude group: 'xml-apis', module: 'xml-apis'
  82. }
  83. testImplementation('org.seleniumhq.selenium:selenium-java') {
  84. exclude group: 'commons-logging', module: 'commons-logging'
  85. exclude group: 'io.netty', module: 'netty'
  86. }
  87. testImplementation 'org.springframework.ldap:spring-ldap-core'
  88. testImplementation 'org.springframework:spring-expression'
  89. testImplementation 'org.springframework:spring-jdbc'
  90. testImplementation 'org.springframework:spring-orm'
  91. testImplementation 'org.springframework:spring-tx'
  92. testImplementation 'org.springframework:spring-core-test'
  93. testImplementation ('org.springframework.data:spring-data-jpa') {
  94. exclude group: 'org.aspectj', module: 'aspectjrt'
  95. }
  96. testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core'
  97. testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-reactor'
  98. testImplementation 'io.mockk:mockk'
  99. testImplementation 'org.junit.platform:junit-platform-launcher'
  100. testImplementation 'org.apache.maven.resolver:maven-resolver-connector-basic'
  101. testImplementation ('org.apache.maven.resolver:maven-resolver-impl') {
  102. exclude(group: "javax.annotation", module: "javax.annotation-api")
  103. }
  104. testImplementation ('org.apache.maven:maven-resolver-provider') {
  105. exclude(group: "javax.inject", module: "javax.inject")
  106. exclude(group: "javax.annotation", module: "javax.annotation-api")
  107. }
  108. testImplementation ('org.apache.maven.resolver:maven-resolver-transport-http') {
  109. exclude group: "org.slf4j", module: "jcl-over-slf4j"
  110. }
  111. testRuntimeOnly 'org.hsqldb:hsqldb'
  112. }
  113. rncToXsd {
  114. rncDir = file('src/main/resources/org/springframework/security/config/')
  115. xsdDir = rncDir
  116. xslFile = new File(rncDir, 'spring-security.xsl')
  117. }
  118. tasks.withType(KotlinCompile).configureEach {
  119. kotlinOptions {
  120. languageVersion = "1.7"
  121. apiVersion = "1.7"
  122. freeCompilerArgs = ["-Xjsr305=strict", "-Xsuppress-version-warnings"]
  123. jvmTarget = "17"
  124. }
  125. }
  126. build.dependsOn rncToXsd