Fixup for the fix of KT-47506 interfering with CInterop changes
As the `*Default` configurations are gone, each K/N target now has two consumable configuration, the `*ApiElements` and the `*CInteropApiElements`. They have diverging sets of attributes (both more concrete than `*Default` had). To make their attribute sets non-diverging, we set the local-to-project=public on the `*CInteropApiElements` in order to match the same attribute on the `*ApiElements` configuration Related to the original fix of KT-47506
This commit is contained in:
+2
@@ -16,6 +16,7 @@ import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.DefaultCInteropSettings
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeCompilation
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinUsages
|
||||
import org.jetbrains.kotlin.gradle.plugin.setupAsPublicConfigurationIfSupported
|
||||
import org.jetbrains.kotlin.gradle.plugin.usesPlatformOf
|
||||
import org.jetbrains.kotlin.gradle.targets.native.internal.CInteropKlibLibraryElements.cinteropKlibLibraryElements
|
||||
import org.jetbrains.kotlin.gradle.tasks.CInteropProcess
|
||||
@@ -63,6 +64,7 @@ internal fun Project.locateOrCreateCInteropApiElementsConfiguration(target: Kotl
|
||||
return configurations.create(configurationName).apply {
|
||||
isCanBeResolved = false
|
||||
isCanBeConsumed = true
|
||||
setupAsPublicConfigurationIfSupported(target)
|
||||
|
||||
usesPlatformOf(target)
|
||||
attributes.attribute(LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE, cinteropKlibLibraryElements())
|
||||
|
||||
Reference in New Issue
Block a user