-
Notifications
You must be signed in to change notification settings - Fork 59
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
[fix] gradle 6.4 incompatibility #71
Conversation
This doesn't seem to work fully on my system. There are no errors, but if I set a mainClassName in my build.gradle file, it doesn't get used. It is as if Gradle configures all the tasks, then processes the custom extensions, then executes the tasks. When I was calling setMain at execution time, I got the final value for all of the extension properties. When I call it in the configure phase, I don't I'm curious to see if you get the same behavior. Can you try the following?
|
You're right it doesn't work. For some reason the mainClassName in the configure method is |
I think the issue is that I saw that the Lombok plugin had a similar issue - I wonder if they have a similar bug... I also saw that there was a related Gradle issue that is now marked as closed. I'm starting to think that our best bet may be to wait for the next gradle release, though version 6.4.1 which was released after the gradle issue was closed still has the problem. |
If I change the configure method like this:
it actually tries to load the configured main class. But:
|
Ah I was missing the plugin in the |
I pushed my changes. @stevesaliman Could you check again? |
That does indeed seem to work. I'm a little concerned about relying on an internal API, since they can change without warning, but at least it now works. The best part is that this won't break backwards compatibility. Nice find, and thank you for the contribution. |
closes #70
I actually have no idea what I'm doing here but it seems to work with 6.3 and 6.4.