Hi there, I’m writing my annotation processor th...
# announcements
m
Hi there, I’m writing my annotation processor that generates some kotlin code. I’m trying to understand the example from the kotlin repo: https://github.com/JetBrains/kotlin/blob/master/libraries/examples/annotation-processor-example/src/main/kotlin/example/ExampleAnnotationProcessor.kt I created a string that represents a source file and when I try to write it in a file (like in an example above) I get a
java.lang.IllegalStateException: failed to analyze: java.io.FileNotFoundException
on this line:
File(kotlinGenerated, "simpleFile.kt").writer().buffered().use { it.append(replacedSource) }
. I would expect that this creates a new file. The interesting part is that the error appeared only after I included the
kotlin-kapt
plugin. Also, after including this plugin, NOTE messages are not printed (warnings are). I have two questions: How do I create a new file and write to it? How do I change the log level? Thanks