kstate

A Kotlin Multiplatform library for creating state machines

License

License

GroupId

GroupId

tech.bam
ArtifactId

ArtifactId

kstate-jvm
Last Version

Last Version

0.1.11
Release Date

Release Date

Type

Type

pom.sha512
Description

Description

kstate
A Kotlin Multiplatform library for creating state machines
Project URL

Project URL

https://github.com/bamlab/kstate
Source Code Management

Source Code Management

https://github.com/bamlab/kstate

Download kstate-jvm

Dependencies

runtime (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib jar 1.3.72

Project Modules

There are no modules declared in this project.

kstate

JVM Continuous Integration

JVM Continuous Deployment

Install

implementation("tech.bam:kstate-jvm:VERSION")

Snapshot releases

repositories {
    maven { url "https://oss.sonatype.org/content/repositories/snapshots" } // Add this line
}
// ...

implementation("tech.bam:kstate-jvm:VERSION-SNAPSHOT")

Usage

Machine

sealed class TrafficLightState {
    object GREEN : TrafficLightState()
    object YELLOW : TrafficLightState()
    object RED : TrafficLightState()
}

val myMachine = machine<TrafficLightState> {
    state(TrafficLightState.GREEN) {}
    state(TrafficLightState.YELLOW) {}
    state(TrafficLightState.RED) {}
}

Developed with IntelliJ IDEA

JetBrains

tech.bam

BAM

Versions

Version
0.1.11