
🍱 Componental
Kotlin Multiplatform library for componentization of Compose UI. The library is based on concepts
proposed and
implemented
by awesome Decompose. The differences are:
- Kotlin's coroutine first
- No dependencies on Android types
- simplified (subjectively) API
Use it only if you know what you do.
Dependencies
In gradle/libs.versions.toml
[versions]
kotlin = "2.0.20"
componental = "0.7"
= { module = , version.ref = }
= { module = , version.ref = }
= { id = , version.ref = }
= { id = , version.ref = }
= { id = , version.ref = }
Shared code in shared/build.gradle.kts
plugins {
alias(libs.plugins.kotlin.multiplatform)
}
kotlin {
sourceSets {
commonMain.dependencies {
implementation(libs.componental)
}
}
}
Android code in appAndroid/build.gradle.kts
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
}
dependencies {
api(libs.componental.compose)
}
Publishing
- Bump version in
root.publication.gradle.kts
./gradlew clean build publishAllPublicationsToCentralRepository
Local maven
- Set
X.X-SNAPSHOT version in root.publication.gradle.kts
./gradlew clean build publishToMavenLocal
Release Notes
- 0.7 Improved API and handling of hierarchy restoration process
- 0.6 Better handling of closed channels
- 0.5 Improve Toast API and UI, bump to Kotlin 2.0.20
- 0.4 Refine Stack and Slot API and their implementations
- 0.3 Add BackNavigation
- 0.2 Module
componental is exposed as API from componental.compose
- 0.1 Initial release
License
Copyright 2024 Sergej Shafarenka, www.halfbit.de
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.