forked from JetBrains/lets-plot
/
build.gradle
51 lines (42 loc) · 1.31 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
plugins {
id 'kotlin-multiplatform'
id 'org.jetbrains.gradle.plugin.idea-ext'
}
/*
* Copyright (c) 2019. JetBrains s.r.o.
* Use of this source code is governed by the MIT license that can be found in the LICENSE file.
*/
import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform
def currentOs = DefaultNativePlatform.getCurrentOperatingSystem()
kotlin {
if (project.buildSettings.build_python_extension) {
def target
if (currentOs.isMacOsX()) {
target = macosX64("native")
} else if (currentOs.isLinux()) {
target = linuxX64("native")
} else {
throw "Unsupported platform " + currentOs.displayName
}
target.binaries {
staticLib {
baseName = "datalore-plot-${project.name}"
}
}
target.compilations.main.cinterops {
python {
compilerOpts "-I${project.buildSettings.python.include_path}"
}
}
}
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib-common')
// (!) only `portable` sources
implementation project(':base-portable')
implementation project(':plot-config-portable')
}
}
}
}