2
0

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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. javaCompiler = javaToolchains.compilerFor {
  36. languageVersion = JavaLanguageVersion.of(11)
  37. }
  38. sourceCompatibility = '11'
  39. targetCompatibility = '11'
  40. }
  41. compileOpensaml4TestJava {
  42. javaCompiler = javaToolchains.compilerFor {
  43. languageVersion = JavaLanguageVersion.of(11)
  44. }
  45. }
  46. dependencies {
  47. management platform(project(":spring-security-dependencies"))
  48. api project(':spring-security-web')
  49. api "org.opensaml:opensaml-core"
  50. api "org.opensaml:opensaml-saml-api"
  51. api "org.opensaml:opensaml-saml-impl"
  52. opensaml4MainImplementation libs.org.opensaml4.opensaml.core
  53. opensaml4MainImplementation libs.org.opensaml4.opensaml.saml.api
  54. opensaml4MainImplementation libs.org.opensaml4.opensaml.saml.impl
  55. provided 'jakarta.servlet:jakarta.servlet-api'
  56. optional 'com.fasterxml.jackson.core:jackson-databind'
  57. testImplementation 'com.squareup.okhttp3:mockwebserver'
  58. testImplementation "org.assertj:assertj-core"
  59. testImplementation "org.skyscreamer:jsonassert"
  60. testImplementation "org.junit.jupiter:junit-jupiter-api"
  61. testImplementation "org.junit.jupiter:junit-jupiter-params"
  62. testImplementation "org.junit.jupiter:junit-jupiter-engine"
  63. testImplementation "org.mockito:mockito-core"
  64. testImplementation "org.mockito:mockito-inline"
  65. testImplementation "org.mockito:mockito-junit-jupiter"
  66. testImplementation "org.springframework:spring-test"
  67. }
  68. project.tasks.matching { t -> t.name == "jar"}.configureEach {
  69. duplicatesStrategy = DuplicatesStrategy.EXCLUDE
  70. from {
  71. compileOpensaml3MainJava
  72. }
  73. from {
  74. compileOpensaml4MainJava
  75. }
  76. }
  77. project.tasks.matching { t -> t.name == "sourcesJar"}.configureEach {
  78. from {
  79. sourceSets.opensaml3Main.allSource
  80. }
  81. from {
  82. sourceSets.opensaml4Main.allSource
  83. }
  84. }
  85. javadoc {
  86. source += sourceSets.opensaml3Main.allJava + sourceSets.opensaml4Main.allJava
  87. }
  88. opensaml3Test {
  89. useJUnitPlatform()
  90. }
  91. opensaml4Test {
  92. useJUnitPlatform()
  93. }