Gradle Plugin using deprecated JavaExec.main

1,623 views
Skip to first unread message

Mike Duigou

unread,
Aug 18, 2021, 6:28:35 PM8/18/21
to PIT Users
Hello,

With the recent Gradle 7.1.1 update it began issuing a warning about use of a deprecated feature that will be removed in Gradle 8.0. I traced the problem to the Gradle PITest plugin:

The JavaExec.main property has been deprecated. This is scheduled to be removed in Gradle 8.0.
Please use the mainClass property instead. See https://docs.gradle.org/7.1.1/dsl/org.gradle.api.tasks.JavaExec.html#org.gradle.api.tasks.JavaExec:main for more details.
        at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:418)
        at info.solidsoft.gradle.pitest.PitestTask_Decorated.setMain(Unknown Source)
        at org.gradle.api.tasks.JavaExec.setMain(JavaExec.java:112)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at info.solidsoft.gradle.pitest.PitestTask_Decorated.setProperty(Unknown Source)
        at info.solidsoft.gradle.pitest.PitestTask.<init>(PitestTask.groovy:247)
        at info.solidsoft.gradle.pitest.PitestTask_Decorated.<init>(Unknown Source)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)

Hopefully this can be addressed with a new plugin release before Gradle 8.0 is released.

Cheers,

Mike Duigou

Henry Coles

unread,
Aug 19, 2021, 4:25:29 AM8/19/21
to pitu...@googlegroups.com
Hi Mike,

I think this has already been raised here


Marcin is generally much better at responding to issues than I am, so I suspect he's already looking at it. If you're able to help out I'd leave a comment over there.

Cheers

Henry

--
You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pitusers/14f223fc-b555-4db5-a61d-ab1909b9143cn%40googlegroups.com.

Marcin Zajączkowski

unread,
Aug 19, 2021, 9:57:46 AM8/19/21
to 'Henry Coles' via PIT Users
On 2021-08-19 10:25, 'Henry Coles' via PIT Users wrote:
> Hi Mike,
>
> I think this has already been raised here
>
> https://github.com/szpak/gradle-pitest-plugin/issues/283

Thanks Henry, that's exactly that case.

@Mike, please subscribe to that issue to get a notification about
further changes. It is planned to have it fixed before Gradle 8.0 :).

Btw, maybe you would like to contribute to the project and provide a
pull request? ;)


Marcin
https://blog.solidsoft.pl/ - Working code is not enough

Mike Duigou

unread,
Aug 19, 2021, 1:26:44 PM8/19/21
to PIT Users
Thank you Henry and Marcin!

Both for PITest, the gradle plugin and your responses here!

Cheers,

Mike

Mike Duigou

unread,
Aug 19, 2021, 1:59:49 PM8/19/21
to PIT Users
And now there is a PR :-)

On Thursday, August 19, 2021 at 6:57:46 a.m. UTC-7 Marcin Zajączkowski wrote:
Reply all
Reply to author
Forward
0 new messages