You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to reproduce the issue and made some changes in an attempt to fix it, such as using Provider<java.lang.Object>, but I couldn't resolve the ClassCastException. I'm considering adding a try-catch block and rethrowing the exception to inform users that they should use apply false in the root project.
try {
testTaskSkipEventsServiceProvider.get().addExpectingTestTaskName(testTaskName)
} catch (e:ClassCastException) {
throwIllegalStateException("""You should use `id("io.github.takahirom.roborazzi") version "[version]" apply false` in the root project to ensure the build cache property works correctly.""", e)
}
We can refer to this comment for more context: bmuschko/gradle-docker-plugin#1123 (comment).
It seems we'll have to wait for a fix from Gradle. Therefore, the exception message could be structured as follows:
throw IllegalStateException("""You should use id("io.github.takahirom.roborazzi") version "[version]" apply false in the root project to ensure the build cache property functions correctly. This is a temporary workaround, and we are awaiting a permanent fix from the Gradle core.""", e)
reporting
#261 (comment)
cause
gradle/gradle#17559
The text was updated successfully, but these errors were encountered: