tbroyer / gradle-errorprone-plugin

Gradle plugin to use the error-prone compiler for Java
Apache License 2.0
366 stars 32 forks source link

Support Gradle 8, JDK 17 #77

Closed tkruse closed 1 year ago

tkruse commented 1 year ago

Upgrading from gradle 7 to gradle 8 yields:

Execution failed for task ':compileJava'.
> org.gradle.api.tasks.compile.ForkOptions

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':compileJava'.
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
        ...
Caused by: java.lang.InstantiationError: org.gradle.api.tasks.compile.ForkOptions
        at net.ltgt.gradle.errorprone.ErrorPronePlugin.configureForJava16plus(ErrorPronePlugin.kt:198)
        at net.ltgt.gradle.errorprone.ErrorPronePlugin.access$configureForJava16plus(ErrorPronePlugin.kt:34)
        at net.ltgt.gradle.errorprone.ErrorPronePlugin$apply$2$3.execute(ErrorPronePlugin.kt:140)
        at net.ltgt.gradle.errorprone.ErrorPronePlugin$apply$2$3.execute(ErrorPronePlugin.kt:34)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:828)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:801)
        at org.gradle.api.internal.tasks.execution.TaskExecution$3.run(TaskExecution.java:242)

Tried with Gradle 8.0.2 and 8.1 on Ubuntu, using openjdk 17.0.6 2023-01-17

My sample project: https://gitlab.com/tkruse/java_gradle_template/-/tree/master/groovy_dsl

tkruse commented 1 year ago

Sorry, I think I still had used 2.0.2, 3.0.1 works I believe.