https://kotlinlang.org logo
#k2-early-adopters
Title
# k2-early-adopters
a

Aftab Ahmad

02/26/2024, 4:23 PM
Hello! I've been trying out beta4 and the K2 Kapt flag. I've noticed that
kotlinx-serialization
is failing when the
K2 kapt flag (kapt.use.k2=true)
is enabled:
Copy code
> Task :app:kaptGenerateStubsDebugKotlin
w: K2 kapt is an experimental feature. Use with caution.

> Task :app:kaptDebugKotlin FAILED
serialization/app/build/tmp/kapt3/stubs/debug/com/sample/serialization/response/SampleResponse.java:94: error: illegal '.'
        public static final com.sample.serialization.response.SampleResponse..serializer INSTANCE = null;
I filed a ticket on the kotlinx-serialization repo but not sure if that was the best place as the issue surfaces there but the bug might is in K2 kapt
d

dmitriy.novozhilov

02/26/2024, 5:19 PM
Please report an issue to Youtrack (kotl.in/issue)
👍 1