https://kotlinlang.org logo
#ksp
Title
# ksp
j

jameskleeh

07/13/2022, 2:38 AM
Hey folks, I need to call
environment.codeGenerator.createNewFile(
and create a file in a directory that contains
.
in it. Example path:
META-INF/services/a.b.c/d.e.f
where
d.e.f
is a file name. Is this possible? Currently passing that path as the package name results in
META-INF/services/a/b/c/d.e.f
looking at the implementation, this doesn’t seem possible. Can I submit a PR?
I would suggest a new API
createNewFile(path: String, location: FileLocation)
where
FileLocation
would be an enum for java, kotlin, class, resources
I created https://github.com/google/ksp/pull/1041. Also noticed there are no tests for the CodeGeneratorImpl so I created some
👌 4
j

Jiaxiang

07/13/2022, 9:42 PM
Thanks for the PR! see github for my comment 🙂
3 Views