v0.2.0 #206
4
.github/workflows/gradle.yml
vendored
4
.github/workflows/gradle.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||||
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslLinuxX64 build
|
run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslNative build
|
||||||
build-osx:
|
build-osx:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
@ -62,4 +62,4 @@ jobs:
|
|||||||
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
key: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||||
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
restore-keys: ${{ runner.os }}-konan-1.4.20-eap-37
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslMacosX64 build
|
run: ./gradlew -Dorg.gradle.daemon=false --build-cache :kmath-gsl:cinteropLibgslNative build
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
@file:Suppress("UNUSED_VARIABLE")
|
@file:Suppress("UNUSED_VARIABLE")
|
||||||
|
|
||||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("ru.mipt.npm.native")
|
id("ru.mipt.npm.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
targets.withType<KotlinNativeTarget> {
|
val nativeTarget = when (System.getProperty("os.name")) {
|
||||||
compilations["main"].cinterops {
|
"Mac OS X" -> macosX64("native")
|
||||||
|
"Linux" -> linuxX64("native")
|
||||||
|
else -> throw GradleException("Host OS is not supported in Kotlin/Native.")
|
||||||
|
}
|
||||||
|
|
||||||
|
val main by nativeTarget.compilations.getting {
|
||||||
|
cinterops {
|
||||||
val libgsl by creating {
|
val libgsl by creating {
|
||||||
defFile("src/nativeInterop/cinterop/libgsl.def")
|
defFile("src/nativeInterop/cinterop/libgsl.def")
|
||||||
includeDirs { allHeaders("./src/nativeMain/resources/") }
|
includeDirs { allHeaders("./src/nativeMain/resources/") }
|
||||||
|
Loading…
Reference in New Issue
Block a user