Common klib support in the Kotlin Gradle plugin (KT-32677)

Refactor the Kotlin/Native compilations and tasks to support
Kotlin/Native-shared source sets compilation within the metadata target.

Provide the feature flag kotlin.mpp.enableCommonKlibs that enables
the following behavior:
* compilation of Kotlin/Native-shared source sets to a klib using
the Kotlin/Native compiler.
* compilation of common source sets (not just Kotlin/Native) into a
klib rather than *.kotlin_metadata

Issue #KT-32677 Fixed
This commit is contained in:
Sergey Igushkin
2020-01-20 14:28:46 +03:00
parent dd9ac39b65
commit 970ee4539b
35 changed files with 541 additions and 196 deletions
@@ -33,6 +33,8 @@ interface KotlinCompilation<out T : KotlinCommonOptions> : Named, HasAttributes,
val allKotlinSourceSets: Set<KotlinSourceSet>
val defaultSourceSetName: String
val defaultSourceSet: KotlinSourceSet
fun defaultSourceSet(configure: KotlinSourceSet.() -> Unit)