Hi, currently I'm facing <https://stackoverflow.co...
# kapt
Hi, currently I'm facing https://stackoverflow.com/questions/53289265/invalid-method-declaration-in-kotlin-enum-class-building-with-gradle-wrapper I think. We migrate our build chain to JDK11 though so a fallback to Java 8 is no real option. My error is
Copy code
> Task :kaptGenerateStubsKotlin
e: …/Condition.java:16: error: invalid method declaration; return type required
        Condition() {
with an enum class like
Copy code
enum class Condition {

    EXACT {
        override fun evaluate(actual: Set<String>, expected: Set<String>) = actual == expected


    abstract fun evaluate(actual: Set<String>, expected: Set<String>): Boolean
My build setup is
Copy code
➜ gradle -v                                                             
executing gradlew instead of gradle

Gradle 5.0

Build time:   2018-11-26 11:48:43 UTC
Revision:     7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987

Kotlin DSL:   1.0.4
Kotlin:       1.3.10
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          11.0.1 (Oracle Corporation 11.0.1+13)
OS:           Linux 4.19.4-arch1-1-ARCH amd64
Any suggestions how to handle this error?
Hello, does this actually work with Java 8 (ex. when building locally)? In any case, please create an issue at https://youtrack.jetbrains.com/newissue?project=kt and attach a sample project to reproduce the problem if you can. Thank you.
@Alexey Belkov [JB] Java 8 works fine