[Gradle] Delete failing KPM tests after Configuration Cache fixes
KPM is experimental and is not going to be supported before stable release ^KT-49933
This commit is contained in:
committed by
Space Team
parent
3a02090ff3
commit
cc98b7b4cd
-116
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.idea.test.kpm
|
||||
|
||||
import org.gradle.api.internal.project.ProjectInternal
|
||||
import org.gradle.kotlin.dsl.create
|
||||
import org.gradle.testfixtures.ProjectBuilder
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.IdeaKpmFragment
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.IdeaKpmProject
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.name
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.TestIdeaKpmExtra
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.serialize.TestIdeaExtrasSerializationExtension.anySerializableKey
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.copy
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.createProxyInstance
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.unwrapProxyInstance
|
||||
import org.jetbrains.kotlin.gradle.idea.test.testUtils.buildIdeaKpmProject
|
||||
import org.jetbrains.kotlin.gradle.idea.test.testUtils.createKpmProject
|
||||
import org.jetbrains.kotlin.gradle.idea.test.testUtils.deserializeIdeaKpmProjectWithBackwardsCompatibleClasses
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinPm20PluginWrapper
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmIosX64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmLinuxX64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.KotlinPm20ProjectExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.jvm
|
||||
import org.jetbrains.kotlin.tooling.core.extrasKeyOf
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.Ignore
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertNull
|
||||
import kotlin.test.fail
|
||||
|
||||
/**
|
||||
* This test is designed to test if serialized models can still be deserialized with a older (minimal supported)
|
||||
* version of this module.
|
||||
*
|
||||
* The test will
|
||||
* - Build a representative 'sample' model
|
||||
* - Serialize this model
|
||||
* - Deserialize this model with the older version of the classes (using a custom class loader)
|
||||
* - Assert the deserialized model is healthy
|
||||
*/
|
||||
class GradleProjectBackwardsCompatibilityDeserializationTest {
|
||||
|
||||
data class UnretainedModel(val id: Int)
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
fun `test - simple project`() {
|
||||
val (project, kotlinExtension) = createKpmProject()
|
||||
kotlinExtension.mainAndTest {
|
||||
jvm
|
||||
val native = fragments.create("native")
|
||||
val linux = fragments.create<GradleKpmLinuxX64Variant>("linuxX64")
|
||||
val ios = fragments.create<GradleKpmIosX64Variant>("iosX64")
|
||||
native.refines(common)
|
||||
linux.refines(native)
|
||||
ios.refines(native)
|
||||
}
|
||||
project.evaluate()
|
||||
|
||||
val model = project.buildIdeaKpmProject()
|
||||
val deserializedModel = deserializeIdeaKpmProjectWithBackwardsCompatibleClasses(model)
|
||||
|
||||
/* Use proxy instances to assert the deserialized model */
|
||||
run {
|
||||
val deserializedModelProxy = createProxyInstance<IdeaKpmProject>(deserializedModel)
|
||||
|
||||
val deserializedMainModuleProxy = deserializedModelProxy.modules.firstOrNull { it.coordinates.moduleClassifier == null }
|
||||
?: fail("Missing main module")
|
||||
|
||||
val deserializedTestModuleProxy = deserializedModelProxy.modules.firstOrNull { it.coordinates.moduleClassifier == "test" }
|
||||
?: fail("Missing test module")
|
||||
|
||||
listOf(deserializedMainModuleProxy, deserializedTestModuleProxy).forEach { module ->
|
||||
assertEquals(
|
||||
model.modules.flatMap { it.fragments }.map { it.name }.toSet(),
|
||||
module.fragments.map { it.name }.toSet(),
|
||||
"Expected all fragment names to be present"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - attaching serializable extras`() {
|
||||
val unretainedModelKey = extrasKeyOf<UnretainedModel>()
|
||||
|
||||
val project = ProjectBuilder.builder().build() as ProjectInternal
|
||||
project.plugins.apply(KotlinPm20PluginWrapper::class.java)
|
||||
|
||||
/* Setup example project */
|
||||
val kotlinExtension = project.extensions.getByType(KotlinPm20ProjectExtension::class.java)
|
||||
kotlinExtension.main.common.extras[anySerializableKey] = TestIdeaKpmExtra(2411)
|
||||
kotlinExtension.main.common.extras[unretainedModelKey] = UnretainedModel(510)
|
||||
|
||||
val model = project.buildIdeaKpmProject()
|
||||
val deserializedModel = deserializeIdeaKpmProjectWithBackwardsCompatibleClasses(model)
|
||||
val deserializedModelProxy = createProxyInstance<IdeaKpmProject>(deserializedModel)
|
||||
|
||||
val deserializedMainModuleProxy = deserializedModelProxy.modules.find { it.coordinates.moduleClassifier == null }
|
||||
?: fail("Missing main module")
|
||||
|
||||
val deserializedCommonFragmentProxy = deserializedMainModuleProxy.fragments.find { it.name == "common" }
|
||||
?: fail("Missing common fragment")
|
||||
|
||||
run {
|
||||
val deserializedCommonFragment = unwrapProxyInstance(deserializedCommonFragmentProxy)
|
||||
val extras = deserializedCommonFragment.copy<IdeaKpmFragment>().extras
|
||||
assertEquals(1, extras.keys.size)
|
||||
assertEquals(TestIdeaKpmExtra(2411), extras[anySerializableKey])
|
||||
assertNull(extras[unretainedModelKey])
|
||||
}
|
||||
}
|
||||
}
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.gradle.idea.test.kpm
|
||||
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.IdeaKpmProject
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.name
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.TestIdeaKpmInstances
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertContainsFragment
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertContainsModule
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.copy
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.createProxyInstance
|
||||
import org.jetbrains.kotlin.gradle.idea.test.testUtils.deserializeIdeaKpmProjectWithBackwardsCompatibleClasses
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.Ignore
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
class IdeaKpmProjectBackwardsCompatibilityDeserializationTest {
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
fun `test - simpleInstance`() {
|
||||
val project = TestIdeaKpmInstances.simpleProject
|
||||
val deserialized = deserializeIdeaKpmProjectWithBackwardsCompatibleClasses(project)
|
||||
val deserializedProxy = createProxyInstance<IdeaKpmProject>(deserialized)
|
||||
|
||||
assertEquals(project.coreLibrariesVersion, deserializedProxy.coreLibrariesVersion)
|
||||
assertEquals(project.modules.size, deserializedProxy.modules.size)
|
||||
project.modules.forEach { module ->
|
||||
val deserializedModule = deserializedProxy.assertContainsModule(module.name)
|
||||
assertEquals(module.coordinates, deserializedModule.coordinates.copy())
|
||||
|
||||
module.fragments.forEach { fragment ->
|
||||
val deserializedFragment = deserializedModule.assertContainsFragment(fragment.name)
|
||||
assertEquals(fragment.coordinates, deserializedFragment.coordinates.copy())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-51
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
@file:Suppress("FunctionName")
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dependencyResolutionTests.kpm
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.dsl.RepositoryHandler
|
||||
import org.gradle.api.artifacts.repositories.MavenArtifactRepository
|
||||
import org.gradle.api.internal.project.ProjectInternal
|
||||
import org.gradle.testfixtures.ProjectBuilder
|
||||
import org.jetbrains.kotlin.commonizer.KonanDistribution
|
||||
import org.jetbrains.kotlin.commonizer.platformLibsDir
|
||||
import org.jetbrains.kotlin.compilerRunner.konanHome
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.TestIdeaKpmBinaryDependencyMatcher
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.enabledOnCurrentHost
|
||||
import org.jetbrains.kotlin.gradle.util.enableDefaultStdlibDependency
|
||||
import org.jetbrains.kotlin.gradle.util.enableDependencyVerification
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
|
||||
/**
|
||||
* Base API applicable for test cases that intend to test idea dependency resolution for kpm model builders.
|
||||
* This tests will be capable of resolving all kind of dependencies that do not rely on any tasks to run beforehand.
|
||||
* This test will support dependencies previously published from kotlin.git (like stdlib), or dependencies
|
||||
* reachable through mavenCentral (cache redirector)
|
||||
*
|
||||
* The intended usage is to use the [buildProject] function, setting up a suitable Gradle project.
|
||||
*/
|
||||
abstract class AbstractLightweightIdeaDependencyResolutionTest {
|
||||
|
||||
fun buildProject(builder: ProjectBuilder.() -> Unit = {}): ProjectInternal {
|
||||
return (ProjectBuilder.builder().also(builder).build()).also { project ->
|
||||
project.enableDependencyVerification(false)
|
||||
project.enableDefaultStdlibDependency(false)
|
||||
project.repositories.mavenLocal()
|
||||
project.repositories.mavenCentralCacheRedirector()
|
||||
} as ProjectInternal
|
||||
}
|
||||
|
||||
val Project.konanDistribution get() = KonanDistribution(project.konanHome)
|
||||
|
||||
fun Project.nativePlatformLibraries(target: KonanTarget): TestIdeaKpmBinaryDependencyMatcher? =
|
||||
TestIdeaKpmBinaryDependencyMatcher.InDirectory(project.konanDistribution.platformLibsDir.resolve(target.name))
|
||||
.takeIf { target.enabledOnCurrentHost }
|
||||
}
|
||||
|
||||
fun RepositoryHandler.mavenCentralCacheRedirector(): MavenArtifactRepository =
|
||||
maven { it.setUrl("https://cache-redirector.jetbrains.com/maven-central") }
|
||||
-65
@@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
@file:Suppress("FunctionName")
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dependencyResolutionTests.kpm
|
||||
|
||||
import org.gradle.kotlin.dsl.create
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.IdeaKpmProject
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.AbstractKpmExtensionTest
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.buildIdeaKpmProjectModel
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.deserialize
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.utils.serialize
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmIosX64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmLinuxX64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmMacosX64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.jvm
|
||||
import kotlin.test.Ignore
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@Ignore
|
||||
class IdeaKpmProjectModelSerializableTest : AbstractKpmExtensionTest() {
|
||||
|
||||
@Test
|
||||
fun `test - serialize and deserialize - empty project`() {
|
||||
project.evaluate()
|
||||
project.repositories.mavenLocal()
|
||||
assertSerializeAndDeserializeEquals(kotlin.buildIdeaKpmProjectModel())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - serialize and deserialize - project with variants and fragments`() {
|
||||
project.evaluate()
|
||||
project.repositories.mavenLocal()
|
||||
kotlin.mainAndTest {
|
||||
val native = fragments.create("native")
|
||||
val apple = fragments.create("apple")
|
||||
val ios = fragments.create<GradleKpmIosX64Variant>("ios")
|
||||
val macos = fragments.create<GradleKpmMacosX64Variant>("macos")
|
||||
val linux = fragments.create<GradleKpmLinuxX64Variant>("linux")
|
||||
val jvm = jvm
|
||||
|
||||
apple.refines(native)
|
||||
ios.refines(apple)
|
||||
macos.refines(apple)
|
||||
linux.refines(native)
|
||||
jvm.refines(common)
|
||||
}
|
||||
|
||||
project.evaluate()
|
||||
assertSerializeAndDeserializeEquals(kotlin.buildIdeaKpmProjectModel())
|
||||
}
|
||||
|
||||
private fun assertSerializeAndDeserializeEquals(model: IdeaKpmProject) {
|
||||
val deserializedModel = model.serialize().deserialize<IdeaKpmProject>()
|
||||
|
||||
assertEquals(
|
||||
model.toString(), deserializedModel.toString(),
|
||||
"Expected deserializedModel string representation to match source model"
|
||||
)
|
||||
}
|
||||
}
|
||||
-245
@@ -1,245 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
@file:Suppress("FunctionName", "DuplicatedCode")
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dependencyResolutionTests.kpm
|
||||
|
||||
import com.android.build.gradle.LibraryExtension
|
||||
import com.android.build.gradle.LibraryPlugin
|
||||
import org.jetbrains.kotlin.commonizer.stdlib
|
||||
import org.jetbrains.kotlin.gradle.android.androidPrototype
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.IdeaKpmDependency.Companion.CLASSPATH_BINARY_TYPE
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertContainsFragment
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertContainsModule
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertIsNotEmpty
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertResolvedBinaryDependencies
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.*
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.applyKpmPlugin
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.buildIdeaKpmProjectModel
|
||||
import org.jetbrains.kotlin.gradle.util.addBuildEventsListenerRegistryMock
|
||||
import org.jetbrains.kotlin.gradle.util.assumeAndroidSdkAvailable
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget.*
|
||||
import org.junit.Test
|
||||
import kotlin.test.Ignore
|
||||
|
||||
@Ignore
|
||||
class MviKotlinIdeaDependencyResolutionTest : AbstractLightweightIdeaDependencyResolutionTest() {
|
||||
|
||||
@Test
|
||||
fun `test - simple ios linux and jvm project`() {
|
||||
val project = buildProject()
|
||||
|
||||
val kotlin = project.applyKpmPlugin {
|
||||
mainAndTest {
|
||||
fragments.create("jvm", GradleKpmJvmVariant::class.java)
|
||||
val linuxX64Variant = fragments.create("linuxX64", GradleKpmLinuxX64Variant::class.java)
|
||||
val iosX64Variant = fragments.create("iosX64", GradleKpmIosX64Variant::class.java)
|
||||
val iosArm64Variant = fragments.create("iosArm64", GradleKpmIosArm64Variant::class.java)
|
||||
val iosCommon = fragments.create("iosCommon")
|
||||
val nativeCommon = fragments.create("nativeCommon")
|
||||
|
||||
linuxX64Variant.refines(nativeCommon)
|
||||
|
||||
nativeCommon.refines(common)
|
||||
iosCommon.refines(nativeCommon)
|
||||
iosX64Variant.refines(iosCommon)
|
||||
iosArm64Variant.refines(iosCommon)
|
||||
|
||||
dependencies {
|
||||
implementation("com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.buildIdeaKpmProjectModel().assertIsNotEmpty().modules.forEach { module ->
|
||||
module.assertContainsFragment("common").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.essenty:lifecycle:0.2.2:main:commonMain",
|
||||
"com.arkivanov.essenty:instance-keeper:0.2.2:main:commonMain",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10"
|
||||
)
|
||||
|
||||
module.assertContainsFragment("jvm").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"com.arkivanov.mvikotlin:mvikotlin-jvm:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-jvm:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-jvm:0.2.2",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
|
||||
module.assertContainsFragment("nativeCommon").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
project.konanDistribution.stdlib,
|
||||
"com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01:main:jsNativeMain",
|
||||
"com.arkivanov.essenty:lifecycle:0.2.2:main:commonMain",
|
||||
"com.arkivanov.essenty:instance-keeper:0.2.2:main:commonMain",
|
||||
|
||||
/*
|
||||
The following dependencies are actually marked as 'implementation' on mvikotlin.
|
||||
We still resolve those dependencies, because this source set is shared native and
|
||||
the shared native compiler expects those dependencies as well.
|
||||
|
||||
Including those dependencies for IDE analysis is up for discussion.
|
||||
*/
|
||||
"com.arkivanov.mvikotlin:utils-internal:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:utils-internal:3.0.0-beta01:main:nativeMain",
|
||||
"com.arkivanov.mvikotlin:rx:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:rx-internal:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:rx-internal:3.0.0-beta01:main:nativeMain",
|
||||
"com.arkivanov.essenty:utils-internal:0.2.2:main:commonMain",
|
||||
"com.arkivanov.essenty:utils-internal:0.2.2:main:nativeMain",
|
||||
|
||||
|
||||
/* Unwanted but accepted dependencies */
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0"
|
||||
)
|
||||
|
||||
module.assertContainsFragment("linuxX64").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
project.konanDistribution.stdlib,
|
||||
project.nativePlatformLibraries(LINUX_X64),
|
||||
"com.arkivanov.mvikotlin:mvikotlin-linuxx64:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-linuxx64:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-linuxx64:0.2.2",
|
||||
"com.arkivanov.mvikotlin:rx-internal-linuxx64:3.0.0-beta01",
|
||||
"com.arkivanov.mvikotlin:utils-internal-linuxx64:3.0.0-beta01",
|
||||
"com.arkivanov.mvikotlin:rx-linuxx64:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:utils-internal-linuxx64:0.2.2",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
|
||||
module.assertContainsFragment("iosCommon").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
project.konanDistribution.stdlib,
|
||||
"com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01:main:jsNativeMain",
|
||||
"com.arkivanov.essenty:lifecycle:0.2.2:main:commonMain",
|
||||
"com.arkivanov.essenty:instance-keeper:0.2.2:main:commonMain",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
|
||||
/* Internals are listed here as well. See comment above */
|
||||
"com.arkivanov.mvikotlin:utils-internal:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:utils-internal:3.0.0-beta01:main:darwinMain",
|
||||
"com.arkivanov.mvikotlin:utils-internal:3.0.0-beta01:main:nativeMain",
|
||||
"com.arkivanov.mvikotlin:rx:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:rx-internal:3.0.0-beta01:main:commonMain",
|
||||
"com.arkivanov.mvikotlin:rx-internal:3.0.0-beta01:main:darwinMain",
|
||||
"com.arkivanov.mvikotlin:rx-internal:3.0.0-beta01:main:nativeMain",
|
||||
"com.arkivanov.essenty:utils-internal:0.2.2:main:commonMain",
|
||||
"com.arkivanov.essenty:utils-internal:0.2.2:main:nativeMain",
|
||||
)
|
||||
|
||||
module.assertContainsFragment("iosX64").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
project.konanDistribution.stdlib,
|
||||
project.nativePlatformLibraries(IOS_X64),
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
"com.arkivanov.mvikotlin:mvikotlin-iosx64:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-iosx64:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-iosx64:0.2.2",
|
||||
|
||||
/* Internals are listed here as well. See comment above */
|
||||
"com.arkivanov.mvikotlin:rx-internal-iosx64:3.0.0-beta01",
|
||||
"com.arkivanov.mvikotlin:utils-internal-iosx64:3.0.0-beta01",
|
||||
"com.arkivanov.mvikotlin:rx-iosx64:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:utils-internal-iosx64:0.2.2",
|
||||
)
|
||||
|
||||
module.assertContainsFragment("iosArm64").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
project.konanDistribution.stdlib,
|
||||
project.nativePlatformLibraries(IOS_ARM64),
|
||||
"com.arkivanov.mvikotlin:mvikotlin-iosarm64:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-iosarm64:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-iosarm64:0.2.2",
|
||||
|
||||
/* Internals are listed here as well. See comment above */
|
||||
"com.arkivanov.mvikotlin:rx-internal-iosarm64:3.0.0-beta01",
|
||||
"com.arkivanov.mvikotlin:utils-internal-iosarm64:3.0.0-beta01",
|
||||
"com.arkivanov.mvikotlin:rx-iosarm64:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:utils-internal-iosarm64:0.2.2",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test - android and jvm`() {
|
||||
assumeAndroidSdkAvailable()
|
||||
val project = buildProject()
|
||||
|
||||
/* Setup Android */
|
||||
addBuildEventsListenerRegistryMock(project)
|
||||
project.plugins.apply(LibraryPlugin::class.java)
|
||||
val android = project.extensions.getByType(LibraryExtension::class.java)
|
||||
android.compileSdk = 31
|
||||
|
||||
|
||||
val kotlin = project.applyKpmPlugin {
|
||||
androidPrototype()
|
||||
jvm {}
|
||||
mainAndTest {
|
||||
dependencies {
|
||||
implementation("com.arkivanov.mvikotlin:mvikotlin:3.0.0-beta01")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Android requires project to evaluate */
|
||||
project.evaluate()
|
||||
|
||||
kotlin.buildIdeaKpmProjectModel().assertIsNotEmpty().assertContainsModule("main").let { module ->
|
||||
listOf("common", "jvm").forEach { fragmentName ->
|
||||
module.assertContainsFragment(fragmentName).assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"com.arkivanov.mvikotlin:mvikotlin-jvm:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-jvm:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-jvm:0.2.2",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
}
|
||||
|
||||
listOf("androidCommon", "androidRelease").forEach { fragmentName ->
|
||||
module.assertContainsFragment(fragmentName).assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"com.arkivanov.mvikotlin:mvikotlin-android:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-android:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-android:0.2.2",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
android.bootClasspath
|
||||
)
|
||||
}
|
||||
|
||||
module.assertContainsFragment("androidDebug").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"com.arkivanov.mvikotlin:mvikotlin-android-debug:3.0.0-beta01",
|
||||
"com.arkivanov.essenty:lifecycle-android-debug:0.2.2",
|
||||
"com.arkivanov.essenty:instance-keeper-android-debug:0.2.2",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
android.bootClasspath
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
-200
@@ -1,200 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
@file:Suppress("FunctionName", "DuplicatedCode")
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dependencyResolutionTests.kpm
|
||||
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.name
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.applyKpmPlugin
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.buildIdeaKpmProjectModel
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertContainsFragment
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertIsNotEmpty
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertFragmentDependencies
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.*
|
||||
import org.junit.Test
|
||||
import kotlin.test.Ignore
|
||||
|
||||
@Ignore
|
||||
class SimpleProjectToProjectDependencyResolutionTest : AbstractLightweightIdeaDependencyResolutionTest() {
|
||||
|
||||
@Test
|
||||
fun `test - simple producer and consumer projects`() {
|
||||
val root = buildProject()
|
||||
val producer = buildProject { withParent(root).withName("producer") }
|
||||
val consumer = buildProject { withParent(root).withName("consumer") }
|
||||
consumer.projectDir.mkdirs()
|
||||
consumer.projectDir.deleteOnExit()
|
||||
|
||||
producer.applyKpmPlugin {
|
||||
mainAndTest {
|
||||
fragments.create("jvm", GradleKpmJvmVariant::class.java)
|
||||
val linuxX64 = fragments.create("linuxX64", GradleKpmLinuxX64Variant::class.java)
|
||||
val iosX64 = fragments.create("iosX64", GradleKpmIosX64Variant::class.java)
|
||||
val iosArm64 = fragments.create("iosArm64", GradleKpmIosArm64Variant::class.java)
|
||||
val macos64 = fragments.create("macosX64", GradleKpmMacosX64Variant::class.java)
|
||||
|
||||
val iosCommon = fragments.create("iosMain") {
|
||||
it.refines(common)
|
||||
iosX64.refines(it)
|
||||
iosArm64.refines(it)
|
||||
}
|
||||
|
||||
val appleCommon = fragments.create("appleCommon") {
|
||||
it.refines(common)
|
||||
iosCommon.refines(it)
|
||||
macos64.refines(it)
|
||||
}
|
||||
|
||||
fragments.create("nativeCommon") {
|
||||
it.refines(common)
|
||||
appleCommon.refines(it)
|
||||
linuxX64.refines(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val consumerKotlin = consumer.applyKpmPlugin {
|
||||
mainAndTest {
|
||||
fragments.create("jvm", GradleKpmJvmVariant::class.java)
|
||||
val linuxX64 = fragments.create("linuxX64", GradleKpmLinuxX64Variant::class.java)
|
||||
val iosX64 = fragments.create("iosX64", GradleKpmIosX64Variant::class.java)
|
||||
val macosX64 = fragments.create("macosX64", GradleKpmMacosX64Variant::class.java)
|
||||
|
||||
val appleCommon = fragments.create("appleCommon") {
|
||||
it.refines(common)
|
||||
iosX64.refines(it)
|
||||
macosX64.refines(it)
|
||||
}
|
||||
|
||||
fragments.create("nativeCommon") {
|
||||
it.refines(common)
|
||||
appleCommon.refines(it)
|
||||
linuxX64.refines(it)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":producer"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
consumerKotlin.buildIdeaKpmProjectModel().assertIsNotEmpty().modules.forEach { module ->
|
||||
fun ifTestModule(vararg any: Any?) =
|
||||
listOf(*any).takeIf { module.name == GradleKpmModule.TEST_MODULE_NAME }
|
||||
|
||||
fun ifMainModule(vararg any: Any?) =
|
||||
listOf(*any).takeIf { module.name == GradleKpmModule.MAIN_MODULE_NAME }
|
||||
|
||||
module.assertContainsFragment("common").assertFragmentDependencies(
|
||||
"regular::producer/main/common",
|
||||
ifTestModule("friend::consumer/main/common")
|
||||
)
|
||||
|
||||
module.assertContainsFragment("jvm").assertFragmentDependencies(
|
||||
"regular::producer/main/jvm",
|
||||
"regular::producer/main/common",
|
||||
ifMainModule(
|
||||
"refines::consumer/main/common",
|
||||
),
|
||||
ifTestModule(
|
||||
"friend::consumer/main/common",
|
||||
"friend::consumer/main/jvm",
|
||||
"refines::consumer/test/common",
|
||||
)
|
||||
)
|
||||
|
||||
module.assertContainsFragment("nativeCommon").assertFragmentDependencies(
|
||||
"regular::producer/main/common",
|
||||
"regular::producer/main/nativeCommon",
|
||||
ifMainModule(
|
||||
"refines::consumer/main/common"
|
||||
),
|
||||
ifTestModule(
|
||||
"friend::consumer/main/common",
|
||||
"friend::consumer/main/nativeCommon",
|
||||
"refines::consumer/test/common",
|
||||
)
|
||||
)
|
||||
|
||||
module.assertContainsFragment("appleCommon").assertFragmentDependencies(
|
||||
"regular::producer/main/common",
|
||||
"regular::producer/main/appleCommon",
|
||||
"regular::producer/main/nativeCommon",
|
||||
ifMainModule(
|
||||
"refines::consumer/main/common",
|
||||
"refines::consumer/main/nativeCommon"
|
||||
),
|
||||
ifTestModule(
|
||||
"friend::consumer/main/common",
|
||||
"friend::consumer/main/nativeCommon",
|
||||
"friend::consumer/main/appleCommon",
|
||||
"refines::consumer/test/common",
|
||||
"refines::consumer/test/nativeCommon"
|
||||
)
|
||||
)
|
||||
|
||||
module.assertContainsFragment("linuxX64").assertFragmentDependencies(
|
||||
"regular::producer/main/common",
|
||||
"regular::producer/main/nativeCommon",
|
||||
"regular::producer/main/linuxX64",
|
||||
ifMainModule(
|
||||
"refines::consumer/main/common",
|
||||
"refines::consumer/main/nativeCommon",
|
||||
),
|
||||
ifTestModule(
|
||||
"friend::consumer/main/common",
|
||||
"friend::consumer/main/nativeCommon",
|
||||
"friend::consumer/main/linuxX64",
|
||||
"refines::consumer/test/common",
|
||||
"refines::consumer/test/nativeCommon"
|
||||
)
|
||||
)
|
||||
|
||||
module.assertContainsFragment("macosX64").assertFragmentDependencies(
|
||||
"regular::producer/main/macosX64",
|
||||
"regular::producer/main/common",
|
||||
"regular::producer/main/appleCommon",
|
||||
"regular::producer/main/nativeCommon",
|
||||
ifMainModule(
|
||||
"refines::consumer/main/common",
|
||||
"refines::consumer/main/nativeCommon",
|
||||
"refines::consumer/main/appleCommon"
|
||||
),
|
||||
ifTestModule(
|
||||
"friend::consumer/main/common",
|
||||
"friend::consumer/main/nativeCommon",
|
||||
"friend::consumer/main/appleCommon",
|
||||
"friend::consumer/main/macosX64",
|
||||
"refines::consumer/test/common",
|
||||
"refines::consumer/test/nativeCommon",
|
||||
"refines::consumer/test/appleCommon"
|
||||
)
|
||||
)
|
||||
|
||||
module.assertContainsFragment("iosX64").assertFragmentDependencies(
|
||||
"regular::producer/main/iosX64",
|
||||
"regular::producer/main/common",
|
||||
"regular::producer/main/iosMain",
|
||||
"regular::producer/main/appleCommon",
|
||||
"regular::producer/main/nativeCommon",
|
||||
ifMainModule(
|
||||
"refines::consumer/main/common",
|
||||
"refines::consumer/main/nativeCommon",
|
||||
"refines::consumer/main/appleCommon"
|
||||
),
|
||||
ifTestModule(
|
||||
"friend::consumer/main/common",
|
||||
"friend::consumer/main/nativeCommon",
|
||||
"friend::consumer/main/appleCommon",
|
||||
"friend::consumer/main/iosX64",
|
||||
"refines::consumer/test/common",
|
||||
"refines::consumer/test/nativeCommon",
|
||||
"refines::consumer/test/appleCommon"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
-167
@@ -1,167 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2022 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.
|
||||
*/
|
||||
|
||||
@file:Suppress("FunctionName", "DuplicatedCode")
|
||||
|
||||
package org.jetbrains.kotlin.gradle.dependencyResolutionTests.kpm
|
||||
|
||||
import org.jetbrains.kotlin.gradle.idea.kpm.IdeaKpmDependency.Companion.CLASSPATH_BINARY_TYPE
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.TestIdeaKpmBinaryDependencyMatcher
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertContainsFragment
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertIsNotEmpty
|
||||
import org.jetbrains.kotlin.gradle.idea.testFixtures.kpm.assertResolvedBinaryDependencies
|
||||
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmIosArm64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmIosX64Variant
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.pm20.GradleKpmJvmVariant
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.applyKpmPlugin
|
||||
import org.jetbrains.kotlin.gradle.unitTests.kpm.buildIdeaKpmProjectModel
|
||||
import org.jetbrains.kotlin.gradle.util.enableDefaultStdlibDependency
|
||||
import org.junit.Test
|
||||
import kotlin.test.Ignore
|
||||
|
||||
@Ignore
|
||||
class StdlibKotlinIdeaDependencyResolutionTest : AbstractLightweightIdeaDependencyResolutionTest() {
|
||||
|
||||
@Test
|
||||
fun `test - simple ios and jvm project`() {
|
||||
val project = buildProject()
|
||||
|
||||
val kotlin = project.applyKpmPlugin {
|
||||
mainAndTest {
|
||||
fragments.create("jvm", GradleKpmJvmVariant::class.java)
|
||||
val iosX64Variant = fragments.create("iosX64", GradleKpmIosX64Variant::class.java)
|
||||
val iosArm64Variant = fragments.create("iosArm64", GradleKpmIosArm64Variant::class.java)
|
||||
val iosCommon = fragments.create("iosCommon")
|
||||
|
||||
iosCommon.refines(common)
|
||||
iosX64Variant.refines(iosCommon)
|
||||
iosArm64Variant.refines(iosCommon)
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common", "1.6.10"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.buildIdeaKpmProjectModel().assertIsNotEmpty().modules.forEach { module ->
|
||||
module.assertContainsFragment("common").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10"
|
||||
)
|
||||
|
||||
/* stdlib-common does not automatically add platform dependencies */
|
||||
module.assertContainsFragment("jvm").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
)
|
||||
|
||||
/* native fragments only references dependencies from the native distribution */
|
||||
listOf("iosCommon", "iosX64", "iosArm64").forEach { fragmentName ->
|
||||
module.assertContainsFragment(fragmentName).assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE, TestIdeaKpmBinaryDependencyMatcher.InDirectory(project.konanDistribution.root)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Testing common misconfiguration of depending directly to the regular stdlib in common
|
||||
*/
|
||||
@Test
|
||||
fun `test - simple ios and jvm project - dependency to 'stdlib' in common`() {
|
||||
val project = buildProject()
|
||||
|
||||
val kotlin = project.applyKpmPlugin {
|
||||
mainAndTest {
|
||||
fragments.create("jvm", GradleKpmJvmVariant::class.java)
|
||||
val iosX64Variant = fragments.create("iosX64", GradleKpmIosX64Variant::class.java)
|
||||
val iosArm64Variant = fragments.create("iosArm64", GradleKpmIosArm64Variant::class.java)
|
||||
val iosCommon = fragments.create("iosCommon")
|
||||
|
||||
iosCommon.refines(common)
|
||||
iosX64Variant.refines(iosCommon)
|
||||
iosArm64Variant.refines(iosCommon)
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib", "1.6.10"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.buildIdeaKpmProjectModel().assertIsNotEmpty().modules.forEach { module ->
|
||||
module.assertContainsFragment("common").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-common:1.6.10",
|
||||
/*
|
||||
Actually not a desired dependency, however a general filtering mechanism cannot be implemented,
|
||||
since this variant does not contain attributes that would enable such filter.
|
||||
|
||||
A special filter for the stdlib is not implemented yet.
|
||||
*/
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
|
||||
module.assertContainsFragment("jvm").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
|
||||
/* native fragments only references dependencie from the native distribution */
|
||||
listOf("iosCommon", "iosX64", "iosArm64").forEach { fragmentName ->
|
||||
module.assertContainsFragment(fragmentName).assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
TestIdeaKpmBinaryDependencyMatcher.InDirectory(project.konanDistribution.root),
|
||||
|
||||
/* Actually not correct as well, since those are jvm dependencies. Filtering is not easily possible here, as well */
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:1.6.10",
|
||||
"org.jetbrains:annotations:13.0",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `test simple ios and jvm project - with default stdlib dependency`() {
|
||||
val project = buildProject()
|
||||
project.enableDefaultStdlibDependency(true)
|
||||
|
||||
val kotlin = project.applyKpmPlugin {
|
||||
mainAndTest {
|
||||
fragments.create("jvm", GradleKpmJvmVariant::class.java)
|
||||
val iosX64Variant = fragments.create("iosX64", GradleKpmIosX64Variant::class.java)
|
||||
val iosArm64Variant = fragments.create("iosArm64", GradleKpmIosArm64Variant::class.java)
|
||||
val iosCommon = fragments.create("iosCommon")
|
||||
|
||||
iosCommon.refines(common)
|
||||
iosX64Variant.refines(iosCommon)
|
||||
iosArm64Variant.refines(iosCommon)
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.buildIdeaKpmProjectModel().assertIsNotEmpty().modules.forEach { module ->
|
||||
module.assertContainsFragment("common").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-common:${project.getKotlinPluginVersion()}"
|
||||
)
|
||||
|
||||
module.assertContainsFragment("jvm").assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
"org.jetbrains.kotlin:kotlin-stdlib:${project.getKotlinPluginVersion()}",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:${project.getKotlinPluginVersion()}",
|
||||
"org.jetbrains.kotlin:kotlin-stdlib-jdk8:${project.getKotlinPluginVersion()}",
|
||||
Regex("""org\.jetbrains:annotations:.*"""),
|
||||
)
|
||||
|
||||
listOf("iosCommon", "iosX64", "iosArm64").forEach { fragmentName ->
|
||||
module.assertContainsFragment(fragmentName).assertResolvedBinaryDependencies(
|
||||
CLASSPATH_BINARY_TYPE,
|
||||
TestIdeaKpmBinaryDependencyMatcher.InDirectory(project.konanDistribution.root),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user