spring-security-saml2-service-provider.gradle 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. apply plugin: 'io.spring.convention.spring-module'
  2. apply plugin: 'nebula.facet'
  3. facets {
  4. opensaml3Main {
  5. parentSourceSet = 'main'
  6. }
  7. opensaml4Main {
  8. parentSourceSet = 'main'
  9. }
  10. opensaml3Test {
  11. parentSourceSet = 'opensaml3Main'
  12. }
  13. opensaml4Test {
  14. parentSourceSet = 'opensaml4Main'
  15. }
  16. }
  17. sourceSets {
  18. opensaml3Test {
  19. compileClasspath += sourceSets.test.output
  20. runtimeClasspath += sourceSets.test.output
  21. }
  22. opensaml4Test {
  23. compileClasspath += sourceSets.test.output
  24. runtimeClasspath += sourceSets.test.output
  25. }
  26. }
  27. configurations {
  28. opensaml3TestImplementation.extendsFrom testImplementation
  29. opensaml4TestImplementation.extendsFrom testImplementation
  30. opensaml4MainImplementation {
  31. canBeConsumed = true
  32. }
  33. }
  34. compileOpensaml4MainJava {
  35. sourceCompatibility = '11'
  36. targetCompatibility = '11'
  37. }
  38. dependencies {
  39. management platform(project(":spring-security-dependencies"))
  40. api project(':spring-security-web')
  41. api "org.opensaml:opensaml-core"
  42. api "org.opensaml:opensaml-saml-api"
  43. api "org.opensaml:opensaml-saml-impl"
  44. opensaml4MainImplementation "org.opensaml:opensaml-core:4.1.0"
  45. opensaml4MainImplementation "org.opensaml:opensaml-saml-api:4.1.0"
  46. opensaml4MainImplementation "org.opensaml:opensaml-saml-impl:4.1.0"
  47. provided 'jakarta.servlet:jakarta.servlet-api'
  48. optional 'com.fasterxml.jackson.core:jackson-databind'
  49. testImplementation 'com.squareup.okhttp3:mockwebserver'
  50. testImplementation "org.assertj:assertj-core"
  51. testImplementation "org.skyscreamer:jsonassert"
  52. testImplementation "org.junit.jupiter:junit-jupiter-api"
  53. testImplementation "org.junit.jupiter:junit-jupiter-params"
  54. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  55. testImplementation "org.mockito:mockito-core"
  56. testImplementation "org.mockito:mockito-inline"
  57. testImplementation "org.mockito:mockito-junit-jupiter"
  58. testImplementation "org.springframework:spring-test"
  59. }
  60. project.tasks.matching { t -> t.name == "jar"}.configureEach {
  61. duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  62. from {
  63. compileOpensaml3MainJava
  64. }
  65. from {
  66. compileOpensaml4MainJava
  67. }
  68. }
  69. project.tasks.matching { t -> t.name == "sourcesJar"}.configureEach {
  70. from {
  71. sourceSets.opensaml3Main.allSource
  72. }
  73. from {
  74. sourceSets.opensaml4Main.allSource
  75. }
  76. }
  77. javadoc {
  78. source += sourceSets.opensaml3Main.allJava + sourceSets.opensaml4Main.allJava
  79. }
  80. opensaml3Test {
  81. useJUnitPlatform()
  82. }
  83. opensaml4Test {
  84. useJUnitPlatform()
  85. }