Use compileClasspath configuration for native standard libraries
This commit is contained in:
committed by
Ilya Matveev
parent
5c4adc1100
commit
5140e674b4
+4
@@ -64,6 +64,10 @@ class NewMultiplatformIT : BaseGradleIT() {
|
|||||||
"$pom should contain a name section.",
|
"$pom should contain a name section.",
|
||||||
pom.readText().contains("<name>Sample MPP library</name>")
|
pom.readText().contains("<name>Sample MPP library</name>")
|
||||||
)
|
)
|
||||||
|
Assert.assertFalse(
|
||||||
|
"$pom should not contain standard K/N libraries as dependencies.",
|
||||||
|
pom.readText().contains("<groupId>Kotlin/Native</groupId>")
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val jvmJarEntries = ZipFile(groupDir.resolve(jvmJarName)).entries().asSequence().map { it.name }.toSet()
|
val jvmJarEntries = ZipFile(groupDir.resolve(jvmJarName)).entries().asSequence().map { it.name }.toSet()
|
||||||
|
|||||||
+7
-5
@@ -316,11 +316,13 @@ class KotlinNativeTargetPreset(
|
|||||||
// Allow IDE to resolve the libraries provided by the compiler by adding them into dependencies.
|
// Allow IDE to resolve the libraries provided by the compiler by adding them into dependencies.
|
||||||
result.compilations.all { compilation ->
|
result.compilations.all { compilation ->
|
||||||
val target = compilation.target.konanTarget
|
val target = compilation.target.konanTarget
|
||||||
compilation.dependencies {
|
// First, put common libs:
|
||||||
// First, put common libs:
|
defaultLibs().forEach {
|
||||||
defaultLibs().forEach { implementation(it) }
|
project.dependencies.add(compilation.compileDependencyConfigurationName, it)
|
||||||
// Then, platform-specific libs:
|
}
|
||||||
defaultLibs(target).forEach { implementation(it) }
|
// Then, platform-specific libs:
|
||||||
|
defaultLibs(target).forEach {
|
||||||
|
project.dependencies.add(compilation.compileDependencyConfigurationName, it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user