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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. exclude group: 'commons-logging', module: 'commons-logging'
  44. }
  45. api ("org.opensaml:opensaml-saml-impl") {
  46. exclude group: 'commons-logging', module: 'commons-logging'
  47. }
  48. opensaml4MainImplementation "org.opensaml:opensaml-core:4.1.0"
  49. opensaml4MainImplementation ("org.opensaml:opensaml-saml-api:4.1.0") {
  50. exclude group: 'commons-logging', module: 'commons-logging'
  51. }
  52. opensaml4MainImplementation ("org.opensaml:opensaml-saml-impl:4.1.0") {
  53. exclude group: 'commons-logging', module: 'commons-logging'
  54. }
  55. provided 'jakarta.servlet:jakarta.servlet-api'
  56. testImplementation 'com.squareup.okhttp3:mockwebserver'
  57. testImplementation "org.assertj:assertj-core"
  58. testImplementation "org.junit.jupiter:junit-jupiter-api"
  59. testImplementation "org.junit.jupiter:junit-jupiter-params"
  60. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  61. testImplementation "org.mockito:mockito-core"
  62. testImplementation "org.mockito:mockito-inline"
  63. testImplementation "org.mockito:mockito-junit-jupiter"
  64. testImplementation "org.springframework:spring-test"
  65. }
  66. project.tasks.matching { t -> t.name == "jar"}.configureEach {
  67. duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  68. from {
  69. compileOpensaml3MainJava
  70. }
  71. from {
  72. compileOpensaml4MainJava
  73. }
  74. }
  75. project.tasks.matching { t -> t.name == "sourcesJar"}.configureEach {
  76. from {
  77. sourceSets.opensaml3Main.allSource
  78. }
  79. from {
  80. sourceSets.opensaml4Main.allSource
  81. }
  82. }
  83. javadoc {
  84. source += sourceSets.opensaml3Main.allJava + sourceSets.opensaml4Main.allJava
  85. }
  86. opensaml3Test {
  87. useJUnitPlatform()
  88. }
  89. opensaml4Test {
  90. useJUnitPlatform()
  91. }