Skip to content

Commit

Permalink
chore(publish): prepare for v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Feb 17, 2024
1 parent 4a4350c commit 43ec4aa
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
27 changes: 16 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,45 @@

## [Unreleased] - TBD

## [0.7.0] - Feb 17, 2024

### Update dependencies

- [AndroidX Lifecycle `2.7.0`](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0).
- Android target: update `Compile SDK` and `Target SDK` to `34`.
- [KotlinX Coroutines `1.8.0`](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.8.0).
- [AndroidX Lifecycle `2.7.0`](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.7.0).
- Android target: update `Compile SDK` and `Target SDK` to `34`.
- [KotlinX Coroutines `1.8.0`](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.8.0).

### `kmp-viewmodel` and `kmp-viewmodel-savedstate`

- **New**: Add support for Kotlin/Wasm (`wasmJs` target) 🎉.
- **New**: Add support for Kotlin/Wasm (`wasmJs` target) 🎉.
- The behavior of `ViewModel.addCloseable(Closeable)` on _non-Android targets_ has been changed to be consistent with _Android target_.
`ViewModel`'s `addCloseable()` now **immediately closes** the `Closeable` if the `ViewModel` has been cleared.
**This behavior is the same across all targets ✅**.
**This behavior is the same across all targets ✅**.

### `kmp-viewmodel-koin`

- **Fixed**: `koinViewModelFactory`: `CreationExtras` passed to `ViewModelFactory.create` will now be
passed to the constructor of the ViewModel if it's requested.
passed to the constructor of the ViewModel if it's requested.

```kotlin
class MyViewModel(val extras: CreationExtras) : ViewModel()
val myModule: Module = module {
factoryOf(::MyViewModel)
}

val factory = koinViewModelFactory<MyViewModel>(
scope = KoinPlatformTools.defaultContext().get().scopeRegistry.rootScope,
)
val extras = buildCreationExtras { /* ... */ }

val viewModel: MyViewModel = factory.create(extras)
viewModel.extras === extras // true <--- `extras` is the same as `extras` passed to `factory.create(extras)`
viewModel.extras === extras // true <--- `viewModel.extras` is the same as `extras` passed to `factory.create(extras)`
```

### Example, docs and tests

- Add more tests to `kmp-viewmodel-compose` (android & jvm), `kmp-viewmodel-koin` (common), and `kmp-viewmodel-koin-compose` (common & jvm).
- Add more tests to `kmp-viewmodel-compose` (android & jvm), `kmp-viewmodel-koin` (common),
and `kmp-viewmodel-koin-compose` (common & jvm).

## [0.6.2] - Feb 5, 2024

Expand Down Expand Up @@ -393,7 +396,9 @@ Share everything including data, domain, presentation, and UI.

- Initial release.

[Unreleased]: https://github.com/hoc081098/kmp-viewmodel/compare/0.6.2...HEAD
[Unreleased]: https://github.com/hoc081098/kmp-viewmodel/compare/0.7.0...HEAD

[0.7.0]: https://github.com/hoc081098/kmp-viewmodel/releases/tag/0.7.0

[0.6.2]: https://github.com/hoc081098/kmp-viewmodel/releases/tag/0.6.2

Expand Down
4 changes: 2 additions & 2 deletions docs/viewmodel-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api("io.github.hoc081098:kmp-viewmodel-compose:0.6.2")
api("io.github.hoc081098:kmp-viewmodel-compose:0.7.0")
}
}
}
Expand All @@ -48,7 +48,7 @@ dependencyResolutionManagement {

// build.gradle.kts
dependencies {
api("io.github.hoc081098:kmp-viewmodel-compose:0.6.3-SNAPSHOT")
api("io.github.hoc081098:kmp-viewmodel-compose:0.7.1-SNAPSHOT")
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/viewmodel-koin-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("io.github.hoc081098:kmp-viewmodel-koin-compose:0.6.2")
implementation("io.github.hoc081098:kmp-viewmodel-koin-compose:0.7.0")

// NOTE: You can add `koin-core` dependency to your project to specify the version of Koin.
// For more information check out the [Koin KMP documentation](https://insert-koin.io/docs/reference/koin-mp/kmp#gradle-dependencies).
Expand All @@ -61,7 +61,7 @@ dependencyResolutionManagement {

// build.gradle.kts
dependencies {
api("io.github.hoc081098:kmp-viewmodel-koin-compose:0.6.3-SNAPSHOT")
api("io.github.hoc081098:kmp-viewmodel-koin-compose:0.7.1-SNAPSHOT")
}
```

Expand Down
8 changes: 4 additions & 4 deletions docs/viewmodel-savedstate.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api("io.github.hoc081098:kmp-viewmodel-savedstate:0.6.2")
api("io.github.hoc081098:kmp-viewmodel-savedstate:0.7.0")
}
}
}
Expand All @@ -55,7 +55,7 @@ kotlin {
[...]
framework {
baseName = "shared"
export("io.github.hoc081098:kmp-viewmodel-savedstate:0.6.2") // required to expose the classes to iOS.
export("io.github.hoc081098:kmp-viewmodel-savedstate:0.7.0") // required to expose the classes to iOS.
}
}
}
Expand All @@ -68,7 +68,7 @@ kotlin {
binaries {
framework {
baseName = "shared"
export("io.github.hoc081098:kmp-viewmodel-savedstate:0.6.2") // required to expose the classes to iOS.
export("io.github.hoc081098:kmp-viewmodel-savedstate:0.7.0") // required to expose the classes to iOS.
}
}
}
Expand Down Expand Up @@ -101,7 +101,7 @@ dependencyResolutionManagement {

// build.gradle.kts
dependencies {
api("io.github.hoc081098:kmp-viewmodel-savedstate:0.6.3-SNAPSHOT")
api("io.github.hoc081098:kmp-viewmodel-savedstate:0.7.1-SNAPSHOT")
}
```

Expand Down
8 changes: 4 additions & 4 deletions docs/viewmodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
api("io.github.hoc081098:kmp-viewmodel:0.6.2")
api("io.github.hoc081098:kmp-viewmodel:0.7.0")
}
}
}
Expand All @@ -41,7 +41,7 @@ kotlin {
[...]
framework {
baseName = "shared"
export("io.github.hoc081098:kmp-viewmodel:0.6.2") // required to expose the classes to iOS.
export("io.github.hoc081098:kmp-viewmodel:0.7.0") // required to expose the classes to iOS.
}
}
}
Expand All @@ -54,7 +54,7 @@ kotlin {
binaries {
framework {
baseName = "shared"
export("io.github.hoc081098:kmp-viewmodel:0.6.2") // required to expose the classes to iOS.
export("io.github.hoc081098:kmp-viewmodel:0.7.0") // required to expose the classes to iOS.
}
}
}
Expand All @@ -77,7 +77,7 @@ dependencyResolutionManagement {

// build.gradle.kts
dependencies {
api("io.github.hoc081098:kmp-viewmodel:0.6.3-SNAPSHOT")
api("io.github.hoc081098:kmp-viewmodel:0.7.1-SNAPSHOT")
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kotlin.incremental=true
# POM
GROUP=io.github.hoc081098
# HEY! If you change the major version here be sure to update publish-release.yaml doc target folder!
VERSION_NAME=0.6.3-SNAPSHOT
VERSION_NAME=0.7.0
POM_INCEPTION_YEAR=2023

POM_URL=https://github.com/hoc081098/kmp-viewmodel
Expand Down

2 comments on commit 43ec4aa

@hoangchungk53qx1
Copy link

Choose a reason for hiding this comment

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

Nai xưt

@hoc081098
Copy link
Owner Author

Choose a reason for hiding this comment

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

@hoangchungk53qx1 pray 🙏up

Sent from my 2201117TG using FastHub

Please sign in to comment.