[Gradle] Remove c-interop dependency to main compilation's output
This commit is contained in:
committed by
Space
parent
8e6f84d5cd
commit
7b5a3f8d1b
-9
@@ -282,15 +282,6 @@ open class KotlinNativeTargetConfigurator<T : KotlinNativeTarget> : AbstractKotl
|
||||
defineConfigurationsForCInterop(compilation, it, target, configurations)
|
||||
}
|
||||
}
|
||||
|
||||
if (createTestCompilation) {
|
||||
val mainCompilation = target.compilations.getByName(MAIN_COMPILATION_NAME)
|
||||
target.compilations.findByName(TEST_COMPILATION_NAME)?.apply {
|
||||
cinterops.all {
|
||||
it.dependencyFiles += mainCompilation.output.allOutputs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected fun configureBinaries(target: KotlinNativeTarget) {
|
||||
|
||||
+3
-12
@@ -33,8 +33,7 @@ internal open class CInteropCommonizerTask : AbstractCInteropCommonizerTask() {
|
||||
@get:Input val identifier: CInteropIdentifier,
|
||||
@get:Input val konanTarget: KonanTarget,
|
||||
@get:Internal val sourceSets: Provider<Set<KotlinSourceSet>>,
|
||||
@get:Classpath val libraryFile: Provider<File>,
|
||||
@get:Classpath val dependencies: FileCollection
|
||||
@get:Classpath val libraryFile: Provider<File>
|
||||
) {
|
||||
@Suppress("unused") // Used for UP-TO-DATE check
|
||||
@get:Input
|
||||
@@ -98,8 +97,7 @@ internal open class CInteropCommonizerTask : AbstractCInteropCommonizerTask() {
|
||||
konanHome = project.file(project.konanHome),
|
||||
outputTargets = parameters.targets,
|
||||
inputLibraries = cinteropsForTarget.map { it.libraryFile.get() }.filter { it.exists() }.toSet(),
|
||||
dependencyLibraries = cinteropsForTarget.flatMap { it.dependencies.files }.map(::NonTargetedCommonizerDependency).toSet()
|
||||
+ getNativeDistributionDependencies(parameters),
|
||||
dependencyLibraries = getNativeDistributionDependencies(parameters),
|
||||
outputDirectory = outputDirectory(parameters),
|
||||
logLevel = project.commonizerLogLevel
|
||||
)
|
||||
@@ -177,14 +175,7 @@ private fun CInteropProcess.toGist(): CInteropGist {
|
||||
konanTarget = konanTarget,
|
||||
// FIXME support cinterop with PM20
|
||||
sourceSets = project.provider { (settings.compilation as? KotlinCompilation<*>)?.kotlinSourceSetsIncludingDefault },
|
||||
libraryFile = outputFileProvider,
|
||||
|
||||
/**
|
||||
* See: KT-46109
|
||||
* For now, c-interop commonization is invoked for all relevant files together.
|
||||
* Using dependencies coming e.g. from a different Gradle project requires additional design.
|
||||
*/
|
||||
dependencies = project.files()
|
||||
libraryFile = outputFileProvider
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user