PetSearch is an effort to explore and showcase the Kotlin-Multiplatform possibilities.
100% Jetpack Compose, 100% SwiftUI. This project is all about learning.
With that said, author has realised that,
"The more you know, the more you realize you don't know." - Aristotle
PetSearch has blended the following coding practices and techniques to create a flavor of its own.
- Clean Architecture
- MVI (Redux inspired)
- SOLID
- Feature-wise and Layer-wise Modularized code (Android and Shared)
- Shared ViewModel with SavedStateHandle (Android and iOS)
- ViewModel Navigation with args (Android and iOS)
- Generate PetFinder ApiKey and Secret from here.
- Create
apikey.properties
inroot
dir - Add the following in properties file
API_KEY=<YOUR_API_KEY> API_SECRET=<YOUR_API_SECRET>
- Run
./gradlew generateBuildKonfig
- Java 11
- You require Android Studio Dolphin
- Install Kmm Plugin. Checkout this setup guide.
- Create
keystore.properties
inroot
dir and add the following lines in the file. Values can be anything as long as you're not generating a signed APKSTORE_FILE=<YOUR_STORE_FILE> STORE_PASSWORD=<YOUR_STORE_PASSWORD> KEY_ALIAS=<YOUR_KEY_ALIAS> KEY_PASSWORD=<YOUR_KEY_PASSWORD>
- Navigate to ios directory & open
.xcworkspace
& not.xcodeproj
Tools | Check command | Fix command |
---|---|---|
lint | ./gradlew lint |
- |
detekt | ./gradlew detekt |
- |
ktlint | ./gradlew ktlintCheck |
./gradlew ktlintFormat |
spotless | ./gradlew spotlessCheck |
./gradlew spotlessApply |
Kotest Plugin doesn't support running common tests in Multiplatform project via green run icons in editor.
Only way to run common tests is via Gradle command ./gradlew check
- Ktor
- SKIE
- KMP-NativeCoroutines
- KMM-ViewModel
- Multiplatform Settings
- Kotlinx Serialization
- Coroutines
- Koin
- Kermit
- Moko-Resources
- Realm-kotlin
- Multiplatform-paging
- Uuid
- Kotest
Following projects have played a huge role in development of KMM-Arch-PetSearch. I am grateful to authors of projects below for sharing such highly valuable material.
- KaMPKit
- moko-template
- Food2Fork-KMM
- tv-maniac
- kmm-demo by fededri
- kmp-viewmodel
- ViewModelNavigationCompose
- MortyComposeKMM
- Code Snippets
- kmm-samples
MIT license. See the LICENSE file for more information.