Giter Site home page Giter Site logo

xorum-io / rekamp Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 3.0 81 KB

Port of ReKotlin to Kotlin Multiplatform, which corresponds to ReKotlin/1.0.4. Supports JVM, Android, iOS.

License: MIT License

Shell 0.39% Kotlin 99.61%
kotlin kotlin-multiplatform rekotlin jvm android ios swift

rekamp's Introduction

ReKamp

License MIT

Port of ReKotlin to Kotlin Multiplatform, which corresponds to ReKotlin/1.0.4. Supports JVM, Android, iOS.

Introduction

This is an almost exact copy of ReKotlin/1.0.4 with a few changes to source code and Gradle scripts to support Kotlin Multiplatform.

See official ReKotlin documentation for examples of usage in JVM / Android projects. Nothing has changed on these platforms. For usage in iOS projects, see the next section.

Usage on iOS

Kotlin Multiplatform allows the code written in Kotlin to run on any widely-used platforms. In case of iOS, Kotlin is compiled by Kotlin/Native to native code, which can be run without JVM.

You can even access libraries used in common Kotlin code from your iOS code written in Obj-C / Swift. There are a few limitation though, which change class / methods namings.

Library prefix

Even though Swift has namespaces, we can't benefit from them when working with KMP. It happens because shared code is linked trough Obj-C header file.

To prevent collisions of class names from different libraries, Kotlin/Native is adding prefixes to any class name available in library. This prefix is used to be the library name.

In our case, it's ReKamp prefix. For example, StoreSubscriber becomes ReKampStoreSubscriber.

Download

Add the repository to your project's build.gradle

repositories {
    mavenCentral()
}

Simply add following in your commonMain source set

implementation "io.xorum:ReKamp-kotlinMultiplatform:1.0.8"

Example of usage can be found here: https://github.com/xorum-io/codeforces_watcher/blob/dev/common/build.gradle

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.