Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the gradle plugin tests after kotlin 2.1.0 #5210

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,17 @@ import org.jetbrains.compose.test.utils.checks
import org.junit.jupiter.api.Test

class KotlinCompatibilityTest : GradlePluginTestBase() {
@Test
fun testKotlinMpp_1_9_10() = testMpp("1.9.10")

@Test
fun testKotlinJsMpp_1_9_24() = testJsMpp("1.9.24")

// Note: we can't test non-jvm targets with Kotlin older than 2.1.0, because of klib abi version bump in 2.1.0
@Test
fun testKotlinMpp_1_9_20() = testMpp("1.9.20")
fun testKotlinMpp_2_1_0() = testMpp("2.1.0")

@Test
fun testKotlinJsMpp_1_9_20() = testJsMpp("1.9.20")
fun testKotlinJsMpp_2_1_0() = testJsMpp("2.1.0")

private fun testMpp(kotlinVersion: String) = with(
testProject(
"beforeKotlin2/mpp",
"application/mpp",
testEnvironment = defaultTestEnvironment.copy(kotlinVersion = kotlinVersion)
)
) {
Expand All @@ -39,7 +35,7 @@ class KotlinCompatibilityTest : GradlePluginTestBase() {

private fun testJsMpp(kotlinVersion: String) = with(
testProject(
"beforeKotlin2/jsMpp",
"application/jsMpp",
testEnvironment = defaultTestEnvironment.copy(kotlinVersion = kotlinVersion)
)
) {
Expand Down Expand Up @@ -87,15 +83,6 @@ class KotlinCompatibilityTest : GradlePluginTestBase() {
)
).checkCustomComposeCompiler()

@Test
fun testKotlinCheckDisabled() = testProject(
"beforeKotlin2/custom-compiler-args", defaultTestEnvironment.copy(
kotlinVersion = "1.9.21",
composeCompilerPlugin = "dependencies.compiler.forKotlin(\"1.9.20\")",
composeCompilerArgs = "\"suppressKotlinVersionCompatibilityCheck=1.9.21\""
)
).checkCustomComposeCompiler(checkKJS = true)

private fun TestProject.checkCustomComposeCompiler(checkKJS: Boolean = false) {
gradle(":runDistributable").checks {
val actualMainImage = file("main-image.actual.png")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class ResourcesTest : GradlePluginTestBase() {

@Test
fun testMultiModuleResources() {
val environment = defaultTestEnvironment.copy(kotlinVersion = "2.0.0")
val environment = defaultTestEnvironment
with(
testProject("misc/kmpResourcePublication", environment)
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.compose"
id "org.jetbrains.kotlin.plugin.compose"
}

kotlin {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pluginManagement {
plugins {
id 'org.jetbrains.kotlin.multiplatform' version 'KOTLIN_VERSION_PLACEHOLDER'
id 'org.jetbrains.kotlin.plugin.compose' version 'KOTLIN_VERSION_PLACEHOLDER'
id 'org.jetbrains.compose' version 'COMPOSE_GRADLE_PLUGIN_VERSION_PLACEHOLDER'
}
repositories {
Expand Down

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Loading