toolisticon / kotlin-code-generation

Opinionated setup for kotlin-poet code generator projects
Apache License 2.0
2 stars 0 forks source link

Print files generated / by the generator as a file list #41

Closed zambrovski closed 2 months ago

zambrovski commented 2 months ago

Scenario

Current Behaviour

Not printed

Wanted Behaviour

Simple switch to print the generated file list (navigatable)

Possible Workarounds


    val result = KotlinCodeGenerationTest.compile(
      KotlinCompilationCommand(
        fileSpecs = files
      )
    )

    result.result.messages.lines()
      .filter { line -> line.endsWith(".kt") }
      .distinct()
      .forEach { message -> println("file://$message") }
jangalinski commented 2 months ago

call result.toString() to see the generated files