I recently updated my project to Gradle 6.6 (in order to update to Kotlin 1.4.0) and whenever I build it I get an error with this stack trace. Downgrading gradle back to 5.5.1 fixes the issue:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateKotlinCommonGrammarSource'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:208)
<32 internal calls>
Caused by: java.lang.NoSuchMethodError: org.gradle.process.internal.worker.WorkerProcessFactory.singleRequestWorker(Ljava/lang/Class;Ljava/lang/Class;)Lorg/gradle/process/internal/worker/SingleRequestWorkerProcessBuilder;
at com.strumenta.antlrkotlin.gradleplugin.internal.AntlrWorkerManager.createWorkerProcess(AntlrWorkerManager.java:39)
at com.strumenta.antlrkotlin.gradleplugin.internal.AntlrWorkerManager.runWorker(AntlrWorkerManager.java:34)
at com.strumenta.antlrkotlin.gradleplugin.AntlrKotlinTask.execute(AntlrKotlinTask.java:230)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<93 internal calls>
It seems like the plugin is trying to reference a method singleRequestWorker which was removed in the lastest gradle version, so the plugin will need a different API to create workers. A bit of googling suggests that SpotBugs had a similar issue. Maybe I will look into this later.
I recently updated my project to Gradle 6.6 (in order to update to Kotlin 1.4.0) and whenever I build it I get an error with this stack trace. Downgrading gradle back to 5.5.1 fixes the issue:
It seems like the plugin is trying to reference a method
singleRequestWorker
which was removed in the lastest gradle version, so the plugin will need a different API to create workers. A bit of googling suggests that SpotBugs had a similar issue. Maybe I will look into this later.