I am currently trying to migrate a Maven project to Gradle
In my Maven version I have the dependency versions all listed out l
Adding to Vikas Sachdeva's answer:
It's not worked for me in that way on my subproject. The Gradle throws an error 'Could not find org.springframework:spring-context:$springVersion'. Finally, I solved my problem by adding the plus sign.
for example:
root gradle.properties:
springVersion = '5.0.3.RELEASE'
root build.gradle
dependencies {
compile "org.springframework:spring-context:${springVersion}"
}
subproject build.gradle
dependencies {
compile "org.springframework:spring-context:" + springVersion
}
Note: my gradle version is 5.4.1
or you can using the plugin manage your dependency version.
io.spring.dependency-management
Refs: https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/