Last active
November 18, 2021 20:53
-
-
Save PaulWoitaschek/1332fd3da39eca513968dda97352ec08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal class SwiftGenProcessor( | |
private val environment: SymbolProcessorEnvironment | |
) : SymbolProcessor { | |
private var invoked = false | |
override fun process(resolver: Resolver): List<KSAnnotated> { | |
if (invoked) { | |
return emptyList() | |
} | |
invoked = true | |
val generator = EnumGenerator(environment.codeGenerator) | |
resolver.getSymbolsWithAnnotation("com.yazio.shared.common.SwiftExport") | |
.forEach { | |
it as KSClassDeclaration | |
generator.generate(it) | |
} | |
return emptyList() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment