-
Notifications
You must be signed in to change notification settings - Fork 22
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 DelombokTask
and InstallLombokTask
under Gradle 6.4
#77
Conversation
…g main during `configure` phase
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
============================================
- Coverage 98.52% 98.48% -0.05%
- Complexity 21 23 +2
============================================
Files 5 5
Lines 68 66 -2
Branches 7 7
============================================
- Hits 67 65 -2
Partials 1 1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution 👍
Released it as 4.0.0 |
Thanks @franzbecker - working fine for us :-) |
I ran into this same issue while looking into Liquibase Gradle Plugin Issue 71. What we found is that calling If you add |
Hi @stevesaliman - I believe this works for the lombok plugin because there isn't an obvious use case for overriding the main class given this is just a convenience extension task that calls Lombok's I understand that it wouldn't work if one attempted to override it in the My understanding from this gradle issue is that you have to use the I deliberately didn't want to go that direction as I couldn't quickly figure out what backwards compatibility that would give us with Gradle versions given it was an internal API. |
I'm actually more concerned with forward compatibility using an internal API :-) I have a feeling our solution will not age well, but we have a more likely use case for needing to override the main class for now. I just wanted to give you the heads up in case you hadn't run across that issue yet. |
Thanks - much appreciated! |
We are not allowed to call
setMain
duringexec
phase onJavaExec
because it is now final due to being aProperty<String>
for lazy configuration in6.4
. See gradle/gradle#12841The tests assertions as left implemented here continue to work up until
6.3
but assertions would need to change for6.4
as the value is no longer set on the mock; and has its own property.Tested this approach works at runtime on
6.3
and6.4
in any case - fixes #76