-
Notifications
You must be signed in to change notification settings - Fork 58
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
pitest version seems to be ignored in build.gradle.kts #244
Comments
to reproduce you can use an opensource project of mine, and set pitest version to 1.6.1 here: |
Hmm, strange. I have the regression tests for that and they pass. I even extended assertion to verify that
With debugger, I see that your values are not set at all when I bind them to the task (in The options I see:
If you have more extensive Kotlin-based configuration knowledge maybe you can suggest something. Alternatively, maybe you could consult the Gradle forum to get a hint? |
strange thing is that with the build file from functest it works. in my own project can put anything into pitestVersion, and when i run gradle dependencies it still shows 1.5.2 |
I think I found the reason. it only happens with the kotest pitest plugin. probably it has a dependency on pitest and that is stronger than the pitest version that the Gradle plugin creates. |
Thanks for digging that topic! That, indeed, might be the reason. Nevertheless, it's quite interesting as kotest (in master) seems to declare pitest 1.4.11 dependency. 1.5.2 seems to be taken from my plugin - as a default value. Only an ability to override it from the configuration seems to be problematic. Maybe kotest gets that value (version) at the beginning, but I haven't found any evidence in code. You might want to report it to the kotest developers. Maybe there will have a better idea how to solve your case. |
I've also had much of the same problem in a non-Kotlin project of mine (can't easily share because it's closed source) that otherwise doesn't have pitest anywhere in the graph. I managed work around the plugin not picking up the specified version by just mimicking what the code would otherwise be trying to do with it:
gradle-pitest-plugin/src/main/groovy/info/solidsoft/gradle/pitest/PitestPlugin.groovy Line 222 in b4028af
Rather hacky, but it's getting the job done for the time being if anybody else needed a quick-fix. EDIT: Not an issue for me anymore with the latest version of the plugin. Presumably it's been fixed by #313 |
I tried to use the 1.5.2 plugin with the new pitest version (
pitestVersion.set("1.6.1")
) but looking at the reports it still said "pitest 1.5.2". when running in verbose mode I can see that the 1.5.2 jar files are added to the classpath:The text was updated successfully, but these errors were encountered: