Hi, I'm trying to build kotlin/jvm project with ja...
# gradle
h
Hi, I'm trying to build kotlin/jvm project with java 14 toolchain. But when run gradle task kaptKotlin, error occurs with error message below. Does anyone know about a solution for this error? More specifically, I use gradle plugin kapt to compile grpc-java and reactor-grpc. Anyway I think the cause of the error is that kapt plugin is not compatible with gradle toolchain feature. My Build Environment Installed jdk version : 11. It will be used to run gradle. (maybe runtime 55.0) gradle java toolchain version : 14 (maybe runtime 58.0) error message
Copy code
bad class file: /mypath/my.jar(/mypackage/my.class)
    class file has wrong version 58.0, should be 55.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mymodule:kaptKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
   > java.lang.reflect.InvocationTargetException (no error message)
build gradle kotlin dsl script
Copy code
configure<JavaPluginExtension> {
        toolchain {
            languageVersion.set(JavaLanguageVersion.of("14"))
        }
    }