-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to apply on Windows with: The task 'dependencyUpdates' (com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask) is not a subclass of the given type (com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask). #97
Comments
Hm interesting. What happens if you run |
I can't run I tried 0.44.0 of the versions plugin first. I updated it to 0.45.0 to see if this issue would go away. I just tried downgrading to 0.41.0 (same version as in the README.md file here) and the problem remained. I agree that it is very strange to have this be a Windows-specific issue, but I have yet to find what might be different on the Windows machine. I've checked for things in |
Thanks for testing that and the additional info, I'll try to repro it asap to see if I can make sense of it! |
My guess would be that something is adding a newer version of ./gradlew buildEnvironment I have some projects where the new version of Possible to reproduce by creating file initscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath("com.github.ben-manes:gradle-versions-plugin:0.45.0")
}
}
allprojects {
apply<com.github.benmanes.gradle.versions.VersionsPlugin>()
}
|
Yeah that would be trouble because you are mixing the I think mixing init and applying the version catalog plugin should work though 🤔 |
I believe init scripts have a separate classpath. This causes some magic problems. What this error ( In this case, Windows machine is somehow adding dependency from different classpath 🤷 |
Yeah that was my initial thought too...still battling setting up a VM after a few hours so can't double check yet 😅 |
Have you tried to reproduce this with custom init script on your's non-windows machine? Maybe it would be enough to remove type checking and rely only on the task's name here? Like:
Then even if classes doesn't match, this should pass. |
That can be an option though there would still be a dependency on the task properties (and those would need to be set dynamically too). It might be a worthwhile fix in any case. I hope @swpalmer can confirm that there's an init script or something similar that is including the versions plugin :) |
Thanks, that was it. I found the init script. I didn't remember ever making it... until your hint. |
Same project works on macOS but gets this error on Windows 11.
Same JDK version: Azul 17.0.5
Same Gradle version: 7.6
Steps to reproduce
Project uses
.\gradle\libs.versions.toml
with the following:build.gradle
contains the following:And results in the following error:
As you can see there appears to be some sort of interaction between this plugin and
com.github.ben-manes.versions:0.45.0
Stacktrace
Same project has no issues on two different machines with macOS. Only on Windows I get this error.
All software other than OS is the same...
Windows:
macOs:
The text was updated successfully, but these errors were encountered: