Skip to content

Commit

Permalink
Fix imports in Kotlin model generation
Browse files Browse the repository at this point in the history
The models project generated Kotlin code that didn't have the correct imports. This happened because the imports were not being tracked as imports in the KotlinCodeGenerator, only as code.
  • Loading branch information
MariusVolkhart committed Jan 7, 2024
1 parent 0c83398 commit af3b52f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public KotlinCodeGenerator(TemplateCompiler compiler, TemplateConfig config, Con
@Override
public void onImport(String importClass) {
writePackageIfRequired();
imports.add(importClass);
kotlinCode.append("import ").append(importClass).append("\n");
}

Expand Down

0 comments on commit af3b52f

Please sign in to comment.