kstate

A Kotlin Multiplatform library for creating state machines

License

License

GroupId

GroupId

tech.bam
ArtifactId

ArtifactId

kstate
Last Version

Last Version

0.1.11
Release Date

Release Date

Type

Type

pom
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

How to add to project

<!-- https://jarcasting.com/artifacts/tech.bam/kstate/ -->
<dependency>
    <groupId>tech.bam</groupId>
    <artifactId>kstate</artifactId>
    <version>0.1.11</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/tech.bam/kstate/
implementation 'tech.bam:kstate:0.1.11'
// https://jarcasting.com/artifacts/tech.bam/kstate/
implementation ("tech.bam:kstate:0.1.11")
'tech.bam:kstate:pom:0.1.11'
<dependency org="tech.bam" name="kstate" rev="0.1.11">
  <artifact name="kstate" type="pom" />
</dependency>
@Grapes(
@Grab(group='tech.bam', module='kstate', version='0.1.11')
)
libraryDependencies += "tech.bam" % "kstate" % "0.1.11"
[tech.bam/kstate "0.1.11"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

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