Repository: JetBrains/kotlin
File: libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/ComposeIT.kt (Kotlin)

Code before:
    @AndroidTestVersions(minVersion = TestVersions.AGP.AGP_811, maxVersion = TestVersions.AGP.AGP_811)
    @OtherGradlePluginTests
    @TestMetadata("composeMultiplatform")
    fun testComposeDefaultValueParamStubs(
        gradleVersion: GradleVersion,
        agpVersion: String,
        providedJdk: JdkVersions.ProvidedJdk
    ) {
        project(
            projectName = "composeMultiplatform",
            gradleVersion = gradleVersion,
            buildJdk = providedJdk.location,
            buildOptions = defaultBuildOptions.copy(
                androidVersion = agpVersion,
                nativeOptions = super.defaultBuildOptions.nativeOptions.copy(
                    version = TestVersions.Kotlin.CURRENT
                ),
                isolatedProjects = BuildOptions.IsolatedProjectsMode.DISABLED
            ),
            dependencyManagement = DependencyManagement.DefaultDependencyManagement(setOf("https://maven.pkg.jetbrains.space/public/p/compose/dev")),
            enableGradleDaemonMemoryLimitInMb = 2048,
            enableKotlinDaemonMemoryLimitInMb = 2048,
        ) {
            buildGradleKts.appendComposePlugin()

            val sourceFile = projectPath.resolve("src/commonMain/kotlin/com/example/App.kt")
            sourceFile.writeText(
                //language=kotlin
                """
                package com.example
                
                import androidx.compose.runtime.Composable
                import kotlin.jvm.JvmInline
                
                @JvmInline
                value class ImeAction private constructor(val value: Int) {
                    companion object {
                        val Default = ImeAction(0)
                    }
                }
                
                @Composable
                fun <T> TextCompose(genericText: (T) -> String, imeAction: ImeAction = ImeAction.Default) {}
                """.trimIndent()
            )

            build(":compileKotlinIosSimulatorArm64") {
                assertTasksExecuted(":compileKotlinIosSimulatorArm64")
            }
            build(":compileKotlinWasmJs") {
                assertTasksExecuted(":compileKotlinWasmJs")

Review comment (suggestion):
Nit: you could use instead this approach:
```
kotlinSourcesDir("commonMain").source("com/example/App.kt") {
                //language=Kotlin
                """
                // source code    
                """.trimIndent()
            }
 ```

Code after:
    @GradleTest
    @OtherGradlePluginTests
    fun testComposeDefaultValueParamStubs(
        gradleVersion: GradleVersion,
    ) {
        project(
            projectName = "empty",
            gradleVersion = gradleVersion,
            buildOptions = defaultBuildOptions.copy(
                nativeOptions = super.defaultBuildOptions.nativeOptions.copy(
                    version = TestVersions.Kotlin.CURRENT
                ),
                isolatedProjects = BuildOptions.IsolatedProjectsMode.DISABLED
            ),
            dependencyManagement = DependencyManagement.DefaultDependencyManagement(setOf("https://maven.pkg.jetbrains.space/public/p/compose/dev")),
            enableGradleDaemonMemoryLimitInMb = 2048,
            enableKotlinDaemonMemoryLimitInMb = 2048,
        ) {
            plugins {
                id("org.jetbrains.kotlin.plugin.compose")
            }
            buildScriptInjection {
                project.applyMultiplatform {
                    listOf(
                        iosArm64(),
                        iosSimulatorArm64()
                    ).forEach { iosTarget ->
                        iosTarget.binaries.framework {
                            baseName = "ComposeApp"
                            isStatic = true
                        }
                    }
                    jvm()

                    @OptIn(ExperimentalWasmDsl::class)
                    wasmJs {
                        browser()
                        binaries.library()
                    }

                    js {
                        browser()
                        binaries.library()
                    }
                    sourceSets.commonMain {
                        compileSource(
                            //language=kotlin
                            """
                            package com.example
                            
                            import androidx.compose.runtime.Composable