[gradle-plugin] Use main targets in the test component by default
This commit is contained in:
committed by
Ilya Matveev
parent
94e6c2a514
commit
a91f91bc65
+1
@@ -41,6 +41,7 @@ open class KotlinNativeTestSuite @Inject constructor(
|
||||
|
||||
init {
|
||||
getImplementationDependencies().extendsFrom(testedComponent.getImplementationDependencies())
|
||||
konanTargets.set(project.provider { testedComponent.konanTargets.get() })
|
||||
}
|
||||
|
||||
override fun getDisplayName(): DisplayName = Describables.withTypeAndName("Kotlin/Native test suite", name)
|
||||
|
||||
+5
-3
@@ -175,9 +175,11 @@ class KotlinNativePlugin @Inject constructor(val attributesFactory: ImmutableAtt
|
||||
objects
|
||||
)
|
||||
|
||||
val binary = component.addTestExecutable(variantIdentity)
|
||||
if (target == HostManager.host) {
|
||||
component.testBinary.set(binary)
|
||||
if (hostManager.isEnabled(target)) {
|
||||
val binary = component.addTestExecutable(variantIdentity)
|
||||
if (target == HostManager.host) {
|
||||
component.testBinary.set(binary)
|
||||
}
|
||||
}
|
||||
}
|
||||
component.binaries.realizeNow()
|
||||
|
||||
Reference in New Issue
Block a user