Files
flatbuffers/kotlin/flatbuffers-kotlin/build.gradle.kts
Paulo Pinheiro d658239484 [Kotlin] Update gradle to 7.4.1 and simplify config files. (#7231)
* [Kotlin] Update gradle to 7.4.1 and simplify config files.

* [Kotlin] Add wrapper-validation-action to Kotlin Linux

* [Kotlin] Remove benchmark actions to reduce CI time

* [Kotlin] Move CI js test to Linux action, to increase Mac action speed

* [Kotlin] Generate gradle wrapper in order to be validate

Gradle wrapper from 3.3 to 4.0 are not verifiable because those files
were dynamically generated by Gradle in a non-reproducible way.

So they are now regenerated and will be checked using gitlab action:
gradle/wrapper-validation-action@v1
2022-04-08 11:23:13 -07:00

87 lines
1.7 KiB
Kotlin

plugins {
kotlin("multiplatform")
}
group = "com.google.flatbuffers.kotlin"
version = "2.0.0-SNAPSHOT"
kotlin {
explicitApi()
jvm()
js {
browser {
testTask {
useKarma {
useChromeHeadless()
}
}
}
binaries.executable()
}
macosX64()
iosArm32()
iosArm64()
iosX64()
sourceSets {
val commonMain by getting {
dependencies {
implementation(kotlin("stdlib-common"))
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
}
}
val jvmTest by getting {
dependencies {
implementation(kotlin("test-junit"))
}
}
val jvmMain by getting {
kotlin.srcDir("java")
}
val jsMain by getting {
dependsOn(commonMain)
}
val jsTest by getting {
dependsOn(commonTest)
dependencies {
implementation(kotlin("test-js"))
}
}
val nativeMain by creating {
dependsOn(commonMain)
}
val nativeTest by creating {
dependsOn(commonMain)
}
val macosX64Main by getting {
dependsOn(nativeMain)
}
val iosArm32Main by getting {
dependsOn(nativeMain)
}
val iosArm64Main by getting {
dependsOn(nativeMain)
}
val iosX64Main by getting {
dependsOn(nativeMain)
}
all {
languageSettings.enableLanguageFeature("InlineClasses")
languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
}
}
}
// 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"
}