Browse Source

Update default Kotlin and Compose versions in Gradle tests (#2030)

pull/2043/head v1.2.0-alpha01-dev675
Alexey Tsvetkov 3 years ago committed by GitHub
parent
commit
f281b75f77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      gradle-plugins/compose/build.gradle.kts
  2. 3
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestKotlinVersion.kt
  3. 8
      gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProperties.kt
  4. 8
      gradle-plugins/gradle.properties

1
gradle-plugins/compose/build.gradle.kts

@ -176,6 +176,7 @@ tasks.withType<Test>().configureEach {
dependsOn(":publishToMavenLocal")
systemProperty("compose.plugin.version", BuildProperties.deployVersion(project))
systemProperty("kotlin.version", project.property("kotlin.version").toString())
}
task("printAllAndroidxReplacements") {

3
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestKotlinVersion.kt

@ -7,6 +7,5 @@ package org.jetbrains.compose.test
@Suppress("EnumEntryName")
enum class TestKotlinVersion(val versionString: String) {
// __KOTLIN_COMPOSE_VERSION__
Default("1.6.10")
Default(TestProperties.defaultKotlinVersion)
}

8
gradle-plugins/compose/src/test/kotlin/org/jetbrains/compose/test/TestProperties.kt

@ -6,9 +6,15 @@
package org.jetbrains.compose.test
object TestProperties {
val defaultKotlinVersion: String
get() = notNullSystemProperty("kotlin.version")
val composeVersion: String
get() = System.getProperty("compose.plugin.version")!!
get() = notNullSystemProperty("compose.plugin.version")
val gradleVersionForTests: String?
get() = System.getProperty("gradle.version.for.tests")
private fun notNullSystemProperty(property: String): String =
System.getProperty(property) ?: error("The '$property' system property is not set")
}

8
gradle-plugins/gradle.properties

@ -6,7 +6,13 @@ kotlin.code.style=official
# unless overridden by COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION env var.
#
# __LATEST_COMPOSE_RELEASE_VERSION__
compose.version=1.1.0
compose.version=0.0.0-master-dev673
# A version of Kotlin expected by __LATEST_COMPOSE_RELEASE_VERSION__
# This Kotlin version should be used in test or for checking plugin's compatibility,
# not for building the Gradle plugin itself!
# __KOTLIN_COMPOSE_VERSION__
kotlin.version=1.6.21
# A version of Gradle plugin, that will be published,
# unless overridden by COMPOSE_GRADLE_PLUGIN_VERSION env var.

Loading…
Cancel
Save