I want to setup multi module KMP project with one ...
# multiplatform
e
I want to setup multi module KMP project with one of the modules just having only common sources. Why have I to specify KMP target in that module? Actually I will not have any platform specific code there.
m
You need the targets so the module knows what platforms it needs to be compiled for.
e
@mkrussel In case when I use the module only as a library for other modules and have only common sources there, I don’t need a target. It will be chosen later when the higher level module will be compiled.
m
That's just not how gradle works. The module itself will create a bunch of assemble tasks based on the platforms. The modules that then depend on it call those tasks. They will have nothing to call without them. Listing the platforms also indicates what platforms the common tests should be run and what platforms any libraries you include as dependencies have to support.