124 KiB
1.6.0 (February 2024)
Changes since 1.5.12
Highlights
An overview of highlights for this release is also available in the Compose Multiplatform documentation: What's new in 1.6.0.
Common
- Resource library improvements (an example project)
- Experimental support is available for tests in common code
- Support Kotlin 2.0.0-Beta4
iOS, Desktop, Web
- Support
LineHeightStyle.Trim
- Add a way to use fonts installed on the system
- Add support for text decoration line styles via PlatformTextStyle
iOS
- Native-like caret behaviour by long/single taps in textfields(1, 2)
- Basic accessibility support
Popup
s/Dialog
s can now be displayed outside aViewController
over native components- Allow selecting
Text
inSelectionContainer
by double and triple tap
Web
- Compose for Web (Wasm) artifacts are available in Maven Central Warning: Kotlin 1.9.21 has an issue with web target. Use Kotlin 1.9.22.
Desktop
- Proper clipping of
SwingPanel
interop (under an experimental flag, see the link) Popup
s/Dialog
s can now be displayed outside the main window or panel and over native components (under an experimental flag, see the link)
Breaking changes
Common
- Resource library (
compose.components.resources
) changes- resources from
*Main\resources
should be moved to*Main\composeResources\drawable
,commonMain\composeResources\font
or*Main\composeResources\files
depending on the resource type painterResource("resource.xml")
should be replaced bypainterResource(Res.drawable.resource)
- resources from
google()
maven repository is now required. Add this tobuild.gradle.kts
:
If the project doesn't have it, there will be an errorrepositories { ... google() }
Could not find androidx.annotation:annotation:...
orCould not find org.jetbrains.compose.collection-internal:collection
.- Text with
lineHeight
set is trimmed by default - Text with
fontSize
set withoutlineHeight
insideMaterialTheme
has different line height
iOS/Desktop/Web
- Deprecate
public ComposeScene
in favour of@InternalComposeUiApi MultiLayerComposeScene
- Hide deprecated DropdownMenu overloads
iOS
- Separate platform views for
Popup
s/Dialog
s that are enabled by default, unable to draw anything out of their own bounds (for example, a shadow of the topmost container). It will be fixed in a future version, but if you're relying on this behavior, you can switch back to the old behavior by setting theplatformLayers
parameter tofalse
:ComposeUIViewController(configure = { platformLayers = false }) { // ... }
Desktop
Web (k/js)
- Libraries which depend on earlier Compose Multiplatform version are not compatible with 1.6.0 anymore. This is because decoys generation was disabled. Projects which apply Compose Compiler plugin manually need to remove this argument:
plugin:androidx.compose.compiler.plugins.kotlin:generateDecoys=true
.
Features
Common
iOS
- Adjust overscroll effect params to match iOS animations
- Add ability to change opacity for compose view
- Introduce
@Composable fun UIKitViewController
- Remove iOS experimental flag in gradle.properties
Desktop
- Support select till the end of the file / till the start of the file keyboard actions on Windows
- Add LinuxArm64 target to Compose runtime
- Add dedicated feature flags class for desktop
Web
HTML library
Gradle Plugin
Fixes
iOS/Desktop/Web
- Fix "DropdownMenu performs onDismissRequest twice"
- Use a large rectangle for the picture bounds in RenderNodeLayer.drawLayer to prevent clipping
- Fix closing scene during scroll animation
- Fix "Using
painterResource(:DrawableResource)
outside desktop Window can produceUnsatisfiedLinkError
" - Fix "Rect::makeLTRB expected l <= r" crashes
- Fix "
TextLayoutResult#getLineForVerticalPosition
returns wrong value + slow performance" - Run all effects before sending synthetic events
Font
constructor with lazy data loading- Optimise
TextLayoutResult#getLineForOffset
- Fix "SwingPanel/UIKitView doesn't apply Modifier.offset if it's after Modifier.size"
- DatePicker. Fix empty row
- DatePicker. Fix selection of the current day
- Fix
LayoutCoordinates.localToWindow
coordinates conversion for non-full Compose components
iOS
- Fixed unexpected fling animation over scrolling content
- Fix UIKitView z-order
- Fix missing case for loading
SystemFont
on iOS - Fix selection container crash
- Fix
WindowInfo.containerSize
withoutplatformLayers
flag - Disable encoding on separate thread for iOS
- Synchronise IME insets with iOS keyboard
Desktop
- Protect against
MouseInfo.getPointerInfo()
returning null inWindowDraggableArea
- Support Rtl in
SplitPane
- Fix a native crash on
makeGL
- Add Arial and Consolas as backup fonts on Linux and mention font name when one fails to load
- Fix blurry app icon in the system application switcher
- Insert a new line on
NumPadEnter
- Don't restart the drag gesture when the
onDrag(matcher=
changes - Fix "Resizing window on desktop sometimes triggers onClick handlers of Composables"
- Fix "
ComposePanel
doesn't calculate its preferredSize correctly when it's called before doLayout" - Fix input methods on JBR, disable input methods when we lose focus
- Fix "BasicTextField could not input any Chinese character when using JBR"
- Take into account
enabled
inscrollable
for mouse input - Fix NPE for getComponentAfter/Before in ComposePanel
- Transparency support for D3D (previously it supported via fallback on OpenGL)
Web
- Add a
SystemThemeObserver
implementation for wasmJs - Fix keyboard events with meta key on wasm/js targets
- Added WASM to
components.uiToolingPreview
library - Fix "The cursor is invisible in compose web"
- Use an alternative implementation of
Image.toBitmap
Gradle Plugin
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
See the announce of Jetpack Compose 1.6. Notes:
Changes to default font padding
affects only Android target.Added support for selection by mouse, including text.
concerns only Android. Other targets supported it before 1.6.- Some of the features are not ported yet (they will be ported in the next versions):
- BasicTextField2
- Support for nonlinear font scaling
- Multipaltform Drag and drop. It works only for Android right now. For desktop there is the old API
Modifier.onExternalDrag
- MultiParagraph.fillBoundingBoxes
See the announce of Material 1.2.
1.6.0-rc03 (February 2024)
Changes since 1.6.0-rc02
- Support Kotlin 2.0.0-Beta4 Common
- (prerelease fix) Resources. Don't return a cached value when pass new args Common
- (prerelease fix) Fix crash "ComposeUIViewController.view should be attached to window iOS
- (prerelease fix) Fix App crashes when Compose SwfitUI View container removed from hierarchy iOS
- (prerelease fix) Fix Keyboard disappears on IME action iOS
- (prerelease fix) Fix
SelectionContainer
occasionally crashes on iOS iOS - (prerelease fix) Fix crash after open/close dropdown on iOS iOS
- (prerelease fix) Fix Password popup disappears only on the second focused TextField iOS
- (prerelease fix) Fix mouse input above SwingPanel Desktop
- (prerelease fix) Fix non working accessibility on Desktop Desktop
- (prerelease fix) Resources. Fix import of Android flavors Android
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.6.0-rc02 (February 2024)
Changes since 1.6.0-rc01
Breaking changes
since 1.6.0-beta01
- When the resource library is used, resources should be imported explicitly
To quickly change your code to a new state, replace this:
import <modulePackage>.generated.resources.Res
by this:
import <modulePackage>.generated.resources.*
and perform "Code - Optimize Imports" to apply the project code style. If code style doesn't allow wildcrads,
import <modulePackage>.generated.resources.*
will be replaced by explicit imports.
iOS/desktop/web
Fixes
- (prerelease fix) Fix "AlertDialog doesn't work with ProvidableCompositionLocal"
Resource library
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.6.0-rc01 (February 2024)
Changes since 1.6.0-beta02
Known issues and solutions
Could not find "org.jetbrains.compose.annotation-internal:annotation"
(or org.jetbrains.compose.collection-internal:collection), link
It happens because some library depends on 1.6.0-beta02
which isn't binary compatible with 1.6.0-rc01
.
To find this library, call ./gradlew shared:dependencies
(replace shared
by your main module). Downgrade this library or ask the library author to upgrade it to 1.6.0-rc01
.
Could not find androidx.annotation:annotation:...
(or org.jetbrains.compose.collection-internal:collection)
It happens because 1.6.0
depends on collection and annnotation libraries that are available only in the Google Maven repository.
To solve this, add google()
maven repository to build.gradle.kts
:
repositories {
...
google()
}
iOS/desktop/web
Fixes
- Fix "DropdownMenu performs onDismissRequest twice"
- Use a large rectangle for the picture bounds in RenderNodeLayer.drawLayer to prevent clipping
- Fix closing scene during scroll animation
- Fix "Using
painterResource(:DrawableResource)
outside desktop Window can produceUnsatisfiedLinkError
" - Fix "Rect::makeLTRB expected l <= r" crashes
- (prerelease fix) Commonize BasicTooltipBox
- (prerelease fix) Fix sharing composition locals with new platform layers
iOS
Fixes
- Fixed unexpected fling animation over scrolling content
- (prerelease fix) Fix "Wrong scroll behaviour of LazyColumn inside HorizontalPager"
- (prerelease fix) Fix scene size after sending the app to background or changing orientation with open modal
Desktop
Fixes
- Protect against
MouseInfo.getPointerInfo()
returning null inWindowDraggableArea
- Support Rtl in
SplitPane
- Fix a native crash on
makeGL
- (prerelease fix) Fix "Skiko RenderException" when creating
ComposePanel
Web
Fixes
- Add a
SystemThemeObserver
implementation for wasmJs - Fix keyboard events with meta key on wasm/js targets
- Added WASM to
components.uiToolingPreview
library - Fix "The cursor is invisible in compose web"
Gradle Plugin
Fixes
- (prerelease fix) Relocate a bundled
KotlinPoet
to the internal package
Resource library
Fixes
- (prerelease fix) Add a type name to the resource initializers
- (prerelease fix) Don't make resource IDs lowercased
- (prerelease fix) Clean code-gen directory if there was deleted a dependency on the res library
- (prerelease fix) Register all hierarchical compose resources in android compilation
- (prerelease fix) Fix fonts duplication in android app
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.6.0-beta02 (February 2024)
Changes since 1.6.0-beta01
Highlights
- Basic accessibility support iOS
- Popups/Dialogs can now be displayed outside a ViewController over native components on iOS by default iOS
- Allow selecting
Text
inSelectionContainer
by double and triple tap iOS - Add support for text decoration line styles via PlatformTextStyle iOS, desktop, web
- Bugfixes in the resource library (see below for the details)
iOS/desktop/web
Fixes
- Fix "
TextLayoutResult#getLineForVerticalPosition
returns wrong value + slow performance" - Run all effects before sending synthetic events
- (prerelease bug) Fix the pointer icon in
SelectionContainer
iOS
Features
- Adjust overscroll effect params to match iOS animations
- Add ability to change opacity for compose view
Fixes
- Fix UIKitView z-order
- Fix missing case for loading
SystemFont
on iOS - Fix selection container crash
- Fix
WindowInfo.containerSize
withoutplatformLayers
flag - (prerelease fix) Fix "textfield with visual transformation crashes after single tap"
- (prerelease fix) Fix selection handles crossed
- (prerelease fix) Fix CMPViewControllerMisuse error
- (prerelease fix) Fix selection handles with platformLayers=true
- (prerelease fix) Fix interaction handling for interop views
Desktop
Fixes
Breaking changes and deprecated API
HTML library
Features
Gradle Plugin
Features
Resource library
Fixes
- (prerelease fix) Configure Android resources after AGP is applied and ignore hidden files in resources
- (prerelease fix) Generate Res class if there is no common composeResource dir
- (prerelease fix) Support Res class generation in JVM only compose projects
- (prerelease fix) Support Compose resources for iOS tests
- (prerelease fix) Fix sub-module gradle properties for res class generation
- (prerelease fix) Fix Native xml parser
- (prerelease fix) Generate initializer functions in the Res file to avoid the
MethodTooLargeException
- (prerelease fix) Improve handling of special characters in string resources
- (prerelease fix) Add a
ttf
font to the resources demo app
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.12
Common
Features
Desktop
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.6.0-beta01 (January 2024)
Highlights
- Resource library improvements (an example project)
- Experimental support is available for tests in common code
- Compose for Web (Wasm) artifacts are available in Maven Central. Warning: Kotlin 1.9.21 has an issue with web target. Use Kotlin 1.9.22.
- iOS. Native-like caret behaviour by long/single taps in textfields(1, 2)
- Support
LineHeightStyle.Trim
- Desktop. Proper clipping of
SwingPanel
interop (under an experimental flag, see the link) - Popups/Dialogs can now be displayed outside the main window or panel over native components on iOS and desktop (under experimental flags, see the links)
- Add a way to use fonts installed on the system (desktop/web in this version, iOS in the next version, Android isn't supported)
Breaking changes
- Text with
lineHeight
set is trimmed by default - Text with
fontSize
set withoutlineHeight
insideMaterialTheme
has different line height - Resource library (
compose.components.resources
) changes- resources from
*Main\resources
should be moved to*Main\composeResources\drawable
,commonMain\composeResources\font
or*Main\composeResources\files
depending on the resource type painterResource("resource.xml")
should be replaced bypainterResource(Res.drawable.resource)
- resources from
Known issues
compose.components.resources
library doesn't work yet if you applykotlin("jvm")
Gradle plugin. For now, it only works withkotlin("multiplatform")
Common
Features
iOS/desktop/web
Features
Fixes
- Optimise
TextLayoutResult#getLineForOffset
- Fix "SwingPanel/UIKitView doesn't apply Modifier.offset if it's after Modifier.size"
- DatePicker. Fix empty row
- DatePicker. Fix selection of the current day
- Fix
LayoutCoordinates.localToWindow
coordinates conversion for non-full Compose components
Breaking changes and deprecated API
- Deprecate
public ComposeScene
in favour of@InternalComposeUiApi MultiLayerComposeScene
- Hide deprecated DropdownMenu overloads
iOS
Features
Fixes
Desktop
Features
- Support select till the end of the file / till the start of the file keyboard actions on Windows
- Add LinuxArm64 target to Compose runtime
- Add dedicated feature flags class for desktop
Fixes
- Fix blurry app icon in the system application switcher
- Insert a new line on
NumPadEnter
- Don't restart the drag gesture when the
onDrag(matcher=
changes - Fix "BasicTextField NPE-crash on JBR 17.0.9 on Linux when clicked"
- Fix "Resizing window on desktop sometimes triggers onClick handlers of Composables"
- Fix "
ComposePanel
doesn't calculate its preferredSize correctly when it's called before doLayout" - Fix input methods on JBR, disable input methods when we lose focus
- Fix "BasicTextField could not input any Chinese character when using JBR"
- Take into account
enabled
inscrollable
for mouse input - Fix NPE for getComponentAfter/Before in ComposePanel
- Transparency support for D3D (previously it supported via fallback on OpenGL)
Web
Features
Fixes
HTML library
Features
Gradle Plugin
Features
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
- Compiler 1.5.8
- Runtime 1.6.0-rc01
- UI 1.6.0-rc01
- Foundation 1.6.0-rc01
- Material 1.6.0-rc01
- Material3 1.1.2
1.5.11 (November 2023)
Common
Features
iOS
Fixes
- Fix crash at GrGpuResource::release()
- Fix crash with custom font
- Composable functions returning null cause crash (fixed in Kotlin 1.9.21 and JetBrains Compose Compiler 1.5.4)
Desktop
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.10 (October 2023)
This is a combined changelog from the prerelease versions:
Common
Features
- Support Kotlin 1.9.20
- Introduce Material 3 components in common
- Introduce Material component
ExposedDropDownMenu
in common - Introduce
WindowInfo.containerSize
experimental api - Implement
defaultTimePickerLayoutType
based on screen orientation - Add an option to disable insets in
Popup
/Dialog
- Commonize insets
Modifier
's (additionally toWindowInsets.*
)
Fixes
ExposedDropdownMenuBox.onExpandedChange
was not recomposed- Override
RootLayout
insets only in case ofusePlatformInsets
- Don't send synthetic Move events before Press/Release for touch
iOS
Breaking changes
Features
- Compilation speed up due to enabling compiler caches for Kotlin 1.9.20+
- Added crossfade animation during orientation change when used within UIKit hierarchy
- Compose Multiplatform should warn when
CADisableMinimumFrameDurationOnPhone
is not configured properly - Fast delete mode on software keyboard. When you hold a backspace, “turbo mode” is enabled after deleting the first 21 symbols. In turbo mode each tick deletes two words.
- On a long scrollable TextFields, If it’s scrolled up to caret position while typing. Then it stopped on the line above the line with a caret.
- Add
UIViewController
lifetime hooks - Implement iOS native feel scrolls for large text fields
- Improve rendering performance
- Double tap and triple tap gesture handling in
TextField
s
Fixes
- Rendering synchronization of multiple
UIKitView
s within a screen - Today's date is not highlighted with a circle in the material3 datePicker on iOS
- Fix text-to-speech crash in iOS 16.0.*
- Compose window is shown before the first frame is rendered
- iOS TextField, Compound emojis are being treated as many symbols
- Use
CADisplayLink.targetTimestamp
value as the time for animation frames - iOS. Improved performance on 120 hz devices
- Expanded
ModalBottomSheet
: scrim doesn't occupy complete screen - Fix interop view intercepting touches for popups
- Fix applying
WindowInsets
insidePopup
/Dialog
- Scrolling behavior bugs
OutlinedTextField
label is clipped- Black screens with
UIKitView
after navigating away and navigating back - Long text field overscroll effect not clipped correctly
- First screen is recomposed twice
- Bug with selection handle
- Ignore unpressed events during velocity calculation
- Crash with Asian languages in
TextField
Desktop
Features
- Improve accessibility support
Fixes
LocalLayoutDirection
isn't propagated intoDialogWindow
- CompositionLocals given in application scope are not take into account in window scope (such as
LocalLayoutDirection
) - Fix accessibility issue with actions in popups
- Apply custom Dialog's scrim blend mode only when window is transparent
- Can't type in
TextField
placed inModalBottomSheet
- Accessibility not reporting changes
- Crash "LayoutNode should be attached to an owner exception"
- Window loses its focus after recomposition of another window
- Report semantic
ProgressBarRangeInfo
changes for accessibility - Fix NPE for getComponentAfter/Before in ComposePanel
- Take into account
enabled
inscrollable
for mouse input - Improve accessibility on Windows
- Fix Chinese characters input when using JBR
Gradle Plugin
Features
Fixes
- Increase Kotlinx Serialization version used by the Compose Gradle Plugin
- Switch to notarytool for notarization
- Fix configuration cache for
syncComposeResourcesForIos
HTML library
Features
Web
Features
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.10-rc02 (October 2023)
Common
Features
Desktop
Fixes
- Fix NPE for getComponentAfter/Before in ComposePanel
- Take into account
enabled
inscrollable
for mouse input - Improve accessibility on Windows
- Fix Chinese characters input when using JBR
Web
Features
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.10-rc01 (October 2023)
Common
Features
Fixes
- Override
RootLayout
insets only in case ofusePlatformInsets
- Don't send synthetic Move events before Press/Release for touch
iOS
Fixes
- Scrolling behavior bugs
OutlinedTextField
label is clipped- Black screens with
UIKitView
after navigating away and navigating back - Long text field overscroll effect not clipped correctly
- First screen is recomposed twice
- Bug with selection handle
- Ignore unpressed events during velocity calculation
- Crash with Asian languages in
TextField
Desktop
Fixes
- Accessibility not reporting changes
- Crash "LayoutNode should be attached to an owner exception"
- Window loses its focus after recomposition of another window
- Report semantic
ProgressBarRangeInfo
changes for accessibility
Gradle Plugin
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.3 (October 2023)
Desktop
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.10-beta02 (September 2023)
Common
Features
- Support kotlin 1.9.20-Beta2 with basic K2 support
- Implement
defaultTimePickerLayoutType
based on screen orientation - Add an option to disable insets in
Popup
/Dialog
- Commonize insets
Modifier
's (additionally toWindowInsets.*
)
Fixes
iOS
Features
- Improve rendering performance
- Double tap and triple tap gesture handling in
TextField
s
Fixes
- Expanded
ModalBottomSheet
: scrim doesn't occupy complete screen - Fix interop view intercepting touches for popups
- Fix applying
WindowInsets
insidePopup
/Dialog
Desktop
Features
- Improve accessibility support
Fixes
Gradle Plugin
Features
Fixes
HTML library
Features
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.2 (September 2023)
Desktop
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.10-beta01 (September 2023)
Common
Features
- Support Kotlin 1.9.20-Beta
- Introduce Material 3 components in common
- Introduce Material component
ExposedDropDownMenu
in common - Introduce
WindowInfo.containerSize
experimental api
iOS
Breaking changes
Features
- Compilation speed up due to enabling compiler caches for Kotlin 1.9.20+
- Added crossfade animation during orientation change when used within UIKit hierarchy
- Compose Multiplatform should warn when
CADisableMinimumFrameDurationOnPhone
is not configured properly - Fast delete mode on software keyboard. When you hold a backspace, “turbo mode” is enabled after deleting the first 21 symbols. In turbo mode each tick deletes two words.
- On a long scrollable TextFields, If it’s scrolled up to caret position while typing. Then it stopped on the line above the line with a caret.
- Add
UIViewController
lifetime hooks - Implement iOS native feel scrolls for large text fields
Fixes
- Rendering synchronization of multiple
UIKitView
s within a screen - Today's date is not highlighted with a circle in the material3 datePicker on iOS
- Fix text-to-speech crash in iOS 16.0.*
- Compose window is shown before the first frame is rendered
- iOS TextField, Compound emojis are being treated as many symbols
- Use
CADisplayLink.targetTimestamp
value as the time for animation frames - iOS. Improved performance on 120 hz devices
Desktop
Fixes
LocalLayoutDirection
isn't propagated intoDialogWindow
- CompositionLocals given in application scope are not take into account in window scope (such as
LocalLayoutDirection
) - Fix accessibility issue with actions in popups
- Apply custom Dialog's scrim blend mode only when window is transparent
Gradle Plugin
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.1 (September 2023)
Common
Features
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.0 (August 2023)
This is a combined changelog from the prerelease versions:
Common
Features
Dialog
API is available to use from common source setPopup
API is available to use from common source setWindowInsets
API is available to use from common source set- A warning if
compose.kotlinCompilerPlugin
is set toandroidx.compose.compiler.compiler
androidx.compose.material.DropdownMenu
is available to use from common source setandroidx.compose.material3.DropdownMenu
is available to use from common source setandroidx.compose.material.AlertDialog
is available to use from common source setandroidx.compose.material3.AlertDialog
is available to use from common source set- Add
PopupProperties.clippingEnabled
setting - material3. Support
DatePicker
,DatePickerDialog
andTimePicker
Fixes
Popup
. Fix overridingpressOwner
on multitouch- Fix sending multiple touches in tests
- Fix multi-owner input processing
- Fix paragraph word boundary unicode handling
- Optimize the
Canvas
transformation functions - Fix click outside of common
Dialog
behaviour
API Changes
iOS
Features
- iOS native scroll and feel
- Simplify resource management (works without CocoaPods now)
TextField
keyboardOptions, capitalizationTextField
, keyboard behavior when have fullscreen size TextFieldTextField
, different behavior strategies on appearing the keyboard- Insets on iOS
- Support
Density.textSize
(Dynamic Type) - Change default fonts (San Francisco is the default font)
- UIKit public
LocalUIViewController
- Support singleLine and
KeyboardAction
Fixes
- Fix dynamic framework support
- Fix
TextField
context menu - Fix complex blending on iOS
ViewConfiguration.touchSlop
value is quite low on iOS- Fix
topLeftOffset
calculation on iOS in Split View Modifier.draggable
onDragStopped
not calledUIKitView
. Fix lifetime discrepancy within the composition- Support 120hz screens
- Fix incorrect Skiko render target on iOS Metal
- Properly detect content based text direction on native
- Implemented all low-level functions to avoid random crashes
- Fix memory leak in
ComposeUIViewController
- Manage Kotlin native cache kind automatically based on Kotlin version (
kotlin.native.cacheKind=none
is no longer needed) - Limit max
Dialog
andPopup
size by safe area on iOS TextField
, Korean characters are not normally enteredColorMatrix
value range for 5th column was incorrect on Skiko backed platformsisSystemDarkTheme
now automatically react to the system theme changes
API Changes
- Resource management was reimplemented. Follow the guide in the PR to support new feautures
CADisableMinimumFrameDurationOnPhone
added to the template'sInfo.plist
to support 120HzComposeUIViewController
. Dispose composition onviewDidDisappear
Desktop
Features
- Swing interop. Experimental off-screen rendering on graphics (hardware accelerated only on macOs at the moment)
- Swing interop.
ComposePanel
that can be disposed manually - Add semantic properties to
DialogWindow
,Popup
andDialog
- Use
Segoe UI
as sans serif font on Windows - Add ProGuard optimize flag
Fixes
- Fix loosing frames on macOs
- Scrolling
LazyColumn
via mouse wheel stops working Slider
can be moved using keyboard, but cannot be submitted- Make one pixel beyond the scrollbar thumb react correctly to clicks
VerticalScrollbar
doesn't work properly whenLazyColumn
existsStickyHeader
- All
Popup
overloads call dismiss onEsc
key by default - Fix Could not infer Java runtime version for Java home directory
- Usage of deprecated
forEachGesture
inScrollbar.desktop.kt
- Test framework fixes
- Implement idling resources for tests
- Implement
SemanticsNodeInteraction.captureToImage()
- Wait until compose is idle before returning from
DesktopTestOwner.getRoots()
- When the test main clock is advanced, call
ComposeScene.render
with the current test time - Add timestamps to batched test input events, and advance the test clock accordingly when sending them
- Tests support semanatic nodes inside
Window
andDialogWindow
API Changes
Web
Features
- Let
ComposeWindow
accept a custom canvas id (html canvas element id) - Support
Scrollbar
- Make
CanvasBasedWindow
apply default styles, set title
Fixes
- Workaround
ComposeWindow
multiple event listeners on resize - Fix
Modifier.pointerHoverIcon
for browser apps - Fux
RoundedCornerShape
with zero corners - Fix
ScrollConfig
in web target - Implemented low-level functions to avoid random crashes:
HTML library
Features
Gradle Plugin
Features
API Changes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.0-beta02 (August 2023)
Common
Features
androidx.compose.material.DropdownMenu
is available to use from common source setandroidx.compose.material3.DropdownMenu
is available to use from common source setandroidx.compose.material.AlertDialog
is available to use from common source setandroidx.compose.material3.AlertDialog
is available to use from common source set- Add
PopupProperties.clippingEnabled
setting - material3. Support
DatePicker
,DatePickerDialog
andTimePicker
API Changes
iOS
Features
Fixes
- Fix memory leak in
ComposeUIViewController
- Manage Kotlin native cache kind automatically based on Kotlin version (
kotlin.native.cacheKind=none
is no longer needed) - Limit max
Dialog
andPopup
size by safe area on iOS TextField
, Korean characters are not normally enteredColorMatrix
value range for 5th column was incorrect on Skiko backed platformsisSystemDarkTheme
now automatically react to the system theme changes
API Changes
Web
Features
Gradle Plugin
Features
API Changes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.5.0-beta01 (July 2023)
Common
Features
Dialog
API is available to use from common source setPopup
API is available to use from common source setWindowInsets
API is available to use from common source set- A warning if
compose.kotlinCompilerPlugin
is set toandroidx.compose.compiler.compiler
Fixes
Popup
. Fix overridingpressOwner
on multitouch- Fix sending multiple touches in tests
- Fix multi-owner input processing
- Fix paragraph word boundary unicode handling
- Optimize the
Canvas
transformation functions - Fix click outside of common
Dialog
behaviour
iOS
Features
- iOS native scroll and feel
- Simplify resource management (works without CocoaPods now)
TextField
keyboardOptions, capitalizationTextField
, keyboard behavior when have fullscreen size TextFieldTextField
, different behavior strategies on appearing the keyboard- Insets on iOS
- Support
Density.textSize
(Dynamic Type) - Change default fonts (San Francisco is the default font)
- UIKit public
LocalUIViewController
Fixes
- Fix dynamic framework support
- Fix
TextField
context menu - Fix complex blending on iOS
ViewConfiguration.touchSlop
value is quite low on iOS- Fix
topLeftOffset
calculation on iOS in Split View Modifier.draggable
onDragStopped
not calledUIKitView
. Fix lifetime discrepancy within the composition- Support 120hz screens
- Fix incorrect Skiko render target on iOS Metal
- Properly detect content based text direction on native
- Implemented all low-level functions to avoid random crashes
API Changes
- Resource management was reimplemented. Follow the guide in the PR to support new features
CADisableMinimumFrameDurationOnPhone
added to the template'sInfo.plist
to support 120Hz
Desktop
Features
- Swing interop. Experimental off-screen rendering on graphics (hardware accelerated only on macOs at the moment)
- Swing interop.
ComposePanel
that can be disposed manually - Add semantic properties to
DialogWindow
,Popup
andDialog
- Use
Segoe UI
as sans serif font on Windows - Add ProGuard optimize flag
Fixes
- Fix loosing frames on macOs
- Scrolling
LazyColumn
via mouse wheel stops working Slider
can be moved using keyboard, but cannot be submitted- Make one pixel beyond the scrollbar thumb react correctly to clicks
VerticalScrollbar
doesn't work properly whenLazyColumn
existsStickyHeader
- All
Popup
overloads call dismiss onEsc
key by default - Fix Could not infer Java runtime version for Java home directory
- Usage of deprecated
forEachGesture
inScrollbar.desktop.kt
- Test framework fixes
- Implement idling resources for tests
- Implement
SemanticsNodeInteraction.captureToImage()
- Wait until compose is idle before returning from
DesktopTestOwner.getRoots()
- When the test main clock is advanced, call
ComposeScene.render
with the current test time - Add timestamps to batched test input events, and advance the test clock accordingly when sending them
- Tests support semanatic nodes inside
Window
andDialogWindow
API Changes
Web
Features
Fixes
- Workaround
ComposeWindow
multiple event listeners on resize - Fix
Modifier.pointerHoverIcon
for browser apps - Fux
RoundedCornerShape
with zero corners - Fix
ScrollConfig
in web target - Implemented low-level functions to avoid random crashes:
HTML library
Features
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
- Compiler 1.5.0
- Runtime 1.5.0-beta03
- UI 1.5.0-beta03
- Foundation 1.5.0-beta03
- Material 1.5.0-beta03
- Material3 1.1.1
1.4.3 (July 2023)
Common
Features
- Support Kotlin 1.8.21, 1.8.22, 1.9.0
iOS
Fixes
- Using Indication as a parameter in extension function doesn't compile on iOS
- Compile error when using delegated property with @Composable getters in objects
- Using a public property extensions inside a class or object with a @Composable backing delegate fails to link for iOS targets
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.4.1 (June 2023)
Common
Fixes
- Fix perspective transform usage
- After each ComposeScene.render phase, send apply notifications and perform the corresponding changes
- Fix awaitDragStartOnSlop to detect slop-passing on both axes
Desktop
Fixes
- Fix
DesktopDropdownMenuPositionProvider
to align with the correct horizontal side of the window - Propagate LocalLayoutDirection into PopupLayout
- Fix missing scrolling events
- Make popups accessible on desktop
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.4.0 (April 2023)
Common
Features
- Support perspective projection and
cameraDistance
parameter ingraphicsLayer
- Support
brush
parameter inTextStyle
for complex coloring - Support
drawStyle
parameter inTextStyle
for drawing outlined text - Support
blendMode
parameter when drawing text on Canvas - Support compositing strategy on
graphicsLayer
- Add
minLines
parameter toBasicTextField
- Support
painterResource
function in common source set
Fixes
- Actually remember provider in
rememberComponentRectPositionProvider
- Fix merging multiple selection areas inside
SelectionContainer
- Fix crash on selecting text if layout result is invalid
- Fix error on call an
expect
/actual
function with default arguments and a Composable argument
iOS
Desktop
Features
- Support external drag and drop
- Animate scroll initiated by mouse wheel input
- Remove AWT dependency in
rememberCursorPositionProvider
- Major scrollbar overhaul
- Scrollbar now works correctly in lazy lists when items vary in size
- Scrollbar now works correctly with lazy list
contentPadding
- Scrollbar now works correctly in lazy list with spacing between items
- Scrollbar now works correctly if the size of the scrollbar doesn't match the size of the widget it scrolls
- Pressing the scrollbar track now works correctly
- Added scrollbar support for lazy grids and text fields
Fixes
- Fix using a custom shape for an
AlertDialog
- Fix
AlertDialog
width to match the maximum of its content - Change
ContextMenuArea
to emit a single element, rather than two elements - Use state hoisting instead of global mouse position to determine where context menus, dropdown menus and tooltips should be displayed
- Limit error dialog width in case of long error message
- Fix window flashing background with unspecified size
- Fix crash
SplitPane
with a modifier - Fix applying
ComposePanel
visibility
Web
Compose for Web
is renamed toCompose HTML Library
- The new experimental
Compose for Web
based on Kotlin/Wasm is available
Tools
Features
Fixes
API Changes
- Remove deprecated
SkiaRootForTest.processPointerInput
- Remove deprecated
PointerEvent.awtEvent
,KeyEvent.awtEvent
- Make accidentally exposed to public
ParagraphLayouter
classinternal
as designed androidx.compose.foundation.v2.ScrollbarAdapter
is introduced in order to allow scrollbars of a size different from the scrolled widget
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.3.1 (March 2023)
Common
- Added support for Kotlin 1.8.10
Fixes
Desktop
Fixes
- Korean text input
- Size UndecoratedWindowResizer to the size of the window
- Fix sizing a window with unspecified size to its content's size
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.3.0 (January 2023)
Common
Fixes
- Fix configuration cache issues
- Use global directory to download wix toolset
- IDEA plugin - Redo: set until-build to undefined value
Desktop
Features
Fixes
- Fix San Francisco font as a default (macOS)
- Make ScrollbarAdapter for LazyList take contentPadding into account
- Fix AlertDialog dismiss on click to Dialog content
- Fix shaky scrolling of LazyColumn when the items are of varying size
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.2.2 (December 2022)
Desktop
Features
Fixes
- Fix Performance degradation after some time if there are animations on the screen
- Fix SwingPanel throws NPE on focus request if nothing focusable
- Fix jvmTarget value specified using jvmToolchain is ignored and overwritten with "1.8"
- Fix Trying to delete a word via Ctrl+Backspace in an empty TextField causes an exception
Web
Fixes
- Fix Compose Web 1.2.1 regression: unexpected recompositions
- Fix Wrong instance remembered when several remember calls in one scope
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.2.1 (November 2022)
Common
Fixes
- Fix
kotlinCompilerPlugin
property - Fix runDistributable fails in v1.2.0-beta01
- Fix Packaging fails on JDK-19
Desktop
Fixes
- Fix
duplicate definition of resource file
when running packageRelease - Fix support of GPU's which don't support DirectX 12 (Windows)
Web
Fixes
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.2.0 (October 2022)
Common
Features
- Allow to use Compose on multiple Kotlin versions
import org.jetbrains.compose.compose
is no longer needed in build.gradle.kts- Allow to use a custom Compose Compiler
Desktop
Features
- Support Kotlin 1.7.20
- ProGuard integration for packaging
- New experimental event API (onClick, onDrag, WindowInfo.keyboardModifiers)
- Focus
- Ability to override text context menu globally
- Context menu implementation for integrating into Swing applications
- Animated image component
- Show a new window/dialog on the same display
- Change default Font on MacOs to San Francisco
- Support performKeyInput, performMouseInput, performTextInput in tests.
- Focus switches seamlessly between Swing and Compose components using SwingPanel or ComposePanel
- Documentation for how to package apps using Conveyor
Fixes
- Fix IDEA plugin compatibility
- Fixes for Right-to-Left languages support
- LayoutDirection is detected from the system settings
- Fix RTL selection in a multiline text
- Fix cursor visual position at BiDi transition
- Fix the cursor position after the '\n' character in RTL
- In placeAutoMirrored for RTL, calculate the placement position using the placeable width respecting the constraints
- Placing the root content properly for RTL layout
- TextField
- Fix DesktopMenu and DesktopAlertDialog to invoke dismiss callback once
- Fix a large icon in macOs menu
- Fix hover in LazyColumn
- Fix pointerHoverIcon: update icon when it's changed conditionally
- Fix focusable parameter for Window and Dialog
- Fix 2 SplitPanel minor bugs
- Fix
java.lang.IllegalStateException: cannot open system clipboard
crash - Fix
System.setProperty("skiko.renderApi", "SOFTWARE"
on macOS
API changes
- Deprecate experimental pointerMoveFilter in favor of onPointerEvent
- Deprecate experimental Modifier.mouseClickable in favor of Modifier.onClick
Web
Features
- Support Kotlin 1.7.10
- Add support for transition in CSS api
- Add missing
background-blend-mode
property - SVG: Publish custom attr functions
- Add list overload for
classes
- Add support of dl, dt and dd
Fixes
API changes
- Deprecate 3 overloads of StyleScope.borderWidth with wrong parameter names
- Remove deprecated compose.web.web-widgets from the source code
- Remove unnecessary parameter for
required
attribute
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.1.1 (Mar 2022)
Desktop
Fixes
API changes
If you use Dispatchers.Swing
or Dispatchers.Main
in your code, add this dependency into build.gradle.kts
:
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-swing:$coroutinesVersion")
}
Also, usage of Dispatchers.Swing
or Dispatchers.Main
inside internals of Compose is implementation details, and can be changed in the future. If you need to avoid race conditions with Compose UI, you can obtain appropriate coroutine scope via rememberCoroutineScope
:
import androidx.compose.runtime.DisposableEffect
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.window.application
@OptIn(ExperimentalComposeUiApi::class, androidx.compose.foundation.ExperimentalFoundationApi::class)
fun main() = application {
val scope = rememberCoroutineScope()
val someApplicationObject = remember(scope) { SomeApplicationObject(scope) }
DisposableEffect(Unit) {
SomeGlobalObject.init(scope)
onDispose { }
}
}
1.1.0 (Feb 2022)
Desktop
Features
- Implement experimental accessibility support for Windows
- Implement accessibility focus tracking by Tab
- All bugfixes/features between Jetpack Compose 1.1.0-beta02 and 1.1.0 (see the release notes for each module here)
Fixes
- Fixes for TextField (1, 2, 3, 4)
- Fix exception when we initialize a window with visible = false, undecorated = true
- Fix crash in ImageComposeScene
- Fixes for situations, when hover state doesn't disappear during scrolling
- Fixes for Slider/Scrollbar dragging (1, 2)
- Fixed a case where [event.modifiersEx] does not provide info about the pressed mouse button (AWT)
- Fix TextField crashes after selecting the text and then deactivating the text field
- Fix consuming events by mouse clickable
- Hide top-level dialog from the taskbar
API changes
- The first frame of the window draws offscreen now. If your application has too long start, measure your first frame, and move the heavy logic to background or to the next frames. You can measure the first frame with this snippet:
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.ui.window.singleWindowApplication
private var time by mutableStateOf(System.nanoTime())
private var frame by mutableStateOf(0)
fun main() = singleWindowApplication {
if (frame == 0) {
frame++
} else if (frame == 1) {
val duration = ((System.nanoTime() - time) / 1E6).toLong()
println("First frame millis: $duration")
}
}
PointerEvent.awtEvent
,KeyEvent.awtEvent
are deprecated, usePointerEvent.awtEventOrNull
,KeyEvent.awtEventOrNull
instead. The event can be null, if it isn't sent by AWT (for example, Compose can send synthetic Move events on relayout)
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
1.0.1 (Dec 2021)
This is basically 1.0.0 that works with Kotlin 1.6.10
1.0.0 (Dec 2021)
Desktop
Features
- Experimental support for material3
- All clickable components are focusable and react to Enter key
- All clickable/draggable components no longer react to right clicks by default
- Show the default error dialog when an error occurs
- ContextMenu, AlertDialog, DropdownMenu close on Esc key by default
- Application by default calls exitProcess after its Composable is disposed
API changes
- Introduced experimental onPointerEvent (will replace mouseScrollFilter/pointerMoveFilter in the future)
- Introduced PointerEventType.Scroll, which can be used in common code
- MouseEvent.mouseEvent and KeyEvent.nativeKeyEvent are replaced by MouseEvent.awtEvent and KeyEvent.awtEvent
- Experimental overload for loading resources painterResource(String, ResourceLoader)
Web
API changes
- compose.web.widgets is deprecated
- All CSSSelectors can't be instantiated via constructor now (they're private). Please use functions provided in SelectorsScope instead
- Some functions were made internal (either not related to compose-web or not intended for usage in apps): buildCSS , StylePropertyList.nativeEquals , variableValue , buildCSSStyleRule , buildKeyframes , jsObject , CSSKeyframesRule.appendRule
- CSSMediaRule: functions feature and combine were made extensions functions on GenericStyleSheetBuilder. This makes them consistent with the rest of functions which create CSSMediaQuery.MediaFeature instances
Dependencies
This version of Compose Multiplatform is based on the next Jetpack Compose libraries:
- Compiler 1.1.0-beta02
- Runtime 1.1.0-beta02
- UI 1.1.0-beta02
- Foundation 1.1.0-beta02
- Material 1.1.0-beta02
- Material3 1.0.0-alpha03
1.0.0-beta (Oct 2021)
Common
- no Android artifacts are published anymore. Google-published artifacts are referenced instead. This approach eliminates compatibility issues.
Desktop
Features
- Accessibility support on MacOS
- Smart rendering fallback logic (no crashes on bad hardware/drivers anymore)
- Performance improvement of software rendering (up to 100%)
- Transparent window support
clickable
andtoggleable
components have a hoverable indication
API changes
- DesktopMaterialTheme is deprecated, use MaterialTheme instead
- WindowSize is deprecated, use DpSize instead
- Modifier.pointerMoveFilter marked as Experimental, stable alternatives are Modifier.hoverable or Modifier.pointerInput
- Modifier.mouseScrollFilter marked as Experimental, this API will likely change in the future
API breaking changes
- Old Window API (AppWindow, AppManager) was removed
- Modifier.pointerIcon is replaced with Modifier.pointerHoverIcon
- Tray can be used only inside ApplicationScope now
- Tray(hint=) replaced with Tray(tooltip=)
Web
Features
- SVG support
API changes
- Controlled Inputs were added
- New API for testing - test-utils was added
1.0.0-alpha (Aug 2021)
Common
- Desktop, Web, and Android artifacts publish at the same time with the same version
Desktop
Features
- Context menu support in selectable text
- Cursor change behavior in text and pointer icon API
- Mouse Clickable modifier
- Tab navigation between text fields by default
- Resource packing to native distribution
- Support @Preview annotation in desktopMain sourceSet's (when the Compose MPP plugin is installed in IDEA)
- New features for Composable menu (icons, shortcuts, mnemonics, radiob buttons, checkboxes
- Adaptive window size
- Support Linux on ARM64
- Support hidpi on some Linux distros
- Support resizing of undecorated resizable windows (
Window(undecorated=true, resizable=true, ...)
)
API changes
- new Window API is no longer experimental
- old Window API is deprecated
- classes from
android.compose.desktop.*
moved toandroidx.compose.ui.awt.*
(ComposeWindow, ComposePanel, etc) svgResource
/vectorXmlResource
/imageResource
replaced by painterResource
API breaking changes
- Window level keyboard API for the old Window API removed
- Window(icon: BufferedImage) replaced by Window(icon: Painter)
- ContextMenu renamed to CursorDropdownMenu
Web
API changes
- classes behave cumulatively
- removed content builder for empty elements
- Introduce CSS arithmetic operations
- Improved the types of Inputs and input events
- CSS Animations
- All event types expose native properties
- Added a complete list of HTML color aliases
- Introduce support for CSS Grid API
- Deprecate Color.RGB, Color.HSL etc. functions in favor of top-level rgb, hsl an so on
- negate CSSNumeric value directly
API breaking changes
- boolean like attributes don't have any parameters anymore
- removed input type specific event listeners
- replaced maxWidth/minWidth media queries with prefixed names
- Remove CSSVariables context and introduce specialized methods for adding String- and Number-valued CSS variables
- inline style builder was moved into AttributeBuilder scope
M4 (Jun 2021)
- New experimental Composable Window API
- Tooltips
- Use Metal renderer for macOS by default
- Expose a swing mouse event in Modifier.pointerInput
- Improved keyboard support in TextField
- Avoid forcing discrete GPU on multi-GPU MacOS machines in Skiko and native distributions
- Make DropdownMenu focusable by default
- Scrollbar. get rid of itemCount and averageItemSize from rememberScrollbarAdapte
- Support scrollbars for LazyColumn with reverseLayout = true
- Fix memory leak
- Fix Scroll NaN rounding bug, desktop version
- Fix Dragging prevents pointer move events
- Fix Dragging window to another display makes Icon show up incorrectly
- Fix "Padding must be non-negative" after resizing window with Slider and Box
- Breaking change old Dialog/Menubar/Tray are moved to androidx.compose.ui.window.v1
M3 (Feb 2021)
- Improve TextField
- Support SVG
- Support vsync, sync composition with rendering frames
- Support DirectX on Windows by default
- Support software rendering fallback
- Implement signing and notarization for macOS
- Improve Swing interoperability support Swing component in Compose hierarchy
- Support using Compose in IntelliJ plugins
- Skiko native binaries are now signed on macOS (x64 and arm)
- Fix Ambients are not transferred across pop ups
- Fix Laggy UI on Linux
- Fix Using AndroidX Compose specific dependencies for Android target
M2 (Dec 2020)
- Swing interoperability support (Compose in Swing frame)
- Support XML vector images
- Support for Gradle 6.6 and 6.7
- Support macOS 10.13 and 10.14
- Support Apple Silicon (arm64) natively
- Support letter spacing in text
- Implemented desktop "ActualDialog" and "ActualPopup"
- Fix input method bar positioning
- Fix text alignment
- Fix dropdown/popup positioning
- Fix using with Compose in same app as Java FX
- Added screenshots of example apps
M1 (Nov 2020)
- Initial release