mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-06 00:46:54 +00:00
[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:
@@ -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"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user