This repository is the stable base upon which we build our Kotlin Multiplatform projects at Mirego.
We want to share it with the world so you can build awesome multiplatform applications too.
Introduction
To learn more about why we created and maintain this boilerplate project, read our blog post.
Content
This boilerplate comes with batteries included, you’ll find:
- A brand new Kotlin Multiplatform project using Kotlin 1.7.20 and the Cocoapods Plugin
- An Android app using Jetpack Compose
- An iOS app using SwiftUI
- Asynchronous & multithreading support with Coroutines
- Model serialization support with kotlinx.serialization
- Opinionated Kotlin linting with Ktlint
- Opinionated Swift linting with SwiftLint
- A CI workflow using GitHub actions
- A clean and useful
README.md
template (in english)
Usage
With GitHub template
- Click on the Use this template button to create a new repository
- Clone your newly created project (
git clone https://github.com/you/repo.git
) - Run the boilerplate setup script (
./boilerplate-setup.sh
) - Commit the changes (
git commit -a -m "Rename kmp-boilerplate parts"
)
Without GitHub template
- Clone this project (
git clone https://github.com/mirego/kmp-boilerplate.git
) - Delete the internal Git directory (
rm -rf .git
) - Run the boilerplate setup script (
./boilerplate-setup.sh
) - Create a new Git repository (
git init
) - Create the initial Git commit (
git commit -a -m "Initial commit using kmp-boilerplate"
)
Building the project
Android
- Open the root folder using Android Studio
- Run the app on your device or simulator 🚀
iOS
- Open the workspace using Xcode or AppCode
- Specify your Development Team under the
Signing and Capabilities
tab of theiosApp
target - Run the app on your device or simulator 🚀
Preferred libraries
Some frequently used libraries aren’t included by default in this boilerplate since all projects have their own needs and requirements. Here’s a list of our preferred libraries to help you get started:
Category | Libraries |
---|---|
HTTP networking | ktor |
GraphQL client | apollo-kotlin |
Persisted preferences | multiplatform-setttings |
Mocking (Unit tests) | mockk |
Declarative UI framework | trikot-viewmodels-declarative-flow |
Date & time | kotlinx-datetime |
License
Kmp Boilerplate is © 2022 Mirego and may be freely distributed under
the New BSD license. See
the LICENSE.md
file.
About Mirego
Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.
We also love open-source software and we try to give back to the community as much as we can.