jbake-org / jbake-gradle-plugin

A Gradle plugin for JBake
Other
45 stars 21 forks source link

Cannot run 'bakePreview' task when using gradle 7.4.2 #68

Open jhrom opened 2 years ago

jhrom commented 2 years ago

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 commented 2 years ago

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.

tjuricek-at-salesforce commented 1 year ago

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
mariogarcia commented 1 year ago

Same here:

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