Code Monkey home page Code Monkey logo

food2fork-kmm's Introduction

Food2Fork App Icon Food2Fork Recipe App

This is the codebase for a Kotlin Multiplatform Mobile course. [Watch the course](https://codingwithmitch.com/courses/kotlin-multiplatform-mobile/)

Architecture

Shared Components

  1. Ktor (Network Client)
  2. SQL Delight (Caching Client)
  3. Kotlinx.datetime

Android Specific Components

  1. Jetpack Compose
  2. Jetpack Compose Navigation
    • (Single activity, zero fragments)
  3. Accompanist Coil
  4. Hilt
    • I decided to use AAC ViewModel because it gives so much state management stuff for free. Maybe in the future a shared viewmodel will be more practical. I'll talk about this in detail in the course.
    • See this tweet thread if you want to do some reading: https://twitter.com/ianhlake/status/1388517293005574144

iOS Specific Components

  1. SwiftUI


Important Configuration Information

Important Android Studio and gradle configuration information for this project.

Android Studio Version

I've been using "Android Studio Arctic Fox (2020.3.1) Canary 8". I was using a newer version but had some issues. If you want to decrease the probability that you will have random issues that I did not, use the same version as me.

You can download here: Android Studio Archive.

Kotlin Multiplatform Mobile Plugin

Make sure you install this plugin. It will make your life way easier.

The Kotlin Multiplatform Mobile (KMM) plugin makes it easier to develop a Kotlin Multiplatform Project in Android Studio.

Install here: Kotlin Multiplatform Mobile Plugin

build.gradle (shared)

Make sure your shared build.gradle contains this configurations block in the android{...} configuration section. The "getting started" guide on the kotlinlang.org website used to contain this but it doesn't anymore for some reason. Maybe it is not needed for newer versions of Canary. I'm not sure. But my projects do not build without it.

build.gradle.kts (shared)

... stuff

android {
    compileSdkVersion(30)
    sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
    defaultConfig {
        minSdkVersion(21)
        targetSdkVersion(30)
    }
    configurations { // <--- This
        create("androidTestApi")
        create("androidTestDebugApi")
        create("androidTestReleaseApi")
        create("testApi")
        create("testDebugApi")
        create("testReleaseApi")
    }
}

... more stuff

Kotlin Version

Make sure you have this setting in android studio:

Kotlin Multiplatform Talks

  1. Mitch Tabian
    1. Is Kotlin Multiplatform Ready for Production?
    2. KMM - Fragmented Podcast
  2. Daniele Barconcelli
  3. Ekaterina Petrova
  4. Dmitry Savvinov
  5. Kevin Galligan
  6. Ben Asher and Alec Strong

food2fork-kmm's People

Contributors

mitchtabian avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.