Matt Groth
05/03/2023, 5:26 PMjvm
and js
. common
is automatically created as well. Code in the common
module cannot contain java classes or js classes. The only things that are allowed in common
are those thar are compatible with jvm
and js
.
Now say I have another project. This one only has a single source set: jvm
. common
is still autoamtically created. However, in this case, common
is allowed to contain java classes.
My understanding is that kotlin Multiplatform automatically configures common
to allow anything that would be able to compile for each target in the project.
Here is my question. I do not want common
to behave differently depending on the targets that exist in a particular subproject. Rather, I would like for common
to mean the same exact thing in each subproject regardless of the targets present. If I take a project that only has a single jvm
source set, and want to add a js
source, I want to know that the common
source set will automatically be compatible. However, I do not want to add a js
and a jvm
source set to every single subproject, even if they would be blank.
Basically, I want to disable the feature that configures common
to have different dependencies based on which source sets are present. If I want to have a common source set that contains java classes for say, jvm desktop + android, then I will create this source set manually or with the incubating hierarchy template feature.ephemient
05/03/2023, 5:34 PMjw
05/03/2023, 5:37 PMMatt Groth
05/03/2023, 5:37 PM