Skip to content

Kotlin Multi Platform with Ktor (Andriod, iOS, & React)

Notifications You must be signed in to change notification settings

eloew/KotlinMpp

Repository files navigation

Kotlin MPP - Kotlin Multi Platform with Ktor

Base app for my Kotlin Multi Platform work.
  • Kotlin Multi Platorm/Ktor application:

  • Versions.

    • IntelliJ Ultimate 2020.2
    • Android Studio 4.0.1
    • Gradle 6.1.1
    • Kotlin 1.4.0
    • Ktor 1.4.0
    • Kotlin Coroutines 1.3.9-native-mt
    • Kotlin Serialization 1.0.0-RC
    • XCode 11.6
    • macOS 10.15.5
  • JavaScript

    • Static Web App
    • React
      • Execute tasks: publishJsPublicationToMavenLocal in project KotlinMpp/SharedCode
      • Execute task browserDevelopmentWebpack in KotlinMppReact
        • copy js/KotlinMppReact/build/distributions KotlinMppReact.js & index.html]() for deployment
  • Setup

  • Build

  • Testing

    • Start backend project in inteliJ
    • Run Android and/or iOS app
    • or run ReactApp with ./gradlew run --continuous
    • or KotlinMppStaticWeb
      • Right click index.html > Run index.html
  • Deployment

    • Check Endpoint in ConstantsShared
    • Run Gradle Task SharedCode build
    • Run Gradle Task SharedCode publishing publicJsPublicationToMavenLocal
    • KotlinMppKtor ./gradlew war
    • Rename backend/KotlinMppKtor/build/libs kotlinmppktor.1.0.0.war to kotlinmppktor.war
    • copy kotlinmppktor.war to deployment directory
    • KotolinMppReact gradle task clean
    • KotlinMppReact gradle task browserDevelopmentWebpack
      • copy build/distributions to deployment diretory
  • Resources