Composites
Introduction: ✨ Composites are a group of tools and handy libraries that make it easier to use Jetpack Compose.
Tags:
✨ Composites are a collection of tools and handy libraries that make it easier to use Jetpack Compose.
Please consider giving this repository a star ⭐ if you like the project.
Articles
Modules
- composites-carbon — Lightweight annotation processor for generating Route objects that help with navigation based on the Navigation Component
- composites-fiberglass — A tool for building complex screens based on simple blocks.
Current versions
Module | Version |
---|---|
composites-carbon-core | |
composites-carbon-processor | |
composites-fiberglass |
Using in your projects
Android only:
dependencies {
// Carbon
implementation("ru.ldralighieri.composites:composites-carbon-core:0.5.1")
ksp("ru.ldralighieri.composites:composites-carbon-processor:0.5.1")
// Fiberglass
implementation("ru.ldralighieri.composites:composites-fiberglass:0.5.1")
}
Multiplatform:
kotlin {
sourceSets {
commonMain {
kotlin.srcDir("build/generated/ksp/metadata/commonMain/kotlin")
dependencies {
// Carbon
implementation("ru.ldralighieri.composites:composites-carbon-core:0.5.1")
// Fiberglass
implementation("ru.ldralighieri.composites:composites-fiberglass:0.5.1")
}
}
}
}
dependencies {
// Carbon
add("kspCommonMainMetadata", "ru.ldralighieri.composites:composites-carbon-processor:0.5.1")
}
// https://github.com/google/ksp/issues/567
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask<*>>().all {
if (name != "kspCommonMainKotlinMetadata") {
dependsOn("kspCommonMainKotlinMetadata")
}
}
Make sure that you have mavenCentral()
in the list of repositories:
repositories {
mavenCentral()
}
repositories {
maven("https://oss.sonatype.org/content/repositories/snapshots/")
}
dependencies {
implementation("ru.ldralighieri.composites:{module}:0.6.1-SNAPSHOT")
}
Run Sample
app:
- Android: use the
sample
run configuration - iOS: use the
sampleIOSApp
run configuration - Desktop:
./gradlew :sample:run
- Desktop Hot Reload:
./gradlew :sample:jvmRunHot -DmainClass=ru.ldralighieri.composites.sample.Main_jvmKt
- Web (WASM):
./gradlew :sample:wasmJsBrowserDevelopmentRun
- Web (JS):
./gradlew :sample:jsBrowserDevelopmentRun
(only for browsers that do not support WASM)
If you're finding performance issues
Make sure to try running your app or sample app in release mode.
Missed or forgot something?
If I forgot something or you have any ideas what can be added or corrected, please create an issue or contact me directly.
License
Copyright 2023-2025 Vladimir Raupov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.