What is the best way to start with a development o...
# multiplatform
m
What is the best way to start with a development of KMP library from scratch? Yes, I would probably take a look at any existing high rank KMP lib, but I was wondering that KMP library template is 6 months old. KMP App already uses Kotlin 2.0, but doesn't have a library as a separated library gradle module...
p
6 months is not too bad although agree it should be updated with the latest language and tooling version. I would say start with something simple. TBH a library is just another gradle module with a publishing plugin applied to it. In fact the KMP App template you mentioned, the module
shared
is basically a library.
👌 1
m
Thank you for the hint on the
shared
module. I've learned, that the current KMP App template doesn't contain
shared
, if you generate mobile apps only. If I add "server", `shared`will also became a part of the project ...
p
That's right
But in fact they are all just gradle modules. There are some unofficial naming conventions to ease things up, like
share
,
iosApp
and
composeApp
. But the name doesn't mean much. What really make a module an application or a library is the Gradle Plugins you apply on the project.
You can see all them as modules that depend on other modules.