Browse Source

Update the compiler test cases for kotlin 2.0-Beta1

compiler/test-cases-with-kotlin2
Oleksandr Karpovich 6 months ago
parent
commit
6f6ce490e3
  1. 2
      compose/integrations/composable-test-cases/build.gradle.kts
  2. 14
      compose/integrations/composable-test-cases/buildSrc/build.gradle.kts
  3. 14
      compose/integrations/composable-test-cases/buildSrc/src/main/kotlin/TargetsConfiguration.kt
  4. 6
      compose/integrations/composable-test-cases/gradle.properties

2
compose/integrations/composable-test-cases/build.gradle.kts

@ -10,7 +10,7 @@ allprojects {
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev/") // to test with kotlin dev builds
// mavenLocal()
mavenLocal()
}
afterEvaluate {

14
compose/integrations/composable-test-cases/buildSrc/build.gradle.kts

@ -10,10 +10,20 @@ plugins {
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
tasks
.withType<org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile>()
.configureEach {
compilerOptions
.languageVersion
.set(
org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9
)
}

14
compose/integrations/composable-test-cases/buildSrc/src/main/kotlin/TargetsConfiguration.kt

@ -2,8 +2,8 @@ import org.gradle.api.NamedDomainObjectContainer
import org.gradle.api.Project
import org.gradle.api.artifacts.ProjectDependency
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
import org.jetbrains.kotlin.gradle.kpm.external.ExternalVariantApi
import org.jetbrains.kotlin.gradle.kpm.external.project
//import org.jetbrains.kotlin.gradle.kpm.external.ExternalVariantApi
//import org.jetbrains.kotlin.gradle.kpm.external.project
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetContainer
@ -17,9 +17,9 @@ val Project.isFailingJsCase: Boolean
get() = this.name.contains("-failingJs-")
val Project.isMingwX64Enabled: Boolean
get() = this.isInIdea
get() = false // this.isInIdea
@OptIn(ExternalVariantApi::class)
//@OptIn(ExternalVariantApi::class)
fun KotlinMultiplatformExtension.configureTargets() {
jvm("desktop")
configureJsTargets()
@ -30,7 +30,7 @@ fun KotlinMultiplatformExtension.configureTargets() {
macosX64()
macosArm64()
// We use linux agents on CI. So it doesn't run the tests, but it builds the klib anyway which is time consuming.
if (project.isMingwX64Enabled) mingwX64()
// if (project.isMingwX64Enabled) mingwX64()
linuxX64()
}
@ -41,13 +41,13 @@ fun KotlinMultiplatformExtension.configureJsTargets() {
}
}
@OptIn(ExternalVariantApi::class)
//@OptIn(ExternalVariantApi::class)
fun KotlinDependencyHandler.getLibDependencyForMain(): ProjectDependency {
if (!project.name.endsWith("-main")) error("Unexpected main module name: ${project.name}")
return project(":" + project.name.replace("-main", "-lib"))
}
@OptIn(ExternalVariantApi::class)
//@OptIn(ExternalVariantApi::class)
fun KotlinDependencyHandler.getCommonLib(): ProjectDependency {
return project(":common")
}

6
compose/integrations/composable-test-cases/gradle.properties

@ -1,12 +1,12 @@
org.gradle.jvmargs=-Xmx2048M -XX:MaxMetaspaceSize=512m
kotlin.code.style=official
android.useAndroidX=true
kotlin.version=1.9.20-RC
kotlin.version=2.0.0-Beta1
agp.version=7.3.0
compose.version=1.5.10-rc01
compose.version=1.5.10
#empty by default - a default version will be used
compose.kotlinCompilerPluginVersion=1.5.2.1-rc01
compose.kotlinCompilerPluginVersion=23.11.16.1
# default|failingJs - see enum class CasesToRun
tests.casesToRun=default

Loading…
Cancel
Save