Enable metadata publishing for new MPP and consumption from source sets
* Add configurations for consuming source sets metadata (extending the source set's dependency configurations). These configurations will be used by the IDE to pick up the dependencies metadata. * Remove the universal preset from the default presets, create a metadata target by default for compiling and publishing the metadata of `commonMain` (in the future, we will publish and consume the metadata of the other source sets as well). * Make the classpath configurations of common modules consume the metadata and thus ensure compatibility of 1.2.x MPP with the new MPP model.
This commit is contained in:
+14
@@ -23,6 +23,20 @@ interface KotlinSourceSet : Named, HasKotlinDependencies {
|
||||
fun dependsOn(other: KotlinSourceSet)
|
||||
val dependsOn: Set<KotlinSourceSet>
|
||||
|
||||
val apiMetadataConfigurationName: String
|
||||
val implementationMetadataConfigurationName: String
|
||||
val compileOnlyMetadataConfigurationName: String
|
||||
val runtimeOnlyMetadataConfigurationName: String
|
||||
|
||||
override val relatedConfigurationNames: List<String>
|
||||
get() = super.relatedConfigurationNames +
|
||||
listOf(
|
||||
apiMetadataConfigurationName,
|
||||
implementationMetadataConfigurationName,
|
||||
compileOnlyMetadataConfigurationName,
|
||||
runtimeOnlyMetadataConfigurationName
|
||||
)
|
||||
|
||||
companion object {
|
||||
const val COMMON_MAIN_SOURCE_SET_NAME = "commonMain"
|
||||
const val COMMON_TEST_SOURCE_SET_NAME = "commonTest"
|
||||
|
||||
Reference in New Issue
Block a user