spring-authorization-server/gradle/dependency-management.gradle
2020-09-08 11:48:15 -04:00

68 lines
2.0 KiB
Groovy

if (!project.hasProperty("springVersion")) {
ext.springVersion = "5.2.+"
}
if (!project.hasProperty("springSecurityVersion")) {
ext.springSecurityVersion = "5.3.+"
}
if (!project.hasProperty("reactorVersion")) {
ext.reactorVersion = "Dysprosium-SR+"
}
if (!project.hasProperty("locksDisabled")) {
dependencyLocking {
lockAllConfigurations()
}
}
dependencyManagement {
imports {
mavenBom "org.springframework:spring-framework-bom:$springVersion"
mavenBom "org.springframework.security:spring-security-bom:$springSecurityVersion"
mavenBom "io.projectreactor:reactor-bom:$reactorVersion"
}
dependencies {
dependency "com.nimbusds:oauth2-oidc-sdk:8.+"
dependency "com.nimbusds:nimbus-jose-jwt:8.+"
dependency "com.fasterxml.jackson.core:jackson-databind:2.+"
dependency "javax.servlet:javax.servlet-api:4.+"
dependency 'junit:junit:latest.release'
dependency 'org.assertj:assertj-core:latest.release'
dependency 'org.mockito:mockito-core:latest.release'
dependency "com.squareup.okhttp3:mockwebserver:3.+"
dependency "com.squareup.okhttp3:okhttp:3.+"
dependency "com.jayway.jsonpath:json-path:2.+"
}
}
/*
NOTE:
The latest `reactor-netty` dependency was split into `reactor-netty-core` and `reactor-netty-http`,
which resulted in the snapshot build to fail. The below configuration fixes it.
Reference:
- https://github.com/spring-projects/spring-security/issues/8909
- https://github.com/reactor/reactor-netty/issues/739#issuecomment-667047117
*/
if (reactorVersion.startsWith('20')) {
if (reactorVersion.endsWith('SNAPSHOT') || reactorVersion.endsWith('+')) {
ext.reactorLatestVersion = "latest.integration"
} else {
ext.reactorLatestVersion = "latest.release"
}
configurations {
all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
if (details.requested.name == 'reactor-netty') {
details.useTarget("${details.requested.group}:reactor-netty-http:${reactorLatestVersion}")
details.because("reactor-netty is now split into reactor-netty-core and reactor-netty-http")
}
}
}
}
}
}