Update dependency org.jetbrains.compose to v1.9.0 #127
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.
Note
Mend has cancelled the proposed renaming of the Renovate GitHub app being renamed to
mend[bot]
.This notice will be removed on 2025-10-07.
This PR contains the following updates:
1.7.3
->1.9.0
Release Notes
JetBrains/compose-jb (org.jetbrains.compose)
v1.9.0
Changes since 1.8.2
See also What's new.
Highlights
Web
WebElementView
Composable function for embedding the absolutely positioned HTML content in Compose for web target. It's supported only when usingComposeViewport
entry point and it's not supported withCanvasBasedWindow
, which is deprecated now #2145Migration Notes
Multiple Platforms
compose.material3
now points to the latest stable Material3 version, 1.8.2. If the latest Material3 features are needed, please include it this way: #5360org.jetbrains.compose.material3:material3:1.9.0-beta06
]kotlinx-datetime
is updated to0.7.1
. If you also use it in your projects, please update it to this version to ensure compatibility #2276iOS
UIKitInteropInteractionMode
#2215Desktop
Window
andDialogWindow
overloads that create aComposeWindow
/ComposeDialog
have been renamed toSwingWindow
/SwingDialog
and the old versions have been deprecated #2141LayoutCoordinates.positionOnScreen()
) will returnOffset.Unspecified
#2163Modifier.mouseClickable
is removed. See https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-desktop-mouse-events.html for alternatives #2194Web
fun ComposeViewport
withviewportContainerId: String?
parameter now can be called from a web-commonfun main
(k/js and k/wasm) #2226CanvasBasedWindow
is deprecated, useComposeViewport
instead. UnlikeCanvasBasedWindow
, which expect as an input param the id to theHTMLCanvasElement
that will be used for rendering,ComposeViewport
one passesparentContainer
(and corresponding HTML Canvas element will be created automatically). By default such container isdocument.body
#2280org.jetbrains.compose.experimental.jscanvas.enabled=true
is not required anymore when having a kotlin/js target #5340Gradle Plugin
org.jetbrains.compose.compiler
is not supported anymore and the API to configure it was removed #5283Features
Multiple Platforms
ComposeUiTest
API. Theblock
inrunComposeUiTest
issuspend
now. It allows to callawaitIdle
and other suspend functions. It ensures a correct execution of a test on all platforms. See the web specifics inkotlinx.coroutines.test.runTest
documentation #2066@Preview
(org.jetbrains.compose.ui.tooling.preview
) annotation with the following parameters: name, group, widthDp, heightDp, locale, showBackground, backgroundColor. IDE (IJ or AS) will pick up these parameters in the same way it works forandroidx
Preview annotations #5339iOS
PlatformImeOptions
#2108keepScreenOn
modifier #2180Desktop
Switch
, reporting it as a checkbox #2136SwingFrame
andSwingDialog
composables that allow configuring the window/dialog before it is shown #2139AnnotatedString
is available as a data flavor inClipEntry
, instead of only its text #2092RenderSettings.SwingGraphics
option forComposePanel.renderSettings
argument #2071ComposePanel
,ComposeWindow
andComposeDialog
now hassavedState
constructor parameter to restore previous state andsaveState
function to save the current state for later use #2225Web
composeCompatibilityBrowserDistribution
task. This task combines two prod distributions - for js and for wasm in such way so that if modern required features are not supported by the consumer browser, application switch to js mode #5375Resources
JvmResourceReader
API and madeLocalResourceReader
public to allow providing a custom classloader for desktop target #5334Navigation
NavController
-suspend fun NavController.bindToBrowserNavigation
. And the existing functionsuspend fun Window.bindToNavigation
is deprecated now #2189Fixes
Multiple Platforms
ExperimentalMaterial3ExpressiveApi
annotation removed from no-longer-experimental API #2298iOS
Desktop
ComposePanel
withSystem.setProperty("compose.swing.render.on.graphics", "true")
#2097Offset.Unspecified
instead of throwing an exception inLayoutCoordinates.localToScreen
andLayoutCoordinates.screenToLocal
#2160Modifier.onGloballyPositioned
will be called #2163BasicTextField(TextFieldState)
#2168SemanticsProperties.Text
andSemanticsProperties.ContentDescription
values will now be correctly concatenated whenModifier.semantics(mergeDescendants = true)
is used #2202SwingPanel
children ofComposePanel
, when the compose panel is itself removed from the hierarchy #2277runRelease
task when navigation andobfuscate.set(true)
are used #5384Web
START
/STOP
events on thevisibilitychange
callback now #2219ON_RESUME
because Safari ignores interactions and doesn't request the focus #2219Gradle Plugin
TargetFormat.AppImage
is specified intargetFormats
on macOS #5332Dependencies
Gradle Plugin
org.jetbrains.compose
, version1.9.0
. Based on Jetpack Compose libraries:Compose Material3 libraries
org.jetbrains.compose.material3:material3*:1.9.0-beta06
. Based on Jetpack Compose Material3 1.4.0-beta03Compose Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.2.0-alpha06
. Based on Jetpack Compose Material3 Adaptive 1.2.0-alpha11Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.4
. Based on Jetpack Lifecycle 2.9.2Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.9.0
. Based on Jetpack Navigation 2.9.1Savedstate library
org.jetbrains.androidx.savedstate:savedstate:1.3.4
. Based on Jetpack Savedstate 1.3.1WindowManager Core library
org.jetbrains.androidx.window:window-core:1.4.0
. Based on Jetpack WindowManager 1.4.0v1.8.2
Changes since 1.8.1
Fixes
Multiple Platforms
Fixed
TextField(TextFieldValue)
when used with a visual transformation with a non-identity offset mapping (potentially even crashing) #2130Fixed a memory leak and performance degradation when
ComposeUiFlags.isRectTrackingEnabled
set totrue
(by default) #2123Fixed caret placement near glyphs if glyphs are compound symbols and part of them are non-spacing marks #2155
Support Preview parameters for Previews in common source sets in IJ and AS. Note: IDEs also need to implement support on their end. Please check the respective IDE release notes to confirm this is supported #5323
Example usage:
Desktop
1.0
#2158Navigation
NavHost
is located in a scrollable container #2146Dependencies
Gradle Plugin
org.jetbrains.compose
, version1.8.2
. Based on Jetpack Compose libraries:Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.1
. Based on Jetpack Lifecycle 2.9.1Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.2
. Based on Jetpack Material3 Adaptive 1.1.0Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.9.0-beta03
. Based on Jetpack Navigation 2.9.0Savedstate library
org.jetbrains.androidx.savedstate:savedstate:1.3.1
. Based on Jetpack Savedstate 1.3.0WindowManager Core library
org.jetbrains.androidx.window:window-core:1.4.0-alpha07
. Based on Jetpack WindowManager 1.4.0-alpha04v1.8.1
Changes since 1.8.0
Features
Resources
Res
class name #5296Fixes
Multiple Platforms
iOS
androidx.compose.material3.ModalBottomSheet
closes after any tap #2086ComposeUIViewController
when text input starts #2088UIKitViewController
insidePopup
orDialog
#2102Desktop
svgPainter
doesn't show any images #2096BroadcastFrameClock.lock
andRecomposer.stateLock
#2098androidx.navigation
and running./gradlew runRelease
#5314kotlinx.serialization
ProGuard rules are bundled in the Compose Gradle plugin #5314Web
Resources
Dependencies
Gradle Plugin
org.jetbrains.compose
, version1.8.1
. Based on Jetpack Compose libraries:Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0
. Based on Jetpack Lifecycle 2.9.0Navigation libraries
org.jetbrains.androidx.navigation:navigation-*:2.9.0-beta02
. Based on Jetpack Navigation 2.9.0Material3 Adaptive libraries
org.jetbrains.compose.material3.adaptive:adaptive*:1.1.1
. Based on Jetpack Material3 Adaptive 1.1.0v1.8.0
Changes since 1.7.3
Highlights
Multiple Platforms
BackHandler
andPredictiveBackHandler
. And use them in material3 widgets and androidx-navigation library #1771iOS
fun enableTraceOSLog()
#1652Web
Resources
FontVariation.Settings
support to the resources library #5183Breaking Changes
Tests
runOnIdle
will now executeaction
on the UI thread aligning the behavior with Android #1601runOnIdle
will no longer callwaitForIdle
after executing the action aligning the behavior with Android #1601mainClock
such that it doesn't reach the next frame, will no longer cause a recomposition #1618Multiple Platforms
core-bundle
module to the androidx SavedState. Libraries that useorg.jetbrains.androidx.lifecycle:lifecycle-viewmodel-savedstate
ororg.jetbrains.androidx.savedstate:savedstate
should migrate to the latest version #1850LocalTextInputService
is no longer supported #1974iOS
AccessibilitySyncOptions
and removeAccessibilityDebugLogger
from public API #1604WindowInsets.Companion.waterfall
getter to match the expected API #1919Desktop
Modifier.onExternalDrag
has been removed - commonModifier.dragAndDropTarget
API should be used instead #1606Migration Notes
Multiple Platforms
google()
repo torepositories {...}
block if it is not there yet #1819material-icons-core
so if your project relied on that, you will have to explicitly add that dependency in yourbuild.gradle[.kts]
files: #2030iOS
LocalUIViewController
moved to theandroidx.compose.ui.uikit
module #1608ComposeUIViewControllerDelegate
marked as deprecated. Use the parent view controller to override the methods of theUIViewController
class #1651CupertinoScrollDecayAnimationSpec
andCupertinoOverscrollEffect
are removed from public API #1806Gradle Plugin
org.jetbrains.compose.compiler
is not supported anymore and the API to configure it was removed #5293Features
Multiple Platforms
LineHeightStyle.Alignment
#1569Clipboard
interface with suspend functions, which work correctly on all targets including Web. TheClipboardManager
was deprecated because it was not possible to correctly implement it for Web #1796iOS
ComposeUIViewControllerConfiguration.useSeparateRenderThreadWhenPossible
flag that allows offloading GPU commands encoding to the separate thread and improving performance #1694AccessibilitySyncOptions
removed. The accessibility tree is built on demand #1780UIAccessibilityContainerTypeSemanticGroup
for traversal groups #1809UIScrollView
s, as well as withinUIScrollView
s #1818BasicTextField(TextFieldState)
#1598androidx.navigation
transition animation on iOS is as close as possible to the iOS back gesture #1861ComposeUIViewController
leaves view controller hierarchy #1877BasicTextField(TextFieldState)
#1923BasicTextField(TextFieldState)
#1926Desktop
-keep class
for the associated with error class in "Location:"androidx.
package, it might a Compose bug, please report in https://youtrack.jetbrains.com/issues/CMP. The-keep class
workaround should also work in this caseWeb
PointerIcon.fromKeyword
function to change the browser cursor #1704Resources
preloadFont
,preloadImageBitmap
,preloadImageVector
#5159Gradle Plugin
androidLibrary
target #5157Navigation
navController.navigate(Uri)
method #1617navController.handleDeepLink(NavDeepLinkRequest)
method #1617Fixes
Tests
captureToImage
#1820Multiple Platforms
FontRenderingSettings
is not reflected until composition restarts #1595ModalDrawerSheet
overload withDrawerState
argument #1763placeWithLayer
scale application: offset is not scaled now (Android behavior) #1784TextField(TextFieldState)
(akaBasicTextField2
) transformations incorrectly leeching into the untransformed text itself, when input method is used (Chinese and other languages with multi-keystroke character input) #1833IllegalArgumentException: Object already closed
duringGraphicsLayer.record
#1839implementation()
toapi()
) #1883ScrollState.viewportSize
for (Basic)TextField(TextFieldState)
#1896IllegalArgumentException: maxWidth(value) must be >= than minWidth(0)
crashes when aTextField
withtrailingIcon
is too narrow #1936TextField(TextFieldState)
while also editing the text, such as by pressing Backspace #1969InterceptPlatformTextInput
for the legacy TextField #1974iOS
defaultUIKitMain()
#1585androidx.compose.material3.internal.formatWithSkeleton
that was accidently marked as public #1609optOutOfCupertinoOverscroll()
removed #1753UIMenu
that appears over the Compose content #1818TextField
#1894ComposeUIViewController
is shifted #1899usePlatformInsets = true
#1920MetalView
when Compose controller re-enters view hierarchy #1938BasicTextField(TextFieldState)
with appliedOutputTransformation
#1953BasicTextField(TextFieldState)
#1956BasicTextField(TextFieldState)
#1984LocalSoftwareKeyboardController
inBasicTextField(TextFieldState)
#1974BasicTextField(TextFieldState)
#2018Desktop
Move
#1683compose.swing.render.on.graphics=true
#1688Dialog
/Popup
creation in case ofcompose.layers.type=COMPONENT
and pointingwindowContainer
toComposePanel
itself #1747compose.interop.blending
flag (1.7.0 regression) #1774Modifier.semantics { hideFromAccessibility() }
should now be correctly hidden from a11y #1798TextField(TextFieldState)
(akaBasicTextField2
) #1794TextField(TextFieldState)
(akaBasicTextField2
) #1810Modifier.selectable
withRole.RadioButton
will have their state reported to accessibility viaAccessibleValue.getCurrentAccessibleValue()
and asAccessibleState.CHECKED
ingetAccessibleStateSet()
#1797SwingPanel
s when usingcompose.interop.blending=true
#1901onRenderApiChanged
inComposeWindow
andComposeDialog
not working when the renderer changes due to fallback, rather than explicit change #1911compose.interop.blending=true
completely breaking Swing interop on Windows when Direct3D is unsupported. Note that interop blending is still supported on Windows only if Direct3D is available #1913SecureTextField
#1853TextFieldState
are now correctly reported to the transformations when inputting composite characters (e.g. ㅀ), instead of the whole text being replaced on each new character #1853Snapshot.sendApplyNotifications
from a thread other than the event dispatching thread #1955compose.interop.blending
flag #1908Execution failed for task ':composeApp:proguardReleaseJars'
whenmaterial3
is included in the project #5261Web
BasicTextField
handles browser copy/cut/paste events correctly now. Previously, they were ignored #1795TextField
is clicked/receives focus #1865TextField
#1876Text
andTextField
s, to avoid them being drawn as tofu #1943Modifier.detectTransformGestures
will allow to handle zoom and rotation gestures #1942Resources
android:autoMirrored="true"
property and pass it to ImageVector builder #5140Navigation
No destination with ID 0 is on the NavController's back stack
crash on iOS #1596Dependencies
Gradle Plugin
org.jetbrains.compose
, version1.8.0
. Based on Jetpack Compose libraries:Lifecycle libraries
org.jetbrains.androidx.lifecycle:lifecycle-*:2.9.0-beta01
. Based on Jetpack Lifecycle 2.9.0-beta01Navigation libraries `org.jetbrains.androidx.navigatio