[Gradle] sourcesJarTask: Wait for compilations to finalise

^KT-34662 Verification Pending
This commit is contained in:
Sebastian Sellmair
2023-03-15 13:09:14 +01:00
committed by Space Team
parent aa969fe764
commit 15ca5412d2
@@ -267,7 +267,10 @@ internal fun applyUserDefinedAttributes(target: AbstractKotlinTarget) {
internal fun sourcesJarTask(compilation: KotlinCompilation<*>, componentName: String, artifactNameAppendix: String): TaskProvider<Jar> =
sourcesJarTask(
compilation.target.project,
compilation.target.project.future { compilation.allKotlinSourceSets.associate { it.name to it.kotlin } },
compilation.target.project.future {
await(KotlinPluginLifecycle.Stage.AfterFinaliseCompilations)
compilation.allKotlinSourceSets.associate { it.name to it.kotlin }
},
componentName,
artifactNameAppendix
)