[Gradle] Keep materializing commonizeCInteropTask...
...as it contains important information needed to create consumable commonized cinterop configurations ^KT-59596 Verification Pending
This commit is contained in:
committed by
Space Team
parent
14f216764d
commit
cbe11e8c9a
+1
-7
@@ -75,13 +75,7 @@ class KotlinMultiplatformPlugin : Plugin<Project> {
|
||||
// Ensure that the instance is created and configured during apply
|
||||
project.kotlinIdeMultiplatformImport
|
||||
project.locateOrRegisterIdeResolveDependenciesTask()
|
||||
// FIXME: This code creates consumable configurations for Commonized CInterops
|
||||
// FIXME: Unfortunately, it also creates [commonizeCInteropTask] eagerly
|
||||
// FIXME: Decouple [allInteropGroups] from task internals and then create configuration without task materialization.
|
||||
project.launch {
|
||||
val task = project.commonizeCInteropTask()?.get() ?: return@launch
|
||||
project.createCommonizedCInteropApiElementsKlibArtifact(task)
|
||||
}
|
||||
project.launch { project.createCommonizedCInteropApiElementsKlibArtifact() }
|
||||
project.addBuildListenerForXcode()
|
||||
project.whenEvaluated { kotlinMultiplatformExtension.createFatFrameworks() }
|
||||
}
|
||||
|
||||
+3
-3
@@ -41,9 +41,9 @@ internal fun createCInteropApiElementsKlibArtifact(
|
||||
}
|
||||
}
|
||||
|
||||
internal suspend fun Project.createCommonizedCInteropApiElementsKlibArtifact(
|
||||
interopTask: CInteropCommonizerTask
|
||||
) {
|
||||
internal suspend fun Project.createCommonizedCInteropApiElementsKlibArtifact() {
|
||||
// TODO: Find a way to not materialize task. i.e. initialize only outputDirectory and allInteropGroups
|
||||
val interopTask = project.commonizeCInteropTask()?.get() ?: return
|
||||
for (commonizerGroup in interopTask.allInteropGroups.await()) {
|
||||
for (sharedCommonizerTargets in commonizerGroup.targets) {
|
||||
val configuration = locateOrCreateCommonizedCInteropApiElementsConfiguration(sharedCommonizerTargets)
|
||||
|
||||
Reference in New Issue
Block a user