[Kotlin][FlexBuffers] Add support for Kotlin-JS (#6554)

Flexbuffers for Kotlin currently supports JVM and MacOS. This change
introduces support to JS as well.
This commit is contained in:
Paulo Pinheiro
2021-04-12 19:30:15 +02:00
committed by GitHub
parent 261cf3b204
commit 4d2364f342
9 changed files with 194 additions and 100 deletions

View File

@@ -8,6 +8,16 @@ version = "1.12.0-SNAPSHOT"
kotlin {
explicitApi()
jvm()
js {
browser {
binaries.executable()
testTask {
useKarma {
useChromeHeadless()
}
}
}
}
macosX64()
sourceSets {
@@ -35,6 +45,15 @@ kotlin {
}
}
val jsMain by getting {
dependsOn(commonMain)
}
val jsTest by getting {
dependsOn(commonTest)
dependencies {
implementation(kotlin("test-js"))
}
}
val nativeMain by creating {
dependsOn(commonMain)
}
@@ -55,6 +74,7 @@ kotlin {
* https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets */
targets {
targetFromPreset(presets.getAt("jvm"))
targetFromPreset(presets.getAt("js"))
targetFromPreset(presets.getAt("macosX64"))
}
}