| plugins { |
| kotlin("multiplatform") version "1.5.21" |
| id("maven-publish") |
| id("org.jetbrains.dokka") version "1.4.32" |
| } |
| |
| group = "dev.kdrag0n" |
| version = "1.0.0" |
| |
| repositories { |
| mavenCentral() |
| } |
| |
| kotlin { |
| jvm { |
| compilations.all { |
| kotlinOptions.jvmTarget = "1.8" |
| } |
| testRuns["test"].executionTask.configure { |
| useJUnit() |
| } |
| } |
| js { |
| nodejs() |
| } |
| val hostOs = System.getProperty("os.name") |
| val isMingwX64 = hostOs.startsWith("Windows") |
| val nativeTarget = when { |
| hostOs == "Mac OS X" -> macosX64("native") |
| hostOs == "Linux" -> linuxX64("native") |
| isMingwX64 -> mingwX64("native") |
| else -> throw GradleException("Host OS is not supported in Kotlin/Native.") |
| } |
| |
| |
| sourceSets { |
| val commonMain by getting |
| val commonTest by getting { |
| dependencies { |
| implementation(kotlin("test")) |
| } |
| } |
| val jvmMain by getting |
| val jvmTest by getting |
| val jsMain by getting |
| val jsTest by getting |
| val nativeMain by getting |
| val nativeTest by getting |
| } |
| } |
| |
| publishing { |
| repositories { |
| maven { |
| |
| } |
| } |
| } |