You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

129 KiB

1.6.2 (April 2024)

Changes since 1.6.1

Features

Common

Fixes

iOS, Desktop, Web

iOS

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.6.1 (March 2024)

Changes since 1.6.0

Features

Common

Fixes

iOS, Desktop, Web

iOS

Web

Desktop

Resources

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

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

iOS, Desktop, Web

iOS

Web

Desktop

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 by painterResource(Res.drawable.resource)
  • google() maven repository is now required. Add this to build.gradle.kts:
    repositories {
        ...
        google()
    }
    
    If the project doesn't have it, there will be an error Could not find androidx.annotation:annotation:... or Could not find org.jetbrains.compose.collection-internal:collection.
  • Text with lineHeight set is trimmed by default
  • Text with fontSize set without lineHeight inside MaterialTheme has different line height

iOS/Desktop/Web

iOS

  • Separate platform views for Popups/Dialogs 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 the platformLayers parameter to false:
    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

Desktop

Web

HTML library

Gradle Plugin

Fixes

iOS/Desktop/Web

iOS

Desktop

Web

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:

See the announce of Material 1.2.

1.6.0-rc03 (February 2024)

Changes since 1.6.0-rc02

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

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

iOS

Fixes

Desktop

Fixes

Web

Fixes

Gradle Plugin

Fixes

Resource library

Fixes

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

iOS/desktop/web

Fixes

iOS

Features

Fixes

Desktop

Fixes

Breaking changes and deprecated API

HTML library

Features

Gradle Plugin

Features

Resource library

Fixes

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

Breaking changes

Known issues

  • compose.components.resources library doesn't work yet if you apply kotlin("jvm") Gradle plugin. For now, it only works with kotlin("multiplatform")

Common

Features

iOS/desktop/web

Features

Fixes

Breaking changes and deprecated API

iOS

Features

Fixes

Desktop

Features

Fixes

Web

Features

Fixes

HTML library

Features

Gradle Plugin

Features

Fixes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.5.11 (November 2023)

Common

Features

iOS

Fixes

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

Fixes

iOS

Breaking changes

Features

Fixes

Desktop

Features

Fixes

Gradle Plugin

Features

Fixes

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

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

iOS

Fixes

Desktop

Fixes

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

Fixes

iOS

Features

Fixes

Desktop

Features

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

iOS

Breaking changes

Features

Fixes

Desktop

Fixes

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

Fixes

API Changes

iOS

Features

Fixes

API Changes

Desktop

Features

Fixes

API Changes

Web

Features

Fixes

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

API Changes

iOS

Features

Fixes

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

Fixes

iOS

Features

Fixes

API Changes

Desktop

Features

Fixes

API Changes

Web

Features

Fixes

HTML library

Features

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.4.3 (July 2023)

Common

Features

  • Support Kotlin 1.8.21, 1.8.22, 1.9.0

iOS

Fixes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.4.1 (June 2023)

Common

Fixes

Desktop

Fixes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.4.0 (April 2023)

Common

Features

Fixes

iOS

iOS support is in Alpha now

Desktop

Features

Fixes

Web

Tools

Features

Fixes

API Changes

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

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:


1.3.0 (January 2023)

Common

Fixes

Desktop

Features

Fixes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.2.2 (December 2022)

Desktop

Features

Fixes

Web

Fixes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.2.1 (November 2022)

Common

Fixes

Desktop

Fixes

Web

Fixes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

1.2.0 (October 2022)

Common

Features

Desktop

Features

Fixes

API changes

Web

Features

Fixes

API changes

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

Fixes

API changes

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")
    }
}

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

API changes

Web

API changes

Dependencies

This version of Compose Multiplatform is based on the next Jetpack Compose libraries:

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 and toggleable 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

API changes

  • new Window API is no longer experimental
  • old Window API is deprecated
  • classes from android.compose.desktop.* moved to androidx.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

API breaking changes

M4 (Jun 2021)

M3 (Feb 2021)

M2 (Dec 2020)

M1 (Nov 2020)

  • Initial release