Kotlin Bloc consists of two packages:
- core - A pure Kotlin library providing the
Bloc
andCubit
classes - compose - An Android library which allows you to integrate
Bloc
andCubit
into your Compose apps
Kotlin Bloc is available on Jitpack.
First, add the Jitpack repository to your top-level build.gradle
file:
allprojects {
repositories {
// ...
maven { url 'https://jitpack.io' }
}
}
Then add the dependency to your module-level build.gradle
file.
dependencies {
// ...
// Choose EITHER:
implementation 'com.github.ptrbrynt.KotlinBloc:compose:3.0.0' // For Jetpack Compose apps
implementation 'com.github.ptrbrynt.KotlinBloc:core:3.0.0' // The pure Kotlin library, for other stuff
// Optional test helpers:
testImplementation 'com.github.ptrbrynt.KotlinBloc:test:3.0.0'
}