-
-
Notifications
You must be signed in to change notification settings - Fork 379
Copilot/add kotlin compose plugin #4286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copilot/add kotlin compose plugin #4286
Conversation
Co-authored-by: ageon1156 <140043221+ageon1156@users.noreply.github.com>
Co-authored-by: ageon1156 <140043221+ageon1156@users.noreply.github.com>
Downgrade to AGP 8.1.2/Gradle 8.5 for Hilt 2.58 compatibility
- Remove compose.gradlePlugin dependency from build-logic/convention/build.gradle.kts - Comment out compose-gradlePlugin library in libs.versions.toml (doesn't exist for Kotlin 1.9.x) - Comment out compose-compiler plugin in libs.versions.toml (doesn't exist for Kotlin 1.9.x) - Add compose-compiler version 1.5.14 compatible with Kotlin 1.9.25 - Update AndroidCompose.kt to use old-style kotlinCompilerExtensionVersion - Update convention plugins to not apply the compose-compiler plugin - Remove ComposeCompilerGradlePluginExtension configuration (not available in Kotlin 1.9.x) Co-authored-by: ageon1156 <140043221+ageon1156@users.noreply.github.com>
…-plugin Fix build failure: Remove Kotlin 2.0+ compose-compiler plugin for 1.9.25 compatibility
…er plugin Co-authored-by: ageon1156 <140043221+ageon1156@users.noreply.github.com>
…settings.gradle.kts Co-authored-by: ageon1156 <140043221+ageon1156@users.noreply.github.com>
…mpatibility Upgrade to Kotlin 2.3.0, AGP 9.0.0, and Gradle 9.2.1 to resolve metadata incompatibility
Co-authored-by: ageon1156 <140043221+ageon1156@users.noreply.github.com>
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds Kotlin Compose Compiler plugin configuration to the KMP (Kotlin Multiplatform) library compose convention plugin. The changes enable compose compiler metrics, reports, and stability configuration for KMP modules that use Compose.
Changes:
- Removes JetBrains toolchain vendor constraint, allowing any JDK 21 vendor
- Adds Compose compiler configuration to KMP library compose convention plugin (metrics, reports, stability config)
- Swaps plugin application order (compose-compiler before compose-multiplatform)
- Removes unnecessary android.lint plugin dependency from build-logic
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| gradle/gradle-daemon-jvm.properties | Removes toolchainVendor constraint to allow any JDK 21 vendor |
| build-logic/convention/src/main/kotlin/KmpLibraryComposeConventionPlugin.kt | Adds Compose compiler configuration block with metrics, reports, and stability settings; swaps plugin order |
| build-logic/convention/build.gradle.kts | Removes android.lint plugin dependency which was not needed for build-logic compilation |
| // Configure Compose Compiler options | ||
| extensions.configure<ComposeCompilerGradlePluginExtension> { | ||
| fun Provider<String>.onlyIfTrue() = flatMap { provider { it.takeIf(String::toBoolean) } } | ||
| fun Provider<*>.relativeToRootProject(dir: String) = map { | ||
| isolated.rootProject.projectDirectory | ||
| .dir("build") | ||
| .dir(projectDir.toRelativeString(rootDir)) | ||
| }.map { it.dir(dir) } | ||
|
|
||
| project.providers.gradleProperty("enableComposeCompilerMetrics").onlyIfTrue() | ||
| .relativeToRootProject("compose-metrics") | ||
| .let(metricsDestination::set) | ||
|
|
||
| project.providers.gradleProperty("enableComposeCompilerReports").onlyIfTrue() | ||
| .relativeToRootProject("compose-reports") | ||
| .let(reportsDestination::set) | ||
|
|
||
| stabilityConfigurationFiles | ||
| .add(isolated.rootProject.projectDirectory.file("compose_compiler_config.conf")) | ||
| } |
Copilot
AI
Jan 22, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Compose Compiler configuration block is duplicated from the AndroidCompose.kt file (lines 51-69). Consider extracting this configuration into a shared function to avoid code duplication and ensure consistent behavior across Android and KMP modules. This would make future maintenance easier and reduce the risk of configuration drift between the two implementations.
|
No description, AI generated, no response to review, and no CLA - gonna have to close this one. |
Thank you for sending in a pull request, here's some tips to get started!
(Please delete all these tips and replace with your text)