I’ve got a peculiar issue: I’m trying to utilize ...
# community-support
k
I’ve got a peculiar issue: I’m trying to utilize some external gradle plugins, but in my build I’m seeing an older version of hte plugin being transformed, and I believe used:
Copy code
Transforming build-targets-gradle-plugin-0.0.0.jar (com.faire:build-targets-gradle-plugin:0.0.0) with InstrumentationAnalysisTransform
Transforming build-targets-gradle-plugin-0.0.1.jar (com.faire:build-targets-gradle-plugin:0.0.1) with InstrumentationAnalysisTransform
I can’t share code, but I’m mostly looking for help on debugging why this would be. I’ve verified that there are no versions specified in the code base except via
libs.versions.toml
which has the right
0.0.1
version. I can see other old plugin versions in use, too. How can I debug why these old versions are showing up?
1
v
Easiest, look at a build scan. Otherwise use
buildEnvironment
task. It can be misleading though, for example when things come in through classloader hierarchy like
buildSrc
dependencies.
k
we don’t have any
buildSrc
and no
includeBuild(…)
. What should be looked at in the build scan>
I guess, build dependencies 🤦‍♂️
v
I did not say anything about
includeBuild
. Those would be visible.
buildSrc
would not.
k
Curiously, neither version is in the build dependencies of the scan
v
Or I believe if it comes in through settings classpath you also will miss it iirc
Debug the build, set a breakpoint, get the class instance and get its classloader. The
toString()
usually shows quite clearly from which classloader that class is coming.
Will maybe not help to find both easily, but if you are right and the wrong one is used, you can at least see where it is coming from
k
hmm, the build is failing because it cant’ find extension functions from the plugin — does that make any sense?
they’re only in one version
🤦‍♂️ I figured it out. I had a bad version of a plugin that was pulling the old versions. Gradle was getting confused by this. Going to fix our internal plugins to find this. Figured this out by search for references to the
com.faire:build-targets-gradle-plugin
, back tracked to another plugin. When I bumped the version on this one, pulled that one I was still getting old. Figured out there’s an older version on the classpath that needs to be bumped/removed.
Thanks for the help @Vampire
🦆 1
👌 1