[Gradle, JS] Remove Native Only isMainCompilation only
This commit is contained in:
+1
-1
@@ -199,7 +199,7 @@ open class KotlinNativeTargetConfigurator<T : KotlinNativeTarget>(
|
|||||||
with(compilation) {
|
with(compilation) {
|
||||||
// Register the interop library as a dependency of the compilation to make IDE happy.
|
// Register the interop library as a dependency of the compilation to make IDE happy.
|
||||||
project.dependencies.add(compileDependencyConfigurationName, interopOutput)
|
project.dependencies.add(compileDependencyConfigurationName, interopOutput)
|
||||||
if (isMainCompilation) {
|
if (isMain()) {
|
||||||
// Register the interop library as an outgoing klib to allow depending on projects with cinterops.
|
// Register the interop library as an outgoing klib to allow depending on projects with cinterops.
|
||||||
project.dependencies.add(target.apiElementsConfigurationName, interopOutput)
|
project.dependencies.add(target.apiElementsConfigurationName, interopOutput)
|
||||||
// Add the interop library in publication.
|
// Add the interop library in publication.
|
||||||
|
|||||||
-3
@@ -149,9 +149,6 @@ internal val KonanTarget.isCurrentHost: Boolean
|
|||||||
internal val KonanTarget.enabledOnCurrentHost
|
internal val KonanTarget.enabledOnCurrentHost
|
||||||
get() = HostManager().isEnabled(this)
|
get() = HostManager().isEnabled(this)
|
||||||
|
|
||||||
internal val AbstractKotlinNativeCompilation.isMainCompilation: Boolean
|
|
||||||
get() = isMain()
|
|
||||||
|
|
||||||
// KonanVersion doesn't provide an API to compare versions,
|
// KonanVersion doesn't provide an API to compare versions,
|
||||||
// so we have to transform it to KotlinVersion first.
|
// so we have to transform it to KotlinVersion first.
|
||||||
// Note: this check doesn't take into account the meta version (release, eap, dev).
|
// Note: this check doesn't take into account the meta version (release, eap, dev).
|
||||||
|
|||||||
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -325,7 +325,7 @@ open class KotlinNativeCompile : AbstractKotlinNativeCompile<KotlinCommonOptions
|
|||||||
|
|
||||||
@get:Internal
|
@get:Internal
|
||||||
override val baseName: String
|
override val baseName: String
|
||||||
get() = if (compilation.isMainCompilation) project.name else "${project.name}_${compilation.name}"
|
get() = if (compilation.isMain()) project.name else "${project.name}_${compilation.name}"
|
||||||
|
|
||||||
@get:Input
|
@get:Input
|
||||||
val moduleName: String by project.provider {
|
val moduleName: String by project.provider {
|
||||||
@@ -940,7 +940,7 @@ open class CInteropProcess : DefaultTask() {
|
|||||||
val baseKlibName: String
|
val baseKlibName: String
|
||||||
@Internal get() {
|
@Internal get() {
|
||||||
val compilationPrefix = settings.compilation.let {
|
val compilationPrefix = settings.compilation.let {
|
||||||
if (it.isMainCompilation) project.name else it.name
|
if (it.isMain()) project.name else it.name
|
||||||
}
|
}
|
||||||
return "$compilationPrefix-cinterop-$interopName"
|
return "$compilationPrefix-cinterop-$interopName"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user