dependency-management.gradle 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. if (!project.hasProperty("springVersion")) {
  2. ext.springVersion = "5.2.+"
  3. }
  4. if (!project.hasProperty("springSecurityVersion")) {
  5. ext.springSecurityVersion = "5.4.+"
  6. }
  7. if (!project.hasProperty("reactorVersion")) {
  8. ext.reactorVersion = "Dysprosium-SR+"
  9. }
  10. dependencyManagement {
  11. imports {
  12. mavenBom "org.springframework:spring-framework-bom:$springVersion"
  13. mavenBom "org.springframework.security:spring-security-bom:$springSecurityVersion"
  14. mavenBom "io.projectreactor:reactor-bom:$reactorVersion"
  15. }
  16. dependencies {
  17. dependency "com.nimbusds:oauth2-oidc-sdk:latest.release"
  18. dependency "com.nimbusds:nimbus-jose-jwt:latest.release"
  19. dependency "com.fasterxml.jackson.core:jackson-databind:2.+"
  20. dependency "javax.servlet:javax.servlet-api:4.+"
  21. dependency 'junit:junit:latest.release'
  22. dependency 'org.assertj:assertj-core:latest.release'
  23. dependency 'org.mockito:mockito-core:latest.release'
  24. dependency "com.squareup.okhttp3:mockwebserver:3.+"
  25. dependency "com.squareup.okhttp3:okhttp:3.+"
  26. dependency "com.jayway.jsonpath:json-path:2.+"
  27. }
  28. }
  29. /*
  30. NOTE:
  31. The latest `reactor-netty` dependency was split into `reactor-netty-core` and `reactor-netty-http`,
  32. which resulted in the snapshot build to fail. The below configuration fixes it.
  33. Reference:
  34. - https://github.com/spring-projects/spring-security/issues/8909
  35. - https://github.com/reactor/reactor-netty/issues/739#issuecomment-667047117
  36. */
  37. if (reactorVersion.startsWith('20')) {
  38. if (reactorVersion.endsWith('SNAPSHOT') || reactorVersion.endsWith('+')) {
  39. ext.reactorLatestVersion = "latest.integration"
  40. } else {
  41. ext.reactorLatestVersion = "latest.release"
  42. }
  43. configurations {
  44. all {
  45. resolutionStrategy {
  46. eachDependency { DependencyResolveDetails details ->
  47. if (details.requested.name == 'reactor-netty') {
  48. details.useTarget("${details.requested.group}:reactor-netty-http:${reactorLatestVersion}")
  49. details.because("reactor-netty is now split into reactor-netty-core and reactor-netty-http")
  50. }
  51. }
  52. }
  53. }
  54. }
  55. }