spring-security-config.gradle 6.3 KB

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