[Gradle] Update NativeExternalDependenciesIT to reflect changes in stdlib
^KT-60901 Verification Pending
This commit is contained in:
committed by
Space Team
parent
ada446b68f
commit
65e467dd5b
+31
-25
@@ -6,6 +6,7 @@
|
|||||||
package org.jetbrains.kotlin.gradle.native
|
package org.jetbrains.kotlin.gradle.native
|
||||||
|
|
||||||
import org.gradle.util.GradleVersion
|
import org.gradle.util.GradleVersion
|
||||||
|
import org.jetbrains.kotlin.gradle.KOTLIN_VERSION
|
||||||
import org.jetbrains.kotlin.gradle.testbase.*
|
import org.jetbrains.kotlin.gradle.testbase.*
|
||||||
import org.junit.jupiter.api.DisplayName
|
import org.junit.jupiter.api.DisplayName
|
||||||
import org.junit.jupiter.api.condition.DisabledOnOs
|
import org.junit.jupiter.api.condition.DisabledOnOs
|
||||||
@@ -25,40 +26,44 @@ internal class NativeExternalDependenciesIT : KGPBaseTest() {
|
|||||||
@GradleTest
|
@GradleTest
|
||||||
fun shouldNotUseExternalDependencies(gradleVersion: GradleVersion) {
|
fun shouldNotUseExternalDependencies(gradleVersion: GradleVersion) {
|
||||||
buildProjectWithDependencies(gradleVersion) { externalDependenciesText ->
|
buildProjectWithDependencies(gradleVersion) { externalDependenciesText ->
|
||||||
assertNull(externalDependenciesText)
|
assertEquals(
|
||||||
|
"""
|
||||||
|
|0 native-external-dependencies
|
||||||
|
|1 org.jetbrains.kotlin:kotlin-stdlib[$KOTLIN_VERSION] #0[$KOTLIN_VERSION]
|
||||||
|
|
|
||||||
|
""".trimMargin(),
|
||||||
|
externalDependenciesText
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@DisplayName("Should build with ktor 1.5.4 and coroutines 1.5.0-RC-native-mt")
|
@DisplayName("Should build with ktor 1.5.4 and coroutines 1.5.0-RC-native-mt")
|
||||||
@GradleTest
|
@GradleTest
|
||||||
@DisabledOnOs(
|
|
||||||
value = [OS.MAC],
|
|
||||||
architectures = ["aarch64"],
|
|
||||||
disabledReason = "These versions of Ktor and coroutines don't support macos-arm64"
|
|
||||||
)
|
|
||||||
fun shouldUseOldKtorAndCoroutinesExternalDependencies(gradleVersion: GradleVersion) {
|
fun shouldUseOldKtorAndCoroutinesExternalDependencies(gradleVersion: GradleVersion) {
|
||||||
|
|
||||||
buildProjectWithDependencies(
|
buildProjectWithDependencies(
|
||||||
gradleVersion,
|
gradleVersion,
|
||||||
"io.ktor:ktor-io:1.5.4",
|
"io.ktor:ktor-io:2.3.3",
|
||||||
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0-RC-native-mt"
|
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2"
|
||||||
) { externalDependenciesText ->
|
) { externalDependenciesText ->
|
||||||
assertNotNull(externalDependenciesText)
|
assertNotNull(externalDependenciesText)
|
||||||
|
|
||||||
assertEquals(
|
assertEquals("""
|
||||||
"""
|
0 native-external-dependencies
|
||||||
|0 native-external-dependencies
|
1 io.ktor:ktor-io,io.ktor:ktor-io-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[2.3.3] #0[2.3.3]
|
||||||
|1 io.ktor:ktor-io,io.ktor:ktor-io-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[1.5.4] #0[1.5.4]
|
/some/path/ktor-io.klib
|
||||||
|${'\t'}/some/path/ktor-io.klib
|
2 org.jetbrains.kotlin:kotlin-stdlib[$KOTLIN_VERSION] #0[$KOTLIN_VERSION] #4[$KOTLIN_VERSION] #3[$KOTLIN_VERSION]
|
||||||
|${'\t'}/some/path/ktor-io-cinterop-bits.klib
|
3 org.jetbrains.kotlin:kotlin-stdlib-jdk7[$KOTLIN_VERSION] #4[$KOTLIN_VERSION]
|
||||||
|${'\t'}/some/path/ktor-io-cinterop-sockets.klib
|
/some/path/kotlin-stdlib-jdk7-$KOTLIN_VERSION.jar
|
||||||
|2 org.jetbrains.kotlinx:atomicfu,org.jetbrains.kotlinx:atomicfu-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[0.16.1] #3[0.16.1] #1[0.15.1]
|
4 org.jetbrains.kotlin:kotlin-stdlib-jdk8[$KOTLIN_VERSION] #6[1.8.20]
|
||||||
|${'\t'}/some/path/atomicfu.klib
|
/some/path/kotlin-stdlib-jdk8-$KOTLIN_VERSION.jar
|
||||||
|${'\t'}/some/path/atomicfu-cinterop-interop.klib
|
5 org.jetbrains.kotlinx:atomicfu,org.jetbrains.kotlinx:atomicfu-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[0.21.0] #6[0.21.0] #1[0.19.0]
|
||||||
|3 org.jetbrains.kotlinx:kotlinx-coroutines-core,org.jetbrains.kotlinx:kotlinx-coroutines-core-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[1.5.0-RC-native-mt] #0[1.5.0-RC-native-mt] #1[1.4.3-native-mt]
|
/some/path/atomicfu.klib
|
||||||
|${'\t'}/some/path/kotlinx-coroutines-core.klib
|
/some/path/atomicfu-cinterop-interop.klib
|
||||||
|
|
6 org.jetbrains.kotlinx:kotlinx-coroutines-core,org.jetbrains.kotlinx:kotlinx-coroutines-core-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[1.7.2] #0[1.7.2] #1[1.7.1]
|
||||||
""".trimMargin(),
|
/some/path/kotlinx-coroutines-core.klib
|
||||||
|
|
||||||
|
""".trimIndent(),
|
||||||
externalDependenciesText
|
externalDependenciesText
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -81,10 +86,11 @@ internal class NativeExternalDependenciesIT : KGPBaseTest() {
|
|||||||
|${'\t'}/some/path/ktor-io.klib
|
|${'\t'}/some/path/ktor-io.klib
|
||||||
|${'\t'}/some/path/ktor-io-cinterop-bits.klib
|
|${'\t'}/some/path/ktor-io-cinterop-bits.klib
|
||||||
|${'\t'}/some/path/ktor-io-cinterop-sockets.klib
|
|${'\t'}/some/path/ktor-io-cinterop-sockets.klib
|
||||||
|2 org.jetbrains.kotlinx:atomicfu,org.jetbrains.kotlinx:atomicfu-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[0.16.3] #3[0.16.3] #1[0.16.3]
|
|2 org.jetbrains.kotlin:kotlin-stdlib[$KOTLIN_VERSION] #0[$KOTLIN_VERSION]
|
||||||
|
|3 org.jetbrains.kotlinx:atomicfu,org.jetbrains.kotlinx:atomicfu-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[0.16.3] #4[0.16.3] #1[0.16.3]
|
||||||
|${'\t'}/some/path/atomicfu.klib
|
|${'\t'}/some/path/atomicfu.klib
|
||||||
|${'\t'}/some/path/atomicfu-cinterop-interop.klib
|
|${'\t'}/some/path/atomicfu-cinterop-interop.klib
|
||||||
|3 org.jetbrains.kotlinx:kotlinx-coroutines-core,org.jetbrains.kotlinx:kotlinx-coroutines-core-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[1.5.2-native-mt] #0[1.5.2-native-mt] #1[1.5.2-native-mt]
|
|4 org.jetbrains.kotlinx:kotlinx-coroutines-core,org.jetbrains.kotlinx:kotlinx-coroutines-core-$DEFAULT_CURRENT_PLATFORM_TARGET_NAME_POSTFIX[1.5.2-native-mt] #0[1.5.2-native-mt] #1[1.5.2-native-mt]
|
||||||
|${'\t'}/some/path/kotlinx-coroutines-core.klib
|
|${'\t'}/some/path/kotlinx-coroutines-core.klib
|
||||||
|
|
|
|
||||||
""".trimMargin(),
|
""".trimMargin(),
|
||||||
@@ -96,7 +102,7 @@ internal class NativeExternalDependenciesIT : KGPBaseTest() {
|
|||||||
private fun buildProjectWithDependencies(
|
private fun buildProjectWithDependencies(
|
||||||
gradleVersion: GradleVersion,
|
gradleVersion: GradleVersion,
|
||||||
vararg dependencies: String,
|
vararg dependencies: String,
|
||||||
externalDependenciesTextConsumer: (externalDependenciesText: String?) -> Unit
|
externalDependenciesTextConsumer: (externalDependenciesText: String?) -> Unit,
|
||||||
) {
|
) {
|
||||||
nativeProject("native-external-dependencies", gradleVersion) {
|
nativeProject("native-external-dependencies", gradleVersion) {
|
||||||
buildGradleKts.appendText(
|
buildGradleKts.appendText(
|
||||||
|
|||||||
Reference in New Issue
Block a user