-
Notifications
You must be signed in to change notification settings - Fork 36
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
Avoid calling afterEvaluate on already evaluated project #210
Avoid calling afterEvaluate on already evaluated project #210
Conversation
The tests do pass here and the deprecation warning is gone... but does it still do the same thing? Now |
I suppose. I have theories (we might dig deeper and debug if you doubt):
Thanks @chali for your contribution 💯 |
Here is my understanding which mostly overlaps with @f4lco. The previous part would register gretty/libs/gretty/src/main/groovy/org/akhikhl/gretty/GrettyPlugin.groovy Lines 860 to 862 in f6bae12
The purpose of As @f4lco pointed out there is this condition inside gretty/libs/gretty/src/main/groovy/org/akhikhl/gretty/GrettyPlugin.groovy Lines 750 to 754 in f6bae12
It means we would register I made an assumption that plugin and extension are always applied created together. If that is not true the change would miss projects with only |
Yes. I was having second thoughts about Yeah, that's some overlap in understanding right there 😄 From my perspective there's nothing new / nothing to correct. It's nice to learn about
I think that's a merely theoretical situation. I would recommend to every build author to create extensions and apply the plugin together. I just wanted to show every possible aspect of the change, so please don't worry about it too much. |
@f4lco - go ahead and merge when you're fine. :) |
@boris-petrov will you take care of cherry-picking both #210 and #207 to 3.x? You wanted to wait for a new 3.x release and I don't know the exact status of that. |
I will do the cherry-picking, yes. As for 3.0.4 - it has been out since yesterday so be sure to go and update! 😄 |
@boris-petrov do you have any estimates when this change could be included and released in 3.x? |
@chali - unfortunately not for now. We have to check how publishing to Maven Central works (I believe @javabrett has already "applied" there) and then it's going to be easier. As soon as possible I hope. :) Does this stop you from using Gretty in any way? Perhaps with Gradle 7? |
@boris-petrov We have about 25 projects affected by this issue if they switch to Gradle 7. However I still have a ton of compatibility work ahead of me so it will take a while before we will be able to switch to Gradle 7. I'm confident that it won't be an issue to have fix released later. I'm assuming based on your answer that it might happen in following days or weeks not months? :-) |
Hopefully! :) |
We are trying to move to Gradle7 and are hitting this problem with Gretty. Is there a temporary workaround? Or is there a way to get a 3.x snapshot build with the fix? |
@ismart-dev - can you try this way of using a Gretty snapshot? Be sure to use the latest commit from |
@boris-petrov - Thanks for the pointer. Unfortunately, it doesn't work. My build fails with: `FAILURE: Build failed with an exception.
Looking at the build log here: https://jitpack.io/com/github/gretty-gradle-plugin/gretty/10d53b5a331a7aac0b27778a2a4b8ab9c9094a10/build.log The gretty plugin build fails with: `> Task :cleanIntegrationTests FAILED FAILURE: Build completed with 2 failures. 1: Task failed with an exception.
2: Task failed with an exception.
Any help much appreciated... |
@ismart-dev - right. I opened a new issue for this, please subscribe for it to get a notification when it's resolved. |
@ismart-dev, @chali - do you mind trying a snapshot version from JitPack? I believe it should contain all the fixes and should work on Gradle 7 and multi-module projects. |
hey @boris-petrov sorry for the late reply. I finally got a chance to try it out but I'm running into some issues while using Jitpack. I declared my dependency this way:
I'm getting this error when resolving the plugin:
The list is longer, having multiple gretty submodules there. |
This should help with #206