i'd love to you use `jtsgen`, a project written in...
# multiplatform
t
i'd love to you use
jtsgen
, a project written in java that allows to generate typscript typings from java- and kotlin classes. the problem: it uses
kapt
to generate them which drives it more or less impossible. i'd need to use it as
common
-dependency to use the annotations which isn't possible and OTOH using kapt seems to be impossible in MPP, too. But there is a glimmer of hope left: in fact we would need this dependency only at compiletime and there is nothing left at runtime. Can anyone imagine a way to use it?
o
As far as I know, annotation processing is the only technique right now that allows circular dependencies, i.e. using generated code from code it was generated from. If you don’t need it, you can use a lot of various generation techniques.
t
i dont think i understood your answer...
o
Do you plan to use TS typings in the same project, or do you want it for external consumption?
t
external consumption - the
d.ts
files would be a artefact of the MPP
o
Then you might go with a Gradle plugin that will consume output of Kotlin compilation and generate d.ts
Here is a project I’m lazily working on to generate benchmarks in MPP: https://github.com/orangy/gradle-benchmarks I think it has everything you need, except for your specific code generation.
t
but i dont want to parse the output of something. it's the sorucecode itself that is process by kapt