Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Gradle 6 #52

Closed
Jakobeha opened this issue Aug 23, 2020 · 3 comments
Closed

Support for Gradle 6 #52

Jakobeha opened this issue Aug 23, 2020 · 3 comments

Comments

@Jakobeha
Copy link

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.

drieks added a commit to drieks/antlr-kotlin that referenced this issue Oct 21, 2020
@drieks
Copy link
Contributor

drieks commented Jan 14, 2021

@ftomassetti: this ticket can be closed, we are already using Gradle 6.7

@ftomassetti
Copy link
Member

Right!

@koreQAQ
Copy link

koreQAQ commented Apr 28, 2021

Thanks, i changed my gradle version to 5.x , then i fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants