dependency-management.gradle 2.1 KB

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