2021-01-28 22:49:25 +00:00
|
|
|
plugins {
|
2022-04-08 18:23:13 +00:00
|
|
|
kotlin("multiplatform")
|
2021-01-28 22:49:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
group = "com.google.flatbuffers.kotlin"
|
2021-05-10 18:14:47 +00:00
|
|
|
version = "2.0.0-SNAPSHOT"
|
2021-01-28 22:49:25 +00:00
|
|
|
|
|
|
|
kotlin {
|
|
|
|
explicitApi()
|
|
|
|
jvm()
|
2021-04-12 17:30:15 +00:00
|
|
|
js {
|
|
|
|
browser {
|
2022-04-08 18:23:13 +00:00
|
|
|
testTask {
|
2021-04-12 17:30:15 +00:00
|
|
|
useKarma {
|
|
|
|
useChromeHeadless()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-08 18:23:13 +00:00
|
|
|
binaries.executable()
|
2021-04-12 17:30:15 +00:00
|
|
|
}
|
2021-01-28 22:49:25 +00:00
|
|
|
macosX64()
|
2021-04-15 18:29:51 +00:00
|
|
|
iosArm32()
|
|
|
|
iosArm64()
|
|
|
|
iosX64()
|
2021-01-28 22:49:25 +00:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
val commonMain by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("stdlib-common"))
|
|
|
|
}
|
|
|
|
}
|
2021-05-10 18:14:47 +00:00
|
|
|
|
2021-01-28 22:49:25 +00:00
|
|
|
val commonTest by getting {
|
|
|
|
dependencies {
|
2022-04-08 18:23:13 +00:00
|
|
|
implementation(kotlin("test"))
|
2021-01-28 22:49:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
val jvmTest by getting {
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test-junit"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
val jvmMain by getting {
|
|
|
|
kotlin.srcDir("java")
|
|
|
|
}
|
|
|
|
|
2021-04-12 17:30:15 +00:00
|
|
|
val jsMain by getting {
|
|
|
|
dependsOn(commonMain)
|
|
|
|
}
|
|
|
|
val jsTest by getting {
|
|
|
|
dependsOn(commonTest)
|
|
|
|
dependencies {
|
|
|
|
implementation(kotlin("test-js"))
|
|
|
|
}
|
|
|
|
}
|
2021-01-28 22:49:25 +00:00
|
|
|
val nativeMain by creating {
|
|
|
|
dependsOn(commonMain)
|
|
|
|
}
|
|
|
|
val nativeTest by creating {
|
|
|
|
dependsOn(commonMain)
|
|
|
|
}
|
|
|
|
val macosX64Main by getting {
|
|
|
|
dependsOn(nativeMain)
|
|
|
|
}
|
2021-04-15 18:29:51 +00:00
|
|
|
|
|
|
|
val iosArm32Main by getting {
|
|
|
|
dependsOn(nativeMain)
|
|
|
|
}
|
|
|
|
val iosArm64Main by getting {
|
|
|
|
dependsOn(nativeMain)
|
|
|
|
}
|
|
|
|
val iosX64Main by getting {
|
|
|
|
dependsOn(nativeMain)
|
|
|
|
}
|
|
|
|
|
2021-01-28 22:49:25 +00:00
|
|
|
all {
|
|
|
|
languageSettings.enableLanguageFeature("InlineClasses")
|
2022-04-08 18:23:13 +00:00
|
|
|
languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
|
2021-01-28 22:49:25 +00:00
|
|
|
}
|
|
|
|
}
|
2022-04-08 18:23:13 +00:00
|
|
|
}
|
2021-01-28 22:49:25 +00:00
|
|
|
|
2022-04-08 18:23:13 +00:00
|
|
|
// Fixes JS issue: https://youtrack.jetbrains.com/issue/KT-49109
|
|
|
|
rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
|
|
|
|
rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
|
2021-01-28 22:49:25 +00:00
|
|
|
}
|