From dbbbfa8df418c7aea2412da1995db4b38d1c6170 Mon Sep 17 00:00:00 2001 From: Igor Demin Date: Fri, 19 Aug 2022 19:47:19 +0200 Subject: [PATCH] Use another version of Compose Compiler inside Compose Gradle plugin --- compose/build.gradle.kts | 3 --- gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt | 1 + gradle-plugins/compose/build.gradle.kts | 1 + .../jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt | 2 +- gradle-plugins/gradle.properties | 3 +++ 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compose/build.gradle.kts b/compose/build.gradle.kts index 75cf44407c..6377e2773e 100644 --- a/compose/build.gradle.kts +++ b/compose/build.gradle.kts @@ -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), diff --git a/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt b/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt index e89ddecdde..2a48428cb5 100644 --- a/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt +++ b/gradle-plugins/buildSrc/src/main/kotlin/BuildProperties.kt @@ -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 diff --git a/gradle-plugins/compose/build.gradle.kts b/gradle-plugins/compose/build.gradle.kts index 1295fdefd5..e48c85cda8 100644 --- a/gradle-plugins/compose/build.gradle.kts +++ b/gradle-plugins/compose/build.gradle.kts @@ -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()) diff --git a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt index 7b7ba06534..f5bfb8d5fc 100644 --- a/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt +++ b/gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposeCompilerKotlinSupportPlugin.kt @@ -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 = diff --git a/gradle-plugins/gradle.properties b/gradle-plugins/gradle.properties index 760131f1a8..00dcc6bc79 100644 --- a/gradle-plugins/gradle.properties +++ b/gradle-plugins/gradle.properties @@ -8,6 +8,9 @@ kotlin.code.style=official # __LATEST_COMPOSE_RELEASE_VERSION__ compose.version=0.0.0-master-dev673 +compose.compiler.version=1.3.0-alpha01 +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!