This repository was archived by the owner on Feb 26, 2023. It is now read-only.

Description
When I create a builder for a class it works fine. But when I used this as an argument for a third party library annotation it causes the build to fail. Maybe this could never work but I'm trying to understand why it is happening. Kapt annotation processing is performed before doing any other actions, right? I've created a small example to illustrate this (created my own annotation for simplicity sake):
fun main(args: Array<String>) {
val foo = FooBuilder().id(UUID.randomUUID().toString()).build()
println("Foo id = " + foo.id)
}
@Builder
@FooAnnotation(builder = FooBuilder::class) // error: cannot find symbol
class Foo(
val id: String
)
@Target(AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.CLASS)
@kotlin.annotation.Retention(AnnotationRetention.RUNTIME)
annotation class FooAnnotation(
val builder: KClass<*>
)