forked from JetBrains/lets-plot
/
build.gradle
139 lines (115 loc) · 3.71 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
127
128
129
130
131
132
133
134
135
136
137
138
buildscript {
dependencies {
classpath("org.yaml:snakeyaml:1.25")
}
}
plugins {
id 'kotlin-multiplatform' version '1.3.61' apply false
// id "org.jetbrains.kotlin.jvm" version "1.3.50" apply false
id 'org.jetbrains.gradle.plugin.idea-ext' version '0.5' apply false
// executing node scripts (adds support for Yarn. Also - NPM, Grunt and Gulp)
id 'com.moowork.node' version '1.3.1' apply false
id "com.jfrog.bintray" version '1.8.4' apply false
id 'com.github.johnrengelman.shadow' version '5.1.0' apply false
}
group 'org.jetbrains.lets-plot'
version "1.1.0rc1"
project.ext.js_artifact_version = "1.1.0rc1"
/*
* 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.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
}
settings.putIfAbsent("enable_livemap", false)
project.ext.buildSettings = settings
allprojects {
// println "--- project ---: $project.name $project.depth ${if(project.depth > 0) project.parent.rootDir else ''}"
// println "--- project ---: $project.name $project.rootDir"
}
def include_sources_letsPlotJvmCommon = [
'base-portable',
'base',
// 'mapper-core',
'vis-canvas',
'vis-svg',
// 'vis-svg-mapper',
// 'vis-svg-mapper-jfx',
'plot-base-portable',
'plot-base',
'plot-common-portable',
'plot-common',
'plot-builder-portable',
'plot-builder',
'plot-config-portable',
'plot-config',
// 'vis-demo-common',
// 'vis-demo-common-jfx',
]
def include_sources_letsPlotJvmJfx = [
'mapper-core',
'vis-svg-mapper',
'vis-svg-mapper-jfx',
'vis-demo-common',
'vis-demo-common-jfx',
]
configurations {
letsPlotJvmCommonSources
letsPlotJvmJfxSources
}
subprojects {
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
jcenter()
}
tasks.all {
if (name in ['compileKotlinJvm', 'compileTestKotlinJvm']) {
kotlinOptions.jvmTarget = "1.8"
}
// if (name == 'compileKotlinJs') {
// }
}
// jar jvm sources of this project
if (name in include_sources_letsPlotJvmCommon || name in include_sources_letsPlotJvmJfx) {
apply plugin: '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)
}
}
}
// Bintray settings
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: 'lets-plot-jars',
]