default

The default KotlinSourceSets hierarchy template for Kotlin Multiplatform projects.

This hierarchy template is applied to projects 'by default' if they are compatible unless the project opts out via the Gradle property kotlin.mpp.applyDefaultHierarchyTemplate=false, or defines a custom KotlinHierarchyTemplate (for example, via kotlin.applyHierarchyTemplate { .. }).

Incompatible projects include:

  • Projects that configure custom KotlinSourceSet.dependsOn edges.

  • Projects that define custom target names matching one of the shared source sets. For example, kotlin.linuxX64("linux").

The default hierarchy is:

                                                                        common
|
+-----------------+-------------------+
| |

native ...

|
|
|
+----------------------+--------------------+-----------------------+
| | | |

apple linux mingw androidNative

|
+-----------+------------+------------+
| | | |

macos ios tvos watchos