3

I am investigating generating Kotlin code with KotlinPoet

i would like to be able to programatically mark the target directory as "Generated Sources Root"

however i cannot see a KotlinPoet option for this.

is it possible to mark my target directory as "Generated Sources Root" from my generator code?

or do i have to manually configure this using IntelliJ?

or is it possible to configure this from my groovy gradle build file?

Hector
  • 4,016
  • 21
  • 112
  • 211
  • 1
    You could use https://docs.gradle.org/current/userguide/idea_plugin.html with code similar to https://youtrack.jetbrains.com/issue/IDEA-219200 – Alexey Belkov Jun 17 '22 at 14:20

0 Answers0