The issue was because we cache the value in the current composition, and the next composition returns the cached value.
There weren't an issue if we just call one `stringResource` after another because those are different compositions.
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4325
It fails with:
```
Configuration `:jvmRuntimeClasspath` contains AndroidX dependencies, but the `android.useAndroidX` property is not enabled, which may cause runtime issues.
:jvmRuntimeClasspath -> org.jetbrains.compose.desktop:desktop-jvm-linux-x64:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop-jvm:0.0.0-dev1418 -> org.jetbrains.compose.material:material:0.0.0-dev1418 -> org.jetbrains.compose.material:material-desktop:0.0.0-dev1418 -> org.jetbrains.compose.annotation-internal:annotation:0.0.0-dev1418 -> androidx.annotation:annotation:1.7.1
:jvmRuntimeClasspath -> org.jetbrains.compose.desktop:desktop-jvm-linux-x64:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop-jvm:0.0.0-dev1418 -> org.jetbrains.compose.material:material:0.0.0-dev1418 -> org.jetbrains.compose.material:material-desktop:0.0.0-dev1418 -> org.jetbrains.compose.annotation-internal:annotation:0.0.0-dev1418 -> androidx.annotation:annotation:1.7.1 -> androidx.annotation:annotation-jvm:1.7.1
:jvmRuntimeClasspath -> org.jetbrains.compose.desktop:desktop-jvm-linux-x64:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop-jvm:0.0.0-dev1418 -> org.jetbrains.compose.foundation:foundation:0.0.0-dev1418 -> org.jetbrains.compose.foundation:foundation-desktop:0.0.0-dev1418 -> org.jetbrains.compose.collection-internal:collection:0.0.0-dev1418 -> androidx.collection:collection:1.4.0
:jvmRuntimeClasspath -> org.jetbrains.compose.desktop:desktop-jvm-linux-x64:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop:0.0.0-dev1418 -> org.jetbrains.compose.desktop:desktop-jvm:0.0.0-dev1418 -> org.jetbrains.compose.foundation:foundation:0.0.0-dev1418 -> org.jetbrains.compose.foundation:foundation-desktop:0.0.0-dev1418 -> org.jetbrains.compose.collection-internal:collection:0.0.0-dev1418 -> androidx.collection:collection:1.4.0 -> androidx.collection:collection-jvm:1.4.0
```
(https://teamcity.jetbrains.com/buildConfiguration/JetBrainsPublicProjects_Compose_Publish_2_All_2/4484004?hideTestsFromDependencies=false&hideProblemsFromDependencies=false&expandBuildTestsSection=true&expandBuildChangesSection=true&expandBuildDeploymentsSection=false&expandBuildProblemsSection=true)
after we added annotation/collection to desktop target dependencies.
It seems that Android plugin checks all JVM classpathes, including pure
JVM (desktop) ones. And fails, if the project doesn't have this
property.
Adding this property, as the Android fails without it as well.
This is related to issue:
https://github.com/JetBrains/compose-multiplatform/issues/4258
changes
- DesktopSplitPane.kt: placable.place() -> placable.placeRelative
- SplitePaneDSL.kt: change the delta direction to follow the layout
direction
```kotlin
@Composable
override fun Modifier.markAsHandle(): Modifier = this.run {
val layoutDirection = LocalLayoutDirection.current
pointerInput(containerScope.splitPaneState) {
detectDragGestures { change, _ ->
change.consume()
containerScope.splitPaneState.dispatchRawMovement(
if (containerScope.isHorizontal)
if (layoutDirection == LayoutDirection.Ltr) change.position.x else -change.position.x
else change.position.y
)
}
}
```
the problem with .onPointerEvent() Modifier, or onDrag also, is
whenever the layout direction is Ltr or Rtl:
moving to right always produce positive change, [expected negative if
dir =Rtl]
moving to left always produce negative change, [expected positive if dir
=Rtl]
the calculation of postion will fail if layoutDir is Rtl, because
positionPercentage will be out of range
```kotlin
fun dispatchRawMovement(delta: Float) {
val movableArea = maxPosition - minPosition
if (movableArea > 0) {
positionPercentage =
((movableArea * positionPercentage) + delta).coerceIn(0f, movableArea) / movableArea
}
}
```
Introduced a function to process and replace certain escaped symbols
like '\n', '\t', and '\uXXXX' in the strings extracted from compose
string resources.
Update kotlin and dependencies and add verification-metadata.xml file to
verify vlcj artifacts
---------
Co-authored-by: Igor Demin <igor.demin@jetbrains.com>