Skip to content

Instantly share code, notes, and snippets.

@myungpyo
Created December 27, 2021 03:47
Show Gist options
  • Select an option

  • Save myungpyo/02dc6095b2e7b2f4010b0bd737e558fa to your computer and use it in GitHub Desktop.

Select an option

Save myungpyo/02dc6095b2e7b2f4010b0bd737e558fa to your computer and use it in GitHub Desktop.
override fun process(resolver: Resolver): List<KSAnnotated> {
val symbolMap = resolver
.getSymbolsWithAnnotation(STICKY_ANNOTATION_NAME)
.filterIsInstance<KSPropertyDeclaration>()
.groupBy {
resolver.getOwnerJvmClassName(it) ?: run {
logger.warn("Failed to find class name of property $it")
return emptyList()
}
}
if (symbolMap.isEmpty()) return emptyList()
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment