After decoupling Material3 from Compose, we need to pass their versions
separately
[CI
fix](df83b9cf9a)
## Testing
```
./check.sh
./check.sh -Dcompose.version=1.9.0-alpha02
./check.sh -Dcompose.version=1.9.0-alpha01 -Dcompose.material3.version=1.9.0-alpha03
```
## Release Notes
N/A
Fixes
https://youtrack.jetbrains.com/issue/CMP-8268/Decouple-material3-versioning-from-Compose
## Release Notes
### Migration Notes - Multiple Platforms
- Material3 versioning is decoupled for the CMP 1.9.0 release due the
upstream Jetpack Compose Material3 1.4 has not been released as stable
yet
- `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:
```
implementation("org.jetbrains.compose.material3:material3:1.9.0-alpha04")
```
Fixes
```
java.util.zip.ZipException: duplicate entry: org/jetbrains/compose/material/material-navigation/1.9.0-alpha03/material-navigation-1.9.0-alpha03.module.sha512
16:53:22 at org.jetbrains.compose.internal.publishing.UploadToSonatypeTask.createDeploymentBundle(UploadToSonatypeTask.kt:90)
```
It happened because we pass
`-Pmaven.central.coordinates=org.jetbrains.compose*:*:1.9.0-alpha03,org.jetbrains.compose.material:material-navigation*:1.9.0-alpha03`
which points to intersected artifacts. When we add
`org.jetbrains.compose.material:material-navigation*` into the bundle,
we already added it by `org.jetbrains.compose*:*`. This is [a known
issue](https://youtrack.jetbrains.com/issue/CMP-8504/Maven-Central-uploading.-Intersection-of-version-groups)
## Testing
```
./gradlew -p=cli reuploadArtifactsToMavenCentral --info --stacktrace -Pmaven.central.sign=true -Pmaven.central.coordinates=org.jetbrains.compose*:*:1.9.0-alpha03,org.jetbrains.compose.material:material-navigation*:1.9.0-alpha03,org.jetbrains.compose.material3.adaptive:*:1.2.0-alpha03,org.jetbrains.androidx.graphics:graphics-shape*:1.0.0-alpha09,org.jetbrains.androidx.window:*:1.4.0-alpha08 -Pmaven.central.deployName="Compose 1.9.0-alpha03 and associated libs" --rerun-tasks
```
with disabled signing and uploading to Maven no longer produces the
error
## Release Notes
N/A
- new API requires creating a zip
- API code is copied and adapted from
[compose-hot-reload](799b90b76f/buildSrc/src/main/kotlin/PublishToMavenCentralTask.kt (L39))
- [CI change](https://jetbrains.team/p/ui/reviews/31/timeline)
## Testing
1. Configure Maven Space Token in
https://public.jetbrains.space/p/compose/edit/applications, write it in
cli/build.gradle.kts
2. Use Maven Central token, write it in cli/gradle.properties
3.
```
..\gradlew reuploadArtifactsToMavenCentral --info --stacktrace -Pmaven.central.coordinates=org.jetbrains.compose*:*:1.8.0,org.jetbrains.compose.material:material-navigation*:2.9.0-beta02,org.jetbrains.compose.material3.adaptive:*:1.1.0 -Pmaven.central.deployName="Compose1.8.0 and associated libs" --rerun-tasks
..\gradlew reuploadArtifactsToMavenCentral --info --stacktrace -Pmaven.central.coordinates=org.jetbrains.skiko*:*:0.9.16 -Pmaven.central.deployName="Skiko 0.9.16" --rerun-tasks
```
downloads packages from Space, creates a zip, and uploads as a new
(non-published) deployment.
With failed state, because signing was disabled:
<img width="305" alt="image"
src="https://github.com/user-attachments/assets/0a32e185-e43b-4783-9145-84aba64d41c0"
/>
I will check on a valid uploading on Skiko after the merge
## Release Notes
N/A
When the 1.8.2 release was prepared, the release notes from
https://github.com/JetBrains/compose-multiplatform/pull/5323 were
malformed by stripping empty lines:
```
- 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](https://github.com/JetBrains/compose-multiplatform/pull/5323)
Example usage:
\\\
import androidx.compose.runtime.Composable
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.jetbrains.compose.ui.tooling.preview.PreviewParameter
import org.jetbrains.compose.ui.tooling.preview.PreviewParameterProvider
class MyPreviewParameterProvider : PreviewParameterProvider<String> {
override val values = sequenceOf("Hello, Compose!", "Hello, World!")
}
/**
* This function will generate two preview images with different texts
*/
@Preview@Composable
fun MyPreview(@PreviewParameter(MyPreviewParameterProvider::class) text: String) {
Text(text)
}
\\\
```
The correct release notes are:
```
- 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](https://github.com/JetBrains/compose-multiplatform/pull/5323)
Example usage:
\\\
import androidx.compose.runtime.Composable
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.jetbrains.compose.ui.tooling.preview.PreviewParameter
import org.jetbrains.compose.ui.tooling.preview.PreviewParameterProvider
class MyPreviewParameterProvider : PreviewParameterProvider<String> {
override val values = sequenceOf("Hello, Compose!", "Hello, World!")
}
/**
* This function will generate two preview images with different texts.
*/
@Preview@Composable
fun MyPreview(@PreviewParameter(MyPreviewParameterProvider::class) text: String) {
Text(text)
}
\\\
```
To fix this issue, the parsing is changed. Previously `ChangelogEntry`
represented a single line, even if it is part of a single change. Now it
represents the change as a whole.
## Testing
These commands give the same result, with the exception that multiline
release notes are handled correctly now:
```
kotlin changelog.main.kts v1.8.1..v1.9.0-alpha02
kotlin changelog.main.kts v1.8.1..v1.8.2
kotlin changelog.main.kts v1.8.0..v1.8.1
kotlin changelog.main.kts v1.8.0-beta02..v1.8.0-rc01
```
## Release Notes
N/A
Describe proposed changes and the issue being fixed
Fixes
[CMP-8134](https://youtrack.jetbrains.com/issue/CMP-8134/Switch-the-ClassLoader-used-by-ResourceReader)
## Testing
- [x] Add Test to **desktopTest** SourceSet
- (Optional) This should be tested by QA
## Release Notes
### Features - Resources
- Added `JvmResourceReader` API and made `LocalResourceReader` public to
allow providing a custom classloader for desktop target
instead of relying on maven publications for compose compiler test runs,
rely on kotlin builds via "artifact" dependency
artifacts from those kotlin builds should be placed in maven local (done
on teamcity config side)
## Release Notes
N/A
Exposed the following Preview annotation parameters:
- name
- group
- widthDp
- heightDp
- locale
- showBackground
- backgroundColor
## Testing
Tested the local artifact in IJ: new parameters are exposed and picked
up. No additional changes on the IDE end are required.
But this should be tested by QA, of course.
## Release Notes
### Features - Multiple Platforms
- Extended the `@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
for `androidx` Preview annotations.
Fixes https://youtrack.jetbrains.com/issue/CMP-8425
## Testing
Updated the relevant test
## Release Notes
### Highlights - Web
- Setting `org.jetbrains.compose.experimental.jscanvas.enabled=true` is
not required anymore when having a kotlin/js target
Problem is the new AGP androidLibrary target has `platformType ==
KotlinPlatformType.jvm` as well.
Fixes https://youtrack.jetbrains.com/issue/CMP-8325
## Testing
Unit tests
## Release Notes
N/A
This is required for the preview parameters to be correctly picked up by
the preview adapter in IDE, which expects the provider to be a subclass
of AndroidX's interface, and fails with the `ClassCastException`
otherwise.
## Release Notes
### Fixes - Multiple Platforms
- 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.
Example usage:
```
import androidx.compose.runtime.Composable
import org.jetbrains.compose.ui.tooling.preview.Preview
import org.jetbrains.compose.ui.tooling.preview.PreviewParameter
import org.jetbrains.compose.ui.tooling.preview.PreviewParameterProvider
class MyPreviewParameterProvider : PreviewParameterProvider<String> {
override val values = sequenceOf("Hello, Compose!", "Hello, World!")
}
/**
* This function will generate two preview images with different texts.
*/
@Preview@Composable
fun MyPreview(@PreviewParameter(MyPreviewParameterProvider::class) text: String) {
Text(text)
}
```
Fixes
https://youtrack.jetbrains.com/issue/CMP-8192/Changelog-script.-Handle-multi-cherry-pick-PRs-into-a-release
Now there is a special format for Release Notes, not for the PR.
Example: https://github.com/JetBrains/compose-multiplatform/pull/5312
- There was an old non-structured way determined it by "Cherry-picked
from ...", it is removed, as it is less convenient (we still need to
define Release Notes)
- We can determine cherry-picks automatically by git, but not always (in
case of conflicts or additional fixes). Because of this, now it is a
requirement either to describe the release notes the usual way or add
links to the original PRs.
## Testing
```
kotlin changelog.main.kts v1.7.3..v1.8.0
kotlin changelog.main.kts v1.8.0..v1.8.1+dev2468
```
Doesn't change old entries, and include new ones
## Release Notes
N/A
---------
Co-authored-by: Victor Kropp <victor.kropp@jetbrains.com>
After https://github.com/JetBrains/compose-multiplatform-core/pull/2097
is merged, CI fails with:
```
Warning: com.jetbrains.JBR: can't find referenced method 'java.lang.Object invokeExact(java.lang.Class,java.lang.Class,java.lang.Class,java.lang.Class,java.util.Map,java.util.function.Function)' in library class java.lang.invoke.MethodHandle
Warning: com.jetbrains.JBR: can't find referenced method 'java.lang.Object invokeExact(java.lang.invoke.MethodHandles$Lookup)' in library class java.lang.invoke.MethodHandle
<============-> 96% EXECUTING [3s] Warning: there were 2 unresolved references to library class members.aseJars
You probably need to update the library versions.-crash-in-the-field
(https://www.guardsquare.com/proguard/manual/troubleshooting#unresolvedlibraryclassmember)
Unexpected error
java.io.IOException: Please correct the above warnings first.
```
During Gradle tests.
## Testing
Tests for Gradle plugin pass
## Release Notes
### Fixes - Desktop
N/A
When users use `androidx.navigation`, they see `@Serialization`
annotation they can use, without explictly adding
`kotlinx.serialization`. They see, because it is added as an `api`
dependency.
The Compose Gradle plugin on the other hand provide `./gradlew
runRelease` task that uses ProGuard to minify binaries. Because the
plugin should support not only Compose, but also all support libraries
(androidx, components), we should bundle serialization ProGuard rules
into it.
Fixes https://youtrack.jetbrains.com/issue/CMP-8050
## Testing
```
import androidx.compose.ui.window.singleWindowApplication
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
fun main() = singleWindowApplication {
NavHost(
navController = rememberNavController(),
startDestination = LoginRoute()
) {
composable<LoginRoute> {}
}
}
sealed interface Route
@kotlinx.serialization.Serializable
data class LoginRoute(val id: Long? = null) : Route
```
Doesn't crash when run `./gradlew runRelease`
## Release Notes
### Fixes - Desktop
- Fix "Serializer for class is not found" using `androidx.navigation`
and running `./gradlew runRelease`
- `kotlinx.serialization` ProGuard rules are bundled in the Compose
Gradle plugin
This PR only updates Compose and Kotlin versions.
I'm going to follow it up with further updates addressing various
warnings.
## Testing
`./validateExamples.sh`, `./validateExamplesIos.sh`, and
`./validateExamplesWithJs.sh`
## Release Notes
N/A
- identify cherry-picks
- via "git log --cherry-pick" (we have to clone repos for that)
- in case it doesn't work, additionally identified via "cherry-picked
from" in PR descriptions
- fix multiline changes formatting
- exclude prerelease fixes
## Release Notes
N/A
---------
Co-authored-by: Victor Kropp <victor.kropp@jetbrains.com>
Updated the test to use a more relevant project setup and refined checks
for resource handling. Improved validation by verifying resource files
in the generated JAR.
## Release Notes
N/A