I have a project where I need to read a JSON file ...
# getting-started
z
I have a project where I need to read a JSON file from a remote source and parse that, then generate classes from it that will be distributed in the library. I'm not really sure though how to structure the project. I have the library and a generator project but I dont know how i would let the generator use the classes from the library and then put new generated classes back into the library without a circular dependency
j
Why does the generator need the classes from the library? If you're using Kotlin Poet, you probably just need to use the FQN of the classes without actually depending on the library.
e
^^ you just need
ClassName("my.package.name", "MyClass")
in the generator usually
if you really need to use some of the same classes (for deserialization or similar) then you will have to split those out to a separate subproject that both the generator and the main project depend on