Skip to content

Conversation

@availe
Copy link

@availe availe commented Nov 19, 2025

Checklist for your PR:

  • Check if there's any open issue
  • Please file your request against the main branch

Description of your changes

The KMP wizard now ships with a webMain directory by default instead of wasmJsMain. WebMain is preferred for green field projects as it supports both wasmJs and js targets.

Changelog:

  • Added configureJsTarget() in build-logic/convention/src/main/kotlin/org/publicvalue/convention/config/Multiplatform.kt
  • Replaced all references of wasmJsMain to webMain
  • Used no-arg 'StorageSettings()' in sample-app/settings/src/webMain/kotlin/org/publicvalue/multiplatform/oidc/settings/WebMainSettingsStore.kt as file stated Argument type mismatch: actual type is org.w3c.dom.Storage, but com.russhwolf.settings.Storage was expected. upon switching to webMain type. This defaults to local storage.

How has this been tested?

  • Compiled and ran the sample app for JVM, wasmJs, and Android targets (I cannot currently compile for iOS but I assume it'd work as I didn't modify any files).
  • Ran ./gradlew -p sample-app jsBrowserDevelopmentRun
  • Ran ./gradlew publishToMavenLocal -Pversion=0.16.2
  • Tested out KMP OIDC in personal project.

From my understanding, we need to test with the sample app and not the playground app, right? I've not been able to compile the playground on the parent's main branch.

Is this a (API-) breaking change?

  • Experimental API WasmCodeAuthFlowFactory renamed to WebCodeAuthFlowFactory
  • Renamed WasmJsSettingsStore to WebMainSettingsStore

@availe availe marked this pull request as ready for review November 20, 2025 01:03
@availe
Copy link
Author

availe commented Nov 20, 2025

Marked this as ready for review. Let me know if it needs any adjustments.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a yarn.lock because it's just a sample app, could you remove it?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need a yarn.lock because it's just a sample app, could you remove it?

@kalinjul
Copy link
Owner

From my understanding, we need to test with the sample app and not the playground app, right? I've not been able to compile the playground on the parent's main branch.

Yes, playground is currently broken and i will add the sample app to the main project soon so it's more obvious it is part of the project.
Your changes look good to me so far, except for my minor comment above. A js sample application would be awesome, but we can add one later on.

Thanks for keeping up with my latest changes on main!

@availe
Copy link
Author

availe commented Nov 22, 2025

Alrighty I deleted the yarn locks. The thing is, that adding a js sample app could be as simple as adding a JS fallback mode to the sample wasmJs app (other reference). It would feel a bit superfluous though, ideally a dedicated JS sample app could be added later on.

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.

2 participants