maiflai / gradle-scalatest

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

Add knownImmutableClasses to ScalaTestAction to avoid breaking change with groovy 2.5 #68

Closed rpalcolea closed 5 years ago

rpalcolea commented 5 years ago

Gradle 5 is moving to groovy 2.5 which introduces the following error:

Caused by: java.lang.RuntimeException: Unsupported type (com.github.maiflai.BackwardsCompatibleJavaExecActionFactory) found for field 'factory' while constructing immutable class com.github.maiflai.ScalaTestAction.
Immutable classes only support properties with effectively immutable types including:
- Strings, primitive types, wrapper types, Class, BigInteger and BigDecimal, enums
- classes annotated with @KnownImmutable and known immutables (java.awt.Color, java.net.URI)
- Cloneable classes, collections, maps and arrays, and other classes with special handling
  (java.util.Date and various java.time.* classes and interfaces)
rpalcolea commented 5 years ago

Hi @maiflai, can you take a look on this one?

maiflai commented 5 years ago

Hi,

Thanks for this. I find it odd that the integration tests don't pick this up even after updating to a 5.0 snapshot.

I can however reproduce the issue in a separate project, so thanks for the fix.

Stu.