fixes in GenerateSealedTypesWorkaround

This commit is contained in:
2025-01-15 13:22:07 +06:00
parent 647daa8627
commit 24977822c9
5 changed files with 49 additions and 5 deletions

View File

@@ -116,9 +116,9 @@ class Processor(
allowNonSealed = annotation ?.includeNonSealedSubTypes ?: false
).distinct()
val subClassesNames = subClasses.filter {
it.getAnnotationsByType(GenerateSealedWorkaround.Exclude::class).count() == 0
it.getAnnotationsByType(GenerateSealedTypesWorkaround.Exclude::class).count() == 0
}.sortedBy {
(it.getAnnotationsByType(GenerateSealedWorkaround.Order::class).firstOrNull()) ?.order ?: 0
(it.getAnnotationsByType(GenerateSealedTypesWorkaround.Order::class).firstOrNull()) ?.order ?: 0
}.map {
it.toClassName()
}.toList()