Skip to content

resources demo js workaround#2614

Closed
dima.avdeev (dima-avdeev-jb) wants to merge 1 commit into
masterfrom
dima-avdeev/resources-demo-js-workaround
Closed

resources demo js workaround#2614
dima.avdeev (dima-avdeev-jb) wants to merge 1 commit into
masterfrom
dima-avdeev/resources-demo-js-workaround

Conversation

@dima-avdeev-jb

Copy link
Copy Markdown
Contributor

No description provided.

@eymar

Copy link
Copy Markdown
Member

I asked about the issue with resources in different modules in k/js. It's a known thing, but no official solution available yet.
This workaround is a valid thing to do. I took it for Compose k/wasm experiments.
So it's okay to merge in my opinion.

@dima-avdeev-jb

dima.avdeev (dima-avdeev-jb) commented Feb 24, 2023

Copy link
Copy Markdown
Contributor Author

Oleksandr Karpovich (@eymar)
For now, JS resources work fine if JS app "executable" is specified in shared module. So, maybe this PR is redundant.

./gradlew :resources:demo:shared:jsBrowserDevelopmentRun - works fine.

@eymar

Copy link
Copy Markdown
Member

That's right. This workaround will be needed if we have many modules with different resources and all of them need to be included in the final distribution.
So if we keep the "executable" JS in the same module where we keep the resources, then it's fine and workaround is not needed indeed.

@dima-avdeev-jb

Copy link
Copy Markdown
Contributor Author

Oleksandr Karpovich (@eymar)
I think we can postpone current PR after Kotlin Conf.

@eymar

Copy link
Copy Markdown
Member

Yeah, not urgent.

Just some notes for the time we decided to get back to it:
demo/jsMain/resources contains the copy of resources, so it would work even without a workaround in this PR.

So I changed it a bit in my branch to make it work:

val copyResources = tasks.create("copyJsResourcesWorkaround", Copy::class.java) {
    from(project(":resources:demo:shared").file("src/commonMain/resources"))
    into("build/processedResources/js/main")
}

afterEvaluate {
    project.tasks.getByName("jsProcessResources").finalizedBy(copyResources)
}

Nikita Lipsky (pjBooms) added a commit that referenced this pull request Dec 18, 2025
[#2614](JetBrains/compose-multiplatform-core#2614)
bumps LV to 2.2 for all non-android platforms so let's update explicit
check as well.

Fixes
[CMP-9282](https://youtrack.jetbrains.com/issue/CMP-9282/Minimal-Kotlin-version-requirements)

## Release Notes
N/A
@pjBooms Nikita Lipsky (pjBooms) removed their request for review May 19, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants