Skip to content

v4.0.0

Latest

Choose a tag to compare

@kaleidot725 kaleidot725 released this 07 Nov 04:59
· 6 commits to main since this release
988835c

4.0.0 makes PulsePlatform a rule set and a library for both the desktop and mobile. The repository is now PulsePlatform. The desktop artifacts carry their platform in their names. Android and iOS get artifacts of their own, and the architecture rules check mobile apps too.

Every coordinate changes. Packages (jp.kaleidot725.pulse.*) and class names are unchanged, so imports stay as they are.

// Desktop
dependencies {
    implementation("com.github.kaleidot725.PulsePlatform:mvi-desktop:v4.0.0")
    implementation("com.github.kaleidot725.PulsePlatform:navigation-desktop:v4.0.0")
    testImplementation("com.github.kaleidot725.PulsePlatform:architecture:v4.0.0")
}

// Android and iOS (Compose Multiplatform)
commonMain.dependencies {
    implementation("com.github.kaleidot725.PulsePlatform:mvi-mobile:v4.0.0")
    implementation("com.github.kaleidot725.PulsePlatform:navigation-mobile:v4.0.0")
}

Artifacts

3.1.0 4.0.0 Platform
PulseDesktop:mvi PulsePlatform:mvi-desktop desktop
PulseDesktop:navigation PulsePlatform:navigation-desktop desktop
PulseDesktop:architecture PulsePlatform:architecture any (JVM tests)
— PulsePlatform:mvi-mobile (new) Android, iOS
— PulsePlatform:navigation-mobile (new) Android, iOS

Mobile

  • mvi-mobile holds PulseState, PulseAction, PulseEvent, PulseViewModel<State, Action, Event> and PulseContent. A phone screen is one ViewModel, so PulseContainer, PulseHost, PulseBroadcast and PulseUnicast are left out
  • navigation-mobile holds rememberPulseViewModel and rememberPulseNavEntryDecorators, which tie a ViewModel to a Navigation 3 back stack entry. It has no rememberPulseContainer

Rules

  • assertPulseMobileConventions() checks an app built on mvi-mobile: a feature is one …Screen that binds the one ViewModel beside it with PulseContent, and only section and component sit under it
  • architecture no longer depends on mvi. It matches the Pulse types by fully qualified name, so a mobile app's tests get no desktop classes on the classpath

Migrating from 3.1.0

  • Replace com.github.kaleidot725.PulseDesktop:mvi with com.github.kaleidot725.PulsePlatform:mvi-desktop
  • Replace com.github.kaleidot725.PulseDesktop:navigation with com.github.kaleidot725.PulsePlatform:navigation-desktop
  • Replace com.github.kaleidot725.PulseDesktop:architecture with com.github.kaleidot725.PulsePlatform:architecture

The docs have moved to https://kaleidot725.github.io/PulsePlatform/. The desktop quick start and the mobile quick start cover each platform from the start.