A complete cross-platform library for Kotlin that provides advanced UI components, maps integration, and essential utilities for developing native applications on Android, iOS, and Desktop.
The library is divided into three main modules:
Basic UI components and fundamental utilities.
Specialized components for maps integration.
Main library with advanced components and tools.
Example application that demonstrates the use of all libraries.
Add the dependencies in your build.gradle.kts file:
commonMain.dependencies {
// Main library
implementation("com.sweetmesoft.kmpbase:kmpbase:2.0.1")
// Basic controls
implementation("com.sweetmesoft.kmpcontrols:kmpcontrols:2.0.1")
// Map components
implementation("com.sweetmesoft.kmpmaps:kmpmaps:2.0.1")
}
In your libs.versions.toml file:
[versions]
sweetmesoft = "2.0.1"
[libraries]
sweetmesoft-library = { module = "com.sweetmesoft.kmpbase:kmpbase", version.ref = "sweetmesoft" }
sweetmesoft-kmpcontrols = { module = "com.sweetmesoft.kmpcontrols:kmpcontrols", version.ref = "sweetmesoft" }
sweetmesoft-kmpmaps = { module = "com.sweetmesoft.kmpmaps:kmpmaps", version.ref = "sweetmesoft" }
// In your build.gradle.kts
commonMain.dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("dev.icerock.moko:permissions:0.18.0")
implementation("dev.icerock.moko:permissions-compose:0.18.0")
}
In your libs.versions.toml file:
[versions]
sweetmesoft = "2.0.1"
[libraries]
sweetmesoft-kmpcontrols = { module = "com.sweetmesoft.kmpcontrols:kmpcontrols", version.ref = "sweetmesoft" }
sweetmesoft-kmpmaps = { module = "com.sweetmesoft.kmpmaps:kmpmaps", version.ref = "sweetmesoft" }
sweetmesoft-library = { module = "com.sweetmesoft:library", version.ref = "sweetmesoft" }
In your build.gradle.kts:
commonMain.dependencies {
implementation(libs.sweetmesoft.kmpcontrols)
implementation(libs.sweetmesoft.kmpmaps)
implementation(libs.sweetmesoft.library)
}
import androidx.compose.runtime.*
import com.sweetmesoft.kmpcontrols.pickers.DatePicker
import com.sweetmesoft.kmpbase.controls.PasswordControl
import com.sweetmesoft.kmpmaps.MapComponent
import com.sweetmesoft.kmpmaps.controls.Coordinates
@Composable
fun MyApp() {
var selectedDate by remember { mutableStateOf(Clock.System.now().toLocalDateTime(TimeZone.currentSystemDefault()).date) }
var password by remember { mutableStateOf("") }
Column {
// Password control
PasswordControl(
value = password,
onValueChange = { password = it },
label = "Password"
)
// Date picker
DatePicker(
value = selectedDate,
title = "Select Date",
onSelectedDate = { selectedDate = it }
)
// Map component
MapComponent(
modifier = Modifier.fillMaxSize(),
coordinates = Coordinates(40.7128, -74.0060)
)
}
}
Visit our complete documentation on GitHub Pages
The documentation includes:
| Module | Description | Documentation |
|---|---|---|
| KMPControls | Basic UI components and utilities | View Docs |
| KMPMaps | Cross-platform maps integration | View Docs |
| Library | Advanced components and tools | View Docs |
| KMPTestApp | Example application and guides | View Docs |
You can also access the documentation locally:
In your Android build.gradle.kts:
android {
compileSdk = 36
defaultConfig {
minSdk = 28
targetSdk = 36
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
Make sure you have the minimum deployment target configured:
iosX64()
iosArm64()
iosSimulatorArm64()
@Composable
fun MyCustomTheme(content: @Composable () -> Unit) {
MaterialTheme(
colorScheme = lightColorScheme(
primary = Color(0xFF6200EE),
secondary = Color(0xFF03DAC6)
)
) {
content()
}
}
The project includes a complete example application in the kmptestapp module that demonstrates:
To run the example application:
./gradlew :kmptestapp:run
Contributions are welcome! We have a complete guide for contributors.
# 1. Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/KmpLibrary.git
cd KmpLibrary
# 2. Create a branch for your feature
git checkout -b feature/my-new-feature
# 3. Install dependencies and build
./gradlew build
# 4. Run tests
./gradlew test
# 5. Test the example app
./gradlew :kmptestapp:installDebug
This project adheres to a code of conduct. By participating, you are expected to maintain a respectful and welcoming environment for everyone.
This project is licensed under the MIT License - see the LICENSE file for details.
| Aspect | Status |
|---|---|
| Current Version | |
| Status | |
| Kotlin | |
| Compose | |
| Platforms | |
| License | |
| Tests | |
| Documentation |
Need help? Open an issue or contact the development team.