- check your system with KDoctor
- install JDK 11 on your machine
- install Android Studio
- install Kotlin Multiplatform plugin on your android studio
- install Xcode
- add
local.properties
file to the project root and set a path to Android SDK there - run
./gradlew podInstall
in the project root
brew tap mdogan/zulu
brew install --cask zulu-jdk11
ls /Library/Java/JavaVirtualMachines
Set a JAVA_HOME environment variable
unset JAVA_HOME
export JAVA_HOME=$(/usr/libexec/java_home -v 11)
Since each kind of product can have its own discount rule. Every item should implement this rule on its own Take a look into StoreCheckoutRules there there are all products currently supported
No DI framework added but all dependencies added through constructors
Presenter has some inspiration on Molecule presenter sample
- Add previews on android folder Previews for compose is not available on commonMain yet, as improvement here add previews on android folder would be good.
- Map product types as Enum instead of Strings Since the number of products are small its ok for while to keep as strings, but it can create misconfiguration passing strings for instance, on tests.
Fakes to replace real request, avoiding mocks and testing all parts as much as possible.
- Gradle 8
- Kotlin 1.8
- Voyager for multiplatform navigation
- Compose multiplatform for UI
- Ktor for requests
- Kotlin Test for simple assertions
- Turbine for tests with flow
- Paparazzi for screenshot tests
- Kotlin Serialization for handle serialize/deserialize responses
To run the application on android device/emulator:
- open project in Android Studio and run imported android run configuration
To build the application bundle:
- run
./gradlew :applications:androidApp:assembleDebug
- find
.apk
file inandroidApp/build/outputs/apk/debug/challenge-debug.apk
To run the application on iPhone device/simulator:
- Open
iosApp/iosApp.xcworkspace
in Xcode and run standard configuration - Or use Kotlin Multiplatform Mobile plugin for Android Studio If you have some problem with the first build with KMM plugin, please try with XCode
Run the browser application: ./gradlew :applications:webApp:jsBrowserDevelopmentRun
Android | IOS | Web |
---|---|---|
x | ||
x |
Colors from Cabify brand
Icons from Composable icons