-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Introduce wasmJsBrowserDistribution task #5375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...lugins/compose/src/main/kotlin/org/jetbrains/compose/web/internal/configureWebApplication.kt
Outdated
Show resolved
Hide resolved
...lugins/compose/src/main/kotlin/org/jetbrains/compose/web/internal/configureWebApplication.kt
Outdated
Show resolved
Hide resolved
Just in case, if it is not already planned, please, fix the PR description before merging (better also before review, if not agreed beforehand):
|
Unfortunately, without contracts onlyIf is not enough
val jsTargetModuleName = jsDistTask.outputModuleName | ||
val wasmTargetModuleName = wasmDistTask.outputModuleName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do both outputModuleName
have some default value when a user doesn't explicitly specify it in the DSL?
When would this be false
?
onlyIf {
jsTargetModuleName != null && wasmTargetModuleName != null
}
} | ||
} | ||
|
||
private fun Project.introduceComposeWebCompatibilityTask(targets: Collection<KotlinJsIrTarget>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some gradle plugin tests in the project.
Would you like to add some tests?
For example:
- a task is created when the condition match and it's not created otherwise
- Run the task and check the output directory exists. And the output directory contains the must-have files (index.html, .js file, wasm file, etc)
Testing
Clone https://github.com/Schahen/ComposeWebApp and run
Release Notes
Features - Web
composeCompatibilityBrowserDistribution
task. This task combines two prod distributions - for js and for wasm in such way so that if modern required features are not supported by the consumer browser, application switch to js mode.