jbake-gradle-plugin icon indicating copy to clipboard operation
jbake-gradle-plugin copied to clipboard

Cannot run 'bakePreview' task when using gradle 7.4.2

Open jhrom opened this issue 2 years ago • 3 comments

When I try to start bakePreview task, exception is thrown:

Caused by: groovy.lang.MissingMethodException: No signature of method: org.gradle.internal.logging.services.DefaultLoggingManager.setLevel() is applicable for argument types: (org.gradle.api.logging.LogLevel) values: [INFO] Possible solutions: getLevel() at org.jbake.gradle.JBakeServeTask.serve(JBakeServeTask.groovy:49) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

Other tasks work correctly

I'll submit fix for it soon

jhrom avatar Jul 08 '22 19:07 jhrom

68-gradle-fix.patch.txt

Because of the lack of permissions, I was not able to create a new branch. I attached the fix as a patch.

jhrom avatar Jul 08 '22 20:07 jhrom

This is not working with gradle 8.0 as well, the error just shows up a little differently.

Execution failed for task ':bakePreview'.
> Cannot set readonly property: level for class: org.gradle.internal.logging.services.DefaultLoggingManager

tjuricek-at-salesforce avatar Feb 17 '23 18:02 tjuricek-at-salesforce

Same here:

  • Gradle 7.2
  • JDK11
* What went wrong:
Execution failed for task ':website:bakePreview'.
> Cannot set readonly property: level for class: org.gradle.internal.logging.services.DefaultLoggingManager

mariogarcia avatar Feb 23 '23 22:02 mariogarcia