Giter Site home page Giter Site logo

kmmdemolibrary's Introduction

KMM Demo Library

This is a simple demo I'm making to demonstrate how to create a Kotlin Multiplatform library and use it in Android and iOS applications.

How to use this library

The compiled artifacts for this library are not being publicly distributed yet, so you need to clone this repo to your machine, compile/host the artifacts locally. I'll look how to host the artifacts remotely in Maven/Sonatype soon.

Distribute the library's artifacts in your local machine

  • Clone the repository
  • Make sure you can compile the project locally in Android Studio.
  • In the terminal, execute this command: ./gradlew publishToMavenLocal

Import this library in an Android app

Add the mavenLocal() repository to your build.gradle's repositories block.

Include the dependency in your build.gradle:

implementation 'com.vron:kmm-library:0.1'

After that you should be able to import the code from the library and use its functions and classes:

import com.vron.kmmdemolib.getPlatform

val platformName = getPlatform().name
Log.d("KMM TEST", "Platform: $platformName")

kmmdemolibrary's People

Contributors

victorraft avatar

Watchers

 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.