commonMain.co.touchlab.skie.plugin.shim.impl.ActualKotlinNativeTargetShim.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-plugin-shim-impl-kgp_2.0.0 Show documentation
Show all versions of gradle-plugin-shim-impl-kgp_2.0.0 Show documentation
Implementation of the SKIE Gradle Plugin Shim API, used by the main plugin module to interact with Kotlin Gradle Plugin.
The newest version!
package co.touchlab.skie.plugin.shim.impl
import co.touchlab.skie.plugin.shim.KotlinNativeCompilationShim
import co.touchlab.skie.plugin.shim.KotlinNativeTargetShim
import org.gradle.api.Named
import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.model.ObjectFactory
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
class ActualKotlinNativeTargetShim(
private val kotlinNativeTarget: KotlinNativeTarget,
objectFactory: ObjectFactory,
) : KotlinNativeTargetShim, Named by kotlinNativeTarget {
override val compilations: NamedDomainObjectContainer =
objectFactory.domainObjectContainer(KotlinNativeCompilationShim::class.java)
init {
kotlinNativeTarget.compilations.configureEach {
val shim = ActualKotlinNativeCompilationShim(this, this@ActualKotlinNativeTargetShim)
compilations.add(shim)
}
}
override fun toString(): String =
kotlinNativeTarget.toString()
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is ActualKotlinNativeTargetShim) return false
if (kotlinNativeTarget != other.kotlinNativeTarget) return false
return true
}
override fun hashCode(): Int =
kotlinNativeTarget.hashCode()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy