Kotlin / kotlinx-browser

Kotlin browser API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kotlinx-browser

Kotlin Alpha JetBrains official project GitHub license Kotlin Slack channel TeamCity build

Kotlin WasmJS browser API

A Kotlin library for working with browser declarations in WasmJs.

This library contains is a replacement for browser declarations, which planned to be removed from Kotlin WasmJS standard library.

See Using in your projects for the instructions how to setup a dependency in your project.

Status

This library is still in work-in-progress state. Which means that it is not published into public repository and not yet intended to use by end user.

Requirements

Is required to use:

  • Kotlin 1.9.23 or newer

Using in your projects

Note that the library is experimental, and the API is subject to change.

The library is compatible with the Kotlin Standard Library not lower than 1.9.23.

Gradle

  • Add the Maven Central repository if it is not already there:
repositories {
    mavenCentral()
}
  • In multiplatform projects, add a dependency to the wasmJsMain source set dependencies
kotlin {
    sourceSets {
        wasmJsMain {
             dependencies {
                 implementation("org.jetbrains.kotlinx:kotlinx-browser:0.3")
             }
        }
    }
}

Building

The project requires Kotlin 1.9.23 to build and to run tests.

After that, the project can be opened in IDEA and/or built with Gradle.

To build and run tests, execute:

./gradlew build

About

Kotlin browser API

License:Apache License 2.0


Languages

Language:Kotlin 100.0%