Add defaultSourceSet to KotlinCompilation
Previously, the connection between a `KotlinCompilation` and its default `KotlinSourceSet` (the one automatically created and added into the compilation) was not expressed in the MPP model in any reasonable way that can be used in the build scripts. However, this connection seems to have settled in the build logic, and it may be useful to be able to get the default source set from a compilation, for example, to be able to configure dependencies across several targets in a uniform way. The metadata compilations don't have their dedicated source sets, but we can think of commonMain as a default source set for the project's metadata, is it is currently in fact only contains the declarations from commonMain. Issue #KT-27685 Fixed
This commit is contained in:
+4
@@ -29,6 +29,10 @@ interface KotlinCompilation<out T : KotlinCommonOptions> : Named, HasAttributes,
|
||||
|
||||
val kotlinSourceSets: Set<KotlinSourceSet>
|
||||
|
||||
val defaultSourceSet: KotlinSourceSet
|
||||
|
||||
fun defaultSourceSet(configure: KotlinSourceSet.() -> Unit)
|
||||
|
||||
val compileDependencyConfigurationName: String
|
||||
|
||||
var compileDependencyFiles: FileCollection
|
||||
|
||||
Reference in New Issue
Block a user