Endre Deak
02/12/2021, 12:54 AM./gradlew build
Configuration on demand is an incubating feature.
> Task :ServerCommon:kaptGenerateStubsKotlin FAILED
e: org.jetbrains.kotlin.util.ReenteringLazyValueComputationException
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ServerCommon:kaptGenerateStubsKotlin'.
> Internal compiler error. See log for more details
how can I get into the details? It’s a JVM project, using kotlin and java as well.Endre Deak
02/12/2021, 1:28 AMgradle --assembleDebug
but my project is not androiddmitriy.novozhilov
02/12/2021, 7:05 AMEndre Deak
02/12/2021, 4:49 PMEndre Deak
02/12/2021, 7:03 PM// build.gradle.kts
dependencies {
kapt("com.google.dagger:dagger-compiler:2.27")
}
// class structure that fails:
sealed class Thing<T> {
// fun defaultValue(): String = // with explicit return type, build passes
fun defaultValue() =
when(this) {
StringThing -> "string"
StringSubThing -> "stringSub"
}
}
sealed class SubThing<T, K> : Thing<T>()
object StringThing : Thing<String>()
object StringSubThing : SubThing<String, String>()
So defaultValue
method return type has to be explicitly defined (maybe this is a known problem). What really annoys me is the missing details on the output.