-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Ensure the plugin works with Gradle 7 #158
Comments
I tried to upgrade Gradle to 7.0-rc1 in the plugin build. Unfortunately, the tests cannot run because Gradle 7 uses Groovy 3 and Spock 1.3 (the production version) is only compatible with Groovy 2.x and not with Groovy 3. It sounds like the solution is to use the latest milestone of Spock 2.0. That's what Gradle did in their code base. But this is not so simple. I created an extension that runs the tests using multiple Gradle versions. Spock changed the extensions behavior. I tried multiple things, but I cannot get the method parameter extension work. According to the documentation, the code that worked with Spock 1 should keep working with Spock 2 and can be simplified because the arguments array will always have the right size. That's unfortunately not what happens when running the extension. The arguments array is empty (whereas it should contain 1 element of For now, I am not able to build the plugin using Gradle 7. As a workaround, I added Gradle 7 as a Gradle version against which the integration tests need to be executed. The tests are passing on my laptop, I pushed the code in a branch to the |
I reported the Spock issue I encountered with Spock at spockframework/spock#1305. |
On the bright side, I don't think we need to try building with Gradle 7.0-rc1, we don't have an elaborate setup so apart from plugin incompatibility I we should be fine. I think at this point we might start reconsidering the support for Gradle 5, not as in intentionally removing it but dropping the automated tests for it during the next major, which I guess could be shortly after the release of 7.0 |
I've used the Spock milestones (currently |
@deepy You are right, while we don't want to use Gradle 7 specific APIs, we do not need to use the latest Gradle version. But even if it is not mandatory, it's still better to use the latest version. That's the reason why I investigated this Spockframework issue. For now, adding Gradle 7 to the list of tested versions should be sufficient. So as far as I understand you would be in favor to replace the latest Gradle 5 by the newest Gradle 7? And thanks @henrik242 for your feedback. I don't know why I did not use the M5 release. But I just come to test and the issue is also present in the M5 milestone. |
I'm 100% with you in regards to using the latest version, I think at the moment we might just have to live with having even slower tests until our next major where we drop 5.6.4 from the versions to be tested (and maybe log a warning from the plugin that we've dropped support for <6 in that version). And we could release that major a few days after 7.0 is released, in fact we could probably open the discussion about dropping Gradle 5 support entirely so we can remove some of the awkward things we had to do to get 5, 6, and configuration cache support |
Ok, I see what you mean. So I am going to merge the branch I created that adds tests against Gradle 7.0-rc1. And I'm ok to think about dropping Gradle 5 support. Thanks for your answer! |
Gradle 7.0-rc1 was recently published. We should ensure that the plugin works using Gradle 7.
The text was updated successfully, but these errors were encountered: