maiflai / gradle-scalatest

A plugin to enable the use of scalatest in a gradle Scala project.
The Unlicense
73 stars 35 forks source link

Gradle 8.4 support? #108

Closed tiendatiowa closed 11 months ago

tiendatiowa commented 11 months ago

Hello. I have an existing repo that works just fine with Gradle 7.2 and gradle-scalatest 0.31. However, when upgrading Gradle to 8.4, test fails with this exception:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transit:test'.
> Could not find method isEnabled() for arguments [] on Report junitXml of type org.gradle.api.internal.tasks.testing.DefaultJUnitXmlReport.

From the home page, it doesn't look like Gradle 8.4 is supported yet (it's not in the list), and so I want to know if this is a known issue, and if yes, whether Gradle 8.4 support will be coming soon? We have to upgrade Gradle to 8.4 to address some vulnerabilities caused by some of our dependencies, and the version with the fix would require Gradle 8.x. Thanks!

maiflai commented 11 months ago

I think this plugin accesses the required property rather than checking isEnabled.

Perhaps there's something in your project that looks for this? Can you share the project or a simple reproduction please?

tiendatiowa commented 11 months ago

I've attached a reproducible case below. In the file gradle/wrapper/gradle-wrapper.properties, you can see that I'm using 8.4, and running ./gradlew test would yield this error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':utils:test'.
> Could not find method isEnabled() for arguments [] on Report junitXml of type org.gradle.api.internal.tasks.testing.DefaultJUnitXmlReport.

However, if you just replace 8.4 with 7.2, then the command runs fine.

scala-shared-external.zip

maiflai commented 11 months ago

sorry, should have spotted this sooner.

you need to be using the current release which is 0.32, not 0.31.

0.32 removed deprecations which are now completely gone from upstream.

Please could you test with 0.32 and I'll update the compatibility table if it looks ok.

tiendatiowa commented 11 months ago

Yes, 0.32 works. Thanks for the quick response!