Use another version of Compose Compiler inside Compose Gradle plugin (#2256)

* Use another version of Compose Compiler inside Compose Gradle plugin

* Update gradle.properties
This commit is contained in:
Igor Demin
2022-08-23 02:29:22 +03:00
committed by GitHub
parent 0d1a309966
commit 33237b662e
5 changed files with 10 additions and 4 deletions

View File

@@ -49,9 +49,6 @@ val iconsComponents =
)
fun ComposePublishingTask.mainPublications() {
publish(":compose:compiler:compiler", publications = listOf("Maven"))
publish(":compose:compiler:compiler-hosted", publications = listOf("Maven"))
publish(
":compose:desktop:desktop",
onlyWithPlatforms = setOf(ComposePlatforms.Desktop),

View File

@@ -15,6 +15,7 @@ object BuildProperties {
fun composeVersion(project: Project): String =
System.getenv("COMPOSE_GRADLE_PLUGIN_COMPOSE_VERSION")
?: project.findProperty("compose.version") as String
fun composeCompilerVersion(project: Project): String = project.findProperty("compose.compiler.version") as String
fun deployVersion(project: Project): String =
System.getenv("COMPOSE_GRADLE_PLUGIN_VERSION")
?: project.findProperty("deploy.version") as String

View File

@@ -29,6 +29,7 @@ val buildConfig = tasks.register("buildConfig", GenerateBuildConfig::class.java)
classFqName.set("org.jetbrains.compose.ComposeBuildConfig")
generatedOutputDir.set(buildConfigDir)
fieldsToGenerate.put("composeVersion", BuildProperties.composeVersion(project))
fieldsToGenerate.put("composeCompilerVersion", BuildProperties.composeCompilerVersion(project))
fieldsToGenerate.put("composeGradlePluginVersion", BuildProperties.deployVersion(project))
fieldsToGenerate.put("experimentalOELPublication", BuildProperties.experimentalOELPublication(project))
fieldsToGenerate.put("oelAndroidXVersion", BuildProperties.oelAndroidXVersion(project).orEmpty())

View File

@@ -22,7 +22,7 @@ class ComposeCompilerKotlinSupportPlugin : KotlinCompilerPluginSupportPlugin {
private fun composeCompilerArtifact(artifactId: String) =
SubpluginArtifact(
groupId = "org.jetbrains.compose.compiler", artifactId = artifactId, version = composeVersion
groupId = "org.jetbrains.compose.compiler", artifactId = artifactId, version = ComposeBuildConfig.composeCompilerVersion
)
override fun isApplicable(kotlinCompilation: KotlinCompilation<*>): Boolean =

View File

@@ -8,6 +8,13 @@ kotlin.code.style=official
# __LATEST_COMPOSE_RELEASE_VERSION__
compose.version=0.0.0-master-dev673
compose.compiler.version=1.3.0-alpha01
# See the corresponding version here: https://developer.android.com/jetpack/androidx/releases/compose-kotlin
# (note, that for the 'org.jetbrains.compose` build we usualy keep only Major and Minor versions the same)
# This is only used on CI for now.
compose.compiler.compatible.kotlin.version=1.7.10
# 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!