In kotlinpoet, There's a `FileSpec.addImport(Impor...
# squarelibraries
m
In kotlinpoet, There's a
FileSpec.addImport(Import)
but can't figure out how to create the
Import
in the first place since its constructor is internal. Is that on purpose? Should
FileSpec.addImport(Import)
be internal too? Or is there a public way to create an
Import
?
a
I think you want to add a Member which automatically sets up the import for you. https://square.github.io/kotlinpoet/#m-for-members
m
I ended up finding a solution to my problem but still curious about the use case for
addImport(Import)
z
It may just be an accidental public API
­čĹŹ 1