Archived
1
0
Fork 0

Fix entity stubs being generated despite they already exist in kotlin source set

This commit is contained in:
Moritz Ruth 2021-01-04 17:51:32 +01:00
parent e7d5576269
commit 3dc596252d
No known key found for this signature in database
GPG key ID: AFD57E23E753841B

View file

@ -73,7 +73,7 @@ class EntitiesGenerator(
val name = val name =
CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, entity.get("name").toString())!! + "Entity" CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, entity.get("name").toString())!! + "Entity"
val filePathRelativeToSourceRoot = "./${BLOCK_PACKAGE.replace(".", "/")}/$name.kt" val filePathRelativeToSourceRoot = "./${ENTITY_PACKAGE.replace(".", "/")}/$name.kt"
if (sourcesDir.resolve(filePathRelativeToSourceRoot).exists()) continue if (sourcesDir.resolve(filePathRelativeToSourceRoot).exists()) continue
val type = TypeSpec.classBuilder(name) val type = TypeSpec.classBuilder(name)