Coder Social home page Coder Social logo

kotlin-hands-on / intro-kotlin-mutliplatform Goto Github PK

View Code? Open in Web Editor NEW
21.0 2.0 13.0 95 KB

Kotlin Multiplatform project (MPP), JVM and JS

Home Page: https://play.kotlinlang.org/hands-on/Introduction%20to%20Kotlin%20Multiplatform

License: Apache License 2.0

kotlin kotlin-js kotlin-dsl kotlin-jvm ktor gradle-kotlin-dsl hands-on-lab tutorial-code

intro-kotlin-mutliplatform's Introduction

official JetBrains project GitHub license

Introduction to Kotlin Multiplatform

You can find the code for the hands-on lab on Introduction to Kotlin Multiplatform

Branches

We use Git Branches to separate different steps of the tutorial. Please check step-NNN branches for more details:

  • step-001 branch contains the basic Kotlin/JVM + Ktor server application
  • step-002 kotlin Multiplatform project
  • step-003 JS target to render HTML
  • step-004 common code to share a constant
  • step-005 rendering code in the common source set, JVM works
  • step-006 putting all together, rendering both in JS and JVM

intro-kotlin-mutliplatform's People

Contributors

jonnyzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

intro-kotlin-mutliplatform's Issues

jsRun does not work for windows, upgrade the kotlin plugin

When running gradlew jsRun "SyntaxError: missing ) after argument list" happens

C:\Users\gwozd\IdeaProjects\intro-kotlin-mutliplatform>gradlew.bat jsRun

> Configure project :
Kotlin Multiplatform Projects are an experimental feature.

> Task :jsBrowserRun FAILED
C:\Users\gwozd\IdeaProjects\intro-kotlin-mutliplatform\build\js\packages\kotlin-fractals2-handson\node_modules\.bin\webpack-dev-server:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
          ^^^^^^^

SyntaxError: missing ) after argument list
    at new Script (vm.js:80:7)
    at createScript (vm.js:274:10)
    at Object.runInThisContext (vm.js:326:10)
    at Module._compile (internal/modules/cjs/loader.js:664:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jsBrowserRun'.

switching from kotlin("multiplatform") version "1.3.40" to 1.3.61 fixes the problem

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.