Deprecate Gradle plugin dependency aliases#5462
Merged
Conversation
MatkovIvan
reviewed
Oct 24, 2025
| @Suppress("DEPRECATION") | ||
| class Dependencies(project: Project) { | ||
| val desktop = DesktopDependencies | ||
| @Deprecated("Specify dependency via version catalog", replaceWith = ReplaceWith("\"org.jetbrains.compose.animation:animation:${ComposeBuildConfig.composeVersion}\"")) |
Member
There was a problem hiding this comment.
What about helper constant/function?
Member
Author
There was a problem hiding this comment.
It would have been nice to remove repetition from replaceWith argument, but it is not possible due to const expression requirement. The message is temprorary and the whole will be removed soon.
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
MatkovIvan
approved these changes
Oct 24, 2025
eymar
reviewed
Oct 24, 2025
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/ComposePlugin.kt
Show resolved
Hide resolved
eymar
approved these changes
Oct 24, 2025
This was referenced Oct 24, 2025
kropp
added a commit
that referenced
this pull request
Oct 24, 2025
Merged
18 tasks
MatkovIvan
pushed a commit
that referenced
this pull request
Jan 26, 2026
## Problem
When using `compose.materialIconsExtended` in Compose Multiplatform
1.10+, developers see the deprecation warning:
```
'val materialIconsExtended: String' is deprecated. Specify dependency directly.
```
This message is confusing because it implies you can simply switch to a
direct dependency like other Compose artifacts. However, unlike
`compose.runtime` or `compose.ui`, the `material-icons-extended`
artifact is **intentionally pinned to version 1.7.3** and newer versions
aren't published.
When developers try to follow the deprecation guidance by adding:
```kotlin
implementation("org.jetbrains.compose.material:material-icons-extended:1.10.0")
```
They get a dependency resolution failure because this artifact doesn't
exist at that version.
I ran into this while updating dependencies in a project and spent some
time investigating before discovering that the artifact was
intentionally discontinued after 1.7.3.
## Solution
This PR updates the deprecation message to be more helpful:
```kotlin
@deprecated(
"This artifact is pinned to version 1.7.3 and will not receive updates. " +
"Either use this version explicitly or migrate to Material Symbols (vector resources). " +
"See https://kotlinlang.org/docs/multiplatform/whats-new-compose-180.html",
replaceWith = ReplaceWith("\"org.jetbrains.compose.material:material-icons-extended:1.7.3\"")
)
```
The new message:
- Explains that the artifact is pinned and won't receive updates
- Offers two clear migration paths: use 1.7.3 explicitly, or migrate to
Material Symbols
- Links to the documentation that explains the change
## Context
- PR #5462 introduced the deprecation for all dependency aliases
- PRs #5151 and #5247 pinned the material-icons-extended version to
1.7.3
- The "What's new in 1.8" docs explain the removal but the deprecation
message doesn't connect the dots
## Testing
Built the gradle-plugins module locally and verified the deprecation
message appears correctly.
## Release Notes
### Highlights - Multiple Platforms
- Improved the deprecation message for `compose.materialIconsExtended`
to explain that the artifact is pinned to version 1.7.3 and suggest
migration to Material Symbols
Co-authored-by: Sergei Petunin <[email protected]>
MatkovIvan
pushed a commit
that referenced
this pull request
Jan 26, 2026
## Problem
When using `compose.materialIconsExtended` in Compose Multiplatform
1.10+, developers see the deprecation warning:
```
'val materialIconsExtended: String' is deprecated. Specify dependency directly.
```
This message is confusing because it implies you can simply switch to a
direct dependency like other Compose artifacts. However, unlike
`compose.runtime` or `compose.ui`, the `material-icons-extended`
artifact is **intentionally pinned to version 1.7.3** and newer versions
aren't published.
When developers try to follow the deprecation guidance by adding:
```kotlin
implementation("org.jetbrains.compose.material:material-icons-extended:1.10.0")
```
They get a dependency resolution failure because this artifact doesn't
exist at that version.
I ran into this while updating dependencies in a project and spent some
time investigating before discovering that the artifact was
intentionally discontinued after 1.7.3.
## Solution
This PR updates the deprecation message to be more helpful:
```kotlin
@deprecated(
"This artifact is pinned to version 1.7.3 and will not receive updates. " +
"Either use this version explicitly or migrate to Material Symbols (vector resources). " +
"See https://kotlinlang.org/docs/multiplatform/whats-new-compose-180.html",
replaceWith = ReplaceWith("\"org.jetbrains.compose.material:material-icons-extended:1.7.3\"")
)
```
The new message:
- Explains that the artifact is pinned and won't receive updates
- Offers two clear migration paths: use 1.7.3 explicitly, or migrate to
Material Symbols
- Links to the documentation that explains the change
## Context
- PR #5462 introduced the deprecation for all dependency aliases
- PRs #5151 and #5247 pinned the material-icons-extended version to
1.7.3
- The "What's new in 1.8" docs explain the removal but the deprecation
message doesn't connect the dots
## Testing
Built the gradle-plugins module locally and verified the deprecation
message appears correctly.
## Release Notes
### Highlights - Multiple Platforms
- Improved the deprecation message for `compose.materialIconsExtended`
to explain that the artifact is pinned to version 1.7.3 and suggest
migration to Material Symbols
Co-authored-by: Sergei Petunin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deprecate Gradle plugin dependency aliases and provide direct replacement.
Fixes CMP-7613 Consider deprecating aliases
compose.material3, etc in favour of using Gradle version catalogTesting
Run a sample app, open build.gradle.kts, apply all suggested replacements.
Release Notes
Migration Notes - Multiple Platforms
compose.ui) are now deprecated. Use provided direct artifact coordinates and add them to the version catalog.