Skip to content

Commit

Permalink
Simplify AppComponentHandler generated code (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
kingsleyadio authored Jan 27, 2025
1 parent cccafb5 commit b28eb41
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,11 @@ internal class AppComponentHandler : CodegenHandler {
.addFunction(
FunSpec.builder("create")
.addParameter(appParam)
.returns(generatedComponentCn)
.returns(applicationComponentCn)
.addModifiers(KModifier.PUBLIC, KModifier.OVERRIDE)
.addCode(CodeBlock.of(
"return DaggerGeneratedApplicationComponent.factory().create(%L) as %T",
appParam.name,
generatedComponentCn,
"return DaggerGeneratedApplicationComponent.factory().create(%L)",
appParam.name
))
.build())
.build()
Expand Down

0 comments on commit b28eb41

Please sign in to comment.