Closed ahna92 closed 2 months ago
Wasm is not stable. But it is stable enough for kotlinx to include it, which is good enough for here.
Unfortunately, Turbine is also a blocker here.
There are some refactors in the 1.2 branch because the old BuildHelpers config is terrible. This will be trivial to add on top of the existing changes in 1.2.
Great, thanks !
@russhwolf Is there any ETA for v1.2 and WASM support?
@russhwolf Would be nice to know if this is in progress and if its gonna be released with 1.2 version. Thanks :)
Turbine 1.1.0 now has wasmJs target
Been traveling and otherwise busy, but my current goal is to get this out as part of 1.2 by the end of the month.
@russhwolf Can you plz provide some updates here ? Also let me know if some snapshot version if available. That works as well.
@shriharsha-srb I've published snapshot of 1.2.0 to my public maven repository. Feel free to use it while waiting for official release ☺️
Add maven In settings.gradle.kts
(read more about versioning here)
dependencyResolutionManagement {
repositories {
maven(url = "https://pkgs.dev.azure.com/burnoo/maven/_packaging/public/maven/v1") {
content {
includeVersionByRegex(".*", ".*", ".*-beap[0-9]+")
}
}
}
}
In your module:
implementation("com.russhwolf:multiplatform-settings:1.2.0-beap1")
@burnoo Thanks for releasing this!
Unfortunately, it does not work at the moment, I always get:
Could not find com.russhwolf:multiplatform-settings:1.2.0-beap1.
Is it still available?
@stephanepechard
Yes it's still available. Have you added my maven to settings.gradle.kts
? You can check out similar configuration here
@burnoo Thanks for your answer. I have copied the exact same config, with no much luck :-(
I've just checked it in my local environment and maven works as expected. Could you show the rest of the file and implementation
usage?
@burnoo Sure, but maybe not on this thread, can I write you an email? Thanks!
Hi @burnoo thanks for publishing 1.2.0 !
I just added it to my project and tried to use it on wasmJs:
val settings = StorageSettings(localStorage).toFlowSettings()
But .toFlowSettings()
does not work since StorageSettings
does not inherit from ObservableSettings
like the Android and iOS implementation.
This works on Android and iOS:
val settings = SharedPreferencesSettings(sharedPreferences).toFlowSettings()
val settings = NSUserDefaultsSettings(NSUserDefaults.standardUserDefaults()).toFlowSettings()
Is this already supported in 1.2.0 ?
@russhwolf Will there be an official release soon?
Hi @kit0kat. 1.2.0
comes with the new artifact com.russhwolf:multiplatform-settings-make-observable
that allows to observe StorageSettings
at runtime. Important thing to mention is that it will only trigger updates for the current ObservableSettings
instance (docs).
Artifact is published to my maven, so you can do the following
com.russhwolf:multiplatform-settings-make-observable:1.2.0-beap1
to dependenciesStorageSettings(localStorage).makeObservable().toFlowSettings()
@burnoo Thank you! Now it works as expected. Many thanks!
Sorry it took so long. This has now been released in version 1.2.0.
As wasm went stable, need support for
multiplatform-settings-coroutines
,Also kotlinx.coroutines supported wasm which was the blocker i think
Tired to support in https://github.com/russhwolf/multiplatform-settings/pull/187 , but i feel some configurations in
BuildHelpers.kt
blocked it