Skip to content

Commit

Permalink
Merge branch 'v2-compose-1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
raamcosta committed Mar 12, 2024
2 parents 6ac9066 + 2d2e7eb commit 6f9ae2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ internal class ModuleRegistryWriter(
val registryId = moduleName.ifEmpty { UUID.randomUUID().toString().replace("-", "_") }
val importableHelper = ImportableHelper(
setOfImportable(
"com.ramcosta.composedestinations.spec.DestinationSpec",
"kotlin.reflect.KClass"
"com.ramcosta.composedestinations.spec.DestinationSpec"
)
)
codeGenerator.makeFile(
Expand All @@ -60,8 +59,8 @@ internal class ModuleRegistryWriter(
)
annotation class _Destination_Result_Info_$registryId(
val destination: KClass<out DestinationSpec>,
val resultType: KClass<*>,
val destination: String,
val resultType: String,
val isResultNullable: Boolean
)
Expand All @@ -82,12 +81,8 @@ internal class ModuleRegistryWriter(
resultBackTypesByDestination.joinToString(",\n") { (destination, type) ->
"""
| _Destination_Result_Info_$registryId(
| destination = ${
importableHelper.addAndGetPlaceholder(
destination.destinationImportable
)
}::class,
| resultType = ${importableHelper.addAndGetPlaceholder(type.importable)}::class,
| destination = "${destination.destinationImportable.qualifiedName}",
| resultType = "${type.importable.qualifiedName}",
| isResultNullable = ${type.isNullable}
| )
""".trimMargin()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ class Processor(
"typeResults"
)?.map { typeResultAnnotation ->
DestinationResultSenderInfo(
typeResultAnnotation.findArgumentValue<KSType>("destination")!!.declaration.qualifiedName!!.asString(),
typeResultAnnotation.findArgumentValue<KSType>("resultType")!!.declaration.qualifiedName!!.asString(),
typeResultAnnotation.findArgumentValue<String>("destination")!!,
typeResultAnnotation.findArgumentValue<String>("resultType")!!,
typeResultAnnotation.findArgumentValue<Boolean>("isResultNullable")!!,
)
}.orEmpty()
Expand Down

0 comments on commit 6f9ae2a

Please sign in to comment.