Skip to content

Commit

Permalink
Changing build scripts for a proper supports of KotlinJS
Browse files Browse the repository at this point in the history
  • Loading branch information
orchestr7 committed Nov 28, 2021
1 parent 7b56e4d commit 999d00c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
tags:
- 'v*'
branches:
- main

env:
PGP_SEC: ${{ secrets.PGP_SEC }}
Expand Down
14 changes: 10 additions & 4 deletions ktoml-core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.akuleshov7.buildutils.configurePublishing
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest

Expand All @@ -9,6 +10,8 @@ plugins {

kotlin {
explicitApi()

// building jvm task only on windows
jvm {
compilations.all {
kotlinOptions {
Expand All @@ -17,11 +20,14 @@ kotlin {
}
}

js(LEGACY)
val os = getCurrentOperatingSystem()

linuxX64()
mingwX64()
macosX64()
when {
os.isWindows -> mingwX64()
os.isLinux -> linuxX64()
os.isMacOsX -> macosX64()
else -> throw GradleException("Unknown operating system $os")
}

sourceSets {
all {
Expand Down

0 comments on commit 999d00c

Please sign in to comment.