I am having a problem with a transitive dependency of my grails-flyway plugin. org.grails.plugins:grails-flyway:0.2.1 declares a dependency to
Goto your Gradle cache files folder:
cd ~/.gradle/caches/modules-2/files-2.1
search this version number:
grep -r "3.2.1" *
you will find out which pom file is using this version,
usually it's something in spring-boot-dependencies-x.y.z.RELEASE.pom :
3.2.1
......
org.flywaydb
flyway-core
${flyway.version}
which means, if you use spring-boot, it will overwrite some dependency version.
you can overwrite it again, by adding the following line in your gradle.properties file:
flyway.version=4.0.1
I encounter a similar problem and wasted several hours on it. So I left this information here, hope this could save your time if you get stuck into this problem