From c791c75bb6be7f612d5c2ec9a95f8770b7b89dab Mon Sep 17 00:00:00 2001 From: Teodor G Date: Thu, 27 Oct 2022 23:20:43 +0300 Subject: [PATCH] made hilt generated class open --- .../com/zeoflow/memo/processor/entity/EntityBuilder.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/memo-processor/src/main/java/com/zeoflow/memo/processor/entity/EntityBuilder.kt b/memo-processor/src/main/java/com/zeoflow/memo/processor/entity/EntityBuilder.kt index 3996234..75a9e3c 100644 --- a/memo-processor/src/main/java/com/zeoflow/memo/processor/entity/EntityBuilder.kt +++ b/memo-processor/src/main/java/com/zeoflow/memo/processor/entity/EntityBuilder.kt @@ -33,8 +33,12 @@ class EntityBuilder( ) val typeSpec = TypeSpec.classBuilder(className()) - .addModifiers(KModifier.PUBLIC) - .addKdoc("Code generated by Memo's Compiler. @see [link](https://github.com/zeoflow/memo)\n\n") + if (entityData.isHilt) { + typeSpec.addModifiers(KModifier.OPEN,KModifier.PUBLIC) + } else { + typeSpec.addModifiers(KModifier.PUBLIC) + } + typeSpec.addKdoc("Code generated by Memo's Compiler. @see [link](https://github.com/zeoflow/memo)\n\n") .addKdoc("Code generated based on the [${entityData.entityName}]") if (entityData.isHilt) {