https://kotlinlang.org logo
#ios
Title
# ios
t

Tim Hauptmann

11/14/2019, 9:36 AM
Hey, I have a Kotlin multiplatform project which creates an Xcode-framework. I want to draw a class dependency graph of the framework. I found this tool for pure Objective-C sources https://github.com/nst/objc_dep And there are many tools out there which can process a .jar. Somebody knows a tool which can process an Xcode-framework or the Kotlin source files?
m

Michal Harakal

11/14/2019, 3:23 PM
otherwise gradle has build in mechenism for libs dependecies
./gradlew app:dependencies
t

Tim Hauptmann

11/14/2019, 3:41 PM
Thx, but I think my question was unclear. I want to draw the interaction of the classes from my framework. Like this:

https://github.com/nst/objc_dep/raw/master/pics/fswalker1.png

m

Michal Harakal

11/14/2019, 3:45 PM
Now after reading your question more carefully ….. I don’t know anything special for kotlin, but I would probably go with JVM based tools for that, like e.g. http://blog.schauderhaft.de/degraph/ anyway interessting topic. I am answering in a context of a MPP project…
t

Tim Hauptmann

11/14/2019, 3:50 PM
I try to write the complete code in kotlin. So I have an iosMain module using a commonMain Module. So I can only compile with kotlin/native. My problem is, I can't use JVM tools this way. 😉
m

Michal Harakal

11/15/2019, 10:17 AM
Your topic is very interesting, I didn’t find anything you can use directly, but if there will be a solution, then it will be something to be able to deal with intermediate format of llvm or something on the beginning of compilation. There are some hints how to write kotlin compiler plugins like here https://kotlinlang.org/docs/reference/compiler-plugins.html also I’ve remember to see an annotation processor for kotlin (which can get enough information for generating of dependency graphs). I will check also llvm stuff.
4 Views