...

Text file src/github.com/google/flatbuffers/kotlin/flatbuffers-kotlin/build.gradle.kts

Documentation: github.com/google/flatbuffers/kotlin/flatbuffers-kotlin

     1plugins {
     2  kotlin("multiplatform")
     3}
     4
     5group = "com.google.flatbuffers.kotlin"
     6version = "2.0.0-SNAPSHOT"
     7
     8kotlin {
     9  explicitApi()
    10  jvm()
    11  js {
    12    browser {
    13     testTask {
    14        useKarma {
    15          useChromeHeadless()
    16        }
    17      }
    18    }
    19    binaries.executable()
    20  }
    21  macosX64()
    22  iosArm32()
    23  iosArm64()
    24  iosX64()
    25
    26  sourceSets {
    27    val commonMain by getting {
    28      dependencies {
    29        implementation(kotlin("stdlib-common"))
    30      }
    31    }
    32
    33    val commonTest by getting {
    34      dependencies {
    35        implementation(kotlin("test"))
    36      }
    37    }
    38    val jvmTest by getting {
    39      dependencies {
    40        implementation(kotlin("test-junit"))
    41      }
    42    }
    43    val jvmMain by getting {
    44      kotlin.srcDir("java")
    45    }
    46
    47    val jsMain by getting {
    48      dependsOn(commonMain)
    49    }
    50    val jsTest by getting {
    51      dependsOn(commonTest)
    52      dependencies {
    53        implementation(kotlin("test-js"))
    54      }
    55    }
    56    val nativeMain by creating {
    57        dependsOn(commonMain)
    58    }
    59    val nativeTest by creating {
    60      dependsOn(commonMain)
    61    }
    62    val macosX64Main by getting {
    63      dependsOn(nativeMain)
    64    }
    65
    66    val iosArm32Main by getting {
    67      dependsOn(nativeMain)
    68    }
    69    val iosArm64Main by getting {
    70      dependsOn(nativeMain)
    71    }
    72    val iosX64Main by getting {
    73      dependsOn(nativeMain)
    74    }
    75
    76    all {
    77      languageSettings.enableLanguageFeature("InlineClasses")
    78      languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
    79    }
    80  }
    81}
    82
    83// Fixes JS issue: https://youtrack.jetbrains.com/issue/KT-49109
    84rootProject.plugins.withType<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin> {
    85  rootProject.the<org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension>().nodeVersion = "16.0.0"
    86}

View as plain text