Does anybody have a good idea how one could use an...
# kapt
m
Does anybody have a good idea how one could use annotations to "indirectly annotate" a class which isn't in your module? I was trying something like this:
Copy code
import io.ktor.http.Url

@JSON
typealias Url = Url
Then in the annotation processor I could access the aliased type and apply the annotation logic there. Unfortunately that doesn't work with source-only annotations.
First shot:
Copy code
@file:JSON.CodecProvider(
	externalTypes = [
		JSON.External(
			target = Url::class,
			configuration = JSON(…)
		)
	]
)