skiko.js used to be required for k/wasm projects. But some time ago it
was refactored to use skiko.mjs, so skiko.js is not needed anymore (for
k/wasm, still needed for k/js). But there are k/wasm projects still
including skiko.js in index.html which leads to extra loading time. The
intention is to notify them without causing 404 errors for now.
## Testing
- updated a test
- tested manually
<img width="856" alt="Screenshot 2024-09-10 at 15 34 41"
src="https://github.com/user-attachments/assets/9ad9b790-d3fa-4907-b9ee-f5e682f38858">
## Release Notes
### Highlights - Web
- `skiko.js` is redundant in case of K/Wasm Compose for Web applications
and it can be removed from index.html files to not load redundant files.
We are going to remove `skiko.js` from the k/wasm distribution in the
future releases. `skiko.js` is still needed in case of K/JS Compose for
Web apps.
Use a correct file to configure the cocoapods resources integration
instead of a relative path.
Fixes https://youtrack.jetbrains.com/issue/CMP-4303
## Release Notes
### Fixes - Resources
- _(prerelease fix)_ Fix cocoapods resources integration which leaded to
a lack resources in ios apps
the mentioned section in the link doesn't exist anymore this is the
replacement
Describe proposed changes and the issue being fixed
<!-- Optional -->
Fixes [link to the issue]
## Testing
<!-- Optional -->
Describe how you tested your changes. If possible and needed:
- Test it on a sample project
- Write unit tests
- Provide a code snippet
<!-- Optional -->
This should be tested by QA
## Release Notes
<!--
Optional, if omitted - won't be included in the changelog
Sections:
- Highlights
- Known issues
- Breaking changes
- Features
- Fixes
Subsections:
- Multiple Platforms
- iOS
- Desktop
- Web
- Resources
- Gradle Plugin
-->
### Section - Subsection
- Describe a change for adding it to
https://github.com/JetBrains/compose-multiplatform/blob/master/CHANGELOG.md
- _(prerelease fix)_ Fix some bug that introduced in a prerelease
version (dev/beta). It will be included in a dev/beta changelog, but
excluded from a stable changelog
### Section - Subsection
- Describe another change if needed
1) The PR adds a support test resources in Compose multiplatform
projects.
2) The PR adds a support multi-module resources in JVM-only projects.
Fixes https://youtrack.jetbrains.com/issue/CMP-1470
Fixes https://youtrack.jetbrains.com/issue/CMP-5963
## Release Notes
### Features - Resources
- Added support of test resources in Compose Multiplatform projects
- Added support of multi-module resources in JVM-only projects
Use deprecated `seekToFileOffset` on iOS 12 to fix a crash on old Apple
devices
Fixes https://youtrack.jetbrains.com/issue/CMP-5967
## Release Notes
### Fixes - Resources
- _(prerelease fix)_ Fix a resource reading on iOS 12
After the fix there will be a correct configuration cache usage.
Fixes https://youtrack.jetbrains.com/issue/CMP-5674
## Release Notes
### Fixes - Gradle Plugin
- _(prerelease fix)_ Fix broken configuration cache due Android Studio +
AGP issues. Now Android Studio previews require latest AGP versions
(8.5.2, 8.6.0-rc01, 8.7.0-alpha04):
https://issuetracker.google.com/issues/348208777
Updating the compose.version too, otherwise the tests would fail locally
with the new screenshots.
__
This is a consequence of updating to a newer skia/skiko version in
compose-multiplatform-core.
The PR adds a method to convert a bitmap bytearray to the ImageBitma, a
vector XML content bytearray to the ImageVector in the common code. And
the same for an SVG files on non-android targets.
<!-- Optional -->
Fixes https://youtrack.jetbrains.com/issue/CMP-3869
Fixes https://youtrack.jetbrains.com/issue/CMP-4925
## Release Notes
### Features - Resources
- Added utility functions to decode `Bitmap ByteArray as ImageVector`
and `XML ByteArray as ImageVector` in the common code and `SVG ByteArray
as Painter` in the non-android code
1. Correct Imageviewer README.md (correct Gradle command for Web
running)
2. Correct Jetsnack: set appropriate app name for iOS and Android,
cleanup iosApp from temporal files created by Xcode.
K/JS and K/Wasm have differences in the packaging logic, and therefore
we need to account for it when unpacking Skiko files.
Fixes [CMP-5649](https://youtrack.jetbrains.com/issue/CMP-5649)
## Testing
- Added a test, which checks the state of k/js distribution
This should be tested by QA
Add a font cache on non-android targets.
Android targets already have own font caching.
Fixes https://youtrack.jetbrains.com/issue/CMP-1477
## Release Notes
### Features - Resources
- To avoid constant reading raw font bytes on each Font usage on
non-android targets, there was added the font cache. Android has own
font cache inside the platform implementation.
The PR adds a generation special properties with maps a string ID to the
resource for each type of resources:
```kotlin
val Res.allDrawableResources: Map<String, DrawableResource>
val Res.allStringResources: Map<String, StringResource>
val Res.allStringArrayResources: Map<String, StringArrayResource>
val Res.allPluralStringResources: Map<String, PluralStringResource>
val Res.allFontResources: Map<String, FontResource>
```
<!-- Optional -->
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4880
Fixes https://youtrack.jetbrains.com/issue/CMP-1607
## Testing
I checked it in the sample project but this should be tested by QA (KMP
and JVM only projects)
## Release Notes
### Features - Resources
- Now the gradle plugin generates resources map to find a resource by a
string ID
Add file associations support to Compose Desktop
<!-- Optional -->
Fixes#773
## Testing
Tested on the [sample
project](https://github.com/zhelenskiy/file-associations-demo).
Behaviours per OSs:
- MacOS Sonoma: associations work for distributables.
- Windows 11: associations work after the installation of the MSI.
- Kubuntu: associations do not work, but everything else works fine.
However, IDEA also does not have associations there, so I assume this is
fine.
I didn't write any unit tests because I don’t know which of them you are
expecting me to write. So, I'm looking forward to your feedback and
suggestions.
<!-- Optional -->
This should be tested by QA
## Release Notes
<!--
Optional, if omitted - won't be included in the changelog
Sections:
- Highlights
- Known issues
- Breaking changes
- Features
- Fixes
Subsections:
- Multiple Platforms
- iOS
- Desktop
- Web
- Resources
- Gradle Plugin
-->
### Highlight - Desktop
- Introduction of the new DSL function in `nativeDistributions` block:
```kotlin
fun fileAssociation(mimeType: String, extension: String, description:
String): Unit
```
With the new API it is possible to customize compose resources
directories. For example:
```kotlin
abstract class GenerateAndroidRes : DefaultTask() {
@get:Inject
abstract val layout: ProjectLayout
@get:OutputDirectory
val outputDir = layout.buildDirectory.dir("generatedAndroidResources")
@TaskAction
fun run() {...}
}
compose.resources {
customDirectory(
sourceSetName = "androidMain",
directoryProvider = tasks.register<GenerateAndroidRes>("generateAndroidRes").map { it.outputDir.get() }
)
customDirectory(
sourceSetName = "desktopMain",
directoryProvider = provider { layout.projectDirectory.dir("desktopResources") }
)
}
```
<!-- Optional -->
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4718
Fixes https://github.com/JetBrains/compose-multiplatform/issues/4564
## Release Notes
### Features - Resources
- Add a customization for resources directories. Now it is possible to
use e.g downloaded resources.