[Gradle] Use source set name for Cinterop configurations
This will ensure that source set have isolated Cinterop configurations. With proper extendsFrom relations. And prevent from dependencies i.e. from linuxMain to nativeMain if they both have the same set of underlying targets. ^KT-63338 Verification Pending
This commit is contained in:
committed by
Space Team
parent
645d263474
commit
951830fcef
+2
-2
@@ -99,7 +99,7 @@ internal suspend fun Project.locateOrCreateCommonizedCInteropDependencyConfigura
|
||||
val commonizerTarget = sourceSet.commonizerTarget.await() ?: return null
|
||||
if (commonizerTarget !is SharedCommonizerTarget) return null
|
||||
|
||||
val configurationName = commonizerTarget.identityString + "CInterop"
|
||||
val configurationName = sourceSet.name + "CInterop"
|
||||
configurations.findByName(configurationName)?.let { return it }
|
||||
|
||||
val configuration = configurations.create(configurationName) { configuration ->
|
||||
@@ -116,7 +116,7 @@ internal suspend fun Project.locateOrCreateCommonizedCInteropDependencyConfigura
|
||||
* has to happen that will resolve the exact list of klibs.
|
||||
*/
|
||||
configuration.attributes.attribute(CInteropCommonizerArtifactTypeAttribute.attribute, CInteropCommonizerArtifactTypeAttribute.KLIB)
|
||||
description = "Commonized CInterop dependencies for targets: '$commonizerTarget'."
|
||||
description = "Commonized CInterop dependencies for $sourceSet with targets: '$commonizerTarget'."
|
||||
}
|
||||
|
||||
return configuration
|
||||
|
||||
Reference in New Issue
Block a user