From 884f587937c8dfd47c7de36e8216aad6ff4bf5d1 Mon Sep 17 00:00:00 2001 From: Andrey Kuleshov Date: Tue, 11 May 2021 17:53:17 +0300 Subject: [PATCH] Bugfix/configuration (#27) Fixes for release process ### What's done: - changed workflow scripts --- .github/workflows/release.yml | 2 +- ktoml-core/build.gradle.kts | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e2a7d34..43d28657 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ windows-latest, macos-latest ] # ubuntu-latest, ] steps: - name: Checkout uses: actions/checkout@v2.3.3 diff --git a/ktoml-core/build.gradle.kts b/ktoml-core/build.gradle.kts index 112e1f46..410e1643 100644 --- a/ktoml-core/build.gradle.kts +++ b/ktoml-core/build.gradle.kts @@ -16,9 +16,15 @@ kotlin { } } } - linuxX64() - mingwX64() - macosX64() + + val os = org.gradle.nativeplatform.platform.internal.DefaultNativePlatform.getCurrentOperatingSystem() + // Create a target for the host platform. + when { + os.isLinux -> linuxX64() + os.isWindows -> mingwX64() + os.isMacOsX -> macosX64() + else -> throw GradleException("Host OS '${os.name}' is not supported in Kotlin/Native $project.") + } sourceSets { val commonMain by getting {