forked from JetBrains/lets-plot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
127 lines (109 loc) · 3.56 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
buildscript {
dependencies {
classpath "org.yaml:snakeyaml:1.25"
}
}
plugins {
id "org.jetbrains.kotlin.multiplatform" apply false
id "org.jetbrains.kotlin.js" apply false
id "org.jetbrains.gradle.plugin.idea-ext" apply false
id "com.jfrog.bintray" apply false
id "com.github.johnrengelman.shadow" apply false
}
def include_sources_letsPlotJvmCommon = [
'base-portable',
'base',
'vis-canvas',
'vis-svg-portable',
'plot-base-portable',
'plot-base',
'plot-common-portable',
'plot-common',
'plot-builder-portable',
'plot-builder',
'plot-config-portable',
'plot-config',
]
def include_sources_letsPlotJvmJfx = [
'mapper-core',
'vis-svg-mapper',
'vis-svg-mapper-jfx',
'vis-demo-common',
'vis-demo-common-jfx',
]
def include_sources_letsPlotJvmBatik = [
'mapper-core',
'vis-svg-mapper',
'vis-svg-mapper-batik',
'vis-demo-common',
'vis-demo-common-batik',
]
configurations {
letsPlotJvmCommonSources
letsPlotJvmJfxSources
letsPlotJvmBatikSources
}
allprojects {
group = 'org.jetbrains.lets-plot'
version = "1.5.3-SNAPSHOT"
project.ext.js_artifact_version = "1.5.3.dev1"
// see also: python-package/lets_plot/_version.py
repositories {
mavenCentral()
jcenter()
}
// jar jvm sources of this project
if (name in include_sources_letsPlotJvmCommon || name in include_sources_letsPlotJvmJfx || name in include_sources_letsPlotJvmBatik) {
apply plugin: "org.jetbrains.kotlin.multiplatform"
kotlin.jvm {} // for `jvmSourcesJar` task
build.dependsOn += jvmSourcesJar
}
// make build configuration depend on sources jars
def sources_jar_path = "${buildDir}/libs/${name}-jvm-${version}-sources.jar"
if (name in include_sources_letsPlotJvmCommon) {
rootProject.dependencies {
letsPlotJvmCommonSources files(sources_jar_path)
}
}
if (name in include_sources_letsPlotJvmJfx) {
rootProject.dependencies {
letsPlotJvmJfxSources files(sources_jar_path)
}
}
if (name in include_sources_letsPlotJvmBatik) {
rootProject.dependencies {
letsPlotJvmBatikSources files(sources_jar_path)
}
}
}
import org.yaml.snakeyaml.Yaml
def build_settings_file = new File(rootDir, "build_settings.yml")
if (!build_settings_file.canRead()) {
throw new GradleException("Couldn't read build_settings.yml")
}
def settings = new Yaml().load(build_settings_file.newInputStream())
if (settings.build_python_extension) {
assert settings.python.include_path != null
}
if (settings.enable_python_package) {
assert settings.build_python_extension
assert settings.python.bin_path != null
}
project.ext.buildSettings = settings
// Bintray settings
// define the package name in the Bintray Maven repository depending on the version name
def bintray_mvn_pkg_name = 'lets-plot-jars'
if (version.contains('SNAPSHOT') || version.contains('rc')) {
bintray_mvn_pkg_name = 'lets-plot-jars-dev'
}
project.ext["bintraySettings"] = [
userOrg : 'jetbrains',
licenses : ['MIT'],
vcsUrl : 'https://github.com/JetBrains/lets-plot',
publish : true,
js_repo : "lets-plot",
js_pkg_name : 'lets-plot-js',
js_artifact_version: js_artifact_version,
mvn_repo : 'lets-plot-maven',
mvn_pkg_name : bintray_mvn_pkg_name,
]