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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 = JavaVersion.VERSION_17
  36. targetCompatibility = JavaVersion.VERSION_17
  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 'javax.servlet:javax.servlet-api'
  48. testImplementation 'com.squareup.okhttp3:mockwebserver'
  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-inline"
  55. testImplementation "org.mockito:mockito-junit-jupiter"
  56. testImplementation "org.springframework:spring-test"
  57. }
  58. project.tasks.matching { t -> t.name == "jar"}.configureEach {
  59. duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  60. from {
  61. compileOpensaml3MainJava
  62. }
  63. from {
  64. compileOpensaml4MainJava
  65. }
  66. }
  67. project.tasks.matching { t -> t.name == "sourcesJar"}.configureEach {
  68. from {
  69. sourceSets.opensaml3Main.allSource
  70. }
  71. from {
  72. sourceSets.opensaml4Main.allSource
  73. }
  74. }
  75. javadoc {
  76. source += sourceSets.opensaml3Main.allJava + sourceSets.opensaml4Main.allJava
  77. }
  78. opensaml3Test {
  79. useJUnitPlatform()
  80. }
  81. opensaml4Test {
  82. useJUnitPlatform()
  83. }